Package org.eclipse.team.ui.synchronize
Class ModelSynchronizeParticipantActionGroup
java.lang.Object
org.eclipse.ui.actions.ActionGroup
org.eclipse.team.ui.synchronize.SynchronizePageActionGroup
org.eclipse.team.ui.synchronize.ModelSynchronizeParticipantActionGroup
Action group that contributes the merge actions to the model
synchronize participant. The groups adds the following:
- A toolbar action for attempting an auto-merge
- Context menu merge actions that delegate to the model's merge action handlers.
- TODO a merge all and overwrite all menu item?
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
FieldsModifier and TypeFieldDescriptionstatic final StringThe 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 final StringThe id used to identify the Merge All action.static final StringThe id of the action group that determines where the other actions (e.g. mark-as-merged) appear in the context menu. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToContextMenu(String mergeActionId, Action action, IMenuManager manager) Add the merge action to the context menu manager.protected voidconfigureMergeAction(String mergeActionId, Action action) Configure the merge action to have appropriate label, image, etc.voiddispose()Dispose of the action group.voidfillActionBars(IActionBars actionBars) Adds the applicable actions to a part's action bars, including setting any global action handlers.voidfillContextMenu(IMenuManager menu) Adds the applicable actions to a context menu, based on the state of theActionContext.voidinitialize(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, modelChangedMethods inherited from class org.eclipse.ui.actions.ActionGroup
getContext, setContext, updateActionBars
-
Field Details
-
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:
-
OTHER_ACTION_GROUP
The id of the action group that determines where the other actions (e.g. mark-as-merged) appear in the context menu.- See Also:
-
MERGE_ALL_ACTION_ID
The id used to identify the Merge All action.- See Also:
-
-
Constructor Details
-
ModelSynchronizeParticipantActionGroup
public ModelSynchronizeParticipantActionGroup()Create a merge action group.
-
-
Method Details
-
initialize
Description copied from class:SynchronizePageActionGroupInitialize the actions of this contribution. This method will be invoked once before any calls are made tofilleContextMenuorsetActionBarsbut 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:
initializein classSynchronizePageActionGroup- Parameters:
configuration- the configuration for the part to which the contribution is associated
-
fillActionBars
Description copied from class:ActionGroupAdds 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:
fillActionBarsin classSynchronizePageActionGroup- Parameters:
actionBars- the part's action bars
-
fillContextMenu
Description copied from class:ActionGroupAdds the applicable actions to a context menu, based on the state of theActionContext.The default implementation does nothing. Subclasses may override or extend this method.
- Overrides:
fillContextMenuin classSynchronizePageActionGroup- Parameters:
menu- the context menu manager
-
configureMergeAction
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 ofSynchronizationActionProvider.MERGE_ACTION_ID,SynchronizationActionProvider.OVERWRITE_ACTION_IDorSynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID)action- the action for the given id
-
addToContextMenu
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 ofSynchronizationActionProvider.MERGE_ACTION_ID,SynchronizationActionProvider.OVERWRITE_ACTION_IDorSynchronizationActionProvider.MARK_AS_MERGE_ACTION_ID)action- the action for the given idmanager- the context menu manager
-
dispose
public void dispose()Description copied from class:SynchronizePageActionGroupDispose of the action group. Subclasses may override but must invoke the overridden method.- Overrides:
disposein classSynchronizePageActionGroup
-