Tirthankar
Tirthankar

Reputation: 615

All the available tags in plugin.xml in eclipse

For eclipse plugin development, how can I know what all tags are available in plugin.xml?
Is there any list of tags available?

Upvotes: 2

Views: 3705

Answers (2)

Konstantin Komissarchik
Konstantin Komissarchik

Reputation: 29139

The set of tags available in plugin.xml is not finite nor is it the same across different installations of Eclipse. The extension points are contributed by various plugins who determine the schema of their subset of plugin.xml.

To make sense of this, don't use a text editor for editing plugin.xml files. Always use the form-based editor that comes with PDE. It will guide you in discovering the available extension points and their attributes.

Upvotes: 2

Freak
Freak

Reputation: 6873

From the article given by eclipse.org You need to set these tags in plugin.xml

<?xml version="1.0"?>
<plugin
    name="Eclipse Hello World Example"
    id="org.eclipse.examples.helloworld"
    version="0.0.0"
    provider-name="OTI">

    <requires>
    <import plugin="org.eclipse.core.resources"/>
        <import plugin="org.eclipse.ui"/>
    </requires>

    <runtime>
    <library name="helloworld.jar"/>
    </runtime>

    <extension point = "org.eclipse.ui.actionSets">
        <actionSet
            id="org.eclipse.examples.helloworld.HelloWorldActionSet"
            label="Hello World"
        visible="true"
        description="The action set for the Eclipse Hello World example">
        <menu
        id="org.eclipse.examples.helloworld.HelloWorldMenu"
        label="Samples">
        <separator name="samples"/>
        </menu>
        <action id="org.eclipse.examples.helloworld.actions.HelloWorldAction"
        menubarPath="org.eclipse.examples.helloworld.HelloWorldMenu/samples"
        toolbarPath="Normal"            
        label="Hello World"
        tooltip="Press to see a message"
        icon="icons/helloworld.gif"
        class="org.eclipse.examples.helloworld.HelloWorldAction"/>
        </actionSet>
    </extension>
</plugin>

Just edit the plugin.xml file and put these tags according to your plugin configuration
You can use Eclipse to edit this file using the default text editor. To do so, select Window -> Preferences, expand the Workbench entry, and select File Associations. Add resource extension xml, and add the Text Editor to its associations. Now when you attempt to open an editor on a .xml file, you'll do so with the default text editor.PDE makes this a LOT easier for complex plug-ins

Upvotes: -1

Related Questions