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 109090

Summary: [68cat] 'Select Node in Files' should locate file relative to the most specific mount point
Product: projects Reporter: matthies <matthies>
Component: Generic Projects UIAssignee: Tomas Stupka <tstupka>
Status: REOPENED ---    
Severity: blocker CC: pjiricka
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: screenshot

Description matthies 2007-07-08 22:40:58 UTC
The following is a common set-up for Java EE projects:
1. Create a Java EE Application project named "A"
2. Create some Java EE Module project named "B" within the directory for A and add it to A.
3. Create some source file in "B".

Now the "Files" window shows a directory tree for A and one for B. The one for B is duplicated within A, thus the 
source file is contained in both trees. When performing 'Select Node in Files' (Ctrl+shift+2) upon the source file, it 
is being selected under A, not under B.

It's common to work with the "B" tree (because it is less deeply nested than under A), and then having the file 
selected in A is quite inconvenient. Therefore I suggest that 'Select Node in Files' should locate the file in the 
directory tree under the most specific "mount point" the file is contained in.
Comment 1 Peter Pis 2007-07-10 15:21:46 UTC
Reassigning to "j2ee" for evaluation...
Comment 2 matthies 2007-07-10 16:15:04 UTC
I don't think it's necessarily JEE-specific. Whenever you have nested directory trees, it's very likely that the user 
expects the file to be selected in the tree whose root is nearest to the file.
Comment 3 Petr Jiricka 2007-08-16 15:04:27 UTC
It's true that this issue is more general. Not sure where this action is implemented - perhaps projects infra?
Comment 4 Milan Kubec 2007-08-17 14:13:19 UTC
Either I'm not able to reproduce or I don't understand correctly. Attaching screenshot with EnterpriseApplication1 and
EJBModule1 projects. EJBModule1 was created under EntrpriseApplication1 and added to the application. Then I created
class under EJBModule1 and then did Ctrl+Shift+2 and on the screenshot you can see which one was selected.
Comment 5 Milan Kubec 2007-08-17 14:14:47 UTC
Created attachment 46790 [details]
screenshot
Comment 6 matthies 2007-08-17 17:22:04 UTC
You can reproduce the problem when choosing a name for the module project which comes lexicographically _after_ the 
name of the EA project (like the "A" and "B" in my example). "EJBModule1" comes before "EnterpriseApplication1", so the 
issue doesn't become apparent with these names. "Select Node in Files" locates the file in whichever project comes 
first in the "Files" tree view. IMO the logic should not depend on the project names. (My current workaround is to 
rename "outer" projects to something like "Z.<actual name>"...)
Comment 7 Lukas Hasik 2008-04-10 21:41:05 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 8 Milan Kubec 2008-08-29 15:06:58 UTC
I think that this is not P3 issue, lowering priority.
Comment 9 matthies 2009-08-20 13:41:09 UTC
Updated TM.
Comment 10 Martin Balin 2016-07-07 08:36:55 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 11 matthies 2016-07-18 19:48:44 UTC
Still relvant in current dev build.