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 2026 Details for
Bug 2529
[Navigator] Open/Close project not always available (1GFKW5S)
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]
Enable Open/Close for multiple file selection
2529_patch.txt (text/plain), 1.21 KB, created by
Andrew Irvine
on 2002-09-19 15:41:24 EDT
(
hide
)
Description:
Enable Open/Close for multiple file selection
Filename:
MIME Type:
Creator:
Andrew Irvine
Created:
2002-09-19 15:41:24 EDT
Size:
1.21 KB
patch
obsolete
>Index: CloseResourceAction.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui/Eclipse UI/org/eclipse/ui/actions/CloseResourceAction.java,v >retrieving revision 1.9 >diff -u -r1.9 CloseResourceAction.java >--- CloseResourceAction.java 10 May 2002 15:33:42 -0000 1.9 >+++ CloseResourceAction.java 19 Sep 2002 19:40:05 -0000 >@@ -200,10 +200,21 @@ > /** > * The <code>CloseResourceAction</code> implementation of this > * <code>SelectionListenerAction</code> method ensures that this action is >- * enabled only if all of the selected resources are projects. >+ * enabled only if one of the selections is a closed project. > */ > protected boolean updateSelection(IStructuredSelection s) { >- return super.updateSelection(s) && selectionIsOfType(IProject.PROJECT); >+ // don't call super since we want to enable if open project is selected. >+ if (!selectionIsOfType(IResource.PROJECT)) >+ return false; >+ >+ Iterator resources = getSelectedResources().iterator(); >+ while (resources.hasNext()) { >+ IProject currentResource = (IProject) resources.next(); >+ if (currentResource.isOpen()) { >+ return true; >+ } >+ } >+ return false; > } > > /**
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 2529
: 2026