Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschnekenbu2014-02-12 08:39:48 -0500
committerrschnekenbu2014-02-12 08:39:48 -0500
commit88ba83983a80755191ad08ea03cae4b86ddbcde7 (patch)
tree15bbb2db8aa5d3cbc3c3226b5a61018f56511a41
parent298dd8ed866605cdfee44594e4f3e6e4c577b4b3 (diff)
downloadorg.eclipse.papyrus-88ba83983a80755191ad08ea03cae4b86ddbcde7.tar.gz
org.eclipse.papyrus-88ba83983a80755191ad08ea03cae4b86ddbcde7.tar.xz
org.eclipse.papyrus-88ba83983a80755191ad08ea03cae4b86ddbcde7.zip
424402: [Core] Runtime deployment of the element types shall be possible
https://bugs.eclipse.org/bugs/show_bug.cgi?id=424402 - Renaming of the element when applying a stereotype is now correct. It does not use the metaclass of the element in the name - the extended types set seems to be null sometimes whereas it should not be.
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java4
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
index 7ba8db808b4..dfc3330d7a9 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
@@ -117,7 +117,7 @@ public class ExtendedElementTypeSetRegistry {
* Loads a given extended type set from a given identifier
*/
public void loadExtendedElementTypeSet(String identifier) {
- if(extendedTypeSets==null) {
+ if(getExtendedTypeSets()==null) {
return;
}
@@ -133,7 +133,7 @@ public class ExtendedElementTypeSetRegistry {
resource.load(null);
EObject content = resource.getContents().get(0);
if(content instanceof ExtendedElementTypeSet) {
- extendedTypeSets.put(identifier, (ExtendedElementTypeSet)content);
+ getExtendedTypeSets().put(identifier, (ExtendedElementTypeSet)content);
loadExtendedElementTypeSet((ExtendedElementTypeSet)content);
}
} catch (IOException e) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
index ee4b787ec99..11ad64dcaa0 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
@@ -206,7 +206,7 @@ public class ApplyStereotypeActionEditHelperAdvice extends AbstractEditHelperAdv
Object stereotypeApplication = element.applyStereotype(stereotype);
if(rename && element instanceof NamedElement) {
if(((NamedElement)element).getNamespace()!=null) {
- String newName = NamedElementUtil.getDefaultNameWithIncrement(stereotype.getName(), element, ((NamedElement)element).getNamespace().getMembers());
+ String newName = NamedElementUtil.getDefaultNameWithIncrementFromBase(stereotype.getName(), ((NamedElement)element).getNamespace().getMembers());
((NamedElement)element).setName(newName);
}
}

Back to the top