From 9d46ee9c3f9209192fc4003f39068418ee9d210d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Fri, 7 Feb 2014 13:37:38 +0400 Subject: [PATCH] cleanup --- .../codeInsight/daemon/impl/GlobalUsageHelper.java | 2 +- .../daemon/impl/quickfix/CreateGetterOrSetterFix.java | 4 ++-- .../intellij/refactoring/ChangeSignatureGestureTest.java | 8 ++++---- .../com/intellij/find/findUsages/FindUsagesManager.java | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename java/{java-impl => java-analysis-impl}/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java (96%) diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java similarity index 96% rename from java/java-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java rename to java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java index cf2b86fd242f..469d03a98b5f 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/GlobalUsageHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2014 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. diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateGetterOrSetterFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateGetterOrSetterFix.java index dba7da867302..209dde6cf4ea 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateGetterOrSetterFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateGetterOrSetterFix.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 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. @@ -40,7 +40,7 @@ public class CreateGetterOrSetterFix implements IntentionAction, LowPriorityActi private final PsiField myField; private final String myPropertyName; - public CreateGetterOrSetterFix(boolean createGetter, boolean createSetter, PsiField field) { + public CreateGetterOrSetterFix(boolean createGetter, boolean createSetter, @NotNull PsiField field) { myCreateGetter = createGetter; myCreateSetter = createSetter; myField = field; diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java index 61f3b18f5bc8..36d7d3974108 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2014 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. @@ -30,7 +30,6 @@ import com.intellij.psi.util.PsiTreeUtil; import com.intellij.refactoring.changeSignature.ChangeSignatureDetectorAction; import com.intellij.refactoring.changeSignature.ChangeSignatureGestureDetector; import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; -import junit.framework.Assert; import java.util.List; @@ -62,9 +61,10 @@ public class ChangeSignatureGestureTest extends LightCodeInsightFixtureTestCase final IntentionAction intention = myFixture.findSingleIntention(hint); myFixture.launchAction(intention); myFixture.checkResultByFile("/refactoring/changeSignatureGesture/" + getTestName(false) + "_after.java"); - } else { + } + else { final List intentionActions = myFixture.filterAvailableIntentions(hint); - Assert.assertEquals(true, intentionActions.isEmpty()); + assertEmpty(intentionActions); } } finally { diff --git a/platform/lang-impl/src/com/intellij/find/findUsages/FindUsagesManager.java b/platform/lang-impl/src/com/intellij/find/findUsages/FindUsagesManager.java index df180eb4261d..ba9870a05941 100644 --- a/platform/lang-impl/src/com/intellij/find/findUsages/FindUsagesManager.java +++ b/platform/lang-impl/src/com/intellij/find/findUsages/FindUsagesManager.java @@ -298,7 +298,7 @@ public class FindUsagesManager implements JDOMExternalizable { return used.get(); } - private static boolean isInComment(Usage usage) { + private static boolean isInComment(@NotNull Usage usage) { if (!(usage instanceof UsageInfo2UsageAdapter)) return false; UsageInfo usageInfo = ((UsageInfo2UsageAdapter)usage).getUsageInfo(); if (!usageInfo.isNonCodeUsage()) return false;