java - 如何将自定义编辑器与 graphiti 框架结合使用?

标签 java eclipse eclipse-plugin graphiti

我已经对这个问题进行了两天的研究,但没有运气,我查看了几个 Eclipse 论坛问题,例如:http://www.eclipse.org/forums/index.php/t/441641/其中说

  • subclass DiagramEditor
  • override that single method and create your behavior instance>
  • register your editor class with the org.eclipse.ui.editors extension point (probably for your own diagram file extension)

我的最终目标是提供我自己的行为,并且根据我在文档中阅读的内容完成它的方式是执行上述操作,我就是这么做的。这是我如何添加扩展点并使用我创建的类(扩展了DiagramEditor)的图片。

enter image description here

但是当我启动它时,它不会通过我的编辑器,是我做错了什么还是我还需要做其他事情?

最佳答案

据我在您的屏幕截图中看到,您尚未设置扩展名。将模型文件的扩展名添加到右侧的“扩展名” block 中。然后您的编辑器将成为默认编辑器,或者将在“打开方式”弹出菜单中可用。

关于java - 如何将自定义编辑器与 graphiti 框架结合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19319822/

相关文章:

java - 带 BigIntegers 的斐波那契计算器

java - 判断groovy.sql中Oracle查询结果的数据类型

java - 在内存中创建一个 Zip 文件

c - Mega Arduino 2560 和 Eclipse

xml - Flash Builder 中的 Eclipse XML 编辑器

Eclipse maven 无法找到 karma 可执行文件

eclipse - Hadoop Eclipse插件错误:调用localhost/127.0.0.1:54311失败,发生本地异常:java.io.EOFException

java - 解析此字符串然后返回它时遇到问题

java - Eclipse Java项目错误: cannot resolve declaration in swing

java - Google App Engine Blob 操作 [常规]