當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。