Skip to content
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

Issue #132: Proposal for workspaceFolders #133

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

mickaelistria
Copy link
Contributor

Signed-off-by: Mickael Istria mistria@redhat.com

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

In addition to the remarks below, I would propose to add comments to the new classes and properties making clear that this API is in a "proposed" state and might be changed in the future. We could also use the com.google.common.annotations.Beta annotation for that.

/**
* Capabilities specific to the `workspace/didChangeWorkspaceFolders` notification.
*/
WorkspaceFoldersOptions workspaceFolders
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current version of the proposed extension, the workspaceFolders options are wrapped in an additional workspace property. This should be a new class named WorkspaceServerCapabilities.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's more something to fix on the proposed extension side ;)

/**
* The server has support for workspace folders
*/
Boolean workspaceFolders
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be named supported.

/**
* The associated URI for this workspace folder.
*/
String uri
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be @NonNull.

* the workspace folders otherwise.
*/
@JsonRequest("workspace/workspaceFolders")
CompletableFuture<List<WorkspaceFolder>> workspaceFolders();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a method here breaks existing implementations. Since the protocol extension is still in a "proposed" state, we should avoid breaking changes. Either move the method to a separate interface or add a default implementation here. I prefer the second option.

* registered to receive this notification it first.
*/
@JsonNotification
void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks existing implementations, see above.

@mickaelistria
Copy link
Contributor Author

PR updated. Only the first comment has not been fixed since I'm waiting for a clarification on the proposal: microsoft/language-server-protocol#298 (comment)

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

Let's wait for a reply by @dbaeumer regarding ServerCapabilities before we merge this.

@eclipse-lsp4j eclipse-lsp4j deleted a comment from mickaelistria Nov 20, 2017
@dbaeumer
Copy link

Signed-off-by: Mickael Istria <mistria@redhat.com>
@mickaelistria
Copy link
Contributor Author

Thanks for the clarification @dbaeumer .
I did update the pull request accordingly, introducing a WorkspaceServerCapabilities node in the model.

@spoenemann spoenemann merged commit b530c2d into eclipse-lsp4j:master Nov 20, 2017
@spoenemann
Copy link
Contributor

👍
I'll update the version to 0.4.0-SNAPSHOT tomorrow or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants