test fix
authorAlexey Kudravtsev <cdr@intellij.com>
Tue, 11 May 2010 13:11:46 +0000 (17:11 +0400)
committerAlexey Kudravtsev <cdr@intellij.com>
Tue, 11 May 2010 13:22:18 +0000 (17:22 +0400)
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java

index 31cc586b359ae491f2f8b4b7f7d52a5415f66a3c..f6b5ef5dadbda61dd7775f2691b4bed2d2d8972b 100644 (file)
@@ -47,7 +47,6 @@ public class StaticImportMethodFix implements IntentionAction {
   private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.daemon.impl.quickfix.StaticImportMethodFix");
   private final SmartPsiElementPointer<PsiMethodCallExpression> myMethodCall;
   private List<PsiMethod> candidates;
-  private static final int OPTIONS = PsiFormatUtil.SHOW_NAME;
 
   public StaticImportMethodFix(@NotNull PsiMethodCallExpression methodCallExpression) {
     myMethodCall = SmartPointerManager.getInstance(methodCallExpression.getProject()).createSmartPsiElementPointer(methodCallExpression);
@@ -57,7 +56,7 @@ public class StaticImportMethodFix implements IntentionAction {
   public String getText() {
     String text = QuickFixBundle.message("static.import.method.text");
     if (candidates.size() == 1) {
-      text += " '" + PsiFormatUtil.formatMethod(candidates.get(0), PsiSubstitutor.EMPTY, OPTIONS, 0)+"'";
+      text += " '" + PsiFormatUtil.formatMethod(candidates.get(0), PsiSubstitutor.EMPTY, PsiFormatUtil.SHOW_NAME | PsiFormatUtil.SHOW_CONTAINING_CLASS  | PsiFormatUtil.SHOW_FQ_NAME, 0)+"'";
     }
     else {
       text += "...";
@@ -164,7 +163,7 @@ public class StaticImportMethodFix implements IntentionAction {
 
   private void chooseAndImport(Editor editor) {
     final JList list = new JList(new Vector<PsiMethod>(candidates));
-    list.setCellRenderer(new MethodCellRenderer(true, OPTIONS));
+    list.setCellRenderer(new MethodCellRenderer(true, PsiFormatUtil.SHOW_NAME));
     new PopupChooserBuilder(list).
       setTitle(QuickFixBundle.message("static.import.method.choose.method.to.import")).
       setMovable(true).