Search in sources :

Example 1 with ID_REMOTE_JAVA_APPLICATION

use of org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants.ID_REMOTE_JAVA_APPLICATION in project jbosstools-openshift by jbosstools.

the class DebugLaunchConfigs method getRemoteDebuggerLaunchConfiguration.

public ILaunchConfiguration getRemoteDebuggerLaunchConfiguration(IServer server) throws CoreException {
    ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType(ID_REMOTE_JAVA_APPLICATION);
    ILaunchConfiguration[] launchConfigs = launchManager.getLaunchConfigurations(launchConfigurationType);
    String name = getRemoteDebuggerLaunchConfigurationName(server);
    Optional<ILaunchConfiguration> maybeLaunch = Stream.of(launchConfigs).filter(lc -> name.equals(lc.getName())).findFirst();
    return maybeLaunch.orElse(null);
}
Also used : MultiStatus(org.eclipse.core.runtime.MultiStatus) ID_REMOTE_JAVA_APPLICATION(org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants.ID_REMOTE_JAVA_APPLICATION) DebugPlugin(org.eclipse.debug.core.DebugPlugin) Collection(java.util.Collection) IServer(org.eclipse.wst.server.core.IServer) HashMap(java.util.HashMap) CoreException(org.eclipse.core.runtime.CoreException) OpenShiftCoreActivator(org.jboss.tools.openshift.internal.core.OpenShiftCoreActivator) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) ILaunchConfigurationType(org.eclipse.debug.core.ILaunchConfigurationType) ILaunchManager(org.eclipse.debug.core.ILaunchManager) ArrayList(java.util.ArrayList) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) Objects(java.util.Objects) DebugException(org.eclipse.debug.core.DebugException) List(java.util.List) IStatus(org.eclipse.core.runtime.IStatus) Stream(java.util.stream.Stream) ILaunch(org.eclipse.debug.core.ILaunch) IProject(org.eclipse.core.resources.IProject) Map(java.util.Map) Optional(java.util.Optional) IJavaLaunchConfigurationConstants(org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) ILaunchConfigurationType(org.eclipse.debug.core.ILaunchConfigurationType)

Aggregations

ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Objects (java.util.Objects)1 Optional (java.util.Optional)1 Stream (java.util.stream.Stream)1 IProject (org.eclipse.core.resources.IProject)1 CoreException (org.eclipse.core.runtime.CoreException)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 IStatus (org.eclipse.core.runtime.IStatus)1 MultiStatus (org.eclipse.core.runtime.MultiStatus)1 DebugException (org.eclipse.debug.core.DebugException)1 DebugPlugin (org.eclipse.debug.core.DebugPlugin)1 ILaunch (org.eclipse.debug.core.ILaunch)1 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)1 ILaunchConfigurationType (org.eclipse.debug.core.ILaunchConfigurationType)1 ILaunchConfigurationWorkingCopy (org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)1 ILaunchManager (org.eclipse.debug.core.ILaunchManager)1