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 153869 - Navigator window content persists even if editor is closed
Summary: Navigator window content persists even if editor is closed
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Navigator (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
: 98195 103319 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-25 15:10 UTC by crimcat
Modified: 2009-10-22 14:54 UTC (History)
3 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 crimcat 2008-11-25 15:10:25 UTC
Hello,

I've noticed the following problem in NetBeans 6.5 (not sure about NetBeans 6.1, but it seems to me that this is a 
platform issue):
- let's create new (from several files) or open existing C/C++ project;
- open some source files (assuming that parsing has been already completed);
- observe that Navigator window has proper contents;
- close ALL editor windows;
- the problem: Navigator window has the content related to the latest opened editor window.
As for me, this is a minor issue (so it's P3) but it's a bit confusion for the IDE user.
Comment 1 Alexander Pepin 2008-11-25 17:23:21 UTC
Please note that Navigators works for Editor, Project an Files windows if you have selected any source/header files in
these windows they also will be sown in Navigator. IMO it's not a bug, you needn't to open file in editor to see e.g.
which methods it contais, you just need to select this file in the Projects tab. 
Please confirm your point or close the issue.
Anyway I don't think it's P3.
Comment 2 crimcat 2008-11-25 22:31:40 UTC
Hello

Let me clarify my point with more details.
Let's have the following C/C++ project structure:
1) 'Header files' - one header file;
2) 'Resource files' - any number of some files, may be empty; this doesn't matter;
3) 'Sources files' - 2 files, for example.
Go ahead and expand 'Source files', then open one source file in the editor. You can see that the Navigator reflects 
the file internals, this is ok. Then collapse 'Source files' - the Navigator hasn't been changed, which seems 
reasonable because the editor is still open. Then, close editor. The Navigator windows is not changed again, but now 
it looks strange, because 'Source files' virtual folder is selected. Moreover, I can select another folder in the 
project pane and the Navigator windows is not changed anyway.
This behaviour seems to be a bit strange, because no source file is selected, but only a folder.
That's why I've submitted this CR. If you need more explanations, please, let me know.
Comment 3 Alexander Simon 2009-04-22 13:57:30 UTC
Same behavior for java, so it is platform problem.
Comment 4 Stanislav Aubrecht 2009-04-23 07:43:15 UTC
please provide steps to reproduce with a java file, it works for me in nb090421
Comment 5 Alexander Simon 2009-04-23 08:09:15 UTC
One of scenarios:
1. Create Java Application
2. Close editor
3. Select Main in project tree
Actual and expected: Navigator shows Main
4. Select javaapllication1 package
Actual: Navigator shows Main
Expected: Navigator is empty
Comment 6 Stanislav Aubrecht 2009-04-24 09:52:40 UTC
cc'ing the author of navigator api
Comment 7 Stanislav Aubrecht 2009-05-13 13:52:14 UTC
fixed

core-main d84a83393212
Comment 8 Quality Engineering 2009-05-14 07:57:03 UTC
Integrated into 'main-golden', will be available in build *200905140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d84a83393212
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #153869 - properly clear navigator window when no content is available
Comment 9 dromsik 2009-07-01 14:18:11 UTC
Hello,

After this fix, my plugin stopped working. I could use drag&drop to link selected nodes in Explorer window with nodes in
Navigator. Currently, I cannot. The problem is the following. I have opened Editor, and initialized Navigator with
content. I click a node in Explorer which doesn't have associated Navigator Panel ("content/unknown" MIME type) and want
to drag&drop it on a node in Navigator. But, when I click, Navigator window gets deactivated.
Could you, please, not to deactivate Navigator if there is at least one open Editor? Or, provide a way to override this
behaviour?
Comment 10 David Simonek 2009-07-01 17:36:34 UTC
I told you - this is not fixable for all IMHO without some options, as everybody expects something different :-( very
disappointing 
Comment 11 Marian Mirilovic 2009-10-22 13:33:33 UTC
*** Issue 103319 has been marked as a duplicate of this issue. ***
Comment 12 Marian Mirilovic 2009-10-22 14:54:16 UTC
*** Issue 98195 has been marked as a duplicate of this issue. ***