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 185259 Details for
Bug 55295
[ViewMgmt] View menu is shown even if all of its items are invisible
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]
ViewPane patch v2
bug55295-patch-v2.txt (text/plain), 2.66 KB, created by
Remy Suen
on 2010-12-15 15:05:49 EST
(
hide
)
Description:
ViewPane patch v2
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2010-12-15 15:05:49 EST
Size:
2.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/ViewPane.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ViewPane.java,v >retrieving revision 1.111 >diff -u -r1.111 ViewPane.java >--- Eclipse UI/org/eclipse/ui/internal/ViewPane.java 25 May 2009 20:52:11 -0000 1.111 >+++ Eclipse UI/org/eclipse/ui/internal/ViewPane.java 15 Dec 2010 20:04:26 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2009 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,6 +13,7 @@ > package org.eclipse.ui.internal; > > >+import org.eclipse.jface.action.IContributionItem; > import org.eclipse.jface.action.MenuManager; > import org.eclipse.jface.internal.provisional.action.IToolBarManager2; > import org.eclipse.jface.util.IPropertyChangeListener; >@@ -96,7 +97,16 @@ > protected void update(boolean force, boolean recursive) { > super.update(force, recursive); > >- boolean hasMenu = !isEmpty(); >+ boolean hasMenu = false; >+ IContributionItem[] items = getItems(); >+ for (int i = 0; i < items.length; i++) { >+ if (items[i].isVisible() && !items[i].isSeparator() && !items[i].isGroupMarker()) { >+ // only show the menu if we have visible items that aren't separators or group markers >+ hasMenu = true; >+ break; >+ } >+ } >+ > if (hasMenu != hadViewMenu) { > hadViewMenu = hasMenu; > firePropertyChange(IPresentablePart.PROP_PANE_MENU); >@@ -401,19 +411,13 @@ > return !page.isFixedLayout(); > } > >- /** >- * Return if there should be a view menu at all. >- * There is no view menu if there is no menu manager, >- * no pull down button or if the receiver is an >- * inactive fast view. >- */ >+ /** >+ * Returns whether there should be a view menu or not. There should not be a >+ * view menu if there is no menu manager or the manager itself has no >+ * visible items that are not separators or group markers. >+ */ > public boolean hasViewMenu() { >- >- if (isvMenuMgr != null) { >- return !isvMenuMgr.isEmpty(); >- } >- >- return false; >+ return isvMenuMgr != null && hadViewMenu; > } > > public void showViewMenu(Point location) {
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 55295
:
185257
| 185259