1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.property
;
14 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.Messages
;
15 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
.TraceDomainComponent
;
16 import org
.eclipse
.ui
.views
.properties
.IPropertyDescriptor
;
17 import org
.eclipse
.ui
.views
.properties
.TextPropertyDescriptor
;
20 * <b><u>TraceDomainPropertySource</u></b>
22 * Property source implementation for the trace domain component.
25 public class TraceDomainPropertySource
extends BasePropertySource
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
32 * The trace domain 'name' property ID.
34 public static final String TRACE_DOMAIN_NAME_PROPERTY_ID
= "trace.domain.name"; //$NON-NLS-1$
36 * The trace domain 'name' property name.
38 public static final String TRACE_DOMAIN_NAME_PROPERTY_NAME
= Messages
.TraceControl_DomainNamePropertyName
;
40 // ------------------------------------------------------------------------
42 // ------------------------------------------------------------------------
44 * The trace domain component which this property source is for.
46 private final TraceDomainComponent fBaseEvent
;
48 // ------------------------------------------------------------------------
50 // ------------------------------------------------------------------------
53 * @param component - the trace domain component
55 public TraceDomainPropertySource(TraceDomainComponent component
) {
56 fBaseEvent
= component
;
59 // ------------------------------------------------------------------------
61 // ------------------------------------------------------------------------
64 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyDescriptors()
67 public IPropertyDescriptor
[] getPropertyDescriptors() {
68 return new IPropertyDescriptor
[] {
69 new TextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID
, TRACE_DOMAIN_NAME_PROPERTY_NAME
)};
74 * @see org.eclipse.linuxtools.internal.lttng2.ui.views.control.property.BasePropertySource#getPropertyValue(java.lang.Object)
77 public Object
getPropertyValue(Object id
) {
78 if(TRACE_DOMAIN_NAME_PROPERTY_ID
.equals(id
)) {
79 return fBaseEvent
.getName();