Visual Assist "open file in solution" vs. ReSharper "GotoFile"

Hi.

This may not be the right forum, but I'm posting it here first in any case.

Basically I want to draw attention to the fact that ReSharper's "GotoFile" functionality is way behind the "Open file in solution" functionality in Visual Assist X. Especially considering that it is the most useful feature ever (in my opinion). Everybody are using this feature where I work, even if they use no other feature of Visual Assist (note that we develop mostly in C++ where I work).

Now, here's where ReSharper (in my opinion) is lacking behind:

1. Responsiveness: It takes 0.5-1 second to update in ReSharper. In Visual Assist it is instant. It litterally updates for every letter you type.

2. Syntax: ReSharper uses some kind of wildcard syntax where Visual Assist uses a Google-style search. The latter is _way_ faster to work with. Example: If I search for "link lis" in Visual Assist, it'll show me all LinkedList files. Even 'MyLinkedList'. To get a similar result in ReSharper I would have to write "*link*lis" which is a lot slower to write. ReSharper will also insist that "link" comes before "lis". This may be useful at times, but when it is Google-style, I can freely add extra words to filter my search. This is a very fast workflow.

3. Memory: ReSharper starts with an empty seach field every time. Visual Assist remembers the last search you did (though selecting the text so that if you start writing it'll delete what's already there). This makes it fast to open sets of similar files. It also means that if you accidentally hit the wrong file, you can quickly re-open the search and select the right one.

That was it. Now I realise that I'm not the most seasoned ReSharper user so it is not unlikely that there are features in ReSharper that I'm unaware of. Nevertheless, I feel it's likely that at least some of this feedback will be useful to the ReSharper team. I'm also completely confident that the ReSharper team could improve the GotoFile feature should they want to. I'm hoping this feedback will give them the desire to do so.

Kind regards,
Mads Østerby
Denmark

8 comments

Hello,

This may not be the right forum, but I'm posting it here first in any
case.


I think the R# Community group is just the right place for this kind of feedback.
Especially that I couldn't feel these things even if I installed Visual
Assist for a trial, because you have to live in it for some time to get
a real understanding. You're welcome :)

Basically I want to draw attention to the fact that ReSharper's
"GotoFile" functionality is way behind the "Open file in solution"
functionality in Visual Assist X. Especially considering that it is
the most useful feature ever (in my opinion). Everybody are using this
feature where I work, even if they use no other feature of Visual
Assist (note that we develop mostly in C++ where I work).


In C# one'd usually consider classes for navigation rather than files. File
names do not mean much in C#. You wouldn't use them in #includes or anywhere
else in the code. At best, file names match class names (usually there're
no class prefixes like class CEntity vs Entity.cpp). But quite often the
file name is not in sync with class name or there's more than one class in
the file, and you do not care much about these things when navigating with
Goto Class. Class names are more important than file names, and R# always
has the full list of all the classes in the solution available for navigation.

That's why of all the Goto features the Goto Class (Goto Type) is considered
the most important one. To improve it, the list is not built before you complete
typing the whole word, as it could take some time building the class list
for each of the letters typed when you only need the final result. For the
file list the delay could be smaller, but it had never been adjusted separately,
as the Goto File Feature is considered secondary somewhat (navigate to a
non-source-code file -- pictures, resources, that sort).

The main navigation scenario for the Goto Class feature is when you know
the name of the class you need to open. For MyLinkedList, you'd type "MLL"
in the Goto Class window. This builds the list of candidates matching the
acronym, and you choose the one you need. If the name is unique enough, it's
just MLL, without waiting for the list, to hit the first item. Or "MyLiLis" to disambiguate. Or "MLL]]>" to truncate. Wildcards are
for complicated cases; usually, the capital letters plus some of the lowercases
are enough. Explicit ordering is needed to keep out the false positives so
that MLL and LML and LLM are different things and do not match each other
polluting the quick list.

In short, this feature is more like "Jump to class!" than "Find...". It's
smart enough when used along this scenario.

As for the issues,

1. Responsiveness. Overall R# performance has improved since the delay was
introduced, so probably we could decrease the delays. There're several requests
for that already.

2. Syntax. The acronym system described above is in conflict with the suggested
google-ish syntax, even though I admit that the latter would be nice to have.
The acronyms are reasonably good for everyday jump-to-class use (or probably
even superior), but their learning curve is worse. We'll try to think something
up, but we definitely cannot break away the acronyms.

3. Memory. We tried it at some point, but it wouldn't last. Probably that's
because the list appearing soon after the Goto window opens turned out to
be confusing: is it from the previous search, or is it for what you've just
started to type? When looking for classes, it actually takes some time to
grab the list, and the old list cannot be used because the set of classes
changes and the search has to be re-run. For the acronym-jumps it's not even
that important if you keep a couple letters or retype them. An easy thing
to implement, anyway, so everybody's welcome to speculate on the topic :)


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Interesting! I wasn't aware of the acronym syntax. An unusual approach, but I'm sure it'll turn out very useful. The only danger here being me turning skizofrenic by using two systems and two syntaxes.

I agree that GotoType is more relevant. The only scenario I can come up with for GotoFile is xaml files or some such, but I can see you guys have handled that already.

As for the 'Memory' discussion I can see how the delay can cause confusion. All I can say is that it works well in Visual Assist, probably because of the fast response time. So if you guys manage to speed the feature up considerably, do try out the memory feature again and see how it feels then.

And thanks by the way for the excellent response.

Kind regards,
Mads Østerby
Denmark

0

I frequently need to jump to a class and then jump to a method within that class.  As it stands, I use go to type followed by go to file member.
I would like go to class to accept the class criteria (name or acronym, exactly as it works today) followed by a : (or a .) followed by the member specifier or line number.
This would ideally also work for go to file, which would make navigating from stack traces in external logs easier.

Thanks,
Dave

0

While there is "Go To Symbol", I do think this is a really good idea for a
nice enhancement...

+1!


"David Mann" <no_reply@jetbrains.com> wrote in message
news:17933395.154881248271012829.JavaMail.clearspace@app8.labs.intellij.net...
>I frequently need to jump to a class and then jump to a method within that
>class. As it stands, I use go to type followed by go to file member.

I would like go to class to accept the class criteria (name or acronym,
exactly as it works today) followed by a : (or a .) followed by the member
specifier or line number.
This would ideally also work for go to file, which would make navigating
from stack traces in external logs easier.

>

Thanks,
Dave

>

---
Original message URL:
http://www.jetbrains.net/devnet/message/5242195#5242195


0

Hello,

I agree that GotoType is more relevant. The only scenario I can come
up with for GotoFile is xaml files or some such, but I can see you
guys have handled that already.


XAML files that have codebehind parts are navigable by the name of the class
they define (as for any other partial class case, you'll be given the list
of the parts to choose the one to jump into). XAML files that do not have
classes defined in them could still be reached by the resource name or any
other declared thing that we understand -- with the Goto Symbol feature.
It lists XAML resources as symbols available for navigation. And, of course,
Goto File also supports acronyms for file names.

As for the 'Memory' discussion I can see how the delay can cause
confusion. All I can say is that it works well in Visual Assist,
probably because of the fast response time. So if you guys manage to
speed the feature up considerably, do try out the memory feature again
and see how it feels then.


We'll see if this is possible for class names.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Hello,

I frequently need to jump to a class and then jump to a method within
that class. As it stands, I use go to type followed by go to file
member.

I would like go to class to accept the class criteria (name or
acronym, exactly as it works today) followed by a : (or a .) followed
by the member specifier or line number.


Sounds reasonable. I can remember the idea mentioned a couple times here
and there. Will be nice to have.

So if you type X.Y, this should bring a list of all the members matching
Y in those classes that match X, possibly more than one line for the same
class if there're multiple Y-matching members, is this the suggested behavior?
I mean, the selection is a single filter string, and is not staged into first
choosing the class and then the method.

This would ideally also work for go to file, which would make
navigating from stack traces in external logs easier.


Does the Stack Trace Explorer feature fail on them (ReSharper | Explore Stack
Trace...)? Currently it only works if you've got file names and line numbers
(that is, .PDBs), but it will be improved for v5.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Here is an example that illustrates how I imagine this working:

I begin typing X and a list of classes is shown.  For example, the list might contain 14 classes (14 total lines in the list).
I continue typing X and the list filters down.  For example, it might now only contain 5 classes (5 total lines in the list).
I type . and begin typing Y.
    Classes that do not have any member matching Y will be removed from the list.
    Classes that contain matching members will display one line per matching member.
    For example, I might now be down to 2 classes, one with 3 members and the other with 4, for a total of 7 lines in the list.

The list would be sorted by class (as today) and subsorted the same way the members would be sorted.
Actually, has a lot of thought gone into the member sorting?  Members appear in the list in the order they are declared.  Was this a deliberate choice to mimic the file structure?  Were other options considered, like grouping the members by type and visibility?

I did not know how to use the stack trace explorer.  I guess you copy the trace to the clipboard then open the explorer?  It seems to work, I will try to integrate this into my workflow.  With so many features in R# I still don't know them all, even though I have used it since the days of VS2003 and .Net 1.1.

Regarding the delays, you might also be able to reduce the delay at each keystroke since the search space should be getting smaller quite rapidly.

Thanks,
Dave

0

Hello,

Here is an example that illustrates how I imagine this working:



Yes, I see. I supposed the same behavior.

Actually, has a lot of thought gone into the member sorting? Members
appear in the list in the order they are declared. Was this a
deliberate choice to mimic the file structure? Were other options
considered, like grouping the members by type and visibility?


Hmm ... Previously they used to be sorted somehow, at least alphabetically,
as far as I can remember. Currently the list actually mimcs the file structure
view, and I do not know which one fits better. Probably one does not care
most of the time because of the filtering-down behavior and acronyms. By
the way, constructors can be quickly accessed with the "new" filter string
in C#, regardless of what their name (name of the current class) is.

I did not know how to use the stack trace explorer. I guess you copy
the trace to the clipboard then open the explorer? It seems to work,


Right! Most useful for exception stack traces that have PDBs available (thus
file names and line numbers), but we'll improve it to still provide some
navigation even if PDBs are missing.
Stack Trace Explorer eliminates the need to do Gotos when walking stack frames
of a logged exception.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.