~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/preferences/CodeAssistPreferencePage.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2006 IBM Corporation.
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 *
 
8
 * Contributors:
 
9
 *     IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse
 
10
 *******************************************************************************/
 
11
 
 
12
package org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences;
 
13
 
 
14
import org.eclipse.jface.preference.*;
 
15
import org.eclipse.linuxtools.internal.systemtap.ui.ide.IDEPlugin;
 
16
import org.eclipse.linuxtools.internal.systemtap.ui.ide.Localization;
 
17
import org.eclipse.linuxtools.systemtap.ui.logging.LogManager;
 
18
import org.eclipse.ui.IWorkbenchPreferencePage;
 
19
import org.eclipse.ui.IWorkbench;
 
20
 
 
21
 
 
22
public class CodeAssistPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
 
23
        public CodeAssistPreferencePage() {
 
24
                super(GRID);
 
25
                LogManager.logDebug("Start CodeAssistPreferencePage:", this);
 
26
                setPreferenceStore(IDEPlugin.getDefault().getPreferenceStore());
 
27
                setDescription(Localization.getString("CodeAssistPreferencePage.CodeAssistPreferenceDescription"));
 
28
                LogManager.logDebug("End CodeAssistPreferencePage:", this);
 
29
        }
 
30
        
 
31
        /**
 
32
         * Creates the field editors. Field editors are abstractions of
 
33
         * the common GUI blocks needed to manipulate various types
 
34
         * of preferences. Each field editor knows how to save and
 
35
         * restore itself.
 
36
         */
 
37
        public void createFieldEditors() {
 
38
                LogManager.logDebug("Start createFieldEditors:", this);
 
39
                addField(
 
40
                        new BooleanFieldEditor(
 
41
                                IDEPreferenceConstants.P_USE_CODE_ASSIST,
 
42
                                Localization.getString("CodeAssistPreferencePage.UseCodeAssist"),
 
43
                                getFieldEditorParent()));
 
44
                addField(new RadioGroupFieldEditor(
 
45
                                IDEPreferenceConstants.P_COMPLETION,
 
46
                                Localization.getString("CodeAssistPreferencePage.HowCodeAdded"),
 
47
                                1,
 
48
                                new String[][] { 
 
49
                                                {Localization.getString("CodeAssistPreferencePage.Insert"), IDEPreferenceConstants.P_COMPLETION_INSERT },
 
50
                                                {Localization.getString("CodeAssistPreferencePage.Overwrite"), IDEPreferenceConstants.P_COMPLETION_OVERWRITE }},
 
51
                                getFieldEditorParent()));
 
52
                addField(
 
53
                                new IntegerFieldEditor(
 
54
                                                IDEPreferenceConstants.P_ACTIVATION_DELAY,
 
55
                                Localization.getString("CodeAssistPreferencePage.ActivationDelay"),
 
56
                                getFieldEditorParent()));
 
57
                addField(
 
58
                                new StringFieldEditor(
 
59
                                                IDEPreferenceConstants.P_ACTIVATION_TRIGGER,
 
60
                                Localization.getString("CodeAssistPreferencePage.ActivationTrigger"),
 
61
                                getFieldEditorParent()));
 
62
                LogManager.logDebug("End createFieldEditors", this);
 
63
        }
 
64
 
 
65
        public void init(IWorkbench workbench) {
 
66
                LogManager.logInfo("Initializing", this);
 
67
        }
 
68
 
 
69
        public void dispose() {
 
70
                LogManager.logInfo("Disposing", this);
 
71
                super.dispose();
 
72
        }
 
73
}
 
 
b'\\ No newline at end of file'