Skip to content

Issue 8721 - Update Libraries, etc. based on JDT notifications #8721#9650

Merged
tsmaeder merged 1 commit intoeclipse-che:5730_java_ls_pocfrom
vrubezhny:ls8721
Jun 6, 2018
Merged

Issue 8721 - Update Libraries, etc. based on JDT notifications #8721#9650
tsmaeder merged 1 commit intoeclipse-che:5730_java_ls_pocfrom
vrubezhny:ls8721

Conversation

@vrubezhny
Copy link
Copy Markdown
Contributor

What does this PR do?

The fix adds a listener for 'che.jdt.ls.extension.workspace.clientUpdateProjectsClasspath" events and updates an according "External Libraries" node in Project Explorer.

What issues does this PR fix or reference?

Fixes #8721
Depends on eclipse-che/che-ls-jdt#44

Release Notes

ls8721

Project Explorer tree now listens for the "Update Classpath" events of che-jdt-ls and updates "External Libraries" node of java project that is indicated in the event data.

Docs PR

@vrubezhny vrubezhny requested a review from dkulieshov as a code owner May 8, 2018 12:26
@vrubezhny vrubezhny requested a review from a user May 8, 2018 12:26
@codenvy-ci
Copy link
Copy Markdown

Can one of the admins verify this patch?

1 similar comment
@codenvy-ci
Copy link
Copy Markdown

Can one of the admins verify this patch?

@garagatyi garagatyi removed their request for review May 8, 2018 12:29
@benoitf benoitf added kind/enhancement A feature request - must adhere to the feature request template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. target/branch Indicates that a PR will be merged into a branch other than master. labels May 8, 2018
@codenvy-ci
Copy link
Copy Markdown

Can one of the admins verify this patch?

if (CLIENT_UPDATE_PROJECTS_CLASSPATH.equals(params.getCommand())) {
for (Object project : params.getArguments()) {
eventBus.fireEvent(
new ExternalLibrariesUpdateEvent(removePrefixUri(String.valueOf(project))));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I generally name events after what has happened, in this case that would be sth. like "ProjectClasspathChangedEvent".

if (CLIENT_UPDATE_PROJECTS_CLASSPATH.equals(params.getCommand())) {
for (Object project : params.getArguments()) {
eventBus.fireEvent(
new ExternalLibrariesUpdateEvent(removePrefixUri(String.valueOf(project))));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

JSonValue.toString() is broken for strings, see also #7725. We really should use JSonString.stringValue().

}

public CompletableFuture<Object> executeClientCommand(ExecuteCommandParams params) {
return executeCliendCommandTransmitter.executeClientCommand(params);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a place where we could recognize specific commands and transform file:///projects uri's.

}

private static String removePrefixUri(String uri) {
String projectPath = uri.startsWith("\"") ? uri.substring("\"".length()) : uri;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should happen in WSMaster, as explained in Chat.

@tolusha tolusha force-pushed the 5730_java_ls_poc branch from 245c161 to 62ecb10 Compare May 12, 2018 19:47
@tsmaeder tsmaeder force-pushed the 5730_java_ls_poc branch 2 times, most recently from 6901019 to 518f5f6 Compare June 4, 2018 09:34
@tsmaeder tsmaeder mentioned this pull request Jun 5, 2018
22 tasks
…e-che#8721

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
@tsmaeder tsmaeder merged commit b9df02c into eclipse-che:5730_java_ls_poc Jun 6, 2018
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Jun 6, 2018
tsmaeder pushed a commit that referenced this pull request Jun 13, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Jun 13, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
@tsmaeder tsmaeder mentioned this pull request Jun 18, 2018
26 tasks
tsmaeder pushed a commit that referenced this pull request Jun 26, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Jul 13, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Jul 27, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tolusha pushed a commit that referenced this pull request Aug 7, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Aug 22, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Aug 29, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tolusha pushed a commit that referenced this pull request Sep 5, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Sep 13, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Sep 20, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Sep 26, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 1, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 5, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 12, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 16, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 17, 2018
…9650)

Added a listener for CLASSPATH change events that updates External Libraries nodes accordingly

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 17, 2018
(#9650)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 17, 2018
(#9650)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 17, 2018
(#9650)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
tsmaeder pushed a commit that referenced this pull request Oct 17, 2018
(#9650)

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement A feature request - must adhere to the feature request template. target/branch Indicates that a PR will be merged into a branch other than master.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants