15
15
import org .eclipse .ui .preferences .ScopedPreferenceStore ;
16
16
17
17
import it .baeyens .arduino .common .Const ;
18
+ import it .baeyens .arduino .common .Defaults ;
18
19
19
20
/**
20
21
* ArduinoPreferencePage is the class that is behind the preference page of
@@ -38,7 +39,11 @@ public class PreferencePage extends FieldEditorPreferencePage implements IWorkbe
38
39
public PreferencePage () {
39
40
super (org .eclipse .jface .preference .FieldEditorPreferencePage .GRID );
40
41
setDescription (Messages .ui_workspace_settings );
41
- setPreferenceStore (new ScopedPreferenceStore (InstanceScope .INSTANCE , Const .NODE_ARDUINO ));
42
+
43
+ ScopedPreferenceStore preferences = new ScopedPreferenceStore (InstanceScope .INSTANCE , Const .NODE_ARDUINO );
44
+ preferences .setDefault (Const .KEY_OPEN_SERIAL_WITH_MONITOR , Defaults .OPEN_SERIAL_WITH_MONITOR );
45
+ preferences .setDefault (Const .KEY_AUTO_IMPORT_LIBRARIES , Defaults .AUTO_IMPORT_LIBRARIES );
46
+ setPreferenceStore (preferences );
42
47
}
43
48
44
49
@ Override
@@ -90,12 +95,10 @@ protected void createFieldEditors() {
90
95
this .arduinoPrivateLibPath = new PathEditor (Const .KEY_PRIVATE_LIBRARY_PATHS , Messages .ui_private_lib_path ,
91
96
Messages .ui_private_lib_path_help , parent );
92
97
addField (this .arduinoPrivateLibPath );
93
- this .arduinoPrivateLibPath .setPreferenceStore (getPreferenceStore ());
94
98
95
99
this .arduinoPrivateHardwarePath = new PathEditor (Const .KEY_PRIVATE_HARDWARE_PATHS ,
96
100
Messages .ui_private_hardware_path , Messages .ui_private_hardware_path_help , parent );
97
101
addField (this .arduinoPrivateHardwarePath );
98
- this .arduinoPrivateHardwarePath .setPreferenceStore (getPreferenceStore ());
99
102
100
103
Dialog .applyDialogFont (parent );
101
104
createLine (parent , 4 );
0 commit comments