X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=org.eclipse.linuxtools.lttng2.ui%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Finternal%2Flttng2%2Fui%2Fviews%2Fcontrol%2Fproperty%2FTraceSessionPropertySource.java;h=75f1c0f126694f24ca8515f1bf1a434782833fce;hb=152ba1a7fabe7175ba1a6f267eda2b3891cbcb63;hp=227fe232274d6014c2187788f49349d5cd99b3f0;hpb=7c94f49001b043cd9605cd2a9d733257993c63c6;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java index 227fe23227..75f1c0f126 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/property/TraceSessionPropertySource.java @@ -1,26 +1,30 @@ /********************************************************************** - * Copyright (c) 2012 Ericsson - * + * Copyright (c) 2012, 2014 Ericsson + * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Bernd Hufmann - Initial API and implementation + * + * Contributors: + * Bernd Hufmann - Initial API and implementation **********************************************************************/ package org.eclipse.linuxtools.internal.lttng2.ui.views.control.property; -import org.eclipse.linuxtools.internal.lttng2.ui.views.control.Messages; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.linuxtools.internal.lttng2.ui.views.control.messages.Messages; import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; +import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor; import org.eclipse.ui.views.properties.IPropertyDescriptor; -import org.eclipse.ui.views.properties.TextPropertyDescriptor; /** - * TraceSessionPropertySource *
* Property source implementation for the trace session component. *
+ * + * @author Bernd Hufmann */ public class TraceSessionPropertySource extends BasePropertySource { @@ -40,29 +44,57 @@ public class TraceSessionPropertySource extends BasePropertySource { */ public static final String TRACE_SESSION_STATE_PROPERTY_ID = "trace.session.state"; //$NON-NLS-1$ /** - * The trace session name property name. + * The trace snapshot path property ID. + */ + public static final String TRACE_SNAPSHOT_PATH_PROPERTY_ID = "trace.snapshot.path"; //$NON-NLS-1$ + /** + * The snapshot name property. + */ + public static final String TRACE_SNAPSHOT_NAME_PROPERTY_ID = "trace.snapshot.name"; //$NON-NLS-1$ + /** + * The snapshot ID property. + */ + public static final String TRACE_SNAPSHOT_ID_PROPERTY_ID = "trace.snapshot.id"; //$NON-NLS-1$ + + /** + * The trace session name property name. */ public static final String TRACE_SESSION_NAME_PROPERTY_NAME = Messages.TraceControl_SessionNamePropertyName; /** - * The trace session path property name. + * The trace session path property name. */ public static final String TRACE_SESSION_PATH_PROPERTY_NAME = Messages.TraceControl_SessionPathPropertyName; /** * The trace session state property name. */ public static final String TRACE_SESSION_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName; - + /** + * The snapshot path property name. + */ + public static final String TRACE_SNAPSHOT_PATH_PROPERTY_NAME = Messages.TraceControl_SnapshotPathPropertyName; + /** + * The trace snapshot name property name. + */ + public static final String TRACE_SNAPSHOT_NAME_PROPERTY_NAME = Messages.TraceControl_SnapshotNamePropertyName; + /** + * The trace snapshot ID property name. + */ + public static final String TRACE_SNAPSHOT_ID_PROPERTY_NAME = Messages.TraceControl_SnapshotIdPropertyName; + + // ------------------------------------------------------------------------ // Attributes // ------------------------------------------------------------------------ + /** - * The session component which this property source is for. + * The session component which this property source is for. */ private final TraceSessionComponent fSession; // ------------------------------------------------------------------------ // Constructors // ------------------------------------------------------------------------ + /** * Constructor * @param component - the session component @@ -70,26 +102,26 @@ public class TraceSessionPropertySource extends BasePropertySource { public TraceSessionPropertySource(TraceSessionComponent component) { fSession = component; } - + // ------------------------------------------------------------------------ // Operations // ------------------------------------------------------------------------ - /* - * (non-Javadoc) - * @see org.eclipse.ui.views.properties.IPropertySource#getPropertyDescriptors() - */ + @Override public IPropertyDescriptor[] getPropertyDescriptors() { - return new IPropertyDescriptor[] { - new TextPropertyDescriptor(TRACE_SESSION_NAME_PROPERTY_ID, TRACE_SESSION_NAME_PROPERTY_NAME), - new TextPropertyDescriptor(TRACE_SESSION_PATH_PROPERTY_ID, TRACE_SESSION_PATH_PROPERTY_NAME), - new TextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME)}; + List