Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2011-12-09 13:28:00 +0000
committervlorenzo2011-12-09 13:28:00 +0000
commit49e04c1b77683378850018d95420edd2b8e7fd10 (patch)
treef2d4e539c814053a8e44383a74ccd79274835cf9 /plugins
parent6e5e44c33890794c524687e135789bf9104c0bd1 (diff)
downloadorg.eclipse.papyrus-49e04c1b77683378850018d95420edd2b8e7fd10.tar.gz
org.eclipse.papyrus-49e04c1b77683378850018d95420edd2b8e7fd10.tar.xz
org.eclipse.papyrus-49e04c1b77683378850018d95420edd2b8e7fd10.zip
366166: Make Papyrus 0.9.X compile with Juno platform
https://bugs.eclipse.org/bugs/show_bug.cgi?id=366166
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
index e951ee899a5..cdde96741ae 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/eclipsecopy/MultiPageEditorSite.java
@@ -29,8 +29,10 @@ import org.eclipse.ui.IKeyBindingService;
import org.eclipse.ui.INestableKeyBindingService;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.PartPane;
import org.eclipse.ui.internal.PartSite;
import org.eclipse.ui.internal.PopupMenuExtender;
import org.eclipse.ui.internal.WorkbenchPlugin;
@@ -43,6 +45,7 @@ import org.eclipse.ui.part.EditorActionBarContributor;
import org.eclipse.ui.services.IDisposable;
import org.eclipse.ui.services.IServiceLocator;
import org.eclipse.ui.services.IServiceScopes;
+import org.eclipse.ui.internal.WorkbenchPartReference;
/**
* Site for a nested editor within a multi-page editor. Selection is handled by
@@ -133,9 +136,18 @@ public class MultiPageEditorSite implements IEditorSite, INestable {
this.serviceLocator = (ServiceLocator)slc.createServiceLocator(mainEditorSite, null, new IDisposable() {
public void dispose() {
- final Control control = ((PartSite)getMainEditorSite()).getPane().getControl();
+ //old code on Indigo :
+// final Control control = ((PartSite)getMainEditorSite()).getPane().getControl();
+// if(control != null && !control.isDisposed()) {
+// ((PartSite)getMainEditorSite()).getPane().doHide();
+// }
+
+ //FIXME : NEW code for Juno
+ final Control control = ((WorkbenchPartReference)((PartSite)getMainEditorSite()).getPartReference()).getPane().getControl();
if(control != null && !control.isDisposed()) {
- ((PartSite)getMainEditorSite()).getPane().doHide();
+ PartPane pane = ((WorkbenchPartReference)((PartSite)getMainEditorSite()).getPartReference()).getPane();
+ //FIXME : I think it is not the correct solution. Need to be tested
+ pane.getControl().dispose();
}
}
});

Back to the top