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 63136 - "select node" highlights the wrong file!
Summary: "select node" highlights the wrong file!
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 64403 66658 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-26 10:15 UTC by _ rkusterer
Modified: 2006-10-23 16:40 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 _ rkusterer 2005-08-26 10:15:43 UTC
Menu item "Window > Select Document in Files/Projects" (CTRL+SHIFT+1 /
CTRL+SHIFT+2) selects the wrong item in the file list, if the file name contains
more than one dot.

Example: I edit a file named "blah.inc.html", I hit CTRL+SHIFT+1, and in the
Files window, the file "blah.html"(!) is highlighted. Same for CTRL+SHIFT+2.
Comment 1 Martin Roskanin 2005-08-26 13:53:59 UTC
reassigning to projects module
Comment 2 Jesse Glick 2005-08-26 14:45:51 UTC
Yes, the impl is lousy. A side effect of the poor decision to have
DataNode.getName() be dataObject.primaryFile.name and not .nameExt. I think
there is some algorithm to detect this kind of case, and it even works for some
things and has a test, but is not foolproof.

What kind of project are you using? C-S-2 is independent of project type but
C-S-1 is specific to project type, so we need to know.
Comment 3 _ rkusterer 2005-08-26 17:30:09 UTC
Only web projects are concerned it seems. The IDE never selects a wrong file in
normal Java projects: Because if I renamed a file to something.bad.java, the IDE
instantly reports an error and does not continue until I rename it to something
with only one dot. But with html files, double-dot names are possible.
Comment 4 Jesse Glick 2005-08-26 19:23:57 UTC
Well you can certainly have an HTML file in a plain Java project.
Comment 5 _ rkusterer 2005-08-29 10:41:15 UTC
Oh, true. So it is a problem independent of project type, everywhere where there
can be two dots in a filename.
Comment 6 Jesse Glick 2005-08-29 18:23:54 UTC
It is not independent of project type - every project separately implements
Select Document in Projects for that project type. It is however possible that
several project types share the same bug. That is why I am asking you what type
of project you observed the problem with, so we can start.
Comment 7 Jan Lahoda 2005-09-26 13:08:19 UTC
*** Issue 64403 has been marked as a duplicate of this issue. ***
Comment 8 Martin Roskanin 2005-10-13 08:36:55 UTC
*** Issue 66658 has been marked as a duplicate of this issue. ***
Comment 9 Milos Kleint 2006-08-09 08:39:35 UTC
i fixed it for package view located nodes, so any items under Sources/Test
sources nodes should be fine. If you discover any other usecases, please file
against the approriate project type.