com.microsoft.java.debug.plugin.internal.JavaDebugDelegateCommandHandler Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2017-2022 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.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.ls.core.internal.IDelegateCommandHandler;
import org.eclipse.jdt.ls.core.internal.JDTUtils;
import org.eclipse.jdt.ls.core.internal.ProjectUtils;
import org.eclipse.jdt.ls.core.internal.ResourceUtils;
import com.microsoft.java.debug.core.DebugException;
import com.microsoft.java.debug.core.UsageDataStore;
import com.microsoft.java.debug.core.protocol.JsonUtils;
import com.microsoft.java.debug.core.protocol.Requests.LaunchArguments;
import com.microsoft.java.debug.plugin.internal.InlineValueHandler.InlineParams;
public class JavaDebugDelegateCommandHandler implements IDelegateCommandHandler {
public static final String FETCH_USER_DATA = "vscode.java.fetchUsageData";
public static final String DEBUG_STARTSESSION = "vscode.java.startDebugSession";
public static final String RESOLVE_CLASSPATH = "vscode.java.resolveClasspath";
public static final String RESOLVE_MAINCLASS = "vscode.java.resolveMainClass";
public static final String BUILD_WORKSPACE = "vscode.java.buildWorkspace";
public static final String UPDATE_DEBUG_SETTINGS = "vscode.java.updateDebugSettings";
public static final String VALIDATE_LAUNCHCONFIG = "vscode.java.validateLaunchConfig";
public static final String RESOLVE_MAINMETHOD = "vscode.java.resolveMainMethod";
public static final String INFER_LAUNCH_COMMAND_LENGTH = "vscode.java.inferLaunchCommandLength";
public static final String CHECK_PROJECT_SETTINGS = "vscode.java.checkProjectSettings";
public static final String RESOLVE_ELEMENT_AT_SELECTION = "vscode.java.resolveElementAtSelection";
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";
public static final String RESOLVE_CLASSFILTERS = "vscode.java.resolveClassFilters";
public static final String RESOLVE_SOURCEURI = "vscode.java.resolveSourceUri";
public static final String RESOLVE_INLINEVARIABLES = "vscode.java.resolveInlineVariables";
@Override
public Object executeCommand(String commandId, List