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 234845 - "Select in Projects" fails for build-impl.xml
Summary: "Select in Projects" fails for build-impl.xml
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.2.1
Hardware: PC Windows XP
: P4 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-23 08:48 UTC by VesaPa
Modified: 2014-02-14 02:54 UTC (History)
0 users

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 VesaPa 2013-08-23 08:48:54 UTC
When you have the build-impl.xml file open for a project and then right-click and click on "Select in Projects", the project that you last selected in the Projects list is highlighted even if the build-impl.xml belonged to some other project. That behavior is misleading, easily makes the user think that the file belongs to the highlighted project. (I haven't tried if this bug applies to other project files as well.)
Comment 1 Milos Kleint 2013-08-23 09:10:19 UTC
well, build-impl.xml is *not* selectable in projects view as it's not part of the node structure in projects view.
Comment 2 VesaPa 2013-08-23 09:47:40 UTC
I see what you mean. However, build-impl.xml is one of the essential project files, so it associates with the project node quite naturally and that is why the behavior is misleading. If the right thing cannot be activated, then it should not activate anything in the Projects view.

build-impl.xml can be located via "Select in Files", but since that is not available in the context menu, I hadn't found it. In most editor programs, I use "Save As..." to find out the origin of an open file but in Netbeans editor that is not available.
Comment 3 Milos Kleint 2013-08-23 10:19:25 UTC
(In reply to VesaPa from comment #2)
> I see what you mean. However, build-impl.xml is one of the essential project
> files, so it associates with the project node quite naturally and that is
> why the behavior is misleading. If the right thing cannot be activated, then
> it should not activate anything in the Projects view.


well, it's a file that is intentionally not part of projects view, because it's more or less internal to netbeans (not to be edited by user, often regenerated by the IDE)

> 
> build-impl.xml can be located via "Select in Files", but since that is not
> available in the context menu, I hadn't found it. In most editor programs, I
> use "Save As..." to find out the origin of an open file but in Netbeans
> editor that is not available.

Yes, Files view shows the projects directory structure and it's action (Select in Files) available from main menu or as a shortcut. As Files view is less prominent than Projects view so is it's Select action.

as far as I can tell, works as intended.
Comment 4 VesaPa 2013-08-23 10:55:19 UTC
The behavior is actually more general: If you have any file that cannot be found in the Projects view, Select in Projects operation activates the Projects view and highlights the node that was last highlighted. If you have just opened the project group so that nothing at all has been highlighed in Projects view, then nothing is highlighted. And so this could happen misleadingly with any project file or other file that people could associate with the node that gets highlighted by Select in Projects.

Among easy and obvious alternatives, I think the optimal behavior would be to reset the "last highlighted" information when Select in Projects fails so that Select in Projects highlights nothing.
Comment 5 Milos Kleint 2013-08-23 12:03:35 UTC
fine, sounds ok to reset highlight and/or write something into status bar that nothing was found.

just a minor ui glitch however -> P4
Comment 6 VesaPa 2013-08-23 13:20:20 UTC
OK, fair enough.
Comment 7 Martin Kozeny 2014-02-13 09:04:21 UTC
Now is nothing is highlighted when no node found, status bar message was already done. 

https://hg.netbeans.org/core-main/rev/b6adb808cb44
Comment 8 Quality Engineering 2014-02-14 02:54:29 UTC
Integrated into 'main-silver', will be available in build *201402140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b6adb808cb44
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #234845:"Select in Projects" fails for build-impl.xml -> nothing is highlighted in this case, status bar message was already done.