Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-09-23 15:06:00 +0000
committerJean Michel-Lemieux2003-09-23 15:06:00 +0000
commitd2fbc4b6378d8b755ced58480e719afe55829520 (patch)
tree95f7d3dca34d6e487f47c714e03b60aef7821afc
parentbd66e58f44406464399109ef0fabdb7e6296cda8 (diff)
downloadeclipse.platform.team-d2fbc4b6378d8b755ced58480e719afe55829520.tar.gz
eclipse.platform.team-d2fbc4b6378d8b755ced58480e719afe55829520.tar.xz
eclipse.platform.team-d2fbc4b6378d8b755ced58480e719afe55829520.zip
Bug 43515 [Live Sync View] Open compare editor switches perspective
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/actions/OpenInCompareAction.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/sync/SyncInfoFromSyncSet.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/actions/OpenInCompareAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/actions/OpenInCompareAction.java
index 076942a61..bff48b9f0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/actions/OpenInCompareAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/actions/OpenInCompareAction.java
@@ -81,7 +81,7 @@ public class OpenInCompareAction extends Action {
}
if(keepFocus) {
- SynchronizeView.showInActivePage(viewer.getSite().getPage());
+ SynchronizeView.showInActivePage(viewer.getSite().getPage(), false /* don't switch perspectives */);
}
return input;
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java
index 31a5ac8f3..3ca268185 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/sync/views/SynchronizeView.java
@@ -680,11 +680,11 @@ public class SynchronizeView extends ViewPart implements ITeamResourceChangeList
/**
* Makes this view visible in the active page.
*/
- public static SynchronizeView showInActivePage(IWorkbenchPage activePage) {
+ public static SynchronizeView showInActivePage(IWorkbenchPage activePage, boolean allowSwitchingPerspectives) {
IWorkbench workbench= TeamUIPlugin.getPlugin().getWorkbench();
IWorkbenchWindow window= workbench.getActiveWorkbenchWindow();
- if(! TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE).equals(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE_NONE)) {
+ if(allowSwitchingPerspectives && ! TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE).equals(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE_NONE)) {
try {
String pId = TeamUIPlugin.getPlugin().getPreferenceStore().getString(IPreferenceIds.SYNCVIEW_DEFAULT_PERSPECTIVE);
activePage = workbench.showPerspective(pId, window);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
index 4164c9dfa..ce9888b57 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
@@ -28,7 +28,7 @@ public class TeamUI {
* to the view.
*/
public static ISynchronizeView showSyncViewInActivePage(IWorkbenchPage activePage) {
- return SynchronizeView.showInActivePage(activePage);
+ return SynchronizeView.showInActivePage(activePage, true /* allow perspective switch */);
}
/**
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/sync/SyncInfoFromSyncSet.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/sync/SyncInfoFromSyncSet.java
index 09d97b3f2..f97682496 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/sync/SyncInfoFromSyncSet.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/sync/SyncInfoFromSyncSet.java
@@ -64,7 +64,7 @@ public class SyncInfoFromSyncSet extends SyncInfoSource {
private SubscriberInput getInput(TeamSubscriber subscriber) throws AssertionFailedError {
// show the sync view
- SynchronizeView syncView = (SynchronizeView)SynchronizeView.showInActivePage(null);
+ SynchronizeView syncView = (SynchronizeView)SynchronizeView.showInActivePage(null, true);
SubscriberInput input = syncView.getInput();
if (subscriber != input.getSubscriber()) {
// ensure that the CVS subscriber is active

Back to the top