mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
common "invert boolean" quickfix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 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.
|
||||
@@ -18,7 +18,6 @@ package com.intellij.refactoring.invertBoolean;
|
||||
import com.intellij.ide.util.SuperMethodWarningUtil;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.LangDataKeys;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.ScrollType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -70,8 +69,13 @@ public class InvertBooleanHandler implements RefactoringActionHandler {
|
||||
}
|
||||
|
||||
public void invoke(@NotNull Project project, @NotNull PsiElement[] elements, @NotNull DataContext dataContext) {
|
||||
if (elements.length == 1 && elements[0] instanceof PsiMethod) {
|
||||
invoke((PsiMethod)elements[0], project, null);
|
||||
if (elements.length == 1) {
|
||||
if (elements[0] instanceof PsiMethod) {
|
||||
invoke((PsiMethod)elements[0], project, null);
|
||||
}
|
||||
else if (elements[0] instanceof PsiVariable) {
|
||||
invoke((PsiVariable)elements[0], project, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user