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


Java IntArrayList.toArray方法代码示例

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


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

示例1: storeState

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
protected void storeState() {
  if (myRootComponent != null && myExpandedState == null && mySelectionState == null) {
    myExpandedState = new int[myExpandedComponents == null ? 0 : myExpandedComponents.size()][];
    for (int i = 0; i < myExpandedState.length; i++) {
      IntArrayList path = new IntArrayList();
      componentToPath((RadComponent)myExpandedComponents.get(i), path);
      myExpandedState[i] = path.toArray();
    }

    mySelectionState = getSelectionState();

    myExpandedComponents = null;

    InputTool tool = myToolProvider.getActiveTool();
    if (!(tool instanceof MarqueeTracker) &&
        !(tool instanceof CreationTool) &&
        !(tool instanceof PasteTool)) {
      myToolProvider.loadDefaultTool();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:DesignerEditorPanel.java

示例2: storeState

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
protected void storeState() {
    if (myRootComponent != null && myExpandedState == null && mySelectionState == null) {
        myExpandedState = new int[myExpandedComponents == null ? 0 : myExpandedComponents.size()][];
        for (int i = 0; i < myExpandedState.length; i++) {
            IntArrayList path = new IntArrayList();
            componentToPath((RadComponent) myExpandedComponents.get(i), path);
            myExpandedState[i] = path.toArray();
        }

        mySelectionState = getSelectionState();

        myExpandedComponents = null;

        InputTool tool = myToolProvider.getActiveTool();
        if (!(tool instanceof MarqueeTracker) &&
                !(tool instanceof CreationTool) &&
                !(tool instanceof PasteTool)) {
            myToolProvider.loadDefaultTool();
        }
    }
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:22,代码来源:CordovaDesignerEditorPanel.java

示例3: InternedPath

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
/**
 * @param path assuming system-independent path with forward slashes
 */
protected InternedPath(String path) {
  final IntArrayList list = new IntArrayList();
  final StringTokenizer tokenizer = new StringTokenizer(path, "/", false);
  while(tokenizer.hasMoreTokens()) {
    final String element = tokenizer.nextToken();
    list.add(FileNameCache.storeName(element));
  }
  myPath = list.toArray();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:BuildManager.java

示例4: checkUsages

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
public static void checkUsages(final SliceUsage usage, final TIntObjectHashMap<IntArrayList> flownOffsets) {
  final List<SliceUsage> children = new ArrayList<SliceUsage>();
  boolean b = ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
    @Override
    public void run() {
      usage.processChildren(new CommonProcessors.CollectProcessor<SliceUsage>(children));
    }
  }, "Expanding", true, usage.getElement().getProject());
  assertTrue(b);
  int startOffset = usage.getElement().getTextOffset();
  IntArrayList list = flownOffsets.get(startOffset);
  int[] offsets = list == null ? new int[0] : list.toArray();
  Arrays.sort(offsets);

  int size = offsets.length;
  assertEquals(message(startOffset, usage), size, children.size());
  Collections.sort(children, new Comparator<SliceUsage>() {
    @Override
    public int compare(SliceUsage o1, SliceUsage o2) {
      return o1.compareTo(o2);
    }
  });

  for (int i = 0; i < children.size(); i++) {
    SliceUsage child = children.get(i);
    int offset = offsets[i];
    assertEquals(message(offset, child), offset, child.getUsageInfo().getElement().getTextOffset());

    checkUsages(child, flownOffsets);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:SliceTestUtil.java

示例5: getSelectionState

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
protected static int[][] getSelectionState(List<RadComponent> selection) {
  int[][] selectionState = new int[selection.size()][];

  for (int i = 0; i < selectionState.length; i++) {
    IntArrayList path = new IntArrayList();
    componentToPath(selection.get(i), path);
    selectionState[i] = path.toArray();
  }

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

示例6: checkUsages

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
static void checkUsages(final SliceUsage usage, final boolean dataFlowToThis, final TIntObjectHashMap<IntArrayList> flownOffsets) {
  final List<SliceUsage> children = new ArrayList<SliceUsage>();
  boolean b = ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
    @Override
    public void run() {
      usage.processChildren(new CommonProcessors.CollectProcessor<SliceUsage>(children));
    }
  }, "Expanding", true, usage.getElement().getProject());
  assertTrue(b);
  int startOffset = usage.getElement().getTextOffset();
  IntArrayList list = flownOffsets.get(startOffset);
  int[] offsets = list == null ? new int[0] : list.toArray();
  Arrays.sort(offsets);

  int size = list == null ? 0 : list.size();
  assertEquals(message(startOffset, usage), size, children.size());
  Collections.sort(children, new Comparator<SliceUsage>() {
    @Override
    public int compare(SliceUsage o1, SliceUsage o2) {
      return o1.compareTo(o2);
    }
  });

  for (int i = 0; i < children.size(); i++) {
    SliceUsage child = children.get(i);
    int offset = offsets[i];
    assertEquals(message(offset, child), offset, child.getUsageInfo().getElement().getTextOffset());

    checkUsages(child, dataFlowToThis, flownOffsets);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:32,代码来源:SliceBackwardTest.java

示例7: getSelectionState

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
private int[][] getSelectionState() {
  List<RadComponent> selection = mySurfaceArea.getSelection();
  int[][] selectionState = new int[selection.size()][];

  for (int i = 0; i < selectionState.length; i++) {
    IntArrayList path = new IntArrayList();
    componentToPath(selection.get(i), path);
    selectionState[i] = path.toArray();
  }

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

示例8: getSelectionState

import com.intellij.util.containers.IntArrayList; //导入方法依赖的package包/类
protected static int[][] getSelectionState(java.util.List<RadComponent> selection) {
    int[][] selectionState = new int[selection.size()][];

    for (int i = 0; i < selectionState.length; i++) {
        IntArrayList path = new IntArrayList();
        componentToPath(selection.get(i), path);
        selectionState[i] = path.toArray();
    }

    return selectionState;
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:12,代码来源:CordovaDesignerEditorPanel.java


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