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


Java ConfigurableUsageTarget类代码示例

本文整理汇总了Java中com.intellij.usages.ConfigurableUsageTarget的典型用法代码示例。如果您正苦于以下问题:Java ConfigurableUsageTarget类的具体用法?Java ConfigurableUsageTarget怎么用?Java ConfigurableUsageTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getAll

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
@NotNull
public List<ConfigurableUsageTarget> getAll() {
  synchronized (myHistory) {
    List<ConfigurableUsageTarget> result = ContainerUtil.newArrayList();
    final Set<ConfigurableUsageTarget> entries = myHistory.keySet();
    for (Iterator<ConfigurableUsageTarget> iterator = entries.iterator(); iterator.hasNext(); ) {
      final ConfigurableUsageTarget target = iterator.next();
      if (!target.isValid()) {
        iterator.remove();
      } else {
        result.add(target);
      }
    }
    return result;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:UsageHistory.java

示例2: canShowSettings

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
private boolean canShowSettings(UsageView usageView) {
    if (!(usageView instanceof UsageViewImpl)) {
        return false;
    }
    UsageViewImpl usageViewImpl = (UsageViewImpl) usageView;
    return stream(usageViewImpl.getTargets())
            .anyMatch(t -> t instanceof ConfigurableUsageTarget);
}
 
开发者ID:TNG,项目名称:jgiven-intellij-plugin,代码行数:9,代码来源:ScenarioStateFilteringRuleProvider.java

示例3: add

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
public void add(@NotNull ConfigurableUsageTarget usageTarget) {
  final String descriptiveName = usageTarget.getLongDescriptiveName();
  synchronized (myHistory) {
    final Set<Map.Entry<ConfigurableUsageTarget, String>> entries = myHistory.entrySet();
    for (Iterator<Map.Entry<ConfigurableUsageTarget, String>> iterator = entries.iterator(); iterator.hasNext(); ) {
      if (iterator.next().getValue().equals(descriptiveName)) {
        iterator.remove();
      }
    }
    myHistory.put(usageTarget, descriptiveName);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:UsageHistory.java

示例4: add

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
public void add(@Nonnull ConfigurableUsageTarget usageTarget) {
  final String descriptiveName = usageTarget.getLongDescriptiveName();
  ContainerUtil.retainAll(myHistory, new Condition<ConfigurableUsageTarget>() {
    @Override
    public boolean value(ConfigurableUsageTarget existing) {
      return !existing.getLongDescriptiveName().equals(descriptiveName);
    }
  });
  myHistory.add(usageTarget);

  // todo configure history depth limit
  if (myHistory.size() > 15) {
    myHistory.remove(0);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:16,代码来源:UsageHistory.java

示例5: getTarget

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
public ConfigurableUsageTarget getTarget() {
  return new MyUsageTarget();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:UsageViewContext.java

示例6: removeEldestEntry

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
@Override
protected boolean removeEldestEntry(Map.Entry<ConfigurableUsageTarget, String> eldest) {
  // todo configure history depth limit
  return size() > 15;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:UsageHistory.java

示例7: getAll

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
@Nonnull
public List<ConfigurableUsageTarget> getAll() {
  removeInvalidElementsFromHistory();
  return Collections.unmodifiableList(myHistory);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:UsageHistory.java

示例8: removeInvalidElementsFromHistory

import com.intellij.usages.ConfigurableUsageTarget; //导入依赖的package包/类
private void removeInvalidElementsFromHistory() {
  for (ConfigurableUsageTarget target : myHistory) {
    if (!target.isValid()) myHistory.remove(target);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:UsageHistory.java


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