Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-03-09 20:51:17 +0000
committerJean Michel-Lemieux2004-03-09 20:51:17 +0000
commit70d8db4a04629905c0aefa376adfc27566b12c73 (patch)
tree99abba1031918f6e868a7a1ad3e7faed7abce295 /tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team
parentb1c14fbe58367c34bf6eef789f77edca3623f574 (diff)
downloadeclipse.platform.team-70d8db4a04629905c0aefa376adfc27566b12c73.tar.gz
eclipse.platform.team-70d8db4a04629905c0aefa376adfc27566b12c73.tar.xz
eclipse.platform.team-70d8db4a04629905c0aefa376adfc27566b12c73.zip
Added several things:
- a global action to refresh - a compare dialog framework that will allow you to show compare input in a dialog and support saving
Diffstat (limited to 'tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java32
1 files changed, 25 insertions, 7 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
index bcdb06441..0277dff55 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/SynchronizeViewTestAdapter.java
@@ -22,11 +22,14 @@ import org.eclipse.team.core.synchronize.*;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.ui.subscriber.CompareParticipant;
import org.eclipse.team.internal.ccvs.ui.subscriber.MergeSynchronizeParticipant;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
import org.eclipse.team.tests.ccvs.core.subscriber.SyncInfoSource;
import org.eclipse.team.ui.TeamUI;
import org.eclipse.team.ui.synchronize.*;
import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
/**
* SyncInfoSource that obtains SyncInfo from the SynchronizeView's SyncSet.
@@ -34,7 +37,12 @@ import org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant;
public class SynchronizeViewTestAdapter extends SyncInfoSource {
public SynchronizeViewTestAdapter() {
- TeamUI.getSynchronizeManager().showSynchronizeViewInActivePage(null);
+ IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
+ try {
+ activePage.showView(ISynchronizeView.VIEW_ID);
+ } catch (PartInitException e) {
+ throw new AssertionFailedError("Cannot show sync view in active page");
+ }
}
public SyncInfo getSyncInfo(Subscriber subscriber, IResource resource) throws TeamException {
@@ -96,8 +104,13 @@ public class SynchronizeViewTestAdapter extends SyncInfoSource {
ISynchronizeParticipant participant = new MergeSynchronizeParticipant(mergeSubscriber);
synchronizeManager.addSynchronizeParticipants(
new ISynchronizeParticipant[] {participant});
- ISynchronizeView view = synchronizeManager.showSynchronizeViewInActivePage(null);
- view.display(participant);
+ IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
+ try {
+ ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
+ view.display(participant);
+ } catch (PartInitException e) {
+ throw new AssertionFailedError("Cannot show sync view in active page");
+ }
return mergeSubscriber;
}
@@ -110,9 +123,14 @@ public class SynchronizeViewTestAdapter extends SyncInfoSource {
ISynchronizeManager synchronizeManager = TeamUI.getSynchronizeManager();
ISynchronizeParticipant participant = new CompareParticipant(s);
synchronizeManager.addSynchronizeParticipants(
- new ISynchronizeParticipant[] {participant});
- ISynchronizeView view = synchronizeManager.showSynchronizeViewInActivePage(null);
- view.display(participant);
+ new ISynchronizeParticipant[] {participant});
+ IWorkbenchPage activePage = TeamUIPlugin.getActivePage();
+ try {
+ ISynchronizeView view = (ISynchronizeView)activePage.showView(ISynchronizeView.VIEW_ID);
+ view.display(participant);
+ } catch (PartInitException e) {
+ throw new AssertionFailedError("Cannot show sync view in active page");
+ }
return s;
}
@@ -123,7 +141,7 @@ public class SynchronizeViewTestAdapter extends SyncInfoSource {
ISynchronizeParticipant[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
for (int i = 0; i < participants.length; i++) {
ISynchronizeParticipant participant = participants[i];
- if(participant.getId().equals(CVSMergeSubscriber.QUALIFIED_NAME)) {
+ if(participant.getId().equals(CVSMergeSubscriber.ID)) {
TeamUI.getSynchronizeManager().removeSynchronizeParticipants(new ISynchronizeParticipant[] {participant});
}
}

Back to the top