@Override public PsiType getType() { final IElementType type = getLiteralElementType(); if (type == JavaTokenType.INTEGER_LITERAL) { return PsiType.INT; } if (type == JavaTokenType.LONG_LITERAL) { return PsiType.LONG; } if (type == JavaTokenType.FLOAT_LITERAL) { return PsiType.FLOAT; } if (type == JavaTokenType.DOUBLE_LITERAL) { return PsiType.DOUBLE; } if (type == JavaTokenType.CHARACTER_LITERAL) { return PsiType.CHAR; } if (type == JavaTokenType.STRING_LITERAL) { PsiManagerEx manager = getManager(); GlobalSearchScope resolveScope = ResolveScopeManager.getElementResolveScope(this); return PsiType.getJavaLangString(manager, resolveScope); } if (type == JavaTokenType.TRUE_KEYWORD || type == JavaTokenType.FALSE_KEYWORD) { return PsiType.BOOLEAN; } if (type == JavaTokenType.NULL_KEYWORD) { return PsiType.NULL; } return null; }
@Override public SearchScope getAdditionalUseScope(@NotNull PsiElement element) { if (element instanceof PsiField && ((PsiField)element).hasModifierProperty(PsiModifier.PRIVATE)) { final GlobalSearchScope maximalUseScope = ResolveScopeManager.getElementUseScope(element); return new GrSourceFilterScope(maximalUseScope); } return null; }
@Override @NotNull public SearchScope getUseScope() { if (isProperty()) { return ResolveScopeManager.getElementUseScope(this); //maximal scope } return PsiImplUtil.getMemberUseScope(this); }
@NotNull public SearchScope getUseScope() { if (isProperty()) { return ResolveScopeManager.getElementUseScope(this); //maximal scope } return PsiImplUtil.getMemberUseScope(this); }
public static SearchScope getUseScope(XQueryVarName element) { XQueryFunctionDecl function = PsiTreeUtil.getParentOfType(element, XQueryFunctionDecl.class, true); if (function != null) { return new LocalSearchScope(function); } XQueryQueryBody queryBody = PsiTreeUtil.getParentOfType(element, XQueryQueryBody.class, true); if (queryBody != null) { return new LocalSearchScope(queryBody); } return ResolveScopeManager.getElementUseScope(element); }
@Override @NotNull public SearchScope getUseScope() { final PsiElement parentElement = getParent(); if (parentElement instanceof PsiDeclarationStatement) { return new LocalSearchScope(parentElement.getParent()); } else { return ResolveScopeManager.getElementUseScope(this); } }
@Override public PsiType getType() { final IElementType type = getLiteralElementType(); if(type == JavaTokenType.INTEGER_LITERAL) { return PsiType.INT; } if(type == JavaTokenType.LONG_LITERAL) { return PsiType.LONG; } if(type == JavaTokenType.FLOAT_LITERAL) { return PsiType.FLOAT; } if(type == JavaTokenType.DOUBLE_LITERAL) { return PsiType.DOUBLE; } if(type == JavaTokenType.CHARACTER_LITERAL) { return PsiType.CHAR; } if(type == JavaTokenType.STRING_LITERAL) { PsiManagerEx manager = getManager(); GlobalSearchScope resolveScope = ResolveScopeManager.getElementResolveScope(this); return PsiType.getJavaLangString(manager, resolveScope); } if(type == JavaTokenType.TRUE_KEYWORD || type == JavaTokenType.FALSE_KEYWORD) { return PsiType.BOOLEAN; } if(type == JavaTokenType.NULL_KEYWORD) { return PsiType.NULL; } return null; }
@Override @NotNull public GlobalSearchScope getResolveScope() { return ResolveScopeManager.getElementResolveScope(this); }
@Override @NotNull public SearchScope getUseScope() { return ResolveScopeManager.getElementUseScope(this); }
@NotNull @Override public SearchScope getUseScope() { return ResolveScopeManager.getElementUseScope(this); }
@Override @Nonnull public SearchScope getUseScope() { return ResolveScopeManager.getElementUseScope(this); }
@Override @Nonnull public GlobalSearchScope getResolveScope() { return ResolveScopeManager.getElementResolveScope(this); }