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

Fields
Modifier and Type
Field
Description
`static final int`
`STATUS_CODE_NO_CHANGE`
Status code that can be set on an OK status returned by `update(ITargetDefinition, TreePath[], IProgressMonitor)` to indicate that there is no newer version
`static final int`
`STATUS_FORCE_RELOAD`
Status code that can be set on an OK status returned by `update(ITargetDefinition, TreePath[], IProgressMonitor)`, `remove(ITargetDefinition, TreePath[])` or `toggle(ITargetDefinition, TreePath[])` to indicate that a complete target refresh is desired

## Method Summary

Modifier and Type
Method
Description
`default boolean`
`canDisable(ITargetDefinition target, TreePath treePath)`
Returns whether this handler can disable the element described by the given `TreePath`
`default boolean`
`canEdit(ITargetDefinition target, TreePath treePath)`
Returns whether this handler can edit the element described by the given `TreePath`
`default boolean`
`canEnable(ITargetDefinition target, TreePath treePath)`
Returns whether this handler can enable the element described by the given `TreePath`
`default boolean`
`canRemove(ITargetDefinition target, TreePath treePath)`
Returns whether this handler can remove the element described by the given `TreePath`
`default boolean`
`canUpdate(ITargetDefinition target, TreePath treePath)`
Returns whether this handler can update the element described by the given `TreePath`
`default IWizard`
`getEditWizard(ITargetDefinition target, TreePath treePath)`
Returns a wizard that will be opened to edit the element described by the given `TreePath` The wizard is responsible for modifying the target location and/or target.
`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.
`default IStatus`
`remove(ITargetDefinition target, TreePath[] treePaths)`
Called when the user request to remove the given items from the target
`default IStatus`
`toggle(ITargetDefinition target, TreePath[] treePaths)`
Called when the user request to toggle the enabled/disabled state of the given items from the target
`default IStatus`
`update(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_CHANGE
Status code that can be set on an OK status returned by `update(ITargetDefinition, TreePath[], IProgressMonitor)` to indicate that there is no newer version

See Also:
  - Constant Field Values

### STATUS_FORCE_RELOAD

static final int STATUS_FORCE_RELOAD
Status code that can be set on an OK status returned by `update(ITargetDefinition, TreePath[], IProgressMonitor)`, `remove(ITargetDefinition, TreePath[])` or `toggle(ITargetDefinition, TreePath[])` to indicate that a complete target refresh is desired

See Also:
  - Constant Field Values

## Method Details

### canEdit

default boolean canEdit(ITargetDefinition target, TreePath treePath)
Returns whether this handler can edit the element described by the given `TreePath`

Parameters:
  `target` - the target definition being edited
  `treePath` - the path to be edited
Returns:
  whether this editor can edit the given path of child elements

### canUpdate

default boolean canUpdate(ITargetDefinition target, TreePath treePath)
Returns whether this handler can update the element described by the given `TreePath`

Parameters:
  `target` - the target definition being edited
  `treePath` - the path to be checked
Returns:
  whether this editor can update the given path of child elements

### canRemove

default boolean canRemove(ITargetDefinition target, TreePath treePath)
Returns whether this handler can remove the element described by the given `TreePath`

Parameters:
  `target` - the target definition being edited
  `treePath` - the path to be checked
Returns:
  whether this editor can remove the given path of child elements

### canDisable

default boolean canDisable(ITargetDefinition target, TreePath treePath)
Returns whether this handler can disable the element described by the given `TreePath`

Parameters:
  `target` - the target definition being edited
  `treePath` - the path to be checked
Returns:
  whether this editor can disable the given path of child elements

### canEnable

default boolean canEnable(ITargetDefinition target, TreePath treePath)
Returns whether this handler can enable the element described by the given `TreePath`

Parameters:
  `target` - the target definition being edited
  `treePath` - the path to be checked
Returns:
  whether this editor can enable the given path of child elements

### getEditWizard

default IWizard getEditWizard(ITargetDefinition target, TreePath treePath)
Returns a wizard that will be opened to edit the element described by the given `TreePath` The 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 edited
  `treePath` - the path to be edited
Returns:
  wizard to open for editing the `TreePath` or `null` if editing of the element is not possible

### update

default IStatus update(ITargetDefinition target, TreePath[] treePaths, IProgressMonitor monitor)
Updates the items given in treePath in the given target to the latest version

Parameters:
  `target` - the target definition being updated
  `treePaths` - the array of path to be updated
  `monitor` - to report progress of the update operation
Returns:
  result of the update, use an OK status with `STATUS_CODE_NO_CHANGE` to indicate everything is up to date, and `STATUS_FORCE_RELOAD` to 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 edited
  `targetLocations` - the locations to reload
  `monitor` - to report progress of the reload operation
Returns:
  the result of the reload

### remove

default IStatus remove(ITargetDefinition target, TreePath[] treePaths)
Called when the user request to remove the given items from the target

Parameters:
  `target` - the target definition being edited
  `treePaths` - the array of path to be removed
Returns:
  result of the update, use an OK status with `STATUS_FORCE_RELOAD` to force a reload of the target platform

### toggle

default IStatus toggle(ITargetDefinition target, TreePath[] treePaths)
Called when the user request to toggle the enabled/disabled state of the given items from the target

Parameters:
  `target` - the target definition being edited
  `treePaths` - the array of path to toggle
Returns:
  result of the update, use an OK status with `STATUS_FORCE_RELOAD` to force a reload of the target platform