diff options
author | Jean Michel-Lemieux | 2003-10-28 15:35:07 +0000 |
---|---|---|
committer | Jean Michel-Lemieux | 2003-10-28 15:35:07 +0000 |
commit | e4944d7f4adc998add8c53062cfebc550c6b3038 (patch) | |
tree | c92bdaf9958e66430c41725abd26d769720c9a01 | |
parent | b8eb4be3f115624ca3b633e1a5fc56f907a58b97 (diff) | |
download | eclipse.platform.team-e4944d7f4adc998add8c53062cfebc550c6b3038.tar.gz eclipse.platform.team-e4944d7f4adc998add8c53062cfebc550c6b3038.tar.xz eclipse.platform.team-e4944d7f4adc998add8c53062cfebc550c6b3038.zip |
*** empty log message ***
12 files changed, 266 insertions, 110 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties index aa23fa7fb..b7c529907 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/messages.properties @@ -321,7 +321,7 @@ CVSMergeSubscriber.22=Error restoring merge subscriber {0}: There are no existin CVSProviderPlugin.20=CVS Workspace CVSProviderPlugin.21=Synchronizes the CVS managed resources in your workspace with their associated remote location CVSSyncTreeSubscriber.0={0} is not a valid comparison criteria for subscriber {1} -CVSRevisionNumberCompareCriteria.1=Revision number comparison +CVSRevisionNumberCompareCriteria.1=Comparing revision numbers RemoteTagSynchronizer.0=Refreshing {0} ReentrantLock.9=An error occurred writting CVS synchronization information to disk. Some information may be lost. CRLFDetectInputStream.0=CVS file {0} either contains invalid line endings on the server (CR/LF instead of just LF) or is a binary file that is not marked as -kb. diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java index 7729181fe..537da6557 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java @@ -213,7 +213,7 @@ public class TeamUIPlugin extends AbstractUIPlugin implements IPropertyChangeLis // start once the platform has started and stabilized refreshJob.schedule(20000 /* 20 seconds */); } - ((SynchronizeManager)TeamUI.getSynchronizeManager()).restoreParticipants(); + ((SynchronizeManager)TeamUI.getSynchronizeManager()).initialize(); } /* (non-Javadoc) diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties index 114054392..65b95c33b 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties @@ -449,3 +449,8 @@ PasteAction.toolTip=Paste RefactorActionGroup.0=Edi&t SubscriberEventHandler.2=Calculating state for {0}. SynchronizeManager.7=Error notifying of added/removal of synchronize participants +SynchronizeManager.8=Error initializing participants +SynchronizeManager.9=Synchronize participant with id {0} is not in the registry +SynchronizeManager.10=Error saving synchronize participants +SynchronizeView.1=Synchronize View +SynchronizeView.2=Synchronize View - diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java new file mode 100644 index 000000000..97df12e55 --- /dev/null +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantDescriptor.java @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright (c) 2000, 2003 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.internal.ui.registry; + +import org.eclipse.core.runtime.*; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.internal.WorkbenchImages; +import org.eclipse.ui.internal.WorkbenchPlugin; + +public class SynchronizeParticipantDescriptor { + private QualifiedName id; + private ImageDescriptor imageDescriptor; + public static final String ATT_QUALIFIED_NAME = "qualified_name"; //$NON-NLS-1$ + public static final String ATT_LOCAL_NAME = "local_name"; //$NON-NLS-1$ + public static final String ATT_NAME = "name"; //$NON-NLS-1$ + public static final String ATT_ICON = "icon"; //$NON-NLS-1$ + public static final String ATT_CLASS = "class"; //$NON-NLS-1$ + private static final String ATT_TYPE = "type"; //$NON-NLS-1$ + + private static final String TYPE_STATIC = "static"; + + private String label; + private String className; + private String type; + private IConfigurationElement configElement; + private String description; + + /** + * Create a new ViewDescriptor for an extension. + */ + public SynchronizeParticipantDescriptor(IConfigurationElement e, String desc) throws CoreException { + configElement = e; + description = desc; + loadFromExtension(); + } + /** + * Return an instance of the declared view. + */ + public IViewPart createView() throws CoreException { + Object obj = WorkbenchPlugin.createExtension(configElement, ATT_CLASS); + return (IViewPart) obj; + } + + public IConfigurationElement getConfigurationElement() { + return configElement; + } + + /** + * Returns this view's description. This is the value of its <code>"description"</code> + * attribute. + * + * @return the description + */ + public String getDescription() { + return description; + } + + public QualifiedName getId() { + return id; + } + + public String getType() { + return type; + } + + public ImageDescriptor getImageDescriptor() { + if (imageDescriptor != null) + return imageDescriptor; + String iconName = configElement.getAttribute(ATT_ICON); + if (iconName == null) + return null; + imageDescriptor = WorkbenchImages.getImageDescriptorFromExtension(configElement.getDeclaringExtension(), iconName); + return imageDescriptor; + } + + public String getLabel() { + return label; + } + + public boolean isStatic() { + if(type == null) return true; + return type.equals(TYPE_STATIC); + } + + /** + * load a view descriptor from the registry. + */ + private void loadFromExtension() throws CoreException { + String qualified_name = configElement.getAttribute(ATT_QUALIFIED_NAME); + String local_name = configElement.getAttribute(ATT_LOCAL_NAME); + label = configElement.getAttribute(ATT_NAME); + className = configElement.getAttribute(ATT_CLASS); + type = configElement.getAttribute(ATT_TYPE); + + // Sanity check. + if ((label == null) || (className == null) || (local_name == null)) { + throw new CoreException(new Status(IStatus.ERROR, configElement.getDeclaringExtension().getDeclaringPluginDescriptor().getUniqueIdentifier(), 0, "Invalid extension (missing label or class name): " + id, //$NON-NLS-1$ + null)); + } + + id = new QualifiedName(qualified_name, local_name); + } + + /** + * Returns a string representation of this descriptor. For debugging + * purposes only. + */ + public String toString() { + return "Synchronize Participant(" + getId() + ")"; //$NON-NLS-2$//$NON-NLS-1$ + } +}
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java index 0edd98c80..e6ea9da04 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/SynchronizeParticipantRegistry.java @@ -32,9 +32,9 @@ public class SynchronizeParticipantRegistry extends RegistryReader { protected boolean readElement(IConfigurationElement element) { if (element.getName().equals(TAG_SYNCPARTICIPANT)) { String descText = getDescription(element); - SynchronizePartnerDescriptor desc; + SynchronizeParticipantDescriptor desc; try { - desc = new SynchronizePartnerDescriptor(element, descText); + desc = new SynchronizeParticipantDescriptor(element, descText); participants.put(desc.getId().getQualifier(), desc); } catch (CoreException e) { TeamUIPlugin.log(e); @@ -44,11 +44,11 @@ public class SynchronizeParticipantRegistry extends RegistryReader { return false; } - public SynchronizePartnerDescriptor[] getSynchronizeParticipants() { - return (SynchronizePartnerDescriptor[])participants.values().toArray(new SynchronizePartnerDescriptor[participants.size()]); + public SynchronizeParticipantDescriptor[] getSynchronizeParticipants() { + return (SynchronizeParticipantDescriptor[])participants.values().toArray(new SynchronizeParticipantDescriptor[participants.size()]); } - public SynchronizePartnerDescriptor find(String id) { - return (SynchronizePartnerDescriptor)participants.get(id); + public SynchronizeParticipantDescriptor find(String id) { + return (SynchronizeParticipantDescriptor)participants.get(id); } } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java index 8bec8dbd5..ec0eb4df7 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java @@ -10,31 +10,53 @@ *******************************************************************************/ package org.eclipse.team.internal.ui.synchronize; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; -import org.eclipse.core.runtime.*; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.ISafeRunnable; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.QualifiedName; +import org.eclipse.core.runtime.Status; import org.eclipse.jface.util.ListenerList; import org.eclipse.team.core.ISaveContext; import org.eclipse.team.core.TeamException; -import org.eclipse.team.internal.core.*; -import org.eclipse.team.internal.ui.*; +import org.eclipse.team.internal.core.SaveContext; +import org.eclipse.team.internal.core.SaveContextXMLWriter; +import org.eclipse.team.internal.ui.IPreferenceIds; import org.eclipse.team.internal.ui.Policy; +import org.eclipse.team.internal.ui.TeamUIPlugin; +import org.eclipse.team.internal.ui.Utils; +import org.eclipse.team.internal.ui.registry.SynchronizeParticipantDescriptor; import org.eclipse.team.internal.ui.registry.SynchronizeParticipantRegistry; -import org.eclipse.team.internal.ui.registry.SynchronizePartnerDescriptor; import org.eclipse.team.ui.ITeamUIConstants; -import org.eclipse.team.ui.synchronize.*; -import org.eclipse.ui.*; +import org.eclipse.team.ui.synchronize.ISynchronizeManager; +import org.eclipse.team.ui.synchronize.ISynchronizeParticipant; +import org.eclipse.team.ui.synchronize.ISynchronizeParticipantListener; +import org.eclipse.team.ui.synchronize.ISynchronizeView; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.WorkbenchException; /** * Manages the registered synchronize participants. It handles notification * of participant lifecycles, creation of <code>static</code> participants, * and the re-creation of persisted participants. * + * @see ISynchronizeView + * @see ISynchronizeParticipant * @since 3.0 */ public class SynchronizeManager implements ISynchronizeManager { /** - * Synchronize View page listeners + * Synchronize participants listeners */ private ListenerList fListeners = null; @@ -219,28 +241,40 @@ public class SynchronizeManager implements ISynchronizeManager { } /** - * + * Creates the participant registry and restore any saved participants. Will also instantiate + * any static participants. */ - public void restoreParticipants() throws PartInitException, TeamException, CoreException { - participantRegistry.readRegistry(Platform.getPluginRegistry(), TeamUIPlugin.ID, ITeamUIConstants.PT_SYNCPARTICIPANTS); - restoreSynchronizeParticipants(); - // Create any new participants that had previously not been added (e.g. new plugins being - // added. - SynchronizePartnerDescriptor[] desc = participantRegistry.getSynchronizeParticipants(); - List participants = new ArrayList(); - for (int i = 0; i < desc.length; i++) { - SynchronizePartnerDescriptor descriptor = desc[i]; - if(descriptor.isStatic() && ! synchronizeParticipants.containsKey(descriptor.getId())) { - participants.add(createParticipant(descriptor.getId(), descriptor)); + public void initialize() { + try { + // Initialize the participant registry + participantRegistry.readRegistry(Platform.getPluginRegistry(), TeamUIPlugin.ID, ITeamUIConstants.PT_SYNCPARTICIPANTS); + + // Instantiate and register any participants saved from a previous session + restoreSynchronizeParticipants(); + + // Instantiate and register any static participant that has not already been + // created. + SynchronizeParticipantDescriptor[] desc = participantRegistry.getSynchronizeParticipants(); + List participants = new ArrayList(); + for (int i = 0; i < desc.length; i++) { + SynchronizeParticipantDescriptor descriptor = desc[i]; + if(descriptor.isStatic() && ! synchronizeParticipants.containsKey(descriptor.getId())) { + participants.add(createParticipant(descriptor.getId(), descriptor)); + } + } + if(! participants.isEmpty()) { + addSynchronizeParticipants((ISynchronizeParticipant[]) participants.toArray(new ISynchronizeParticipant[participants.size()])); } - } - if(! participants.isEmpty()) { - addSynchronizeParticipants((ISynchronizeParticipant[]) participants.toArray(new ISynchronizeParticipant[participants.size()])); + } catch (CoreException e) { + TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.8"), e)); //$NON-NLS-1$ } } - private void restoreSynchronizeParticipants() throws TeamException, PartInitException, CoreException { - ISaveContext root = SaveContextXMLWriter.readXMLPluginMetaFile(TeamUIPlugin.getPlugin(), FILENAME); //$NON-NLS-1$ + /** + * Restores participants that have been saved between sessions. + */ + private void restoreSynchronizeParticipants() throws TeamException, CoreException { + ISaveContext root = SaveContextXMLWriter.readXMLPluginMetaFile(TeamUIPlugin.getPlugin(), FILENAME); if(root != null && root.getName().equals(CTX_PARTICIPANTS)) { List participants = new ArrayList(); ISaveContext[] contexts = root.getChildren(); @@ -249,10 +283,13 @@ public class SynchronizeManager implements ISynchronizeManager { if(context.getName().equals(CTX_PARTICIPANT)) { String qualified_name = context.getAttribute(CTX_QUALIFIED_NAME); String local_name = context.getAttribute(CTX_LOCAL_NAME); - SynchronizePartnerDescriptor desc = participantRegistry.find(qualified_name); + SynchronizeParticipantDescriptor desc = participantRegistry.find(qualified_name); + QualifiedName id = new QualifiedName(qualified_name, local_name); if(desc != null) { IConfigurationElement cfgElement = desc.getConfigurationElement(); - participants.add(createParticipant(new QualifiedName(qualified_name, local_name), desc)); + participants.add(createParticipant(id, desc)); + } else { + TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.9", id.toString()), null)); //$NON-NLS-1$ } } } @@ -262,13 +299,20 @@ public class SynchronizeManager implements ISynchronizeManager { } } - private ISynchronizeParticipant createParticipant(QualifiedName id, SynchronizePartnerDescriptor desc) throws CoreException, PartInitException { - ISynchronizeParticipant participant = (ISynchronizeParticipant)TeamUIPlugin.createExtension(desc.getConfigurationElement(), SynchronizePartnerDescriptor.ATT_CLASS); + /** + * Creates a participant instance with the given id from the participant description + */ + private ISynchronizeParticipant createParticipant(QualifiedName id, SynchronizeParticipantDescriptor desc) throws CoreException { + ISynchronizeParticipant participant = (ISynchronizeParticipant)TeamUIPlugin.createExtension(desc.getConfigurationElement(), SynchronizeParticipantDescriptor.ATT_CLASS); participant.setInitializationData(desc.getConfigurationElement(), id.toString(), id); participant.init(id); return participant; } - + + /** + * Saves a file containing the list of participant ids that are registered with this + * manager. Each participant is also given the chance to save it's state. + */ private void saveState() { ISaveContext root = new SaveContext(); root.setName(CTX_PARTICIPANTS); @@ -287,9 +331,9 @@ public class SynchronizeManager implements ISynchronizeManager { participant.saveState(); } root.setChildren((SaveContext[])children.toArray(new SaveContext[children.size()])); - SaveContextXMLWriter.writeXMLPluginMetaFile(TeamUIPlugin.getPlugin(), FILENAME, (SaveContext)root); //$NON-NLS-1$ + SaveContextXMLWriter.writeXMLPluginMetaFile(TeamUIPlugin.getPlugin(), FILENAME, (SaveContext)root); } catch (TeamException e) { - TeamPlugin.log(e); + TeamUIPlugin.log(new Status(IStatus.ERROR, TeamUIPlugin.ID, 1, Policy.bind("SynchronizeManager.10"), e)); //$NON-NLS-1$ } } }
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java index 91b593158..c5c2933cf 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java @@ -14,19 +14,17 @@ import java.util.HashMap; import java.util.Map; import org.eclipse.jface.action.IToolBarManager; -import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jface.viewers.IBasicPropertyConstants; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.team.internal.ui.synchronize.actions.*; +import org.eclipse.team.internal.ui.Policy; +import org.eclipse.team.internal.ui.synchronize.actions.SynchronizePageDropDownAction; import org.eclipse.team.ui.TeamUI; -import org.eclipse.team.ui.synchronize.ISynchronizeView; import org.eclipse.team.ui.synchronize.ISynchronizeManager; -import org.eclipse.team.ui.synchronize.ISynchronizeParticipantListener; import org.eclipse.team.ui.synchronize.ISynchronizeParticipant; +import org.eclipse.team.ui.synchronize.ISynchronizeParticipantListener; +import org.eclipse.team.ui.synchronize.ISynchronizeView; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.part.IPage; import org.eclipse.ui.part.IPageBookViewPage; @@ -35,16 +33,7 @@ import org.eclipse.ui.part.PageBook; import org.eclipse.ui.part.PageBookView; /** - * @author JLemieux - * - * To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -/** - * @author JLemieux - * - * To change the template for this generated type comment go to - * Window - Preferences - Java - Code Generation - Code and Comments + * Implements a Synchronize View that contains multiple synchronize participants. */ public class SynchronizeView extends PageBookView implements ISynchronizeView, ISynchronizeParticipantListener, IPropertyChangeListener { @@ -107,9 +96,9 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I protected void updateTitle() { ISynchronizeParticipant page = getParticipant(); if (page == null) { - setTitle("Synchronize View"); + setTitle(Policy.bind("SynchronizeView.1")); //$NON-NLS-1$ } else { - setTitle("Synchronize View - " + page.getName()); + setTitle(Policy.bind("SynchronizeView.2") + page.getName()); //$NON-NLS-1$ } } @@ -228,26 +217,6 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I } /** - * Creates a pop-up menu on the given control. The menu - * is registered with this view's site, such that other - * plug-ins may contribute to the menu. - * - * @param menuControl the control with which the pop-up - * menu will be associated with. - */ - protected void createContextMenu(Control menuControl) { - MenuManager menuMgr= new MenuManager("#PopUp"); //$NON-NLS-1$ - menuMgr.setRemoveAllWhenShown(true); - Menu menu= menuMgr.createContextMenu(menuControl); - menuControl.setMenu(menu); - - // register the context menu such that other plugins may contribute to it - if (getSite() != null) { - getSite().registerContextMenu(menuMgr, null); - } - } - - /** * Create the default actions for the view. These will be shown regardless of the * participant being displayed. */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSubscriberParticipantLabelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantLabelProvider.java index 24f67bcda..1f6da9042 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TeamSubscriberParticipantLabelProvider.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantLabelProvider.java @@ -1,4 +1,4 @@ -package org.eclipse.team.internal.ui.synchronize; +package org.eclipse.team.ui.synchronize; import java.util.HashMap; import java.util.Iterator; diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java index b005cbaa0..312561146 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java @@ -45,7 +45,6 @@ import org.eclipse.team.internal.ui.Policy; import org.eclipse.team.internal.ui.TeamUIPlugin; import org.eclipse.team.internal.ui.Utils; import org.eclipse.team.internal.ui.jobs.JobBusyCursor; -import org.eclipse.team.internal.ui.synchronize.TeamSubscriberParticipantLabelProvider; import org.eclipse.team.internal.ui.synchronize.actions.ComparisonCriteriaActionGroup; import org.eclipse.team.internal.ui.synchronize.actions.INavigableControl; import org.eclipse.team.internal.ui.synchronize.actions.NavigateAction; diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/DirectionFilterActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/DirectionFilterActionGroup.java index b2e108c6c..5e737384c 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/DirectionFilterActionGroup.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/DirectionFilterActionGroup.java @@ -31,7 +31,7 @@ import org.eclipse.ui.actions.ActionGroup; * <p> * When a modes changes a property change event is fired from the participant * with a value of <code>TeamSubscriberParticipant.P_SYNCVIEWPAGE_MODE</code>. - * + * </p> * @see TeamSubscriberParticipant * @since 3.0 */ @@ -172,7 +172,6 @@ public class DirectionFilterActionGroup extends ActionGroup implements IProperty * @see org.eclipse.ui.actions.ActionGroup#dispose() */ public void dispose() { - // TODO Auto-generated method stub super.dispose(); } }
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/package.html index da75e925f..da6e3d510 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/package.html +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/actions/package.html @@ -6,8 +6,9 @@ <title>Package-level Javadoc</title> </head> <body> -<p>Actions for use with with the Eclipse Synchronize View.</p> +<p>Actions and utilities for use with the Eclipse Synchronize View.</p> <h2>Package Specification</h2> -<p>This package contains actions that are used by subclasses of the <b>TeamSubscriberParticipant</b>.</p> +<p>This package contains actions that are used by subclasses of <b>TeamSubscriberParticipant</b>.</p> + </body> </html>
\ No newline at end of file diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html index e81dc4b4e..e5ecb1c6a 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/package.html @@ -9,39 +9,58 @@ <p>Application programming interfaces for interaction with the Eclipse Synchronize View.</p> <h2>Package Specification</h2> -<p>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. -Clients implementing synchronize participants should subclass this -<b>AbstractSynchronizeParticipant</b>.</p> -<p>Synchronize participants must be declared by extending the <strong>synchronizeParticipants +<p>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:</p> +<ul> + <li>A ISynchronizeManager manages registered synchronize participants.</li> + <li>A ISynchronizeParticipant is a logical representation of a connection between + workspace resources and a remote location used to shared those resources.</li> + <li>A ISynchronizeView is a page book view of participants.</li> + <li>A ISynchronizeParticipant must create a page that will be displayed in the + ISynchronizeView page book view.</li> + <li>The ISynchronizeView shows a drop-down of all registered participants and + allows switching between them.</li> + <li>A ISynchronizeParticipant can contribute actions to the toolbar, menus, + and view menu.</li> +</ul> +<p>Synchronize participants are declared by extending the <strong>synchronizeParticipants </strong>extension point. There are two classes of synchronize participants: - static participants will be created when the synchronize view is created, and - dynamic participants are created by user code at some other time. </p> -<p>A synchronize manager (<b>ISynchronizeManager</b>) 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 (<b>IPageBookView</b>), which provides freedom - of presentation to the synchronize view implementation. A single participant - may be displayed simultaneously in multiple synchronize views, in different - workbench windows.</p> + <em>static </em>participants will be created when the synchronize view is created, + and <em>dynamic</em> participants that are created by user code at some other + time. A synchronize manager (<b>ISynchronizeManager</b>) 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 (<b>IPageBookView</b>), 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.</p> <p>The class <b>TeamSubscriberParticipant</b> provides an implementation of a synchronize participant that enables synchronization for a <b>TeamSubscriber</b>. - For providers that implement a <strong>TeamSubscriber</strong> this is the easiest - method of integrating into the Synchronize View. The steps would be:</p> + For providers that implement a <strong>TeamSubscriber</strong>, 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:</p> <ul> - <li>Implement a concrete subclass of <strong>TeamSubscriber</strong>.</li> + <li>Implement a concrete subclass of <strong>TeamSubscriber</strong> that will + provide the physical connection between the workspace resources and the remote + location that is used to share the resources.</li> <li>Subclass <strong>TeamSubscriberParticipant</strong> and provide concrete - implementations for init(QualifiedName) and saveState().</li> - <li>Add actions to the context menu of the participant by creating a viewerContribution - in your plugin.xml with the targetID field equal to that of your participants - qualifier part of their id. For example: + implementations for init(QualifiedName), saveState(), and optionally createPage().</li> + <li>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 id. For example: <pre><viewerContribution id="org.eclipse.myteamplugin.syncparticipant.actions" - targetID="org.eclipse.myteamplugin.syncparticipant"></pre> + targetID="org.eclipse.myteamplugin.syncparticipant"</pre> </li> - <li>Add actions to the view's action bar by appending them via the TeamSubscriberParticipant#setActionBars - method.</li> + <li>To add participant specific actions to the view's action bar, subclass TeamSubscriberParticipantPage + and implement setActionBars().</li> + <li>To add participant specific decorations to the viewer, subclass TeamSubscriberParticipantPage + and implement getLabelProvider().</li> </ul> </body> </html>
\ No newline at end of file |