mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-23 16:20:55 +07:00
Before when removing more than one element, nextLeaf was invalid as well. The invalidation check below did not work as parent might still exist (element might be relinked to dummy file) Fixes IDEA-187531 "Add on demand static import" with intervening comment and an empty line breaks code
59 lines
1.4 KiB
Java
59 lines
1.4 KiB
Java
class A {
|
|
public static void main(String[] args) {
|
|
StatDescriptor[] allStatMembers = new StatDescriptor[] {};
|
|
WSStats[] allStats = new WSStats[] {};
|
|
|
|
StringBuffer sb = new StringBuffer();
|
|
sb.append("All stat members found:\n");
|
|
for (int i = 0; i < allStatMembers.length; i++) {
|
|
StatDescriptor statMember = allStatMembers[i];
|
|
|
|
|
|
newMethod(allStats[i], sb, statMember);
|
|
|
|
}
|
|
}
|
|
|
|
private static void newMethod(WSStats allStat, StringBuffer sb, StatDescriptor statMember) {
|
|
sb.append(statMember.toString());
|
|
|
|
sb.append(": [");
|
|
|
|
WSStatistic[] statistics = allStat.getStatistics();
|
|
for (int j = 0; j < statistics.length; j++) {
|
|
WSStatistic statistic = statistics[j];
|
|
sb.append(statistic.getId()).
|
|
append('=').
|
|
append(statistic.getName());
|
|
if (j < statistics.length - 1) {
|
|
sb.append(", ");
|
|
}
|
|
}
|
|
|
|
sb.append("]\n");
|
|
}
|
|
|
|
private class StatDescriptor {
|
|
}
|
|
|
|
private class WSStatistic {
|
|
private Object id;
|
|
private String name;
|
|
|
|
public Object getId() {
|
|
return id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
}
|
|
|
|
private class WSStats {
|
|
private WSStatistic[] statistics;
|
|
|
|
public WSStatistic[] getStatistics() {
|
|
return statistics;
|
|
}
|
|
}
|
|
} |