diff --git a/platform/lang-api/src/com/intellij/refactoring/util/CommonRefactoringUtil.java b/platform/lang-api/src/com/intellij/refactoring/util/CommonRefactoringUtil.java index 7027e44580db..1f798f92bfe5 100644 --- a/platform/lang-api/src/com/intellij/refactoring/util/CommonRefactoringUtil.java +++ b/platform/lang-api/src/com/intellij/refactoring/util/CommonRefactoringUtil.java @@ -41,7 +41,6 @@ import org.jetbrains.annotations.Nullable; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.Comparator; /** * @author ven @@ -75,11 +74,11 @@ public class CommonRefactoringUtil { } } - public static void showErrorHint(final Project project, - @Nullable final Editor editor, - @Nls final String message, - @Nls final String title, - @Nullable final String helpId) { + public static void showErrorHint(@NotNull Project project, + @Nullable Editor editor, + @NotNull @Nls String message, + @NotNull @Nls String title, + @Nullable String helpId) { if (ApplicationManager.getApplication().isUnitTestMode()) throw new RefactoringErrorHintException(message); ApplicationManager.getApplication().invokeLater(() -> { @@ -92,7 +91,7 @@ public class CommonRefactoringUtil { }); } - public static String htmlEmphasize(String text) { + public static String htmlEmphasize(@NotNull String text) { return StringUtil.htmlEmphasize(text); } @@ -113,7 +112,7 @@ public class CommonRefactoringUtil { return checkReadOnlyStatus(project, Collections.emptySet(), elements, RefactoringBundle.message("refactoring.cannot.be.performed"), notifyOnFail); } - public static boolean checkReadOnlyStatus(@NotNull PsiElement element, @NotNull Project project, String messagePrefix) { + public static boolean checkReadOnlyStatus(@NotNull PsiElement element, @NotNull Project project, @NotNull String messagePrefix) { return element.isWritable() || checkReadOnlyStatus(project, Collections.emptySet(), Collections.singleton(element), messagePrefix, true); } @@ -246,11 +245,11 @@ public class CommonRefactoringUtil { }); } - public static String capitalize(String text) { + public static String capitalize(@NotNull String text) { return StringUtil.capitalize(text); } - public static boolean isAncestor(final PsiElement resolved, final Collection scopes) { + public static boolean isAncestor(@NotNull PsiElement resolved, @NotNull Collection scopes) { for (final PsiElement scope : scopes) { if (PsiTreeUtil.isAncestor(scope, resolved, false)) return true; } diff --git a/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/AbstractInplaceIntroducer.java b/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/AbstractInplaceIntroducer.java index 7fa87d7e4e2e..ca185be22cb5 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/AbstractInplaceIntroducer.java +++ b/platform/lang-impl/src/com/intellij/refactoring/introduce/inplace/AbstractInplaceIntroducer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -175,7 +175,7 @@ public abstract class AbstractInplaceIntroducer