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 207056 - Improve "Inspect and Transform" dialog
Summary: Improve "Inspect and Transform" dialog
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-09 09:58 UTC by tilman
Modified: 2013-09-02 14:24 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tilman 2012-01-09 09:58:21 UTC
The new "Inspect and Transform" dialog is a good thing, but its UI is somewhat inefficient. After searching for something, the dialog closes, instead of staying open, so that the user can start a different search.

Thus my suggestion: 
don't close the "Inspect and Transform" dialog after "no patterns found".
Comment 1 Petr Somol 2012-06-13 12:59:17 UTC
I endorse this idea. The simple change would significantly improve usability. In case no patterns are found please do not close the Inspect and Transform dialog before displaying the No Patterns Found message box. Then, when user closes the No Patterns Found message, she should be able to return straight to the Inspect and Transform dialog to change inspection settings and give another try.

Actually there is discrepancy between Refactoring->Inspect and Transform... and Source->Inspect... in this sense. The latter does not show any warning dialog but opens an empty Inspector Window in the area before the main editor window.

Perhaps the best unified solution for both Refactoring->Inspect and Transform... and Source->Inspect... would be as follows: in case no patterns are found, open the respective Inspector window and write in it "No Patterns Found" instead of leaving it empty. At that moment users can re-open the Inspect (and Transform) dialog by a single click to the Refresh button. This is no less effective than the solution with a warning message box, where a click would be needed anyway to get back to the main dialog. Unlike the "warning message box" solution, the "Inspector window with message" solution is cleaner and perhaps better suited to situations where the inspection process can be lengthy.
Comment 2 Jan Lahoda 2012-06-13 13:09:52 UTC
Ralph: this is a standard behavior of all refactorings, AFAIK. I&T is implemented by means of the refactoring.api (and refactoring.java), and I don't think there is a way to keep the refactoring dialog open when nothing is found. By reassigning to java.hints, do you suggest that I&T should stop using refactoring infrastructure?
Comment 3 Ralph Ruijs 2012-06-13 13:40:38 UTC
(In reply to comment #2)
> Ralph: this is a standard behavior of all refactorings, AFAIK. I&T is
> implemented by means of the refactoring.api (and refactoring.java), and I don't
> think there is a way to keep the refactoring dialog open when nothing is found.
> By reassigning to java.hints, do you suggest that I&T should stop using
> refactoring infrastructure?

Jan: No, by reassigning to hints I do not want to suggest to stop using the refactoring apis. I think the features Inspect&Transform and refactoring are closely related and should stay to work similarly. I reassigned because I do not have a strong opinion on how the I&T should work for this case. If, to be able to resolve this, some changes are needed in refactoring, please reassign back.


Petr:
The solution you propose is probably the most easy to implement, but I doubt if it is the best solution (this was how the api used to work, but it was changed in 7.1). I like the "Inspector window with message" solution, but am not sure if this would work in all situations, especially for jobs with incremental results (like Find Usages and maybe in the future "Inspect").
What do you think, should we keep I, I&T and Refactoring working the same, or introduce a difference? And, what would be clean solution for all the use cases?


Thanks!