--- a/VDBSettingsApplication.st Thu Jun 20 13:51:41 2019 +0100
+++ b/VDBSettingsApplication.st Thu Jun 20 16:11:12 2019 +0100
@@ -93,7 +93,7 @@
^
#(FullSpec
name: windowSpec
- uuid: 'fed33670-91af-11e9-b25b-606720e43e2c'
+ uuid: '44956520-937c-11e9-8e2a-606720e43e2c'
window:
(WindowSpec
label: 'Java Settings'
@@ -189,10 +189,91 @@
extent: (Point 675 25)
)
(ViewSpec
- name: 'Spacer'
+ name: 'Spacer2'
uuid: '7628c0d4-c755-11e8-8f9c-0021ccd5e3d3'
extent: (Point 675 15)
)
+ (ViewSpec
+ name: 'vdbinit'
+ uuid: '85b08540-936c-11e9-ac6c-606720e43e2c'
+ component:
+ (SpecCollection
+ collection: (
+ (LabelSpec
+ label: 'VDB init script'
+ name: 'Label1'
+ layout: (LayoutFrame 0 0 -1 0 0 1 24 0)
+ uuid: '85b08541-936c-11e9-ac6c-606720e43e2c'
+ translateLabel: true
+ adjust: left
+ )
+ (LinkButtonSpec
+ label: 'LinkButton'
+ name: 'EditPreferences'
+ layout: (LayoutFrame 0 0 28 0 -100 1 58 0)
+ uuid: '85b08542-936c-11e9-ac6c-606720e43e2c'
+ foregroundColor: (Color 0.0 0.0 100.0)
+ translateLabel: true
+ labelChannel: vdbinitAspect
+ adjust: left
+ model: doEditVDBinit
+ )
+ (ActionButtonSpec
+ label: 'Edit'
+ name: 'Button1'
+ layout: (LayoutFrame -106 1 33 0 -6 1 58 0)
+ uuid: '85b08543-936c-11e9-ac6c-606720e43e2c'
+ translateLabel: true
+ model: doEditVDBinit
+ )
+ )
+
+ )
+ extent: (Point 675 70)
+ )
+ (ViewSpec
+ name: 'Spacer3'
+ uuid: '7628c0d4-c755-11e8-8f9c-0021ccd5e3d3'
+ extent: (Point 675 15)
+ )
+ (ViewSpec
+ name: 'gdbinit'
+ uuid: '85b08544-936c-11e9-ac6c-606720e43e2c'
+ component:
+ (SpecCollection
+ collection: (
+ (LabelSpec
+ label: 'GDB init script'
+ name: 'Label2'
+ layout: (LayoutFrame 0 0 -1 0 0 1 24 0)
+ uuid: '85b08545-936c-11e9-ac6c-606720e43e2c'
+ translateLabel: true
+ adjust: left
+ )
+ (LinkButtonSpec
+ label: 'LinkButton'
+ name: 'Button2'
+ layout: (LayoutFrame 0 0 28 0 -100 1 58 0)
+ uuid: '85b08546-936c-11e9-ac6c-606720e43e2c'
+ foregroundColor: (Color 0.0 0.0 100.0)
+ translateLabel: true
+ labelChannel: gdbinitAspect
+ adjust: left
+ model: doEditGDBinit
+ )
+ (ActionButtonSpec
+ label: 'Edit'
+ name: 'Button3'
+ layout: (LayoutFrame -106 1 33 0 -6 1 58 0)
+ uuid: '85b08547-936c-11e9-ac6c-606720e43e2c'
+ translateLabel: true
+ model: doEditGDBinit
+ )
+ )
+
+ )
+ extent: (Point 675 70)
+ )
)
)
@@ -205,6 +286,44 @@
!VDBSettingsApplication methodsFor:'actions'!
+doEditGDBinit
+ <resource: #uiCallback>
+
+ WorkspaceApplication openOnFile: VDBDebuggerApplication gdbUserInitFile
+
+ "Modified: / 20-06-2019 / 16:28:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+doEditVDBinit
+ <resource: #uiCallback>
+
+ | user default userEditor defaultEditor workspaceView workspace |
+
+ user := VDBDebuggerApplication vdbUserInitFile.
+ default := VDBDebuggerApplication vdbDefaultInitFile.
+ user exists ifFalse:[
+ default copyTo: user.
+ ].
+
+ userEditor := Tools::CodeView2 new.
+ userEditor contents: user contents.
+
+ defaultEditor := Tools::CodeView2 new.
+ defaultEditor contents: default contents.
+ defaultEditor readOnly: true.
+
+ workspaceView := VariableHorizontalPanel new.
+ workspaceView addComponent: userEditor.
+ workspaceView addComponent: defaultEditor.
+
+ workspace := WorkspaceApplication new.
+ workspace workspaces add: workspaceView.
+ workspace open.
+ workspace window label: (resources string: '.vdbinit.st - User : vdbinit.st - Default')
+
+ "Modified: / 20-06-2019 / 18:12:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
doSelectExecutable
| guess executable |
@@ -261,6 +380,14 @@
"Modified: / 18-06-2019 / 11:16:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+gdbinitAspect
+ <resource: #uiAspect>
+
+ ^ VDBDebuggerApplication gdbUserInitFile pathName
+
+ "Modified: / 20-06-2019 / 16:24:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
infoPanel
infoPanel isNil ifTrue:[
infoPanel := Tools::InlineMessageDialog new.
@@ -268,6 +395,14 @@
^ infoPanel
"Created: / 10-04-2018 / 16:52:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+vdbinitAspect
+ <resource: #uiAspect>
+
+ ^ VDBDebuggerApplication vdbUserInitFile pathName
+
+ "Modified: / 20-06-2019 / 16:25:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBSettingsApplication methodsFor:'checks'!