+ private class CustomAttributePropertySource implements IPropertySource {
+
+ private final ITmfCustomAttributes event;
+
+ public CustomAttributePropertySource(ITmfCustomAttributes event) {
+ this.event = event;
+ }
+
+ @Override
+ public Object getEditableValue() {
+ return EMPTY_STRING;
+ }
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
+
+ for (String customAttribute : event.listCustomAttributes()) {
+ descriptors.add(new ReadOnlyTextPropertyDescriptor(customAttribute, customAttribute));
+ }
+
+ return descriptors.toArray(new IPropertyDescriptor[0]);
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ return event.getCustomAttribute((String) id);
+ }
+
+ @Override
+ public boolean isPropertySet(Object id) {
+ return false;
+ }
+
+ @Override
+ public void resetPropertyValue(Object id) {
+ }
+
+ @Override
+ public void setPropertyValue(Object id, Object value) {
+ }
+ }