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


Home » Archived Projects » Kitalpha » [VPDSL][GRAMMAR] Using Java grammar
[VPDSL][GRAMMAR] Using Java grammar [message #850] Tue, 17 May 2016 07:48 Go to next message
Matthieu Durot is currently offline  Matthieu Durot
Messages: 35
Registered: December 2015
Member
Hello,

I was wondering if it's possible to make viewpoints with our own Java code instead of using the xtext grammar to generate the viewpoint's files ?

Maybe generating classes with Capella Studio and edit the generated files.
I truly don't know how to do simple Java things like display a list of strings in a viewpoint with Capella Studio...

Best regards,

Matthieu

[Updated on: Wed, 18 May 2016 03:21]

Report message to a moderator

Re: [VPDSL][GRAMMAR] Using Java grammar [message #854 is a reply to message #850] Wed, 18 May 2016 04:46 Go to previous messageGo to next message
Matthieu Durot is currently offline  Matthieu Durot
Messages: 35
Registered: December 2015
Member
I would like to do something like that:

index.php/fa/223/0/

Is it possible with the type ecore.EEList in a viewpoint ?

Matthieu
  • Attachment: enum.png
    (Size: 37.02KB, Downloaded 504 times)

[Updated on: Wed, 18 May 2016 04:47]

Report message to a moderator

Re: [VPDSL][GRAMMAR] Using Java grammar [message #856 is a reply to message #850] Thu, 19 May 2016 04:05 Go to previous messageGo to next message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
matthieu.durot.icloud.com wrote on Tue, 17 May 2016 07:48
Hello,
I was wondering if it's possible to make viewpoints with our own Java code instead of using the xtext grammar to generate the viewpoint's files ?
Matthieu


Of course you can do things by hand. I only use the "data" portion of the xtext grammar. My UI/Diagram code is completely handwritten in separate plugins. Unfortunately kitalpha always generates some things without asking (Such as UI Property Sections and the ActivityExplorer extensions) so I just delete these after regenerating my model code.

Felix
Re: [VPDSL][GRAMMAR] Using Java grammar [message #859 is a reply to message #856] Mon, 23 May 2016 00:03 Go to previous messageGo to next message
Matthieu Durot is currently offline  Matthieu Durot
Messages: 35
Registered: December 2015
Member
felix.dorner.gmail.com wrote on Thu, 19 May 2016 04:05

Of course you can do things by hand. I only use the "data" portion of the xtext grammar. My UI/Diagram code is completely handwritten in separate plugins. Unfortunately kitalpha always generates some things without asking (Such as UI Property Sections and the ActivityExplorer extensions) so I just delete these after regenerating my model code.

Felix


Thank you for your answer Felix !

Could you show me a simple example of using pure Java code in Capella ?
Like adding a button into a viewpoint or anything you think could be interesting.

Matthieu
Re: [VPDSL][GRAMMAR] Using Java grammar [message #860 is a reply to message #850] Mon, 30 May 2016 03:45 Go to previous messageGo to next message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
Not sure what you mean with "Adding a button to a viewpoint" Sad

Didn't you already do some things by hand? The enum.png screenshot suggests you hand coded the list in the properties view?

Re: [VPDSL][GRAMMAR] Using Java grammar [message #862 is a reply to message #856] Mon, 30 May 2016 09:33 Go to previous message
boubekeur.zendagui@thales is currently offline  boubekeur.zendagui@thales
Messages: 54
Registered: April 2015
Member
Hello

Quote:
Unfortunately kitalpha always generates some things without asking (Such as UI Property Sections and the ActivityExplorer extensions) so I just delete these after regenerating my model code.


Viewpoint DSL offers the possibility to invoke the generations you want. You could use the Generate viewpoint with selection menu (see picture 1 bellow) and configure the viewpoint generation (see picture 2).

index.php/fa/227/0/

index.php/fa/229/0/

Regards,
Boubekeur Zendagui.
  • Attachment: menu.PNG
    (Size: 8.71KB, Downloaded 484 times)
  • Attachment: Selection.PNG
    (Size: 21.99KB, Downloaded 457 times)
Previous Topic: Viewpoints: Multiple choice enumeration + line separator
Next Topic: [CoEvolution/Transposer] eReference traces management
Goto Forum:
  


Current Time: Sun Aug 09 18:02:36 EST 2020

Total time taken to generate the page: 0.01094 seconds