本文整理汇总了Java中com.intellij.util.ArrayUtil.reverseArray方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayUtil.reverseArray方法的具体用法?Java ArrayUtil.reverseArray怎么用?Java ArrayUtil.reverseArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil.reverseArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sortJars
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Nullable
private JarInfo[] sortJars() {
final DFSTBuilder<JarInfo> builder = new DFSTBuilder<JarInfo>(GraphGenerator.create(CachingSemiGraph.create(new JarsGraph())));
if (!builder.isAcyclic()) {
final Pair<JarInfo, JarInfo> dependency = builder.getCircularDependency();
String message = "Cannot build: circular dependency found between '" + dependency.getFirst().getPresentableDestination() +
"' and '" + dependency.getSecond().getPresentableDestination() + "'";
myContext.processMessage(new CompilerMessage(IncArtifactBuilder.BUILDER_NAME, BuildMessage.Kind.ERROR, message));
return null;
}
JarInfo[] jars = myJarsToBuild.toArray(new JarInfo[myJarsToBuild.size()]);
Arrays.sort(jars, builder.comparator());
jars = ArrayUtil.reverseArray(jars);
return jars;
}
示例2: computeAllNames
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@NotNull
private static String[] computeAllNames(@NotNull Category category) {
final List<String> result = new ArrayList<String>();
Category c = category;
while (c != null) {
final String name = c.getName();
if (name == null) {
return ArrayUtil.EMPTY_STRING_ARRAY;
}
result.add(name);
c = c.getParent();
}
return ArrayUtil.reverseArray(ArrayUtil.toStringArray(result));
}
示例3: actionPerformed
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
FeatureUsageTracker.getInstance().triggerFeatureUsed("find.recent.search");
String[] recent = myShowSearchHistory ? FindSettings.getInstance().getRecentFindStrings()
: FindSettings.getInstance().getRecentReplaceStrings();
String title = "Recent " + (myShowSearchHistory ? "Searches" : "Replaces");
JBList historyList = new JBList((Object[])ArrayUtil.reverseArray(recent));
Utils.showCompletionPopup(myTextArea, historyList, title, myTextArea, null);
}
示例4: preprocessRowIndexes
import com.intellij.util.ArrayUtil; //导入方法依赖的package包/类
public int[] preprocessRowIndexes(int[] selection) {
int[] copy = selection.clone();
Arrays.sort(copy);
return this == UP ? copy : ArrayUtil.reverseArray(copy);
}