本文整理汇总了Java中com.intellij.psi.impl.search.ThrowSearchUtil类的典型用法代码示例。如果您正苦于以下问题:Java ThrowSearchUtil类的具体用法?Java ThrowSearchUtil怎么用?Java ThrowSearchUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ThrowSearchUtil类属于com.intellij.psi.impl.search包,在下文中一共展示了ThrowSearchUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getHelpId
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
public String getHelpId(@NotNull PsiElement element) {
if (element instanceof PsiPackage) {
return HelpID.FIND_PACKAGE_USAGES;
}
if (element instanceof PsiClass) {
return HelpID.FIND_CLASS_USAGES;
}
if (element instanceof PsiMethod) {
return HelpID.FIND_METHOD_USAGES;
}
if (ThrowSearchUtil.isSearchable(element)) {
return HelpID.FIND_THROW_USAGES;
}
return com.intellij.lang.HelpID.FIND_OTHER_USAGES;
}
示例2: getFindUsagesDialog
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
@NotNull
public AbstractFindUsagesDialog getFindUsagesDialog(boolean isSingleFile, boolean toShowInNewTab, boolean mustOpenInNewTab) {
PsiElement element = getPsiElement();
if (element instanceof PsiPackage) {
return new FindPackageUsagesDialog(element, getProject(), myFactory.getFindPackageOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if (element instanceof PsiClass) {
return new FindClassUsagesDialog(element, getProject(), myFactory.getFindClassOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if (element instanceof PsiMethod) {
return new FindMethodUsagesDialog(element, getProject(), myFactory.getFindMethodOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if (element instanceof PsiVariable) {
return new FindVariableUsagesDialog(element, getProject(), myFactory.getFindVariableOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if (ThrowSearchUtil.isSearchable(element)) {
return new FindThrowUsagesDialog(element, getProject(), myFactory.getFindThrowOptions(), toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
return super.getFindUsagesDialog(isSingleFile, toShowInNewTab, mustOpenInNewTab);
}
示例3: getFindUsagesOptions
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
@NotNull
public FindUsagesOptions getFindUsagesOptions(@Nullable final DataContext dataContext) {
PsiElement element = getPsiElement();
if (element instanceof PsiPackage) {
return myFactory.getFindPackageOptions();
}
if (element instanceof PsiClass) {
return myFactory.getFindClassOptions();
}
if (element instanceof PsiMethod) {
return myFactory.getFindMethodOptions();
}
if (element instanceof PsiVariable) {
return myFactory.getFindVariableOptions();
}
if (ThrowSearchUtil.isSearchable(element)) {
return myFactory.getFindThrowOptions();
}
return super.getFindUsagesOptions(dataContext);
}
示例4: getHelpId
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
public String getHelpId(@NotNull PsiElement element) {
if (element instanceof PsiPackage) {
return HelpID.FIND_PACKAGE_USAGES;
}
if (element instanceof PsiClass) {
return HelpID.FIND_CLASS_USAGES;
}
if (element instanceof PsiMethod) {
return HelpID.FIND_METHOD_USAGES;
}
if (ThrowSearchUtil.isSearchable(element)) {
return HelpID.FIND_THROW_USAGES;
}
return HelpID.FIND_OTHER_USAGES;
}
示例5: canFindUsagesFor
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
public boolean canFindUsagesFor(@NotNull PsiElement element)
{
if(element instanceof PsiDirectory)
{
PsiPackage psiPackage = JavaDirectoryService.getInstance().getPackage((PsiDirectory) element);
return psiPackage != null && psiPackage.getQualifiedName().length() != 0;
}
return element instanceof PsiClass ||
element instanceof PsiVariable ||
element instanceof PsiMethod ||
element instanceof PsiPackage ||
element instanceof PsiLabeledStatement ||
ThrowSearchUtil.isSearchable(element) ||
element instanceof PsiMetaOwner && ((PsiMetaOwner) element).getMetaData() != null;
}
示例6: getHelpId
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
public String getHelpId(@NotNull PsiElement element)
{
if(element instanceof PsiPackage)
{
return HelpID.FIND_PACKAGE_USAGES;
}
if(element instanceof PsiClass)
{
return HelpID.FIND_CLASS_USAGES;
}
if(element instanceof PsiMethod)
{
return HelpID.FIND_METHOD_USAGES;
}
if(ThrowSearchUtil.isSearchable(element))
{
return HelpID.FIND_THROW_USAGES;
}
return HelpID.FIND_OTHER_USAGES;
}
示例7: canFindUsagesFor
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
public boolean canFindUsagesFor(@NotNull PsiElement element) {
if (element instanceof PsiDirectory) {
PsiPackage psiPackage = JavaDirectoryService.getInstance().getPackage((PsiDirectory)element);
return psiPackage != null && psiPackage.getQualifiedName().length() != 0;
}
return element instanceof PsiClass ||
element instanceof PsiVariable ||
element instanceof PsiMethod ||
element instanceof PsiPackage ||
element instanceof PsiLabeledStatement ||
ThrowSearchUtil.isSearchable(element) ||
element instanceof PsiMetaOwner && ((PsiMetaOwner)element).getMetaData() != null;
}
示例8: update
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
protected void update(){
if (!myHasFindWhatPanel){
setOKActionEnabled(true);
}
else{
getFindUsagesOptions().setRoot((ThrowSearchUtil.Root)myCbExns.getSelectedItem());
final boolean hasSelected = isSelected(myCbUsages);
setOKActionEnabled(hasSelected);
}
}
示例9: update
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
protected void update(){
if (!myHasFindWhatPanel){
setOKActionEnabled(true);
}
else{
myFindUsagesOptions.putUserData(ThrowSearchUtil.THROW_SEARCH_ROOT_KEY, (ThrowSearchUtil.Root)myCbExns.getSelectedItem());
final boolean hasSelected = isSelected(myCbUsages);
setOKActionEnabled(hasSelected);
}
}
示例10: getFindUsagesDialog
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
@NotNull
public AbstractFindUsagesDialog getFindUsagesDialog(boolean isSingleFile,
boolean toShowInNewTab,
boolean mustOpenInNewTab)
{
PsiElement element = getPsiElement();
if(element instanceof PsiPackage)
{
return new FindPackageUsagesDialog(element, getProject(), myFactory.getFindPackageOptions(),
toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if(element instanceof PsiClass)
{
return new FindClassUsagesDialog(element, getProject(), myFactory.getFindClassOptions(), toShowInNewTab,
mustOpenInNewTab, isSingleFile, this);
}
if(element instanceof PsiMethod)
{
return new FindMethodUsagesDialog(element, getProject(), myFactory.getFindMethodOptions(), toShowInNewTab,
mustOpenInNewTab, isSingleFile, this);
}
if(element instanceof PsiVariable)
{
return new FindVariableUsagesDialog(element, getProject(), myFactory.getFindVariableOptions(),
toShowInNewTab, mustOpenInNewTab, isSingleFile, this);
}
if(ThrowSearchUtil.isSearchable(element))
{
return new FindThrowUsagesDialog(element, getProject(), myFactory.getFindThrowOptions(), toShowInNewTab,
mustOpenInNewTab, isSingleFile, this);
}
return super.getFindUsagesDialog(isSingleFile, toShowInNewTab, mustOpenInNewTab);
}
示例11: getFindUsagesOptions
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
@NotNull
public FindUsagesOptions getFindUsagesOptions(@Nullable final DataContext dataContext)
{
PsiElement element = getPsiElement();
if(element instanceof PsiPackage)
{
return myFactory.getFindPackageOptions();
}
if(element instanceof PsiClass)
{
return myFactory.getFindClassOptions();
}
if(element instanceof PsiMethod)
{
return myFactory.getFindMethodOptions();
}
if(element instanceof PsiVariable)
{
return myFactory.getFindVariableOptions();
}
if(ThrowSearchUtil.isSearchable(element))
{
return myFactory.getFindThrowOptions();
}
return super.getFindUsagesOptions(dataContext);
}
示例12: init
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
protected void init()
{
// Kludge: myRoots used in super.init, which caller from constructor
myRoots = ThrowSearchUtil.getSearchRoots(myPsiElement);
super.init();
}
示例13: update
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
@Override
protected void update()
{
if(!myHasFindWhatPanel)
{
setOKActionEnabled(true);
}
else
{
getFindUsagesOptions().setRoot((ThrowSearchUtil.Root) myCbExns.getSelectedItem());
final boolean hasSelected = isSelected(myCbUsages);
setOKActionEnabled(hasSelected);
}
}
示例14: getRoot
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
public ThrowSearchUtil.Root getRoot() {
return root;
}
示例15: setRoot
import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
public void setRoot(ThrowSearchUtil.Root root) {
this.root = root;
}