mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
exceptions with the default project
This commit is contained in:
@@ -140,6 +140,7 @@ public class JavaExecutionUtil {
|
||||
|
||||
@Nullable
|
||||
public static PsiClass findMainClass(final Project project, final String mainClassName, final GlobalSearchScope scope) {
|
||||
if (project.isDefault()) return null;
|
||||
final PsiManager psiManager = PsiManager.getInstance(project);
|
||||
final String shortName = StringUtil.getShortName(mainClassName);
|
||||
final String packageName = StringUtil.getPackageName(mainClassName);
|
||||
|
||||
@@ -131,11 +131,13 @@ public class ClassFilterEditor extends JPanel implements ComponentWithEmptyText
|
||||
}
|
||||
});
|
||||
|
||||
myAddPatternButton.setEnabled(!myProject.isDefault());
|
||||
myAddPatternButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
addPatternFilter();
|
||||
}
|
||||
});
|
||||
myAddClassButton.setEnabled(!myProject.isDefault());
|
||||
myAddClassButton.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
addClassFilter();
|
||||
|
||||
@@ -112,6 +112,7 @@ public class AutoPopupController implements Disposable {
|
||||
Runnable request = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (myProject.isDefault()) return;
|
||||
CompletionAutoPopupHandler.runLaterWithCommitted(myProject, editor.getDocument(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.ide.actions;
|
||||
|
||||
import com.intellij.idea.ActionsBundle;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
@@ -26,8 +25,6 @@ import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.project.DumbAwareAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public abstract class UndoRedoAction extends DumbAwareAction {
|
||||
public UndoRedoAction() {
|
||||
@@ -56,7 +53,7 @@ public abstract class UndoRedoAction extends DumbAwareAction {
|
||||
}
|
||||
|
||||
UndoManager undoManager = getUndoManager(editor, dataContext);
|
||||
presentation.setEnabled(isAvailable(editor, undoManager));
|
||||
presentation.setEnabled(undoManager != null && isAvailable(editor, undoManager));
|
||||
|
||||
Pair<String, String> pair = getActionNameAndDescription(editor, undoManager);
|
||||
|
||||
|
||||
+1
@@ -210,6 +210,7 @@ public class TestNGConfigurationEditor extends SettingsEditor<TestNGConfiguratio
|
||||
}
|
||||
model.setType(TestType.CLASS);
|
||||
addListener.addActionListener(new AddTestListenerListener());
|
||||
addListener.setEnabled(!project.isDefault());
|
||||
removeListener.addActionListener(new ActionListener()
|
||||
{
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user