Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. 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? It MAY be easy to integrate with ANTLR.

A Sample example or its link will be useful.

TemperatureSensor
      generate tempMeasurement : TempStruct;

TempStruct
      tempValue : double;
      unitOfMeasurement: String;   
like image 347
Pankesh Avatar asked Jun 28 '15 07:06

Pankesh


People also ask

Does Eclipse have drag-and-drop?

Easily add controls using drag-and-drop, add event handlers to your controls, change various properties of controls using a property editor, internationalize your app and much more.

Why drag-and-drop is not working in Eclipse?

I had this issue when Eclipse was running as Administrator. Setting it back just worked. Similar issue I faced and tried with lot of drag and drop API, but DnD not worked for me, remove Eclipse Administrator permission at start, Simply worked for me...


2 Answers

You could have a look at Graphiti, it is much lighter than GMF and easier to setup. 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.

like image 108
Yann TM Avatar answered Oct 01 '22 11:10

Yann TM


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. There are even some efforts to integration GEF with XText, for example this one.

like image 45
E-Riz Avatar answered Oct 01 '22 09:10

E-Riz