Mark Occurrences

Hi,

In IntelliJ if I place the cursor on a reference 'foo' and press Ctrl+Shift+F7 and IDEA will show me all places where 'foo' is used. If I then move the cursor to another reference 'bar' it will highlight all usages of 'bar' does not remove the highlighting of references to 'foo',

I would like this feature to behave exactly as it does in Eclipse:

  • Occurences are automatically marked when the cursor is placed on a reference, i.e. you don't need to press anything
  • When the cursor moves off a reference, the highlighting is removed


Is this possible?

Thanks,
Don

9 comments
Comment actions Permalink

Hello Don,

Settings | Editor | Highlight usages of element at caret

In IntelliJ if I place the cursor on a reference 'foo' and press
CtrlShiftF7 and IDEA will show me all places where 'foo' is used. If
I then move the cursor to another reference 'bar' it will highlight
all usages of 'bar' does not remove the highlighting of references to
'foo',

I would like this feature to behave exactly as it does in Eclipse:

  • Occurences are automatically marked when the cursor is placed on a

reference, i.e. you don't need to press anything

  • When the cursor moves off a reference, the highlighting is removed


Is this possible?

= --
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thanks, that works perfectly. One other thing....
If the caret is on a reference and I scroll down so that the reference is no longer in the visible portion of the editor, the caret "fall offs" the reference so that it is kept in view (at the top of the editor window). Is there any way to stop the caret from being moved when scrolling?

Thanks,
Don

0
Comment actions Permalink

Hello Don,

Thanks, that works perfectly. One other thing....
If the caret is on a reference and I scroll down so that the reference
is no longer in the visible portion of the editor, the caret "fall
offs" the reference so that it is kept in view (at the top of the
editor window). Is there any way to stop the caret from being moved
when scrolling?


The caret doesn't move when you scroll using the mouse wheel. Ctrl-arrows
always keep the caret in the visible area.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

There was some discussion about this scrolling behaviour recently, and this
behaviour seems inconsistent to me. Personally I'd prefer the ctrl-arrows
behaviour was the same as the mousewheel. This is because if I have "Highlight
usages of element at caret" enabled, I lose the highlighting with ctrl-up/ctrl-down,
even though conceptually I consider myself to be simply scrolling the page,
not moving the cursor. That is, I equate mousewheel scrolling and keyboard
scrolling to be the same thing, but in fact they behave differently.

Was this a deliberate design decision? Any chance it can be changed?

Hello Don,

>> Thanks, that works perfectly. One other thing....
>> If the caret is on a reference and I scroll down so that the
>> reference
>> is no longer in the visible portion of the editor, the caret "fall
>> offs" the reference so that it is kept in view (at the top of the
>> editor window). Is there any way to stop the caret from being moved
>> when scrolling?

The caret doesn't move when you scroll using the mouse wheel.
Ctrl-arrows always keep the caret in the visible area.



0
Comment actions Permalink

The caret doesn't move when you scroll using the mouse wheel. Ctrl-arrows
always keep the caret in the visible area.


Strange....in my installation of IntelliJ (8.1.2) the caret definitely moves when I scroll using the mouse wheel - I've just tried it several times. For example, if I scroll down such that the caret would disppear off the top of the screen, the caret is moved so that it is always shown in the first visible line of the file. If I scroll up far enough, the cursor is moved so that it is always shown in the last visible line of the file. Is there a setting somewhere that can prevent the cursor from being moved when scrolling?

0
Comment actions Permalink

Strange, definitely doesn't do that for me here (Maia build 10338, but I'm
99% sure it was the same in 8.x since this difference between keyboard &
mouse has bugged me for a while). I'm on WinXP if that makes any difference.
I tried a bunch of different L&Fs but they all behave the same.

I'm not aware of any setting to change the behaviour but perhaps it's a side-effect
of some other caret or scrolling related setting?

The caret doesn't move when you scroll using the mouse wheel.
> Ctrl-arrows always keep the caret in the visible area.


Strange....in my installation of IntelliJ (8.1.2) the caret
definitely moves when I scroll using the mouse wheel - I've just
tried it several times. For example, if I scroll down such that the
caret would disppear off the top of the screen, the caret is moved so
that it is always shown in the firs

t visible line of the file. If I scroll up far enough, the cursor is
moved so that it is always shown in the last visible line of the file.
Is there a setting somewhere that can prevent the cursor from being
moved when scrolling?

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



0
Comment actions Permalink

Hello Don,

Do you use any non-standard mouse driver for your wheel mouse? Such behavior
is usually caused by mouse drivers trying to emulate the mouse wheel behavior
for non-wheel-compatible programs.

The caret doesn't move when you scroll using the mouse wheel.
> Ctrl-arrows always keep the caret in the visible area.


Strange....in my installation of IntelliJ (8.1.2) the caret
definitely moves when I scroll using the mouse wheel - I've just
tried it several times. For example, if I scroll down such that the
caret would disppear off the top of the screen, the caret is moved so
that it is always shown in the firs

t visible line of the file. If I scroll up far enough, the cursor is
moved so that it is always shown in the last visible line of the file.
Is there a setting somewhere that can prevent the cursor from being
moved when scrolling?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi Dmitry,

Here's the information I see in the control panel for my mouse driver (I'm running on Windows XP). I'm not sure whether this would be considered a non-standard driver.

mouse.JPG

0
Comment actions Permalink

I started noticing various other weird scrolling behaviours in my editor. I removed the IdeaVim and KeyPromoter plugins and all these problems disappeared.

0

Please sign in to leave a comment.