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 75105 Details for
Bug 198402
AdvancedPropertySection extensibility support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
registers action bar contributions of the AdvancedPropertySection
actionbarscontributions.patch (text/plain), 3.36 KB, created by
Carsten Pfeiffer
on 2007-08-01 04:36:19 EDT
(
hide
)
Description:
registers action bar contributions of the AdvancedPropertySection
Filename:
MIME Type:
Creator:
Carsten Pfeiffer
Created:
2007-08-01 04:36:19 EDT
Size:
3.36 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.views.properties.tabbed >Index: src/org/eclipse/ui/views/properties/tabbed/AdvancedPropertySection.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/AdvancedPropertySection.java,v >retrieving revision 1.2 >diff -u -r1.2 AdvancedPropertySection.java >--- src/org/eclipse/ui/views/properties/tabbed/AdvancedPropertySection.java 17 Apr 2006 18:56:22 -0000 1.2 >+++ src/org/eclipse/ui/views/properties/tabbed/AdvancedPropertySection.java 1 Aug 2007 08:35:31 -0000 >@@ -14,6 +14,7 @@ > import org.eclipse.swt.layout.FormAttachment; > import org.eclipse.swt.layout.FormData; > import org.eclipse.swt.widgets.Composite; >+import org.eclipse.ui.IActionBars; > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.views.properties.PropertySheetPage; > >@@ -30,6 +31,11 @@ > * The Property Sheet Page. > */ > protected PropertySheetPage page; >+ >+ /** >+ * Whether action bar contributions have been registered or not. >+ */ >+ private boolean contributionsRegistered; > > /** > * @see org.eclipse.ui.views.properties.tabbed.ISection#createControls(org.eclipse.swt.widgets.Composite, >@@ -86,4 +92,49 @@ > public boolean shouldUseExtraSpace() { > return true; > } >+ >+ /** >+ * Registers the part contributions of the property sheet page. >+ */ >+ public void aboutToBeShown() { >+ super.aboutToBeShown(); >+ >+ registerPartContributions(); >+ } >+ >+ /** >+ * Unregisters the part contributions of the property sheet page. >+ */ >+ public void aboutToBeHidden() { >+ super.aboutToBeHidden(); >+ >+ unregisterPartContributions(); >+ } >+ >+ /** >+ * Registers the property sheet page's contributions (toolbar, menubar, ...) >+ */ >+ private void registerPartContributions() { >+ if (contributionsRegistered) { >+ return; >+ } >+ >+ contributionsRegistered = true; >+ IActionBars actionBars = tabbedPropertySheetPage.getSite().getActionBars(); >+ page.makeContributions(actionBars.getMenuManager(), actionBars.getToolBarManager(), actionBars.getStatusLineManager()); >+ actionBars.getToolBarManager().update(true); >+ } >+ >+ /** >+ * Remove the property sheet page's contributions. >+ * (Actually removes all contributions) >+ */ >+ private void unregisterPartContributions() { >+ contributionsRegistered = false; >+ IActionBars actionBars = tabbedPropertySheetPage.getSite().getActionBars(); >+ actionBars.getMenuManager().removeAll(); >+ actionBars.getToolBarManager().removeAll(); >+ actionBars.getStatusLineManager().removeAll(); >+ actionBars.getToolBarManager().update(true); >+ } > } >Index: src/org/eclipse/ui/views/properties/tabbed/AbstractPropertySection.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/views/properties/tabbed/AbstractPropertySection.java,v >retrieving revision 1.1 >diff -u -r1.1 AbstractPropertySection.java >--- src/org/eclipse/ui/views/properties/tabbed/AbstractPropertySection.java 30 Jan 2006 21:34:23 -0000 1.1 >+++ src/org/eclipse/ui/views/properties/tabbed/AbstractPropertySection.java 1 Aug 2007 08:35:31 -0000 >@@ -33,7 +33,7 @@ > /** > * The tabbed property sheet page > */ >- private TabbedPropertySheetPage tabbedPropertySheetPage; >+ protected TabbedPropertySheetPage tabbedPropertySheetPage; > > /** > * The current workbench selection.
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 198402
: 75105