Eclipse Platform v3.1

org.eclipse.team.internal.ccvs.ui.subscriber
Class MergeSynchronizeParticipant

java.lang.Object
  extended by org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant
      extended by org.eclipse.team.ui.synchronize.SubscriberParticipant
          extended by org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipant
              extended by org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant
All Implemented Interfaces:
EventListener, IExecutableExtension, IPropertyChangeListener, IChangeSetProvider, ISynchronizeParticipant

public class MergeSynchronizeParticipant
extends CVSParticipant


Nested Class Summary
 class MergeSynchronizeParticipant.MergeParticipantActionContribution
          Actions for the merge particpant's toolbar
 
Field Summary
static String CONTEXT_MENU_CONTRIBUTION_GROUP
           
static String NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP
           
static String TOOLBAR_CONTRIBUTION_GROUP
          The id of a workspace action group to which additions actions can be added.
 
Fields inherited from class org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant
configElement, P_PINNED
 
Constructor Summary
MergeSynchronizeParticipant()
           
MergeSynchronizeParticipant(CVSMergeSubscriber subscriber)
           
 
Method Summary
protected  CVSChangeSetCapability createChangeSetCapability()
          Create the change set capability for this particpant.
 void dispose()
          Disposes of this synchronize participant and is called to free the resources associated with a participant.
protected  CVSTag getEndTag()
           
protected  String getLongTaskName()
          Returns the long task name to describe the behavior of the refresh operation to the user.
static MergeSynchronizeParticipant getMatchingParticipant(IResource[] resources, CVSTag startTag, CVSTag endTag)
           
 String getName()
          Returns the name of this synchronize participant.
protected  String getShortTaskName()
          Returns the short task name (e.g.
protected  CVSTag getStartTag()
           
 void init(String secondayId, IMemento memento)
          Classes that are persisted must override this method and perform the following initialization.
protected  void initializeConfiguration(ISynchronizePageConfiguration configuration)
          This method is invoked after a page configuration is created but before it is returned by the createPageConfiguration method.
 void saveState(IMemento memento)
          Saves the participants object state within the memento.
 void setSubscriber(Subscriber subscriber)
          Subclasses must call this method to initialize the participant.
 
Methods inherited from class org.eclipse.team.internal.ccvs.ui.subscriber.CVSParticipant
addCVSPreferencePages, deriveBaseContentsFromLocal, getChangeSetCapability, getPreferencePages, getSyncInfo, isViewerContributionsSupported, prepareCompareInput, updateLabelsForCVS
 
Methods inherited from class org.eclipse.team.ui.synchronize.SubscriberParticipant
createPage, getLongTaskName, getMatchingParticipant, getRefreshSchedule, getResources, getScope, getShortName, getSubscriber, getSubscriberSyncInfoCollector, getSyncInfoSet, propertyChange, refresh, refreshInDialog, refreshNow, reset, run, setRefreshSchedule, setSyncInfoFilter, validateConfiguration
 
Methods inherited from class org.eclipse.team.ui.synchronize.AbstractSynchronizeParticipant
addPropertyChangeListener, createPageConfiguration, doesSupportSynchronize, equals, firePropertyChange, getId, getImageDescriptor, getSecondaryId, hashCode, isPinned, pinned, removePropertyChangeListener, setImageDescriptor, setInitializationData, setInitializationData, setName, setPinned, setSecondaryId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOOLBAR_CONTRIBUTION_GROUP

public static final String TOOLBAR_CONTRIBUTION_GROUP
The id of a workspace action group to which additions actions can be added.

See Also:
Constant Field Values

CONTEXT_MENU_CONTRIBUTION_GROUP

public static final String CONTEXT_MENU_CONTRIBUTION_GROUP
See Also:
Constant Field Values

NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP

public static final String NON_MODAL_CONTEXT_MENU_CONTRIBUTION_GROUP
See Also:
Constant Field Values
Constructor Detail

MergeSynchronizeParticipant

public MergeSynchronizeParticipant()

MergeSynchronizeParticipant

public MergeSynchronizeParticipant(CVSMergeSubscriber subscriber)
Method Detail

setSubscriber

public void setSubscriber(Subscriber subscriber)
Description copied from class: SubscriberParticipant
Subclasses must call this method to initialize the participant. Typically this method is called in SubscriberParticipant.init(String, IMemento). This method will initialize the sync info collector.

Overrides:
setSubscriber in class SubscriberParticipant
Parameters:
subscriber - the subscriber to associate with this participant.

init

public void init(String secondayId,
                 IMemento memento)
          throws PartInitException
Description copied from class: AbstractSynchronizeParticipant
Classes that are persisted must override this method and perform the following initialization.
                super.init(secondaryId, memento);
                try {
                        ISynchronizeParticipantDescriptor descriptor = TeamUI.getSynchronizeManager().getParticipantDescriptor(PARTICIPANT_ID);
                        setInitializationData(descriptor);
                } catch (CoreException e) {
                        TeamUIPlugin.log(e);
                }
 
where PARTICIPANT_ID is the id of the particant as defined in the plugin manifest.

Specified by:
init in interface ISynchronizeParticipant
Overrides:
init in class SubscriberParticipant
Parameters:
secondayId - the secondayId of this participant instance or null if this participant doesn't support multiple instances.
memento - the participant state or null if there is no previous saved state
Throws:
PartInitException - if this participant was not initialized successfully
See Also:
ISynchronizeParticipant.init(String, org.eclipse.ui.IMemento)

saveState

public void saveState(IMemento memento)
Description copied from interface: ISynchronizeParticipant
Saves the participants object state within the memento. This state will be available when the participant is restored via init.

This method can be called multiple times during the lifetime of the participant object.

Specified by:
saveState in interface ISynchronizeParticipant
Overrides:
saveState in class SubscriberParticipant
Parameters:
memento - a memento to receive the object state

dispose

public void dispose()
Description copied from interface: ISynchronizeParticipant
Disposes of this synchronize participant and is called to free the resources associated with a participant. When a participant is added to the ISynchronizeManager this method is called when the manager is shutdown or the participant is removed from the manager.

Within this method a participant may release any resources, fonts, images, etc. held by this part. It is also very important to remove all listeners.

Clients should not call this method (the synchronize manager calls this method at appropriate times).

Specified by:
dispose in interface ISynchronizeParticipant
Overrides:
dispose in class SubscriberParticipant

getName

public String getName()
Description copied from interface: ISynchronizeParticipant
Returns the name of this synchronize participant. This name is displayed to the user.

Specified by:
getName in interface ISynchronizeParticipant
Overrides:
getName in class SubscriberParticipant
Returns:
the name of this synchronize participant

getStartTag

protected CVSTag getStartTag()

getEndTag

protected CVSTag getEndTag()

getMatchingParticipant

public static MergeSynchronizeParticipant getMatchingParticipant(IResource[] resources,
                                                                 CVSTag startTag,
                                                                 CVSTag endTag)

initializeConfiguration

protected void initializeConfiguration(ISynchronizePageConfiguration configuration)
Description copied from class: AbstractSynchronizeParticipant
This method is invoked after a page configuration is created but before it is returned by the createPageConfiguration method. Subclasses can implement this method to tailor the configuration in ways appropriate to the participant.

Overrides:
initializeConfiguration in class CVSParticipant
Parameters:
configuration - the newly create page configuration

getLongTaskName

protected String getLongTaskName()
Description copied from class: SubscriberParticipant
Returns the long task name to describe the behavior of the refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed in the background.

Overrides:
getLongTaskName in class SubscriberParticipant
Returns:
the long task name

getShortTaskName

protected String getShortTaskName()
Description copied from class: SubscriberParticipant
Returns the short task name (e.g. no more than 25 characters) to describe the behavior of the refresh operation to the user. This is typically shown in the status line when this subscriber is refreshed in the background. When refreshed in the foreground, only the long task name is shown.

Overrides:
getShortTaskName in class SubscriberParticipant
Returns:
the short task name to show in the status line.

createChangeSetCapability

protected CVSChangeSetCapability createChangeSetCapability()
Description copied from class: CVSParticipant
Create the change set capability for this particpant.

Overrides:
createChangeSetCapability in class CVSParticipant
Returns:
the created capability

Eclipse Platform v3.1