Class RefreshTab

    • Field Detail

      • ATTR_REFRESH_RECURSIVE

        public static final java.lang.String ATTR_REFRESH_RECURSIVE
        Boolean attribute indicating if a refresh scope is recursive. Default value is true.
      • ATTR_REFRESH_SCOPE

        public static final java.lang.String ATTR_REFRESH_SCOPE
        String attribute identifying the scope of resources that should be refreshed after an external tool is run. The value is either a refresh variable or the default value, null, indicating no refresh.
    • Constructor Detail

      • RefreshTab

        public RefreshTab()
        Constructor
    • Method Detail

      • createControl

        public void createControl​(Composite parent)
        Description copied from interface: ILaunchConfigurationTab
        Creates the top level control for this launch configuration tab under the given parent composite. This method is called once on tab creation, after setLaunchConfigurationDialog is called.

        Implementors are responsible for ensuring that the created control can be accessed via getControl

        Parameters:
        parent - the parent composite
        See Also:
        ILaunchConfigurationTab.createControl(org.eclipse.swt.widgets.Composite)
      • refreshResources

        public static void refreshResources​(ILaunchConfiguration configuration,
                                            IProgressMonitor monitor)
                                     throws CoreException
        Refreshes the resources as specified by the given launch configuration.
        Parameters:
        configuration - launch configuration
        monitor - progress monitor which may be null
        Throws:
        CoreException - if an exception occurs while refreshing resources
      • getRefreshResources

        public static IResource[] getRefreshResources​(java.lang.String scope)
                                               throws CoreException
        Returns a collection of resources referred to by a refresh scope attribute.
        Parameters:
        scope - refresh scope attribute (ATTR_REFRESH_SCOPE)
        Returns:
        collection of resources referred to by the refresh scope attribute
        Throws:
        CoreException - if unable to resolve a set of resources
      • getRefreshScope

        public static java.lang.String getRefreshScope​(ILaunchConfiguration configuration)
                                                throws CoreException
        Returns the refresh scope attribute specified by the given launch configuration or null if none.
        Parameters:
        configuration - launch configuration
        Returns:
        refresh scope attribute (ATTR_REFRESH_SCOPE)
        Throws:
        CoreException - if unable to access the associated attribute
      • isRefreshRecursive

        public static boolean isRefreshRecursive​(ILaunchConfiguration configuration)
                                          throws CoreException
        Returns whether the refresh scope specified by the given launch configuration is recursive.
        Parameters:
        configuration - the configuration to check for recursive refresh being set
        Returns:
        whether the refresh scope is recursive
        Throws:
        CoreException - if unable to access the associated attribute
      • getRefreshAttribute

        public static java.lang.String getRefreshAttribute​(IWorkingSet workingSet)
        Creates and returns a memento for the given working set, to be used as a refresh attribute.
        Parameters:
        workingSet - a working set, or null
        Returns:
        an equivalent refresh attribute
      • getWorkingSet

        public static IWorkingSet getWorkingSet​(java.lang.String refreshAttribute)
        Creates and returns a working set from the given refresh attribute created by the method getRefreshAttribute(IWorkingSet), or null if none.
        Parameters:
        refreshAttribute - a refresh attribute that represents a working set
        Returns:
        equivalent working set, or null
      • activated

        public void activated​(ILaunchConfigurationWorkingCopy workingCopy)
        Description copied from class: AbstractLaunchConfigurationTab
        This method was added to the ILaunchConfigurationTab interface in the 3.0 release to allow tabs to distinguish between a tab being activated and a tab group be initialized for the first time, from a selected launch configuration. To maintain backwards compatible behavior, the default implementation provided, calls this tab's initializeFrom method. Tabs should override this method as required.

        The launch tab framework was originally designed to take care of inter tab communication by applying attributes from the active tab to the launch configuration being edited, when a tab is exited, and by initializing a tab when activated. The addition of the methods activated and deactivated allow tabs to determine the appropriate course of action.

        Specified by:
        activated in interface ILaunchConfigurationTab
        Overrides:
        activated in class AbstractLaunchConfigurationTab
        Parameters:
        workingCopy - the launch configuration being edited
        See Also:
        ILaunchConfigurationTab.activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
      • deactivated

        public void deactivated​(ILaunchConfigurationWorkingCopy workingCopy)
        Description copied from class: AbstractLaunchConfigurationTab
        This method was added to the ILaunchConfigurationTab interface in the 3.0 release to allow tabs to distinguish between a tab being deactivated and saving its attributes to a launch configuration. To maintain backwards compatible behavior, the default implementation provided, calls this tab's performApply method. Tabs should override this method as required.

        The launch tab framework was originally designed to take care of inter tab communication by applying attributes from the active tab to the launch configuration being edited, when a tab is exited, and by initializing a tab when activated. The addition of the methods activated and deactivated allow tabs to determine the appropriate course of action.

        Specified by:
        deactivated in interface ILaunchConfigurationTab
        Overrides:
        deactivated in class AbstractLaunchConfigurationTab
        Parameters:
        workingCopy - the launch configuration being edited
        See Also:
        ILaunchConfigurationTab.deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)