2121import com .intellij .java .language .impl .psi .impl .source .resolve .JavaResolveUtil ;
2222import com .intellij .java .language .psi .*;
2323import com .intellij .java .language .psi .search .searches .SuperMethodsSearch ;
24- import com .siyeh .IntentionPowerPackBundle ;
24+ import com .siyeh .localize . IntentionPowerPackLocalize ;
2525import consulo .application .WriteAction ;
2626import consulo .application .util .query .Query ;
2727import consulo .language .editor .intention .LowPriorityAction ;
@@ -96,11 +96,7 @@ private MultiMap<PsiElement, String> checkForConflicts(@Nonnull final PsiMember
9696 return MultiMap .empty ();
9797 }
9898 final MultiMap <PsiElement , String > conflicts = new MultiMap ();
99- conflicts .putValue (aClass , IntentionPowerPackBundle .message (
100- "0.is.declared.in.1.but.when.public.should.be.declared.in.a.file.named.2" ,
101- RefactoringUIUtil .getDescription (aClass , false ),
102- RefactoringUIUtil .getDescription (javaFile , false ),
103- CommonRefactoringUtil .htmlEmphasize (className + ".java" )));
99+ conflicts .putValue (aClass , IntentionPowerPackLocalize .zeroIsDeclaredIn1ButWhenPublicShouldBeDeclaredInAFileNamed2 (RefactoringUIUtil .getDescription (aClass , false ), RefactoringUIUtil .getDescription (javaFile , false ), CommonRefactoringUtil .htmlEmphasize (className + ".java" )).get ());
104100 return conflicts ;
105101 }
106102 final PsiModifierList modifierList = member .getModifierList ();
@@ -113,25 +109,16 @@ private MultiMap<PsiElement, String> checkForConflicts(@Nonnull final PsiMember
113109 SuperMethodsSearch .search (method , method .getContainingClass (), true , false ).forEach (methodSignature -> {
114110 final PsiMethod superMethod = methodSignature .getMethod ();
115111 if (!hasCompatibleVisibility (superMethod , true )) {
116- conflicts .putValue (superMethod , IntentionPowerPackBundle .message (
117- "0.will.have.incompatible.access.privileges.with.super.1" ,
118- RefactoringUIUtil .getDescription (method , false ),
119- RefactoringUIUtil .getDescription (superMethod , true )));
112+ conflicts .putValue (superMethod , IntentionPowerPackLocalize .zeroWillHaveIncompatibleAccessPrivilegesWithSuper1 (RefactoringUIUtil .getDescription (method , false ), RefactoringUIUtil .getDescription (superMethod , true )).get ());
120113 }
121114 return true ;
122115 });
123116 OverridingMethodsSearch .search (method ).forEach (overridingMethod -> {
124117 if (!isVisibleFromOverridingMethod (method , overridingMethod )) {
125- conflicts .putValue (overridingMethod , IntentionPowerPackBundle .message (
126- "0.will.no.longer.be.visible.from.overriding.1" ,
127- RefactoringUIUtil .getDescription (method , false ),
128- RefactoringUIUtil .getDescription (overridingMethod , true )));
118+ conflicts .putValue (overridingMethod , IntentionPowerPackLocalize .zeroWillNoLongerBeVisibleFromOverriding1 (RefactoringUIUtil .getDescription (method , false ), RefactoringUIUtil .getDescription (overridingMethod , true )).get ());
129119 }
130120 else if (!hasCompatibleVisibility (overridingMethod , false )) {
131- conflicts .putValue (overridingMethod , IntentionPowerPackBundle .message (
132- "0.will.have.incompatible.access.privileges.with.overriding.1" ,
133- RefactoringUIUtil .getDescription (method , false ),
134- RefactoringUIUtil .getDescription (overridingMethod , true )));
121+ conflicts .putValue (overridingMethod , IntentionPowerPackLocalize .zeroWillHaveIncompatibleAccessPrivilegesWithOverriding1 (RefactoringUIUtil .getDescription (method , false ), RefactoringUIUtil .getDescription (overridingMethod , true )).get ());
135122 }
136123 return false ;
137124 });
0 commit comments