public static ModifiedFilesTransaction newModifiedFilesTransaction( final boolean srcIndex, final boolean checkForEditorModifications) { final ModifiedFilesTransaction tx = (srcIndex && !checkForEditorModifications) ? new PermanentSourceScan(modifiedFiles) : new TransientSourceScan(); tx.begin(); return tx; }