Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351605

Summary: EuGENia RCP generation annotation support
Product: [Modeling] Epsilon Reporter: Ivar Refsdal <refsdal.ivar>
Component: CoreAssignee: Dimitris Kolovos <dkolovos>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

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