[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-vcm-dev] Synchronize View API
|
Hi,
The latest integration build (I20031104) contains APIs for integrating
into the Synchronize View. The best way to get familiar with the API is to
browse the javadoc and extension point documentation. The CVS plug-in has
been ported to use the new API and is a good example of how to integrate.
Go get you started, I've included the package specification documentation:
Cheers,
Jean-Michel
====
The Eclipse Team UI plug-in provides a set of classes and interfaces to
support a generic synchronize view that can show multiple synchronize
participants. This package contains a generic abstract synchronize
participant that provides the common functionality for synchronize
participants. The basic model for the Synchronize View APIs is the
following:
- A ISynchronizeManager manages registered synchronize participants. There
can be several instances of the same participant type.
- A ISynchronizeParticipant is a logical representation of a connection
between workspace resources and a remote location used to shared those
resources.
- A ISynchronizeView is a page book view of participants.
- A ISynchronizeParticipant must create a page that will be displayed in
the ISynchronizeView page book view.
- The ISynchronizeView shows a drop-down of all registered participants
and allows switching between them.
- A ISynchronizeParticipant can contribute actions to the toolbar, menus,
and view menu.
Synchronize participants are declared by extending the
synchronizeParticipants extension point. There are two classes of
synchronize participants: static participants will be created when the
synchronize view is created, and dynamic participants that are created by
user code at some other time. A synchronize manager (ISynchronizeManager)
manages all active synchronize participants, and provides notification of
participants which are added and removed. Participants are displayed in a
page book view. Each participant implementation is reponsible for creating
its page (IPageBookView), which provides freedom of presentation to the
synchronize view implementation. A single participant may be displayed
simultaneously in multiple synchronize views, and in different workbench
windows.
The class TeamSubscriberParticipant provides an implementation of a
synchronize participant that enables synchronization for a TeamSubscriber.
For providers that implement a TeamSubscriber, this is the easiest method
of integrating into the Synchronize View. The TeamSubscriberParticipant
provides a view of changes (incoming, outgoing, conflicting), modes for
showing only a subset of the changes, decorations for identifying the
changes, and working sets. Here are the steps for creating a participant
based on the TeamSubscriberParticipant implementation:
- Implement a concrete subclass of TeamSubscriber that will provide the
physical connection between the workspace resources and the remote
location that is used to share the resources.
- Subclass TeamSubscriberParticipant and provide concrete implementations
for init(QualifiedName), saveState(), and optionally createPage().
To add actions to the context menu of the participant page you must create
a viewerContribution in your plugin.xml with the targetID field equal to
that of the qualifier part of the participant's type id. For example:
<viewerContribution id="org.eclipse.myteamplugin.syncparticipant.actions"
targetID="org.eclipse.myteamplugin.syncparticipant"
- To add participant specific actions to the view's action bar, subclass
TeamSubscriberParticipantPage and implement setActionBars().
- To add participant specific decorations to the viewer, subclass
TeamSubscriberParticipantPage and implement getLabelProvider().