Show text of new (nearby) highlights

Just an idea for discussion. It happens all the time, that change of code
creates error/warning (or Nerpa suggestion) highlight in nearby code. For
example, consider the following code:

string b = "foo";
b = "bar";

If I add "const" keyword before "string" - I get error highlight, but I can't
see its text, because it is on different line. I have to either move caret
to it to see it in status bar (caret & eye move) or use mouse to hover over
highlight (move hand from keyboard to mouse). It would be really nice, if
Resharper could show text of nearby highlight in a popup-style window somewhere
near the current caret position. So after I have (| is caret)

const |string b = "foo";
b = "bar";

I immediately see text "Readonly local constant cannot be used as assignment
target" somewhere around. (Btw, message seems to be a little clumsy, constant
is always readonly).
Ideally, it would show tooltip only for new highlights. Also, it would be
nice to indicate real position of an error. May be just show tooltip below
(if caret is above highlight) or above (if caret is below) actual error position.

What do you think?

Sincerely,
Ilya Ryzhenkov


8 comments
Comment actions Permalink

Hello Ilya,

sorry if I'm missing something, but doesn't the error stripe already plays
a similar role to
the popups you propose?


Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Just an idea for discussion. It happens all the time, that change of
code creates error/warning (or Nerpa suggestion) highlight in nearby
code. For example, consider the following code:

string b = "foo";
b = "bar";
If I add "const" keyword before "string" - I get error highlight, but
I can't see its text, because it is on different line. I have to
either move caret to it to see it in status bar (caret & eye move) or
use mouse to hover over highlight (move hand from keyboard to mouse).
It would be really nice, if Resharper could show text of nearby
highlight in a popup-style window somewhere near the current caret
position. So after I have (| is caret)

const |string b = "foo";
b = "bar";
I immediately see text "Readonly local constant cannot be used as
assignment
target" somewhere around. (Btw, message seems to be a little clumsy,
constant
is always readonly).
Ideally, it would show tooltip only for new highlights. Also, it would
be
nice to indicate real position of an error. May be just show tooltip
below
(if caret is above highlight) or above (if caret is below) actual
error position.
What do you think?

Sincerely,
Ilya Ryzhenkov



0
Comment actions Permalink

Hello Dmitry,

Error stripe is similar to highlights in code in this aspect. It says that
something is wrong, but doesn't say what exactly is wrong. You have to navigate
to error, probably in the middle of typing new code to see what is incorrect.
If I could see that by changing code I just created some specific error or
warning - I could fix it faster, or even undo changes and think again.

Actually, I don't expect it will be done in Resharper in some near future.
I think I can prototype it in Nerpa, and may be later it can migrate to Resharper
itself, if it prove useful. What I want is some feedback and ideas about
the proposal.

Sincerely,
Ilya Ryzhenkov


DS> Hello Ilya,
DS>
DS> sorry if I'm missing something, but doesn't the error stripe already
DS> plays
DS> a similar role to
DS> the popups you propose?
DS> Regards,
DS> Dmitry Shaporenkov
DS> JetBrains, Inc
DS> http://www.jetbrains.com
DS> "Develop with pleasure!"
>> Just an idea for discussion. It happens all the time, that change of
>> code creates error/warning (or Nerpa suggestion) highlight in nearby
>> code. For example, consider the following code:
>>
>> string b = "foo";
>> b = "bar";
>> If I add "const" keyword before "string" - I get error highlight, but
>> I can't see its text, because it is on different line. I have to
>> either move caret to it to see it in status bar (caret & eye move) or
>> use mouse to hover over highlight (move hand from keyboard to mouse).
>> It would be really nice, if Resharper could show text of nearby
>> highlight in a popup-style window somewhere near the current caret
>> position. So after I have (| is caret)
>> const |string b = "foo";
>> b = "bar";
>> I immediately see text "Readonly local constant cannot be used as
>> assignment
>> target" somewhere around. (Btw, message seems to be a little clumsy,
>> constant
>> is always readonly).
>> Ideally, it would show tooltip only for new highlights. Also, it
>> would
>> be
>> nice to indicate real position of an error. May be just show tooltip
>> below
>> (if caret is above highlight) or above (if caret is below) actual
>> error position.
>> What do you think?
>> Sincerely,
>> Ilya Ryzhenkov


0
Comment actions Permalink

Hello Ilya,

you don't need to navigate to error on the error stripe - you can just hover
over an
error (warning) mark, and you'll see its text in a tooltip. This is less
distracting than navigation.
Although I agree that there is no way to see what new problems you have created,
but this
looks only useful if you have plenty of errors and warnings in the file,
which is a rare situation.
Normally you can track newly introduced errors by paying attention to number
of marks on the
error stripe.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello Dmitry,

Error stripe is similar to highlights in code in this aspect. It says
that something is wrong, but doesn't say what exactly is wrong. You
have to navigate to error, probably in the middle of typing new code
to see what is incorrect. If I could see that by changing code I just
created some specific error or warning - I could fix it faster, or
even undo changes and think again.

Actually, I don't expect it will be done in Resharper in some near
future. I think I can prototype it in Nerpa, and may be later it can
migrate to Resharper itself, if it prove useful. What I want is some
feedback and ideas about the proposal.

Sincerely,
Ilya Ryzhenkov

DS>> Hello Ilya,
DS>>
DS>> sorry if I'm missing something, but doesn't the error stripe
DS>> already
DS>> plays
DS>> a similar role to
DS>> the popups you propose?
DS>> Regards,
DS>> Dmitry Shaporenkov
DS>> JetBrains, Inc
DS>> http://www.jetbrains.com
DS>> "Develop with pleasure!"
>>> Just an idea for discussion. It happens all the time, that change of
>>> code creates error/warning (or Nerpa suggestion) highlight in nearby
>>> code. For example, consider the following code:
>>>
>>> string b = "foo";
>>> b = "bar";
>>> If I add "const" keyword before "string" - I get error highlight,
>>> but
>>> I can't see its text, because it is on different line. I have to
>>> either move caret to it to see it in status bar (caret & eye move)
>>> or
>>> use mouse to hover over highlight (move hand from keyboard to
>>> mouse).
>>> It would be really nice, if Resharper could show text of nearby
>>> highlight in a popup-style window somewhere near the current caret
>>> position. So after I have (| is caret)
>>> const |string b = "foo";
>>> b = "bar";
>>> I immediately see text "Readonly local constant cannot be used as
>>> assignment
>>> target" somewhere around. (Btw, message seems to be a little clumsy,
>>> constant
>>> is always readonly).
>>> Ideally, it would show tooltip only for new highlights. Also, it
>>> would
>>> be
>>> nice to indicate real position of an error. May be just show tooltip
>>> below
>>> (if caret is above highlight) or above (if caret is below) actual
>>> error position.
>>> What do you think?
>>> Sincerely,
>>> Ilya Ryzhenkov


0
Comment actions Permalink

Hello Dmitry,

Using mouse while typing code decreases productivity. It takes several seconds,
to get to mouse, move it to error stripe, wait for tooltip, read it, move
mouse out so tooltip doesn't hang around. If tooltip were displayed for a
short time right at the moment error is introduced, it will save a lot of
time writing code I think.

Sincerely,
Ilya Ryzhenkov


DS> Hello Ilya,
DS>
DS> you don't need to navigate to error on the error stripe - you can
DS> just hover
DS> over an
DS> error (warning) mark, and you'll see its text in a tooltip. This is
DS> less
DS> distracting than navigation.
DS> Although I agree that there is no way to see what new problems you
DS> have created,
DS> but this
DS> looks only useful if you have plenty of errors and warnings in the
DS> file,
DS> which is a rare situation.
DS> Normally you can track newly introduced errors by paying attention
DS> to number
DS> of marks on the
DS> error stripe.
DS> Regards,
DS> Dmitry Shaporenkov
DS> JetBrains, Inc
DS> http://www.jetbrains.com
DS> "Develop with pleasure!"
>> Hello Dmitry,
>>
>> Error stripe is similar to highlights in code in this aspect. It says
>> that something is wrong, but doesn't say what exactly is wrong. You
>> have to navigate to error, probably in the middle of typing new code
>> to see what is incorrect. If I could see that by changing code I just
>> created some specific error or warning - I could fix it faster, or
>> even undo changes and think again.
>>
>> Actually, I don't expect it will be done in Resharper in some near
>> future. I think I can prototype it in Nerpa, and may be later it can
>> migrate to Resharper itself, if it prove useful. What I want is some
>> feedback and ideas about the proposal.
>>
>> Sincerely,
>> Ilya Ryzhenkov
DS>>> Hello Ilya,
DS>>>
DS>>> sorry if I'm missing something, but doesn't the error stripe
DS>>> already
DS>>> plays
DS>>> a similar role to
DS>>> the popups you propose?
DS>>> Regards,
DS>>> Dmitry Shaporenkov
DS>>> JetBrains, Inc
DS>>> http://www.jetbrains.com
DS>>> "Develop with pleasure!"
>>>> Just an idea for discussion. It happens all the time, that change
>>>> of code creates error/warning (or Nerpa suggestion) highlight in
>>>> nearby code. For example, consider the following code:
>>>>
>>>> string b = "foo";
>>>> b = "bar";
>>>> If I add "const" keyword before "string" - I get error highlight,
>>>> but
>>>> I can't see its text, because it is on different line. I have to
>>>> either move caret to it to see it in status bar (caret & eye move)
>>>> or
>>>> use mouse to hover over highlight (move hand from keyboard to
>>>> mouse).
>>>> It would be really nice, if Resharper could show text of nearby
>>>> highlight in a popup-style window somewhere near the current caret
>>>> position. So after I have (| is caret)
>>>> const |string b = "foo";
>>>> b = "bar";
>>>> I immediately see text "Readonly local constant cannot be used as
>>>> assignment
>>>> target" somewhere around. (Btw, message seems to be a little
>>>> clumsy,
>>>> constant
>>>> is always readonly).
>>>> Ideally, it would show tooltip only for new highlights. Also, it
>>>> would
>>>> be
>>>> nice to indicate real position of an error. May be just show
>>>> tooltip
>>>> below
>>>> (if caret is above highlight) or above (if caret is below) actual
>>>> error position.
>>>> What do you think?
>>>> Sincerely,
>>>> Ilya Ryzhenkov


0
Comment actions Permalink

Ilea,
Why not to create a keyboard action to show tooltip for error near the
cursor?

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

I guess that the whole point of the proposal is that the tooltip should show
automatically.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Ilea,
Why not to create a keyboard action to show tooltip for error near the
cursor?



0
Comment actions Permalink

Hello Sergey,

Yes, this can be another way to do it. At least it doesn't require changing
edition point.
I will write a prototype with Nerpa and see how it works.

Sincerely,
Ilya Ryzhenkov


SC> Ilea,
SC> Why not to create a keyboard action to show tooltip for error near
SC> the
SC> cursor?


0
Comment actions Permalink

Hello Dmitry,

It should be visible somehow near error point without changing caret position
and moving hand to mouse. Hotkey may also work, but it cannot track newely
introduced highlights, I think.

Sincerely,
Ilya Ryzhenkov


DS> I guess that the whole point of the proposal is that the tooltip
DS> should show automatically.
DS>
DS> Regards,
DS> Dmitry Shaporenkov
DS> JetBrains, Inc
DS> http://www.jetbrains.com
DS> "Develop with pleasure!"
>> Ilea,
>> Why not to create a keyboard action to show tooltip for error near
>> the
>> cursor?


0

Please sign in to leave a comment.