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


Java InternalIterator类代码示例

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


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

示例1: reset

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
@Override
public void reset(@NotNull NodeRendererSettings settings) {
  myRendererChooser.removeAllElements();
  final RendererConfiguration rendererConfiguration = settings.getCustomRenderers();
  final ArrayList<NodeRenderer> elementsToSelect = new ArrayList<NodeRenderer>(1);
  rendererConfiguration.iterateRenderers(new InternalIterator<NodeRenderer>() {
    @Override
    public boolean visit(final NodeRenderer renderer) {
      final NodeRenderer clonedRenderer = (NodeRenderer)renderer.clone();
      myRendererChooser.addElement(clonedRenderer, clonedRenderer.isEnabled());
      if (elementsToSelect.size() == 0) {
        elementsToSelect.add(clonedRenderer);
      }
      return true;
    }
  });
  myRendererChooser.selectElements(elementsToSelect);
  updateCurrentRenderer(elementsToSelect);
  myRendererDataConfigurable.reset();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:UserRenderersConfigurable.java

示例2: getAllRenderers

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
public List<NodeRenderer> getAllRenderers() {
  // the order is important as the renderers are applied according to it
  final List<NodeRenderer> allRenderers = new ArrayList<NodeRenderer>();

  // user defined renderers must come first
  myCustomRenderers.iterateRenderers(new InternalIterator<NodeRenderer>() {
    public boolean visit(final NodeRenderer renderer) {
      allRenderers.add(renderer);
      return true;
    }
  });

  // plugins registered renderers come after that
  allRenderers.addAll(myPluginRenderers);
  Collections.addAll(allRenderers, NodeRenderer.EP_NAME.getExtensions());

  // now all predefined stuff
  allRenderers.add(myHexRenderer);
  allRenderers.add(myPrimitiveRenderer);
  Collections.addAll(allRenderers, myAlternateCollectionRenderers);
  allRenderers.add(myToStringRenderer);
  allRenderers.add(myArrayRenderer);
  allRenderers.add(myClassRenderer);
  return allRenderers;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:NodeRendererSettings.java

示例3: reset

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
public void reset() {
  myRendererChooser.removeAllElements();
  final RendererConfiguration rendererConfiguration = NodeRendererSettings.getInstance().getCustomRenderers();
  final ArrayList<NodeRenderer> elementsToSelect = new ArrayList<NodeRenderer>(1);
  rendererConfiguration.iterateRenderers(new InternalIterator<NodeRenderer>() {
    public boolean visit(final NodeRenderer renderer) {
      final NodeRenderer clonedRenderer = (NodeRenderer)renderer.clone();
      myRendererChooser.addElement(clonedRenderer, clonedRenderer.isEnabled());
      if (elementsToSelect.size() == 0) {
        elementsToSelect.add(clonedRenderer);
      }
      return true;
    }
  });
  myRendererChooser.selectElements(elementsToSelect);
  updateCurrentRenderer(elementsToSelect);
  myRendererDataConfigurable.reset();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:UserRenderersConfigurable.java

示例4: getAllRenderers

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
public List<NodeRenderer> getAllRenderers() {
  // the order is important as the renderers are applied according to it
  final List<NodeRenderer> allRenderers = new ArrayList<NodeRenderer>();
  allRenderers.add(myHexRenderer);
  allRenderers.add(myPrimitiveRenderer);
  allRenderers.addAll(myPluginRenderers);
  myCustomRenderers.iterateRenderers(new InternalIterator<NodeRenderer>() {
    public boolean visit(final NodeRenderer renderer) {
      allRenderers.add(renderer);
      return true;
    }
  });
  for (NodeRenderer myAlternateCollectionRenderer : myAlternateCollectionRenderers) {
    allRenderers.add(myAlternateCollectionRenderer);
  }
  allRenderers.add(myColorRenderer);
  allRenderers.add(myToStringRenderer);
  allRenderers.add(myArrayRenderer);
  allRenderers.add(myClassRenderer);
  return allRenderers;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:NodeRendererSettings.java

示例5: reset

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
@Override
public void reset(@NotNull NodeRendererSettings settings)
{
	myRendererChooser.removeAllElements();
	final RendererConfiguration rendererConfiguration = settings.getCustomRenderers();
	final ArrayList<NodeRenderer> elementsToSelect = new ArrayList<NodeRenderer>(1);
	rendererConfiguration.iterateRenderers(new InternalIterator<NodeRenderer>()
	{
		@Override
		public boolean visit(final NodeRenderer renderer)
		{
			final NodeRenderer clonedRenderer = (NodeRenderer) renderer.clone();
			myRendererChooser.addElement(clonedRenderer, clonedRenderer.isEnabled());
			if(elementsToSelect.size() == 0)
			{
				elementsToSelect.add(clonedRenderer);
			}
			return true;
		}
	});
	myRendererChooser.selectElements(elementsToSelect);
	updateCurrentRenderer(elementsToSelect);
	myRendererDataConfigurable.reset();
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:25,代码来源:UserRenderersConfigurable.java

示例6: iterateRenderers

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
public void iterateRenderers(InternalIterator<NodeRenderer> iterator) {
  for (final NodeRenderer renderer : myRepresentationNodes) {
    final boolean shouldContinue = iterator.visit(renderer);
    if (!shouldContinue) {
      break;
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:RendererConfiguration.java

示例7: iterateRenderers

import com.intellij.util.containers.InternalIterator; //导入依赖的package包/类
public void iterateRenderers(InternalIterator<NodeRenderer> iterator)
{
	for(final NodeRenderer renderer : myRepresentationNodes)
	{
		final boolean shouldContinue = iterator.visit(renderer);
		if(!shouldContinue)
		{
			break;
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:12,代码来源:RendererConfiguration.java


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