Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351605 - EuGENia RCP generation annotation support
Summary: EuGENia RCP generation annotation support
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Dimitris Kolovos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-08 14:59 EDT by Ivar Refsdal CLA
Modified: 2012-02-06 10:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivar Refsdal CLA 2011-07-08 14:59:37 EDT
Add support for generation of RCP application with emfatic annotation.


Possible solution by modifying 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);
Comment 1 Dimitris Kolovos CLA 2011-07-25 06:47:52 EDT
This has now been fixed in the SVN.
Comment 2 Dimitris Kolovos CLA 2011-07-25 08:18:49 EDT
Fixed in 0.9.1