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


Java UsageViewPresentation.setOpenInNewTab方法代码示例

本文整理汇总了Java中com.intellij.usages.UsageViewPresentation.setOpenInNewTab方法的典型用法代码示例。如果您正苦于以下问题:Java UsageViewPresentation.setOpenInNewTab方法的具体用法?Java UsageViewPresentation.setOpenInNewTab怎么用?Java UsageViewPresentation.setOpenInNewTab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.usages.UsageViewPresentation的用法示例。


在下文中一共展示了UsageViewPresentation.setOpenInNewTab方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupViewPresentation

import com.intellij.usages.UsageViewPresentation; //导入方法依赖的package包/类
@NotNull
public static UsageViewPresentation setupViewPresentation(final boolean toOpenInNewTab, @NotNull final FindModel findModelCopy) {
  final UsageViewPresentation presentation = new UsageViewPresentation();

  final String scope = getTitleForScope(findModelCopy);
  final String stringToFind = findModelCopy.getStringToFind();
  presentation.setScopeText(scope);
  if (stringToFind.isEmpty()) {
    presentation.setTabText("Files");
    presentation.setToolwindowTitle(BundleBase.format("Files in ''{0}''", scope));
    presentation.setUsagesString("files");
  }
  else {
    presentation.setTabText(FindBundle.message("find.usage.view.tab.text", stringToFind));
    presentation.setToolwindowTitle(FindBundle.message("find.usage.view.toolwindow.title", stringToFind, scope));
    presentation.setUsagesString(FindBundle.message("find.usage.view.usages.text", stringToFind));
  }
  presentation.setOpenInNewTab(toOpenInNewTab);
  presentation.setCodeUsages(false);

  return presentation;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:FindInProjectUtil.java

示例2: setupViewPresentation

import com.intellij.usages.UsageViewPresentation; //导入方法依赖的package包/类
@NotNull
public static UsageViewPresentation setupViewPresentation(final boolean toOpenInNewTab, @NotNull FindModel findModel) {
  final UsageViewPresentation presentation = new UsageViewPresentation();

  final String scope = getTitleForScope(findModel);
  final String stringToFind = findModel.getStringToFind();
  presentation.setScopeText(scope);
  if (stringToFind.isEmpty()) {
    presentation.setTabText("Files");
    presentation.setToolwindowTitle(BundleBase.format("Files in {0}", scope));
    presentation.setUsagesString("files");
  }
  else {
    FindModel.SearchContext searchContext = findModel.getSearchContext();
    String contextText = "";
    if (searchContext != FindModel.SearchContext.ANY) {
      contextText = FindBundle.message("find.context.presentation.scope.label", FindDialog.getPresentableName(searchContext));
    }
    presentation.setTabText(FindBundle.message("find.usage.view.tab.text", stringToFind, contextText));
    presentation.setToolwindowTitle(FindBundle.message("find.usage.view.toolwindow.title", stringToFind, scope, contextText));
    presentation.setUsagesString(FindBundle.message("find.usage.view.usages.text", stringToFind));
    presentation.setUsagesWord(FindBundle.message("occurrence"));
    presentation.setCodeUsagesString(FindBundle.message("found.occurrences"));
    presentation.setContextText(contextText);
  }
  presentation.setOpenInNewTab(toOpenInNewTab);
  presentation.setCodeUsages(false);
  presentation.setUsageTypeFilteringAvailable(true);

  return presentation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:FindInProjectUtil.java

示例3: setupViewPresentation

import com.intellij.usages.UsageViewPresentation; //导入方法依赖的package包/类
@Nonnull
public static UsageViewPresentation setupViewPresentation(final boolean toOpenInNewTab, @Nonnull FindModel findModel) {
  final UsageViewPresentation presentation = new UsageViewPresentation();

  final String scope = getTitleForScope(findModel);
  final String stringToFind = findModel.getStringToFind();
  presentation.setScopeText(scope);
  if (stringToFind.isEmpty()) {
    presentation.setTabText("Files");
    presentation.setToolwindowTitle(BundleBase.format("Files in {0}", scope));
    presentation.setUsagesString("files");
  }
  else {
    FindModel.SearchContext searchContext = findModel.getSearchContext();
    String contextText = "";
    if (searchContext != FindModel.SearchContext.ANY) {
      contextText = FindBundle.message("find.context.presentation.scope.label", FindDialog.getPresentableName(searchContext));
    }
    presentation.setTabText(FindBundle.message("find.usage.view.tab.text", stringToFind, contextText));
    presentation.setToolwindowTitle(FindBundle.message("find.usage.view.toolwindow.title", stringToFind, scope, contextText));
    presentation.setUsagesString(FindBundle.message("find.usage.view.usages.text", stringToFind));
    presentation.setUsagesWord(FindBundle.message("occurrence"));
    presentation.setCodeUsagesString(FindBundle.message("found.occurrences"));
    presentation.setContextText(contextText);
  }
  presentation.setOpenInNewTab(toOpenInNewTab);
  presentation.setCodeUsages(false);
  presentation.setUsageTypeFilteringAvailable(true);

  return presentation;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:32,代码来源:FindInProjectUtil.java


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