0
votes

i'm making a little Eclipse plugin. When i launch it inside the eclipse RCP, all works fine. But when i export it as feature and install it on a standard Eclipse i get this error :

Plug-in foo.bar was unable to load class foo.bar.Editor.

I have searched into the generated feature and plugin jar and the Editor.class is inside bin/foo/bar/Editor.class.

So what is the problem?

This is my plugin build.properties :

bin.includes = META-INF/,\
               plugin.xml,\
               icons/,\
               bin/info/
jars.compile.order = cucumber-core-1.2.4.jar,\
                     cucumber-html-0.2.3.jar,\
                     cucumber-java-1.2.4.jar,\
                     cucumber-junit-1.2.4.jar,\
                     cucumber-jvm-deps-1.0.5.jar,\
                     gherkin-2.12.2.jar
src.includes = src/,\
               icons/,\
               plugin.xml,\
               META-INF/,\
               .project,\
               .classpath,\
               .settings/,\
               build.properties

This is my MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Cucumber
Bundle-SymbolicName: foo.bar.cucumber;singleton:=true
Bundle-Version: 2.0.0.Final
Bundle-Activator: foo.bar.cucumber.Activator
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.jface.text;bundle-version="3.9.2",
 org.eclipse.ui.editors;bundle-version="3.8.200",
 org.eclipse.swt,
 org.eclipse.text,
 org.eclipse.osgi,
 org.eclipse.equinox.registry,
 org.eclipse.jdt.core,
 org.eclipse.core.resources,
 Cucumber;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Import-Package: cucumber.api.java.fr,
 org.eclipse.ui.texteditor,
 org.eclipse.ui.texteditor.templates
Export-Package: foo.bar.cucumber,
 foo.bar.cucumber.contentAssist,
 foo.bar.cucumber.synthaxColoring

My plugin.xml

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="foo.bar.cucumber.Editor"
            default="false"
            extensions="feature"
            icon="icons/cukes.gif"
            id="foo.bar.cucumber.editor"
            name="Cucumber editor">
      </editor>
   </extension>
   <extension
         point="org.eclipse.ui.editors.templates">
      <contextType
            class="org.eclipse.jface.text.templates.TemplateContextType"
            id="foo.bar.cucumber.contentAssist.template.contextType"
            name="Default Context Type">
      </contextType>
      <template
            autoinsert="true"
            contextTypeId="foo.bar.cucumber.contentAssist.template.contextType"
            description="Template d&apos;une fonctionnalité"
            icon="icons/cukes.gif"
            id="foo.bar.cucumber.contentAssist.template.feature"
            name="Fonctionnalité">
         <pattern>
            #language:fr
Fonctionnalité : ${description_de_la_fonctionnalité}

    Scénario : ${description_du_scénario}
        Soit 
        Et
        Alors
         </pattern>
      </template>
      <template
            autoinsert="true"
            contextTypeId="foo.bar.cucumber.contentAssist.template.contextType"
            description="Template d&apos;un scénario"
            icon="icons/cukes.gif"
            id="foo.bar.cucumber.contentAssist.template.scenario"
            name="Scénario">
         <pattern>
            Scénario : ${description_du_scénario}
        Soit 
        Et
        Alors
         </pattern>
      </template>
   </extension>

</plugin>
1

1 Answers

0
votes

Assuming your source code is in the src folder and the output classes are in the bin folder the build.properties should contain something like:

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
               .,\
               icons/,\
               plugin.xml

(plus your jar.compile.order)

If you want those jars to be included in the plugin they need to be listed in the 'bin.includes' as well.