/**********************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*
* Contributors:
* Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.property;
import org.eclipse.linuxtools.internal.lttng2.core.control.model.TraceLogLevel;
import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages;
import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.tmf.core.util.ReadOnlyTextPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.TextPropertyDescriptor;
/**
* <p>
// ------------------------------------------------------------------------
// Attributes
// ------------------------------------------------------------------------
+
/**
* The event component which this property source is for.
*/
// ------------------------------------------------------------------------
// Constructors
// ------------------------------------------------------------------------
+
/**
* Constructor
* @param component - the base event component
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
- */
+
@Override
public IPropertyDescriptor[] getPropertyDescriptors() {
List<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor> ();
- list.add(new TextPropertyDescriptor(TRACE_EVENT_NAME_PROPERTY_ID, TRACE_EVENT_NAME_PROPERTY_NAME));
- list.add(new TextPropertyDescriptor(TRACE_EVENT_TYPE_PROPERTY_ID, TRACE_EVENT_TYPE_PROPERTY_NAME));
- list.add( new TextPropertyDescriptor(TRACE_EVENT_STATE_PROPERTY_ID, TRACE_EVENT_STATE_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_NAME_PROPERTY_ID, TRACE_EVENT_NAME_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_TYPE_PROPERTY_ID, TRACE_EVENT_TYPE_PROPERTY_NAME));
+ list.add( new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_STATE_PROPERTY_ID, TRACE_EVENT_STATE_PROPERTY_NAME));
if (fEvent.getLogLevel() != TraceLogLevel.LEVEL_UNKNOWN) {
- list.add(new TextPropertyDescriptor(TRACE_EVENT_LOGLEVEL_PROPERTY_ID, TRACE_EVENT_LOGLEVEL_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_LOGLEVEL_PROPERTY_ID, TRACE_EVENT_LOGLEVEL_PROPERTY_NAME));
}
if (fEvent.getFilterExpression() != null) {
- list.add(new TextPropertyDescriptor(TRACE_EVENT_FILTER_PROPERTY_ID, TRACE_EVENT_FILTER_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_FILTER_PROPERTY_ID, TRACE_EVENT_FILTER_PROPERTY_NAME));
}
return list.toArray(new IPropertyDescriptor[list.size()]);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
- */
@Override
public Object getPropertyValue(Object id) {
if(TRACE_EVENT_NAME_PROPERTY_ID.equals(id)) {