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 26326 - Expand project nodes when opening the project
Summary: Expand project nodes when opening the project
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on: 7551 29760
Blocks:
  Show dependency tree
 
Reported: 2002-08-06 22:54 UTC by Torbjorn Norbye
Modified: 2003-12-11 14:25 UTC (History)
2 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2002-08-06 22:54:53 UTC
Request #1:
  When I open a project, it comes up completely
  "collapsed": to get to my project contents I have
  to iteratively expand nodes down the hierarchy until
  I get to the file I'm interested in. 

  Since I almost always want to get to the Sources,
  I think opening the project should default to
expanding
  it down to the Sources contents.

Request #2:
  Enhance the above to remember the open/close state
  for each node in the project. That way, when I close
  a project and come back to it, it looks identical
  to the way it looked when I left it.  The open/close
  states for each node should be private obviously so
  each project user can have an individual expansion
  state.

Request #3:
  Also remember the selected node, such that it's
selected
  (and shown, if the explorer must be scrolled) when
  I return to the project.
Comment 1 David Konecny 2002-08-06 23:58:26 UTC
Tor, the issue I had in mind was issue 6559. If it will be
generalized, I will make this one dependent on it.
Comment 2 David Konecny 2002-08-07 00:03:59 UTC
There already is issue for this in openide - issue 7551.
Comment 3 Vitezslav Stejskal 2003-01-02 13:15:10 UTC
ad #1: This is fair requirement, I think, although I can find nothing
about it in uispec. Dirk, please, could you define how the projects
nodes should look like when the project is opened. Please note that
this will be implemented in the infrastructure so the behavior should
not access any node provided by specific module nature (e.g. packages
node coming from java-nature). IMO, it would be enough to expand node
structure at the level of project main node and sources node
(resources and output nodes remain collapsed).

ad #2: This is a problem of core/window system which may need some
explorer API extension (see issue #29760 and issue 27551).

ad #3: This should work now (or at least it could since everything
needed is in place), however, I saw some problems with several nodes
which constructing looks doen't return the name for them causing the
explorer's TopComponent to fail to serialize. I'll review the looks
and fix them or file separate issues for modules providing them.
Comment 4 Dirk Ruiz 2003-01-06 22:50:11 UTC
ad #1: Guilty as charged -- there's nothing in the UI
spec.  I agree with your proposal, to expand the project's
top-level node and to expand the Sources node upon project
creation/opening.  So, a basic Java project would open up
looking like:

[ ] My Java Project
 |
 +-- [ ] Resources
 |
 +-- [ ] Output
 |
 --- [ ] Sources
      |
      +-- [ ] Packages

Question.  Is it possible for a module (or the
infrastructure) to open a given file upon project
creation?  For example, the user might create a GUI
project that has a single Java file with an associated GUI
form.  It would be great if we could steal a bit from .NET
and pre-open that file in the editor.  In that case, the
newly-opened project would look like:

[ ] My Java Project
 |
 +-- [ ] Resources
 |
 +-- [ ] Output
 |
 --- [ ] Sources
      |
      +-- [ ] Packages
           |
           +-- [ ] Form1.java

Form1.java would be open in the Form Editor and the Source
Editor.

ad #2: Tor -- in this context, when you say, "close/open"
do you mean collapsing and expanding the node, or do you
mean removing the project from under the Projects node and
then reopening it using the Open action?  I presume you
mean the former.  If so, this definitely should be
implemented.

ad #3: This one worries me a bit.  It sounds like you're
advocating jumping the user's node selection when she
expands a project's node.  For example, if I have foo.java
selected in project P1, and then I expand project P2, my
selection will jump down to bar.java (which had previously
been selected in P2)?  I guess I worry about forcibly
changing the user's selection, particularly in an IDE like
this one that is so context sensitive.  The only time this
seems reasonable is if the user has selected, say,
bar.java inside of P2 and then she collapses P2.  Then it
makes sense to move the selection to P2, since the
selected object (bar.java) is no longer visible.
Comment 5 Vitezslav Stejskal 2003-01-07 14:05:35 UTC
ad #1: The module can influence instantiiation of the new project and
therefore it can open the file in editor for example. There might be
some troubles with selecting file's node in the explorer, but I
believe we will be able to solve it somehow.

add #3: I thing Tor's concern is to restore explorer after restart of
IDE *exactly* as it was before the shutdown. It means to remember &
restore collapsed/opened state of all nodes and the nodes selection.
During the IDE session the nodes selection is controlled by the user
only (no magic done by the IDE).
Comment 6 Dirk Ruiz 2003-01-08 22:06:51 UTC
ad #1.  Great!

ad #2.  Tor -- what did you mean?
Comment 7 Torbjorn Norbye 2003-01-09 00:30:21 UTC
#2 - I was referring to the expanded/collapsed state of every node in
the project. If I have drilled down seven levels to an individual
package in the project, I don't want to have to redo that when I
return to the project tomorrow. (Btw, if I ignore e-mail it's because
I'm not reading the projects stuff very carefully anymore so please
send me separate e-mail if you want a response. Luckily, this one
caught my eye.)
Comment 8 Vitezslav Stejskal 2003-01-09 10:26:19 UTC
Good, so let's implement the #1, #2 is filed and being solved by core,
#3 already works.
Comment 9 Vitezslav Stejskal 2003-04-08 19:24:35 UTC
The project's main node is now expended after the project is created
or opened.
Comment 10 Jan Becicka 2003-11-25 14:04:51 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as VERIFIED --->
Comment 11 Jan Becicka 2003-11-25 14:14:00 UTC
---> CLOSED