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

Provide preference mapping for Java Execution Environments -> Runtimes #1309

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Dec 19, 2019

Fixes #1307
Requires redhat-developer/vscode-java#1207

Signed-off-by: Snjezana Peco snjezana.peco@redhat.com

@fbricon
Copy link
Contributor

fbricon commented Dec 19, 2019

So on a Mac, JDT automatically picks up JDKs under /Library/Java/JavaVirtualMachines/. If I set my custom JavaSE-11 pointing to /Users/fbricon/.sdkman/candidates/java/11.0.5.hs-adpt, when a project is configured to use JavaSE-11, it points to the JDK from /Library/Java/JavaVirtualMachines/jdk-11.jdk/.

Since we explicitly set the preference, it should use that

@snjeza
Copy link
Contributor Author

snjeza commented Dec 19, 2019

Since we explicitly set the preference, it should use that

We can set more runtimes. I will add the default property, as follows:

"java.configuration.runtimes": [
        {
            "name": "JavaSE-1.8",
            "path": "/usr/local/jdk1.8.0_201"
        },
        {
            "name": "JavaSE-11",
            "path": "/usr/local/jdk-11.0.3",
            "sources" : "/usr/local/jdk-11.0.3/lib/src.zip",
            "javadoc" : "https://docs.oracle.com/en/java/javase/11/docs/api",
            "default":  true
        },
        {
            "name": "JavaSE-12",
            "path": "/usr/local/jdk-12.0.2"
        },
        {
            "name": "JavaSE-13",
            "path": "/usr/local/jdk-13"
        }
    ]

@fbricon
Copy link
Contributor

fbricon commented Dec 19, 2019

what does default mean? default JavaSE-11 runtime? It should be unique anyways, from a user standpoint. Or default to the workbench? And what happens when someone copies/pastes another runtime and you end up with multiple defaults?

@snjeza
Copy link
Contributor Author

snjeza commented Dec 19, 2019

And what happens when someone copies/pastes another runtime and you end up with multiple defaults?

only first will be set as default. The following is schema:

"java.configuration.runtimes": {
          "type": "array",
          "label": "Java Execution Environments.",
          "items": {
            "type": "object",
            "default": {},
            "required": [
              "path",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "label": "Java Execution Environment name. Must be unique"
              },
              "path": {
                "type": "string",
                "label": "JDK path.\nOn Windows, backslashes must be escaped, i.e.\n\"path\":\"C:\\\\Program Files\\\\Java\\\\jdk1.8.0_161\""
              },
              "sources": {
                "type": "string",
                "label": "JDK sources."
              },
              "javadoc": {
                "type": "string",
                "label": "JDK javadoc."
              },
              "default": {
                "type": "boolean",
                "label": "Is default runtime? Only one runtime can be default."
              }
            },
            "additionalProperties": false
          },
          "default": [],
          "description": "Java Execution Environments -> Runtimes.",
          "scope": "machine"
        }
      }

@fbricon
Copy link
Contributor

fbricon commented Dec 19, 2019

I agree we need a default jdk (eg. to use with invisible projects), but this doesn't change the fact that any JDK I set in the preference should be used by default vs anything picked up by JDT automatically

@snjeza
Copy link
Contributor Author

snjeza commented Dec 19, 2019

I agree we need a default jdk (eg. to use with invisible projects), but this doesn't change the fact that any JDK I set in the preference should be used by default vs anything picked up by JDT automatically

if you set the following:

"java.configuration.runtimes": [
        {
            "name": "JavaSE-11-hs",
            "path": "/Users/fbricon/.sdkman/candidates/java/11.0.5.hs-adpt",
            "default":  true
        }
    ]

JavaSE-11-hs will be used as default.
if you set the following:

"java.configuration.runtimes": [
        {
            "name": "JavaSE-11-hs",
            "path": "/Users/fbricon/.sdkman/candidates/java/11.0.5.hs-adpt"
        }
    ]

your /Library/Java/JavaVirtualMachines/jdk-11.jdk should be used.
I will push a new PR.

@fbricon
Copy link
Contributor

fbricon commented Dec 19, 2019

No I want JavaSE-11 to be the default JavaSE-11 environment. The names themselves should be limited by the list of supported execution environment in eclipse. That's what I meant in https://github.com/redhat-developer/vscode-java/pull/1207/files#r360133208

@snjeza snjeza changed the title Provide preference mapping for Java Execution Environments -> Runtimes [WIP] Provide preference mapping for Java Execution Environments -> Runtimes Dec 20, 2019
@snjeza snjeza closed this Dec 21, 2019
@snjeza snjeza reopened this Dec 21, 2019
@snjeza
Copy link
Contributor Author

snjeza commented Dec 21, 2019

test this please

@snjeza snjeza force-pushed the runtimes branch 3 times, most recently from a9d6b34 to 1abdf44 Compare December 21, 2019 21:22
@snjeza snjeza changed the title [WIP] Provide preference mapping for Java Execution Environments -> Runtimes Provide preference mapping for Java Execution Environments -> Runtimes Dec 21, 2019
@snjeza
Copy link
Contributor Author

snjeza commented Dec 21, 2019

@fbricon I have updated the PR.

Copy link
Contributor

@fbricon fbricon left a comment

Choose a reason for hiding this comment

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

When saving the same runtime settings multiple times (doing a dummy or unrelated change in vscode's settings.json for instance), the list of runtimes is updated even if nothing changed. https://github.com/eclipse/eclipse.jdt.ls/pull/1309/files#diff-99e23b70fb2b30eae67e36c0455fd82cR148 should be false

}
}
}
if (changed) {
Copy link
Contributor

Choose a reason for hiding this comment

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

JavaLanguageServerPlugin.logInfo("JVM Runtimes changed, saving new configuration");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

if (compatibleVM.equals(vm)) {
if (!environment.isStrictlyCompatible(vm)) {
JavaLanguageServerPlugin.logInfo("Runtime at '" + vm.getInstallLocation().toString() + "' is not strictly compatible with the '" + name + "' environment");
}
Copy link
Contributor

Choose a reason for hiding this comment

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

JavaLanguageServerPlugin.logInfo("Setting " + compatibleVM.getInstallLocation() + " as " + name + "' environment (id:" + compatibleVM.getId() + ")");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

JavaLanguageServerPlugin.logInfo("Invalid runtime: " + runtime);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

should log which runtime is the default VM (as multiple ones can have default:true, the last one wins)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

if (runtime.isValid()) {
runtimes.add(runtime);
} else {
JavaLanguageServerPlugin.logInfo("Multiple runtime name:" + runtime);
Copy link
Contributor

@fbricon fbricon Dec 24, 2019

Choose a reason for hiding this comment

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

runtime is not valid:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

JavaLanguageServerPlugin.logInfo("Multiple runtime name:" + runtime);
}
} else {
JavaLanguageServerPlugin.logInfo("Multiple runtime name:" + runtime);
Copy link
Contributor

Choose a reason for hiding this comment

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

Multiple runtimes with name:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@snjeza
Copy link
Contributor Author

snjeza commented Dec 25, 2019

@fbricon I have updated the PR.

IPath systemSourcePath = sourcePath != null ? sourcePath : lib.getSystemLibrarySourcePath();
URL javadocLocation = javadocURL != null ? javadocURL : lib.getJavadocLocation();
LibraryLocation newLib = new LibraryLocation(lib.getSystemLibraryPath(), systemSourcePath, lib.getPackageRootPath(), javadocLocation, lib.getIndexLocation(), lib.getExternalAnnotationsPath());
libChanged = !newLib.equals(lib);
Copy link
Contributor

Choose a reason for hiding this comment

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

libChanged = libChanged || !newLib.equals(lib);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@fbricon
Copy link
Contributor

fbricon commented Jan 6, 2020

Once again, if the runtimes didn't change, they're still reset on every didchangeconfiguration request:

Startup:
    "java.home": "/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt",
    "java.configuration.runtimes": [
        {
            "name": "JavaSE-1.8",
            "path": "/Users/fbricon/.sdkman/candidates/java/8.0.212-zulu/",
            "default": true
        },
        {
            "path": "/Users/fbricon/.sdkman/candidates/java/8.0.181-oracle",
            "name": "JavaSE-1.8",
        },
        {
            "name": "JavaSE-11",
            "path": "/Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt",
        },
        {
            "name": "JavaSE-13",
            "path": "/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt",
            "default": true
        },
    ],


[Trace - 8:10:14 PM] Sending request 'initialize - (0)'.
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
[Trace - 8:10:23 PM] Received notification 'window/logMessage'.
[Info  - 8:10:23 PM] Jan. 6, 2020, 8:10:23 p.m. Main thread is waiting
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. >> initialize
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Initializing Java Language Server 0.50.0.202001061758
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Multiple runtimes with name JavaSE-1.8
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [quarkus.java.projectInfo, quarkus.java.propertyDefinition]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [java.project.list, java.getPackageData, java.resolvePath]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [vscode.java.test.search.codelens, vscode.java.test.search.items.all, vscode.java.test.search.location, vscode.java.test.search.items, vscode.java.test.get.testpath, vscode.java.test.junit.argument]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [java.maven.initializeSearcher, java.maven.searchArtifact, java.maven.addDependency, java.maven.controlContext]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [java.intellicode.completion, java.intellicode.completion.resolve, java.intellicode.enable]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [java.edit.organizeImports, java.project.updateSourceAttachment, java.project.removeFromSourcePath, java.project.listSourcePaths, java.project.resolveSourceAttachment, java.project.addToSourcePath]
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Static Commands: []
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Non-Static Commands: [vscode.java.checkProjectSettings, vscode.java.isOnClasspath, vscode.java.fetchUsageData, vscode.java.validateLaunchConfig, vscode.java.resolveMainMethod, vscode.java.resolveClasspath, vscode.java.resolveBuildFiles, vscode.java.resolveMainClass, vscode.java.updateDebugSettings, vscode.java.buildWorkspace, vscode.java.startDebugSession, vscode.java.inferLaunchCommandLength, vscode.java.resolveElementAtSelection]
[Trace - 8:10:24 PM] Received response 'initialize - (0)' in 9723ms.
[Trace - 8:10:24 PM] Sending notification 'initialized'.
[Trace - 8:10:24 PM] Sending notification 'workspace/didChangeConfiguration'.
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. >> initialized
[Trace - 8:10:24 PM] Received notification 'language/status'.
[Trace - 8:10:24 PM] Received notification 'language/progressReport'.
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
[Trace - 8:10:24 PM] Received notification 'window/logMessage'.
[Info  - 8:10:24 PM] Jan. 6, 2020, 8:10:24 p.m. Creating the Java project jdt.ls-java-project
[Trace - 8:10:24 PM] Received notification 'language/progressReport'.
[Trace - 8:10:24 PM] Received notification 'language/progressReport'.
[Trace - 8:10:25 PM] Received notification 'language/progressReport'.
[Trace - 8:10:25 PM] Received notification 'language/progressReport'.
[Trace - 8:10:25 PM] Received notification 'language/progressReport'.
[Trace - 8:10:26 PM] Received notification 'language/progressReport'.
[Trace - 8:10:26 PM] Received notification 'window/logMessage'.
[Info  - 8:10:26 PM] Jan. 6, 2020, 8:10:26 p.m. Finished creating the Java project jdt.ls-java-project
[Trace - 8:10:28 PM] Received notification 'language/status'.
[Trace - 8:10:28 PM] Received notification 'language/progressReport'.
[Trace - 8:10:28 PM] Received notification 'window/logMessage'.
[Info  - 8:10:28 PM] Jan. 6, 2020, 8:10:28 p.m. Importing Maven project(s)
[Trace - 8:10:28 PM] Received notification 'language/progressReport'.
[Trace - 8:10:28 PM] Received notification 'language/progressReport'.
[Trace - 8:10:28 PM] Received notification 'language/progressReport'.
[Trace - 8:10:28 PM] Received notification 'language/progressReport'.
[Trace - 8:10:31 PM] Received notification 'language/status'.
[Trace - 8:10:31 PM] Received notification 'language/progressReport'.
[Trace - 8:10:32 PM] Received notification 'language/status'.
[Trace - 8:10:32 PM] Received notification 'language/progressReport'.
[Trace - 8:10:32 PM] Received notification 'language/status'.
[Trace - 8:10:32 PM] Received notification 'language/progressReport'.
[Trace - 8:10:33 PM] Received notification 'language/status'.
[Trace - 8:10:33 PM] Received notification 'language/progressReport'.
[Trace - 8:10:33 PM] Received notification 'language/status'.
[Trace - 8:10:33 PM] Received notification 'language/progressReport'.
[Trace - 8:10:33 PM] Received notification 'window/logMessage'.
[Info  - 8:10:33 PM] Jan. 6, 2020, 8:10:33 p.m. Workspace initialized in 9273ms
[Trace - 8:10:33 PM] Received notification 'language/status'.
[Trace - 8:10:34 PM] Sending request 'workspace/executeCommand - (1)'.
[Trace - 8:10:34 PM] Received notification 'language/status'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'window/logMessage'.
[Info  - 8:10:34 PM] Jan. 6, 2020, 8:10:33 p.m. >> initialization job finished
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (1)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (1)'. Processing request took 0ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (2)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (2)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (3)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (3)'. Processing request took 0ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (4)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (4)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (5)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (5)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (6)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (6)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (7)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (7)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (8)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (8)'. Processing request took 0ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (9)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (9)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (10)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (10)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (11)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (11)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (12)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (12)'. Processing request took 0ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (13)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (13)'. Processing request took 4ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (14)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (14)'. Processing request took 0ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (15)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (15)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (16)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (16)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received request 'client/registerCapability - (17)'.
[Trace - 8:10:34 PM] Sending response 'client/registerCapability - (17)'. Processing request took 1ms
[Trace - 8:10:34 PM] Received notification 'window/logMessage'.
[Info  - 8:10:34 PM] Jan. 6, 2020, 8:10:33 p.m. >> workspace/didChangeConfiguration
[Trace - 8:10:34 PM] Received notification 'window/logMessage'.
[Info  - 8:10:34 PM] Jan. 6, 2020, 8:10:33 p.m. Multiple runtimes with name JavaSE-1.8
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:34 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:35 PM] Received notification 'language/progressReport'.
[Trace - 8:10:36 PM] Received notification 'language/progressReport'.
[Trace - 8:10:36 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. Runtime JavaSE-1.8 set as default
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. Setting /Users/fbricon/.sdkman/candidates/java/8.0.212-zulu as 'JavaSE-1.8' environment (id:1578337834000)
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. Runtime at '/Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt' is not strictly compatible with the 'JavaSE-11' environment
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. Setting /Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt as 'JavaSE-11' environment (id:1578337837354)
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. Setting /Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt as 'JavaSE-13' environment (id:1578337826757)
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. JVM Runtimes changed, saving new configuration
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. >> java/buildWorkspace (full)
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. >> New configuration: {java={decompiler={fernflower={}, cfr={}, procyon=null}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=false, showQualifiedNames=false, showLogicalStructure=true, showToString=true, maxStringLength=0.0, hotCodeReplace=manual, enableRunDebugCodeLens=true, forceBuildBeforeLaunch=true, console=internalConsole}}, dependency={showOutline=true, syncWithFolderExplorer=true, autoRefresh=true, refreshDelay=2000.0, packagePresentation=flat}, help={firstView=auto}, test={report={showAfterExecution=onFailure, position=sideView}, editor={enableShortcuts=true}, log={level=info}, message={hintForDeprecatedConfig=true, hintForSetingDefaultConfig=true}, defaultConfig=, config={}}, home=/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:"/Users/fbricon/.vscode-insiders/extensions/gabrielbb.vscode-lombok-0.9.9/server/lombok.jar"}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=false, updateBuildConfiguration=interactive, maven={userSettings=null}, runtimes=[{name=JavaSE-1.8, path=/Users/fbricon/.sdkman/candidates/java/8.0.212-zulu/, default=true}, {path=/Users/fbricon/.sdkman/candidates/java/8.0.181-oracle, name=JavaSE-1.8}, {name=JavaSE-11, path=/Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt}, {name=JavaSE-13, path=/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt, default=true}]}, trace={server=messages}, import={maven={enabled=true}, gradle={enabled=true, wrapper={enabled=true}, offline={enabled=false}, version=null, arguments=null, jvmArguments=null, home=null}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, maven={downloadSources=false, updateSnapshots=false}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=true}}, saveActions={organizeImports=false}, project={referencedLibraries=[lib/**/*.jar]}, contentProvider={preferred=null}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={maxResults=45.0, enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], filteredTypes=[java.awt.*, com.sun.*], importOrder=[java, javax, com, org]}, foldingRange={enabled=true}, progressReports={enabled=true}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false, toString={template=${object.className} [${member.name()}=${member.value}, ${otherMembers}], codeStyle=STRING_CONCATENATION, skipNullValues=false, listArrayContents=true, limitElements=0.0}}, selectionRange={enabled=true}, showBuildStatusOnStart={enabled=false}}}
[Trace - 8:10:37 PM] Received notification 'window/logMessage'.
[Info  - 8:10:37 PM] Jan. 6, 2020, 8:10:37 p.m. >> workspace/executeCommand vscode.java.test.get.testpath
[Trace - 8:10:37 PM] Received response 'workspace/executeCommand - (1)' in 3484ms.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:37 PM] Received notification 'language/progressReport'.
[Trace - 8:10:40 PM] Received notification 'language/progressReport'.
[Trace - 8:10:40 PM] Received notification 'language/progressReport'.
[Trace - 8:10:40 PM] Received notification 'language/progressReport'.
[Trace - 8:10:40 PM] Received notification 'window/logMessage'.
[Info  - 8:10:40 PM] Jan. 6, 2020, 8:10:40 p.m. >> build jobs finished
[Trace - 8:10:40 PM] Received notification 'window/logMessage'.
[Info  - 8:10:40 PM] Jan. 6, 2020, 8:10:40 p.m. >> registerFeature 'workspace/didChangeWatchedFiles'
[Trace - 8:10:40 PM] Received notification 'window/logMessage'.
[Info  - 8:10:40 PM] Jan. 6, 2020, 8:10:40 p.m. >> registerFeature 'workspace/didChangeWatchedFiles'
[Trace - 8:10:40 PM] Received request 'client/registerCapability - (18)'.
[Trace - 8:10:40 PM] Sending response 'client/registerCapability - (18)'. Processing request took 1ms
[Trace - 8:10:40 PM] Received notification 'window/logMessage'.
[Info  - 8:10:40 PM] Jan. 6, 2020, 8:10:40 p.m. >> watchers registered
[Trace - 8:10:51 PM] Sending request 'workspace/executeCommand - (2)'.
[Trace - 8:10:51 PM] Received notification 'window/logMessage'.
[Info  - 8:10:51 PM] Jan. 6, 2020, 8:10:51 p.m. >> workspace/executeCommand java.resolvePath
[Trace - 8:10:51 PM] Received response 'workspace/executeCommand - (2)' in 60ms.

Changed "java.completion.maxResults" value, saved settings


[Trace - 8:12:08 PM] Sending notification '$/setTraceNotification'.
[Trace - 8:12:08 PM] Sending notification 'workspace/didChangeConfiguration'.
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. >> workspace/didChangeConfiguration
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Multiple runtimes with name JavaSE-1.8
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:08 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Runtime JavaSE-1.8 set as default
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'language/progressReport'.
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Setting /Users/fbricon/.sdkman/candidates/java/8.0.212-zulu as 'JavaSE-1.8' environment (id:1578337834000)
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Runtime at '/Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt' is not strictly compatible with the 'JavaSE-11' environment
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Setting /Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt as 'JavaSE-11' environment (id:1578337837354)
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. Setting /Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt as 'JavaSE-13' environment (id:1578337826757)
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. JVM Runtimes changed, saving new configuration
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. >> java/buildWorkspace (full)
[Trace - 8:12:08 PM] Received notification 'window/logMessage'.
[Info  - 8:12:08 PM] Jan. 6, 2020, 8:12:08 p.m. >> New configuration: {java={decompiler={fernflower={}, cfr={}, procyon=null}, debug={logLevel=warn, settings={showHex=false, showStaticVariables=false, showQualifiedNames=false, showLogicalStructure=true, showToString=true, maxStringLength=0.0, hotCodeReplace=manual, enableRunDebugCodeLens=true, forceBuildBeforeLaunch=true, console=internalConsole}}, dependency={showOutline=true, syncWithFolderExplorer=true, autoRefresh=true, refreshDelay=2000.0, packagePresentation=flat}, help={firstView=auto}, test={report={showAfterExecution=onFailure, position=sideView}, editor={enableShortcuts=true}, log={level=info}, message={hintForDeprecatedConfig=true, hintForSetingDefaultConfig=true}, defaultConfig=, config={}}, home=/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt, jdt={ls={vmargs=-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication -javaagent:"/Users/fbricon/.vscode-insiders/extensions/gabrielbb.vscode-lombok-0.9.9/server/lombok.jar"}}, errors={incompleteClasspath={severity=warning}}, configuration={checkProjectSettingsExclusions=false, updateBuildConfiguration=interactive, maven={userSettings=null}, runtimes=[{name=JavaSE-1.8, path=/Users/fbricon/.sdkman/candidates/java/8.0.212-zulu/, default=true}, {path=/Users/fbricon/.sdkman/candidates/java/8.0.181-oracle, name=JavaSE-1.8}, {name=JavaSE-11, path=/Users/fbricon/.sdkman/candidates/java/12.0.2.hs-adpt}, {name=JavaSE-13, path=/Users/fbricon/.sdkman/candidates/java/13.0.1.hs-adpt, default=true}]}, trace={server=messages}, import={maven={enabled=true}, gradle={enabled=true, wrapper={enabled=true}, offline={enabled=false}, version=null, arguments=null, jvmArguments=null, home=null}, exclusions=[**/node_modules/**, **/.metadata/**, **/archetype-resources/**, **/META-INF/maven/**]}, maven={downloadSources=false, updateSnapshots=false}, referencesCodeLens={enabled=false}, signatureHelp={enabled=false}, implementationsCodeLens={enabled=false}, format={enabled=true, settings={url=null, profile=null}, comments={enabled=true}, onType={enabled=true}}, saveActions={organizeImports=false}, project={referencedLibraries=[lib/**/*.jar]}, contentProvider={preferred=null}, autobuild={enabled=true}, maxConcurrentBuilds=1.0, completion={maxResults=50.0, enabled=true, overwrite=true, guessMethodArguments=false, favoriteStaticMembers=[org.junit.Assert.*, org.junit.Assume.*, org.junit.jupiter.api.Assertions.*, org.junit.jupiter.api.Assumptions.*, org.junit.jupiter.api.DynamicContainer.*, org.junit.jupiter.api.DynamicTest.*, org.mockito.Mockito.*, org.mockito.ArgumentMatchers.*, org.mockito.Answers.*], filteredTypes=[java.awt.*, com.sun.*], importOrder=[java, javax, com, org]}, foldingRange={enabled=true}, progressReports={enabled=true}, codeGeneration={hashCodeEquals={useJava7Objects=false, useInstanceof=false}, useBlocks=false, generateComments=false, toString={template=${object.className} [${member.name()}=${member.value}, ${otherMembers}], codeStyle=STRING_CONCATENATION, skipNullValues=false, listArrayContents=true, limitElements=0.0}}, selectionRange={enabled=true}, showBuildStatusOnStart={enabled=false}}}
[Trace - 8:12:08 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:08 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:09 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:09 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:09 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:09 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:12:09 PM] Received notification 'language/progressReport'.
[Trace - 8:12:10 PM] Received notification 'language/progressReport'.
[Trace - 8:12:10 PM] Received notification 'language/progressReport'.
[Trace - 8:12:17 PM] Sending request 'workspace/executeCommand - (6)'.
[Trace - 8:12:17 PM] Received notification 'window/logMessage'.
[Info  - 8:12:17 PM] Jan. 6, 2020, 8:12:17 p.m. >> workspace/executeCommand java.resolvePath
[Trace - 8:12:17 PM] Received response 'workspace/executeCommand - (6)' in 8ms.

@snjeza
Copy link
Contributor Author

snjeza commented Jan 6, 2020

@fbricon I have updated the PR.

@snjeza
Copy link
Contributor Author

snjeza commented Jan 6, 2020

test this please

@snjeza
Copy link
Contributor Author

snjeza commented Jan 6, 2020

Related issue - #1317

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@fbricon fbricon merged commit e19606f into eclipse-jdtls:master Jan 10, 2020
@fbricon
Copy link
Contributor

fbricon commented Jan 10, 2020

Thanks @snjeza!

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.

Provide preference mapping for Java Execution Environments -> Runtimes
2 participants