public void updateType() {
if (this.model.getSize() == 0) {
this.typeLabel.setText("");
}
EditorRow er = null;
@SuppressWarnings("unchecked")
Wrapper<EditorRow> wrapper = (Wrapper) list.getSelectedValue();
if (wrapper != null) {
er = wrapper.getContent();
}
if(er == null) {
this.typeLabel.setText("");
} else if (er instanceof PackageDefRow) {
this.typeLabel.setText("Package Definition");
} else if (er instanceof ClassDefRow) {
this.typeLabel.setText("Class Definition");
} else if (er instanceof FieldDefRow) {
this.typeLabel.setText("Field Definition");
} else if (er instanceof MethodDefRow) {
this.typeLabel.setText("Method Definition");
} else {
throw new AssertionError("Invalid object type: " + er.getClass());
}
}