newRoots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { ArrayList rootList = (ArrayList)newOtherRoots.get(path); newOtherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));
/** * @see AbstractJavaSearchScope#packageFragmentRoot(String, int, String) */ public IPackageFragmentRoot packageFragmentRoot(String resourcePathString, int jarSeparatorIndex, String jarPath) { HashMap rootInfos = JavaModelManager.getDeltaState().roots; DeltaProcessor.RootInfo rootInfo = null; if (jarPath != null) { IPath path = new Path(jarPath); rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path); } else { IPath path = new Path(resourcePathString); if (ExternalFoldersManager.isInternalPathForExternalFolder(path)) { IResource resource = JavaModel.getWorkspaceTarget(path.uptoSegment(2/*linked folders for external folders are always of size 2*/)); if (resource != null) rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(resource.getLocation()); } else { rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path); while (rootInfo == null && path.segmentCount() > 0) { path = path.removeLastSegments(1); rootInfo = (DeltaProcessor.RootInfo) rootInfos.get(path); } } } if (rootInfo == null) return null; return rootInfo.getPackageFragmentRoot(null/*no resource hint*/); }
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
RootInfo childRootInfo = rootInfo(childPath, childKind); RootInfo originalChildRootInfo = childRootInfo; if (childRootInfo != null && !childRootInfo.isRootOfProject(childPath)) {
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
element = rootInfo == null ? JavaCore.create(resource) : rootInfo.getPackageFragmentRoot(resource); break; case IJavaElement.PACKAGE_FRAGMENT: if (rootInfo != null) { if (rootInfo.project.contains(resource)) { PackageFragmentRoot root = (PackageFragmentRoot) rootInfo.getPackageFragmentRoot(null);
newRoots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { ArrayList rootList = (ArrayList)newOtherRoots.get(path); newOtherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));
newRoots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { ArrayList rootList = (ArrayList)newOtherRoots.get(path); newOtherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));
newRoots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { ArrayList rootList = (ArrayList)newOtherRoots.get(path); newOtherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));
newRoots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { ArrayList rootList = (ArrayList)newOtherRoots.get(path); newOtherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));
rootInfo = enclosingRootInfo(res.getFullPath(), kind); if (rootInfo != null && rootInfo.isRootOfProject(res.getFullPath())) { return IJavaElement.PACKAGE_FRAGMENT_ROOT;
ri.roots.put(path, new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind())); } else { List<RootInfo> rootList = ri.otherRoots.get(path); ri.otherRoots.put(path, rootList); rootList.add(new DeltaProcessor.RootInfo(project, path, ((ClasspathEntry)entry).fullInclusionPatternChars(), ((ClasspathEntry)entry).fullExclusionPatternChars(), entry.getEntryKind()));