Eclipse Platform
Release 3.0

org.eclipse.team.ui.synchronize
Interface ISynchronizePageConfiguration


public interface ISynchronizePageConfiguration

Configures the model, actions and label decorations of an ISynchronizePage. Clients can:

This interface is not intended to be implemented by clients.

Since:
3.0

Field Summary
static int ALL_MODES
           
static int BOTH_MODE
           
static int CONFLICTING_MODE
           
static String[] DEFAULT_CONTEXT_MENU
          These are the default groups used for the context menu of a page.
static String[] DEFAULT_TOOLBAR_MENU
          These are the default groups used for the toolbar of a page.
static String[] DEFAULT_VIEW_MENU
          These are the default groups used for the dropdown view menu of a page.
static String EDIT_GROUP
          The id of the edit group that determines where the edit actions appear (e.g. move and delete).
static String FILE_GROUP
          The id of the file group that determines where the file actions appear.
static int INCOMING_MODE
          Modes are direction filters for the view
static String LAYOUT_GROUP
          The id of the layout group that determines whether the layout selection actions appear in the view dropdown or toolbar.
static String MODE_GROUP
          The id of the mode group that determines where the mode selection actions appear
static String NAVIGATE_GROUP
          The id of the navigate group that determines where the navigation actions appear
static int OUTGOING_MODE
           
static String P_COMPARISON_TYPE
          Property constant for the type of comparison used to create the SyncInfo in the P_SYNC_INFO_SET property.
static String P_CONTEXT_MENU
          The configuration property that defines the groups in the context menu of the page.
static String P_LABEL_DECORATORS
          Property constant for the list of label decorators (instance of ILabelDecorator[]) that will be applied to the text and image from the label provider.
static String P_MODE
          Property constant for the mode used to filter the visible elements of the model.
static String P_SUPPORTED_MODES
          Property constant which indicates which modes are to be available to the user.
static String P_SYNC_INFO_SET
          Property constant for the SyncInfoSet that is being displayed by the page.
static String P_TOOLBAR_MENU
          Property constant that defines the groups in the toolbar menu of the page.
static String P_VIEW_MENU
          Property constant that defines the groups in the dropdown view menu of the page.
static String PREFERENCES_GROUP
          The id of the preferences group that determines whether the preferences actions appear in the view dropdown.
static String SYNCHRONIZE_GROUP
          The id of the synchronize group the determines where the synchronize actions appear.
static String THREE_WAY
           
static String TWO_WAY
          Comparison type contstants
 
Method Summary
 void addActionContribution(SynchronizePageActionGroup group)
          Register the action group with the configuration.
 void addLabelDecorator(ILabelDecorator decorator)
          Add a label decorator to the page configuration.
 void addMenuGroup(String menuPropertyId, String groupId)
          Adds a menu group of the gievn id to the end of the menu groups list for the given menu property id.
 void addPropertyChangeListener(IPropertyChangeListener listener)
          Add a property change listener to the configuration.
 String getComparisonType()
          Return the comparison type used by the page's SyncInfo modes.
 int getMode()
          Return the value of the P_MODE property of this configuration.
 ISynchronizePage getPage()
          Return the page created from and associated with this configuration.
 ISynchronizeParticipant getParticipant()
          Return the particpant associated with the page to shich this configuration is associated.
 Object getProperty(String key)
          Returns the property with the given name, or null if no such property exists.
 IRunnableContext getRunnableContext()
          Return the runnable context.
 ISynchronizePageSite getSite()
          Return the site which provieds access to certain workbench services.
 int getSupportedModes()
          Return the value of the P_SUPPORTED_MODES property of this configuration.
 SyncInfoSet getSyncInfoSet()
          Return the set associated with the P_SYNC_INFO_SET property or null if the property is not set.
 boolean hasMenuGroup(String menuPropertyId, String groupId)
          Returns whether the given group appears in the given menu
 void removeActionContribution(SynchronizePageActionGroup group)
          Remove a previously registered action group.
 void removePropertyChangeListener(IPropertyChangeListener listener)
          Remove the registered change listener.
 void setComparisonType(String type)
          Set the comparison type used by the page's SyncInfo modes.
 void setMenuGroups(String menuPropertyId, String[] groups)
          Set the groups that are to be added to the menu identified by the menu property id.
 void setMode(int mode)
          Set the P_MODE property of this configuration to the given mode flag (one of INCOMING_MODE, OUTGOING_MODE, BOTH_MODE or CONFLICTING_MODE).
 void setPage(ISynchronizePage page)
          Set the page for this configuration.
 void setProperty(String key, Object newValue)
          Sets the property with the given name.
 void setRunnableContext(IRunnableContext context)
          Sets the runnable context that can be used by the page's actions to display progress.
 void setSupportedModes(int modes)
          Set the P_SUPPORTED_MODES property of this configuration to the ORed combination of one or more mode flags (INCOMING_MODE, OUTGOING_MODE, BOTH_MODE and CONFLICTING_MODE).
 

Field Detail

P_SYNC_INFO_SET

public static final String P_SYNC_INFO_SET
Property constant for the SyncInfoSet that is being displayed by the page.

See Also:
Constant Field Values

P_LABEL_DECORATORS

public static final String P_LABEL_DECORATORS
Property constant for the list of label decorators (instance of ILabelDecorator[]) that will be applied to the text and image from the label provider.

See Also:
Constant Field Values

P_TOOLBAR_MENU

public 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 to null, the DEFAULT_TOOLBAR_MENU is used. Also, the groups mentioned in the DEFAULT_TOOLBAR_MENU can be removed but will always appear in the same order if included.

See Also:
Constant Field Values

P_CONTEXT_MENU

public 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

public static final String P_VIEW_MENU
Property constant that defines the groups in the dropdown view menu of the page. The value for this property should be a string array. If this property is set to null, the DEFAULT_VIEW_MENU is used. Also, the groups mentioned in the DEFAULT_VIEW_MENU can be removed but will always appear in the same order if included.

See Also:
Constant Field Values

P_COMPARISON_TYPE

public static final String P_COMPARISON_TYPE
Property constant for the type of comparison used to create the SyncInfo in the P_SYNC_INFO_SET property. If the comparison type is THREE_WAY then modes selection applies.

See Also:
Constant Field Values

P_MODE

public 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

public 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. Either null or 0 can be used to indicate that mode filtering is not supported.

See Also:
Constant Field Values

SYNCHRONIZE_GROUP

public 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

public static final String NAVIGATE_GROUP
The id of the navigate group that determines where the navigation actions appear

See Also:
Constant Field Values

MODE_GROUP

public 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

public 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

public 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

public static final String PREFERENCES_GROUP
The id of the preferences group that determines whether the preferences actions appear in the view dropdown.

See Also:
Constant Field Values

LAYOUT_GROUP

public static final String LAYOUT_GROUP
The id of the layout group that determines whether the layout selection actions appear in the view dropdown or toolbar.

See Also:
Constant Field Values

DEFAULT_CONTEXT_MENU

public 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

public 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 the P_TOOLBAR_MENU property 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

public static final String[] DEFAULT_VIEW_MENU
These are the default groups used for the dropdown 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 the P_VIEW_MENU property 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

public static final String TWO_WAY
Comparison type contstants

See Also:
Constant Field Values

THREE_WAY

public static final String THREE_WAY
See Also:
Constant Field Values

INCOMING_MODE

public static final int INCOMING_MODE
Modes are direction filters for the view

See Also:
Constant Field Values

OUTGOING_MODE

public static final int OUTGOING_MODE
See Also:
Constant Field Values

BOTH_MODE

public static final int BOTH_MODE
See Also:
Constant Field Values

CONFLICTING_MODE

public static final int CONFLICTING_MODE
See Also:
Constant Field Values

ALL_MODES

public static final int ALL_MODES
See Also:
Constant Field Values
Method Detail

getParticipant

public ISynchronizeParticipant getParticipant()
Return the particpant associated with the page to shich this configuration is associated.

Returns:
the particpant

getSite

public ISynchronizePageSite getSite()
Return the site which provieds access to certain workbench services.

Returns:
the page site

getPage

public ISynchronizePage getPage()
Return the page created from and associated with this configuration.

Returns:
Returns the page for this configuration

setPage

public void setPage(ISynchronizePage page)
Set the page for this configuration. This methpd should only be called once by the ISynchronzeParticipant that created the page.

Parameters:
page - the configuration's page

addPropertyChangeListener

public 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

public void removePropertyChangeListener(IPropertyChangeListener listener)
Remove the registered change listener. Removing an unregistered listener has no effects.

Parameters:
listener - a property change listener

setProperty

public void setProperty(String key,
                        Object newValue)
Sets the property with the given name. If the new value differs from the old a PropertyChangeEvent is sent to registered listeners.


getProperty

public Object getProperty(String key)
Returns the property with the given name, or null if no such property exists.

Returns:
the property with the given name, or null if not found

addActionContribution

public void addActionContribution(SynchronizePageActionGroup group)
Register the action group with the configuration. The registered action groups will have the oportunity 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

public 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

public void addLabelDecorator(ILabelDecorator decorator)
Add a label decorator to the page configuration.

Parameters:
decorator - a label decorator

setMenuGroups

public 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 of P_CONTEXT_MENU, P_VIEW_MENU or P_TOOLBAR_MENU)
groups - a array of groups Ids

addMenuGroup

public void addMenuGroup(String menuPropertyId,
                         String groupId)
Adds a menu group of the gievn id to the end of the menu groups list for the given menu property id.

Parameters:
menuPropertyId - the menu property id (one of P_CONTEXT_MENU, P_VIEW_MENU or P_TOOLBAR_MENU)
groupId - the id of the group to be added to the end of the menu group list

hasMenuGroup

public boolean hasMenuGroup(String menuPropertyId,
                            String groupId)
Returns whether the given group appears in the given menu

Parameters:
menuPropertyId - the property id that identifies the menu
groupId - the id of the group
Returns:
true if the group identified by the groupId appears in the menu identified by the menuPropertyId and false otherwise

getMode

public int getMode()
Return the value of the P_MODE property of this configuration.

Returns:
the mode property value

setMode

public void setMode(int mode)
Set the P_MODE property of this configuration to the given mode flag (one of INCOMING_MODE, OUTGOING_MODE, BOTH_MODE or CONFLICTING_MODE).

Parameters:
mode - the mode value

getSupportedModes

public int getSupportedModes()
Return the value of the P_SUPPORTED_MODES property of this configuration.

Returns:
the supported modes property value

setSupportedModes

public void setSupportedModes(int modes)
Set the P_SUPPORTED_MODES property of this configuration to the ORed combination of one or more mode flags (INCOMING_MODE, OUTGOING_MODE, BOTH_MODE and CONFLICTING_MODE).

Parameters:
modes - the supported modes

getSyncInfoSet

public SyncInfoSet getSyncInfoSet()
Return the set associated with the P_SYNC_INFO_SET property or null if the property is not set.

Returns:
the set associated with the P_SYNC_INFO_SET property or null if the property is not set

getComparisonType

public String getComparisonType()
Return the comparison type used by the page's SyncInfo modes.

Returns:
comparison type (could be TWO_WAY, THREE_WAY or a cusom type).

setComparisonType

public void setComparisonType(String type)
Set the comparison type used by the page's SyncInfo modes. The default type is THREE_WAY.

Parameters:
type - the comparison type (could be TWO_WAY, THREE_WAY or a cusom type).

setRunnableContext

public 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

public IRunnableContext getRunnableContext()
Return the runnable context. If null is 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)

Eclipse Platform
Release 3.0

Guidelines for using Eclipse APIs.

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