Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 280299 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchWindowConfigurer.java (+10 lines)
Lines 28-33 Link Here
28
import org.eclipse.jface.action.IToolBarManager;
28
import org.eclipse.jface.action.IToolBarManager;
29
import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
29
import org.eclipse.jface.internal.provisional.action.ICoolBarManager2;
30
import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
30
import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem;
31
import org.eclipse.jface.preference.IPreferenceStore;
31
import org.eclipse.jface.window.Window;
32
import org.eclipse.jface.window.Window;
32
import org.eclipse.osgi.util.TextProcessor;
33
import org.eclipse.osgi.util.TextProcessor;
33
import org.eclipse.rwt.branding.AbstractBranding;
34
import org.eclipse.rwt.branding.AbstractBranding;
Lines 649-654 Link Here
649
        = element.getChildren( "presentationFactory" );
650
        = element.getChildren( "presentationFactory" );
650
      if( factory.length > 0 ) {
651
      if( factory.length > 0 ) {
651
        result = factory[ 0 ].getAttribute( "id" );
652
        result = factory[ 0 ].getAttribute( "id" );
653
        String visibility = factory[ 0 ].getAttribute( "viewactionsVisible" );
654
        boolean actionsVisible = false;
655
        if( visibility != null 
656
            && Boolean.valueOf( visibility ).booleanValue() ) 
657
        {
658
          actionsVisible = true;
659
        }
660
        IPreferenceStore apiPreferenceStore = PrefUtil.getAPIPreferenceStore();
661
        apiPreferenceStore.setValue( "viewactionsVisible", actionsVisible );
652
      }
662
      }
653
      return result;
663
      return result;
654
    }
664
    }
(-)Eclipse UI/org/eclipse/rap/ui/interactiondesign/ConfigurationAction.java (-12 / +22 lines)
Lines 205-216 Link Here
205
   * @return the visibility of the part menu.
205
   * @return the visibility of the part menu.
206
   */
206
   */
207
  public boolean isPartMenuVisible() {
207
  public boolean isPartMenuVisible() {
208
    boolean result = false;
208
    boolean result = true;
209
    if( stackPresentation instanceof ConfigurableStack ) {
209
    if( !allActionsVisible() ) {
210
      ConfigurableStack configStack = ( ConfigurableStack )stackPresentation;
210
      if( stackPresentation instanceof ConfigurableStack ) {
211
      String paneId = configStack.getPaneId( site );
211
        ConfigurableStack configStack = ( ConfigurableStack )stackPresentation;
212
      String identifier = getPartMenuIdentifier( paneId );
212
        String paneId = configStack.getPaneId( site );
213
      result = loadPartmenuVisibility( identifier );
213
        String identifier = getPartMenuIdentifier( paneId );
214
        result = loadPartmenuVisibility( identifier );
215
      }
214
    }
216
    }
215
    return result;
217
    return result;
216
  }
218
  }
Lines 243-255 Link Here
243
  public boolean isViewActionVisibile(
245
  public boolean isViewActionVisibile(
244
    final String viewId, final String actionId )
246
    final String viewId, final String actionId )
245
  {
247
  {
248
    boolean result = true;
249
    if( !allActionsVisible() ) {
250
      String identifier = getActionIdentifier( viewId, actionId );  
251
      ScopedPreferenceStore prefStore
252
        = ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore();
253
      result = prefStore.getBoolean( identifier );
254
    }
255
    return result;
256
  }
257
  
258
  private boolean allActionsVisible() {
246
    boolean result = false;
259
    boolean result = false;
247
    String identifier = getActionIdentifier( viewId, actionId );
260
    // check if all actions are visible or not
248
261
    IPreferenceStore apiPreferenceStore = PrefUtil.getAPIPreferenceStore();
249
    ScopedPreferenceStore prefStore
262
    result = apiPreferenceStore.getBoolean( "viewactionsVisible" );    
250
      = ( ScopedPreferenceStore ) PrefUtil.getAPIPreferenceStore();
251
    result = prefStore.getBoolean( identifier );
252
253
    return result;
263
    return result;
254
  }
264
  }
255
265
(-)schema/rap/branding.exsd (+7 lines)
Lines 300-305 Link Here
300
               </documentation>
300
               </documentation>
301
            </annotation>
301
            </annotation>
302
         </attribute>
302
         </attribute>
303
         <attribute name="viewactionsVisible" type="boolean">
304
            <annotation>
305
               <documentation>
306
                  Sets the default vibility value for a view&apos;s action/command. When checked, all actions are visible. When unchecked all actions are invisible and can be configured via the configuration menu.
307
               </documentation>
308
            </annotation>
309
         </attribute>
303
      </complexType>
310
      </complexType>
304
   </element>
311
   </element>
305
312

Return to bug 280299