Permalink
Browse files

First commit

  • Loading branch information...
pwang347 committed Sep 18, 2018
1 parent 9a924c0 commit e18f806333cbefc15c351ad483255fef91a161cb
View
@@ -15,8 +15,7 @@ src-gen-umple/
src-gen/
# generated umpleTL code that is not saved
src-gen-umpleTL/
src-gen-umpletl/
src-gen-[Uu]mple[Tt][Ll]/
# os specific:
.DS_Store
@@ -68,7 +68,7 @@ class JavaCodeGenValidator {
parser.setSource(source.toCharArray()); // set source
// In order to parse 1.7 code, some compiler options need to be set to 1.7
// Annotations were not available prior 1.6
Map<?, ?> options = JavaCore.getOptions();
Map options = JavaCore.getOptions();
JavaCore.setComplianceOptions(JavaCore.VERSION_1_7, options);
parser.setCompilerOptions(options);
parser.setResolveBindings(true); // we need bindings later on
@@ -101,4 +101,5 @@ depend- : depend [depend] ;
extraCode- : [**extraCode]
list- : [!list:\[\s*\]]
typedName- : [type]? [[list]]? [~name]
genericType- : [!type:[^\s;]+<[^;]+>]
typedName- : ([[genericType]] | [!type:[^\s;]+])? [[list]]? [~name]
@@ -0,0 +1,17 @@
class A {
depend java.util.*;
Map<String, String> a1;
List<String> a2;
Map<List<String>,String>a3;
List<String> a4;
List<List<String>> a5;
Map<List<String>, String> a6;
Map<String, List<String>> a7;
Map<List<String>, List<String>> a8;
List<List<String>> a9;
Map<List<Map<String, String>>, String> b1;
Map<String, List<Map<String, String>>> b2;
Map<List<Map<String, String>>, List<String>> b3;
List<List<List<String>>> b4;
TestVector<A,B,C> c1;
}
@@ -0,0 +1,6 @@
class C {
depend java.util.*;
Map<String, String a1;
Map<String, String> a2; // make sure that the end brace here doesn't create a match
}
@@ -3047,6 +3047,14 @@ public void templateInexistentReference()
assertFailedParse("028_templateInexistentReference.ump",3504);
assertFailedParse("028_multipleTemplateInexistentReferences.ump",3504);
}
//Issue 460
@Test
public void nestedGenericTypes()
{
assertHasWarningsParse("424_nestedGenerics1.ump", 46);
assertHasWarningsParse("424_nestedGenerics2.ump", 1007);
}
public boolean parse(String filename)
{
@@ -20,7 +20,7 @@ class JavaParser {
parser.setSource(source.toCharArray()); // set source
// In order to parse 1.7 code, some compiler options need to be set to 1.7
// Annotations were not available prior 1.6
Map<?, ?> options = JavaCore.getOptions();
Map options = JavaCore.getOptions();
JavaCore.setComplianceOptions(JavaCore.VERSION_1_7, options);
parser.setCompilerOptions(options);
parser.setResolveBindings(true); // we need bindings later on
@@ -41,7 +41,7 @@ class JavaParser {
parser.setSource(source.toCharArray()); // set source
// In order to parse 1.7 code, some compiler options need to be set to 1.7
// Annotations were not available prior 1.6
Map<?, ?> options = JavaCore.getOptions();
Map options = JavaCore.getOptions();
JavaCore.setComplianceOptions(JavaCore.VERSION_1_7, options);
parser.setCompilerOptions(options);
parser.setResolveBindings(true); // we need bindings later on
@@ -54,4 +54,4 @@ class JavaParser {
return typeDeclaration;
}
}
}

0 comments on commit e18f806

Please sign in to comment.