Skip to content
Snippets Groups Projects
Commit 721c4c97 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Updated the kieker-jar; Corrected the usage of the properties-description.

parent 938dfadc
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -424,6 +424,30 @@ public final class CurrentAnalysisEditorBean { ...@@ -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. * Delivers the properties of the given class, using the annotations and the java reflection API.
* *
......
No preview for this file type
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<h:outputText id="normalProperty" value="#{property.name}" rendered="#{rowIndex > 1}"/> <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="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="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> </p:column>
<!-- The classname is not editable, the name is editable with a specific target, other properies are editable normally. --> <!-- The classname is not editable, the name is editable with a specific target, other properies are editable normally. -->
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</p:inplace> </p:inplace>
<p:tooltip for="className" value="The class name of this component." rendered="#{rowIndex == 0}"/> <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="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:column>
</p:dataTable> </p:dataTable>
</h:form> </h:form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment