diff --git a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar index be77cbabac36c423e26af3534303762c2d940bef..3df59e0e658e1a8ebc17f2211ec41a0c8dc4c55e 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar and b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java index d25d44a7fc9222827b85f03c18aa59d072c09dbc..6b82b3d06aa0a28341df6479a37bd3a014623bee 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBean.java @@ -424,6 +424,30 @@ public final class CurrentAnalysisEditorBean { } } + public String getDescription(final EObject component, final String propertyName) { + try { + final String className; + if (component instanceof MIPlugin) { + className = ((MIPlugin) component).getClassname(); + } else { + className = ((MIRepository) component).getClassname(); + } + final Class<?> clazz = this.classLoader.loadClass(className); + final List<Annotation> properties = this.getProperties(clazz); + // Run through all the properties and find the correct one + for (final Annotation property : properties) { + final String name = (String) ClassAndMethodContainer.invokeMethod(this.classAndMethodContainer.getPropertyNameMethod(), property, ""); + if (propertyName.equals(name)) { + return (String) ClassAndMethodContainer.invokeMethod(this.classAndMethodContainer.getPropertyDescriptionMethod(), property, ""); + } + } + } catch (final ClassNotFoundException ex) { + CurrentAnalysisEditorBean.LOG.warn("Could not find class.", ex); + } + // If we are here we found nothing + return "N/A"; + } + /** * Delivers the properties of the given class, using the annotations and the java reflection API. * diff --git a/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar b/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar index be77cbabac36c423e26af3534303762c2d940bef..3df59e0e658e1a8ebc17f2211ec41a0c8dc4c55e 100644 Binary files a/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar and b/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml index 4d0ea6b1d48b7b26422276b3570988e38a20d30c..50fb2f39083e3e798655fd2baf18bcd38aaf4b62 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisEditor.xhtml @@ -125,7 +125,7 @@ <h:outputText id="normalProperty" value="#{property.name}" rendered="#{rowIndex > 1}"/> <p:tooltip for="classNameProperty" value="The class name of this component." rendered="#{rowIndex == 0}"/> <p:tooltip for="nameProperty" value="The name of this component." rendered="#{rowIndex == 1}"/> - <p:tooltip for="normalProperty" value="#{property.description}" rendered="#{rowIndex > 1}"/> + <p:tooltip for="normalProperty" value="#{currentAnalysisEditorBean.getDescription(currentAnalysisEditorBean.selectedPlugin, property.name)}" rendered="#{rowIndex > 1}"/> </p:column> <!-- The classname is not editable, the name is editable with a specific target, other properies are editable normally. --> @@ -140,7 +140,7 @@ </p:inplace> <p:tooltip for="className" value="The class name of this component." rendered="#{rowIndex == 0}"/> <p:tooltip for="nameEditor" value="The name of this component." rendered="#{rowIndex == 1}"/> - <p:tooltip for="normalEditor" value="#{property.description}" rendered="#{rowIndex > 1}"/> + <p:tooltip for="normalEditor" value="#{currentAnalysisEditorBean.getDescription(currentAnalysisEditorBean.selectedPlugin, property.name)}" rendered="#{rowIndex > 1}"/> </p:column> </p:dataTable> </h:form>