-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #472 from KamasamaK/lsp-3.16-pending-20201203
Incorporate more 3.16 features
- Loading branch information
Showing
134 changed files
with
5,746 additions
and
1,036 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
59 changes: 59 additions & 0 deletions
59
org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextMode.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,59 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2020 TypeFox and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
******************************************************************************/ | ||
package org.eclipse.lsp4j; | ||
|
||
/** | ||
* How whitespace and indentation is handled during completion | ||
* item insertion. | ||
* | ||
* Since 3.16.0 | ||
*/ | ||
public enum InsertTextMode { | ||
|
||
/** | ||
* The insertion or replace strings is taken as it is. If the | ||
* value is multi line the lines below the cursor will be | ||
* inserted using the indentation defined in the string value. | ||
* The client will not apply any kind of adjustments to the | ||
* string. | ||
*/ | ||
AsIs(1), | ||
|
||
/** | ||
* The editor adjusts leading whitespace of new lines so that | ||
* they match the indentation up to the cursor of the line for | ||
* which the item is accepted. | ||
* | ||
* Consider a line like this: [2tabs][cursor][3tabs]foo. Accepting a | ||
* multi line completion item is indented using 2 tabs and all | ||
* following lines inserted will be indented using 2 tabs as well. | ||
*/ | ||
AdjustIndentation(2); | ||
|
||
private final int value; | ||
|
||
InsertTextMode(int value) { | ||
this.value = value; | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public static InsertTextMode forValue(int value) { | ||
InsertTextMode[] allValues = InsertTextMode.values(); | ||
if (value < 1 || value > allValues.length) | ||
throw new IllegalArgumentException("Illegal enum value: " + value); | ||
return allValues[value - 1]; | ||
} | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MonikerKind.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,39 @@ | ||
/** | ||
* Copyright (c) 2020 TypeFox and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
package org.eclipse.lsp4j; | ||
|
||
/** | ||
* The moniker kind. | ||
* | ||
* Since 3.16.0 | ||
*/ | ||
public final class MonikerKind { | ||
private MonikerKind() { | ||
} | ||
|
||
/** | ||
* The moniker represents a symbol that is imported into a project | ||
*/ | ||
public static final String Import = "import"; | ||
|
||
/** | ||
* The moniker represents a symbol that is exported from a project | ||
*/ | ||
public static final String Export = "export"; | ||
|
||
/** | ||
* The moniker represents a symbol that is local to a project (e.g. a local | ||
* variable of a function, a class not visible outside the project, ...) | ||
*/ | ||
public static final String Local = "local"; | ||
} |
45 changes: 45 additions & 0 deletions
45
org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/PrepareSupportDefaultBehavior.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,45 @@ | ||
/****************************************************************************** | ||
* Copyright (c) 2020 TypeFox and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
******************************************************************************/ | ||
package org.eclipse.lsp4j; | ||
|
||
/** | ||
* The value indicates the default behavior used by the | ||
* client. | ||
* | ||
* Since version 3.16.0 | ||
*/ | ||
public enum PrepareSupportDefaultBehavior { | ||
|
||
/** | ||
* The client's default behavior is to select the identifier | ||
* according the to language's syntax rule. | ||
*/ | ||
Identifier(1); | ||
|
||
private final int value; | ||
|
||
PrepareSupportDefaultBehavior(int value) { | ||
this.value = value; | ||
} | ||
|
||
public int getValue() { | ||
return value; | ||
} | ||
|
||
public static PrepareSupportDefaultBehavior forValue(int value) { | ||
PrepareSupportDefaultBehavior[] allValues = PrepareSupportDefaultBehavior.values(); | ||
if (value < 1 || value > allValues.length) | ||
throw new IllegalArgumentException("Illegal enum value: " + value); | ||
return allValues[value - 1]; | ||
} | ||
|
||
} |
Oops, something went wrong.