Eclipse Platform
Release 3.2

org.eclipse.team.ui.synchronize
Class ModelSynchronizeParticipantActionGroup

java.lang.Object
  extended byorg.eclipse.ui.actions.ActionGroup
      extended byorg.eclipse.team.ui.synchronize.SynchronizePageActionGroup
          extended byorg.eclipse.team.ui.synchronize.ModelSynchronizeParticipantActionGroup

public class ModelSynchronizeParticipantActionGroup
extends SynchronizePageActionGroup

Action group that contributes the merge actions to the model synchronize participant. The groups adds the following:

Subclasses can configure the label and icons used for the merge actions by overriding configureMergeAction(String, Action) and can configure where in the context menu the actions appear by overriding addToContextMenu(String, Action, IMenuManager).

Since:
3.2

Field Summary
static String MERGE_ACTION_GROUP
          The id of the merge action group that determines where the merge actions (e.g. merge and overwrite) appear in the context menu or toolbar.
protected static String MERGE_ALL_ACTION_ID
          The id used to identify the Merge All action.
static String OTHER_ACTION_GROUP
          The id of the action group that determines where the other actions (e.g. mark-as-mered) appear in the context menu.
 
Constructor Summary
ModelSynchronizeParticipantActionGroup()
          Create a merge action group.
 
Method Summary
protected  void addToContextMenu(String mergeActionId, Action action, IMenuManager manager)
          Add the merge action to the context menu manager.
protected  void configureMergeAction(String mergeActionId, Action action)
          Configure the merge action to have appropriate label, image, etc.
 void dispose()
          Dispose of the action group.
 void fillActionBars(IActionBars actionBars)
          Adds the applicable actions to a part's action bars, including setting any global action handlers.
 void fillContextMenu(IMenuManager menu)
          Adds the applicable actions to a context menu, based on the state of the ActionContext.
 void initialize(ISynchronizePageConfiguration configuration)
          Initialize the actions of this contribution.
 
Methods inherited from class org.eclipse.team.ui.synchronize.SynchronizePageActionGroup
appendToGroup, appendToGroup, appendToGroup, appendToGroup, findGroup, getConfiguration, getVisibleRootsSelectionProvider, modelChanged
 
Methods inherited from class org.eclipse.ui.actions.ActionGroup
getContext, setContext, updateActionBars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MERGE_ACTION_GROUP

public static final String MERGE_ACTION_GROUP
The id of the merge action group that determines where the merge actions (e.g. merge and overwrite) appear in the context menu or toolbar.

See Also:
Constant Field Values

OTHER_ACTION_GROUP

public static final String OTHER_ACTION_GROUP
The id of the action group that determines where the other actions (e.g. mark-as-mered) appear in the context menu.

See Also:
Constant Field Values

MERGE_ALL_ACTION_ID

protected static final String MERGE_ALL_ACTION_ID
The id used to identify the Merge All action.

See Also:
Constant Field Values
Constructor Detail

ModelSynchronizeParticipantActionGroup

public ModelSynchronizeParticipantActionGroup()
Create a merge action group.

Method Detail

initialize

public void initialize(ISynchronizePageConfiguration configuration)
Description copied from class: SynchronizePageActionGroup
Initialize the actions of this contribution. This method will be invoked once before any calls are made to filleContextMenu or setActionBars but after the control for the page has been created. As a result of this, the site of the configuration can be accessed. Subclasses may override this method but must invoke the overridden method.

Overrides:
initialize in class SynchronizePageActionGroup
Parameters:
configuration - the configuration for the part to which the contribution is associated

fillActionBars

public void fillActionBars(IActionBars actionBars)
Description copied from class: ActionGroup
Adds the applicable actions to a part's action bars, including setting any global action handlers.

The default implementation does nothing. Subclasses may override or extend this method.

Overrides:
fillActionBars in class SynchronizePageActionGroup

fillContextMenu

public void fillContextMenu(IMenuManager menu)
Description copied from class: ActionGroup
Adds the applicable actions to a context menu, based on the state of the ActionContext.

The default implementation does nothing. Subclasses may override or extend this method.

Overrides:
fillContextMenu in class SynchronizePageActionGroup

configureMergeAction

protected void configureMergeAction(String mergeActionId,
                                    Action action)
Configure the merge action to have appropriate label, image, etc. Subclasses may override but should invoke the overridden method for unrecognized ids in order to support future additions.

Parameters:
mergeActionId - the id of the merge action (one of SynchronizationActionProvider.MERGE_ACTION_ID, SynchronizationActionProvider.OVERWRITE_ACTION_ID or SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID)
action - the action for the given id

addToContextMenu

protected void addToContextMenu(String mergeActionId,
                                Action action,
                                IMenuManager manager)
Add the merge action to the context menu manager. Subclasses may override but should invoke the overridden method for unrecognized ids in order to support future additions.

Parameters:
mergeActionId - the id of the merge action (one of SynchronizationActionProvider.MERGE_ACTION_ID, SynchronizationActionProvider.OVERWRITE_ACTION_ID or SynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID)
action - the action for the given id
manager - the context menu manager

dispose

public void dispose()
Description copied from class: SynchronizePageActionGroup
Dispose of the action group. Subclasses may override but must invoke the overridden method.

Overrides:
dispose in class SynchronizePageActionGroup

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.