【问题标题】:import error while adding TextEditor to eclipse plugin - Cannot find the class file for org.eclipse.jface.text.revisions.RevisionInformation将 TextEditor 添加到 Eclipse 插件时出现导入错误 - 找不到 org.eclipse.jface.text.revisions.RevisionInformation 的类文件
【发布时间】:2016-06-28 16:56:36
【问题描述】:

首先我将org.eclipse.ui.editors 添加到依赖项中。 然后我在扩展中添加了一个编辑器

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.views">
      <view
            class="nattable.examples.ReceivingDataTable"
            id="com.abernard.nattable.ReceivingDataTable"
            name="ReceivingDataTable"
            restorable="true">
      </view>
   </extension>
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="nattable.TaskEditor"
            default="false"
            id="DiagnosticTool.editor1"
            name="TaskEditor">
      </editor>
   </extension>

</plugin>

最后,当我编辑我的类以扩展 TextEditor 并导入 org.eclipse.ui.editors.text.TextEditor 时,我得到了错误:

【问题讨论】:

  • 你遇到了什么错误?!图片上没有错误描述...
  • 抱歉,不清楚您遇到了什么错误。
  • 对不起,这是我的错误..我编辑了错误图像

标签: java eclipse plugins text-editor


【解决方案1】:

将插件org.eclipse.jface.text 添加到您的插件依赖项以解决缺少的类型。

作为绝对最低限度,您在 MANIFEST.MF 中列出的插件依赖项应该是:

Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.jface.text,
 org.eclipse.ui.editors

(但您可能需要更多)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-25
    • 2018-07-09
    • 2011-02-24
    • 1970-01-01
    • 1970-01-01
    • 2016-09-08
    • 1970-01-01
    相关资源
    最近更新 更多