diff --git a/org.eclipse.jdt.ls.core/plugin.xml b/org.eclipse.jdt.ls.core/plugin.xml index a5b30819e0..acb64067a5 100644 --- a/org.eclipse.jdt.ls.core/plugin.xml +++ b/org.eclipse.jdt.ls.core/plugin.xml @@ -86,7 +86,7 @@ id="java.project.updateClassPaths"> + id="java.project.updateSettings"> diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTDelegateCommandHandler.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTDelegateCommandHandler.java index 0ad6e614fe..19c331731a 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTDelegateCommandHandler.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/JDTDelegateCommandHandler.java @@ -105,10 +105,10 @@ public Object executeCommand(String commandId, List arguments, IProgress ProjectCommand.updateClasspaths(projectUri, entries.getClasspathEntries(), monitor); return null; } - case "java.project.updateProjectOptions": { + case "java.project.updateSettings": { String projectUri = (String) arguments.get(0); Map options = JSONUtility.toModel(arguments.get(1), Map.class); - ProjectCommand.updateProjectOptions(projectUri, options); + ProjectCommand.updateProjectSettings(projectUri, options); return null; } case "java.project.isTestFile": diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommand.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommand.java index 759b781ad4..8cd2fc7cc0 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommand.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommand.java @@ -718,7 +718,7 @@ public JdkUpdateResult(boolean success, String message) { * @throws CoreException * @throws URISyntaxException */ - public static void updateProjectOptions(String projectUri, Map options) throws CoreException, URISyntaxException { + public static void updateProjectSettings(String projectUri, Map options) throws CoreException, URISyntaxException { IJavaProject javaProject = getJavaProjectFromUri(projectUri); IProject project = javaProject.getProject(); for (Map.Entry entry : options.entrySet()) { diff --git a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommandTest.java b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommandTest.java index 3700e617b0..1e02b261b3 100644 --- a/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommandTest.java +++ b/org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/commands/ProjectCommandTest.java @@ -461,7 +461,7 @@ public void testUpdateMavenProfiles() throws Exception { Map updateOptions = new HashMap<>(); updateOptions.put(KEY, "my profile"); - ProjectCommand.updateProjectOptions(uriString, updateOptions); + ProjectCommand.updateProjectSettings(uriString, updateOptions); options = ProjectCommand.getProjectSettings(uriString, settingKeys); assertEquals("my profile", options.get(KEY));