Changeset 1556


Ignore:
Timestamp:
06/20/12 18:26:26 (12 years ago)
Author:
wschamai
Message:

BUG FIX: determine if code should be regenerated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.simulation/src/org/openmodelica/modelicaml/simulation/handlers/GenerateTestSiMDataAction.java

    r1550 r1556  
    143143
    144144    protected Command getCommand(TransactionalEditingDomain editingDomain) {
    145 //      EObject selectedElement = (EObject) adaptSelectedElement(getCurrentSelections().get(0));
    146 //      if (selectedElement instanceof Element) {
    147 //      }
    148145       
    149146        umlModel = UmlUtils.getUmlModel();
     
    182179        if (someModelsSelected && rootModel != null && VerificationExecutionServices.verificationModels != null && VerificationExecutionServices.verificationModels.size() > 0) {
    183180           
     181            // prepare the chain
    184182            org.eclipse.emf.common.util.URI chainURI = null;
     183           
     184            // reset the code generation flag from last time
     185            generateCode = false;
    185186           
    186187            // if the code should not be re-generated -> skip asking this question
     
    192193            }
    193194           
     195            // select the right cg chain based on the need to regenerate code
    194196            if (generateCode) {
    195                 // TODO: find the right Papyrus API to save the model in editor and not only the uml file!
    196 //                  umlModel.saveModel();
    197197                chainURI = org.eclipse.emf.common.util.URI.createPlatformPluginURI(
    198198                        "/org.openmodelica.modelicaml.gen.modelica/bin/verification_models_data_generation_with_cg.chain",
     
    205205            }
    206206
     207           
     208            // create chain
    207209            if (chainURI != null) {
    208210                ResourceSet rs = new ResourceSetImpl();
     
    246248            }
    247249            else {
    248                 MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Could not save the model and load the generation chain...");
     250                MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Could not load the generation chain...");
    249251            }
    250252            CompoundCommand cc = new CompoundCommand("Verification Models Data Generation");
Note: See TracChangeset for help on using the changeset viewer.