void () { OrderEntry[] entries = myRootModel.getOrderEntries().clone(); int i = entries.length - 1; while (i > 0 && (entries[i - 1] instanceof ModuleSourceOrderEntry || entries[i - 1] instanceof JdkOrderEntry)) { OrderEntry e = entries[i - 1]; entries[i - 1] = entries[i]; entries[i] = e; i--; } if (i < entries.length) { myRootModel.rearrangeOrderEntries(entries); } }