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
-
public class ModelSynchronizeParticipantActionGroup
- extends
SynchronizePageActionGroup
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
|
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. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
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
ModelSynchronizeParticipantActionGroup
public ModelSynchronizeParticipantActionGroup()
- Create a merge action group.
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
-
-
Parameters:
-
actionBars
- the part's action bars
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
-
-
Parameters:
-
menu
- the context menu manager
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
-
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.