Changeset 53 for trunk/t3d


Ignore:
Timestamp:
02/21/12 11:13:27 (13 years ago)
Author:
phdmakk
Message:
  • switched to upstream AbstractVisitor? and exceptions
  • changed version number
  • fixed reference to T3Q in error messages
  • fixed import all except crash
  • fixed import all except import view output
  • fixed nested enum crash
Location:
trunk/t3d/src/org/etsi/t3d
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/t3d/src/org/etsi/t3d/DependencyPrinter.java

    r10 r53  
    8787                                        if (symbol instanceof EnumSymbol) { 
    8888                                                //TODO: need to add handling in documentation and imports generators too probably 
    89                                                 declarationNode = symbol.getSurroundingScope().getScopeSymbol().getDeclarationNode(); 
     89                                                declarationNode = symbol.getDeclarationNode(); 
     90                                                //declarationNode = symbol.getSurroundingScope().getScopeSymbol().getDeclarationNode(); 
    9091                                                id = VisitorCommonFunctions.getIdFromIdentifier(declarationNode); 
    9192                                        } 
  • trunk/t3d/src/org/etsi/t3d/ImportPrinter.java

    r33 r53  
    3232        } 
    3333 
    34         private void closeModule(){ 
     34        public void closeModule(){ 
    3535                writeStream("\n</module>");              
    3636        } 
     
    8888                        } 
    8989                } 
    90                 closeModule(); 
     90                //closeModule(); 
    9191        } 
    9292         
    9393        private String getImportBehavior(LocationAST importDef){ 
    9494                String b = VisitorCommonFunctions.getWholeElement(importDef, true).replaceAll("\\r", ""); 
     95                String allWithExcepts = ""; 
     96                if (!ASTUtil.findTypeNodes(importDef, TTCN3ParserTokenTypes.ExceptsDef).isEmpty()){ 
     97                        allWithExcepts = "all except "; 
     98                } 
    9599                b = StringEscapeUtils.escapeXml(b); 
    96100                b = b.replaceAll("\\n", "").trim(); 
     
    100104                        b = b.replaceFirst("import from \\w* ", ""); 
    101105                b = VisitorCommonFunctions.replaceReferences(b, VisitorCommonFunctions.getReferences(importDef)); 
     106                b = allWithExcepts+b; 
    102107                return b.trim(); 
    103108        } 
  • trunk/t3d/src/org/etsi/t3d/T3D.java

    r43 r53  
    2929import org.etsi.t3d.config.DocumentationProfile; 
    3030import org.etsi.t3d.config.T3DOptionsHandler; 
    31 import org.etsi.t3d.exceptions.TTCN3BehaviorException; 
    32 import org.etsi.t3d.exceptions.TTCN3ParserException; 
    3331import org.etsi.t3d.visitor.DependencyVisitor; 
    3432import org.etsi.t3d.visitor.ImportVisitor; 
     
    4947import de.ugoe.cs.swe.trex.core.analyzer.rfparser.TTCN3AnalyzerFlyweightFactory; 
    5048import de.ugoe.cs.swe.trex.core.analyzer.rfparser.TTCN3Parser; 
     49import de.ugoe.cs.swe.trex.core.visitor.TTCN3BehaviorException; 
     50import de.ugoe.cs.swe.trex.core.visitor.TTCN3ParserException; 
    5151 
    5252public class T3D { 
    5353 
    54         public static String versionNumber = "v1.0.2"; 
     54        public static String versionNumber = "v1.0.3"; 
    5555        //set during automated server builds 
    5656        private static String buildStamp = "---BUILD_STAMP---"; 
     
    771771                                        stacktrace+="\n    "+ste.toString(); 
    772772                                } 
    773                                 System.err.println("ERROR: A problem occurred while running T3Q" + 
     773                                System.err.println("ERROR: A problem occurred while running T3D" + 
    774774                                                "\n  Problem type: " +  
    775775                                                e + 
    776776                                                "\n  Stacktrace:" + 
    777777                                                stacktrace +  
    778                                                 "\n  Run T3Q with --verbosity=DEBUG for a more detailed report" ); 
     778                                                "\n  Run T3D with --verbosity=DEBUG for a more detailed report" ); 
    779779                        } 
    780780                } 
  • trunk/t3d/src/org/etsi/t3d/visitor/DependencyVisitor.java

    r9 r53  
    55 
    66import org.etsi.t3d.DependencyPrinter; 
    7 import org.etsi.t3d.exceptions.TTCN3BehaviorException; 
    87 
    98import de.ugoe.cs.swe.trex.core.analyzer.rfparser.ASTUtil; 
     
    1211import de.ugoe.cs.swe.trex.core.analyzer.rfparser.symboltable.EnumSymbol; 
    1312import de.ugoe.cs.swe.trex.core.analyzer.rfparser.symboltable.Symbol; 
     13import de.ugoe.cs.swe.trex.core.visitor.AbstractVisitor; 
     14import de.ugoe.cs.swe.trex.core.visitor.TTCN3BehaviorException; 
    1415 
    1516public class DependencyVisitor extends AbstractVisitor { 
  • trunk/t3d/src/org/etsi/t3d/visitor/ImportVisitor.java

    r34 r53  
    55import org.etsi.t3d.ImportPrinter; 
    66import org.etsi.t3d.T3D; 
    7 import org.etsi.t3d.exceptions.TTCN3BehaviorException; 
    87 
    98import de.ugoe.cs.swe.trex.core.analyzer.rfparser.LocationAST; 
     9import de.ugoe.cs.swe.trex.core.visitor.AbstractVisitor; 
     10import de.ugoe.cs.swe.trex.core.visitor.TTCN3BehaviorException; 
    1011 
    1112public class ImportVisitor extends AbstractVisitor { 
     
    3031                importPrinter.newModule(VisitorCommonFunctions.getName(node)); 
    3132                importPrinter.printImportView(node); 
     33                importPrinter.closeModule(); 
    3234                if(T3D.activeProfile.isCheckCyclicImports()) 
    3335                        importPrinter.checkForCyclicImports(node, new LinkedList<String>()); 
  • trunk/t3d/src/org/etsi/t3d/visitor/T3DVisitor.java

    r7 r53  
    77import org.etsi.t3d.T3D; 
    88import org.etsi.t3d.XMLPrinter; 
    9 import org.etsi.t3d.exceptions.TTCN3BehaviorException; 
    109 
    1110import de.ugoe.cs.swe.trex.core.analyzer.rfparser.ASTUtil; 
     
    1312import de.ugoe.cs.swe.trex.core.analyzer.rfparser.TTCN3ParserTokenTypes; 
    1413import de.ugoe.cs.swe.trex.core.analyzer.rfparser.TokenWithIndex; 
     14import de.ugoe.cs.swe.trex.core.visitor.AbstractVisitor; 
     15import de.ugoe.cs.swe.trex.core.visitor.TTCN3BehaviorException; 
    1516 
    1617import elements.*; 
Note: See TracChangeset for help on using the changeset viewer.