How to create own Markers by double click on the vertical ruler [message #334700] |
Wed, 25 February 2009 05:52  |
Eclipse User |
|
|
|
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
|
|
|
|
|
How to set my plug-in on top of the prerequisite tree ???? [message #334867 is a reply to message #334700] |
Wed, 04 March 2009 16:50   |
Eclipse User |
|
|
|
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 05:12  |
Eclipse User |
|
|
|
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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04680 seconds