From 1b98da4de5934355cc90623ef8d4a58a2198ccaa Mon Sep 17 00:00:00 2001
From: Simon Barner <barner@fortiss.org>
Date: Fri, 5 Sep 2014 08:01:25 +0000
Subject: [PATCH] - Allow empty name prefix for multi-instance annotations -
 Fix typo in GUI label - Formatting of comments refs 1841

---
 .../annotation/view/GenericAnnotationView.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/GenericAnnotationView.java b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/GenericAnnotationView.java
index 1b8c50517..9be2f037b 100644
--- a/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/GenericAnnotationView.java
+++ b/org.fortiss.tooling.base.ui/trunk/src/org/fortiss/tooling/base/ui/annotation/view/GenericAnnotationView.java
@@ -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;
 	}
-- 
GitLab