Lines 59-65
Link Here
|
59 |
"Problem : The annotation @Ann is disallowed for this location [ resource : </Project/p/Use.java> range : <11,17> category : <40> severity : <2>]" |
59 |
"Problem : The annotation @Ann is disallowed for this location [ resource : </Project/p/Use.java> range : <11,17> category : <40> severity : <2>]" |
60 |
); |
60 |
); |
61 |
} |
61 |
} |
62 |
|
62 |
|
|
|
63 |
public void testParameterizedMemberType() throws JavaModelException { |
64 |
IPath projectPath = env.addProject("Project", "1.5"); |
65 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |
66 |
env.setOutputFolder(projectPath, ""); |
67 |
|
68 |
IPath xPath = env.addClass(projectPath, "", "X", |
69 |
"class X<T> extends A<T> {}" |
70 |
); |
71 |
|
72 |
IPath aPath = env.addClass(projectPath, "", "A", |
73 |
"class A<T> extends B<B<T>.M> {}\n" + |
74 |
"class B<T> extends Missing<T> {\n" + |
75 |
" class M{}\n" + |
76 |
"}\n" + |
77 |
"class Missing<T> {}" |
78 |
); |
79 |
|
80 |
fullBuild(projectPath); |
81 |
expectingNoProblems(); |
82 |
|
83 |
env.addClass(projectPath, "", "A", |
84 |
"class A<T> extends B<B<T>.M> {}\n" + |
85 |
"class B<T> extends Missing<T> {\n" + |
86 |
" class M{}\n" + |
87 |
"}" |
88 |
); |
89 |
|
90 |
incrementalBuild(projectPath); |
91 |
expectingProblemsFor( |
92 |
new IPath[] {aPath, xPath}, |
93 |
"Problem : The hierarchy of the type A is inconsistent [ resource : </Project/A.java> range : <6,7> category : <40> severity : <2>]\n" + |
94 |
"Problem : Missing cannot be resolved to a type [ resource : </Project/A.java> range : <51,58> category : <40> severity : <2>]\n" + |
95 |
"Problem : The hierarchy of the type X is inconsistent [ resource : </Project/X.java> range : <6,7> category : <40> severity : <2>]" |
96 |
); |
97 |
|
98 |
env.addClass(projectPath, "", "X", |
99 |
"class X<T> extends A<T> {}" |
100 |
); |
101 |
|
102 |
incrementalBuild(projectPath); |
103 |
expectingProblemsFor( |
104 |
new IPath[] {aPath, xPath}, |
105 |
"Problem : The hierarchy of the type A is inconsistent [ resource : </Project/A.java> range : <6,7> category : <40> severity : <2>]\n" + |
106 |
"Problem : Missing cannot be resolved to a type [ resource : </Project/A.java> range : <51,58> category : <40> severity : <2>]\n" + |
107 |
"Problem : The hierarchy of the type X is inconsistent [ resource : </Project/X.java> range : <6,7> category : <40> severity : <2>]" |
108 |
); |
109 |
|
110 |
env.addClass(projectPath, "", "A", |
111 |
"class A<T> extends B<B<T>.M> {}\n" + |
112 |
"class B<T> extends Missing<T> {\n" + |
113 |
" class M{}\n" + |
114 |
"}" |
115 |
); |
116 |
|
117 |
incrementalBuild(projectPath); |
118 |
expectingProblemsFor( |
119 |
new IPath[] {aPath, xPath}, |
120 |
"Problem : The hierarchy of the type A is inconsistent [ resource : </Project/A.java> range : <6,7> category : <40> severity : <2>]\n" + |
121 |
"Problem : Missing cannot be resolved to a type [ resource : </Project/A.java> range : <51,58> category : <40> severity : <2>]\n" + |
122 |
"Problem : The hierarchy of the type X is inconsistent [ resource : </Project/X.java> range : <6,7> category : <40> severity : <2>]" |
123 |
); |
124 |
|
125 |
env.addClass(projectPath, "", "A", |
126 |
"class A<T> extends B<B<T>.M> {}\n" + |
127 |
"class B<T> extends Missing<T> {\n" + |
128 |
" class M{}\n" + |
129 |
"}\n" + |
130 |
"class Missing<T> {}" |
131 |
); |
132 |
|
133 |
incrementalBuild(projectPath); |
134 |
expectingNoProblems(); |
135 |
} |
136 |
|
63 |
public void testParameterizedType1() throws JavaModelException { |
137 |
public void testParameterizedType1() throws JavaModelException { |
64 |
IPath projectPath = env.addProject("Project", "1.5"); |
138 |
IPath projectPath = env.addProject("Project", "1.5"); |
65 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |
139 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |