Last change
on this file since 7 was
7,
checked in by phdmakk, 14 years ago
|
|
-
Property svn:mime-type set to
text/plain
|
File size:
1.1 KB
|
Line | |
---|
1 | package org.etsi.t3d.visitor; |
---|
2 | |
---|
3 | import java.util.LinkedList; |
---|
4 | |
---|
5 | import org.etsi.t3d.ImportPrinter; |
---|
6 | import org.etsi.t3d.T3D; |
---|
7 | import org.etsi.t3d.exceptions.TTCN3BehaviorException; |
---|
8 | |
---|
9 | import de.ugoe.cs.swe.trex.core.analyzer.rfparser.LocationAST; |
---|
10 | |
---|
11 | public class ImportVisitor extends AbstractVisitor { |
---|
12 | |
---|
13 | private ImportPrinter importPrinter; |
---|
14 | private String filename; |
---|
15 | |
---|
16 | public ImportVisitor(ImportPrinter importPrinter) { |
---|
17 | this.importPrinter = importPrinter; |
---|
18 | } |
---|
19 | @Override |
---|
20 | public void finish() { |
---|
21 | } |
---|
22 | |
---|
23 | @Override |
---|
24 | public void init() { |
---|
25 | importPrinter.getLoggingInterface().setLogSourceName(this.getFilename()); |
---|
26 | importPrinter.setCurrentTTCN3File(this.getFilename()); |
---|
27 | } |
---|
28 | |
---|
29 | public ContinueStatus visitTTCN3Module(LocationAST node) throws TTCN3BehaviorException { |
---|
30 | importPrinter.newModule(VisitorCommonFunctions.getName(node)); |
---|
31 | importPrinter.printImportView(node); |
---|
32 | if(T3D.activeProfile.isCheckCyclicImports()) |
---|
33 | importPrinter.checkForCyclicImports(node, new LinkedList<String>()); |
---|
34 | return ContinueStatus.getInstance(true,true); |
---|
35 | } |
---|
36 | public void setFilename(String filename) { |
---|
37 | this.filename = filename; |
---|
38 | } |
---|
39 | public String getFilename() { |
---|
40 | return filename; |
---|
41 | } |
---|
42 | |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.