DebuggerMain.fxml 22.1 KB
Newer Older
1
2
<?xml version="1.0" encoding="UTF-8"?>

Alexander Weigl's avatar
Alexander Weigl committed
3

alexander.weigl's avatar
alexander.weigl committed
4
<?import de.jensd.fx.glyphs.materialdesignicons.*?>
Alexander Weigl's avatar
Alexander Weigl committed
5
<?import edu.kit.iti.formal.psdbg.gui.controls.DebuggerStatusBar?>
6
<?import javafx.scene.control.*?>
7
<?import javafx.scene.layout.BorderPane?>
Alexander Weigl's avatar
Alexander Weigl committed
8
9
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
10
<?import javafx.scene.layout.VBox?>
Alexander Weigl's avatar
Alexander Weigl committed
11
<?import org.dockfx.DockPane?>
Lulu Luong's avatar
Lulu Luong committed
12
<?import javafx.scene.image.ImageView?>
Lulu Luong's avatar
Lulu Luong committed
13
<?import javafx.scene.image.Image?>
14
<BorderPane xmlns:fx="http://javafx.com/fxml/1" fx:id="rootPane" xmlns="http://javafx.com/javafx/8.0.112"
Alexander Weigl's avatar
Alexander Weigl committed
15
            fx:controller="edu.kit.iti.formal.psdbg.gui.controller.DebuggerMain"
Alexander Weigl's avatar
Alexander Weigl committed
16
            prefWidth="1024" prefHeight="640">
17
    <center>
Alexander Weigl's avatar
Alexander Weigl committed
18
19
20
21
        <!--  <DockStation fx:id="dockStation">

          </DockStation>-->

Lulu Luong's avatar
Lulu Luong committed
22

Alexander Weigl's avatar
Alexander Weigl committed
23
24
25
        <DockPane fx:id="dockStation"/>

        <!--
26
27
        <SplitPane fx:id="splitPane" dividerPositions="0.5" layoutY="29.0" prefHeight="371.0" prefWidth="600.0">
            <items>
28
29
                <VBox>
                    <children>
Alexander Weigl's avatar
Alexander Weigl committed
30
31
32
33
34

                     ScriptControllerPane fx:id="tabPane" side="left" styleClass="tab-pane"
                                       tabClosingPolicy="SELECTED_TAB" VBox.vgrow="ALWAYS"/>
                    </children>
                </VBox>
Alexander Weigl's avatar
Alexander Weigl committed
35
                <InspectionViewsController fx:id="inspectionViewsController"></InspectionViewsController>
Alexander Weigl's avatar
Alexander Weigl committed
36
37
38
39
40
41
42
43
44
            </items>
        </SplitPane>-->
    </center>
    <top>
        <VBox>
            <children>
                <MenuBar fx:id="menuBar">
                    <menus>
                        <Menu fx:id="fileMenu" text="File">
45
                            <items>
Alexander Weigl's avatar
Alexander Weigl committed
46
47
48
49
                                <MenuItem fx:id="newScriptMenuItem" onAction="#newScript" text="_New Script"
                                          accelerator="Shortcut+n"/>
                                <MenuItem fx:id="openScriptFileMenuItem" onAction="#openScript" text="_Open Script"
                                          accelerator="Shortcut+o"/>
Alexander Weigl's avatar
Alexander Weigl committed
50
                                <SeparatorMenuItem/>
Alexander Weigl's avatar
Alexander Weigl committed
51
52
53
54
                                <MenuItem fx:id="loadKeYFileMenuItem" onAction="#loadKeYFile" text="Load _KeY File"
                                          accelerator="Shortcut+Alt+o"/>
                                <MenuItem fx:id="loadJavaFileMenuItem" onAction="#loadJavaFile" text="Load _Java File"
                                          accelerator="Shortcut+Shift+o"/>
Alexander Weigl's avatar
Alexander Weigl committed
55
                                <SeparatorMenuItem/>
56
                                <MenuItem onAction="#saveScript" text="_Save Script" accelerator="Shortcut+s"/>
Alexander Weigl's avatar
Alexander Weigl committed
57
58
                                <MenuItem onAction="#saveAsScript" text="Save Script _As ..."
                                          accelerator="Shortcut+Shift+s"/>
59
                                <MenuItem onAction="#saveProof" text="_Save Proof" accelerator="Shortcut+Alt+s"/>
Alexander Weigl's avatar
Alexander Weigl committed
60
61
                                <MenuItem fx:id="closeMenuItem" onAction="#closeProgram" text="_Close"
                                          accelerator="Shortcut+q"/>
Alexander Weigl's avatar
Alexander Weigl committed
62
63
64
65
                            </items>
                        </Menu>
                        <Menu text="Edit">
                            <items>
Alexander Weigl's avatar
Alexander Weigl committed
66
                                <MenuItem text="Open in KeY" onAction="#openInKey"/>
Alexander Weigl's avatar
Alexander Weigl committed
67
                                <MenuItem text="Delete"/>
68
                                <MenuItem text="Reformat" accelerator="Ctrl+Shift+f" onAction="#reformatCurrentEditor"/>
Alexander Weigl's avatar
Alexander Weigl committed
69
70
71
                                <MenuItem text="Print Debug Information" onAction="#debugPrintDot"
                                          accelerator="Ctrl+d"
                                />
Alexander Weigl's avatar
Alexander Weigl committed
72
73
                            </items>
                        </Menu>
74
75
76
77
78
79
80
81
82
                        <Menu text="Debug">
                            <MenuItem onAction="#executeScript"
                                      text="Execute"
                                      accelerator="F2"
                                      disable="${controller.executeNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="PLAY" size="24.0"/>
                                </graphic>
                            </MenuItem>
Alexander Weigl's avatar
Alexander Weigl committed
83
84
85
                            <Menu text="Execute from Savepoint" fx:id="menuExecuteFromSavepoint" />
                            <Menu text="Restart to Savepoint" fx:id="menuRestartFromSavepoint" />

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
                            <MenuItem text="Debug stepwise"
                                      accelerator="F3"
                                      onAction="#executeStepwise"
                                      disable="${controller.executeNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="PLAY_PAUSE" size="24.0"/>
                                </graphic>
                            </MenuItem>
                            <MenuItem
                                    accelerator="F4"
                                    text="Run to Breakpoint"
                                    onAction="#executeToBreakpoint"
                                    disable="${controller.executeNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="FAST_FORWARD" size="24.0"/>
                                </graphic>
                            </MenuItem>

                            <MenuItem onAction="#stepInto"
                                      accelerator="F5"
                                      text="Step Into"
                                      disable="${controller.stepNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="DEBUG_STEP_INTO" size="24.0"/>
                                </graphic>
                            </MenuItem>

                            <MenuItem onAction="#stepOver"
                                      accelerator="F6"
                                      text="Step Over"
                                      disable="${controller.stepNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0"/>
                                </graphic>
                            </MenuItem>

Sarah Grebing's avatar
Sarah Grebing committed
122
                            <MenuItem onAction="#stepOverReverse"
123
124
                                      accelerator="F7"

Sarah Grebing's avatar
Sarah Grebing committed
125
126
127
128
129
130
131
132
133
134
135
                                      text="Step Over Reverse"
                                      disable="${controller.stepNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0" scaleX="-1"/>
                                </graphic>
                            </MenuItem>

                            <MenuItem onAction="#stepIntoReverse"
                                      accelerator="F8"

                                      text="Step Into Reverse"
136
137
138
139
140
141
142
143
                                      disable="${controller.stepNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0" scaleX="-1"/>
                                </graphic>
                            </MenuItem>


                            <MenuItem disable="${controller.stepNotPossible}"
Sarah Grebing's avatar
Sarah Grebing committed
144
                                      accelerator="F9"
145
146
147
148
149
150
151
152
                                      text="Step Out">
                                <graphic>
                                    <MaterialDesignIconView glyphName="DEBUG_STEP_OUT" size="24.0"/>
                                </graphic>
                            </MenuItem>

                            <MenuItem onAction="#stopDebugMode"
                                      accelerator="F12"
Sarah Grebing's avatar
Sarah Grebing committed
153
                                      text="Stop Debugging"
154
155
156
157
158
159
160
                                      disable="${controller.stepNotPossible}">
                                <!--disable="${! controller.debugMode}"-->
                                <graphic>
                                    <MaterialDesignIconView glyphName="STOP" size="24.0"/>
                                </graphic>
                            </MenuItem>
                        </Menu>
Alexander Weigl's avatar
Alexander Weigl committed
161
162
                        <Menu text="View">
                            <items>
163
164
                                <CheckMenuItem fx:id="miCodeDock" onAction="#showCodeDock" text="Show Java Code window"
                                               accelerator="Ctrl+J">
Alexander Weigl's avatar
Alexander Weigl committed
165
166
167
                                    <graphic>
                                        <MaterialDesignIconView glyphName="CODE_TAGS" size="24.0"/>
                                    </graphic>
Alexander Weigl's avatar
Alexander Weigl committed
168
                                </CheckMenuItem>
Alexander Weigl's avatar
Alexander Weigl committed
169
                                <CheckMenuItem fx:id="miWelcomeDock" onAction="#showWelcomeDock"
170
                                               text="Show Welcome window" accelerator="Ctrl+w">
Alexander Weigl's avatar
Alexander Weigl committed
171
172
173
                                    <graphic>
                                        <MaterialDesignIconView glyphName="HELP_CIRCLE" size="24.0"/>
                                    </graphic>
Alexander Weigl's avatar
Alexander Weigl committed
174
                                </CheckMenuItem>
Alexander Weigl's avatar
Alexander Weigl committed
175
                                <CheckMenuItem fx:id="miActiveInspector" onAction="#showActiveInspector"
176
                                               text="Show Active Inspector window" accelerator="Ctrl+I">
Alexander Weigl's avatar
Alexander Weigl committed
177
178
179
                                    <graphic>
                                        <MaterialDesignIconView glyphName="MAGNIFY" size="24.0"/>
                                    </graphic>
Alexander Weigl's avatar
Alexander Weigl committed
180
                                </CheckMenuItem>
181
182
                                <CheckMenuItem fx:id="miProofTree" onAction="#showProofTree" text="Show Proof Tree"
                                               accelerator="Ctrl+t">
Alexander Weigl's avatar
Alexander Weigl committed
183
184
185
                                    <graphic>
                                        <MaterialDesignIconView glyphName="TREE" size="24.0"/>
                                    </graphic>
Lulu Luong's avatar
Lulu Luong committed
186
187
                                </CheckMenuItem>
                                <CheckMenuItem fx:id="miScriptTree" onAction="#showScriptTree" text="Show Script Tree">
Lulu Luong's avatar
Lulu Luong committed
188

Lulu Luong's avatar
Lulu Luong committed
189
                               <graphic>
Lulu Luong's avatar
Lulu Luong committed
190
191
192
193
194
195
196
                                   <ImageView>
                                   <image>
                                       <Image requestedHeight="22.0" requestedWidth="24.0"
                                               url="/edu/kit/iti/formal/psdbg/gui/icon/treescript.png"

                                       />
                                   </image>
Lulu Luong's avatar
Lulu Luong committed
197
198
                                   </ImageView>
                               </graphic>
Lulu Luong's avatar
Lulu Luong committed
199

Lulu Luong's avatar
Lulu Luong committed
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
                           </CheckMenuItem>
                           <CheckMenuItem fx:id="miCommandHelp" onAction="#showCommandHelp"
                                          accelerator="F1"
                                          text="Show Command Help">
                               <graphic>
                                   <MaterialDesignIconView glyphName="STACKEXCHANGE" size="24.0"/>
                               </graphic>
                           </CheckMenuItem>
                       </items>
                   </Menu>
                   <Menu fx:id="examplesMenu" text="_Examples">
                       <items>
                           <MenuItem text="Examples not loaded" disable="true"/>
                       </items>
                   </Menu>
                   <Menu text="Help">
                       <items>
                           <MenuItem text="About" onAction="#showAbout"/>
                       </items>
                   </Menu>
               </menus>
           </MenuBar>
           <ToolBar fx:id="toolbar">
               <items>
                   <SplitMenuButton fx:id="buttonStartInterpreter" onAction="#executeScript"
                                    disable="${controller.executeNotPossible}">
                       <graphic>
                           <MaterialDesignIconView glyphName="PLAY" size="24.0"/>
                       </graphic>
                       <tooltip>
                           <Tooltip text="Execute Script"/>
                       </tooltip>

                       <items>
                           <!-- <MenuItem text="Execute from Cursor"
                                      onAction="#executeScriptFromCursor"
                                      disable="${controller.executeNotPossible}">
                                <graphic>
                                    <MaterialDesignIconView glyphName="CURSOR_TEXT" size="24.0"/>
                                </graphic>
                            </MenuItem> -->
alexander.weigl's avatar
alexander.weigl committed
241

Alexander Weigl's avatar
Alexander Weigl committed
242
                                <MenuItem
243
                                        text="Execute Script Stepwise From Start"
244
                                        onAction="#executeStepwise"
Alexander Weigl's avatar
Alexander Weigl committed
245
                                        disable="${controller.executeNotPossible}">
Sarah Grebing's avatar
Sarah Grebing committed
246
                                    <graphic>
Alexander Weigl's avatar
Alexander Weigl committed
247
                                        <MaterialDesignIconView glyphName="PLAY_PAUSE" size="24.0"/>
Sarah Grebing's avatar
Sarah Grebing committed
248
                                    </graphic>
Alexander Weigl's avatar
Alexander Weigl committed
249
                                </MenuItem>
250
251
252
253
254
255
256
257
                                <MenuItem
                                        text="Run to Breakpoint"
                                        onAction="#executeToBreakpoint"
                                        disable="${controller.executeNotPossible}">
                                    <graphic>
                                        <MaterialDesignIconView glyphName="FAST_FORWARD" size="24.0"/>
                                    </graphic>
                                </MenuItem>
Alexander Weigl's avatar
Alexander Weigl committed
258
                            </items>
Sarah Grebing's avatar
Sarah Grebing committed
259

Alexander Weigl's avatar
Alexander Weigl committed
260
                        </SplitMenuButton>
Sarah Grebing's avatar
Sarah Grebing committed
261

Sarah Grebing's avatar
Sarah Grebing committed
262
263
264
265
266
267
268
269
                        <!--      <Button onAction="#reloadProblem" disable="${controller.executeNotPossible}">
                                  <graphic>
                                      <MaterialDesignIconView glyphName="REFRESH" size="24.0"/>
                                  </graphic>
                                  <tooltip>
                                      <Tooltip text="Reload Problem"/>
                                  </tooltip>
                              </Button>-->
270

271
272
273
274
275
276
277
278
279
                        <Button  disable="false">
                            <graphic>
                                <MaterialDesignIconView glyphName="KEYBOARD_BACKSPACE" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Prune to savepoint"/>
                            </tooltip>
                        </Button>

280
281
282
283
284
285
286
287
288
289
                        <Button onAction="#continueAfterRun" disable="${controller.executeNotPossible}">
                            <graphic>
                                <MaterialDesignIconView glyphName="PLAY_CIRCLE_OUTLINE" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Continue"/>
                            </tooltip>
                        </Button>


Alexander Weigl's avatar
Alexander Weigl committed
290
                        <Button onAction="#stepInto" disable="${controller.stepNotPossible}">
Alexander Weigl's avatar
Alexander Weigl committed
291
292
293
294
295
296
297
298
                            <graphic>
                                <MaterialDesignIconView glyphName="DEBUG_STEP_INTO" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Step Into"/>
                            </tooltip>
                        </Button>

299
                        <Button onAction="#stepOver" disable="${controller.stepNotPossible}">
Alexander Weigl's avatar
Alexander Weigl committed
300
301
302
303
304
305
306
307
                            <graphic>
                                <MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Step Over"/>
                            </tooltip>
                        </Button>

Sarah Grebing's avatar
Sarah Grebing committed
308
                        <Button onAction="#stepOverReverse" disable="${controller.stepNotPossible}">
Alexander Weigl's avatar
Alexander Weigl committed
309
310
311
312
                            <graphic>
                                <MaterialDesignIconView glyphName="DEBUG_STEP_OVER" size="24.0" scaleX="-1"/>
                            </graphic>
                            <tooltip>
313
                                <Tooltip text="Step Over Reverse"/>
Alexander Weigl's avatar
Alexander Weigl committed
314
315
316
317
                            </tooltip>
                        </Button>


318
                        <Button onAction="#stepIntoReverse" disable="${controller.stepNotPossible}">
Alexander Weigl's avatar
Alexander Weigl committed
319
320
321
322
                            <graphic>
                                <MaterialDesignIconView glyphName="DEBUG_STEP_OUT" size="24.0"/>
                            </graphic>
                            <tooltip>
323
                                <Tooltip text="Step Into Reverse"/>
Alexander Weigl's avatar
Alexander Weigl committed
324
325
326
                            </tooltip>
                        </Button>

327
                        <Button onAction="#stopDebugMode" disable="${controller.stepNotPossible}">
Sarah Grebing's avatar
Sarah Grebing committed
328
                            <!--disable="${! controller.debugMode}"-->
Alexander Weigl's avatar
Alexander Weigl committed
329
330
331
332
                            <graphic>
                                <MaterialDesignIconView glyphName="STOP" size="24.0"/>
                            </graphic>
                            <tooltip>
Sarah Grebing's avatar
Sarah Grebing committed
333
                                <Tooltip text="Stop Debugging"/>
Alexander Weigl's avatar
Alexander Weigl committed
334
                            </tooltip>
Sarah Grebing's avatar
Sarah Grebing committed
335
                        </Button>
Alexander Weigl's avatar
Alexander Weigl committed
336

337
                        <ToggleButton fx:id="btnInteractiveMode" onAction="#interactiveMode" disable="true">
338
339
340
341
342
343
344
                            <!--disable="${! controller.debugMode}"-->
                            <graphic>
                                <MaterialDesignIconView glyphName="HAND_POINTING_RIGHT" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Start/Stop Interactive Mode"/>
                            </tooltip>
345
                        </ToggleButton>
346

LULUDBR\Lulu's avatar
LULUDBR\Lulu committed
347
348
349
350
351
352
353
354
355
                        <Button fx:id="interactive_undo" onAction="#undo" disable="true">
                            <graphic>
                                <MaterialDesignIconView glyphName="UNDO" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Undo"/>
                            </tooltip>
                        </Button>

Alexander Weigl's avatar
Alexander Weigl committed
356
357
358
359
360
                        <Separator/>

                        <Label text="Rollback to: "/>
                        <ComboBox fx:id="cboSavePoints" disable="true"/>
                        <Button fx:id="btnSavePointRollback" onAction="#selectSavepoint" disable="true">
361
362
363
364
365
366
367
                            <graphic>
                                <MaterialDesignIconView glyphName="CHECK" size="22.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Select Savepoint"/>
                            </tooltip>
                        </Button>
Alexander Weigl's avatar
Alexander Weigl committed
368
369
                        <Separator/>

Alexander Weigl's avatar
Alexander Weigl committed
370
371
                        <Pane HBox.hgrow="ALWAYS"/>
                        <Label text="Windows:"/>
Alexander Weigl's avatar
Alexander Weigl committed
372
                        <ToggleButton fx:id="togBtnCodeDock" onAction="#showCodeDock">
Alexander Weigl's avatar
Alexander Weigl committed
373
374
375
376
377
378
379
                            <graphic>
                                <MaterialDesignIconView glyphName="CODE_TAGS" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Shows the Java Source Code"/>
                            </tooltip>
                        </ToggleButton>
Alexander Weigl's avatar
Alexander Weigl committed
380
                        <ToggleButton fx:id="togBtnWelcome" onAction="#showWelcomeDock">
Alexander Weigl's avatar
Alexander Weigl committed
381
382
383
384
385
386
387
                            <graphic>
                                <MaterialDesignIconView glyphName="HELP_CIRCLE" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Show Welcome window"/>
                            </tooltip>
                        </ToggleButton>
Alexander Weigl's avatar
Alexander Weigl committed
388
                        <ToggleButton fx:id="togBtnActiveInspector" onAction="#showActiveInspector">
Alexander Weigl's avatar
Alexander Weigl committed
389
390
391
392
393
394
395
                            <graphic>
                                <MaterialDesignIconView glyphName="MAGNIFY" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Show Active Inspector window"/>
                            </tooltip>
                        </ToggleButton>
Alexander Weigl's avatar
Alexander Weigl committed
396
                        <ToggleButton fx:id="togBtnProofTree" onAction="#showProofTree">
Alexander Weigl's avatar
Alexander Weigl committed
397
398
399
400
401
402
403
404
                            <graphic>
                                <!-- FILE-TREE-->
                                <MaterialDesignIconView glyphName="TREE" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Show Proof Tree"/>
                            </tooltip>
                        </ToggleButton>
Lulu Luong's avatar
Lulu Luong committed
405
406
407

                        <ToggleButton fx:id="togBtnScriptTree" onAction="#showScriptTree">
                            <graphic>
Lulu Luong's avatar
Lulu Luong committed
408
409
410
411
412
413
414
415
                                <ImageView>
                                    <image>
                                        <Image requestedHeight="22.0" requestedWidth="24.0"
                                               url="/edu/kit/iti/formal/psdbg/gui/icon/treescript.png"

                                        />
                                    </image>
                                </ImageView>
Lulu Luong's avatar
Lulu Luong committed
416
417
418
419
420
421
                            </graphic>
                            <tooltip>
                                <Tooltip text="Show Script Tree"/>
                            </tooltip>
                        </ToggleButton>

Alexander Weigl's avatar
Alexander Weigl committed
422
                        <ToggleButton fx:id="togBtnCommandHelp" onAction="#showCommandHelp">
Alexander Weigl's avatar
Alexander Weigl committed
423
424
425
426
427
428
429
                            <graphic>
                                <MaterialDesignIconView glyphName="STACKEXCHANGE" size="24.0"/>
                            </graphic>
                            <tooltip>
                                <Tooltip text="Show Command Help"/>
                            </tooltip>
                        </ToggleButton>
430
                    </items>
Alexander Weigl's avatar
Alexander Weigl committed
431
432
433
                </ToolBar>
            </children>
        </VBox>
434
    </top>
Alexander Weigl's avatar
Alexander Weigl committed
435
    <bottom>
436
        <DebuggerStatusBar fx:id="statusBar"/>
Alexander Weigl's avatar
Alexander Weigl committed
437
    </bottom>
438
</BorderPane>