ReSharper 4.5 Issues

Here are a couple issues I'm finding with ReSharper 4.5.

When creating a test fixture referencing FluentNHibernate, I create a base
fixture as follows:

public class FxtureBase
{
protected SessionSource SessionSource { get; ;set; }
protected ISession Session {get; private set; }


public void SetupContext()
{
SessionSource = <oops!>

Instead of the expected SessionSource =, I get:

global::FluentNHibernate.SessionSource =

Code completion is still a little odd as well in that it still seems to
prefer the last item in the list instead of the first item. For example, I
type stringcomparison.ordinal and expect it to complete with
StringComparison.Ordinal but in reality it completes with
String.Comparison.OrdinalIgnoreCase.

I also found that when attempting to type something like s.Equals("some
text", StringComparison...) that StringComparison wasn't showing in
intellisense, but maybe this is because I didn't have "using System;" in the
class?


8 comments

I just found the Move Type dialog and I really like that Another File is the
default. Thanks guys!

Just one itty bitty piddly issue here. It used to be possible to say Tab
from the File textbox to the top radio button then use Down Arrow to
highlight the next radio button down. This was somewhat of a quick way to
move a type to a new file or namespace without touching the mouse. With
ReSharper 4.5, pressing Down Arrow on Another file puts the focus back into
the File textbox instead of selecting Another namespace. This is a really
minor issue, though.

So far I have to say I'm loving ReSharper 4.5. Aside from a few loose ends,
this release is rocking so far.

"Lothan" <lothan@newsguy.com> wrote in message
news:grnssk$3jn$1@is.intellij.net...

Here are a couple issues I'm finding with ReSharper 4.5.

>

When creating a test fixture referencing FluentNHibernate, I create a base
fixture as follows:

>

public class FxtureBase
{
protected SessionSource SessionSource { get; ;set; }
protected ISession Session {get; private set; }

>


public void SetupContext()
{
SessionSource = <oops!>

>

Instead of the expected SessionSource =, I get:

>

global::FluentNHibernate.SessionSource =

>

Code completion is still a little odd as well in that it still seems to
prefer the last item in the list instead of the first item. For example, I
type stringcomparison.ordinal and expect it to complete with
StringComparison.Ordinal but in reality it completes with
String.Comparison.OrdinalIgnoreCase.

>

I also found that when attempting to type something like s.Equals("some
text", StringComparison...) that StringComparison wasn't showing in
intellisense, but maybe this is because I didn't have "using System;" in
the class?

>

0

Hello,

... Move Type dialog ...


Well yes, but at least the accelerator keys (Alt+Smth) still work.

BTW, if you'd like to move to a namespace that corresponds to the file location
in the folder structure, then there's a Context Action (yellow bulb) for
that on the namespace declaration in such a file whose namespace does not
agree to the file system location. This covers a large number of namespace
moves, actually.

There's a Context Action on the class name to move it to another file with
the same name as the class name, also. With these I'd rarely use Move nowdays.


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


0

Hello,

Code completion is still a little odd as well in that it still seems
to prefer the last item in the list instead of the first item.


It monitors the usage statistics and tends to precelect the most frequently
used item, be it the first or the last one.

I also found that when attempting to type something like
s.Equals("some text", StringComparison...) that StringComparison
wasn't showing in intellisense, but maybe this is because I didn't
have "using System;" in the class?


Yes, the symbol completion wouldn't include unimported symbols to reduce
the noise. There're Smart Completion and Type Completion, however, to help
in this case (see ReSharper | Code | Complete Code). The first knows you're
expected to have a StringComparison value, among others, and suggests its
members. The latter just shows all the types visible from this point regardless
of the imports. They both will add namespace imports as needed.

As for the global:: prefix, I don't know ;) It thinks there's some sort of
ambiguity there.


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


0

Speaking of the Context Actions, those have been a significant time saver.
It's just way so easy to Alt+Enter to fix naming conventions.

"Serge Baltic" <baltic@intellij.net> wrote in message
news:dc0986bf13c53a8cb8b5a050fb35b@news.intellij.net...

Hello,

>
>> ... Move Type dialog ...
>

Well yes, but at least the accelerator keys (Alt+Smth) still work.

>

BTW, if you'd like to move to a namespace that corresponds to the file
location in the folder structure, then there's a Context Action (yellow
bulb) for that on the namespace declaration in such a file whose namespace
does not agree to the file system location. This covers a large number of
namespace moves, actually.

>

There's a Context Action on the class name to move it to another file with
the same name as the class name, also. With these I'd rarely use Move
nowdays.

>


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

>

0

I generally find ReSharper has a tough time dealing with ambiguity since
ReSharper 4.0. If you have something like

public StringComparer StringComparer {get; set; }

(which is a poor example, but the type of thing that occurs quite often even
in the .NET Framework classes), ReSharper doesn't know whether to complete
with StringComparer or to fully qualify the reference (e.g.
System...StringComparer). Most of the time I just type e.g. StringComparer
and press Esc to stop ReSharper from autocompleting with something odd.

"Serge Baltic" <baltic@intellij.net> wrote in message
news:dc0986bf13c53b8cb8b5a96948b3f@news.intellij.net...

Hello,

>
>> Code completion is still a little odd as well in that it still seems
>> to prefer the last item in the list instead of the first item.
>

It monitors the usage statistics and tends to precelect the most
frequently used item, be it the first or the last one.

>
>> I also found that when attempting to type something like
>> s.Equals("some text", StringComparison...) that StringComparison
>> wasn't showing in intellisense, but maybe this is because I didn't
>> have "using System;" in the class?
>

Yes, the symbol completion wouldn't include unimported symbols to reduce
the noise. There're Smart Completion and Type Completion, however, to help
in this case (see ReSharper | Code | Complete Code). The first knows
you're expected to have a StringComparison value, among others, and
suggests its members. The latter just shows all the types visible from
this point regardless of the imports. They both will add namespace imports
as needed.

>

As for the global:: prefix, I don't know ;) It thinks there's some sort of
ambiguity there.

>


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

>

0

Hello,

ReSharper doesn't know
whether to complete with StringComparer or to fully qualify the
reference (e.g. System...StringComparer). Most of the time I just type
e.g. StringComparer and press Esc to stop ReSharper from
autocompleting with something odd.


I think it would show both items in the completion list, so as you choose
the correct one it will not be oddly completed. But it does not work so smoothly
for autopopup completion, that's right.


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


0

Yes, I think it does sometimes show both items. . . but both items have
exactly the same name and the same appearance so it's not clear which is say
a property and which is a type.

"Serge Baltic" <baltic@intellij.net> wrote in message
news:dc0986bf13c6a88cb8c290291b57d@news.intellij.net...

Hello,

>
>> ReSharper doesn't know
>> whether to complete with StringComparer or to fully qualify the
>> reference (e.g. System...StringComparer). Most of the time I just type
>> e.g. StringComparer and press Esc to stop ReSharper from
>> autocompleting with something odd.
>

I think it would show both items in the completion list, so as you choose
the correct one it will not be oddly completed. But it does not work so
smoothly for autopopup completion, that's right.

>


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

>

0

Hello,

both items
have exactly the same name and the same appearance so it's not clear
which is say a property and which is a type.


Well, I'm sure they're not identical. There're icons, property icon versus
class icon (or any other type member vs. type). They're distinguishable,
at least in Visual Studio icon set. Also the class member has its type name
on the right, and the class has no right-aligned text.

That worked perfectly before we introduced the autopopup completion, because
you can deal with things like this if you summon the completion list explicitly.
But as you're just typing you are not ready to pay attention to such things,
of course, so autopopup completion should rather be smarter.


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


0

Please sign in to leave a comment.