if (nextRoot.getKind() == IPackageFragmentRoot.K_SOURCE) { PackageFragmentRoot root = (PackageFragmentRoot)nextRoot; cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); this.unindexedEntries.add(cp);
if (nextRoot.getKind() == IPackageFragmentRoot.K_SOURCE) { PackageFragmentRoot root = (PackageFragmentRoot)nextRoot; cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); this.unindexedEntries.add(cp);
cpLocations[index++] = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { cpLocations[index++] = ClasspathLocation.forBinaryFolder((IContainer) target, false, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet());
cpLocations[index++] = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { cpLocations[index++] = ClasspathLocation.forBinaryFolder((IContainer) target, false, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet());
cpLocations[index++] = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { cpLocations[index++] = ClasspathLocation.forBinaryFolder((IContainer) target, false, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet());
if (target != null) { if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry();
private ClasspathLocation mapToClassPathLocation( JavaModelManager manager, PackageFragmentRoot root) { ClasspathLocation cp = null; IPath path = root.getPath(); try { if (root.isArchive()) { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry(); cp = new ClasspathJar(manager.getZipFile(path), rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true)); } else { Object target = JavaModel.getTarget(path, true); if (target != null) { if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry(); cp = ClasspathLocation.forBinaryFolder((IContainer) target, false, rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true)); } } } } catch (CoreException e1) { // problem opening zip file or getting root kind // consider root corrupt and ignore } return cp; }
if (target != null) { if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry();