Bug 24186 - [ActionSets] "Open Project" action deactivates too often
Summary: [ActionSets] "Open Project" action deactivates too often
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux-Motif
: P5 normal with 6 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2002-09-27 11:03 EDT by Jared Burns CLA
Modified: 2022-02-14 03:24 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2002-09-27 11:03:05 EDT
Build 20020924

The menu item "Project->Open Project" activates either when the packages view 
is active or when a closed project is selected in the navigator view.

Since this action just pops up a dialog displaying the currently closed 
packages, the menu item's activation should only be based on whether or not 
there are closed projects in the workspace.
Comment 1 Simon Arsenault CLA 2002-11-15 11:36:07 EST
Works properly for me.
Comment 2 Jared Burns CLA 2002-11-15 12:21:12 EST
This doesn't work in Build 20021114.

1. Close a project.
2. Close the packages view and navigator.
3. Click "Project".
4. The "Open Project" menu item is disabled despite the fact that there is a 
closed project in the workspace.
Comment 3 Simon Arsenault CLA 2002-12-03 11:38:49 EST
The problem is no part is providing an action handler for this global action. 
Nevetherless, this implementation problem is not intuitive for the user.

Need to investigate what could be done here.
Comment 4 Jared Burns CLA 2002-12-03 11:56:53 EST
Just making the action be enabled always would be better than what we have
today. The "best" solution would probably involve a listener that would 
update the action's enablement based on project open/close events, but this
really seems like overkill.

If the action is enabled all the time, the worst that will happen is a user
who has no closed projects will click "Open Project" and see an empty dialog,
informing them that they've got no closed projects.
Comment 5 Simon Arsenault CLA 2003-01-07 11:12:49 EST
Not for release 2.1
Comment 6 David Almilli CLA 2003-04-02 20:11:56 EST
Doesn't work in 2.1.  It is greyed out if you have any resource in an open 
project selected.  If you deselect the current item (Ctrl click) then the menu 
item is now enabled.  This should really be fixed to always allow a project to 
be opened if there is at least one project that is closed.  It shouldn't behave 
differently depending on what is selected.
Comment 7 Paul Smith CLA 2003-07-10 23:03:13 EDT
This is particularly problematic when you really like the Java Browsing 
Perspective.  It's easy for something in the Project pane to be selected, which 
renders the Open Project action either hidden from popup menus, or grey out.  
Switching perspectives, or ctrl-clicking the currently selected node in 
projects pane makes the action available again.

Hardly critical, but more of a usability PITA.  Under what circumstances would 
you NOT want the Open Project action enabled?
Comment 8 Roberto S. Tyley CLA 2003-09-09 06:09:14 EDT
This usability issue is still present in 3.0M3 (using Win2000).

If anything at all is selected in the Projects View, there is no 'Open Project'
option in the context menu, and the 'Open Project' option is greyed out in the
drop-down Project menu. Also, there's no obvious way to make it so that nothing
is selected in the view (for instance, by clicking on unoccupied 'white space').
After a few false starts, I found that I could get the desired effect by holding
down CTRL and clicking on whatever items are selected to un-select them - damn
fiddly!
Comment 9 Paul Smith CLA 2004-08-05 18:14:52 EDT
This seriously has been annoying me for so long I am posting again.  

WHY is the Open Project disabled in the first place...  Again, under _what_ 
condition should/would/could you not want to be able to open a project?

At the momemt, this is the steps I have to take to open a project:

* Open/Show the Package Explorer
* CTRL+Click the currently selected item to unselect it
* Now I can choose Open Project

Doesn't that sound silly?  If you have a number of projects, but not all open to 
minimise confusion, then to reopen one is a pain.

Having said all that, 3.0 is grooooovy.
Comment 10 Tod Creasey CLA 2006-06-22 10:51:18 EDT
Is this still an issue in 3.2?
Comment 11 Jared Burns CLA 2006-06-22 11:27:21 EDT
Yes. Please just enable the action.
Comment 12 Paul Webster CLA 2007-04-05 19:01:51 EDT
Assigning to component owner
PW
Comment 13 Remy Suen CLA 2007-09-21 10:04:04 EDT
I want to note that the 'Open Project' action being exected when the active view is the 'Package Explorer' and the one that is executed when the active view is the 'Navigator' or the 'Project Explorer' is _not_ the same. There is the org.eclipse.jdt.ui.actions.OpenProjectAction from JDT and org.eclipse.ui.actions.OpenResourceAction that is from the Platform. JDT's will provide a listing of projects in a dialog whereas the Platform's only opens the projects that have been currently selected. Both does suffer from the deactivation behaviour described in this bug.

While the Platform's one is called OpenResourceAction, it actually is coded to work with projects only. I propose that the action be changed to provide a listing like JDT's in a dialog and a separate bug be filed for JDT to enable/disable their action accordingly and/or just adapt the Platform's updated action once that's fixed.
Comment 14 Remy Suen CLA 2007-12-15 15:53:26 EST
Jared, are you fine if a listing of closed projects is provided like what happens now if you bring up the context menu on an opened project in the 'Package Explorer' and select 'Open Project' if no projects is currently selected?

Paul, is it cool if we return false only if we currently have no closed projects in the workspace?

I will proceed with writing a patch if both parties have no problems.
Comment 15 Jared Burns CLA 2007-12-19 21:56:43 EST
Yep. Allowing the user to choose from the list of closed projects makes sense.
Comment 16 Dani Megert CLA 2010-04-13 12:16:50 EDT
> and a separate bug be filed for JDT to
>enable/disable their action accordingly
I've fixed that in HEAD for the Package Explorer.
Comment 17 Eclipse Webmaster CLA 2019-09-06 16:09:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 18 Eclipse Genie CLA 2022-02-14 03:24:01 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.