当前位置: 首页>>代码示例>>Java>>正文


Java ThrowSearchUtil类代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:JavaFindUsagesProvider.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:JavaFindUsagesHandler.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:JavaFindUsagesHandler.java

示例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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:JavaFindUsagesProvider.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:18,代码来源:JavaFindUsagesProvider.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:22,代码来源:JavaFindUsagesProvider.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:JavaFindUsagesProvider.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:FindThrowUsagesDialog.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:FindThrowUsagesDialog.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:35,代码来源:JavaFindUsagesHandler.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:28,代码来源:JavaFindUsagesHandler.java

示例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();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:8,代码来源:FindThrowUsagesDialog.java

示例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);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:15,代码来源:FindThrowUsagesDialog.java

示例14: getRoot

import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
public ThrowSearchUtil.Root getRoot() {
  return root;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:JavaThrowFindUsagesOptions.java

示例15: setRoot

import com.intellij.psi.impl.search.ThrowSearchUtil; //导入依赖的package包/类
public void setRoot(ThrowSearchUtil.Root root) {
  this.root = root;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:JavaThrowFindUsagesOptions.java


注:本文中的com.intellij.psi.impl.search.ThrowSearchUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。