summaryrefslogtreecommitdiff
path: root/plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java')
-rw-r--r--plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java b/plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java
index d698a076b891..a9996ba276d0 100644
--- a/plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.java
+++ b/plugins/ui-designer/src/com/intellij/uiDesigner/actions/GenerateMainAction.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.
@@ -21,7 +21,6 @@ import com.intellij.codeInsight.generation.PsiGenerationInfo;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
-import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.diagnostic.Logger;
@@ -146,7 +145,7 @@ public class GenerateMainAction extends AnAction {
PsiClass psiClass = PsiTreeUtil.getParentOfType(element, PsiClass.class);
if (psiClass == null) return false;
if (PsiMethodUtil.findMainMethod(psiClass) != null) return false;
- if (FormClassIndex.findFormsBoundToClass(psiClass).isEmpty()) return false;
+ if (FormClassIndex.findFormsBoundToClass(project, psiClass).isEmpty()) return false;
return true;
}
}