This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 54122 - Open action on project folder
Summary: Open action on project folder
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Favorites (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2005-01-28 05:35 UTC by Pavel Buzek
Modified: 2008-12-22 20:53 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Buzek 2005-01-28 05:35:53 UTC
I am using the core/favorites module for
navigation in files and find it much more
effective then the open dialog. I would like to be
able to open project files from there.
Comment 1 Jesse Glick 2005-03-10 16:31:45 UTC
Reasonable.
Comment 2 mslama 2005-04-18 14:25:11 UTC
I need more info: I just checked and there are actions Edit and View in both
cases. It is the same in Files tab and Projects tab on 'Project Metadata' node.
What is 'Open' action? Where could I get it from? I checked current my own dev
build from trunk 050418.
Comment 3 Pavel Buzek 2005-04-18 15:06:56 UTC
The "Open" action on project.xml should not open the project file in editor, it
should open the project that it represents in IDE (show it in Projects tab of
explorer).
Comment 4 mslama 2005-04-18 15:21:10 UTC
I see. CCing project people to suggest possible solution(s).
Comment 5 mslama 2005-04-18 15:24:02 UTC
Jesse, Petr could you suggest some solution (if any solution is possible)? Thanks.
Comment 6 Pavel Buzek 2005-04-18 16:11:13 UTC
perhaps something like:

FileObject f = ... // project.xml
OpenProjects.getDefault().open(new Project [] {ProjectManager.findProject
(f.getParent())}, false);
Comment 7 mslama 2005-04-18 16:19:20 UTC
Pavel what about module dependency? Are you sure core/favorites should depend on
Projects UI API????
Comment 8 Jesse Glick 2005-04-18 16:28:48 UTC
I don't see any problem with a core/favorites -> projects/projectuiapi dep.

Rather than fooling around with project.xml, which is an implementation detail
of Ant-based projects, I would suggest that dirs in Favorites which are in fact
project folders should be marked with an icon badge, just as they are in the
Open Project dialog, and their context menu should start with

  Open Project <<<the project name here>>
  ---------------------------------------
  New >
  ---------------------------------------
  .... [as before]
Comment 9 Jesse Glick 2005-04-18 16:29:26 UTC
Of course the menu item should be disabled in case that project is already open.
Comment 10 Pavel Buzek 2005-04-18 16:30:50 UTC
or maybe create a different loader for project.xml in projectui module? I do not
know..
Comment 11 Jesse Glick 2005-04-18 16:38:40 UTC
-1 on special loader for project.xml.
Comment 12 Milos Kleint 2005-04-19 07:35:11 UTC
-1 for loader as well, jesse's solution will work for any kind of project.

the loaders solution could clash with other possible project types, for example
maven uses project.xml file as well, but in maven2 it's renamed to pom.xml.
Comment 13 Petr Hrebejk 2005-04-19 08:05:24 UTC
May I add my -1, too? As Jesse said the project.xml is just an implementation
detail of special kind of projects. Notice that we don't refer to the
project.xml file or nbproject directory in the GUI. I don't think that we should
start doing that.
Please either close this as invalid or change the summary to "Open action on
project folder".

BTW I don't like the favorites->projectUIAPI dependency. Platform users may want
to use favourites tab without using project IMO.


Comment 14 mslama 2005-04-19 08:29:29 UTC
Ok. It is possible to implement by introducing dependency Favorites on Projects
UI API. Before technical review I pass this to HIE for UI review as this is not
minor change.
Comment 15 Jesse Glick 2005-04-19 16:32:20 UTC
Changing summary accordingly. Re. module dep - favorites in not in the platform
to begin with. If there is some real request to use it in the platform, I guess
we can split off a favorites-projectui bridge as needed. (Or people can simply
add projectapi and projectuiapi to the platform - they introduce no GUI on their
own and will have no real effect on anything.)
Comment 16 Jesse Glick 2005-12-12 18:24:47 UTC
1. In 5.0, Open Project will preselect the project dir corresponding to a closed
project which owns the current file selection. Complicated to explain but should
do what you want and often reduce the need for this RFE.

2. There is a module contrib/openproject which I think basically addresses this
RFE; I will merge its functionality into projectui. It adds to context menu of a
closed project folder a menu item like

  Open Project "Foo"
  ------------------
  <<as before>>

It does not badge the project folder; that would be hard to implement in the
Favorites tab, but would be reasonable in the Files tab. Something to consider
separately I guess.
Comment 17 Jesse Glick 2005-12-12 20:10:36 UTC
removed     * Up-To-Date  1.1         contrib/openproject/.cvsignore
removed     * Up-To-Date  1.1         contrib/openproject/build.xml
removed     * Up-To-Date  1.1         contrib/openproject/manifest.mf
removed     * Up-To-Date  1.1         contrib/openproject/nbproject/.cvsignore
removed     * Up-To-Date  1.1        
contrib/openproject/nbproject/project.properties
removed     * Up-To-Date  1.1         contrib/openproject/nbproject/project.xml
removed     * Up-To-Date  1.1        
contrib/openproject/src/org/netbeans/modules/openproject/Bundle.properties
removed     * Up-To-Date  1.1        
contrib/openproject/src/org/netbeans/modules/openproject/OpenProjectFolderAction.java
removed     * Up-To-Date  1.1        
contrib/openproject/src/org/netbeans/modules/openproject/layer.xml
committed   * Up-To-Date  1.17        ide/golden/moduleconfigs.txt
committed   * Up-To-Date  1.352       nbbuild/build.properties
committed   * Up-To-Date  1.25       
projects/projectui/src/org/netbeans/modules/project/ui/actions/Bundle.properties
added       * Up-To-Date  1.1        
projects/projectui/src/org/netbeans/modules/project/ui/actions/OpenProjectFolderAction.java
committed   * Up-To-Date  1.65       
projects/projectui/src/org/netbeans/modules/project/ui/resources/layer.xml
Comment 18 Marian Mirilovic 2006-07-11 08:10:31 UTC
verified