Skip to content
Snippets Groups Projects
Commit 1b98da4d authored by Simon Barner's avatar Simon Barner
Browse files

- Allow empty name prefix for multi-instance annotations

- Fix typo in GUI label
- Formatting of comments
refs 1841
parent ec8083b6
No related branches found
No related tags found
No related merge requests found
......@@ -513,15 +513,14 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
radioButtonComposite.setLayout(new RowLayout());
final Button filterComponentNamesButton = new Button(radioButtonComposite, SWT.RADIO);
filterComponentNamesButton.setText("Components names");
filterComponentNamesButton.setText("Component names");
filterComponentNamesButton.setSelection(true);
filterComponentNamesButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
// widgetSelected() is also fired when the selection is removed from the radio
// button,
// so check, if this is the button that just obtained the selection
// button, so check, if this is the button that just obtained the selection
if(!((Button)e.getSource()).getSelection()) {
return;
}
......@@ -539,8 +538,7 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
@Override
public void widgetSelected(SelectionEvent e) {
// widgetSelected() is also fired when the selection is removed from the radio
// button,
// so check, if this is the button that just obtained the selection
// button, so check, if this is the button that just obtained the selection
if(!((Button)e.getSource()).getSelection()) {
return;
}
......@@ -633,12 +631,14 @@ public class GenericAnnotationView extends AnnotationViewPartBase {
String specName =
columnHandle.getEntry().getSpecificationAnnotationName(
columnHandle.getAnnotatedSpecification().getClass());
if(specName == null || specName.isEmpty()) {
specName = "<Unnamed Annotation>";
}
if(columnHandle.getInstanceKey() != null) {
specName += MULTIINSTANCE_NAME_SEPARATOR + " " + columnHandle.getInstanceKey();
if(!specName.isEmpty()) {
specName += MULTIINSTANCE_NAME_SEPARATOR + " ";
}
specName += columnHandle.getInstanceKey();
} else if(specName == null || specName.isEmpty()) {
specName = "<Unnamed Annotation>";
}
return specName;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment