More "Quick Find Usages" (Ctrl-Alt-F7) feedback


I really love the feature. It has replaced the majority of my Alt-F7 use.

Problems/missing functionality:
1) "result display options"

Right now Ctrl-Alt-F7 takes some options from the last Alt-F7 invocation:
-Group by File Structure
-Show Import statements
-maybe more?

It's very nice that I can customize the display of Ctrl-Alt-F7. However,
requiring me to first run a "dummy" Alt-F7 search to do it it not so nice.
In addition, I'm sure that most users are unaware that Alt-F7 options will
influence Ctrl-Alt-F7.

I'm not sure what the best solution is, but I think one is much needed.
I would really like to toggle such options while the Ctrl-Alt-F7 list is
displayed.
Whatever the solution would be, I think options for Alt-F7 should not magically
influence those for Ctrl-Alt-F7 (and vice versa).

2) Ctrl-Shift-I doesn't work from list of usages.

3) Columns are not aligned

Perhaps this is a personal preference..
When I have "Group By File structure" enabled, I effectively get 4 columns
of data:
a) containing file
b) containing method (or other "structure" element)
c) read/write icon
d) preview chunk

Depending of length of (a) and (b), the resulting "table" display can become
quite unaligned, making quick visual interpretation harder.
Perhaps an IDE option somewhere to align Ctrl-Alt-F7 display?

4) Usages of properties/resource keys.

This is not really specific to Ctrl-Alt-F7 I guess. When searching usages
of a "resource key" that has difference variants (for different locales),
IDEA asks me for which locale I want to find usages. As far as I understand,
the chosen locale will never influence the results of the search.

Taras


6 comments
Comment actions Permalink

>

I really love the feature. It has replaced the
majority of my Alt-F7 use.


I hadn't noticed this feature until you mentioned it.
I am going to try it out now. I have remapped by keymap
from CTRLU Find Usages to CTRLU Show Usages, CTRLSHIFT Find Usages



Okay, one big problem for me.

Most often when I am doing show usages, I want to look at every single usage. The normal
Find Usages seems better suited for that. Search for the usages, then step through each one
with Next Occurrence CTRL. and Previous Occurrence CTRL,

With Show Usages, I invoke Show Usages on variable or method, and select one usage. But then,
if I want to see the next one, I have invoke Show Usages again and navigate the list again.
With Find Usages, my current position is remembered for me.

Also, since I am working on a large project, many of the Find Usages taking seconds, some 10-30
seconds, and in the meantime it shows a modal progress dialog. And as I mentioned, if I have
to pop it up again, I have to wait that time again.

Second problem (specific to my Emacs keymap) is that the Show Usages popup list doesn't respect
the Editor->Down and Editor->Up keybindings. I use CTRLN and CTRLP instead of DOWN_ARROW
and LEFT_ARROW. The Completion popup list supports these keybindings, the Show Usages doesn't.

http://www.jetbrains.net/jira/browse/IDEA-15266
Show Usages popup doesn't accept Editor->Down and Editor->Up keybindings, only supports DOWN_ARROW and UP_ARROW

>

Problems/missing functionality:
1) "result display options"


Hm.. I think maybe IDEA should just allow you to jump to the Show Usages
results panel without researching for the usages. So, I would do CTRL+U,
then decide I needed customize the output, so I then would hit CTRLSHIFTU and
then the Show Usages find panel would be displayed.

Whatever the solution would be, I think options for
Alt-F7 should not magically
influence those for Ctrl-Alt-F7 (and vice versa).


Well, in the Find Usages dialog, the only option I sometimes toggle is the
Show overriding methods. On the Find Usages results panel, I will sometime
toggle the "Show read" and/or "Show Write access". But most other options I
never touch. Are there other options you toggle alot?

>

2) Ctrl-Shift-I doesn't work from list of usages.


http://www.jetbrains.net/jira/browse/IDEA-14113
It should be possible to use Quick Definition Lookup (CtrlShiftI) inside the Show Usages (CtrlAltF7) dialog

I personally don't see the point in Quick Definition Lookup (CTRLSHIFTI).
What I use is Goto Declaration (bound to CTRL+G) which jumps to the declaration in the file,
then I can immediately edit/browser the code, or I can go back by hitting CTRL+LEFT_ARROW.
With Quick Definition Lookup (CTRLSHIFTI), I have to hit ESCAPE to close which is OK, but
if I want to edit I have to hit ENTER which is an extra step.

>

3) Columns are not aligned

>

I agree this is a problem, I'm not sure what the solution is. The popup is already pretty wide,
and if you put each data field in it's own column, it would get even wider.

0
Comment actions Permalink

Why Show Usages?

Rather than add Show Usages, I would much rather have a streamlined Find Usages. The main problem I have
with Find Usages is that it pops up 1 or 2 dialogs before it starts searching. 99.9% of the time, I never change my
answers, so it's a waste. IDEA should streamline this, using the Run Configurations UI as a model. Fold the 2
dialogs into 1 dialog, and then add a checkbox Display settings before launching. If you uncheck this, then the
next time you run Find Usages it will immediately start searching. Then on the Find Usages results tool panel, you
can add a Edit Configuration toolbar icon so you can access the configuration from there.

Jira:
Find Usages should have option to not show the 1 or 2 dialogs so it can immediately start searching. (Follow Run Configuration UI Model)
http://www.jetbrains.net/jira/browse/IDEA-15267

The above simple enhancement would have been 10X the bang for new and esp. existing users, rather than add
this new Show Usages which IMHO has questionable value.

This release, I feel like Jetbrains has missed the mark on alot of UI features, from the find bar, to the xml/html/jsp
breadcrumbs bar, and this Show Usages... I'm afraid Jetbrains project mgmt is suffering from featuritis (http://en.wikipedia.org/wiki/Creeping_featurism) where new features are valued much more than improving usability / fixing bugs of the old features (and there's alot of em!).

There's already a ton of Jira's filed on Find Usages. I would have liked to see many of them Fixed before this
Show Usages was added. Here's a few:

Find Usages/include overloaded methods: list all in results
http://www.jetbrains.net/jira/browse/IDEABKL-4843

Find Usages - Usages of Methods of a Class - Should do one search for each group of overloaded methods in a class
http://www.jetbrains.net/jira/browse/IDEADEV-17409

'Find usages' should treat assignment to array element as 'write' access
http://www.jetbrains.net/jira/browse/IDEABKL-3837



Attachment(s):
7294_find_usages_warning_base_method.png
7294_find_usages_options_dialog.png
7294_run_configuration_dropdown.png
7294_edit_run_configuration.png
0
Comment actions Permalink

One small nicety about Show Usages is that when there are no usages found, it displays a little tooltip "No usages found" next to the element you searched on. That is much better than the modal dialog that Find Usages pops up and you are forced to hit ESCAPE or RETURN or click OK to close the dialog.

This calls for a Jira!
Find Usages should display non-modal tooltip "No usages found" like Show Usages does.
http://www.jetbrains.net/jira/browse/IDEA-15270

Also, if the caret is not on an element when you invoke Show Usages or Find Usages, you get another modal dialog telling you "Cannot search for usages. Position to an element which usages you wish to find and try again. This should also use one of those nifty non-modal tooltips.

More Jiras!!
Find Usages should use non-modal tooltip "Cannot search for usages. \nPosition caret to an element and try again."
http://www.jetbrains.net/jira/browse/IDEA-15271
Show Usages should use non-modal tooltip "Cannot search for usages. \nPosition caret to an element and try again."
http://www.jetbrains.net/jira/browse/IDEA-15272


Wow, if Jetbrains implements all the above Jiras I opened then the Find Usages command can be free of modal dialogs More search less clicking on dialogs!



Attachment(s):
7294_show_usages_No_usages_found.png
7294_find_usages_no_usages_found_modal_dialog.png
7294_show_usages_cannot_search_for_usages.png
7294_find_usages_cannot_search_for_usages.png
0
Comment actions Permalink

If invoke Show Usages and there is only one usage found, IDEA jumps directly to it and places a little tooltip "It's the only usage". That's a nice touch. (See attached picture)

Also, another positive of Show Usages that I didn't mention is it saves your screen real estate because it doesn't pop up that lower panel. Now, I'm not sure how big a deal that really is because, for me, it's a constant struggle to keep that lower panel from popping up because I run lots of ant tasks, find in path, find usages, analyze stacktrace, inspect code, etc. so that lower panel is there more often than not. I do alot of double-clicking on the editor tab to maximize the editor frame.

Anyway, Show Usages does keep that lower panel from popping up. But as I mentioned in earlier comments if there are many usages, and I want to look at all of them, I find the regular Find Usages much easier to use than Show Usages.

I really think this Show Usages feature should have been thought through more before implementing. Some of these nice touches like skipping the modal find usages dialog, using message tooltips instead of modal dialogs, and bypassing the results list when there is only one usage, could all have enhancements to the regular Find Usages.

I don't know if there is still time in Selena, but I think the correct thing to do would be to merge Show Usages back into Find Usages. (Ewww.. talking about merging two features into one is giving me the heebee jeebees now after the sour taste in my mouth from incremental search and find being mish mashed together, but I digress...)

Suggested Changes
-


1. Merge the 'Search from base class' modal dialog prompt into the Find Usages options dialog. Netbeans already does this. (See attached)
2. Add following options to Find Usages options dialog.
Add '[X] Display settings before running' option
Add '[X] Shortcut if only one usage
3. Add nice non-modal tooltips for 'No usages found" and "Cannot searches from usages"
4. Add settings icon on Find Usages result panel in order to access Find Usages settings dialog after you have unchecked Display settings before running.

If you did all that, why do we need the Show Usages feature? The only additional thing it does is show the list of usages in the inline popup, but that thing has a number of issues like (1) readability with Class, method, R/W access, and loc all mashed together. (2) usability problems when you need to visit each usage not just one in the list.



Re: (2), that could be overcome for Show Usages if Next Occurrence and Previous Occurrence worked. For example,
1. I hit CTRL+U (Show Usages) and it shows me 20 usages.
2. I select one and hit ENTER
3. when I'm done editing it or looking at it I press CTRL+. (Next Occurrence)
to goto the next occurrence -- the same workflow I would have used when I ran Find Usages and had the results displayed in the tool panel below.

If you do the above, then this Show Usages would work alot better for the cases where you want to visit each usage and do something.



Attachment(s):
7294_show_usages_its_the_only_usage.png
netbeans_60b1_search_from_base_class.png
0
Comment actions Permalink

1. Merge the 'Search from base class' modal dialog
prompt into the Find Usages options dialog. Netbeans
already does this. (See attached)


+1

2. Add following options to Find Usages options
dialog.
Add '[X] Shortcut if only one usage


You know, there already is a "Skip result tab with one usage" option.

Bas

0
Comment actions Permalink

Hello Alex,

Most often when I am doing show usages, I want to look at every single
usage. The normal Find Usages seems better suited for that. Search
for the usages, then step through each one with Next Occurrence CTRL+.
and Previous Occurrence CTRL+,

With Show Usages, I invoke Show Usages on variable or method, and
select one usage. But then, if I want to see the next one, I have
invoke Show Usages again and navigate the list again. With Find
Usages, my current position is remembered for me.


After reading your comments I realize that I often use 'Quick Show Usages'
as a navigation aid. Quite often I have a general idea in which places some
symbol is used, and often invoke Ctrl-Alt-F7 to quickly navigate there. For
example: I might 'Show Usages' for some persistent entity to quickly navigate
to a specific DAO, or 'Show Usages' on some view related class to quickly
navigate to a JSP page where it is used. So at least part of my 'Show Usages'
use is a kind of "Quick Navigation" based on knowledge of where some type
is used.

Also, since I am working on a large project, many of the Find Usages
taking seconds, some 10-30 seconds, and in the meantime it shows a
modal progress dialog. And as I mentioned, if I have to pop it up
again, I have to wait that time again.


I agree, 'Show Usages' really shines on smaller projects. It also depends
on what kind of usages you're querying for.

>> 1) "result display options"

Hm.. I think maybe IDEA should just allow you to jump to the Show
Usages results panel without researching for the usages. So, I
would do CTRL+U, then decide I needed customize the output, so I then
would hit CTRLSHIFTU and then the Show Usages find panel would be
displayed.

>> Whatever the solution would be, I think options for
>> Alt-F7 should not magically
>> influence those for Ctrl-Alt-F7 (and vice versa).

Well, in the Find Usages dialog, the only option I sometimes toggle is
the Show overriding methods. On the Find Usages results panel, I
will sometime toggle the "Show read" and/or "Show Write access". But
most other options I never touch. Are there other options you toggle
alot?


Alex, I'm talking about the options in the "results" tab of Alt-F7 (the icons
on the left side of the panel). At the moment, the settings there are "reused"
by Ctrl-Alt-F7. I think you are referring to the options on the *Alt-F7 dialog
itself*, correct?

>> 2) Ctrl-Shift-I doesn't work from list of usages.
>>

http://www.jetbrains.net/jira/browse/IDEA-14113
It should be possible to use Quick Definition Lookup (CtrlShiftI)
inside the Show Usages (CtrlAltF7) dialog
I personally don't see the point in Quick Definition Lookup
(CTRLSHIFTI).
What I use is Goto Declaration (bound to CTRL+G) which jumps to the
declaration in the file,
then I can immediately edit/browser the code, or I can go back by
hitting CTRL+LEFT_ARROW.
With Quick Definition Lookup (CTRLSHIFTI), I have to hit ESCAPE to
close which is OK, but
if I want to edit I have to hit ENTER which is an extra step.


I think we're talking about different things. "Go Declaration" doesn't work
from the Ctrl-Alt-F7 popup, I think.


>> 3) Columns are not aligned
>>

I agree this is a problem, I'm not sure what the solution is. The
popup is already pretty wide, and if you put each data field in it's
own column, it would get even wider.


I think it would make sense to make this configurable. Both approaches have
pros and cons.

Taras


0

Please sign in to leave a comment.