简体   繁体   English

在Eclipse中拖放可视化编辑器

[英]Drag and Drop visual editor in Eclipse

In my current project, I write high-level specification ( as indicated below for reference) and am parsing it using grammar written in ANTLR and then using StringTempate to generate equivalent Java programming code. 在我当前的项目中,我编写了高级规范(如下所示以供参考),并使用ANTLR中编写的语法对其进行解析,然后使用StringTempate生成等效的Java编程代码。 Now, my client finds the writing of this textual high-level specification difficult and want me to provide equivalent visual drag and drop programming constructs and editor to specify this programming constructs. 现在,我的客户发现编写此文本高级规范很困难,并希望我提供等效的可视化拖放编程结构和编辑器来指定此编程结构。 My question is : does eclipse provide any drag and drop workbench to develop visual programming constructs and editors? 我的问题是: eclipse是否提供任何拖放工作台来开发可视化程序构造和编辑器? It MAY be easy to integrate with ANTLR. 与ANTLR集成可能很容易。

A Sample example or its link will be useful. 示例示例或其链接将很有用。

TemperatureSensor
      generate tempMeasurement : TempStruct;

TempStruct
      tempValue : double;
      unitOfMeasurement: String;   

You could have a look at Graphiti, it is much lighter than GMF and easier to setup. 您可以看一下Graphiti,它比GMF轻得多且易于设置。 https://eclipse.org/graphiti/ https://eclipse.org/graphiti/

In any case to leverage existing tools in eclipse to manipulate models, you absolutely need a metamodel to integrate into the EMF, so you might use Xtext to develop that, based on your existing antlr grammar. 无论如何要利用eclipse中的现有工具来操纵模型,您绝对需要一个元模型来集成到EMF中,因此您可以根据现有的antlr语法使用Xtext进行开发。

Have a look at Eclipse Graphical Editing Framework (GEF) , it's a framework for creating graphical editors in an Eclipse-based product or plug-in. 看一下Eclipse图形编辑框架(GEF) ,它是一个用于在基于Eclipse的产品或插件中创建图形编辑器的框架。 There are even some efforts to integration GEF with XText , for example this one . 甚至有一些努力整合全球环境基金与XTEXT ,例如这一个

Yes, Eclipse has the Sirius project. 是的,Eclipse有Sirius项目。 https://www.eclipse.org/sirius/ https://www.eclipse.org/sirius/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM