UI: bug 558432 Display deprecated message in Module Explorer

Deprecated methods will now show the javadoc in the Module Explorer when
hovering over them. Also, the deprecated warning is added to the content
of the help documentation.

Change-Id: I14d0d04554f44bbab0f05ebd77b54fe8b509f875
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
diff --git a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/help/hovers/MethodHelp.java b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/help/hovers/MethodHelp.java
index d659c69..d9a92a4 100644
--- a/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/help/hovers/MethodHelp.java
+++ b/plugins/org.eclipse.ease.ui/src/org/eclipse/ease/ui/help/hovers/MethodHelp.java
@@ -72,7 +72,7 @@
 
 		// extract method description node
 		for (final IMemento node : helpContent.getChildren()) {
-			if ((fMethod.getName().equals(node.getString("data-method"))) && ("command".equals(node.getString("class")))) {
+			if ((fMethod.getName().equals(node.getString("data-method"))) && (String.valueOf(node.getString("class")).startsWith("command"))) {
 				IHoverHelp.updateRelativeLinks(node, fHelpLocation);
 				fHelpContent = node;
 				break;
@@ -107,6 +107,15 @@
 		return null;
 	}
 
+	private String getWarning() {
+		for (final IMemento contentNode : fHelpContent.getChildren()) {
+			if ("warning".equals(contentNode.getString("class")))
+				return IHoverHelp.getNodeContent(contentNode);
+		}
+
+		return null;
+	}
+
 	public List<IHoverHelp> getParameterDescriptions() {
 
 		final List<IHoverHelp> parameters = new ArrayList<>();
@@ -223,6 +232,14 @@
 			help.append("</p>");
 		}
 
+		// method warning
+		final String warning = getWarning();
+		if (warning != null) {
+			help.append("<p>");
+			help.append(warning);
+			help.append("</p>");
+		}
+
 		// method parameters
 		final List<IHoverHelp> parameterDescriptions = getParameterDescriptions();
 		if (!parameterDescriptions.isEmpty()) {