-
Notifications
You must be signed in to change notification settings - Fork 151
feat: add Beta support for Inline Completion Request #886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pisv
merged 6 commits into
eclipse-lsp4j:main
from
rubenporras:Inline_Completion_Request
May 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b196f8b
feat: add Beta support for Inline Completion Request
rubenporras 99884c7
address comments
rubenporras 9876327
Add a Beta annotation to avoid a dependency on Guava
rubenporras d61fd0a
address new review comments
rubenporras 2213918
address comments
rubenporras d25c5fa
Rename Beta annotation to Draft and create it from scratch
rubenporras File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InlineCompletionTriggerKind.java
This file contains hidden or 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,54 @@ | ||
| /****************************************************************************** | ||
| * Copyright (c) 2025 Avaloq Group AG. | ||
| * | ||
| * 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; | ||
|
|
||
| import com.google.common.annotations.Beta; | ||
|
|
||
|
|
||
| /** | ||
| * Describes how an {@link InlineCompletionItemProvider inline completion | ||
| * provider} was triggered. | ||
| * | ||
| * @since 3.18.0 | ||
| */ | ||
| @Beta | ||
| public enum InlineCompletionTriggerKind { | ||
| /** | ||
| * Completion was triggered explicitly by a user gesture. | ||
| * Return multiple completion items to enable cycling through them. | ||
| */ | ||
| Invoked(1), | ||
|
|
||
| /** | ||
| * Completion was triggered automatically while editing. | ||
| * It is sufficient to return a single completion item in this case. | ||
| */ | ||
| Automatic(2); | ||
|
|
||
| private final int value; | ||
|
|
||
| InlineCompletionTriggerKind(final int value) { | ||
| this.value = value; | ||
| } | ||
|
|
||
| public int getValue() { | ||
| return value; | ||
| } | ||
|
|
||
| public static InlineCompletionTriggerKind forValue(final int value) { | ||
| InlineCompletionTriggerKind[] allValues = InlineCompletionTriggerKind.values(); | ||
| if (value < 1 || value > allValues.length) { | ||
| throw new IllegalArgumentException("Illegal enum value: " + value); | ||
| } | ||
| return allValues[value - 1]; | ||
| } | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.