This service is archived, please use www.eclipse.org/forums


Home » Archived Projects » Kitalpha » my own generate java file at the viewpoint generation
my own generate java file at the viewpoint generation [message #645] Thu, 07 January 2016 07:25 Go to next message
labin78.hotmail.com is currently offline  labin78.hotmail.com
Messages: 51
Registered: December 2015
Member
Hi,

Now I would like generate my own plugin and java class during viewpoint generation (like the JavaRule classes are generated).

Exists it extensions to implement for to add task during viewpoint generation ?

Thank you
Regards





Re: my own generate java file at the viewpoint generation [message #646 is a reply to message #645] Fri, 08 January 2016 05:34 Go to previous messageGo to next message
labin78.hotmail.com is currently offline  labin78.hotmail.com
Messages: 51
Registered: December 2015
Member
Hi,

If i understand correctly, I must use the extension point ExtensionLauncher.
With EGF, I define a fcore model allowing to invoke a ITaskProduction implementation.
Now i know generate my java class during viewpoint generation.

Next step : It is possible to define my own vptext file with my own grammar ?


Thanks.


Re: my own generate java file at the viewpoint generation [message #725 is a reply to message #646] Tue, 01 March 2016 10:37 Go to previous message
boubekeur.zendagui@thales is currently offline  boubekeur.zendagui@thales
Messages: 54
Registered: April 2015
Member
Hi,

Yes you can extends Viewpoint DSL. There are three levels: The Abstract Syntax (AS), The Concret Syntax (CS) and the Generation.

Each VPText file is a CS to edit an AS (UI, Diagram, Releng, etc.). Before starting the development of a Generation or a CS, you should define at first the AS.

An AS is an Ecore model with a root element that inherits from the Aspect EClass (org.polarsys.kitalpha.ad.viewpoint.dsl.as.desc/model/vpdesc .ecore). The root element is thus an EMF Extension to the vpdesc model. After defining the AS Ecore model and generating its EMF APIs, please check if you can create, in the .vpdesc model, the root element of your AS near Data, Diagram, etc. You can follow for example the Build AS (org.polarsys.kitalpha.ad.viewpoint.dsl.as.build)

Once your AS created and tested, the next steps are defining the associated CS and generation.

The Viewpoint DSL generation is based on EGF. So you should :
  1. define a Factory Component (fcore model) to implement your generation.
  2. use the extension point org.polarsys.kitalpha.ad.viewpoint.dsl.generation.core.Exten sionLauncher to create a new Viewpoint DSL generation extension.

All VPtext files are made with XText. To develop a new one, you can follow the Build CS (org.polarsys.kitalpha.ad.viewpoint.dsl.cs.text.build and org.polarsys.kitalpha.ad.viewpoint.dsl.cs.text.build.ui)

Regards,
Boubekeur Zendagui
Previous Topic: Problems with Diagram generation
Next Topic: Diagram extension
Goto Forum:
  


Current Time: Fri May 29 23:55:50 EST 2020

Total time taken to generate the page: 0.01489 seconds