1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package pl.edu.agh.cast.ui.preferences;
19
20 import org.eclipse.core.runtime.preferences.InstanceScope;
21 import org.eclipse.jface.preference.BooleanFieldEditor;
22 import org.eclipse.jface.preference.FieldEditorPreferencePage;
23 import org.eclipse.jface.preference.IPreferenceStore;
24 import org.eclipse.ui.IWorkbench;
25 import org.eclipse.ui.IWorkbenchPreferencePage;
26 import org.eclipse.ui.preferences.ScopedPreferenceStore;
27
28 import pl.edu.agh.cast.Activator;
29 import pl.edu.agh.cast.project.UserPreferences;
30 import pl.edu.agh.cast.util.Messages;
31
32
33
34
35
36
37 public final class GeneralPreferencesPage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
38
39
40
41
42
43
44 public void init(IWorkbench workbench) {
45 IPreferenceStore store = new ScopedPreferenceStore(new InstanceScope(), Activator.PLUGIN_ID);
46 setPreferenceStore(store);
47 }
48
49
50
51
52
53
54 @Override
55 protected void createFieldEditors() {
56 addField(new BooleanFieldEditor(UserPreferences.Pref.SHOW_PROJECT_STARTUP_DIALOG.getValue(),
57 Messages.GeneralPreferencesPage_ShowStartup, getFieldEditorParent()));
58 }
59
60 }