1515import org .eclipse .ui .preferences .ScopedPreferenceStore ;
1616
1717import it .baeyens .arduino .common .Const ;
18+ import it .baeyens .arduino .common .Defaults ;
1819
1920/**
2021 * ArduinoPreferencePage is the class that is behind the preference page of
@@ -38,7 +39,11 @@ public class PreferencePage extends FieldEditorPreferencePage implements IWorkbe
3839 public PreferencePage () {
3940 super (org .eclipse .jface .preference .FieldEditorPreferencePage .GRID );
4041 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 );
4247 }
4348
4449 @ Override
@@ -90,12 +95,10 @@ protected void createFieldEditors() {
9095 this .arduinoPrivateLibPath = new PathEditor (Const .KEY_PRIVATE_LIBRARY_PATHS , Messages .ui_private_lib_path ,
9196 Messages .ui_private_lib_path_help , parent );
9297 addField (this .arduinoPrivateLibPath );
93- this .arduinoPrivateLibPath .setPreferenceStore (getPreferenceStore ());
9498
9599 this .arduinoPrivateHardwarePath = new PathEditor (Const .KEY_PRIVATE_HARDWARE_PATHS ,
96100 Messages .ui_private_hardware_path , Messages .ui_private_hardware_path_help , parent );
97101 addField (this .arduinoPrivateHardwarePath );
98- this .arduinoPrivateHardwarePath .setPreferenceStore (getPreferenceStore ());
99102
100103 Dialog .applyDialogFont (parent );
101104 createLine (parent , 4 );
0 commit comments