@@ -69,23 +69,23 @@ public class PreferencePage extends FieldEditorPreferencePage implements IWorkbe
69
69
private static final String KEY_PRIVATE_HARDWARE_PATHS = "Gui entry for private hardware paths" ; //$NON-NLS-1$
70
70
private static final String KEY_PRIVATE_LIBRARY_PATHS = "Gui entry for private library paths" ; //$NON-NLS-1$
71
71
private static final String KEY_TOOLCHAIN_SELECTION = "Gui entry for toolchain selection" ; //$NON-NLS-1$
72
- //private static final String KEY_USE_BONJOUR = "Gui entry for usage of bonjour"; //$NON-NLS-1$
72
+
73
73
74
74
private PathEditor arduinoPrivateLibPathPathEditor ;
75
75
private PathEditor arduinoPrivateHardwarePathPathEditor ;
76
76
private ComboFieldEditor buildBeforeUploadOptionEditor ;
77
77
private BooleanFieldEditor openSerialMonitorOpensSerialsOptionEditor ;
78
78
private BooleanFieldEditor automaticallyImportLibrariesOptionEditor ;
79
- //private BooleanFieldEditor automaticallyInstallLibrariesOptionEditor;
80
79
private BooleanFieldEditor useArduinoToolchainSelectionEditor ;
81
80
private BooleanFieldEditor pragmaOnceHeaderOptionEditor ;
82
81
private BooleanFieldEditor cleanSerialMonitorAfterUploadEditor ;
83
82
private BooleanFieldEditor switchToSerialMonitorAfterUploadEditor ;
84
83
private BooleanFieldEditor enableParallelBuildForNewProjects ;
85
- //private BooleanFieldEditor enableBonjour;
84
+
86
85
private Button myBonjourCheckBox ;
87
86
private Spinner myDelayNumberSpinner ;
88
87
private Combo myDelayUnitCombo ;
88
+ private Button myInstallLibCheckBox ;
89
89
90
90
private static int [] durationUnits = new int [] { 1 , 7 , 30 , 365 , 36500 };
91
91
@@ -154,6 +154,8 @@ public boolean performOk() {
154
154
ConfigurationPreferences .setAutoImportLibraries (this .automaticallyImportLibrariesOptionEditor .getBooleanValue ());
155
155
ConfigurationPreferences .setPragmaOnceHeaders (this .pragmaOnceHeaderOptionEditor .getBooleanValue ());
156
156
ConfigurationPreferences .setUseBonjour (myBonjourCheckBox .getSelection ());
157
+ ConfigurationPreferences .setInstallLibraries (myInstallLibCheckBox .getSelection ());
158
+
157
159
//TOFIX line below
158
160
ConfigurationPreferences .setJsonUpdateDelay (Duration .ofDays (myDelayNumberSpinner .getSelection () * durationUnits [myDelayUnitCombo .getSelectionIndex ()]));
159
161
BoardsManager .setPrivateHardwarePaths (hardWarePaths );
@@ -321,12 +323,12 @@ protected void createFieldEditors() {
321
323
Dialog .applyDialogFont (netWorkbox );
322
324
323
325
//Currently sloeber does not autoinstall librtaries
324
- // Button myInstallLibCheckBox = new Button(netWorkbox, SWT.CHECK | SWT.LEFT);
325
- // Label inStallLabel = new Label(netWorkbox, SWT.BEGINNING);
326
- // inStallLabel.setText(Messages.ui_auto_install_libraries);
327
- // GridData gd16 = new GridData(SWT.BEGINNING, SWT.TOP, true, false);
328
- // gd16.horizontalSpan=3;
329
- // inStallLabel.setLayoutData(gd16);
326
+ myInstallLibCheckBox = new Button (netWorkbox , SWT .CHECK | SWT .LEFT );
327
+ Label inStallLabel = new Label (netWorkbox , SWT .BEGINNING );
328
+ inStallLabel .setText (Messages .ui_auto_install_libraries );
329
+ GridData gd16 = new GridData (SWT .BEGINNING , SWT .TOP , true , false );
330
+ gd16 .horizontalSpan =3 ;
331
+ inStallLabel .setLayoutData (gd16 );
330
332
331
333
332
334
myBonjourCheckBox = new Button (netWorkbox , SWT .CHECK | SWT .LEFT );
@@ -374,6 +376,7 @@ public void widgetDefaultSelected(SelectionEvent e) {
374
376
375
377
376
378
myBonjourCheckBox .setSelection (ConfigurationPreferences .useBonjour ());
379
+ myInstallLibCheckBox .setSelection (ConfigurationPreferences .getInstallLibraries ());
377
380
setJsonDurationComposites (ConfigurationPreferences .getJsonUpdateDelay ());
378
381
379
382
}
@@ -412,6 +415,7 @@ protected void performApply() {
412
415
protected void performDefaults () {
413
416
super .performDefaults ();
414
417
myBonjourCheckBox .setSelection ( Defaults .useBonjour );
418
+ myInstallLibCheckBox .setSelection ( Defaults .INSTALL_LIBRARIES );
415
419
setJsonDurationComposites (Defaults .getJsonUpdateDuration ());
416
420
417
421
}
0 commit comments