[formatter] removed useless comment

This commit is contained in:
Yaroslav Lepenkin
2016-06-30 19:03:09 +03:00
parent 6bfdf0d617
commit 608df2d49b
2 changed files with 0 additions and 54 deletions
@@ -53,12 +53,6 @@ public class FormatChangedTextUtil {
return ServiceManager.getService(FormatChangedTextUtil.class);
}
/**
* Allows to answer if given file has changes in comparison with VCS.
*
* @param file target file
* @return <code>true</code> if given file has changes; <code>false</code> otherwise
*/
public static boolean hasChanges(@NotNull PsiFile file) {
final Project project = file.getProject();
final VirtualFile virtualFile = file.getVirtualFile();
@@ -69,25 +63,10 @@ public class FormatChangedTextUtil {
return false;
}
/**
* Allows to answer if any file below the given directory (any level of nesting) has changes in comparison with VCS.
*
* @param directory target directory to check
* @return <code>true</code> if any file below the given directory has changes in comparison with VCS;
* <code>false</code> otherwise
*/
public static boolean hasChanges(@NotNull PsiDirectory directory) {
return hasChanges(directory.getVirtualFile(), directory.getProject());
}
/**
* Allows to answer if given file or any file below the given directory (any level of nesting) has changes in comparison with VCS.
*
* @param file target directory to check
* @param project target project
* @return <code>true</code> if given file or any file below the given directory has changes in comparison with VCS;
* <code>false</code> otherwise
*/
public static boolean hasChanges(@NotNull VirtualFile file, @NotNull Project project) {
final Collection<Change> changes = ChangeListManager.getInstance(project).getChangesIn(file);
for (Change change : changes) {
@@ -106,13 +85,6 @@ public class FormatChangedTextUtil {
return false;
}
/**
* Allows to answer if any file that belongs to the given module has changes in comparison with VCS.
*
* @param module target module to check
* @return <code>true</code> if any file that belongs to the given module has changes in comparison with VCS
* <code>false</code> otherwise
*/
public static boolean hasChanges(@NotNull Module module) {
final ModuleRootManager rootManager = ModuleRootManager.getInstance(module);
for (VirtualFile root : rootManager.getSourceRoots()) {
@@ -123,13 +95,6 @@ public class FormatChangedTextUtil {
return false;
}
/**
* Allows to answer if any file that belongs to the given project has changes in comparison with VCS.
*
* @param project target project to check
* @return <code>true</code> if any file that belongs to the given project has changes in comparison with VCS
* <code>false</code> otherwise
*/
public static boolean hasChanges(@NotNull final Project project) {
final ModifiableModuleModel moduleModel = new ReadAction<ModifiableModuleModel>() {
@Override
@@ -36,15 +36,6 @@ public class FormatTextRanges {
myRanges.add(new FormatTextRange(range, processHeadingWhitespace));
}
/**
* Batches {@link FormatTextRange#isWhitespaceReadOnly(TextRange)} operation for all aggregated ranges.
* <p/>
* I.e. this method allows to check if given range has intersections with any of aggregated ranges.
*
* @param range range to check
* @return <code>true</code> if given range doesn't have intersections with all aggregated ranges;
* <code>false</code> if given range intersects at least one of aggregated ranges
*/
public boolean isWhitespaceReadOnly(TextRange range) {
for (FormatTextRange formatTextRange : myRanges) {
if (!formatTextRange.isWhitespaceReadOnly(range)) {
@@ -54,16 +45,6 @@ public class FormatTextRanges {
return true;
}
/**
* Batches {@link FormatTextRange#isReadOnly(TextRange, boolean)} operation for all aggregated ranges.
* <p/>
* I.e. this method allows to check if given range has intersections with any of aggregated ranges.
*
* @param range range to check
* @param rootIsRightBlock flag to use during {@link FormatTextRange#isReadOnly(TextRange, boolean)} processing
* @return <code>true</code> if given range doesn't have intersections with all aggregated ranges;
* <code>false</code> if given range intersects at least one of aggregated ranges
*/
public boolean isReadOnly(TextRange range, boolean rootIsRightBlock) {
for (FormatTextRange formatTextRange : myRanges) {
if (!formatTextRange.isReadOnly(range, rootIsRightBlock)) {