本文整理汇总了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();
}
}
}
示例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();
}
}
}
示例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();
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}