tmf: Bug 460842: Introduce tmf remote plug-ins and feature
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.remote.ui / src / org / eclipse / tracecompass / internal / tmf / remote / ui / preferences / ControlPreferencePage.java
1 /**********************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org.eclipse.tracecompass.internal.tmf.remote.ui.preferences;
13
14 import org.eclipse.jface.preference.FieldEditorPreferencePage;
15 import org.eclipse.jface.preference.IPreferenceStore;
16 import org.eclipse.jface.preference.IntegerFieldEditor;
17 import org.eclipse.tracecompass.internal.tmf.remote.core.preferences.TmfRemotePreferences;
18 import org.eclipse.tracecompass.internal.tmf.remote.ui.Activator;
19 import org.eclipse.ui.IWorkbench;
20 import org.eclipse.ui.IWorkbenchPreferencePage;
21
22 /**
23 * <p>
24 * Preference page implementation for configuring LTTng tracer control preferences.
25 * </p>
26 *
27 * @author Bernd Hufmann
28 */
29 public class ControlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
30
31 // ------------------------------------------------------------------------
32 // Constructors
33 // ------------------------------------------------------------------------
34
35 /**
36 * Constructor
37 */
38 public ControlPreferencePage() {
39 super(FieldEditorPreferencePage.GRID);
40
41 // Set the preference store for the preference page.
42 IPreferenceStore store = Activator.getDefault().getCorePreferenceStore();
43 setPreferenceStore(store);
44 }
45
46 // ------------------------------------------------------------------------
47 // Operations
48 // ------------------------------------------------------------------------
49
50 @Override
51 public void init(IWorkbench workbench) {
52 }
53
54 @Override
55 protected void createFieldEditors() {
56
57 IntegerFieldEditor commandTimeout = new IntegerFieldEditor(TmfRemotePreferences.TRACE_CONTROL_COMMAND_TIMEOUT_PREF, Messages.TraceControl_CommandTimeout, getFieldEditorParent());
58 commandTimeout.setValidRange(TmfRemotePreferences.TRACE_CONTROL_MIN_TIMEOUT_VALUE, TmfRemotePreferences.TRACE_CONTROL_MAX_TIMEOUT_VALUE);
59 addField(commandTimeout);
60 }
61 }
This page took 0.03695 seconds and 6 git commands to generate.