Class AbstractJavaLaunchConfigurationDelegate

java.lang.Object
org.eclipse.debug.core.model.LaunchConfigurationDelegate
org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate
All Implemented Interfaces:
org.eclipse.debug.core.IDebugEventSetListener, org.eclipse.debug.core.model.ILaunchConfigurationDelegate, org.eclipse.debug.core.model.ILaunchConfigurationDelegate2
Direct Known Subclasses:
JavaLaunchDelegate, JUnitLaunchConfigurationDelegate

public abstract class AbstractJavaLaunchConfigurationDelegate extends org.eclipse.debug.core.model.LaunchConfigurationDelegate implements org.eclipse.debug.core.IDebugEventSetListener
Abstract implementation of a Java launch configuration delegate. Provides convenience methods for accessing and verifying launch configuration attributes.

Clients implementing Java launch configuration delegates should subclass this class.

Since:
2.0
  • Field Summary

    Fields inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate

    complileErrorProjectPromptStatus, complileErrorPromptStatus, promptStatus, saveScopedDirtyEditors, switchToDebugPromptStatus
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    abort(String message, Throwable exception, int code)
    Throws a core exception with an error status object built from the given message, lower level exception, and error code.
    protected final void
    Enabled advanced sourcelookup for this launch delegate.
    getBootpath(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns entries that should appear on the bootstrap portion of the classpath as specified by the given launch configuration, as an array of resolved strings.
    String[][]
    getBootpathExt(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns three sets of entries which represent the boot classpath specified in the launch configuration, as an array of three arrays of resolved strings.
    protected org.eclipse.debug.core.model.IBreakpoint[]
    getBreakpoints(org.eclipse.debug.core.ILaunchConfiguration configuration)
     
    protected org.eclipse.core.resources.IProject[]
    getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode)
     
    getClasspath(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Deprecated.
    use getClasspathAndModulepath
    String[][]
    getClasspathAndModulepath(org.eclipse.debug.core.ILaunchConfiguration config)
    Returns the entries that should appear on the user portion of the classpath and modulepath as specified by the given launch configuration, as an array of resolved strings.
    protected File
    getDefaultWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the default working directory for the given launch configuration, or null if none.
    getEnvironment(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns an array of environment variables to be used when launching the given configuration or null if unspecified.
    getJavaLibraryPath(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns an array of paths to be used for the java.library.path system property, or null if unspecified.
    getJavaProject(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the Java project specified by the given launch configuration, or null if none.
    getJavaProjectName(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the Java project name specified by the given launch configuration, or null if none.
    org.eclipse.debug.core.ILaunch
    getLaunch(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode)
     
    protected org.eclipse.debug.core.ILaunchManager
    Convenience method to get the launch manager.
    getMainTypeName(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the main type name specified by the given launch configuration, or null if none.
    getModuleCLIOptions(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the module-related command line options for the configuration that are needed at runtime as equivalents of those options specified by IClasspathAttributes of the following names: IClasspathAttribute.ADD_EXPORTS IClasspathAttribute.ADD_READS IClasspathAttribute.LIMIT_MODULES IClasspathAttribute.PATCH_MODULE
    getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the program arguments specified by the given launch configuration, as a string.
    protected org.eclipse.core.resources.IProject[]
    getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode)
     
    getVMArguments(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM arguments specified by the given launch configuration, as a string.
    getVMArguments(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode)
    Returns the VM arguments specified by the given launch configuration, as a string.
    getVMConnectorId(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM connector identifier specified by the given launch configuration, or null if none.
    getVMInstall(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM install specified by the given launch configuration, or null if none.
    getVMInstallName(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM install name specified by the given launch configuration, or null if none.
    getVMInstallType(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM install type specified by the given launch configuration, or null if none.
    getVMInstallTypeId(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the VM install type identifier specified by the given launch configuration, or null if none.
    getVMRunner(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode)
    Returns the VM runner for the given launch mode to use when launching the given configuration.
    getVMSpecificAttributesMap(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the Map of VM-specific attributes specified by the given launch configuration, or null if none.
    getWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the working directory specified by the given launch configuration, or null if none.
    org.eclipse.core.runtime.IPath
    getWorkingDirectoryPath(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns the working directory path specified by the given launch configuration, or null if none.
    void
    handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
    Handles the "stop-in-main" option.
    boolean
    isAllowTerminate(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns whether the given launch configuration specifies that termination is allowed.
    protected boolean
    isLaunchProblem(org.eclipse.core.resources.IMarker problemMarker)
     
    boolean
    isStopInMain(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Returns whether the given launch configuration specifies that execution should suspend on entry of the main method.
    boolean
    preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode, org.eclipse.core.runtime.IProgressMonitor monitor)
     
    protected void
    prepareStopInMain(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Determines if the given launch configuration specifies the "stop-in-main" attribute, and sets up an event listener to handle the option if required.
    protected void
    setDefaultSourceLocator(org.eclipse.debug.core.ILaunch launch, org.eclipse.debug.core.ILaunchConfiguration configuration)
    Assigns a default source locator to the given launch if a source locator has not yet been assigned to it, and the associated launch configuration does not specify a source locator.
    protected boolean
    Supports modular class for launching.
    protected boolean
    supportsPreviewFeatures(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Supports Preview Features for launching.
    verifyJavaProject(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Verifies a Java project is specified by the given launch configuration, and returns the Java project.
    verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Verifies a main type name is specified by the given launch configuration, and returns the main type name.
    verifyVMInstall(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Verifies the VM install specified by the given launch configuration exists and returns the VM install.
    verifyWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration)
    Verifies the working directory specified by the given launch configuration exists, and returns the working directory, or null if none is specified.

    Methods inherited from class org.eclipse.debug.core.model.LaunchConfigurationDelegate

    addReferencedProjects, buildForLaunch, buildProjects, computeBuildOrder, computeReferencedBuildOrder, existsProblems, finalLaunchCheck, saveBeforeLaunch

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.debug.core.model.ILaunchConfigurationDelegate

    launch, showCommandLine
  • Constructor Details

    • AbstractJavaLaunchConfigurationDelegate

      public AbstractJavaLaunchConfigurationDelegate()
  • Method Details

    • getLaunchManager

      protected org.eclipse.debug.core.ILaunchManager getLaunchManager()
      Convenience method to get the launch manager.
      Returns:
      the launch manager
    • abort

      protected void abort(String message, Throwable exception, int code) throws org.eclipse.core.runtime.CoreException
      Throws a core exception with an error status object built from the given message, lower level exception, and error code.
      Parameters:
      message - the status message
      exception - lower level exception associated with the error, or null if none
      code - error code
      Throws:
      org.eclipse.core.runtime.CoreException - the "abort" core exception
    • getVMInstall

      public IVMInstall getVMInstall(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM install specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM install specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getVMInstallName

      public String getVMInstallName(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM install name specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM install name specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getVMInstallType

      public IVMInstallType getVMInstallType(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM install type specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM install type specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getVMInstallTypeId

      public String getVMInstallTypeId(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM install type identifier specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM install type identifier specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • verifyVMInstall

      public IVMInstall verifyVMInstall(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Verifies the VM install specified by the given launch configuration exists and returns the VM install.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM install specified by the given launch configuration
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute, the attribute is unspecified, or if the home location is unspecified or does not exist
    • getVMConnectorId

      public String getVMConnectorId(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM connector identifier specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM connector identifier specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getBootpath

      public String[] getBootpath(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns entries that should appear on the bootstrap portion of the classpath as specified by the given launch configuration, as an array of resolved strings. The returned array is null if all entries are standard (i.e. appear by default), or empty to represent an empty bootpath.
      Parameters:
      configuration - launch configuration
      Returns:
      the bootpath specified by the given launch configuration. An empty bootpath is specified by an empty array, and null represents a default bootpath.
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getBootpathExt

      public String[][] getBootpathExt(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns three sets of entries which represent the boot classpath specified in the launch configuration, as an array of three arrays of resolved strings. The first array represents the classpath that should be prepended to the boot classpath. The second array represents the main part of the boot classpath -null represents the default bootclasspath. The third array represents the classpath that should be appended to the boot classpath.
      Parameters:
      configuration - launch configuration
      Returns:
      a description of the boot classpath specified by the given launch configuration.
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
      Since:
      3.0
    • getClasspath

      @Deprecated public String[] getClasspath(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Deprecated.
      use getClasspathAndModulepath
      Returns the entries that should appear on the user portion of the classpath as specified by the given launch configuration, as an array of resolved strings. The returned array is empty if no classpath is specified.
      Parameters:
      configuration - launch configuration
      Returns:
      the classpath specified by the given launch configuration, possibly an empty array
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getClasspathAndModulepath

      public String[][] getClasspathAndModulepath(org.eclipse.debug.core.ILaunchConfiguration config) throws org.eclipse.core.runtime.CoreException
      Returns the entries that should appear on the user portion of the classpath and modulepath as specified by the given launch configuration, as an array of resolved strings. The returned array is empty if no classpath and modulepath is specified.
      Parameters:
      config - launch configuration
      Returns:
      the classpath and modulepath specified by the given launch configuration, possibly an empty array
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
      Since:
      3.10
    • getJavaProject

      public IJavaProject getJavaProject(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the Java project specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the Java project specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getJavaProjectName

      public String getJavaProjectName(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the Java project name specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the Java project name specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getMainTypeName

      public String getMainTypeName(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the main type name specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the main type name specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getProgramArguments

      public String getProgramArguments(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the program arguments specified by the given launch configuration, as a string. The returned string is empty if no program arguments are specified.
      Parameters:
      configuration - launch configuration
      Returns:
      the program arguments specified by the given launch configuration, possibly an empty string
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getVMArguments

      public String getVMArguments(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the VM arguments specified by the given launch configuration, as a string. The returned string is empty if no VM arguments are specified.
      Parameters:
      configuration - launch configuration
      Returns:
      the VM arguments specified by the given launch configuration, possibly an empty string
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getVMArguments

      public String getVMArguments(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode) throws org.eclipse.core.runtime.CoreException
      Returns the VM arguments specified by the given launch configuration, as a string. The returned string is empty if no VM arguments are specified.
      Parameters:
      configuration - launch configuration
      mode - the mode in which to launch, one of the mode constants defined by ILaunchManager - RUN_MODE or DEBUG_MODE.
      Returns:
      the VM arguments specified by the given launch configuration, possibly an empty string
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
      Since:
      3.10
    • getVMSpecificAttributesMap

      public Map<String,Object> getVMSpecificAttributesMap(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the Map of VM-specific attributes specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the Map of VM-specific attributes
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getWorkingDirectory

      public File getWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the working directory specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the working directory specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • getWorkingDirectoryPath

      public org.eclipse.core.runtime.IPath getWorkingDirectoryPath(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the working directory path specified by the given launch configuration, or null if none.
      Parameters:
      configuration - launch configuration
      Returns:
      the working directory path specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • verifyJavaProject

      public IJavaProject verifyJavaProject(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Verifies a Java project is specified by the given launch configuration, and returns the Java project.
      Parameters:
      configuration - launch configuration
      Returns:
      the Java project specified by the given launch configuration
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute or the attribute is unspecified
    • verifyMainTypeName

      public String verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Verifies a main type name is specified by the given launch configuration, and returns the main type name.
      Parameters:
      configuration - launch configuration
      Returns:
      the main type name specified by the given launch configuration
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute or the attribute is unspecified
    • verifyWorkingDirectory

      public File verifyWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Verifies the working directory specified by the given launch configuration exists, and returns the working directory, or null if none is specified.
      Parameters:
      configuration - launch configuration
      Returns:
      the working directory specified by the given launch configuration, or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • isAllowTerminate

      public boolean isAllowTerminate(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns whether the given launch configuration specifies that termination is allowed.
      Parameters:
      configuration - launch configuration
      Returns:
      whether termination is allowed
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
    • isStopInMain

      public boolean isStopInMain(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns whether the given launch configuration specifies that execution should suspend on entry of the main method.
      Parameters:
      configuration - launch configuration
      Returns:
      whether execution should suspend in main
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to retrieve the attribute
      Since:
      2.1
    • setDefaultSourceLocator

      protected void setDefaultSourceLocator(org.eclipse.debug.core.ILaunch launch, org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Assigns a default source locator to the given launch if a source locator has not yet been assigned to it, and the associated launch configuration does not specify a source locator.
      Parameters:
      launch - launch object
      configuration - configuration being launched
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to set the source locator
    • prepareStopInMain

      protected void prepareStopInMain(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Determines if the given launch configuration specifies the "stop-in-main" attribute, and sets up an event listener to handle the option if required.
      Parameters:
      configuration - configuration being launched
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to access the attribute
      Since:
      2.1
    • handleDebugEvents

      public void handleDebugEvents(org.eclipse.debug.core.DebugEvent[] events)
      Handles the "stop-in-main" option.
      Specified by:
      handleDebugEvents in interface org.eclipse.debug.core.IDebugEventSetListener
      Parameters:
      events - the debug events.
      See Also:
      • IDebugEventSetListener.handleDebugEvents(DebugEvent[])
    • getBuildOrder

      protected org.eclipse.core.resources.IProject[] getBuildOrder(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode) throws org.eclipse.core.runtime.CoreException
      Overrides:
      getBuildOrder in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
      Throws:
      org.eclipse.core.runtime.CoreException
    • getProjectsForProblemSearch

      protected org.eclipse.core.resources.IProject[] getProjectsForProblemSearch(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode) throws org.eclipse.core.runtime.CoreException
      Overrides:
      getProjectsForProblemSearch in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
      Throws:
      org.eclipse.core.runtime.CoreException
    • isLaunchProblem

      protected boolean isLaunchProblem(org.eclipse.core.resources.IMarker problemMarker) throws org.eclipse.core.runtime.CoreException
      Overrides:
      isLaunchProblem in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
      Throws:
      org.eclipse.core.runtime.CoreException
    • preLaunchCheck

      public boolean preLaunchCheck(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Specified by:
      preLaunchCheck in interface org.eclipse.debug.core.model.ILaunchConfigurationDelegate2
      Overrides:
      preLaunchCheck in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
      Throws:
      org.eclipse.core.runtime.CoreException
    • getBreakpoints

      protected org.eclipse.debug.core.model.IBreakpoint[] getBreakpoints(org.eclipse.debug.core.ILaunchConfiguration configuration)
      Overrides:
      getBreakpoints in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
    • getVMRunner

      public IVMRunner getVMRunner(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode) throws org.eclipse.core.runtime.CoreException
      Returns the VM runner for the given launch mode to use when launching the given configuration.
      Parameters:
      configuration - launch configuration
      mode - launch node
      Returns:
      VM runner to use when launching the given configuration in the given mode
      Throws:
      org.eclipse.core.runtime.CoreException - if a VM runner cannot be determined
      Since:
      3.1
    • getEnvironment

      public String[] getEnvironment(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns an array of environment variables to be used when launching the given configuration or null if unspecified.
      Parameters:
      configuration - launch configuration
      Returns:
      an array of environment variables to use when launching the given configuration or null if unspecified
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to access associated attribute or if unable to resolve a variable in an environment variable's value
      Since:
      3.1
    • getJavaLibraryPath

      public String[] getJavaLibraryPath(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns an array of paths to be used for the java.library.path system property, or null if unspecified.
      Parameters:
      configuration - the config
      Returns:
      an array of paths to be used for the java.library.path system property, or null
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to determine the attribute
      Since:
      3.1
    • getDefaultWorkingDirectory

      protected File getDefaultWorkingDirectory(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the default working directory for the given launch configuration, or null if none. Subclasses may override as necessary.
      Parameters:
      configuration - the config
      Returns:
      default working directory or null if none
      Throws:
      org.eclipse.core.runtime.CoreException - if an exception occurs computing the default working directory
      Since:
      3.2
    • getLaunch

      public org.eclipse.debug.core.ILaunch getLaunch(org.eclipse.debug.core.ILaunchConfiguration configuration, String mode) throws org.eclipse.core.runtime.CoreException
      Specified by:
      getLaunch in interface org.eclipse.debug.core.model.ILaunchConfigurationDelegate2
      Overrides:
      getLaunch in class org.eclipse.debug.core.model.LaunchConfigurationDelegate
      Throws:
      org.eclipse.core.runtime.CoreException
    • allowAdvancedSourcelookup

      protected final void allowAdvancedSourcelookup()
      Enabled advanced sourcelookup for this launch delegate. Advanced source lookup is disabled by default. This call has not effect if advanced source lookup is disabled at workspace level, i.e. advanced source lookup will remain disabled even if this method is called for the launch delegate instance.
      Since:
      3.10
    • getModuleCLIOptions

      public String getModuleCLIOptions(org.eclipse.debug.core.ILaunchConfiguration configuration) throws org.eclipse.core.runtime.CoreException
      Returns the module-related command line options for the configuration that are needed at runtime as equivalents of those options specified by IClasspathAttributes of the following names:
      Throws:
      org.eclipse.core.runtime.CoreException
      Since:
      3.10
    • supportsModule

      protected boolean supportsModule()
      Supports modular class for launching.
      Since:
      3.12
    • supportsPreviewFeatures

      protected boolean supportsPreviewFeatures(org.eclipse.debug.core.ILaunchConfiguration configuration)
      Supports Preview Features for launching.
      Since:
      3.14