Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 15362 Details for
Bug 32666
[EditorMgmt] [Services] MultiEditor does not enable global actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to 3.0.1 WorkbenchPage
bug32666 patch.txt (text/plain), 4.45 KB, created by
Sean Kirby
on 2004-10-25 13:56:29 EDT
(
hide
)
Description:
Patch to 3.0.1 WorkbenchPage
Filename:
MIME Type:
Creator:
Sean Kirby
Created:
2004-10-25 13:56:29 EDT
Size:
4.45 KB
patch
obsolete
>Index: WorkbenchPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java,v >retrieving revision 1.154.2.2 >diff -u -r1.154.2.2 WorkbenchPage.java >--- WorkbenchPage.java 7 Sep 2004 19:12:19 -0000 1.154.2.2 >+++ WorkbenchPage.java 25 Oct 2004 16:43:42 -0000 >@@ -445,7 +445,7 @@ > return; > > // If zoomed, unzoom. >- if (isZoomed() && partChangeAffectsZoom(getReference(part))) >+ if (isZoomed() && partChangeAffectsZoom(getContainerReference(part))) > zoomOut(); > > if (part instanceof MultiEditor) { >@@ -580,7 +580,7 @@ > return; > > // If zoomed then ignore. >- if (isZoomed() && partChangeAffectsZoom(getReference(part))) >+ if (isZoomed() && partChangeAffectsZoom(getContainerReference(part))) > return; > > String label = part != null ? part.getTitle() : "none"; //$NON-NLS-1$ >@@ -589,7 +589,7 @@ > UIStats.start(UIStats.BRING_PART_TO_TOP, label); > // Move part. > if (part instanceof IEditorPart) { >- IEditorReference ref = (IEditorReference) getReference(part); >+ IEditorReference ref = (IEditorReference) getContainerReference(part); > broughtToTop = getEditorManager().setVisibleEditor(ref, false); > actionSwitcher.updateTopEditor((IEditorPart) part); > if (broughtToTop) { >@@ -823,7 +823,7 @@ > return false; > > if (part instanceof IEditorPart) { >- IEditorReference ref = (IEditorReference) getReference(part); >+ IEditorReference ref = (IEditorReference) getContainerReference(part); > return getEditorManager().containsEditor(ref); > } > if (part instanceof IViewPart) { >@@ -975,7 +975,7 @@ > return false; > > boolean partWasVisible = (editor == getActiveEditor()); >- IEditorReference ref = (IEditorReference) getReference(editor); >+ IEditorReference ref = (IEditorReference) getContainerReference(editor); > activationList.remove(ref); > boolean partWasActive = (editor == activePart); > >@@ -2715,7 +2715,7 @@ > if (newPart instanceof IEditorPart) { > lastActiveEditor = (IEditorPart) newPart; > IEditorReference ref = >- (IEditorReference) getReference(lastActiveEditor); >+ (IEditorReference) getContainerReference(lastActiveEditor); > editorMgr.setVisibleEditor(ref, true); > } > } >@@ -3255,7 +3255,12 @@ > return activationList.getParts(); > } > >- public IWorkbenchPartReference getReference(IWorkbenchPart part) { >+ /** >+ * This method behaves the same as {@link #getReference(IWorkbenchPart)} >+ * except that the inner editors for a MultiEditor will return an >+ * {@link IWorkbenchPartReference}to their outer editor. >+ */ >+ public IWorkbenchPartReference getContainerReference(IWorkbenchPart part) { > if (part == null) > return null; > PartPane pane = ((PartSite) part.getSite()).getPane(); >@@ -3263,6 +3268,17 @@ > MultiEditorInnerPane innerPane = (MultiEditorInnerPane) pane; > return innerPane.getParentPane().getPartReference(); > } >+ return getReference(part, pane); >+ } >+ >+ public IWorkbenchPartReference getReference(IWorkbenchPart part) { >+ if (part == null) >+ return null; >+ PartPane pane = ((PartSite) part.getSite()).getPane(); >+ return getReference(part, pane); >+ } >+ >+ private IWorkbenchPartReference getReference(IWorkbenchPart part, PartPane pane) { > if (pane == null) { > /* > * An error has occurred while creating the view. >@@ -3288,17 +3304,11 @@ > if (parts.size() <= 0) > return; > PartPane pane = ((PartSite) part.getSite()).getPane(); >- if (pane instanceof MultiEditorInnerPane) { >- MultiEditorInnerPane innerPane = (MultiEditorInnerPane) pane; >- setActive( >- innerPane.getParentPane().getPartReference().getPart(true)); >- } else { >- IWorkbenchPartReference ref = getReference(part); >- if (ref == parts.get(parts.size() - 1)) >- return; >- parts.remove(ref); >- parts.add(ref); >- } >+ IWorkbenchPartReference ref = getContainerReference(part); >+ if (ref == parts.get(parts.size() - 1)) >+ return; >+ parts.remove(ref); >+ parts.add(ref); > pane.addPropertyChangeListener(propertyChangeListener); > } > /* >@@ -3390,7 +3400,7 @@ > * the index, the more recent it was used. > */ > int indexOf(IWorkbenchPart part) { >- return parts.indexOf(getReference(part)); >+ return parts.indexOf(getContainerReference(part)); > } > /* > * Returns the index of the part reference within the activation list.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32666
: 15362