public static IFile[] getModifiedFiles(Change[] changes) { List<IFile> result= new ArrayList<>(); getModifiedFiles(result, changes); return result.toArray(new IFile[result.size()]); }
public static IFile[] getModifiedFiles(Change[] changes) { List<IFile> result= new ArrayList<>(); getModifiedFiles(result, changes); return result.toArray(new IFile[result.size()]); }
public static IFile[] getModifiedFiles(Change[] changes) { List result= new ArrayList(); getModifiedFiles(result, changes); return (IFile[]) result.toArray(new IFile[result.size()]); }
public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } else { return null; } }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { try { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } finally { fQualifiedNameSearchResult= null; } } else { return null; } }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { try { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } finally { fQualifiedNameSearchResult= null; } } else { return null; } }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } else { return null; } }
public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { try { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } finally { fQualifiedNameSearchResult= null; } } else { return null; } }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { return fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges)); } else { return null; } }
private static void getModifiedFiles(List<IFile> result, Change[] changes) { for (int i= 0; i < changes.length; i++) { Change change= changes[i]; Object modifiedElement= change.getModifiedElement(); if (modifiedElement instanceof IAdaptable) { IFile file= ((IAdaptable)modifiedElement).getAdapter(IFile.class); if (file != null) result.add(file); } if (change instanceof CompositeChange) { getModifiedFiles(result, ((CompositeChange)change).getChildren()); } } } }
private static void getModifiedFiles(List<IFile> result, Change[] changes) { for (int i= 0; i < changes.length; i++) { Change change= changes[i]; Object modifiedElement= change.getModifiedElement(); if (modifiedElement instanceof IAdaptable) { IFile file= ((IAdaptable)modifiedElement).getAdapter(IFile.class); if (file != null) result.add(file); } if (change instanceof CompositeChange) { getModifiedFiles(result, ((CompositeChange)change).getChildren()); } } } }
private static void getModifiedFiles(List result, Change[] changes) { for (int i= 0; i < changes.length; i++) { Change change= changes[i]; Object modifiedElement= change.getModifiedElement(); if (modifiedElement instanceof IAdaptable) { IFile file= (IFile)((IAdaptable)modifiedElement).getAdapter(IFile.class); if (file != null) result.add(file); } if (change instanceof CompositeChange) { getModifiedFiles(result, ((CompositeChange)change).getChildren()); } } } }
public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { CompositeChange parent= (CompositeChange) fRenamePackageChange.getParent(); try { /* * Sneak text changes in before the package rename to ensure * modified files are still at original location (see * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154238) */ parent.remove(fRenamePackageChange); parent.add(fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges))); } finally { fQualifiedNameSearchResult= null; parent.add(fRenamePackageChange); fRenamePackageChange= null; } } return null; }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { CompositeChange parent= (CompositeChange) fRenamePackageChange.getParent(); try { /* * Sneak text changes in before the package rename to ensure * modified files are still at original location (see * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154238) */ parent.remove(fRenamePackageChange); parent.add(fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges))); } finally { fQualifiedNameSearchResult= null; parent.add(fRenamePackageChange); fRenamePackageChange= null; } } return null; }
@Override public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException { if (fQualifiedNameSearchResult != null) { CompositeChange parent= (CompositeChange) fRenamePackageChange.getParent(); try { /* * Sneak text changes in before the package rename to ensure * modified files are still at original location (see * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154238) */ parent.remove(fRenamePackageChange); parent.add(fQualifiedNameSearchResult.getSingleChange(Changes.getModifiedFiles(participantChanges))); } finally { fQualifiedNameSearchResult= null; parent.add(fRenamePackageChange); fRenamePackageChange= null; } } return null; }