Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java')
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java
index 877ba90940e..59e96bb777c 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/handlers/ControlCommandHandler.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 Atos, CEA LIST, and others.
+ * Copyright (c) 2013, 2014 Atos, CEA LIST, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,7 @@
* Contributors:
* Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
* Christian W. Damus (CEA LIST) - pluggable providers of fragment-resource selection dialogs
+ * Christian W. Damus (CEA) - bug 410346
*
*****************************************************************************/
package org.eclipse.papyrus.infra.services.controlmode.handlers;
@@ -92,9 +93,9 @@ public class ControlCommandHandler extends AbstractModelExplorerHandler {
}
}
if(defaultName == null) {
- LabelHelper.getPrettyLabel(eObject);
- Pattern p = Pattern.compile("<<.*>>");
- defaultName = p.matcher(defaultName).replaceAll("");
+ defaultName = LabelHelper.getPrettyLabel(eObject);
+ Pattern p = Pattern.compile("<<.*?>>|<.*?>");
+ defaultName = p.matcher(defaultName).replaceAll("").trim();
}
StringBuilder b = new StringBuilder();
for(Character c : defaultName.toCharArray()) {

Back to the top