[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] editorActions & Separate Toolbars
|
Hello,
I have an editor and want 2 separate toolbars available if & only-if my editor is active. The editorActions extension point seems perfect for creating these toolbars and binding them to my editor, but I cannot get this to work; although the actions are properly bound to the editor, they always appear on the SAME toolbar.
According to the 3.3 DTD, if I'm using editorActions, I should be able to do this using the toolbarPath property, "a slash-delimited path that is used to specify the location of this action in the toolbar. The first token represents the toolbar identifier (with "Normal" being the default toolbar)".
However, according to another site regarding editorActions, (http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html), "Currently in the Workbench, only one toolbar is supported and its identifier is "Normal"." This appears to be the issue I'm banging my head against.
Any thoughts would be greatly appreciated!
~Dan
<pre>
<b>
Here is my attempt to create 2 separate buttons and add them to two separate toolbars.<br/>
</b>
<extension point="org.eclipse.ui.editorActions">
<editorContribution
id="whateva.editoractions.v2d.tb1"
targetID="whateva.editors.editor2d">
<action
id="whateva.actions.33455"
label="Label"
toolbarPath="tb1/g1"
style="toggle"
state="true"
icon="icons/CMDID_33455.png"
class="whateva.actions.MyEditorActionDeligate"
tooltip="Tooltip">
</action>
</editorContribution>
<editorContribution
id="whateva.editoractions.v2d.tb2"
targetID="whateva.editors.editor2d">
<action
id="whateva.actions.33474"
label="Label"
toolbarPath="tb2/g1"
style="toggle"
state="true"
icon="icons/CMDID_33474.png"
class="whateva.actions.MyEditorActionDeligate"
tooltip="Tooltip">
</action>
</editorContribution>
</extension>
</pre>