Package org.sugarj.util

Examples of org.sugarj.util.Renaming


    RelativePath transformationPath = new RelativePath(ATermCommands.getString(transformationsTerm));
   
    RelativePath source = ImportCommands.getTransformedModelSourceFilePath(modelRelativePath, transformationPath, environment);
   
    try {
      Renaming ren = new Renaming(modelPath, source.getRelativePath());
      environment.getRenamings().add(0, ren);
//      generatedModel = driver.currentRename(generatedModel);
     
      driver.getCurrentResult().generateFile(source, ATermCommands.atermToString(generatedModel));
    } catch (IOException e) {
View Full Code Here


      RelativePath transformationPath = new RelativePath(ATermCommands.getString(transformationsTerm));
     
      RelativePath source = ImportCommands.getTransformedModelSourceFilePath(modelRelativePath, transformationPath, environment);
     
      try {
        Renaming ren = new Renaming(modelPath, source.getRelativePath());
        environment.getRenamings().add(0, ren);
//        generatedModel = driver.currentRename(generatedModel);
       
        driver.getCurrentResult().generateFile(source, ATermCommands.atermToString(generatedModel));
      } catch (IOException e) {
View Full Code Here

        isCircularImport = prepareImport(toplevelDecl, modulePath);
       
        String localModelName = baseProcessor.getImportLocalName(toplevelDecl);
       
        if (localModelName != null)
          environment.getRenamings().add(0, new Renaming(Collections.<String>emptyList(), localModelName, FileCommands.fileName(modulePath)));
      } else {
        IStrategoTerm appl = baseLanguage.getTransformationApplication(toplevelDecl);
        IStrategoTerm model = getApplicationSubterm(appl, "TransApp", 1);
        IStrategoTerm transformation = getApplicationSubterm(appl, "TransApp", 0);
       
        ImportCommands imp = new ImportCommands(baseProcessor, environment, this, driverResult, new STRCommands(strParser, strCache, environment, baseProcessor));
        Pair<String, Boolean> transformationResult = imp.transformModel(model, transformation, toplevelDecl);

        if (transformationResult == null)
          return ;
       
        modulePath = transformationResult.a;
        isCircularImport = transformationResult.b;
       
        String localModelName = baseProcessor.getImportLocalName(toplevelDecl);
       
        if (localModelName != null)
          environment.getRenamings().add(0, new Renaming(Collections.<String>emptyList(), localModelName, FileCommands.fileName(modulePath)));
        else
          environment.getRenamings().add(0, new Renaming(ImportCommands.getTransformationApplicationModelPath(appl, baseProcessor), modulePath));
       
        IStrategoTerm reconstructedImport = baseProcessor.reconstructImport(modulePath, toplevelDecl);
        desugaredBodyDecls.remove(toplevelDecl);
        desugaredBodyDecls.add(reconstructedImport);
        toplevelDecl = reconstructedImport;
View Full Code Here

TOP

Related Classes of org.sugarj.util.Renaming

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.