File tree Expand file tree Collapse file tree
key.ui/src/main/java/de/uka/ilkd/key/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import javax .swing .tree .TreeSelectionModel ;
2222
2323import de .uka .ilkd .key .gui .utilities .GuiUtilities ;
24+ import de .uka .ilkd .key .settings .ProofIndependentSettings ;
25+ import de .uka .ilkd .key .settings .ViewSettings ;
2426
2527import org .key_project .util .java .IOUtil ;
2628
@@ -277,6 +279,15 @@ public void mouseClicked(MouseEvent e) {
277279 .setMaximumSize (new Dimension (Integer .MAX_VALUE , (int ) buttonDim .getHeight () + 10 ));
278280 getContentPane ().add (buttonPanel );
279281
282+ // create the checkbox to hide example load on next startup
283+ ViewSettings vs = ProofIndependentSettings .DEFAULT_INSTANCE .getViewSettings ();
284+ JCheckBox showAgainCheckbox =
285+ new JCheckBox ("Show this dialog on startup" , vs .getShowLoadExamplesDialog ());
286+ buttonPanel .add (showAgainCheckbox );
287+ showAgainCheckbox .addActionListener (e -> {
288+ vs .setShowLoadExamplesDialog (showAgainCheckbox .isSelected ());
289+ });
290+
280291 // create "load" button
281292 loadButton = new JButton ("Load Example" );
282293 loadButton .addActionListener (e -> {
@@ -312,6 +323,7 @@ public void mouseClicked(MouseEvent e) {
312323 buttonPanel .add (cancelButton );
313324 GuiUtilities .attachClickOnEscListener (cancelButton );
314325
326+
315327 // select first example
316328 DefaultMutableTreeNode firstLeaf =
317329 ((DefaultMutableTreeNode ) model .getRoot ()).getFirstLeaf ();
You can’t perform that action at this time.
0 commit comments