mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix: IDEA-66621 (Create action from usage)
This commit is contained in:
@@ -28,6 +28,7 @@ import com.intellij.psi.impl.source.tree.LeafElement;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.search.SearchScope;
|
||||
import com.intellij.psi.tree.IElementType;
|
||||
import com.intellij.psi.tree.TokenSet;
|
||||
import com.intellij.psi.util.InheritanceUtil;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
@@ -1075,6 +1076,10 @@ public class PsiUtil {
|
||||
return element instanceof LeafElement && ((LeafElement)element).getElementType() == type;
|
||||
}
|
||||
|
||||
public static boolean isLeafElementOfType(@Nullable PsiElement element, TokenSet tokenSet) {
|
||||
return element instanceof LeafElement && tokenSet.contains(((LeafElement)element).getElementType());
|
||||
}
|
||||
|
||||
public static GrNamedArgument[] getFirstMapNamedArguments(GrCall grCall) {
|
||||
GrNamedArgument[] res = grCall.getNamedArguments();
|
||||
if (res.length > 0) return res;
|
||||
|
||||
Reference in New Issue
Block a user