Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to create own Markers by double click on the vertical ruler
How to create own Markers by double click on the vertical ruler [message #334700] Wed, 25 February 2009 10:52 Go to next message
Martin is currently offline MartinFriend
Messages: 5
Registered: July 2009
Junior Member
I'm working on a project, where new markers need to be used. I have
defined the new marker type and also annotation type in the plugin.xml
file and I can see it now in the Preferences.
But I want to create new markers by double-click on the vertical ruler.
The editor, that is to be used is the CEditor from the Eclipse for C/C++
developers. Now when I double click on the vertical ruler, new breakpoint
is created (as usual).
I want to ask how can I create my own markers by double click. Should I
search some extension points in the CEditor's plugin.xml or can I make
this by programming.

Thanks in advance.

Martin
Re: How to create own Markers by double click on the vertical ruler [message #334712 is a reply to message #334700] Wed, 25 February 2009 13:28 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Martin wrote:
> I'm working on a project, where new markers need to be used. I have
> defined the new marker type and also annotation type in the plugin.xml
> file and I can see it now in the Preferences.
> But I want to create new markers by double-click on the vertical
> ruler. The editor, that is to be used is the CEditor from the Eclipse
> for C/C++ developers. Now when I double click on the vertical ruler,
> new breakpoint is created (as usual). I want to ask how can I create
> my own markers by double click.
You can't. There is only one double-click action and obviously the
CEditor already defines it.

Dani
> Should I search some extension points in the CEditor's plugin.xml or
> can I make this by programming.
> Thanks in advance.
>
> Martin
>
Re: How to create own Markers by double click on the vertical ruler [message #334720 is a reply to message #334712] Wed, 25 February 2009 14:09 Go to previous messageGo to next message
Martin is currently offline MartinFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Dani,

thanks for the answer.
But what if I overwrite this double-click action?

Cheers,

Martin
How to set my plug-in on top of the prerequisite tree ???? [message #334867 is a reply to message #334700] Wed, 04 March 2009 21:50 Go to previous messageGo to next message
Martin is currently offline MartinFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

I want to create my markers per double-click in the vertical ruler.
After some research and developmen, I found that the editorActions
extension point can be used to overwrite the RulerDoubleClick Action.
RulerDoubleClick is actually an actionID attribute in a Action
definitions. My definition looks like:
<extension
point="org.eclipse.ui.editorActions">
<editorContribution
targetID="org.eclipse.cdt.ui.editor.CEditor"
id="org.eclipse.cdt.debug.ui.CEditor.MyRulerActions">
<action
label="%Dummy.label"

class=" xx.xxx.xxxxxxx.xxxxx.ui.actions.CreateMyMarkerActionDelegate "
actionID="RulerDoubleClick"
id="xx.xx.xxxxxxx.xxxxx.ui.actions.CreateMyMarkerAction">
</action>
</editorContribution>

The org.eclipse.cdt.ui plugin has a similar declaration, but there the
defined action is for creating Bookmarks. The org.eclipse.cdt.degbu.ui
overwrites the RulerDoubleClick actionId and set it to be used for
creating breakpoints.

With my declaration I made it one time. I could create my markers per
double click, but next time I couldn't.
So I found this in the extension point help: "
actionID - Internal tag for use by the text editors. Should not be used by
plug-in developers. The following IDs have special meaning for the text
editor framework:
"RulerClick": the contributed action which is invoked upon single-click in
the (left) vertical ruler
"RulerDoubleClick": the contributed action which is invoked upon
single-click in the (left) vertical ruler
If multiple extensions contribute ruler actions to the same text editor,
the extension whose plug-in is at the top of the prerequisite tree wins.
If there are multiple such plug-ins, the first wins. "

According to it, it my help. So my question is, how can I set my plug-in
to be on the top of the prerequisite tree ???

Thanks in advance.

Cheers,

Martin
Re: How to set my plug-in on top of the prerequisite tree ???? [message #334977 is a reply to message #334867] Fri, 13 March 2009 09:12 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
Martin P wrote:
> Hello,
>
> I want to create my markers per double-click in the vertical ruler.
> After some research and developmen, I found that the editorActions
> extension point can be used to overwrite the RulerDoubleClick Action.
> RulerDoubleClick is actually an actionID attribute in a Action
> definitions. My definition looks like:
> <extension
> point="org.eclipse.ui.editorActions">
> <editorContribution
> targetID="org.eclipse.cdt.ui.editor.CEditor"
> id="org.eclipse.cdt.debug.ui.CEditor.MyRulerActions">
> <action
> label="%Dummy.label"
>
> class=" xx.xxx.xxxxxxx.xxxxx.ui.actions.CreateMyMarkerActionDelegate "
> actionID="RulerDoubleClick"
> id="xx.xx.xxxxxxx.xxxxx.ui.actions.CreateMyMarkerAction">
> </action>
> </editorContribution>
>
> The org.eclipse.cdt.ui plugin has a similar declaration, but there the
> defined action is for creating Bookmarks. The org.eclipse.cdt.degbu.ui
> overwrites the RulerDoubleClick actionId and set it to be used for
> creating breakpoints.
>
> With my declaration I made it one time. I could create my markers per
> double click, but next time I couldn't. So I found this in the
> extension point help: "
> actionID - Internal tag for use by the text editors. Should not be
> used by plug-in developers. The following IDs have special meaning for
> the text editor framework: "RulerClick": the contributed action which
> is invoked upon single-click in the (left) vertical ruler
> "RulerDoubleClick": the contributed action which is invoked upon
> single-click in the (left) vertical ruler If multiple extensions
> contribute ruler actions to the same text editor, the extension whose
> plug-in is at the top of the prerequisite tree wins. If there are
> multiple such plug-ins, the first wins. "
>
> According to it, it my help. So my question is, how can I set my
> plug-in to be on the top of the prerequisite tree ???
Your plug-in must declare to require the other ones (in manifest.mf).

Dani
>
> Thanks in advance.
>
> Cheers,
>
> Martin
>
>
>
Previous Topic:Problems View - custom attribute column
Next Topic:working sets in "Project References"
Goto Forum:
  


Current Time: Wed Nov 26 09:10:30 GMT 2014

Powered by FUDForum. Page generated in 0.01761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software