Package org.eclipse.team.ui.synchronize
Interface ISynchronizePageConfiguration
-
public interface ISynchronizePageConfigurationConfigures the model, actions and label decorations of anISynchronizePage. Clients can:- set properties to affect the page contents and react to property changes
- add and configure the actions available to the user (context menu, toolbar and view menu)
- Since:
- 3.0
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static intALL_MODESstatic intBOTH_MODEstatic intCONFLICTING_MODEstatic String[]DEFAULT_CONTEXT_MENUThese are the default groups used for the context menu of a page.static String[]DEFAULT_TOOLBAR_MENUThese are the default groups used for the toolbar of a page.static String[]DEFAULT_VIEW_MENUThese are the default groups used for the drop-down view menu of a page.static StringEDIT_GROUPThe id of the edit group that determines where the edit actions appear (e.g. move and delete).static StringFILE_GROUPThe id of the file group that determines where the file actions appear.static intINCOMING_MODEModes are direction filters for the viewstatic StringLAYOUT_GROUPThe id of the layout group that determines whether the layout selection actions appear in the view drop-down or toolbar.static StringMODE_GROUPThe id of the mode group that determines where the mode selection actions appearstatic StringNAVIGATE_GROUPThe id of the navigate group that determines where the navigation actions appearstatic StringOBJECT_CONTRIBUTIONS_GROUPThe id of the group that determines where workbench object contributions should appear.static intOUTGOING_MODEstatic StringP_COMPARISON_TYPEProperty constant for the type of comparison used to create theSyncInfoin the P_SYNC_INFO_SET property.static StringP_CONTEXT_MENUThe configuration property that defines the groups in the context menu of the page.static StringP_LABEL_DECORATORSProperty constant for the list of label decorators (instance ofILabelDecorator[]) that will be applied to the text and image from the label provider.static StringP_MODEProperty constant for the mode used to filter the visible elements of the model.static StringP_OBJECT_CONTRIBUTION_IDThe configuration property that defines the filter id that determines which object contribution actions appear in the context menu for the page.static StringP_PAGE_DESCRIPTIONProperty constant for the description (String) of the page that appears as the description of the view when the page is active.static StringP_SUPPORTED_MODESProperty constant which indicates which modes are to be available to the user.static StringP_SYNC_INFO_SETProperty constant for theSyncInfoSetthat is being displayed by the page.static StringP_TOOLBAR_MENUProperty constant that defines the groups in the toolbar menu of the page.static StringP_VIEW_MENUProperty constant that defines the groups in the drop-down view menu of the page.static StringP_VIEWER_IDProperty constant for the id of the viewer to be used for this page.static StringPREFERENCES_GROUPThe id of the preferences group that determines whether the preferences actions appear in the view drop-down.static StringSORT_GROUPThe id of the sort group that determines where sort actions or submenus appear.static StringSYNCHRONIZE_GROUPThe id of the synchronize group the determines where the synchronize actions appear.static StringTHREE_WAYstatic StringTWO_WAYComparison type constants
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddActionContribution(SynchronizePageActionGroup group)Register the action group with the configuration.voidaddLabelDecorator(ILabelDecorator decorator)Add a label decorator to the page configuration.voidaddMenuGroup(String menuPropertyId, String groupId)Adds a menu group of the given id to the end of the menu groups list for the given menu property id.voidaddPropertyChangeListener(IPropertyChangeListener listener)Add a property change listener to the configuration.StringgetComparisonType()Return the comparison type used by the page'sSyncInfomodes.intgetMode()Return the value of the P_MODE property of this configuration.ISynchronizePagegetPage()Return the page created from and associated with this configuration.ISynchronizeParticipantgetParticipant()Return the participant associated with this configuration.ObjectgetProperty(String key)Returns the property with the given name, ornullif no such property exists.IRunnableContextgetRunnableContext()Return the runnable context.ISynchronizePageSitegetSite()Return the site which provides access to certain workbench services.intgetSupportedModes()Return the value of the P_SUPPORTED_MODES property of this configuration.SyncInfoSetgetSyncInfoSet()Return the set associated with the P_SYNC_INFO_SET property ornullif the property is not set.StringgetViewerId()Return the id of the viewer to which this configuration is associated.booleanhasMenuGroup(String menuPropertyId, String groupId)Returns whether the given group appears in the given menuvoidremoveActionContribution(SynchronizePageActionGroup group)Remove a previously registered action group.voidremovePropertyChangeListener(IPropertyChangeListener listener)Remove the registered change listener.voidsetComparisonType(String type)Set the comparison type used by the page'sSyncInfomodes.voidsetMenuGroups(String menuPropertyId, String[] groups)Set the groups that are to be added to the menu identified by the menu property id.voidsetMode(int mode)Set the P_MODE property of this configuration to the given mode flag (one ofINCOMING_MODE,OUTGOING_MODE,BOTH_MODEorCONFLICTING_MODE).voidsetPage(ISynchronizePage page)Set the page for this configuration.voidsetProperty(String key, Object newValue)Sets the property with the given name.voidsetRunnableContext(IRunnableContext context)Sets the runnable context that can be used by the page's actions to display progress.voidsetSupportedModes(int modes)Set the P_SUPPORTED_MODES property of this configuration to the given combination of one or more mode flags (INCOMING_MODE,OUTGOING_MODE,BOTH_MODEandCONFLICTING_MODE).
-
-
-
Field Detail
-
P_SYNC_INFO_SET
static final String P_SYNC_INFO_SET
Property constant for theSyncInfoSetthat is being displayed by the page. Some pages may not be displaying the contents of aSyncInfoSetin which case the value associated with this property will benull.- See Also:
- Constant Field Values
-
P_LABEL_DECORATORS
static final String P_LABEL_DECORATORS
Property constant for the list of label decorators (instance ofILabelDecorator[]) that will be applied to the text and image from the label provider.- See Also:
- Constant Field Values
-
P_TOOLBAR_MENU
static final String P_TOOLBAR_MENU
Property constant that defines the groups in the toolbar menu of the page. The value for this property should be a string array. If this property is set tonull, theDEFAULT_TOOLBAR_MENUis used. Also, the groups mentioned in theDEFAULT_TOOLBAR_MENUcan be removed but will always appear in the same order if included.- See Also:
- Constant Field Values
-
P_CONTEXT_MENU
static final String P_CONTEXT_MENU
The configuration property that defines the groups in the context menu of the page. The value for this property should be a string array.- See Also:
- Constant Field Values
-
P_VIEW_MENU
static final String P_VIEW_MENU
Property constant that defines the groups in the drop-down view menu of the page. The value for this property should be a string array. If this property is set tonull, theDEFAULT_VIEW_MENUis used. Also, the groups mentioned in theDEFAULT_VIEW_MENUcan be removed but will always appear in the same order if included.- See Also:
- Constant Field Values
-
P_OBJECT_CONTRIBUTION_ID
static final String P_OBJECT_CONTRIBUTION_ID
The configuration property that defines the filter id that determines which object contribution actions appear in the context menu for the page. This defaults to the id of the participant but can be set to another id ornull- Since:
- 3.1
- See Also:
- Constant Field Values
-
P_COMPARISON_TYPE
static final String P_COMPARISON_TYPE
Property constant for the type of comparison used to create theSyncInfoin the P_SYNC_INFO_SET property. If the comparison type isTHREE_WAYthen modes selection applies.- See Also:
- Constant Field Values
-
P_MODE
static final String P_MODE
Property constant for the mode used to filter the visible elements of the model. The value can be one of the mode integer constants.- See Also:
- Constant Field Values
-
P_SUPPORTED_MODES
static final String P_SUPPORTED_MODES
Property constant which indicates which modes are to be available to the user. The value is to be an integer that combines one or more of the mode bit values. Eithernullor0can be used to indicate that mode filtering is not supported.- See Also:
- Constant Field Values
-
P_VIEWER_ID
static final String P_VIEWER_ID
Property constant for the id of the viewer to be used for this page. The viewer id corresponds to the viewer definition in the Common Navigator framework.- Since:
- 3.2
- See Also:
- Constant Field Values
-
P_PAGE_DESCRIPTION
static final String P_PAGE_DESCRIPTION
Property constant for the description (String) of the page that appears as the description of the view when the page is active.- Since:
- 3.2
- See Also:
- Constant Field Values
-
SYNCHRONIZE_GROUP
static final String SYNCHRONIZE_GROUP
The id of the synchronize group the determines where the synchronize actions appear.- See Also:
- Constant Field Values
-
NAVIGATE_GROUP
static final String NAVIGATE_GROUP
The id of the navigate group that determines where the navigation actions appear- See Also:
- Constant Field Values
-
SORT_GROUP
static final String SORT_GROUP
The id of the sort group that determines where sort actions or submenus appear.- Since:
- 3.1
- See Also:
- Constant Field Values
-
MODE_GROUP
static final String MODE_GROUP
The id of the mode group that determines where the mode selection actions appear- See Also:
- Constant Field Values
-
FILE_GROUP
static final String FILE_GROUP
The id of the file group that determines where the file actions appear. File actions include the open actions.- See Also:
- Constant Field Values
-
EDIT_GROUP
static final String EDIT_GROUP
The id of the edit group that determines where the edit actions appear (e.g. move and delete).- See Also:
- Constant Field Values
-
PREFERENCES_GROUP
static final String PREFERENCES_GROUP
The id of the preferences group that determines whether the preferences actions appear in the view drop-down.- See Also:
- Constant Field Values
-
OBJECT_CONTRIBUTIONS_GROUP
static final String OBJECT_CONTRIBUTIONS_GROUP
The id of the group that determines where workbench object contributions should appear. This group will only be used if there is an OBJECT_CONTRIBUTION_ID set in the configuration- Since:
- 3.1
- See Also:
- Constant Field Values
-
LAYOUT_GROUP
static final String LAYOUT_GROUP
The id of the layout group that determines whether the layout selection actions appear in the view drop-down or toolbar.- See Also:
- Constant Field Values
-
DEFAULT_CONTEXT_MENU
static final String[] DEFAULT_CONTEXT_MENU
These are the default groups used for the context menu of a page. Clients can remove, add and change the ordering for groups in the context menu.
-
DEFAULT_TOOLBAR_MENU
static final String[] DEFAULT_TOOLBAR_MENU
These are the default groups used for the toolbar of a page. These groups will always appear in this order in the toolbar. Clients can disable one or more of these groups by setting theP_TOOLBAR_MENUproperty to an array that contains a subset of these. Clients can also add groups by adding new unique group ids to the array. Added groups will appear in the order specified but after the default groups.
-
DEFAULT_VIEW_MENU
static final String[] DEFAULT_VIEW_MENU
These are the default groups used for the drop-down view menu of a page. These groups will always appear in this order in the view menu. Clients can disable one or more of these groups by setting theP_VIEW_MENUproperty to an array that contains a subset of these. Clients can also add groups by adding new unique group ids to the array. Added groups will appear in the order specified but after the default groups.
-
TWO_WAY
static final String TWO_WAY
Comparison type constants- See Also:
- Constant Field Values
-
THREE_WAY
static final String THREE_WAY
- See Also:
- Constant Field Values
-
INCOMING_MODE
static final int INCOMING_MODE
Modes are direction filters for the view- See Also:
- Constant Field Values
-
OUTGOING_MODE
static final int OUTGOING_MODE
- See Also:
- Constant Field Values
-
BOTH_MODE
static final int BOTH_MODE
- See Also:
- Constant Field Values
-
CONFLICTING_MODE
static final int CONFLICTING_MODE
- See Also:
- Constant Field Values
-
ALL_MODES
static final int ALL_MODES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getParticipant
ISynchronizeParticipant getParticipant()
Return the participant associated with this configuration.- Returns:
- the participant
-
getSite
ISynchronizePageSite getSite()
Return the site which provides access to certain workbench services.- Returns:
- the page site
-
getPage
ISynchronizePage getPage()
Return the page created from and associated with this configuration.- Returns:
- Returns the page for this configuration
-
setPage
void setPage(ISynchronizePage page)
Set the page for this configuration. This method should only be called once by theISynchronizeParticipantthat created the page.- Parameters:
page- the configuration's page
-
addPropertyChangeListener
void addPropertyChangeListener(IPropertyChangeListener listener)
Add a property change listener to the configuration. Registered listeners will receive notification when any property changes.- Parameters:
listener- a property change listener
-
removePropertyChangeListener
void removePropertyChangeListener(IPropertyChangeListener listener)
Remove the registered change listener. Removing an unregistered listener has no effects.- Parameters:
listener- a property change listener
-
setProperty
void setProperty(String key, Object newValue)
Sets the property with the given name. If the new value differs from the old aPropertyChangeEventis sent to registered listeners.- Parameters:
key- the name of the property to setnewValue- the new value of the property
-
getProperty
Object getProperty(String key)
Returns the property with the given name, ornullif no such property exists.- Parameters:
key- the name of the property to retrieve- Returns:
- the property with the given name, or
nullif not found
-
addActionContribution
void addActionContribution(SynchronizePageActionGroup group)
Register the action group with the configuration. The registered action groups will have the opportunity to add actions to the action bars and context menu of the synchronize page created using the configuration.- Parameters:
group- a synchronize page action group
-
removeActionContribution
void removeActionContribution(SynchronizePageActionGroup group)
Remove a previously registered action group. Removing a group that is not registered has no effect.- Parameters:
group- a synchronize page action group
-
addLabelDecorator
void addLabelDecorator(ILabelDecorator decorator)
Add a label decorator to the page configuration.- Parameters:
decorator- a label decorator
-
setMenuGroups
void setMenuGroups(String menuPropertyId, String[] groups)
Set the groups that are to be added to the menu identified by the menu property id.- Parameters:
menuPropertyId- the menu property id (one ofP_CONTEXT_MENU,P_VIEW_MENUorP_TOOLBAR_MENU)groups- a array of groups Ids
-
addMenuGroup
void addMenuGroup(String menuPropertyId, String groupId)
Adds a menu group of the given id to the end of the menu groups list for the given menu property id.- Parameters:
menuPropertyId- the menu property id (one ofP_CONTEXT_MENU,P_VIEW_MENUorP_TOOLBAR_MENU)groupId- the id of the group to be added to the end of the menu group list
-
hasMenuGroup
boolean hasMenuGroup(String menuPropertyId, String groupId)
Returns whether the given group appears in the given menu- Parameters:
menuPropertyId- the property id that identifies the menugroupId- the id of the group- Returns:
trueif the group identified by the groupId appears in the menu identified by the menuPropertyId andfalseotherwise
-
getMode
int getMode()
Return the value of the P_MODE property of this configuration.- Returns:
- the mode property value
-
setMode
void setMode(int mode)
Set the P_MODE property of this configuration to the given mode flag (one ofINCOMING_MODE,OUTGOING_MODE,BOTH_MODEorCONFLICTING_MODE).- Parameters:
mode- the mode value
-
getSupportedModes
int getSupportedModes()
Return the value of the P_SUPPORTED_MODES property of this configuration.- Returns:
- the supported modes property value
-
setSupportedModes
void setSupportedModes(int modes)
Set the P_SUPPORTED_MODES property of this configuration to the given combination of one or more mode flags (INCOMING_MODE,OUTGOING_MODE,BOTH_MODEandCONFLICTING_MODE).- Parameters:
modes- the supported modes
-
getSyncInfoSet
SyncInfoSet getSyncInfoSet()
Return the set associated with the P_SYNC_INFO_SET property ornullif the property is not set.- Returns:
- the set associated with the P_SYNC_INFO_SET property
or
nullif the property is not set
-
getComparisonType
String getComparisonType()
Return the comparison type used by the page'sSyncInfomodes.- Returns:
- comparison type (could be
TWO_WAY,THREE_WAYor a custom type).
-
setComparisonType
void setComparisonType(String type)
Set the comparison type used by the page'sSyncInfomodes. The default type isTHREE_WAY.- Parameters:
type- the comparison type (could beTWO_WAY,THREE_WAYor a custom type).
-
setRunnableContext
void setRunnableContext(IRunnableContext context)
Sets the runnable context that can be used by the page's actions to display progress.- Parameters:
context- a runnable context (or null)
-
getRunnableContext
IRunnableContext getRunnableContext()
Return the runnable context. Ifnullis returned, actions can use their own method of progress feedback either using a background job or the progress service- Returns:
- a runnable context (or
null)
-
getViewerId
String getViewerId()
Return the id of the viewer to which this configuration is associated.- Returns:
- the id of the viewer to which this configuration is associated
- Since:
- 3.2
-
-