Skip to content
Snippets Groups Projects
Commit b3a95b55 authored by Alberto Debiasi's avatar Alberto Debiasi
Browse files

small changes


Change-Id: I0969d933e8a5f0ce6f5d6bbe66d44daa3b12d34d
Signed-off-by: default avatarAlberto Debiasi <adebiasi@fbk.eu>
parent 4bd15340
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ public class CustomContractEditorTab extends ContractEditorTab {
if (selectedUmlElement instanceof Property) {
if (entityUtil.isComponentInstance((Property) selectedUmlElement)) {
Class umlClass = entityUtil.getUmlType((Property) selectedUmlElement);
Element umlClass = entityUtil.getUmlType((Property) selectedUmlElement);
if (!contractEntityUtil.isContract(umlClass)) {
return umlClass;
......@@ -157,7 +157,7 @@ public class CustomContractEditorTab extends ContractEditorTab {
}
if (entityUtil.isComponentInstance((Property) selectedUmlElement)) {
Class classType = entityUtil.getUmlType((Property) selectedUmlElement);
Element classType = entityUtil.getUmlType((Property) selectedUmlElement);
if (contractEntityUtil.isContract(classType)) {
return classType;
}
......
......@@ -69,7 +69,7 @@ public class CustomContractEditorView extends ContractEditorView {
if (selectedUmlElement instanceof Property) {
if (entityUtil.isComponentInstance((Property) selectedUmlElement)) {
Class classType = entityUtil.getUmlType((Property) selectedUmlElement);
Element classType = entityUtil.getUmlType((Property) selectedUmlElement);
if (!contractEntityUtil.isContract(classType)) {
return classType;
}
......@@ -95,7 +95,7 @@ public class CustomContractEditorView extends ContractEditorView {
}
if (entityUtil.isComponentInstance((Property) selectedUmlElement)) {
Class classType = entityUtil.getUmlType((Property) selectedUmlElement);
Element classType = entityUtil.getUmlType((Property) selectedUmlElement);
if (contractEntityUtil.isContract(classType)) {
return classType;
}
......
......@@ -35,7 +35,7 @@ public class CHESSComponentNode extends ComponentNode {
public void createChildren(Object associatedObject, List<TreeNode> children) {
for (Property umlProperty : ((Class) entityUtil.getUmlType((Property) associatedObject)).getAttributes()) {
if (contractEntityUtil.isContractProperty(umlProperty)) {
children.add(new ContractNode(this, entityUtil.getUmlType(umlProperty).getName()));
children.add(new ContractNode(this, ((Class)entityUtil.getUmlType(umlProperty)).getName()));
} else if (entityUtil.isComponentInstance(umlProperty)) {
children.add(new CHESSComponentNode(this, umlProperty));
}
......@@ -45,7 +45,7 @@ public class CHESSComponentNode extends ComponentNode {
@Override
public String getName(Object associatedObject) {
String typeName = entityUtil.getUmlType((Property) associatedObject).getName();
String typeName = ((Class)entityUtil.getUmlType((Property) associatedObject)).getName();
String propertyName = ((Property) associatedObject).getName();
return propertyName + ":" + typeName;
}
......
......@@ -40,7 +40,7 @@ public class CHESSSystemNode extends SystemNode {
for (Property umlProperty : ((Class) system).getAttributes()) {
if (contractEntityUtil.isContractProperty(umlProperty)) {
children.add(new ContractNode(this, entityUtil.getUmlType(umlProperty).getName()));
children.add(new ContractNode(this, ((Class)entityUtil.getUmlType(umlProperty)).getName()));
} else if (entityUtil.isComponentInstance(umlProperty)) {
children.add(new CHESSComponentNode(this, umlProperty));
}
......
......@@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
org.eclipse.papyrus.views.properties;bundle-version="2.0.0",
org.eclipse.papyrus.customization.properties;bundle-version="2.0.0"
org.eclipse.papyrus.customization.properties;bundle-version="2.0.0",
org.eclipse.papyrus.uml.tools
Bundle-ActivationPolicy: lazy
Import-Package: org.apache.log4j;version="1.2.15",
org.polarsys.chess.core.util.uml
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