From b3a95b55b1c38ebcdab932a548986882f859b641 Mon Sep 17 00:00:00 2001
From: Alberto Debiasi <adebiasi@fbk.eu>
Date: Thu, 18 Jan 2018 10:13:05 +0100
Subject: [PATCH] small changes

Change-Id: I0969d933e8a5f0ce6f5d6bbe66d44daa3b12d34d
Signed-off-by: Alberto Debiasi <adebiasi@fbk.eu>
---
 .../contracts/contractEditor/CustomContractEditorTab.java     | 4 ++--
 .../contracts/contractEditor/CustomContractEditorView.java    | 4 ++--
 .../treeElements/CHESSComponentNode.java                      | 4 ++--
 .../treeElements/CHESSSystemNode.java                         | 2 +-
 .../org.polarsys.chess.contracts.profile/META-INF/MANIFEST.MF | 3 ++-
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorTab.java b/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorTab.java
index d7f70d5af..1bde11317 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorTab.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorTab.java
@@ -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;
 				}
diff --git a/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorView.java b/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorView.java
index 339a9bbf7..44583f856 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorView.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.contractEditor/src/org/polarsys/chess/contracts/contractEditor/CustomContractEditorView.java
@@ -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;
 				}
diff --git a/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSComponentNode.java b/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSComponentNode.java
index f6aa93afc..0060200b5 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSComponentNode.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSComponentNode.java
@@ -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;
 		}
diff --git a/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSSystemNode.java b/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSSystemNode.java
index 164f8b890..8aeca4dbf 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSSystemNode.java
+++ b/plugins/contracts/org.polarsys.chess.contracts.hierarchicalContractView/src/org/polarsys/chess/contracts/hierarchicalContractView/treeElements/CHESSSystemNode.java
@@ -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));
 			}
diff --git a/plugins/contracts/org.polarsys.chess.contracts.profile/META-INF/MANIFEST.MF b/plugins/contracts/org.polarsys.chess.contracts.profile/META-INF/MANIFEST.MF
index 644851649..e9c2fa7f0 100644
--- a/plugins/contracts/org.polarsys.chess.contracts.profile/META-INF/MANIFEST.MF
+++ b/plugins/contracts/org.polarsys.chess.contracts.profile/META-INF/MANIFEST.MF
@@ -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
-- 
GitLab