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

Send notification to the clients after importing projects #1456

Merged
merged 1 commit into from Jun 6, 2020

Conversation

jdneo
Copy link
Contributor

@jdneo jdneo commented May 28, 2020

require: redhat-developer/vscode-java#1476

Signed-off-by: Sheng Chen sheche@microsoft.com

@@ -58,6 +58,14 @@
@JsonNotification("language/actionableNotification")
void sendActionableNotification(ActionableNotification notification);

/**
* The event notification is sent from a server to a client to tell the
* client that some certain events happen at server side, like: classpath updated.
Copy link
Contributor

Choose a reason for hiding this comment

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

The event notification is sent from a server to a client to notify the client certain events happened on the server side, eg. classpath was updated, projects were imported

@@ -118,6 +123,9 @@ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
} catch (CoreException e) {
return new Status(Status.ERROR, IConstants.PLUGIN_ID, "Importing projects failed.", e);
}
List<URI> projectUris = ProjectCommand.getAllJavaProjects();
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't include pom projects for instance


public class ClasspathUpdateHandler implements IElementChangedListener {

public static final String CLASSPATH_UPDATED_NOTIFICATION = "__CLASSPATH_UPDATED__";
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if someone else will be broken by that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, Not sure about that.

At least for the VS Code side, the client itself handles the logic of receiving the notification, the exposed event is still the same.

@@ -165,6 +173,14 @@ public void sendActionableNotification(ActionableNotification notification) {
client.sendActionableNotification(notification);
}

/**
* Send a notification to the client when some certain events happen.
* @See {@link org.eclipse.jdt.ls.core.internal.EventType} for all the event types.
Copy link
Contributor

Choose a reason for hiding this comment

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

all possible event types

Signed-off-by: Sheng Chen <sheche@microsoft.com>
@fbricon fbricon merged commit ebba8b8 into eclipse-jdtls:master Jun 6, 2020
@jdneo jdneo deleted the cs/new-project-event branch June 6, 2020 11:43
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.

None yet

3 participants