@@ -65,7 +65,7 @@ public class PreferencesFrame {
6565
6666 ColorChooser selector ;
6767
68- // JCheckBox errorCheckerBox;
68+ JCheckBox errorCheckerBox ;
6969 JCheckBox warningsCheckerBox ;
7070 JCheckBox codeCompletionBox ;
7171 JCheckBox importSuggestionsBox ;
@@ -270,8 +270,11 @@ public void mouseClicked(MouseEvent e) {
270270
271271 // [ ] Continuously check for errors - PDE X
272272
273- // errorCheckerBox =
274- // new JCheckBox(Language.text("preferences.continuously_check"));
273+ errorCheckerBox =
274+ new JCheckBox (Language .text ("preferences.continuously_check" ));
275+ errorCheckerBox .addItemListener (e -> {
276+ warningsCheckerBox .setEnabled (errorCheckerBox .isSelected ());
277+ });
275278
276279
277280 // [ ] Show Warnings - PDE X
@@ -407,9 +410,9 @@ public void actionPerformed(ActionEvent e) {
407410 .addComponent (presentColor , GroupLayout .PREFERRED_SIZE , GroupLayout .DEFAULT_SIZE , GroupLayout .PREFERRED_SIZE ))
408411 .addComponent (editorAntialiasBox )
409412 .addComponent (inputMethodBox )
410- // .addGroup(layout.createSequentialGroup()
411- // .addComponent(errorCheckerBox)
412- // .addComponent(warningsCheckerBox))
413+ .addGroup (layout .createSequentialGroup ()
414+ .addComponent (errorCheckerBox )
415+ .addComponent (warningsCheckerBox ))
413416 .addComponent (warningsCheckerBox )
414417 .addComponent (codeCompletionBox )
415418 .addComponent (importSuggestionsBox )
@@ -465,10 +468,9 @@ public void actionPerformed(ActionEvent e) {
465468 .addComponent (presentColor ))
466469 .addComponent (editorAntialiasBox )
467470 .addComponent (inputMethodBox )
468- // .addGroup(layout.createParallelGroup()
469- // .addComponent(errorCheckerBox)
470- // .addComponent(warningsCheckerBox))
471- .addComponent (warningsCheckerBox )
471+ .addGroup (layout .createParallelGroup ()
472+ .addComponent (errorCheckerBox )
473+ .addComponent (warningsCheckerBox ))
472474 .addComponent (codeCompletionBox )
473475 .addComponent (importSuggestionsBox )
474476 .addGroup (layout .createParallelGroup (GroupLayout .Alignment .CENTER )
@@ -655,7 +657,7 @@ protected void applyFrame() {
655657 autoAssociateBox .isSelected ());
656658 }
657659
658- // Preferences.setBoolean("pdex.errorCheckEnabled", errorCheckerBox.isSelected());
660+ Preferences .setBoolean ("pdex.errorCheckEnabled" , errorCheckerBox .isSelected ());
659661 Preferences .setBoolean ("pdex.warningsEnabled" , warningsCheckerBox .isSelected ());
660662 Preferences .setBoolean ("pdex.completion" , codeCompletionBox .isSelected ());
661663// Preferences.setBoolean("pdex.completion.trigger", codeCompletionTriggerBox.isSelected());
@@ -670,8 +672,9 @@ protected void applyFrame() {
670672 public void showFrame () {
671673 editorAntialiasBox .setSelected (Preferences .getBoolean ("editor.smooth" )); //$NON-NLS-1$
672674 inputMethodBox .setSelected (Preferences .getBoolean ("editor.input_method_support" )); //$NON-NLS-1$
673- // errorCheckerBox.setSelected(Preferences.getBoolean("pdex.errorCheckEnabled"));
675+ errorCheckerBox .setSelected (Preferences .getBoolean ("pdex.errorCheckEnabled" ));
674676 warningsCheckerBox .setSelected (Preferences .getBoolean ("pdex.warningsEnabled" ));
677+ warningsCheckerBox .setEnabled (errorCheckerBox .isSelected ());
675678 codeCompletionBox .setSelected (Preferences .getBoolean ("pdex.completion" ));
676679 //codeCompletionTriggerBox.setSelected(Preferences.getBoolean("pdex.completion.trigger"));
677680 //codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected());
0 commit comments