public class ModelSynchronizeParticipantActionGroup extends SynchronizePageActionGroup
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)
.
Modifier and Type | Field and Description |
---|---|
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-merged) appear in the context menu.
|
Constructor and Description |
---|
ModelSynchronizeParticipantActionGroup()
Create a merge action group.
|
Modifier and Type | Method and Description |
---|---|
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.
|
appendToGroup, appendToGroup, appendToGroup, appendToGroup, findGroup, getConfiguration, getVisibleRootsSelectionProvider, modelChanged
getContext, setContext, updateActionBars
public static final String MERGE_ACTION_GROUP
public static final String OTHER_ACTION_GROUP
protected static final String MERGE_ALL_ACTION_ID
public ModelSynchronizeParticipantActionGroup()
public void initialize(ISynchronizePageConfiguration configuration)
SynchronizePageActionGroup
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.initialize
in class SynchronizePageActionGroup
configuration
- the configuration for the part to which the
contribution is associatedpublic void fillActionBars(IActionBars actionBars)
ActionGroup
The default implementation does nothing. Subclasses may override or extend this method.
fillActionBars
in class SynchronizePageActionGroup
actionBars
- the part's action barspublic void fillContextMenu(IMenuManager menu)
ActionGroup
ActionContext
.
The default implementation does nothing. Subclasses may override or extend this method.
fillContextMenu
in class SynchronizePageActionGroup
menu
- the context menu managerprotected void configureMergeAction(String mergeActionId, Action action)
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 idprotected void addToContextMenu(String mergeActionId, Action action, IMenuManager manager)
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 idmanager
- the context menu managerpublic void dispose()
SynchronizePageActionGroup
dispose
in class SynchronizePageActionGroup
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.