1 /**********************************************************************
2 * Copyright (c) 2012, 2013 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
.Messages
;
15 import org
.eclipse
.linuxtools
.internal
.lttng2
.ui
.views
.control
.model
.impl
.TraceDomainComponent
;
16 import org
.eclipse
.linuxtools
.tmf
.ui
.properties
.ReadOnlyTextPropertyDescriptor
;
17 import org
.eclipse
.ui
.views
.properties
.IPropertyDescriptor
;
21 * Property source implementation for the trace domain component.
24 * @author Bernd Hufmann
26 public class TraceDomainPropertySource
extends BasePropertySource
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
33 * The trace domain 'name' property ID.
35 public static final String TRACE_DOMAIN_NAME_PROPERTY_ID
= "trace.domain.name"; //$NON-NLS-1$
37 * The trace domain 'name' property name.
39 public static final String TRACE_DOMAIN_NAME_PROPERTY_NAME
= Messages
.TraceControl_DomainNamePropertyName
;
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
46 * The trace domain component which this property source is for.
48 private final TraceDomainComponent fBaseEvent
;
50 // ------------------------------------------------------------------------
52 // ------------------------------------------------------------------------
56 * @param component - the trace domain component
58 public TraceDomainPropertySource(TraceDomainComponent component
) {
59 fBaseEvent
= component
;
62 // ------------------------------------------------------------------------
64 // ------------------------------------------------------------------------
67 public IPropertyDescriptor
[] getPropertyDescriptors() {
68 return new IPropertyDescriptor
[] {
69 new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID
, TRACE_DOMAIN_NAME_PROPERTY_NAME
)};
73 public Object
getPropertyValue(Object id
) {
74 if(TRACE_DOMAIN_NAME_PROPERTY_ID
.equals(id
)) {
75 return fBaseEvent
.getName();