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

Allow extensions to contribute to WorkspaceService #966

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

mickaelistria
Copy link
Contributor

Currently supports
didChangeWorkspaceFolders

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


import org.eclipse.lsp4j.DidChangeWorkspaceFoldersParams;

public interface IWorkspaceServiceParticipant {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add Javadoc


public interface IWorkspaceServiceParticipant {

public 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.

Add Javadoc

@@ -32,6 +32,7 @@
import org.eclipse.lemminx.services.extensions.save.ISaveContext.SaveContextType;
import org.eclipse.lemminx.uriresolver.URIResolverExtensionManager;
import org.eclipse.lsp4j.InitializeParams;
import org.eclipse.lsp4j.services.WorkspaceService;
Copy link
Contributor

Choose a reason for hiding this comment

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

should be not removed?

@@ -196,6 +199,15 @@ public void doSave(ISaveContext saveContext) {
return symbolsProviderParticipants;
}

/**
* @return
Copy link
Contributor

Choose a reason for hiding this comment

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

Add Javadoc

@@ -356,6 +368,22 @@ public void registerSymbolsProviderParticipant(ISymbolsProviderParticipant symbo
public void unregisterSymbolsProviderParticipant(ISymbolsProviderParticipant symbolsProviderParticipant) {
symbolsProviderParticipants.remove(symbolsProviderParticipant);
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Add Javadoc

}

/**
* @param workspaceServiceParticipant
Copy link
Contributor

Choose a reason for hiding this comment

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

Add Javadoc


@BeforeEach
public void initializeLanguageService() {
this.server = new XMLLanguageServer();
Copy link
Contributor

Choose a reason for hiding this comment

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

write just:

this.server = new MockXMLLanguageServer()

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class WorkspaceServiceParticipantTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add Javadoc

@@ -0,0 +1,17 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add contributors in the header:

/*******************************************************************************
* Copyright (c) 2021 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
*     Red Hat Inc. - initial API and implementation
*******************************************************************************/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW, it's been clarified by EMO that according to latest version of EDP those Contributors block are not at all mandatory for Eclipse projects.

Currently supports
didChangeWorkspaceFolders

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

I think my last patch does cover all concerns you expressed.

@angelozerr angelozerr added this to the 0.15.0 milestone Jan 19, 2021
@angelozerr angelozerr added the enhancement New feature or request label Jan 19, 2021
@angelozerr angelozerr merged commit 97ea507 into eclipse-lemminx:master Jan 19, 2021
@angelozerr
Copy link
Contributor

Thanks @mickaelistria !

@mickaelistria
Copy link
Contributor Author

Thanks a lot for the review! Do you have an estimation of when is next release going to happen? Depending on the release date, we may merge the LemMinX-Maven change leveraging this API right now or later.

@angelozerr
Copy link
Contributor

Thanks a lot for the review!

You are welcome!

Do you have an estimation of when is next release going to happen? Depending on the release date, we may merge the LemMinX-Maven change leveraging this API right now or later.

We will do a release as soon as the binary stuff will be available by @datho7561

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

Successfully merging this pull request may close these issues.

2 participants