8000 add a helper command to get the jdt platform settings by testforstephen · Pull Request #326 · microsoft/java-debug · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.microsoft.java.debug.plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<command id="vscode.java.resolveBuildFiles"/>
<command id="vscode.java.isOnClasspath"/>
<command id="vscode.java.resolveJavaExecutable"/>
<command id="vscode.java.fetchPlatformSettings"/>
</delegateCommandHandler>
</extension>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class JavaDebugDelegateCommandHandler implements IDelegateCommandHandler
public static final String RESOLVE_BUILD_FILES = "vscode.java.resolveBuildFiles";
public static final String IS_ON_CLASSPATH = "vscode.java.isOnClasspath";
public static final String RESOLVE_JAVA_EXECUTABLE = "vscode.java.resolveJavaExecutable";
public static final String FETCH_PLATFORM_SETTINGS = "vscode.java.fetchPlatformSettings";

@Override
public Object executeCommand(String commandId, List<Object> arguments, IProgressMonitor progress) throws Exception {
Expand Down Expand Up @@ -81,6 +82,8 @@ public Object executeCommand(String commandId, List<Object> arguments, IProgress
return isOnClasspath(arguments);
case RESOLVE_JAVA_EXECUTABLE:
return ResolveJavaExecutableHandler.resolveJavaExecutable(arguments);
case FETCH_PLATFORM_SETTINGS:
return PlatformSettings.getPlatformSettings();
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*******************************************************************************
* Copyright (c) 2020 Microsoft Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Microsoft Corporation - initial API and implementation
*******************************************************************************/

package com.microsoft.java.debug.plugin.internal;

import java.util.HashMap;
import java.util.Map;

import org.eclipse.jdt.core.JavaCore;

public class PlatformSettings {

/**
* Resolve the JDT platform settings.
*/
public static Map<String, String> getPlatformSettings() {
Map<String, String> result = new HashMap<>();
result.put("latestSupportedJavaVersion", JavaCore.latestSupportedJavaVersion());
return result;
}
}
0