@@ -192,18 +192,6 @@ public void actionPerformed(final ActionEvent ae) {
192192 incremental = new JCheckBox ("persistent" );
193193 incremental .setEnabled (true );
194194 incremental .setSelected (false );
195- incremental .addActionListener (ae -> {
196- if (incremental .isSelected () && null == textEditor .getCurrentLanguage ()) {
197- incremental .setSelected (false );
198- JOptionPane .showMessageDialog (TextEditorTab .this ,
199- "Select a language first!" );
200- return ;
201- }
202- textEditor .setIncremental (incremental .isSelected ());
203- prompt_title .setText (incremental .isSelected () ? //
204- "REPL: " + textEditor .getCurrentLanguage ().getLanguageName () : "" );
205- prompt .setEnabled (incremental .isSelected ());
206- });
207195 bottom .add (incremental , bc );
208196
209197 bc .gridx = 4 ;
@@ -316,6 +304,19 @@ public void actionPerformed(ActionEvent a) {
316304 bc .gridwidth = 4 ;
317305 prompt_panel .add (prompt , bc );
318306
307+ incremental .addActionListener (ae -> {
308+ if (incremental .isSelected () && null == textEditor .getCurrentLanguage ()) {
309+ incremental .setSelected (false );
310+ JOptionPane .showMessageDialog (TextEditorTab .this ,
311+ "Select a language first!" );
312+ return ;
313+ }
314+ textEditor .setIncremental (incremental .isSelected ());
315+ prompt_title .setText (incremental .isSelected () ? //
316+ "REPL: " + textEditor .getCurrentLanguage ().getLanguageName () : "" );
317+ prompt .setEnabled (incremental .isSelected ());
318+ });
319+
319320 screenAndPromptSplit = new JSplitPane (JSplitPane .VERTICAL_SPLIT , bottom , prompt_panel );
320321
321322 super .setLeftComponent (editorPane .wrappedInScrollbars ());
0 commit comments