Class AbstractLaunchShortcut

    • Constructor Detail

      • AbstractLaunchShortcut

        public AbstractLaunchShortcut()
    • Method Detail

      • launch

        protected void launch​(String mode)
        Launches the application in the specified mode, or does nothing if the user canceled the launch when offered to select one of several available launch configurations.
        mode - mode of launch (run, debug or profile)
        See Also:
      • findLaunchConfiguration

        protected ILaunchConfiguration findLaunchConfiguration​(String mode)
        This method first tries to locate existing launch configurations that are suitable for the application or framework being launched.

        • If none are found, a new launch configuration is created and initialized
        • If one is found, it is launched automatically
        • If more than one is found, a selection dialog is presented to the user and the chosen one will be launched

        mode - mode of launch (run, debug or profile)
        a launch configuration to run or null if launch is canceled
      • chooseConfiguration

        protected ILaunchConfiguration chooseConfiguration​(ILaunchConfiguration[] configs,
                                                           String mode)
        Display to the user a list of matching existing launch configurations and return the user's selection.
        configs - an array of matching existing launch configurations
        mode - mode of launch
        the launch configuration selected by the user or null if Cancel was pressed
      • getName

        protected String getName​(ILaunchConfigurationType type)
        Returns the name assigned to the new launch configuration
        a name for the new launch configuration
      • initializeConfiguration

        protected abstract void initializeConfiguration​(ILaunchConfigurationWorkingCopy wc)
        Initialize launch attributes on the new launch configuration. Must be overridden by subclasses.
        wc - the launch configuration working copy to be initialize
        See Also:
      • getLaunchConfigurationTypeName

        protected abstract String getLaunchConfigurationTypeName()
        Returns the launch configuration type name. Must be overridden by subclasses
        the launch configuration type name
      • isGoodMatch

        protected abstract boolean isGoodMatch​(ILaunchConfiguration configuration)
        Determines whether a given launch configuration is a good match given the current application or framework being launched. This method must be overridden by subclasses. Its purpose is to add criteria on what makes a good match or not.
        configuration - the launch configuration being evaluated
        true if the launch configuration is a good match for the application or framework being launched, false otherwise.