use of bndtools.editor.common.IPriority in project bndtools by bndtools.
the class BndEditor method showHighestPriorityPage.
void showHighestPriorityPage() {
int selectedPrio = Integer.MIN_VALUE;
String selected = null;
BndPreferences prefs = new BndPreferences();
if (prefs.getEditorOpenSourceTab()) {
selected = SOURCE_PAGE;
selectedPrio = 0;
} else {
for (Object pageObj : pages) {
IFormPage page = (IFormPage) pageObj;
int priority = 0;
if (page instanceof IPriority)
priority = ((IPriority) page).getPriority();
if (priority > selectedPrio) {
selected = page.getId();
selectedPrio = priority;
}
}
}
if (selected != null)
setActivePage(selected);
}
Aggregations