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 18780 - Explorer shows wrong selected node after startup
Summary: Explorer shows wrong selected node after startup
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 3.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 40756 (view as bug list)
Depends on: 44877
Blocks:
  Show dependency tree
 
Reported: 2001-12-18 15:07 UTC by _ gordonp
Modified: 2008-12-22 18:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2001-12-18 15:07:27 UTC
I typically start up netbeans with an explorer and select "Makefile".
When I restart I **always** get "Makefile.orig" selected, ie, netbeans
is remembering enough to attempt to restore my selection but not enough
to correctly restore it.

I've verified this problem with other file pairs too. If I select foo.h
in a directory which also has foo.cc and then exit, when I restart foo.cc
is selected.

Perhaps the selection code is ignoring suffixes?
Comment 1 David Simonek 2002-02-05 14:52:03 UTC
Passing to Marek.
Comment 2 mslama 2002-05-15 11:28:42 UTC
Why did you you assigned this issue to me? Keeping selected nodes in
explorer is not responsibility of winsys. I reassign this issue to
explorer.
Comment 3 David Simonek 2002-05-15 12:21:25 UTC
ok, my fault, thanks for reassigning
Comment 4 Jiri Rechtacek 2002-05-28 17:45:49 UTC
[May 28 dev]
I tried it on the recent build and the behavior changed. The selection
persists if it's sure node for selection if it's not sure then is
folder selected. IMHO it works for me, user couldn't be confused by
bad selection. If the behavior is wrong still, please reopen. Thanks.
Comment 5 Quality Engineering 2003-07-01 15:54:11 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 6 Quality Engineering 2003-07-01 16:20:04 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 7 _ gordonp 2003-07-09 23:56:53 UTC
I checked this issue with Rainier (release35R) and its
mostly better but not 100%. If I have multiple
Makefiles in my directory (Makefile, Makefile.old,
Makefile.foo, etc) and select Makefile before exiting,
when I restart I've got the 1st (alphabetical) Makefile
selected (Makefile.orig in my case) rather than the
one selected when I exited.

You should be able to duplicate this with a standard
netbeans build if you add the cpp module (which has
the Makefile support).
Comment 8 Jiri Rechtacek 2003-08-29 18:14:44 UTC
Same problem as in issue 21177, it's a other symptom of the known
problem with selecting nodes, will be solved if will be reimplemented
nodes/views.

*** This issue has been marked as a duplicate of 21177 ***
Comment 9 Marian Mirilovic 2003-09-02 18:07:51 UTC
verifying duplication
Comment 10 Jiri Rechtacek 2003-11-20 22:28:10 UTC
Bugfix 21177 doesn't help to solve this aspect of the problem.
Comment 11 Jiri Rechtacek 2004-03-04 16:04:55 UTC
I should be fixed in next release, reported several times. I guess it
could be fixed by similar way as in bugfix issue 21177.
Comment 12 Jiri Rechtacek 2004-03-04 16:06:24 UTC
*** Issue 40756 has been marked as a duplicate of this issue. ***
Comment 13 Jiri Rechtacek 2004-04-23 10:46:15 UTC
Assigned to new owner.
Comment 14 Jaroslav Tulach 2004-08-16 15:47:44 UTC
The problem of selecting wrong file is caused by the fact that node
name is given by data object and usually does not contain extension.
Then the system does not know which one to select. But this is fully
in control of data objects, they are responsible for given correct
names to their node delegates.
Comment 15 Jaroslav Tulach 2004-08-16 15:53:39 UTC
But in 4.0 the DefaultDataObject (that recognizes .orig or .old files)
keep the selection so, everything is ready for the explorer to
correctly select the right now. I've tested that the name contains
selection in this test:

openide/test/unit/src/org/openide/loaders/DefautDataObjectHasOpenTest.java,v
 <--  DefautDataObjectHasOpenTest.java
new revision: 1.2
Comment 16 Marian Mirilovic 2004-08-17 08:50:37 UTC
Gordon Prieur,
could you please verify this issue ?

Thanks in advance
Comment 17 Thomas Preisler 2004-08-18 18:31:23 UTC
How can I verify this in 4.0? I installed our module (cpp) in trunk
NetBeans and it looks like 4.0 doesn't remember the node selection
after restarting. It was the original symptom that the wrong node got
selected after restarting the IDE.
Comment 18 Petr Nejedly 2004-08-25 20:33:19 UTC
The issue 44877 was just fixed, so you can verify it now.
Comment 19 Thomas Preisler 2004-08-30 23:59:48 UTC
It does not seem to fix the problem in cpp. I will investigate whether
it is a bug in cpp....
Comment 20 Jaroslav Tulach 2004-08-31 15:15:21 UTC
If you create Makefile.old and Makefile.new and select one of them the
selection is remembered. I just verified this in NetBeans 4.0 Projects
view.
Comment 21 Petr Nejedly 2004-08-31 15:24:56 UTC
But I doubt it would work for MyApp.c vs. MyApp.h
(of course when you have cpp module installed)
Comment 22 Tomas Danek 2005-07-14 17:23:48 UTC
can someone who is using CPP module verify, that it works now??
Comment 23 _ gordonp 2005-07-14 18:14:52 UTC
Is the bug still relevant? If I select a file in NB4.1 (the release our Sun
Studio development is currently using), exit the IDE, and restart, the project
has been closed and there IS no file selected. The same is true if I select
a file in the Files view.

Is there a way to tell NB to leave the expanded project/directory open? Then
I could verify this. I actually consider it worse in NB41 because everything
in the explorer is closed after a restart.
Comment 24 Marian Mirilovic 2005-07-15 07:49:39 UTC
closed
Comment 25 Petr Nejedly 2005-07-15 09:44:42 UTC
> Is there a way to tell NB to leave the expanded project/directory open?
Yes, there is, -J-Dnetbeans.keep.expansion=true, but it is quite costly at
startup, that is why we made it an option, off by default.