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 168400 - Can not search in current project when no main project is set
Summary: Can not search in current project when no main project is set
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
: 204073 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-10 14:31 UTC by Petr Jiricka
Modified: 2012-05-07 09:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Behavior of the debug action (58.89 KB, image/png)
2009-11-10 17:41 UTC, Victor Vasilyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2009-07-10 14:31:41 UTC
1. Create a project MyProject
2. Go to Run -> Set Main Project and select None
3. Select a file inside project MyProject in the Projects view
4. Go to Edit -> Find

The Scope section of the dialog has three choices: Open Projects, Main Project, Selection. Main Project is grayed out,
because there is no main project - this is a waste of screen estate. This position in the dialog should be used for the
current project, i.e. the middle option should be "Project MyProject". This would be consistent with how the
Build/Run/Debug actions work - they are sensitive to the current project and work on the context of the currently
selected project, in the absence of a main project.
Comment 1 Victor Vasilyev 2009-11-10 17:33:31 UTC
> Main Project is grayed out, because there is no main project - this is a waste of screen estate.

On the other hand, if the option is grayed out then it is a hint for a user. Such UI status gives an idea to a user that a main project has not been  selected.

> This position in the dialog should be used for the current project...

I think, dynamical dialogs is not a good idea from various viewpoints.
Status of the dialog items may depend on a state of IDE, but content of the dialog should not.
I guess, user's expectation is to see each item in a definite location in the dialog when it is opened at any moment.

> Build/Run/Debug actions work - they are sensitive to the current project and
work on the context of the currently selected project, in the absence of a main project.

Unfortunately, the mentioned action has bugs, and it can't be used as a reference implementation. See attached picture where a current selection is not matched with the selected project for debugging.


Nevertheless, I agree that GUI of the Find/Replace feature is the area for improvement. I'll close this bug as incomplete to accumulate here thoughts against improvement of the GUI.
Comment 2 Victor Vasilyev 2009-11-10 17:41:06 UTC
Created attachment 90755 [details]
Behavior of the debug action

Behavior of the debug action when two project has been opened, main project hasn't been selected and an item of the User Utilites project has been last selected.
Comment 3 Petr Jiricka 2009-11-11 04:29:23 UTC
> Such UI status gives an idea to a user that a main project has not been 
> selected.

The user does not need to be warned about a main project not being selected - this is a legal and perfectly fine state, and there is nothing wrong with it.

> I think, dynamical dialogs is not a good idea from various viewpoints.

I agree, but my proposal is not a dynamic dialog. A dynamic dialog is a dialog whose UI changes based on information entered inside the dialog itself, and that's a bad idea. But I am proposing a dialog where one label changes based on information *external* to the dialog. Menus behave the same ways - item labels change based on the selected/main project, and there is nothing wrong with that.

> Unfortunately, the mentioned action has bugs ... a current selection is not
> matched with the selected project for debugging.

I don't think so in the attached screenshot, the editor area is selected, in particular the proj_bundle.properties file. This file seems to come from the JavaApplication13 project, not from "User Utilities" project. So I think this behaves correctly.

> I'll close this bug as incomplete to accumulate here thoughts against
> improvement of the GUI.

Well, closing it as incomplete will take this issue off the radar, so we will not be reminded to think about a good solution. I would prefer to leave it open. Based on my comments above, I think the solution I originally proposed is a good one, but I am open to more suggestions.
Comment 4 Petr Jiricka 2009-11-11 08:44:38 UTC
Reopened per comments above.
Comment 5 Jaroslav Havlin 2012-04-02 09:05:55 UTC
http://hg.netbeans.org/core-main/rev/4e03e9bd6bb5

Scope "Current Project" added.
Comment 6 Quality Engineering 2012-04-03 11:12:51 UTC
Integrated into 'main-golden', will be available in build *201204030400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4e03e9bd6bb5
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #168400 - Can not search in current project when no main project is set
Comment 7 Jaroslav Havlin 2012-05-07 09:15:52 UTC
*** Bug 204073 has been marked as a duplicate of this bug. ***