From fa8dfd225de80c0272162a223e734b485b1849b8 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Sun, 14 May 2023 09:52:16 +0200 Subject: [PATCH] fix: get rid of the `FileChanges` abstraction I don't believe this is actually needed. We can simplify the `WorkspaceEdit` further and put together the mapping for `changes` according to the LSP spec later on down the line. This will allow us to remove the need for the `URI`, which is problematic. closes #7252 --- .../src/main/java/xsbti/FileChanges.java | 21 ------------------- .../src/main/java/xsbti/WorkspaceEdit.java | 5 ++--- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 internal/util-interface/src/main/java/xsbti/FileChanges.java diff --git a/internal/util-interface/src/main/java/xsbti/FileChanges.java b/internal/util-interface/src/main/java/xsbti/FileChanges.java deleted file mode 100644 index 52ea6e573..000000000 --- a/internal/util-interface/src/main/java/xsbti/FileChanges.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * sbt - * Copyright 2011 - 2018, Lightbend, Inc. - * Copyright 2008 - 2010, Mark Harrah - * Licensed under Apache License 2.0 (see LICENSE) - */ - -package xsbti; - -import java.net.URI; -import java.util.List; - -/** A collection of TextEdits that belong to a given URI. */ -public interface FileChanges { - - /** The URI that the edits belong to. */ - URI uri(); - - /** The edits belonging to the URI. */ - List edits(); -} diff --git a/internal/util-interface/src/main/java/xsbti/WorkspaceEdit.java b/internal/util-interface/src/main/java/xsbti/WorkspaceEdit.java index 438e38aad..8508e5826 100644 --- a/internal/util-interface/src/main/java/xsbti/WorkspaceEdit.java +++ b/internal/util-interface/src/main/java/xsbti/WorkspaceEdit.java @@ -7,7 +7,6 @@ package xsbti; -import java.net.URI; import java.util.List; /** @@ -22,6 +21,6 @@ import java.util.List; */ public interface WorkspaceEdit { - /** List of [[xsbti.FileChanges]] that belong to this WorkspaceEdit. */ - List changes(); + /** List of [[xsbti.TextEdit]] that belong to this WorkspaceEdit. */ + List changes(); }