Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.debug.ui
Class RefreshTab


java.lang.Object
  extended by 

org.eclipse.debug.ui.AbstractLaunchConfigurationTab
      extended by 
org.eclipse.debug.ui.RefreshTab
All Implemented Interfaces:
ILaunchConfigurationTab

public class RefreshTab
extends AbstractLaunchConfigurationTab

A launch configuration tab which allows the user to specify which resources should be refreshed when the launch terminates.

This class may be instantiate.

Since:
3.0
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
static  String ATTR_REFRESH_RECURSIVE
          Boolean attribute indicating if a refresh scope is recursive.
static  String ATTR_REFRESH_SCOPE
          String attribute identifying the scope of resources that should be refreshed after an external tool is run.
 
Constructor Summary
RefreshTab ()
           
 
Method Summary
 void activated ( ILaunchConfigurationWorkingCopy workingCopy)
          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.
 void createControl ( Composite parent)
          Creates the top level control for this launch configuration tab under the given parent composite.
 void deactivated ( ILaunchConfigurationWorkingCopy workingCopy)
          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.
  String getId ()
          Returns this tab's unique identifier or null if none.
  Image getImage ()
          Returns the image for this tab, or null if none
  String getName ()
          Returns the name of this tab.
static  String getRefreshAttribute ( IWorkingSet workingSet)
          Creates and returns a memento for the given working set, to be used as a refresh attribute.
static  IResource[] getRefreshResources ( String scope)
          Returns a collection of resources referred to by a refresh scope attribute.
static  String getRefreshScope ( ILaunchConfiguration configuration)
          Returns the refresh scope attribute specified by the given launch configuration or null if none.
static  IWorkingSet getWorkingSet ( String refreshAttribute)
          Creates and returns a working set from the given refresh attribute created by the method getRefreshAttribute(IWorkingSet), or null if none.
 void initializeFrom ( ILaunchConfiguration configuration)
          Initializes this tab's controls with values from the given launch configuration.
static boolean isRefreshRecursive ( ILaunchConfiguration configuration)
          Returns whether the refresh scope specified by the given launch configuration is recursive.
 boolean isValid ( ILaunchConfiguration launchConfig)
          Returns whether this tab is in a valid state in the context of the specified launch configuration.
 void performApply ( ILaunchConfigurationWorkingCopy configuration)
          Copies values from this tab into the given launch configuration.
static void refreshResources ( ILaunchConfiguration configuration, IProgressMonitor monitor)
          Refreshes the resources as specified by the given launch configuration.
 void setDefaults ( ILaunchConfigurationWorkingCopy configuration)
          Initializes the given launch configuration with default values for this tab.
 
Methods inherited from class org.eclipse.debug.ui. AbstractLaunchConfigurationTab
canSave, createCheckButton, createPushButton, createRadioButton, createSeparator, createVerticalSpacer, dispose, getControl, getErrorMessage, getLaunchConfigurationDialog, getLaunchManager, getMessage, getShell, isDirty, launched, setAttribute, setControl, setDirty, setErrorMessage, setLaunchConfigurationDialog, setMessage, updateLaunchConfigurationDialog
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_REFRESH_RECURSIVE

public static final 
String ATTR_REFRESH_RECURSIVE
Boolean attribute indicating if a refresh scope is recursive. Default value is false.


ATTR_REFRESH_SCOPE

public static final 
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()
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)

setDefaults

public void setDefaults(
ILaunchConfigurationWorkingCopy configuration)
Description copied from interface: ILaunchConfigurationTab
Initializes the given launch configuration with default values for this tab. This method is called when a new launch configuration is created such that the configuration can be initialized with meaningful values. This method may be called before this tab's control is created.

Parameters:
configuration - launch configuration
See Also:
ILaunchConfigurationTab.setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)

initializeFrom

public void initializeFrom(
ILaunchConfiguration configuration)
Description copied from interface: ILaunchConfigurationTab
Initializes this tab's controls with values from the given launch configuration. This method is called when a configuration is selected to view or edit, after this tab's control has been created.

Parameters:
configuration - launch configuration
See Also:
ILaunchConfigurationTab.initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)

performApply

public void performApply(
ILaunchConfigurationWorkingCopy configuration)
Description copied from interface: ILaunchConfigurationTab
Copies values from this tab into the given launch configuration.

Parameters:
configuration - launch configuration
See Also:
ILaunchConfigurationTab.performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)

getName

public 
String getName()
Description copied from interface: ILaunchConfigurationTab
Returns the name of this tab.

Returns:
the name of this tab
See Also:
ILaunchConfigurationTab.getName()

getImage

public 
Image getImage()
Description copied from interface: ILaunchConfigurationTab
Returns the image for this tab, or null if none

Specified by:
getImage in interface ILaunchConfigurationTab
Overrides:
getImage in class AbstractLaunchConfigurationTab
Returns:
the image for this tab, or null if none
See Also:
ILaunchConfigurationTab.getImage()

isValid

public boolean isValid(
ILaunchConfiguration launchConfig)
Description copied from interface: ILaunchConfigurationTab
Returns whether this tab is in a valid state in the context of the specified launch configuration.

This information is typically used by the launch configuration dialog to decide when it is okay to launch.

Specified by:
isValid in interface ILaunchConfigurationTab
Overrides:
isValid in class AbstractLaunchConfigurationTab
Parameters:
launchConfig - launch configuration which provides context for validating this tab. This value must not be null.
Returns:
whether this tab is in a valid state
See Also:
ILaunchConfigurationTab.isValid(ILaunchConfiguration)

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(
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 
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 -
Returns:
whether the refresh scope is recursive
Throws:
CoreException - if unable to access the associated attribute

getRefreshAttribute

public static 
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(
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)

getId

public 
String getId()
Description copied from class: AbstractLaunchConfigurationTab
Returns this tab's unique identifier or null if none. By default, null is returned. Subclasses should override as necessary.

Tab identifiers allow contributed tabs to be ordered relative to one another.

Overrides:
getId in class AbstractLaunchConfigurationTab
Returns:
tab id or null
Since:
3.5
See Also:
AbstractLaunchConfigurationTab.getId()

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire