Skip to content

Commit

Permalink
Change the command name to 'java.project.updateSettings'
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <sheche@microsoft.com>
  • Loading branch information
jdneo committed May 18, 2024
1 parent bcedc83 commit f6598ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.jdt.ls.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
id="java.project.updateClassPaths">
</command>
<command
id="java.project.updateProjectOptions">
id="java.project.updateSettings">
</command>
<command
id="java.project.isTestFile">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ public Object executeCommand(String commandId, List<Object> 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<String, Object> options = JSONUtility.toModel(arguments.get(1), Map.class);
ProjectCommand.updateProjectOptions(projectUri, options);
ProjectCommand.updateProjectSettings(projectUri, options);
return null;
}
case "java.project.isTestFile":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ public JdkUpdateResult(boolean success, String message) {
* @throws CoreException
* @throws URISyntaxException
*/
public static void updateProjectOptions(String projectUri, Map<String, Object> options) throws CoreException, URISyntaxException {
public static void updateProjectSettings(String projectUri, Map<String, Object> options) throws CoreException, URISyntaxException {
IJavaProject javaProject = getJavaProjectFromUri(projectUri);
IProject project = javaProject.getProject();
for (Map.Entry<String, Object> entry : options.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public void testUpdateMavenProfiles() throws Exception {

Map<String, Object> 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));
Expand Down

0 comments on commit f6598ad

Please sign in to comment.