Loading de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/UsageAnalyzer.java +41 −4 Original line number Diff line number Diff line Loading @@ -499,13 +499,50 @@ public class UsageAnalyzer implements Callable<TTCN3Usage> { } /** * Analyzes a ext function definition. Currently just a skeleton * @param fun The ext function definition to be analyzed * Analyzes an external function definition. Currently just a skeleton * @param fun The external function definition to be analyzed * @param output The TTCN3Usage to write the output to */ private void analyzeExtFunctionDef(ExtFunctionDef fun, TTCN3Usage output) { addToOutput(output, "ExtFunction"); //TODO everything System.out.println("Analyzing function"); String fName = fun.getName(); System.out.println("Analyzing external function: " + fName); // Return type: String id = "ExtFunctionReturn:"; if(fun.getReturn() != null) { if(fun.getReturn().getType().getPre() == null) { id += "Non-Primitive"; addToOutput(output, id + ":" + fun.getReturn().getType().getRef().getHead()); } else id += fun.getReturn().getType().getPre(); } else { id += "void"; } addToOutput(output, id); // Parameters per function and types: if(fun.getList() != null) { EList<FunctionFormalPar> params = fun.getList().getParams(); for(FunctionFormalPar p : params) { id = "FunctionParam:"; if(p.getValue() == null) { id += "NoVal"; } else { if(p.getValue().getType().getPre() == null) { id += "Non-Primitive"; addToOutput(output, id + ":" + p.getValue().getType().getRef().getHead()); } else { id += p.getValue().getType().getPre(); } } addToOutput(output, id); } id = fun.getList().getParams().size()+"ParamsInFunction"; } else { id = "0ParamsInFunction"; } addToOutput(output, id); } /** Loading Loading
de.ugoe.cs.swe.T3Q/src/de/ugoe/cs/swe/T3Q/UsageAnalyzer.java +41 −4 Original line number Diff line number Diff line Loading @@ -499,13 +499,50 @@ public class UsageAnalyzer implements Callable<TTCN3Usage> { } /** * Analyzes a ext function definition. Currently just a skeleton * @param fun The ext function definition to be analyzed * Analyzes an external function definition. Currently just a skeleton * @param fun The external function definition to be analyzed * @param output The TTCN3Usage to write the output to */ private void analyzeExtFunctionDef(ExtFunctionDef fun, TTCN3Usage output) { addToOutput(output, "ExtFunction"); //TODO everything System.out.println("Analyzing function"); String fName = fun.getName(); System.out.println("Analyzing external function: " + fName); // Return type: String id = "ExtFunctionReturn:"; if(fun.getReturn() != null) { if(fun.getReturn().getType().getPre() == null) { id += "Non-Primitive"; addToOutput(output, id + ":" + fun.getReturn().getType().getRef().getHead()); } else id += fun.getReturn().getType().getPre(); } else { id += "void"; } addToOutput(output, id); // Parameters per function and types: if(fun.getList() != null) { EList<FunctionFormalPar> params = fun.getList().getParams(); for(FunctionFormalPar p : params) { id = "FunctionParam:"; if(p.getValue() == null) { id += "NoVal"; } else { if(p.getValue().getType().getPre() == null) { id += "Non-Primitive"; addToOutput(output, id + ":" + p.getValue().getType().getRef().getHead()); } else { id += p.getValue().getType().getPre(); } } addToOutput(output, id); } id = fun.getList().getParams().size()+"ParamsInFunction"; } else { id = "0ParamsInFunction"; } addToOutput(output, id); } /** Loading