2016-04-16 5 views
0

少しEclipseプラグインを作っています。 Eclipse RCPの中で起動すると、すべて正常に動作します。私はこのエラーを取得する機能として、それをエクスポートして、標準のEclipseにインストールするときしかし:私のRCPプラグインがロードを拒否します

プラグインfoo.barはクラス foo.bar.Editorをロードできませんでした。

私は、生成された機能とプラグインjarを検索し、Editor.classはbin/foo/bar/Editor.classの中にあります。

だから問題は何ですか?

これは私のプラグインの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 

これは私の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 

マイ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> 

答えて

0

は、ソースコードが入っていると仮定すると、 srcフォルダにあり、出力クラスはbinフォルダにあります。build.properties何かのように含まれている必要があります:あなたは、これらのjarは彼らが「bin.includes」に記載されてする必要がプラグインに含まれるようにしたい場合は

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

(プラスあなたのjar.compile.order)

をよく

+0

これは動作しません。今私はbinディレクトリの代わりに、プラグインのJarのルートにfoo.bar.Editor.classを持っています。これの方が良い。しかし、Eclipseはまだエディタクラスを見つけることができません – Scandinave

+0

あなたの質問を編集して、プラグインのMANIFEST.MFとplugin.xmlを追加してください –

関連する問題