Package org.eclipse.pde.ui.target
Interface ITargetLocationHandler
public interface ITargetLocationHandler
Contributed target locations that want to support extended editing of target
locations can implement this interface
- Since:
- 3.13
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStatus code that can be set on an OK status returned byupdate(ITargetDefinition, TreePath[], IProgressMonitor)to indicate that there is no newer versionstatic final intStatus code that can be set on an OK status returned byupdate(ITargetDefinition, TreePath[], IProgressMonitor),remove(ITargetDefinition, TreePath[])ortoggle(ITargetDefinition, TreePath[])to indicate that a complete target refresh is desired -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanDisable(ITargetDefinition target, TreePath treePath) Returns whether this handler can disable the element described by the givenTreePathdefault booleancanEdit(ITargetDefinition target, TreePath treePath) Returns whether this handler can edit the element described by the givenTreePathdefault booleancanEnable(ITargetDefinition target, TreePath treePath) Returns whether this handler can enable the element described by the givenTreePathdefault booleancanRemove(ITargetDefinition target, TreePath treePath) Returns whether this handler can remove the element described by the givenTreePathdefault booleancanUpdate(ITargetDefinition target, TreePath treePath) Returns whether this handler can update the element described by the givenTreePathdefault IWizardgetEditWizard(ITargetDefinition target, TreePath treePath) Returns a wizard that will be opened to edit the element described by the givenTreePathThe wizard is responsible for modifying the target location and/or target.default IStatusreload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) Called when the given targetLocations in the given target a re 'reloaded' and the user wants to completely reload any cached state.default IStatusremove(ITargetDefinition target, TreePath[] treePaths) Called when the user request to remove the given items from the targetdefault IStatustoggle(ITargetDefinition target, TreePath[] treePaths) Called when the user request to toggle the enabled/disabled state of the given items from the targetdefault IStatusupdate(ITargetDefinition target, TreePath[] treePaths, IProgressMonitor monitor) Updates the items given in treePath in the given target to the latest version
-
Field Details
-
STATUS_CODE_NO_CHANGE
static final int STATUS_CODE_NO_CHANGEStatus code that can be set on an OK status returned byupdate(ITargetDefinition, TreePath[], IProgressMonitor)to indicate that there is no newer version- See Also:
-
STATUS_FORCE_RELOAD
static final int STATUS_FORCE_RELOADStatus code that can be set on an OK status returned byupdate(ITargetDefinition, TreePath[], IProgressMonitor),remove(ITargetDefinition, TreePath[])ortoggle(ITargetDefinition, TreePath[])to indicate that a complete target refresh is desired- See Also:
-
-
Method Details
-
canEdit
Returns whether this handler can edit the element described by the givenTreePath- Parameters:
target- the target definition being editedtreePath- the path to be edited- Returns:
- whether this editor can edit the given path of child elements
-
canUpdate
Returns whether this handler can update the element described by the givenTreePath- Parameters:
target- the target definition being editedtreePath- the path to be checked- Returns:
- whether this editor can update the given path of child elements
-
canRemove
Returns whether this handler can remove the element described by the givenTreePath- Parameters:
target- the target definition being editedtreePath- the path to be checked- Returns:
- whether this editor can remove the given path of child elements
-
canDisable
Returns whether this handler can disable the element described by the givenTreePath- Parameters:
target- the target definition being editedtreePath- the path to be checked- Returns:
- whether this editor can disable the given path of child elements
-
canEnable
Returns whether this handler can enable the element described by the givenTreePath- Parameters:
target- the target definition being editedtreePath- the path to be checked- Returns:
- whether this editor can enable the given path of child elements
-
getEditWizard
Returns a wizard that will be opened to edit the element described by the givenTreePathThe wizard is responsible for modifying the target location and/or target. The target definition will be resolved if the wizard completes successfully.- Parameters:
target- the target definition being editedtreePath- the path to be edited- Returns:
- wizard to open for editing the
TreePathornullif editing of the element is not possible
-
update
Updates the items given in treePath in the given target to the latest version- Parameters:
target- the target definition being updatedtreePaths- the array of path to be updatedmonitor- to report progress of the update operation- Returns:
- result of the update, use an OK status with
STATUS_CODE_NO_CHANGEto indicate everything is up to date, andSTATUS_FORCE_RELOADto force a reload of the target platform
-
reload
default IStatus reload(ITargetDefinition target, ITargetLocation[] targetLocations, IProgressMonitor monitor) Called when the given targetLocations in the given target a re 'reloaded' and the user wants to completely reload any cached state.- Parameters:
target- the target definition being editedtargetLocations- the locations to reloadmonitor- to report progress of the reload operation- Returns:
- the result of the reload
-
remove
Called when the user request to remove the given items from the target- Parameters:
target- the target definition being editedtreePaths- the array of path to be removed- Returns:
- result of the update, use an OK status with
STATUS_FORCE_RELOADto force a reload of the target platform
-
toggle
Called when the user request to toggle the enabled/disabled state of the given items from the target- Parameters:
target- the target definition being editedtreePaths- the array of path to toggle- Returns:
- result of the update, use an OK status with
STATUS_FORCE_RELOADto force a reload of the target platform
-