-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7302cf2
commit b0f6da9
Showing
18 changed files
with
332 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package scala.meta.pc; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
import java.util.Optional; | ||
import java.net.URI; | ||
|
||
public interface Buffers { | ||
Optional<PcAdjustFileParams> getFile(URI uri, String scalaVersion); | ||
} |
8 changes: 8 additions & 0 deletions
8
mtags-interfaces/src/main/java/scala/meta/pc/PcAdjustFileParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package scala.meta.pc; | ||
|
||
import org.eclipse.lsp4j.Location; | ||
|
||
public interface PcAdjustFileParams { | ||
VirtualFileParams params(); | ||
Location adjustLocation(Location location); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
mtags-interfaces/src/main/java/scala/meta/pc/ReferencesRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package scala.meta.pc; | ||
|
||
import java.util.List; | ||
import java.net.URI; | ||
|
||
public interface ReferencesRequest { | ||
OffsetParams params(); | ||
boolean includeDefinition(); | ||
List<URI> targetUris(); | ||
} |
9 changes: 9 additions & 0 deletions
9
mtags-interfaces/src/main/java/scala/meta/pc/ReferencesResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package scala.meta.pc; | ||
|
||
import java.util.List; | ||
import org.eclipse.lsp4j.Location; | ||
|
||
public interface ReferencesResult { | ||
String symbol(); | ||
List<Location> locations(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
mtags-shared/src/main/scala/scala/meta/internal/pc/NoopBuffers.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package scala.meta.internal.pc | ||
|
||
import java.net.URI | ||
import java.util.Optional | ||
|
||
import scala.meta.pc.Buffers | ||
import scala.meta.pc.PcAdjustFileParams | ||
|
||
object NoopBuffers extends Buffers { | ||
override def getFile( | ||
uri: URI, | ||
scalaVersion: String | ||
): Optional[PcAdjustFileParams] = Optional.empty() | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
mtags-shared/src/main/scala/scala/meta/internal/pc/ReferencesResultImpl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package scala.meta.internal.pc | ||
|
||
import java.{util => ju} | ||
|
||
import scala.meta.pc.ReferencesResult | ||
|
||
import org.eclipse.lsp4j.Location | ||
|
||
case class ReferencesResultImpl( | ||
symbol: String, | ||
locations: ju.List[Location] | ||
) extends ReferencesResult | ||
|
||
object ReferencesResultImpl { | ||
def empty: ReferencesResult = | ||
ReferencesResultImpl("", ju.Collections.emptyList()) | ||
} |
Oops, something went wrong.