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 161274 Details for
Bug 280299
[design] provide a solution to make all viewactions visible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch to make all viewactions visible
viewactionVisibility.patch (text/plain), 4.91 KB, created by
Holger Staudacher
on 2010-03-08 05:46:28 EST
(
hide
)
Description:
Patch to make all viewactions visible
Filename:
MIME Type:
Creator:
Holger Staudacher
Created:
2010-03-08 05:46:28 EST
Size:
4.91 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java,v >retrieving revision 1.4 >diff -u -r1.4 WorkbenchWindowConfigurer.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java 11 Dec 2009 12:57:05 -0000 1.4 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java 8 Mar 2010 10:44:53 -0000 >@@ -28,6 +28,7 @@ > import org.eclipse.jface.action.IToolBarManager; > import org.eclipse.jface.internal.provisional.action.ICoolBarManager2; > import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem; >+import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.window.Window; > import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.rwt.branding.AbstractBranding; >@@ -649,6 +650,15 @@ > = element.getChildren( "presentationFactory" ); > if( factory.length > 0 ) { > result = factory[ 0 ].getAttribute( "id" ); >+ String visibility = factory[ 0 ].getAttribute( "viewactionsVisible" ); >+ boolean actionsVisible = false; >+ if( visibility != null >+ && Boolean.valueOf( visibility ).booleanValue() ) >+ { >+ actionsVisible = true; >+ } >+ IPreferenceStore apiPreferenceStore = PrefUtil.getAPIPreferenceStore(); >+ apiPreferenceStore.setValue( "viewactionsVisible", actionsVisible ); > } > return result; > } >Index: Eclipse UI/org/eclipse/rap/ui/interactiondesign/ConfigurationAction.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.ui.workbench/Eclipse UI/org/eclipse/rap/ui/interactiondesign/ConfigurationAction.java,v >retrieving revision 1.2 >diff -u -r1.2 ConfigurationAction.java >--- Eclipse UI/org/eclipse/rap/ui/interactiondesign/ConfigurationAction.java 12 Nov 2009 18:47:50 -0000 1.2 >+++ Eclipse UI/org/eclipse/rap/ui/interactiondesign/ConfigurationAction.java 8 Mar 2010 10:44:53 -0000 >@@ -205,12 +205,14 @@ > * @return the visibility of the part menu. > */ > public boolean isPartMenuVisible() { >- boolean result = false; >- if( stackPresentation instanceof ConfigurableStack ) { >- ConfigurableStack configStack = ( ConfigurableStack )stackPresentation; >- String paneId = configStack.getPaneId( site ); >- String identifier = getPartMenuIdentifier( paneId ); >- result = loadPartmenuVisibility( identifier ); >+ boolean result = true; >+ if( !allActionsVisible() ) { >+ if( stackPresentation instanceof ConfigurableStack ) { >+ ConfigurableStack configStack = ( ConfigurableStack )stackPresentation; >+ String paneId = configStack.getPaneId( site ); >+ String identifier = getPartMenuIdentifier( paneId ); >+ result = loadPartmenuVisibility( identifier ); >+ } > } > return result; > } >@@ -243,13 +245,21 @@ > public boolean isViewActionVisibile( > final String viewId, final String actionId ) > { >+ boolean result = true; >+ if( !allActionsVisible() ) { >+ String identifier = getActionIdentifier( viewId, actionId ); >+ ScopedPreferenceStore prefStore >+ = ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore(); >+ result = prefStore.getBoolean( identifier ); >+ } >+ return result; >+ } >+ >+ private boolean allActionsVisible() { > boolean result = false; >- String identifier = getActionIdentifier( viewId, actionId ); >- >- ScopedPreferenceStore prefStore >- = ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore(); >- result = prefStore.getBoolean( identifier ); >- >+ // check if all actions are visible or not >+ IPreferenceStore apiPreferenceStore = PrefUtil.getAPIPreferenceStore(); >+ result = apiPreferenceStore.getBoolean( "viewactionsVisible" ); > return result; > } > >#P org.eclipse.rap.ui >Index: schema/rap/branding.exsd >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.ui/schema/rap/branding.exsd,v >retrieving revision 1.7 >diff -u -r1.7 branding.exsd >--- schema/rap/branding.exsd 26 Nov 2009 14:48:43 -0000 1.7 >+++ schema/rap/branding.exsd 8 Mar 2010 10:44:54 -0000 >@@ -300,6 +300,13 @@ > </documentation> > </annotation> > </attribute> >+ <attribute name="viewactionsVisible" type="boolean"> >+ <annotation> >+ <documentation> >+ Sets the default vibility value for a view's action/command. When checked, all actions are visible. When unchecked all actions are invisible and can be configured via the configuration menu. >+ </documentation> >+ </annotation> >+ </attribute> > </complexType> > </element> >
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 280299
:
142135
|
142136
|
161274
|
161275