1 /**********************************************************************
2 * Copyright (c) 2015 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
.tracecompass
.internal
.tmf
.remote
.ui
.preferences
;
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
;
24 * Preference page implementation for configuring LTTng tracer control preferences.
27 * @author Bernd Hufmann
29 public class ControlPreferencePage
extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage
{
31 // ------------------------------------------------------------------------
33 // ------------------------------------------------------------------------
38 public ControlPreferencePage() {
39 super(FieldEditorPreferencePage
.GRID
);
41 // Set the preference store for the preference page.
42 IPreferenceStore store
= Activator
.getDefault().getCorePreferenceStore();
43 setPreferenceStore(store
);
46 // ------------------------------------------------------------------------
48 // ------------------------------------------------------------------------
51 public void init(IWorkbench workbench
) {
55 protected void createFieldEditors() {
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
);