Lines 116-122
Link Here
|
116 |
|
116 |
|
117 |
// test javadoc for a package fragment |
117 |
// test javadoc for a package fragment |
118 |
public void test001() throws JavaModelException { |
118 |
public void test001() throws JavaModelException { |
119 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
119 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
120 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
120 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
121 |
String javadoc = packageFragment.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$ |
121 |
String javadoc = packageFragment.getAttachedJavadoc(new NullProgressMonitor()); //$NON-NLS-1$ |
122 |
assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$ |
122 |
assertNotNull("Should have a javadoc", javadoc); //$NON-NLS-1$ |
Lines 124-130
Link Here
|
124 |
|
124 |
|
125 |
// for a class file |
125 |
// for a class file |
126 |
public void test002() throws JavaModelException { |
126 |
public void test002() throws JavaModelException { |
127 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
127 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
128 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
128 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
129 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
129 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
130 |
assertNotNull(classFile); |
130 |
assertNotNull(classFile); |
Lines 134-140
Link Here
|
134 |
|
134 |
|
135 |
// for a field |
135 |
// for a field |
136 |
public void test003() throws JavaModelException { |
136 |
public void test003() throws JavaModelException { |
137 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
137 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
138 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
138 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
139 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
139 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
140 |
assertNotNull(classFile); |
140 |
assertNotNull(classFile); |
Lines 147-153
Link Here
|
147 |
|
147 |
|
148 |
// for a method |
148 |
// for a method |
149 |
public void test004() throws JavaModelException { |
149 |
public void test004() throws JavaModelException { |
150 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
150 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
151 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
151 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
152 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
152 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
153 |
assertNotNull(classFile); |
153 |
assertNotNull(classFile); |
Lines 166-172
Link Here
|
166 |
|
166 |
|
167 |
// for a constructor |
167 |
// for a constructor |
168 |
public void test005() throws JavaModelException { |
168 |
public void test005() throws JavaModelException { |
169 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
169 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
170 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
170 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
171 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
171 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
172 |
assertNotNull(classFile); |
172 |
assertNotNull(classFile); |
Lines 183-189
Link Here
|
183 |
|
183 |
|
184 |
// for a member type |
184 |
// for a member type |
185 |
public void test006() throws JavaModelException { |
185 |
public void test006() throws JavaModelException { |
186 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
186 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
187 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
187 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
188 |
IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$ |
188 |
IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$ |
189 |
assertNotNull(classFile); |
189 |
assertNotNull(classFile); |
Lines 193-199
Link Here
|
193 |
|
193 |
|
194 |
// for a constructor |
194 |
// for a constructor |
195 |
public void test007() throws JavaModelException { |
195 |
public void test007() throws JavaModelException { |
196 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
196 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
197 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
197 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
198 |
IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$ |
198 |
IClassFile classFile = packageFragment.getClassFile("X$A.class"); //$NON-NLS-1$ |
199 |
assertNotNull(classFile); |
199 |
assertNotNull(classFile); |
Lines 210-216
Link Here
|
210 |
|
210 |
|
211 |
// for a method foo2 |
211 |
// for a method foo2 |
212 |
public void test008() throws JavaModelException { |
212 |
public void test008() throws JavaModelException { |
213 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
213 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
214 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
214 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
215 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
215 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
216 |
assertNotNull(classFile); |
216 |
assertNotNull(classFile); |
Lines 226-232
Link Here
|
226 |
|
226 |
|
227 |
// for a field f2 |
227 |
// for a field f2 |
228 |
public void test009() throws JavaModelException { |
228 |
public void test009() throws JavaModelException { |
229 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
229 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
230 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
230 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
231 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
231 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
232 |
assertNotNull(classFile); |
232 |
assertNotNull(classFile); |
Lines 267-273
Link Here
|
267 |
} |
267 |
} |
268 |
} |
268 |
} |
269 |
this.project.setRawClasspath(entries, null); |
269 |
this.project.setRawClasspath(entries, null); |
270 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
270 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
271 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
271 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
272 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
272 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
273 |
assertNotNull(classFile); |
273 |
assertNotNull(classFile); |
Lines 286-292
Link Here
|
286 |
|
286 |
|
287 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120597 |
287 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120597 |
288 |
public void test011() throws JavaModelException { |
288 |
public void test011() throws JavaModelException { |
289 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
289 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
290 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
290 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
291 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
291 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
292 |
assertNotNull(classFile); |
292 |
assertNotNull(classFile); |
Lines 299-305
Link Here
|
299 |
|
299 |
|
300 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
300 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
301 |
public void test012() throws JavaModelException { |
301 |
public void test012() throws JavaModelException { |
302 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
302 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
303 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
303 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
304 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
304 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
305 |
assertNotNull(classFile); |
305 |
assertNotNull(classFile); |
Lines 310-316
Link Here
|
310 |
|
310 |
|
311 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120559 |
311 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120559 |
312 |
public void test013() throws JavaModelException { |
312 |
public void test013() throws JavaModelException { |
313 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
313 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
314 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
314 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
315 |
IClassFile classFile = packageFragment.getClassFile("W.class"); //$NON-NLS-1$ |
315 |
IClassFile classFile = packageFragment.getClassFile("W.class"); //$NON-NLS-1$ |
316 |
assertNotNull(classFile); |
316 |
assertNotNull(classFile); |
Lines 320-326
Link Here
|
320 |
|
320 |
|
321 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
321 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
322 |
public void test014() throws JavaModelException { |
322 |
public void test014() throws JavaModelException { |
323 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
323 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
324 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
324 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
325 |
IClassFile classFile = packageFragment.getClassFile("E.class"); //$NON-NLS-1$ |
325 |
IClassFile classFile = packageFragment.getClassFile("E.class"); //$NON-NLS-1$ |
326 |
assertNotNull(classFile); |
326 |
assertNotNull(classFile); |
Lines 331-337
Link Here
|
331 |
|
331 |
|
332 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
332 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120637 |
333 |
public void test015() throws JavaModelException { |
333 |
public void test015() throws JavaModelException { |
334 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
334 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
335 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
335 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
336 |
IClassFile classFile = packageFragment.getClassFile("Annot.class"); //$NON-NLS-1$ |
336 |
IClassFile classFile = packageFragment.getClassFile("Annot.class"); //$NON-NLS-1$ |
337 |
assertNotNull(classFile); |
337 |
assertNotNull(classFile); |
Lines 356-362
Link Here
|
356 |
} |
356 |
} |
357 |
} |
357 |
} |
358 |
this.project.setRawClasspath(entries, null); |
358 |
this.project.setRawClasspath(entries, null); |
359 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
359 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
360 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
360 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
361 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
361 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
362 |
assertNotNull(classFile); |
362 |
assertNotNull(classFile); |
Lines 378-384
Link Here
|
378 |
|
378 |
|
379 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120875 |
379 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120875 |
380 |
public void test017() throws JavaModelException { |
380 |
public void test017() throws JavaModelException { |
381 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
381 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
382 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
382 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
383 |
IClassFile classFile = packageFragment.getClassFile("Annot2.class"); //$NON-NLS-1$ |
383 |
IClassFile classFile = packageFragment.getClassFile("Annot2.class"); //$NON-NLS-1$ |
384 |
assertNotNull(classFile); |
384 |
assertNotNull(classFile); |
Lines 389-395
Link Here
|
389 |
|
389 |
|
390 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
390 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
391 |
public void test018() throws JavaModelException { |
391 |
public void test018() throws JavaModelException { |
392 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2/p3"); //$NON-NLS-1$ |
392 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2.p3"); //$NON-NLS-1$ |
393 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
393 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
394 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
394 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
395 |
assertNotNull(classFile); |
395 |
assertNotNull(classFile); |
Lines 407-413
Link Here
|
407 |
|
407 |
|
408 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
408 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=138167 |
409 |
public void test019() throws JavaModelException { |
409 |
public void test019() throws JavaModelException { |
410 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2/p3"); //$NON-NLS-1$ |
410 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2.p3"); //$NON-NLS-1$ |
411 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
411 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
412 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
412 |
IClassFile classFile = packageFragment.getClassFile("C.class"); //$NON-NLS-1$ |
413 |
assertNotNull(classFile); |
413 |
assertNotNull(classFile); |
Lines 426-432
Link Here
|
426 |
|
426 |
|
427 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=139160 |
427 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=139160 |
428 |
public void test020() throws JavaModelException { |
428 |
public void test020() throws JavaModelException { |
429 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
429 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
430 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
430 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
431 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
431 |
IClassFile classFile = packageFragment.getClassFile("Z.class"); //$NON-NLS-1$ |
432 |
assertNotNull(classFile); |
432 |
assertNotNull(classFile); |
Lines 484-490
Link Here
|
484 |
|
484 |
|
485 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=149154 |
485 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=149154 |
486 |
public void test022() throws JavaModelException { |
486 |
public void test022() throws JavaModelException { |
487 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1/p2"); //$NON-NLS-1$ |
487 |
IPackageFragment packageFragment = this.root.getPackageFragment("p1.p2"); //$NON-NLS-1$ |
488 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
488 |
assertNotNull("Should not be null", packageFragment); //$NON-NLS-1$ |
489 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
489 |
IClassFile classFile = packageFragment.getClassFile("X.class"); //$NON-NLS-1$ |
490 |
assertNotNull(classFile); |
490 |
assertNotNull(classFile); |