|
Re: A simple view toolbar and normal toolbar questions [message #974166 is a reply to message #973439] |
Tue, 06 November 2012 22:45 |
|
Hello John,
Which Version of Eclipse do you use? 4.x or 3.x?
And could you please share the xml definition of the menuContribution and Commands in your plugin.xml.
Or the whole content of the plugin.xml, if it is not that much.
With that information it is easier to analyse what goes wrong
Best regards,
Simon
|
|
|
|
Re: A simple view toolbar and normal toolbar questions [message #974946 is a reply to message #973439] |
Wed, 07 November 2012 13:10 |
|
Hello John,
You could try this:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<view
allowMultiple="false"
class="executor.ui.SequencesView"
id="executor.ui.SequencesView"
name="Sequences"
restorable="true">
</view>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:executor.ui.SequencesView">
<command
commandId="command.create"
icon="icons/resume_co.gif"
label="test"
style="push">
</command>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
id="command.create"
name="Execute Sequence">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="command.create">
<class
class="executor.ui.SequencesView.CommandHandler.YOURCOMMANDHANDLER">
</class>
</handler>
</extension>
</plugin>
You have to define a Handler for a Command, which should be executed when the command is run.
And you do not have to use the <toolbar id="executor.toolbar5"> </toolbar>, but you can directly assign the command to the view´s toolbar.
Tell me if it works.
Best regards,
Simon
|
|
|
|
Powered by
FUDForum. Page generated in 0.02923 seconds