forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update bridge to account for actions
- Loading branch information
Showing
13 changed files
with
201 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package dotty.tools.dotc.reporting | ||
|
||
import dotty.tools.dotc.rewrites.Rewrites.ActionPatch | ||
|
||
case class CodeAction( | ||
title: String, | ||
description: java.util.Optional[String], | ||
patches: java.util.List[ActionPatch] | ||
) |
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
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,28 @@ | ||
package dotty.tools.xsbt; | ||
|
||
import java.util.Optional; | ||
|
||
final public class Action implements xsbti.Action { | ||
private final String _title; | ||
private final Optional<String> _description; | ||
private final WorkspaceEdit _edit; | ||
|
||
public Action(String title, Optional<String> description, WorkspaceEdit edit) { | ||
super(); | ||
this._title = title; | ||
this._description = description; | ||
this._edit = edit; | ||
} | ||
|
||
public String title() { | ||
return _title; | ||
} | ||
|
||
public Optional<String> description() { | ||
return _description; | ||
} | ||
|
||
public WorkspaceEdit edit() { | ||
return _edit; | ||
} | ||
} |
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,23 @@ | ||
package dotty.tools.xsbt; | ||
|
||
import xsbti.Position; | ||
|
||
final public class TextEdit implements xsbti.TextEdit { | ||
private final Position _position; | ||
private final String _newText; | ||
|
||
public TextEdit(Position position, String newText) { | ||
super(); | ||
this._position = position; | ||
this._newText = newText; | ||
} | ||
|
||
public Position position() { | ||
return _position; | ||
} | ||
|
||
public String newText() { | ||
return _newText; | ||
} | ||
|
||
} |
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,20 @@ | ||
package dotty.tools.xsbt; | ||
|
||
import java.util.List; | ||
|
||
import xsbti.TextEdit; | ||
|
||
final public class WorkspaceEdit implements xsbti.WorkspaceEdit { | ||
|
||
private final List<TextEdit> _changes; | ||
|
||
public WorkspaceEdit(List<TextEdit> changes) { | ||
super(); | ||
this._changes = changes; | ||
} | ||
|
||
public List<TextEdit> changes() { | ||
return _changes; | ||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -7,4 +7,7 @@ trait Wr { | |
|
||
object Er { | ||
val a = er1 | ||
} | ||
|
||
def f: Int = 1 | ||
val x = f _ | ||
} |
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