public synchronized ClasspathChange addClasspathChange(IProject project, IClasspathEntry[] oldRawClasspath, IPath oldOutputLocation, IClasspathEntry[] oldResolvedClasspath) { ClasspathChange change = (ClasspathChange) this.classpathChanges.get(project); if (change == null) { change = new ClasspathChange((JavaProject) JavaModelManager.getJavaModelManager().getJavaModel().getJavaProject(project), oldRawClasspath, oldOutputLocation, oldResolvedClasspath); this.classpathChanges.put(project, change); } else { if (change.oldRawClasspath == null) change.oldRawClasspath = oldRawClasspath; if (change.oldOutputLocation == null) change.oldOutputLocation = oldOutputLocation; if (change.oldResolvedClasspath == null) change.oldResolvedClasspath = oldResolvedClasspath; } return change; }
private void collectAllSubfolders(IFolder folder, ArrayList collection) throws JavaModelException { try { IResource[] members= folder.members(); for (int i = 0, max = members.length; i < max; i++) { IResource r= members[i]; if (r.getType() == IResource.FOLDER) { collection.add(r); collectAllSubfolders((IFolder)r, collection); } } } catch (CoreException e) { throw new JavaModelException(e); } }
IClasspathEntry entry = this.oldRawClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { if (classpathContains(newRawClasspath, entry) == -1) manager.containerPut(this.project, entry.getPath(), null); int oldLength = this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); } else { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), IJavaElementDelta.F_REORDER); int sourceAttachmentFlags = getSourceAttachmentDeltaFlag(this.oldResolvedClasspath[i].getSourceAttachmentPath(), newSourcePath); IPath oldRootPath = this.oldResolvedClasspath[i].getSourceAttachmentRootPath(); IPath newRootPath = newResolvedClasspath[index].getSourceAttachmentRootPath(); int sourceAttachmentRootFlags = getSourceAttachmentDeltaFlag(oldRootPath, newRootPath); int flags = sourceAttachmentFlags | sourceAttachmentRootFlags; if (flags != 0) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), flags); } else { if (oldRootPath == null && newRootPath == null) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(newResolvedClasspath[i]), IJavaElementDelta.F_ADDED_TO_CLASSPATH);
DeltaProcessingState state = JavaModelManager.getDeltaState(); JavaElementDelta delta = new JavaElementDelta(getJavaModel()); int result = change.generateDelta(delta, true/*add classpath change*/); if ((result & ClasspathChange.HAS_DELTA) != 0) { change.requestIndexing();
int oldLength = this.oldResolvedClasspath == null ? 0 : this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) {
IClasspathEntry entry = this.oldRawClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { if (classpathContains(newRawClasspath, entry) == -1) manager.containerPut(this.project, entry.getPath(), null); int oldLength = this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); } else { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), IJavaElementDelta.F_REORDER); int sourceAttachmentFlags = getSourceAttachmentDeltaFlag(this.oldResolvedClasspath[i].getSourceAttachmentPath(), newSourcePath); IPath oldRootPath = this.oldResolvedClasspath[i].getSourceAttachmentRootPath(); IPath newRootPath = newResolvedClasspath[index].getSourceAttachmentRootPath(); int sourceAttachmentRootFlags = getSourceAttachmentDeltaFlag(oldRootPath, newRootPath); int flags = sourceAttachmentFlags | sourceAttachmentRootFlags; if (flags != 0) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), flags); } else { if (oldRootPath == null && newRootPath == null) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(newResolvedClasspath[i]), IJavaElementDelta.F_ADDED_TO_CLASSPATH);
DeltaProcessingState state = JavaModelManager.getDeltaState(); JavaElementDelta delta = new JavaElementDelta(getJavaModel()); int result = change.generateDelta(delta, true/*add classpath change*/); if ((result & ClasspathChange.HAS_DELTA) != 0) { change.requestIndexing();
int oldLength = this.oldResolvedClasspath == null ? 0 : this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1 || newResolvedClasspath[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
IClasspathEntry entry = this.oldRawClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { if (classpathContains(newRawClasspath, entry) == -1) manager.containerPut(this.project, entry.getPath(), null); int oldLength = this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); } else { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), IJavaElementDelta.F_REORDER); int sourceAttachmentFlags = getSourceAttachmentDeltaFlag(this.oldResolvedClasspath[i].getSourceAttachmentPath(), newSourcePath); IPath oldRootPath = this.oldResolvedClasspath[i].getSourceAttachmentRootPath(); IPath newRootPath = newResolvedClasspath[index].getSourceAttachmentRootPath(); int sourceAttachmentRootFlags = getSourceAttachmentDeltaFlag(oldRootPath, newRootPath); int flags = sourceAttachmentFlags | sourceAttachmentRootFlags; if (flags != 0) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), flags); } else { if (oldRootPath == null && newRootPath == null) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(newResolvedClasspath[i]), IJavaElementDelta.F_ADDED_TO_CLASSPATH);
DeltaProcessingState state = JavaModelManager.getDeltaState(); JavaElementDelta delta = new JavaElementDelta(getJavaModel()); int result = change.generateDelta(delta, true/*add classpath change*/); if ((result & ClasspathChange.HAS_DELTA) != 0) { change.requestIndexing();
private void collectAllSubfolders(IFolder folder, ArrayList collection) throws JavaModelException { try { IResource[] members= folder.members(); for (int i = 0, max = members.length; i < max; i++) { IResource r= members[i]; if (r.getType() == IResource.FOLDER) { collection.add(r); collectAllSubfolders((IFolder)r, collection); } } } catch (CoreException e) { throw new JavaModelException(e); } }
public ClasspathChange addClasspathChange(IProject project, IClasspathEntry[] oldRawClasspath, IPath oldOutputLocation, IClasspathEntry[] oldResolvedClasspath) { synchronized (this.classpathChanges) { ClasspathChange change = this.classpathChanges.get(project); if (change == null) { change = new ClasspathChange((JavaProject) JavaModelManager.getJavaModelManager().getJavaModel().getJavaProject(project), oldRawClasspath, oldOutputLocation, oldResolvedClasspath); this.classpathChanges.put(project, change); } else { if (change.oldRawClasspath == null) change.oldRawClasspath = oldRawClasspath; if (change.oldOutputLocation == null) change.oldOutputLocation = oldOutputLocation; if (change.oldResolvedClasspath == null) change.oldResolvedClasspath = oldResolvedClasspath; } return change; } }
int oldLength = this.oldResolvedClasspath == null ? 0 : this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1 || newResolvedClasspath[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
IClasspathEntry entry = this.oldRawClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { if (classpathContains(newRawClasspath, entry) == -1) manager.containerPut(this.project, entry.getPath(), null); int oldLength = this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); } else { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), IJavaElementDelta.F_REORDER); int sourceAttachmentFlags = getSourceAttachmentDeltaFlag(this.oldResolvedClasspath[i].getSourceAttachmentPath(), newSourcePath); IPath oldRootPath = this.oldResolvedClasspath[i].getSourceAttachmentRootPath(); IPath newRootPath = newResolvedClasspath[index].getSourceAttachmentRootPath(); int sourceAttachmentRootFlags = getSourceAttachmentDeltaFlag(oldRootPath, newRootPath); int flags = sourceAttachmentFlags | sourceAttachmentRootFlags; if (flags != 0) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), flags); } else { if (oldRootPath == null && newRootPath == null) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(newResolvedClasspath[i]), IJavaElementDelta.F_ADDED_TO_CLASSPATH);
DeltaProcessingState state = JavaModelManager.getDeltaState(); JavaElementDelta delta = new JavaElementDelta(getJavaModel()); int result = change.generateDelta(delta, true/*add classpath change*/); if ((result & ClasspathChange.HAS_DELTA) != 0) { change.requestIndexing();
private void collectAllSubfolders(IFolder folder, ArrayList collection) throws JavaModelException { try { IResource[] members= folder.members(); for (int i = 0, max = members.length; i < max; i++) { IResource r= members[i]; if (r.getType() == IResource.FOLDER) { collection.add(r); collectAllSubfolders((IFolder)r, collection); } } } catch (CoreException e) { throw new JavaModelException(e); } }
public ClasspathChange addClasspathChange(IProject project, IClasspathEntry[] oldRawClasspath, IPath oldOutputLocation, IClasspathEntry[] oldResolvedClasspath) { synchronized (this.classpathChanges) { ClasspathChange change = (ClasspathChange) this.classpathChanges.get(project); if (change == null) { change = new ClasspathChange((JavaProject) JavaModelManager.getJavaModelManager().getJavaModel().getJavaProject(project), oldRawClasspath, oldOutputLocation, oldResolvedClasspath); this.classpathChanges.put(project, change); } else { if (change.oldRawClasspath == null) change.oldRawClasspath = oldRawClasspath; if (change.oldOutputLocation == null) change.oldOutputLocation = oldOutputLocation; if (change.oldResolvedClasspath == null) change.oldResolvedClasspath = oldResolvedClasspath; } return change; } }
int oldLength = this.oldResolvedClasspath == null ? 0 : this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1 || newResolvedClasspath[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
IClasspathEntry entry = this.oldRawClasspath[i]; if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) { if (classpathContains(newRawClasspath, entry) == -1) manager.containerPut(this.project, entry.getPath(), null); int oldLength = this.oldResolvedClasspath.length; for (int i = 0; i < oldLength; i++) { int index = classpathContains(newResolvedClasspath, this.oldResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, pkgFragmentRoots, IJavaElementDelta.F_REMOVED_FROM_CLASSPATH); } else { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), IJavaElementDelta.F_REORDER); int sourceAttachmentFlags = getSourceAttachmentDeltaFlag(this.oldResolvedClasspath[i].getSourceAttachmentPath(), newSourcePath); IPath oldRootPath = this.oldResolvedClasspath[i].getSourceAttachmentRootPath(); IPath newRootPath = newResolvedClasspath[index].getSourceAttachmentRootPath(); int sourceAttachmentRootFlags = getSourceAttachmentDeltaFlag(oldRootPath, newRootPath); int flags = sourceAttachmentFlags | sourceAttachmentRootFlags; if (flags != 0) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(this.oldResolvedClasspath[i]), flags); } else { if (oldRootPath == null && newRootPath == null) { int index = classpathContains(this.oldResolvedClasspath, newResolvedClasspath[i]); if (index == -1) { addClasspathDeltas(delta, this.project.computePackageFragmentRoots(newResolvedClasspath[i]), IJavaElementDelta.F_ADDED_TO_CLASSPATH);
DeltaProcessingState state = JavaModelManager.getDeltaState(); JavaElementDelta delta = new JavaElementDelta(getJavaModel()); int result = change.generateDelta(delta, true/*add classpath change*/); if ((result & ClasspathChange.HAS_DELTA) != 0) { change.requestIndexing();