One entry point (class) to handle all actions [message #243094] |
Fri, 21 May 2004 07:45 |
Eclipse User |
|
|
|
Originally posted by: daniel.nilsson.post.com
I already have a plugin that I want to integrate in Eclipse. What I want is
just a small plugin file (xml) that defines a class to call that should
handle all actions from the toolbar and the menu.
The class should function as a thin client that handles all the
communication from my API to Eclipse. It should also function as one entry
point to create all actions, buttons and menus. From this class I also want
to be able to handle all dynamic things that might happen. For example when
a button should become disabled in Eclipse due to something that happens in
my API etc.
Is there any way of doing this? (I am new to eclipse plugin developing, and
I can't find any example of this in the manual)
I mean I don't want to define my plugin the way shown in the example below
where you set the every icon and menu item etc for the menus and buttons in
a xml file:
<extension point = "org.eclipse.ui.actionSets">
<actionSet id="org_eclipse_ui_examples_readmetool_actionSet"
label="%ActionSet.name"
visible="true">
<menu id="org_eclipse_ui_examples_readmetool"
label="%ActionSet.menu"
path="window/additions">
<separator name="slot1"/>
<separator name="slot2"/>
<separator name="slot3"/>
</menu>
<action id="org_eclipse_ui_examples_readmetool_readmeAction"
menubarPath="window/org_eclipse_ui_examples_readmetool/slot1 "
toolbarPath="readme"
label="%ReadmeAction.label"
tooltip="%ReadmeAction.tooltip"
helpContextId=" org.eclipse.ui.examples.readmetool.open_browser_action_conte x
t"
icon="icons/ctool16/openbrwsr.gif"
class="org.eclipse.ui.examples.readmetool.WindowActionDelegate "
enablesFor="1">
<selection class="org.eclipse.core.resources.IFile"
name="*.readme">
</selection>
</action>
...
</actionSet>
</extension>
I saw that there was an AbstractUIPlugin class. Anyway of accomplishing this
with that class.
Regards,
Daniel Nilsson
|
|
|
Powered by
FUDForum. Page generated in 0.05913 seconds