diff --git a/src/de/dhbwstuttgart/logger/Logger.java b/src/de/dhbwstuttgart/logger/Logger.java index 4ce36bd7..1af96f70 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 19664a0f..93516ef6 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 9ea83dc0..aab0731e 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 27d29c27..c4f48cd7 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 a3991d78..68703a12 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 1e112c52..10075ef9 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 30577294..7a2471f2 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 a1e40a2d..a056762d 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 f1787ac4..a2cd9357 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 ca670b4d..206a10b5 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 9cd8ef03..223d0108 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 bf97eeeb..fc17951e 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 cea6d9d5..7884d9d3 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 3c874195..ae298b5c 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 810af999..08a5a74a 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 d54cb9cd..f550ebcc 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 5952fe38..aa0aaf42 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(); }