Class LaunchBarManager

    • Constructor Detail

      • LaunchBarManager

        public LaunchBarManager()
      • LaunchBarManager

        LaunchBarManager​(boolean doInit)
    • Method Detail

      • getExtensionPoint

        org.eclipse.core.runtime.IExtensionPoint getExtensionPoint()
                                                            throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • getLaunchManager

        org.eclipse.debug.core.ILaunchManager getLaunchManager()
      • init

        void init()
           throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • loadExtensions

        private void loadExtensions()
                             throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • toString

        private java.lang.String toString​(Pair<java.lang.String,​java.lang.String> key)
      • toId

        private Pair<java.lang.String,​java.lang.String> toId​(java.lang.String key)
      • getDescriptorTypeId

        public java.lang.String getDescriptorTypeId​(ILaunchDescriptorType type)
        Description copied from interface: ILaunchBarManager
        Return the type id for the given launch descriptor type. This is defined in the extension point that defines the type.
        Specified by:
        getDescriptorTypeId in interface ILaunchBarManager
        Parameters:
        type - descriptor type
        Returns:
        the type id for the descriptor type
      • getDescriptorId

        private Pair<java.lang.String,​java.lang.String> getDescriptorId​(ILaunchDescriptor descriptor)
      • getTargetId

        private Pair<java.lang.String,​java.lang.String> getTargetId​(ILaunchTarget target)
      • addDescriptor

        private void addDescriptor​(java.lang.Object launchObject,
                                   ILaunchDescriptor descriptor)
                            throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • launchObjectAdded

        public ILaunchDescriptor launchObjectAdded​(java.lang.Object launchObject)
        Description copied from interface: ILaunchBarManager
        A launch object has been added. Create a matching launch descriptor if available.
        Specified by:
        launchObjectAdded in interface ILaunchBarManager
        Returns:
        the launch descriptor that got created, null of none was
      • launchObjectRemoved

        public void launchObjectRemoved​(java.lang.Object launchObject)
                                 throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ILaunchBarManager
        A launch object has been removed. Remove the associated launch descriptor if there is one.
        Specified by:
        launchObjectRemoved in interface ILaunchBarManager
        Throws:
        org.eclipse.core.runtime.CoreException
      • launchObjectChanged

        public void launchObjectChanged​(java.lang.Object launchObject)
                                 throws org.eclipse.core.runtime.CoreException
        Description copied from interface: ILaunchBarManager
        A launch object has changed in some way that affects the launch bar.
        Specified by:
        launchObjectChanged in interface ILaunchBarManager
        Throws:
        org.eclipse.core.runtime.CoreException
      • setActive

        private void setActive​(org.eclipse.debug.core.ILaunchConfiguration config,
                               java.lang.String mode,
                               ILaunchTarget target)
                        throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • doSetActiveLaunchDescriptor

        private void doSetActiveLaunchDescriptor​(ILaunchDescriptor descriptor)
      • storeActiveDescriptor

        private void storeActiveDescriptor​(ILaunchDescriptor descriptor)
      • syncActiveTarget

        private void syncActiveTarget()
                               throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • syncActiveMode

        private void syncActiveMode()
                             throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • supportsMode

        private boolean supportsMode​(org.eclipse.debug.core.ILaunchMode mode)
                              throws org.eclipse.core.runtime.CoreException
        Throws:
        org.eclipse.core.runtime.CoreException
      • setPreference

        private void setPreference​(org.osgi.service.prefs.Preferences store,
                                   java.lang.String prefId,
                                   java.lang.String value)
      • getPerDescriptorStore

        private org.osgi.service.prefs.Preferences getPerDescriptorStore()
      • getPerDescriptorStore

        private org.osgi.service.prefs.Preferences getPerDescriptorStore​(ILaunchDescriptor launchDesc)
      • getPreferenceStore

        org.eclipse.core.runtime.preferences.IEclipsePreferences getPreferenceStore()
      • fireActiveLaunchDescriptorChanged

        private void fireActiveLaunchDescriptorChanged()
      • getLaunchModes

        public org.eclipse.debug.core.ILaunchMode[] getLaunchModes()
                                                            throws org.eclipse.core.runtime.CoreException
        Specified by:
        getLaunchModes in interface ILaunchBarManager
        Throws:
        org.eclipse.core.runtime.CoreException
      • setLaunchMode

        public void setLaunchMode​(ILaunchDescriptor desc,
                                  org.eclipse.debug.core.ILaunchMode mode)
                           throws org.eclipse.core.runtime.CoreException
        Sets the preferred mode for the given descriptor
        Parameters:
        desc -
        mode -
        Throws:
        org.eclipse.core.runtime.CoreException
      • setActiveLaunchMode

        public void setActiveLaunchMode​(org.eclipse.debug.core.ILaunchMode mode)
                                 throws org.eclipse.core.runtime.CoreException
        Specified by:
        setActiveLaunchMode in interface ILaunchBarManager
        Throws:
        org.eclipse.core.runtime.CoreException
      • fireActiveLaunchModeChanged

        private void fireActiveLaunchModeChanged()
      • storeLaunchMode

        private void storeLaunchMode​(ILaunchDescriptor desc,
                                     org.eclipse.debug.core.ILaunchMode mode)
      • setLaunchTarget

        public void setLaunchTarget​(ILaunchDescriptor desc,
                                    ILaunchTarget target)
                             throws org.eclipse.core.runtime.CoreException
        Sets preferred target for launch descriptor
        Parameters:
        desc -
        target -
        Throws:
        org.eclipse.core.runtime.CoreException
      • fireActiveLaunchTargetChanged

        private void fireActiveLaunchTargetChanged()
      • getActiveLaunchConfiguration

        public org.eclipse.debug.core.ILaunchConfiguration getActiveLaunchConfiguration()
                                                                                 throws org.eclipse.core.runtime.CoreException
        Specified by:
        getActiveLaunchConfiguration in interface ILaunchBarManager
        Throws:
        org.eclipse.core.runtime.CoreException
      • launchConfigurationAdded

        public void launchConfigurationAdded​(org.eclipse.debug.core.ILaunchConfiguration configuration)
        Specified by:
        launchConfigurationAdded in interface org.eclipse.debug.core.ILaunchConfigurationListener
      • launchConfigurationRemoved

        public void launchConfigurationRemoved​(org.eclipse.debug.core.ILaunchConfiguration configuration)
        Specified by:
        launchConfigurationRemoved in interface org.eclipse.debug.core.ILaunchConfigurationListener
      • launchConfigurationChanged

        public void launchConfigurationChanged​(org.eclipse.debug.core.ILaunchConfiguration configuration)
        Specified by:
        launchConfigurationChanged in interface org.eclipse.debug.core.ILaunchConfigurationListener
      • dispose

        public void dispose()
      • fireLaunchTargetsChanged

        private void fireLaunchTargetsChanged()
      • getLaunchDescriptor

        private ILaunchDescriptor getLaunchDescriptor​(org.eclipse.debug.core.ILaunchConfiguration configuration,
                                                      ILaunchTarget target)
      • launchDescriptorMatches

        private boolean launchDescriptorMatches​(ILaunchDescriptor desc,
                                                org.eclipse.debug.core.ILaunchConfiguration configuration,
                                                ILaunchTarget target)