Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362499 - C/C++ Mark Occurrences is difficult to turn off
Summary: C/C++ Mark Occurrences is difficult to turn off
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-31 11:05 EDT by Beth Tibbitts CLA
Modified: 2011-11-02 08:50 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Tibbitts CLA 2011-10-31 11:05:11 EDT
Mark Occurrences formerly had a button in the toolbar (looks like a yellow highlighter) to toggle it on/off.
In fact the helps says it still does. 
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_toolbar.htm
But it's been missing for a while.

This can be annoying to figure out how to turn off if you don't know.
Because just double-clicking on a variable in the editor turns it on.
I used to turn it off with 
Alt-shift-O   but on my Mac this *also* adds an 'o' character in the file being edited.
But it does turn it off.

Upon further investigation (like reading the hover help on the button in the Plug-in Dev Perspective, where it still resides) maybe I'm supposed to do Alt-Cmd-O (aka Option-Cmd-O on Mac)
and this does toggle it without inserting a character.

I always like to show this in tutorials and I'm about to do another one.
How *should* the user be turning it off - does something work consistently in all platforms?
Can we put the button back into the C/C++ perspective?
Comment 1 Anton Leherbauer CLA 2011-11-02 06:28:47 EDT
(In reply to comment #0)
> Mark Occurrences formerly had a button in the toolbar (looks like a yellow
> highlighter) to toggle it on/off.
> But it's been missing for a while.

This works for me.
Note that the button appears and enables only when a C/C++ Editor has the focus.
We haven't changed that behavior for a very long time and it is exactly the same as JDT's.

> I used to turn it off with 
> Alt-shift-O   but on my Mac this *also* adds an 'o' character in the file being
> edited.
> But it does turn it off.
> Upon further investigation (like reading the hover help on the button in the
> Plug-in Dev Perspective, where it still resides) maybe I'm supposed to do
> Alt-Cmd-O (aka Option-Cmd-O on Mac)
> and this does toggle it without inserting a character.

Since bug 298696 we have aligned key bindings with those of JDT, ie. on carbon you need to press Option+Command+O to toggle mark occurrences.

> I always like to show this in tutorials and I'm about to do another one.
> How *should* the user be turning it off - does something work consistently in
> all platforms?
> Can we put the button back into the C/C++ perspective?

Are you maybe using some C/C++ Editor derivative?
Comment 2 Beth Tibbitts CLA 2011-11-02 07:52:11 EDT
Aha! you are exactly right. This is the Remote C/C++ Editor because RDT is installed.
I can't believe I never thought of that

Thanks; need to see how to get it fixed in the remote editor
Comment 3 Anton Leherbauer CLA 2011-11-02 08:50:43 EDT
(In reply to comment #2)
> Thanks; need to see how to get it fixed in the remote editor

Just add an actionSetPartAssociation extension for the RDT editor:

      <actionSetPartAssociation
            targetID="org.eclipse.cdt.ui.text.c.actionSet.presentation">
         <part id="insert-rdt-editor-id-here"/>
      </actionSetPartAssociation>