Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » (no subject)
(no subject) [message #693972] Thu, 07 July 2011 10:50 Go to next message
Ivar Refsdal is currently offline Ivar Refsdal
Messages: 24
Registered: May 2011
Junior Member
Hi,

is it possible to have RCP generation support as an annotation?

The following code supports @gmf.diagram(rcp="true"):
It would be great if this would be improved as needed and included in
EuGENia.

Class : org.eclipse.epsilon.eugenia.GmfMap2GmfGenDelegate

> public class GmfMap2GmfGenDelegate extends EugeniaActionDelegate {
>
> @SuppressWarnings("restriction")
> @Override
> public void run(IAction action) {
> // Transform GmfMap to GmfGen model
>
> boolean rcp = false;
> try {
> EmfModel model = loadModel("Ecore", gmfFileSet.getEcorePath(), EcorePackage.eINSTANCE.getNsURI(), true, false, true);
> for (Object elem : model.getAllOfType("EAnnotation")) {
> EAnnotation elm = (EAnnotation)elem;
> if (elm.getSource().equalsIgnoreCase("gmf.diagram")) {
> if (elm.getDetails().containsKey("rcp") && elm.getDetails().get("rcp").equalsIgnoreCase("true")) {
> rcp = true;
> break;
> }
> }
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
>
> ResourceSet resourceSet = new ResourceSetImpl();
> TransformToGenModelOperation transformToGenModelOperation = new TransformToGenModelOperation(resourceSet);
>
> TransformOptions options = transformToGenModelOperation.getOptions();
> options.setGenerateRCP(rcp);

Thanks and all the best,
Ivar
Re: (no subject) [message #694380 is a reply to message #693972] Fri, 08 July 2011 09:11 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 804
Registered: July 2009
Senior Member
Hi Ivar,

This sounds like a very useful feature indeed! Could you please open a new enhancement request in the bugzilla and post the link here so that we can keep track of this?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon

Cheers,
Dimitris
Re: (no subject) [message #694540 is a reply to message #694380] Fri, 08 July 2011 15:03 Go to previous message
Ivar Refsdal is currently offline Ivar Refsdal
Messages: 24
Registered: May 2011
Junior Member
Hi Dimitris, :-)

thanks for your reply!

Enhancement request posted:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351605

Best,
Ivar

Dimitris Kolovos wrote, on 07/08/2011 03:11 PM:
> Hi Ivar,
>
> This sounds like a very useful feature indeed! Could you please open a
> new enhancement request in the bugzilla and post the link here so that
> we can keep track of this?
>
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon
>
> Cheers,
> Dimitris
Previous Topic:Process in-memory EMF model
Next Topic:My first transformation
Goto Forum:
  


Current Time: Fri Aug 01 07:55:41 EDT 2014

Powered by FUDForum. Page generated in 0.02621 seconds