Howto create a RCP or plugin with the visual editor instead of the default one similar to the genmodel file

StackOverflow https://stackoverflow.com/questions/14271008

  •  14-01-2022
  •  | 
  •  

Question

If I run the tests project (generated by Eugenia), as Eclipse application, I can create a "beautiful" editor:

enter image description here

But if I export everything as a plugin I only can create a "ugly" editor (similar to the genmodel file):

enter image description here

The same happens if I try to create a RCP application:

enter image description here

Is there a "magic" option to generated the "beautiful" editor?

Thanks for any help! :)

Carlos

Was it helpful?

Solution

We have to mix the power of Eugenia with the power of GMF. It is the best way I have found to do it:

  • Right click file.ecore - Eugenia - Generate GMF Tool, graph and map models.
  • Right click file.ecore - Eugenia - Generate EMF GenModel
  • Open file.genmodel - Right click file_editor - Generate All (maybe it is necessary to select RCP in the properties of the genmodel file previously)
  • Right click file.gmfmap - Create generator model - Select the option Generate RCP Application when available
  • Right click file.gmfgen - Generate diagram code

And in my particular case and because I'm using .svg images so I get an error, to solve it I have to:

  • Open InEditPart.java - Find the line: import org.eclipse.gmf.runtime.lite.svg.SVGFigure; - Click the error of the line - Fix Project Setup
  • Previously I had to install (Help - Install new software) GMF Tooling Experimental SDK to be able to use svg images

I hope it helps to somebody!

Carlos

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top