Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-05-05 17:02:42 -0400
committerMichael Valenta2004-05-05 17:02:42 -0400
commit4e09361c26b08bcacfa17fe77f253651d4b6cc2f (patch)
tree80d06148d9f7224aaf7bcd281304a0acf786922e
parent203d3fc3f75194c8af7250ac96e4ea43ea85c806 (diff)
downloadeclipse.platform.team-4e09361c26b08bcacfa17fe77f253651d4b6cc2f.tar.gz
eclipse.platform.team-4e09361c26b08bcacfa17fe77f253651d4b6cc2f.tar.xz
eclipse.platform.team-4e09361c26b08bcacfa17fe77f253651d4b6cc2f.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.properties24
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties33
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java36
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java (renamed from bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java)5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java (renamed from bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedOperation.java)4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java (renamed from bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java)5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java (renamed from bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitOperation.java)4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java47
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java105
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java97
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch11
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch6
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java4
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java4
23 files changed, 279 insertions, 148 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.properties b/bundles/org.eclipse.team.cvs.ui/plugin.properties
index b91404c95..5b67b4e56 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.properties
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.properties
@@ -178,30 +178,6 @@ AnnotateView.name=CVS Annotate
CVSConsoleFont.label=CVS Console Font
CVSConsoleFont.description=The font for the CVS console.
-CVSWorkspaceSubscriber.update.label=&Update
-CVSWorkspaceSubscriber.update.tooltip=Perform an update on the visible resources
-
-CVSWorkspaceSubscriber.commit.label=&Commit...
-CVSWorkspaceSubscriber.commit.tooltip=Perform a commit on the visible resources
-
-CVSWorkspaceSubscriber.overcommit.label=&Override and Commit...
-CVSWorkspaceSubscriber.overcommit.tooltip=Perform an override and commit on the visible resources. This will make the remote contents equal to the local ignoring any remote changes.
-
-CVSWorkspaceSubscriber.overupdate.label=O&verride and Update
-CVSWorkspaceSubscriber.overupdate.tooltip=Perform an override and update on the visible resources. This will make the local contents equal to the remote ignoring any local changes.
-
-CVSWorkspaceSubscriber.confirmMerged.label=&Mark as Merged
-CVSWorkspaceSubscriber.confirmMerged.tooltip=Mark the conflict as merged by upgrading the base to match the remote
-
-CVSWorkspaceSubscriber.merge.label=&Update
-CVSWorkspaceSubscriber.merge.tooltip=Perform an update merge on the visible resources
-
-RefreshDirtyStateAction.label=Update C&lean
-RefreshDirtyStateAction.tooltip=Reset the dirty state of out-of-sync files whose contents match the server contents
-
-CVSCompareSubscriber.revert.label=&Override and Update
-CVSCompareSubscriber.revert.tooltip=Revert the local file contents to match that of their corresponding remotes
-
WorkInProgress.name=Work In Progress
CVSRemoteQuickDiffProvider.label=&Latest CVS Revision
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
index 00d271789..5ce37dbb8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/messages.properties
@@ -1043,6 +1043,7 @@ RemoteRevisionQuickDiffProvider.readingFile=Error reading remote file
RemoteRevisionQuickDiffProvider.closingFile=Error closing remote file
RemoteRevisionQuickDiffProvider.fetchingFile=CVS QuickDiff: fetching remote contents for ''{0}''
RemoteCompareOperation.0=Comparing tags {0} and {1} of {2}
+
action.SynchronizeViewCommit.label=Commit
action.SynchronizeViewCommit.tooltip=Commit All Outgoing Changes...
action.SynchronizeViewCommit.description=Commit All Outgoing Changes...
@@ -1058,6 +1059,38 @@ action.SharingWizardIgnore.tooltip=Ignore Selected Resources...
action.SharingWizardIgnore.description=Ignore Selected Resources...
action.SharingWizardIgnore.image=ignorefiles.gif
+WorkspaceUpdateAction.label=&Update
+WorkspaceUpdateAction.tooltip=Perform an update on the selected resources
+WorkspaceUpdateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_update_action
+
+OverrideAndUpdateAction.label=O&verride and Update
+OverrideAndUpdateAction.tooltip=Perform an override and update on the selected resources. This will make the local contents equal to the remote ignoring any local changes.
+OverrideAndUpdateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_overupdate_action
+
+RefreshDirtyStateAction.label=C&lean Timestamps
+RefreshDirtyStateAction.tooltip=Reset the dirty state of out-of-sync files whose contents match the server contents
+RefreshDirtyStateAction.helpContextId=org.eclipse.team.cvs.ui.workspace_refresh_dirty_state_action_context
+
+WorkspaceCommitAction.label=&Commit...
+WorkspaceCommitAction.tooltip=Perform a commit on the selected resources
+WorkspaceCommitAction.helpContextId="org.eclipse.team.cvs.ui.workspace_commit_action
+
+OverrideAndCommitAction.label=&Override and Commit...
+OverrideAndCommitAction.tooltip=Perform an override and commit on the selected resources. This will make the remote contents equal to the local ignoring any remote changes.
+OverrideAndCommitAction.helpContextId=org.eclipse.team.cvs.ui.workspace_overcommit_action
+
+ConfirmMergedAction.label=&Mark as Merged
+ConfirmMergedAction.tooltip=Mark the conflict as merged by upgrading the base to match the remote
+ConfirmMergedAction.helpContextId=org.eclipse.team.cvs.ui.workspace_confirm_merged_action
+
+MergeUpdateAction.label=&Update
+MergeUpdateAction.tooltip=Perform an update merge on the selected resources
+MergeUpdateAction.helpContextId=org.eclipse.team.cvs.ui.merge_update_action
+
+CompareRevertAction.label=&Override and Update
+CompareRevertAction.tooltip=Revert the local file contents to match that of their corresponding remotes
+CompareRevertAction.helpContextId=org.eclipse.team.cvs.ui.compare_revert_action
+
MergeSynchronizeParticipant.8=Missing id initializing cvs merge participant
MergeSynchronizeParticipant.9=Unable to initialize cvs merge subscriber
MergeSynchronizeParticipant.10=Missing root nodes in cvs merge subscriber memento: {0}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java
new file mode 100644
index 000000000..0100f4092
--- /dev/null
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantAction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 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.ccvs.ui.subscriber;
+
+import org.eclipse.team.internal.ccvs.ui.Policy;
+import org.eclipse.team.internal.ui.Utils;
+import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
+
+/**
+ * Superclass of CVS particpant actions that uses the classname as the key
+ * to access the text from the resource bundle
+ */
+public abstract class CVSParticipantAction extends SynchronizeModelAction {
+
+ protected CVSParticipantAction() {
+ super(null);
+ Utils.initAction(this, getBundleKeyPrefix(), Policy.getBundle());
+ }
+
+ /**
+ * Return the key to the action text in the resource bundle.
+ * The default is the class name followed by a dot (.).
+ * @return the bundle key prefix
+ */
+ protected String getBundleKeyPrefix() {
+ return getClass().getName() + ".";
+ }
+}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java
index 667f93bef..beece89df 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CompareRevertAction.java
@@ -11,15 +11,14 @@
package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
/**
* Action in compare editor that reverts the local contents to match the contents on the server.
*/
-public class CompareRevertAction extends SynchronizeModelAction {
-
+public class CompareRevertAction extends CVSParticipantAction {
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java
index 22707849f..520c35831 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedAction.java
@@ -14,11 +14,10 @@ import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
-public class SubscriberConfirmMergedAction extends SynchronizeModelAction {
+public class ConfirmMergedAction extends CVSParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
@@ -31,6 +30,6 @@ public class SubscriberConfirmMergedAction extends SynchronizeModelAction {
* @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
protected SynchronizeModelOperation getSubscriberOperation(IWorkbenchPart part, IDiffElement[] elements) {
- return new SubscriberConfirmMergedOperation(part, elements);
+ return new ConfirmMergedOperation(part, elements);
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java
index ff789f64d..cea1c54c8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberConfirmMergedOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ConfirmMergedOperation.java
@@ -26,9 +26,9 @@ import org.eclipse.ui.IWorkbenchPart;
* This action marks the local resource as merged by updating the base
* resource revision to match the remote resource revision
*/
-public class SubscriberConfirmMergedOperation extends CVSSubscriberOperation {
+public class ConfirmMergedOperation extends CVSSubscriberOperation {
- public SubscriberConfirmMergedOperation(IWorkbenchPart part, IDiffElement[] elements) {
+ public ConfirmMergedOperation(IWorkbenchPart part, IDiffElement[] elements) {
super(part, elements);
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
index 5ca02c34e..5cd8b01d6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
@@ -15,12 +15,11 @@ import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.OrSyncInfoFilter;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
-public class MergeUpdateAction extends SynchronizeModelAction {
+public class MergeUpdateAction extends CVSParticipantAction {
private boolean promptBeforeUpdate;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
index bce546089..45279cdaf 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndCommitAction.java
@@ -11,13 +11,13 @@
package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.team.core.synchronize.*;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
+import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
-public class OverrideAndCommitAction extends SynchronizeModelAction {
+public class OverrideAndCommitAction extends CVSParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSyncInfoFilter()
@@ -30,7 +30,7 @@ public class OverrideAndCommitAction extends SynchronizeModelAction {
* @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
protected SynchronizeModelOperation getSubscriberOperation(IWorkbenchPart part, IDiffElement[] elements) {
- return new SubscriberCommitOperation(part, elements, true /* override */);
+ return new WorkspaceCommitOperation(part, elements, true /* override */);
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
index ad2d54bbf..3be4cfee0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/OverrideAndUpdateAction.java
@@ -14,7 +14,6 @@ import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
@@ -23,7 +22,7 @@ import org.eclipse.ui.IWorkbenchPart;
* changes to files that have non-mergeable conflicts. All the prompting logic
* is in the super class.
*/
-public class OverrideAndUpdateAction extends SynchronizeModelAction {
+public class OverrideAndUpdateAction extends CVSParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java
index 74b6effef..9a7897581 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/RefreshDirtyStateAction.java
@@ -13,15 +13,16 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.FastSyncInfoFilter.*;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter.AndSyncInfoFilter;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoChangeTypeFilter;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
/**
* Resets the dirty state of files whose contents match their base.
*/
-public class RefreshDirtyStateAction extends SynchronizeModelAction {
+public class RefreshDirtyStateAction extends CVSParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java
index 93340a79e..226c2fafc 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitAction.java
@@ -14,11 +14,10 @@ import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
-public class SubscriberCommitAction extends SynchronizeModelAction {
+public class WorkspaceCommitAction extends CVSParticipantAction {
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.SubscriberAction#getSyncInfoFilter()
@@ -31,6 +30,6 @@ public class SubscriberCommitAction extends SynchronizeModelAction {
* @see org.eclipse.team.internal.ui.actions.SubscriberAction#getSubscriberOperation(org.eclipse.compare.structuremergeviewer.IDiffElement[])
*/
protected SynchronizeModelOperation getSubscriberOperation(IWorkbenchPart part, IDiffElement[] elements) {
- return new SubscriberCommitOperation(part, elements, false /* override */);
+ return new WorkspaceCommitOperation(part, elements, false /* override */);
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
index 2a322460d..d81f192a6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/SubscriberCommitOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
@@ -37,13 +37,13 @@ import org.eclipse.team.internal.ccvs.ui.sync.ToolTipMessageDialog;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.ui.IWorkbenchPart;
-public class SubscriberCommitOperation extends CVSSubscriberOperation {
+public class WorkspaceCommitOperation extends CVSSubscriberOperation {
private String comment;
private SyncInfoSet syncSet;
private boolean override;
- public SubscriberCommitOperation(IWorkbenchPart part, IDiffElement[] elements, boolean override) {
+ public WorkspaceCommitOperation(IWorkbenchPart part, IDiffElement[] elements, boolean override) {
super(part, elements);
this.override = override;
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
index e75eadc18..b0de5868d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceSynchronizeParticipant.java
@@ -33,20 +33,50 @@ public class WorkspaceSynchronizeParticipant extends CVSParticipant {
*/
public static final String ACTION_GROUP = "cvs_workspace_actions"; //$NON-NLS-1$
+ public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_1 = "context_group_1"; //$NON-NLS-1$
+ public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_2 = "context_group_2"; //$NON-NLS-1$
+ public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_3 = "context_group_3"; //$NON-NLS-1$
+ public static final String CONTEXT_MENU_CONTRIBUTION_GROUP_4 = "context_group_4"; //$NON-NLS-1$
/**
* CVS workspace action contribution
*/
public class WorkspaceActionContribution extends SynchronizePageActionGroup {
private ActionDelegateWrapper commitToolbar;
private ActionDelegateWrapper updateToolbar;
+
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
- commitToolbar = new ActionDelegateWrapper(new SubscriberCommitAction(), configuration.getSite().getPart());
+ commitToolbar = new ActionDelegateWrapper(new WorkspaceCommitAction(), configuration.getSite().getPart());
WorkspaceUpdateAction action = new WorkspaceUpdateAction();
action.setPromptBeforeUpdate(true);
updateToolbar = new ActionDelegateWrapper(action, configuration.getSite().getPart());
Utils.initAction(commitToolbar, "action.SynchronizeViewCommit.", Policy.getBundle()); //$NON-NLS-1$
Utils.initAction(updateToolbar, "action.SynchronizeViewUpdate.", Policy.getBundle()); //$NON-NLS-1$
+
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_1,
+ new WorkspaceUpdateAction());
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_1,
+ new WorkspaceCommitAction());
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_2,
+ new OverrideAndUpdateAction());
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_2,
+ new OverrideAndCommitAction());
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_2,
+ new ConfirmMergedAction());
+ appendToGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_4,
+ new RefreshDirtyStateAction());
}
public void fillActionBars(IActionBars actionBars) {
IToolBarManager toolbar = actionBars.getToolBarManager();
@@ -80,5 +110,20 @@ public class WorkspaceSynchronizeParticipant extends CVSParticipant {
configuration.setSupportedModes(ISynchronizePageConfiguration.ALL_MODES);
configuration.setMode(ISynchronizePageConfiguration.BOTH_MODE);
//configuration.setProperty(SynchronizePageConfiguration.P_MODEL_MANAGER, new ChangeLogModelManager(configuration));
+
+ // Add context menu groups here to give the client displaying the
+ // page a chance to remove the context menu
+ configuration.addMenuGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_1);
+ configuration.addMenuGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_2);
+ configuration.addMenuGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_3);
+ configuration.addMenuGroup(
+ ISynchronizePageConfiguration.P_CONTEXT_MENU,
+ CONTEXT_MENU_CONTRIBUTION_GROUP_4);
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
index 5009d0224..00caf2bc4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceUpdateAction.java
@@ -14,11 +14,10 @@ import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
-import org.eclipse.team.ui.synchronize.SynchronizeModelAction;
import org.eclipse.team.ui.synchronize.SynchronizeModelOperation;
import org.eclipse.ui.IWorkbenchPart;
-public class WorkspaceUpdateAction extends SynchronizeModelAction {
+public class WorkspaceUpdateAction extends CVSParticipantAction {
private boolean promptBeforeUpdate;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java
index 6f87cec1e..0eaeaf3dd 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/SharingWizardPageActionGroup.java
@@ -17,7 +17,7 @@ import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.SyncInfoDirectionFilter;
import org.eclipse.team.internal.ccvs.ui.Policy;
import org.eclipse.team.internal.ccvs.ui.actions.IgnoreAction;
-import org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation;
+import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceCommitOperation;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.ActionDelegateWrapper;
import org.eclipse.team.ui.synchronize.*;
@@ -41,7 +41,7 @@ public class SharingWizardPageActionGroup extends SynchronizePageActionGroup {
return new SyncInfoDirectionFilter(new int[] {SyncInfo.CONFLICTING, SyncInfo.OUTGOING});
}
protected SynchronizeModelOperation getSubscriberOperation(IWorkbenchPart part, IDiffElement[] elements) {
- return new SubscriberCommitOperation(part, elements, true /* override */);
+ return new WorkspaceCommitOperation(part, elements, true /* override */);
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
index 690f8bed0..625c038f8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ActionDelegateWrapper.java
@@ -38,7 +38,7 @@ public class ActionDelegateWrapper extends Action {
((IEditorActionDelegate)delegate).setActiveEditor(this, (IEditorPart)part);
}
}
- // Assume there is no selection untiul told otherwise
+ // Assume there is no selection until told otherwise
setSelection(StructuredSelection.EMPTY);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
index 2c5ade511..6bb6e1ba2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizePageConfiguration.java
@@ -158,13 +158,6 @@ public interface ISynchronizePageConfiguration {
public static final String PREFERENCES_GROUP = "preferences"; //$NON-NLS-1$
/**
- * The id of the group that determines where workbench object contributions
- * should appear. This group will only be used if there is an
- * OBJECT_CONTRIBUTION_ID set in the configuration
- */
- public static final String OBJECT_CONTRIBUTIONS_GROUP = IWorkbenchActionConstants.MB_ADDITIONS;
-
- /**
* The id of the layout group that determines whether the layout selection
* actions appear in the view dropdown or toolbar.
*/
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
index 718a608fd..f3729e208 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizeModelAction.java
@@ -15,13 +15,14 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.compare.structuremergeviewer.IDiffElement;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.team.core.synchronize.*;
+import org.eclipse.team.core.synchronize.FastSyncInfoFilter;
+import org.eclipse.team.core.synchronize.SyncInfo;
+import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.actions.BaseSelectionListenerAction;
/**
* This action provides utilities for performing operations on selections that
@@ -37,15 +38,25 @@ import org.eclipse.ui.*;
* @see org.eclipse.team.ui.synchronize.SynchronizeModelOperation
* @since 3.0
*/
-public abstract class SynchronizeModelAction implements IObjectActionDelegate, IViewActionDelegate, IEditorActionDelegate {
-
- private IStructuredSelection selection;
+public abstract class SynchronizeModelAction extends BaseSelectionListenerAction {
+
+ // TODO: Should be replaced by sync site
private IWorkbenchPart part;
+ /**
+ * Creates a new action with the given text.
+ *
+ * @param text the string used as the text for the action,
+ * or <code>null</code> if there is no text
+ */
+ protected SynchronizeModelAction(String text) {
+ super(text);
+ }
+
/* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ * @see org.eclipse.jface.action.Action#run()
*/
- public final void run(IAction action) {
+ public void run() {
// TODO: We used to prompt for unsaved changes in any editor. We don't anymore. Would
// it be better to prompt for unsaved changes to editors affected by this action?
try {
@@ -76,6 +87,14 @@ public abstract class SynchronizeModelAction implements IObjectActionDelegate, I
Utils.handle(e);
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.BaseSelectionListenerAction#updateSelection(org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ protected boolean updateSelection(IStructuredSelection selection) {
+ super.updateSelection(selection);
+ return (getFilteredDiffElements().length > 0);
+ }
+
/**
* This method returns all instances of IDiffElement that are in the current
* selection.
@@ -83,16 +102,7 @@ public abstract class SynchronizeModelAction implements IObjectActionDelegate, I
* @return the selected elements
*/
protected final IDiffElement[] getSelectedDiffElements() {
- return Utils.getDiffNodes(selection.toArray());
- }
-
- /**
- * The default enablement behavior for subscriber actions is to enable
- * the action if there is at least one SyncInfo in the selection
- * for which the action's filter passes.
- */
- protected boolean isEnabled() {
- return (getFilteredDiffElements().length > 0);
+ return Utils.getDiffNodes(getStructuredSelection().toArray());
}
/**
@@ -124,61 +134,4 @@ public abstract class SynchronizeModelAction implements IObjectActionDelegate, I
}
return (IDiffElement[]) filtered.toArray(new IDiffElement[filtered.size()]);
}
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.part = targetPart;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
- */
- public void init(IViewPart view) {
- this.part = view;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof IStructuredSelection) {
- this.selection = (IStructuredSelection) selection;
- if (action != null) {
- setActionEnablement(action);
- }
- }
- }
-
- /**
- * Method invoked from <code>selectionChanged(IAction, ISelection)</code>
- * to set the enablement status of the action. The instance variable
- * <code>selection</code> will contain the latest selection so the methods
- * <code>getSelectedResources()</code> and <code>getSelectedProjects()</code>
- * will provide the proper objects.
- *
- * This method can be overridden by subclasses but should not be invoked by them.
- */
- protected void setActionEnablement(IAction action) {
- action.setEnabled(isEnabled());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorActionDelegate#setActiveEditor(org.eclipse.jface.action.IAction, org.eclipse.ui.IEditorPart)
- */
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- // Ignore since these actions aren't meant for editors.
- // This seems to be required because of a bug in the UI
- // plug-in that will disable viewer actions if they aren't
- // editor actions? Go figure...
- }
-
- /**
- * Returns the workbench part assigned to this action or <code>null</code>.
- * @return Returns the part.
- */
- public IWorkbenchPart getPart() {
- return part;
- }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
index 082a067e5..b804914f2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SynchronizePageActionGroup.java
@@ -10,7 +10,18 @@
*******************************************************************************/
package org.eclipse.team.ui.synchronize;
-import org.eclipse.jface.action.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.team.internal.ui.synchronize.SynchronizePageConfiguration;
import org.eclipse.ui.actions.ActionGroup;
@@ -52,6 +63,8 @@ import org.eclipse.ui.actions.ActionGroup;
public abstract class SynchronizePageActionGroup extends ActionGroup {
private ISynchronizePageConfiguration configuration;
+
+ private Map menuContributions = new HashMap();
/**
* Initialize the actions of this contribution.
@@ -88,8 +101,32 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
if (configuration != null) {
configuration.removeActionContribution(this);
}
+ disposeMenu(ISynchronizePageConfiguration.P_CONTEXT_MENU);
+ disposeMenu(ISynchronizePageConfiguration.P_TOOLBAR_MENU);
+ disposeMenu(ISynchronizePageConfiguration.P_VIEW_MENU);
}
+ private void disposeMenu(String menuId) {
+ Map groups = (Map)menuContributions.get(menuId);
+ if (groups != null) {
+ for (Iterator iter = groups.keySet().iterator(); iter.hasNext(); ) {
+ String groupId = (String) iter.next();
+ List actions = (List)groups.get(groupId);
+ if (actions != null) {
+ for (Iterator iter2 = actions.iterator(); iter2.hasNext();) {
+ Object element = iter2.next();
+ if (element instanceof ISelectionChangedListener) {
+ ISelectionProvider selectionProvider = configuration.getSite().getSelectionProvider();
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener((ISelectionChangedListener)element);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
/**
* Helper method to find the group of the given id for the page
* associated with the configuration of this action group.
@@ -149,4 +186,62 @@ public abstract class SynchronizePageActionGroup extends ActionGroup {
}
return false;
}
+
+ /**
+ * Helper method that can be invoked during initialization to add an
+ * action to a particular menu (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
+ * from ISynchronizePageConfiguration). The action is added to the given group
+ * if it is present. Otherwise the action is not added to the menu.
+ * @param menuId the menu id (one of P_TOOLBAR_MENU, P_VIEW_MENU, P_CONTEXT_MENU
+ * from ISynchronizePageConfiguration)
+ * @param groupId the group id in the menu to which the action is to be added
+ * @param action the action to be added
+ */
+ public void appendToGroup(String menuId, String groupId, IAction action) {
+ internalAppendToGroup(menuId, groupId, action);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
+ */
+ public void fillContextMenu(IMenuManager menu) {
+ super.fillContextMenu(menu);
+ Map groups = (Map)menuContributions.get(ISynchronizePageConfiguration.P_CONTEXT_MENU);
+ if (groups != null) {
+ for (Iterator iter = groups.keySet().iterator(); iter.hasNext(); ) {
+ String groupId = (String) iter.next();
+ List actions = (List)groups.get(groupId);
+ if (actions != null) {
+ for (Iterator iter2 = actions.iterator(); iter2.hasNext();) {
+ Object element = iter2.next();
+ if (element instanceof IAction) {
+ appendToGroup(menu, groupId, (IAction)element);
+ } else if (element instanceof IContributionItem) {
+ appendToGroup(menu, groupId, (IContributionItem)element);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private void internalAppendToGroup(String menuId, String groupId, Object action) {
+ Map groups = (Map)menuContributions.get(menuId);
+ if (groups == null) {
+ groups = new HashMap();
+ menuContributions.put(menuId, groups);
+ }
+ List actions = (List)menuContributions.get(groupId);
+ if (actions == null) {
+ actions = new ArrayList();
+ groups.put(groupId, actions);
+ }
+ actions.add(action);
+ if (action instanceof ISelectionChangedListener) {
+ ISelectionProvider selectionProvider = configuration.getSite().getSelectionProvider();
+ if (selectionProvider != null) {
+ selectionProvider.addSelectionChangedListener((ISelectionChangedListener)action);
+ }
+ }
+ }
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch
index fac8b26de..74150996b 100644
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch
+++ b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/CVS UI Tests.launch
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.AllTests"/>
<booleanAttribute key="tracing" value="false"/>
+<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
<booleanAttribute key="default" value="true"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAdditions"/>
+<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\wsmvalentalnx.properties -Declipse.cvs.testName2=testFileAdditions"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="clearConfig" value="true"/>
<mapAttribute key="tracingOptions">
<mapEntry key="org.eclipse.core.boot/monitor/classes" value="false"/>
<mapEntry key="org.eclipse.team.cvs.core/syncchangeevents" value="false"/>
@@ -139,13 +142,15 @@
<mapEntry key="org.eclipse.core.runtime/jobs/timing" value="false"/>
<mapEntry key="org.eclipse.core.runtime/loader/debug/prefixes/failure" value="false"/>
</mapAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="onePluginID" value=""/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_CA"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.team.tests.cvs.core"/>
<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="onePlugin" value="false"/>
<booleanAttribute key="maximized" value="false"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.debug.ui.javaSourceLocator"/>
<stringAttribute key="location0" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.uitestapplication"/>
</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
index 9e7fc4a2f..f7449185a 100644
--- a/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
+++ b/tests/org.eclipse.team.tests.cvs.core/launchConfigurations/One CVS Test.launch
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="clearws" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.provider.ImportTest"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.team.tests.ccvs.core.subscriber.CVSWorkspaceSubscriberTest"/>
<booleanAttribute key="tracing" value="false"/>
<stringAttribute key="location1" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
<booleanAttribute key="default" value="true"/>
-<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName=testCheckout"/>
+<stringAttribute key="vmargs" value="-Declipse.cvs.properties=c:\eclipse\repository.properties -Declipse.cvs.testName2=testFileAddedToBranch"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
@@ -18,5 +19,4 @@
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="onePlugin" value="false"/>
<stringAttribute key="location0" value="C:\Eclipse\Latest-Eclipse-Drop\eclipse\runtime-test-workspace"/>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.debug.ui.javaSourceLocator"/>
</launchConfiguration>
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
index 0496a4d04..e0b692d9a 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/CVSSyncSubscriberTest.java
@@ -23,7 +23,7 @@ import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
import org.eclipse.team.internal.ccvs.core.CVSSyncTreeSubscriber;
-import org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberConfirmMergedOperation;
+import org.eclipse.team.internal.ccvs.ui.subscriber.ConfirmMergedOperation;
import org.eclipse.team.internal.ui.synchronize.SyncInfoModelElement;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
import org.eclipse.team.tests.ccvs.ui.SynchronizeViewTestAdapter;
@@ -227,7 +227,7 @@ public abstract class CVSSyncSubscriberTest extends EclipseTest {
protected void markAsMerged(CVSSyncTreeSubscriber subscriber, IProject project, String[] resourcePaths) throws CoreException, TeamException, InvocationTargetException, InterruptedException {
IResource[] resources = getResources(project, resourcePaths);
SyncInfo[] infos = createSyncInfos(subscriber, resources);
- new SubscriberConfirmMergedOperation(null, getElements(infos)).run(DEFAULT_MONITOR);
+ new ConfirmMergedOperation(null, getElements(infos)).run(DEFAULT_MONITOR);
}
protected IDiffElement[] getElements(SyncInfo[] infos) {
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java
index 40dc2a764..e7275f774 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/subscriber/TestCommitOperation.java
@@ -14,9 +14,9 @@ import org.eclipse.compare.structuremergeviewer.IDiffElement;
import org.eclipse.core.resources.IResource;
import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.ccvs.ui.repo.RepositoryManager;
-import org.eclipse.team.internal.ccvs.ui.subscriber.SubscriberCommitOperation;
+import org.eclipse.team.internal.ccvs.ui.subscriber.WorkspaceCommitOperation;
-class TestCommitOperation extends SubscriberCommitOperation {
+class TestCommitOperation extends WorkspaceCommitOperation {
private boolean prompted;

Back to the top