Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-10-20 20:35:22 +0000
committerJean Michel-Lemieux2003-10-20 20:35:22 +0000
commit2eb555ca444ffd2c0e59c2eeba35c0d4fdb9cdfb (patch)
tree570c65d201908f49d55b0d09d26d5de3da03e72a
parenta9206171b848adfb3919b142f1debb20981e1491 (diff)
downloadeclipse.platform.team-2eb555ca444ffd2c0e59c2eeba35c0d4fdb9cdfb.tar.gz
eclipse.platform.team-2eb555ca444ffd2c0e59c2eeba35c0d4fdb9cdfb.tar.xz
eclipse.platform.team-2eb555ca444ffd2c0e59c2eeba35c0d4fdb9cdfb.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSMergeSynchronizeParticipant.java66
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeParticipant.java2
4 files changed, 59 insertions, 15 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index 9d7c822d1..3eaa4c3a0 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -36,7 +36,7 @@
</participant>
<participant
name="CVS Merge"
- icon="icons/full/cview16/repo_rep.gif"
+ icon="icons/full/obj16/prjversions_rep.gif"
class="org.eclipse.team.internal.ccvs.ui.subscriber.CVSMergeSynchronizeParticipant"
type="dynamic"
id="org.eclipse.team.cvs.ui.cvsmerge_syncparticipant">
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
index e89398db1..7d26a3513 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeWizard.java
@@ -22,9 +22,9 @@ import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.subscriber.CVSMergeSynchronizeParticipant;
import org.eclipse.team.ui.TeamUI;
-import org.eclipse.team.ui.sync.ISynchronizeView;
import org.eclipse.team.ui.sync.ISynchronizeManager;
import org.eclipse.team.ui.sync.ISynchronizeParticipant;
+import org.eclipse.team.ui.sync.ISynchronizeView;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
@@ -65,7 +65,7 @@ public class MergeWizard extends Wizard {
CVSTag endTag = endPage.getTag();
CVSMergeSubscriber s = new CVSMergeSubscriber(resources, startTag, endTag);
- CVSMergeSynchronizeParticipant page = new CVSMergeSynchronizeParticipant(s, s.getName(), CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION));
+ CVSMergeSynchronizeParticipant page = new CVSMergeSynchronizeParticipant(s);
ISynchronizeManager manager = TeamUI.getSynchronizeManager();
manager.addSynchronizeParticipants(new ISynchronizeParticipant[] {page});
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSMergeSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSMergeSynchronizeParticipant.java
index d14ce2435..692e7dc08 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSMergeSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSMergeSynchronizeParticipant.java
@@ -13,10 +13,16 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.ISaveContext;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.subscribers.TeamSubscriber;
import org.eclipse.team.internal.ccvs.core.CVSMergeSubscriber;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.core.SaveContext;
+import org.eclipse.team.internal.core.SaveContextXMLWriter;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+import org.eclipse.team.internal.ui.sync.sets.SubscriberInput;
import org.eclipse.team.ui.Utilities;
import org.eclipse.team.ui.sync.actions.DirectionFilterActionGroup;
import org.eclipse.team.ui.sync.actions.RemoveSynchronizeViewPageAction;
@@ -28,8 +34,22 @@ public class CVSMergeSynchronizeParticipant extends CVSSynchronizeParticipant {
private RemoveSynchronizeViewPageAction removeAction;
private DirectionFilterActionGroup modes;
private Action updateAdapter;
+ private final static String PARTICIPANT_ID = "org.eclipse.team.cvs.ui.cvsmerge_syncparticipant";
- public CVSMergeSynchronizeParticipant(CVSMergeSubscriber subscriber, String name, ImageDescriptor imageDescriptor) {
+ public CVSMergeSynchronizeParticipant(CVSMergeSubscriber subscriber) {
+ super();
+ setSubscriber(subscriber);
+ setName(subscriber.getName());
+ setId(PARTICIPANT_ID);
+ setImageDescriptor(CVSUIPlugin.getPlugin().getImageDescriptor(ICVSUIConstants.IMG_PROJECT_VERSION));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.sync.TeamSubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.TeamSubscriber)
+ */
+ protected void setSubscriber(TeamSubscriber subscriber) {
+ super.setSubscriber(subscriber);
+ setInstanceId(subscriber.getId().toString());
makeActions();
}
@@ -56,18 +76,44 @@ public class CVSMergeSynchronizeParticipant extends CVSSynchronizeParticipant {
modes.fillToolBar(detailsToolbar);
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.ISynchronizeParticipant#init(org.eclipse.team.ui.sync.ISynchronizeView, org.eclipse.team.core.ISaveContext)
*/
- public void init(ISaveContext saveContext) throws PartInitException {
- // TODO Auto-generated method stub
+ public void init(String instance_id) throws PartInitException {
+ SaveContext ctx; //$NON-NLS-1$
+ try {
+ ctx = SaveContextXMLWriter.readXMLPluginMetaFile(CVSUIPlugin.getPlugin(), getMetaFileName(instance_id));
+ setSubscriber(CVSMergeSubscriber.restore(instance_id, ctx));
+ } catch (TeamException e) {
+ TeamUIPlugin.log(e);
+ }
}
-
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.ISynchronizeParticipant#saveState(org.eclipse.team.core.ISaveContext)
*/
- public void saveState(ISaveContext saveContext) {
- // TODO Auto-generated method stub
+ public void saveState() {
+ SubscriberInput input = getInput();
+ CVSMergeSubscriber s =(CVSMergeSubscriber)input.getSubscriber();
+ SaveContext ctx = s.saveState();
+ try {
+ SaveContextXMLWriter.writeXMLPluginMetaFile(CVSUIPlugin.getPlugin(), getMetaFileName(getId()), ctx); //$NON-NLS-1$
+ } catch (TeamException e) {
+ TeamUIPlugin.log(e);
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.sync.AbstractSynchronizeParticipant#dispose()
+ */
+ protected void dispose() {
+ super.dispose();
+ SaveContextXMLWriter.deleteXMLPluginMetaFile(CVSUIPlugin.getPlugin(), getMetaFileName(getId())); //$NON-NLS-1$
+ }
+
+ private String getMetaFileName(String id) {
+ return "mergeSyncPartners" + id + ".xml";
}
-}
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeParticipant.java
index a70197fc3..7231fc0ad 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSSynchronizeParticipant.java
@@ -53,8 +53,6 @@ public abstract class CVSSynchronizeParticipant extends TeamSubscriberParticipan
public CVSSynchronizeParticipant() {
}
-
-
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.AbstractSynchronizeParticipant#dispose()

Back to the top