Lines 14-19
Link Here
|
14 |
|
14 |
|
15 |
import org.eclipse.core.resources.IWorkspaceRunnable; |
15 |
import org.eclipse.core.resources.IWorkspaceRunnable; |
16 |
import org.eclipse.core.runtime.CoreException; |
16 |
import org.eclipse.core.runtime.CoreException; |
|
|
17 |
import org.eclipse.core.runtime.IPath; |
17 |
import org.eclipse.core.runtime.IProgressMonitor; |
18 |
import org.eclipse.core.runtime.IProgressMonitor; |
18 |
import org.eclipse.core.runtime.Path; |
19 |
import org.eclipse.core.runtime.Path; |
19 |
import org.eclipse.jdt.core.*; |
20 |
import org.eclipse.jdt.core.*; |
Lines 250-255
Link Here
|
250 |
} |
251 |
} |
251 |
} |
252 |
} |
252 |
/* |
253 |
/* |
|
|
254 |
* Ensure that finding a package fragment with a path with a length equals to an external jar path length + 1 |
255 |
* (regression test for bug 266771 NameLookup.findPackageFragment returns very incorrect package fragments) |
256 |
*/ |
257 |
public void testFindPackageFragment2() throws CoreException { |
258 |
try { |
259 |
JavaProject project = (JavaProject)createJavaProject("P", new String[0], new String[] {"JCL_LIB"}, "bin"); |
260 |
NameLookup nameLookup =getNameLookup(project); |
261 |
IPath pathToSearch = new Path(getExternalJCLPathString() + 'a'); |
262 |
IPackageFragment pkg = nameLookup.findPackageFragment(pathToSearch); |
263 |
assertElementEquals( |
264 |
"Unexpected package", |
265 |
"<null>", |
266 |
pkg); |
267 |
} finally { |
268 |
deleteProject("P"); |
269 |
} |
270 |
} |
271 |
|
272 |
/* |
253 |
* Ensure that a member type with a name ending with a dollar and a number is found |
273 |
* Ensure that a member type with a name ending with a dollar and a number is found |
254 |
* (regression test for bug 103466 Stack Overflow: Requesting Java AST from selection) |
274 |
* (regression test for bug 103466 Stack Overflow: Requesting Java AST from selection) |
255 |
*/ |
275 |
*/ |