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 185257 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 v1
bug55295-patch-v1.txt (text/plain), 2.46 KB, created by
Remy Suen
on 2010-12-15 14:47:20 EST
(
hide
)
Description:
ViewPane patch v1
Filename:
MIME Type:
Creator:
Remy Suen
Created:
2010-12-15 14:47:20 EST
Size:
2.46 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 19:46:39 -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()) { >+ // only show the menu if we have visible items >+ hasMenu = true; >+ break; >+ } >+ } >+ > if (hasMenu != hadViewMenu) { > hadViewMenu = hasMenu; > firePropertyChange(IPresentablePart.PROP_PANE_MENU); >@@ -402,18 +412,11 @@ > } > > /** >- * 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. >- */ >+ * Return if there should be a view menu at all. There is no view menu if >+ * there is no menu manager or the manager itself has no visible items. >+ */ > 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