Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-04-29 10:57:28 -0400
committerMichael Valenta2004-04-29 10:57:28 -0400
commit68449155c01e1eb2e41c47cf38ee225917a413a6 (patch)
tree6a31e3a12888ddc4e460fcc9e30125f01d890281
parent457a9be1229dcd63ea2ecc48c62998acc53120a1 (diff)
downloadeclipse.platform.team-68449155c01e1eb2e41c47cf38ee225917a413a6.tar.gz
eclipse.platform.team-68449155c01e1eb2e41c47cf38ee225917a413a6.tar.xz
eclipse.platform.team-68449155c01e1eb2e41c47cf38ee225917a413a6.zip
Fixed bug in selection provider determination
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java9
2 files changed, 7 insertions, 4 deletions
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 d917f0fae..3af4ddd0a 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
@@ -162,7 +162,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
protected void initPage(ISynchronizePageConfiguration configuration, IPageBookViewPage page) {
// A page site does not provide everything the page may need
// Also provide the synchronize page site if the page is a synchronize view page
- ((SynchronizePageConfiguration)configuration).setSite(new WorkbenchPartSynchronizePageSite(this, getDialogSettings(configuration.getParticipant())));
+ ((SynchronizePageConfiguration)configuration).setSite(new WorkbenchPartSynchronizePageSite(this, page.getSite(), getDialogSettings(configuration.getParticipant())));
if (page instanceof ISynchronizePage) {
try {
((ISynchronizePage)page).init(configuration.getSite());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
index 23d975995..1951c539e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/WorkbenchPartSynchronizePageSite.java
@@ -15,6 +15,7 @@ import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.ui.synchronize.ISynchronizePageSite;
import org.eclipse.ui.*;
+import org.eclipse.ui.part.IPageSite;
/**
* Maps a workbench part to a synchronize page site.
@@ -22,9 +23,11 @@ import org.eclipse.ui.*;
public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite {
private IWorkbenchPart part;
private IDialogSettings settings;
+ private IPageSite site;
- public WorkbenchPartSynchronizePageSite(IWorkbenchPart part, IDialogSettings settings) {
+ public WorkbenchPartSynchronizePageSite(IWorkbenchPart part, IPageSite site, IDialogSettings settings) {
this.part = part;
+ this.site = site;
this.settings = settings;
}
@@ -46,14 +49,14 @@ public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite {
* @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#getSelectionProvider()
*/
public ISelectionProvider getSelectionProvider() {
- return part.getSite().getSelectionProvider();
+ return site.getSelectionProvider();
}
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizePageSite#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
*/
public void setSelectionProvider(ISelectionProvider provider) {
- part.getSite().setSelectionProvider(provider);
+ site.setSelectionProvider(provider);
}
/* (non-Javadoc)

Back to the top