diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java index 4ce36bd7c..1af96f705 100644 --- a/src/de/dhbwstuttgart/logger/Logger.java +++ b/src/de/dhbwstuttgart/logger/Logger.java @@ -25,6 +25,10 @@ public class Logger { }); } + public static LoggerConfiguration getConfiguration(){ + return Logger.standardConfiguration; + } + /** * Logt eine Debug Message, welche zusätzlich einer bestimmten Section zugewiesen wird. * Dadurch lässt sich die DEBUG ausgabe übersichtlicher gestalten. diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 19664a0f6..93516ef65 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -218,6 +218,15 @@ public class GenericTypeVar extends Type public int getEndOffset() { return this.getOffset() + this.name.toString().length(); } + + @Override + public void parserPostProcessing(SyntaxTreeNode parent) { + //SyntaxTreeNode parentTemp = this.parent; + super.parserPostProcessing(parent); + //if(parentTemp != null)this.parent = parentTemp; //Der Parenttype einer GenericVar soll sich nicht ändern können, falls einmal gesetzt. + } + + } // ino.end diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index 9ea83dc04..aab0731e0 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -36,6 +36,7 @@ public class FunNMethod extends Method{ this.parserPostProcessing(new Class("Fun"+paralist.size(), 0)); } + /* public FunNMethod(int N){ super(0); //Hat keinen Offset, da nur theoretisch gedachte Methode this.setType(TypePlaceholder.fresh(this)); @@ -53,7 +54,7 @@ public class FunNMethod extends Method{ this.parameterlist = pl; this.parserPostProcessing(new Class("Fun"+N, 0)); } - + */ @Override public TypeInsertPoint createTypeInsertPoint(TypePlaceholder tph, ResultSet resultSet) { diff --git a/test/plugindevelopment/TypeInsertTester.java b/test/plugindevelopment/TypeInsertTester.java index 27d29c274..c4f48cd74 100644 --- a/test/plugindevelopment/TypeInsertTester.java +++ b/test/plugindevelopment/TypeInsertTester.java @@ -27,7 +27,7 @@ public class TypeInsertTester{ private static Logger inferencelog = Logger.getLogger(TypeInsertTester.class.getName()); static{ { - Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out)); + Logger.getConfiguration().setOutput(Section.TYPEINFERENCE, System.out); /* // Ausgabeoptionen fuer die Logger ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout()); diff --git a/test/plugindevelopment/TypeInsertTests/BoundedGenericTest.jav b/test/plugindevelopment/TypeInsertTests/BoundedGenericTest.jav index a3991d785..68703a121 100644 --- a/test/plugindevelopment/TypeInsertTests/BoundedGenericTest.jav +++ b/test/plugindevelopment/TypeInsertTests/BoundedGenericTest.jav @@ -1,5 +1,5 @@ class BoundedGenericTest{ - var; + var = "test"; B methode(){ return var; } diff --git a/test/plugindevelopment/TypeInsertTests/ImportTest2.jav b/test/plugindevelopment/TypeInsertTests/ImportTest2.jav index 1e112c525..10075ef94 100644 --- a/test/plugindevelopment/TypeInsertTests/ImportTest2.jav +++ b/test/plugindevelopment/TypeInsertTests/ImportTest2.jav @@ -1,9 +1,9 @@ import java.util.Vector; class ImportTest{ -var; void methode(a){ + var; var.add(a); } diff --git a/test/plugindevelopment/TypeInsertTests/IntTest.jav b/test/plugindevelopment/TypeInsertTests/IntTest.jav index 305772949..7a2471f2d 100644 --- a/test/plugindevelopment/TypeInsertTests/IntTest.jav +++ b/test/plugindevelopment/TypeInsertTests/IntTest.jav @@ -1,6 +1,6 @@ class IntTest{ - var; int methode(){ + var; return var; } } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest10.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest10.jav index a1e40a2d7..a056762d8 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest10.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest10.jav @@ -1,8 +1,6 @@ class Test{ -m; - - CT methode(){ + CT methode(m){ return m; } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest11.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest11.jav index f1787ac46..a2cd93578 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest11.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest11.jav @@ -1,8 +1,6 @@ class Test{ -m; - - CT methode(){ + CT methode(m){ return m; } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest2.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest2.jav index ca670b4d4..206a10b5c 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest2.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest2.jav @@ -1,5 +1,5 @@ -class LambdaTest{ +class LambdaTest{ -Fun1, S>>, S> op = (m) -> (f) -> f.apply(this,m); +Fun1, B>>, B> op = (m) -> (f) -> f.apply(this,m); } \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest2.java b/test/plugindevelopment/TypeInsertTests/LambdaTest2.java index 9cd8ef035..223d0108e 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest2.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest2.java @@ -4,12 +4,17 @@ import java.util.Vector; import org.junit.Test; +import de.dhbwstuttgart.logger.Logger; +import de.dhbwstuttgart.logger.LoggerConfiguration; +import de.dhbwstuttgart.logger.Section; + public class LambdaTest2 { private static final String TEST_FILE = "LambdaTest2.jav"; @Test public void run(){ + Logger.getConfiguration().setOutput(Section.ASSUMPTIONS, System.out); Vector mustContain = new Vector(); //mustContain.add("S m"); MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/LambdaTest22.java similarity index 71% rename from test/plugindevelopment/TypeInsertTests/LambdaTest22.java rename to test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/LambdaTest22.java index bf97eeebd..fc17951ec 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest22.java +++ b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/LambdaTest22.java @@ -1,9 +1,11 @@ -package plugindevelopment.TypeInsertTests; +package plugindevelopment.TypeInsertTests.LargeSourceCodeTests; import java.util.Vector; import org.junit.Test; +import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; + public class LambdaTest22 { private static final String TEST_FILE = "LambdaTest22.jav"; diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/Matrix.java similarity index 77% rename from test/plugindevelopment/TypeInsertTests/Matrix.java rename to test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/Matrix.java index cea6d9d53..7884d9d38 100644 --- a/test/plugindevelopment/TypeInsertTests/Matrix.java +++ b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/Matrix.java @@ -1,9 +1,10 @@ -package plugindevelopment.TypeInsertTests; +package plugindevelopment.TypeInsertTests.LargeSourceCodeTests; import java.util.Vector; import org.junit.Test; +import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; import de.dhbwstuttgart.logger.Logger; import de.dhbwstuttgart.logger.LoggerConfiguration; import de.dhbwstuttgart.logger.Section; diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixSimpleTest.java similarity index 72% rename from test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java rename to test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixSimpleTest.java index 3c874195a..ae298b5cd 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixSimpleTest.java +++ b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixSimpleTest.java @@ -1,9 +1,11 @@ -package plugindevelopment.TypeInsertTests; +package plugindevelopment.TypeInsertTests.LargeSourceCodeTests; import java.util.Vector; import org.junit.Test; +import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; + public class TypedMatrixSimpleTest { private static final String TEST_FILE = "TypedMatrixSimpleTest.jav"; diff --git a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixTest.java similarity index 72% rename from test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java rename to test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixTest.java index 810af9993..08a5a74a6 100644 --- a/test/plugindevelopment/TypeInsertTests/TypedMatrixTest.java +++ b/test/plugindevelopment/TypeInsertTests/LargeSourceCodeTests/TypedMatrixTest.java @@ -1,9 +1,11 @@ -package plugindevelopment.TypeInsertTests; +package plugindevelopment.TypeInsertTests.LargeSourceCodeTests; import java.util.Vector; import org.junit.Test; +import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester; + public class TypedMatrixTest { private static final String TEST_FILE = "TypedMatrixTest.jav"; diff --git a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java index d54cb9cd4..f550ebcce 100644 --- a/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java +++ b/test/plugindevelopment/TypeInsertTests/MultipleTypesInsertTester.java @@ -22,7 +22,7 @@ public class MultipleTypesInsertTester extends TypeInsertTester{ public MultipleTypesInsertTester(){ //Output von TYPEINFERENCE auf die Console setzen: - Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out)); + Logger.getConfiguration().setOutput(Section.TYPEINFERENCE, System.out); } public static void test(String sourceFileToInfere, Vector mustContain){ diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.jav b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.jav index 5952fe38d..aa0aaf421 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.jav +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInsertTest.jav @@ -1,16 +1,13 @@ class OverloadingInsertTest{ - var; - overload(){ return this; } } class Overloading2{ - var2; - methode(){ + methode(var2){ return var2.overload(); }