Added VDBInferiorConsoleApplication to display debugee's input/output.
--- a/Make.proto Sat Jun 07 14:42:45 2014 +0100
+++ b/Make.proto Mon Jun 09 10:57:26 2014 +0100
@@ -126,13 +126,14 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)VDBAbstractApplication.$(O) VDBAbstractApplication.$(H): VDBAbstractApplication.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
-$(OUTDIR)VDBConsoleView.$(O) VDBConsoleView.$(H): VDBConsoleView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(STCHDR)
+$(OUTDIR)VDBDebuggerConsoleView.$(O) VDBDebuggerConsoleView.$(H): VDBDebuggerConsoleView.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libwidg/EditTextView.$(H) $(INCLUDE_TOP)/stx/libwidg/ListView.$(H) $(INCLUDE_TOP)/stx/libwidg/TextCollector.$(H) $(INCLUDE_TOP)/stx/libwidg/TextView.$(H) $(STCHDR)
$(OUTDIR)VDBInternalPipeStream.$(O) VDBInternalPipeStream.$(H): VDBInternalPipeStream.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(STCHDR)
$(OUTDIR)jv_vdb.$(O) jv_vdb.$(H): jv_vdb.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)VDBAbstractContainer.$(O) VDBAbstractContainer.$(H): VDBAbstractContainer.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
-$(OUTDIR)VDBConsoleApplication.$(O) VDBConsoleApplication.$(H): VDBConsoleApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
$(OUTDIR)VDBDebuggerApplication.$(O) VDBDebuggerApplication.$(H): VDBDebuggerApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
+$(OUTDIR)VDBDebuggerConsoleApplication.$(O) VDBDebuggerConsoleApplication.$(H): VDBDebuggerConsoleApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
$(OUTDIR)VDBEventLogApplication.$(O) VDBEventLogApplication.$(H): VDBEventLogApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
+$(OUTDIR)VDBInferiorConsoleApplication.$(O) VDBInferiorConsoleApplication.$(H): VDBInferiorConsoleApplication.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
$(OUTDIR)VDBTabbingContainer.$(O) VDBTabbingContainer.$(H): VDBTabbingContainer.st $(INCLUDE_TOP)/jv/vdb/VDBAbstractApplication.$(H) $(INCLUDE_TOP)/jv/vdb/VDBAbstractContainer.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/Make.spec Sat Jun 07 14:42:45 2014 +0100
+++ b/Make.spec Mon Jun 09 10:57:26 2014 +0100
@@ -51,13 +51,14 @@
COMMON_CLASSES= \
VDBAbstractApplication \
- VDBConsoleView \
+ VDBDebuggerConsoleView \
VDBInternalPipeStream \
jv_vdb \
VDBAbstractContainer \
- VDBConsoleApplication \
VDBDebuggerApplication \
+ VDBDebuggerConsoleApplication \
VDBEventLogApplication \
+ VDBInferiorConsoleApplication \
VDBTabbingContainer \
@@ -65,13 +66,14 @@
COMMON_OBJS= \
$(OUTDIR_SLASH)VDBAbstractApplication.$(O) \
- $(OUTDIR_SLASH)VDBConsoleView.$(O) \
+ $(OUTDIR_SLASH)VDBDebuggerConsoleView.$(O) \
$(OUTDIR_SLASH)VDBInternalPipeStream.$(O) \
$(OUTDIR_SLASH)jv_vdb.$(O) \
$(OUTDIR_SLASH)VDBAbstractContainer.$(O) \
- $(OUTDIR_SLASH)VDBConsoleApplication.$(O) \
$(OUTDIR_SLASH)VDBDebuggerApplication.$(O) \
+ $(OUTDIR_SLASH)VDBDebuggerConsoleApplication.$(O) \
$(OUTDIR_SLASH)VDBEventLogApplication.$(O) \
+ $(OUTDIR_SLASH)VDBInferiorConsoleApplication.$(O) \
$(OUTDIR_SLASH)VDBTabbingContainer.$(O) \
--- a/VDBAbstractContainer.st Sat Jun 07 14:42:45 2014 +0100
+++ b/VDBAbstractContainer.st Mon Jun 09 10:57:26 2014 +0100
@@ -7,3 +7,11 @@
category:'VDB-UI-Abstract'
!
+
+!VDBAbstractContainer class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- a/VDBConsoleApplication.st Sat Jun 07 14:42:45 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-"{ Package: 'jv:vdb' }"
-
-VDBAbstractApplication subclass:#VDBConsoleApplication
- instanceVariableNames:'consoleView'
- classVariableNames:''
- poolDictionaries:''
- category:'VDB-UI-Console'
-!
-
-
-!VDBConsoleApplication class methodsFor:'interface specs'!
-
-windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:VDBConsoleApplication andSelector:#windowSpec
- VDBConsoleApplication new openInterface:#windowSpec
- VDBConsoleApplication open
- "
-
- <resource: #canvas>
-
- ^
- #(FullSpec
- name: windowSpec
- window:
- (WindowSpec
- label: 'VDB Console'
- name: 'VDB Console'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 782 332)
- )
- component:
- (SpecCollection
- collection: (
- (ArbitraryComponentSpec
- name: 'Console'
- layout: (LayoutFrame 0 0 0 0 0 1 0 1)
- hasBorder: false
- component: consoleView
- )
- )
-
- )
- )
-! !
-
-!VDBConsoleApplication class methodsFor:'plugIn spec'!
-
-aspectSelectors
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this. If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "Return a description of exported aspects;
- these can be connected to aspects of an embedding application
- (if this app is embedded in a subCanvas)."
-
- ^ #(
- #debuggerHolder
- ).
-
-! !
-
-!VDBConsoleApplication methodsFor:'aspects'!
-
-consoleView
- consoleView isNil ifTrue:[
- consoleView := VDBConsoleView new.
- consoleView debuggerHolder: self debuggerHolder.
- ].
- ^ consoleView
-
- "Created: / 06-06-2014 / 21:33:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-debuggerHolder:aValueModel
- super debuggerHolder:aValueModel.
- self consoleView debuggerHolder:aValueModel
-
- "Created: / 06-06-2014 / 22:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleApplication class methodsFor:'documentation'!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-! !
-
--- a/VDBConsoleView.st Sat Jun 07 14:42:45 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-"{ Package: 'jv:vdb' }"
-
-TextCollector subclass:#VDBConsoleView
- instanceVariableNames:'debuggerHolder debugger'
- classVariableNames:'Prompt'
- poolDictionaries:''
- category:'VDB-UI-Console'
-!
-
-!VDBConsoleView class methodsFor:'initialization'!
-
-initialize
- "Invoked at system start or when the class is dynamically loaded."
-
- "/ please change as required (and remove this comment)
-
- Prompt := '(gdb) '.
-
- "Modified: / 06-06-2014 / 22:45:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'aspects'!
-
-debuggerHolder
- "return/create the 'debuggerHolder' value holder (automatically generated)"
-
- debuggerHolder isNil ifTrue:[
- debuggerHolder := ValueHolder new.
- debuggerHolder addDependent:self.
- ].
- ^ debuggerHolder
-!
-
-debuggerHolder:aValueModel
- "set the 'debuggerHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- debuggerHolder notNil ifTrue:[
- oldValue := debuggerHolder value.
- debuggerHolder removeDependent:self.
- ].
- debuggerHolder := aValueModel.
- debuggerHolder notNil ifTrue:[
- debuggerHolder addDependent:self.
- ].
- newValue := debuggerHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:debuggerHolder.
- ].
-! !
-
-!VDBConsoleView methodsFor:'change & update'!
-
-update:something with:aParameter from:changedObject
- "Invoked when an object that I depend upon sends a change notification."
-
- changedObject == debuggerHolder ifTrue:[
- debuggerHolder value == debugger ifFalse:[
- debugger notNil ifTrue:[
- self unsubscribe.
- ].
- debugger := debuggerHolder value.
- debugger notNil ifTrue:[
- self subscribe.
- ].
- ].
- ^ self.
- ].
- super update:something with:aParameter from:changedObject
-
- "Modified: / 06-06-2014 / 22:10:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'cursor handling'!
-
-cursorMovementAllowed
- "return true, if the user may move the cursor around
- (via button-click, or cursor-key with selection).
- Here false is returned - the cursor is only moved by
- cursor positioning escape sequences arriving from the
- stream."
-
- ^ false
-
- "Created: / 07-06-2014 / 01:18:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'event handling'!
-
-keyPress: key x: x y: y
-
- self cursorLine < self list size ifTrue:[
- ^ self.
- ].
-
- key == #CursorLeft ifTrue:[
- (self cursorCol) > (Prompt size + 2) ifTrue:[
- ^ super keyPress: key x: x y: y
- ].
- ^ self
- ].
-
-
- key == #CursorUp ifTrue:[
- self keyPressCursorUp.
- ^ self
- ].
- key == #CursorDown ifTrue:[
- self keyPressCursorDown.
- ^ self.
- ].
- key == #Return ifTrue:[
- self keyPressReturn.
- ^ super keyPress: key x: x y: y
- ].
-
- ^ super keyPress: key x: x y: y
-
- "Created: / 06-06-2014 / 22:33:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 07-06-2014 / 01:22:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-keyPressCursorDown
-
- "Created: / 06-06-2014 / 22:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-keyPressCursorUp
-
- "Created: / 06-06-2014 / 22:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-keyPressReturn
- | command |
-
- command := self list at: self cursorLine.
- command isEmptyOrNil ifTrue:[ ^ self ].
- command := command copyFrom: Prompt size + 1.
- command isEmptyOrNil ifTrue:[
- self showPrompt.
- ] ifFalse:[
- debugger send: (GDBCLICommand new value: command) wait: false.
- ].
-
- "Created: / 06-06-2014 / 22:36:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-onCommandEvent: event
-
- "Created: / 06-06-2014 / 22:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-onCommandResultEvent: event
- self showPrompt.
-
- "Created: / 06-06-2014 / 22:44:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-onConsoleOutputEvent: event
- self show: event value
-
- "Created: / 06-06-2014 / 21:45:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-onTargetOutputEvent: event
- self show: event value
-
- "Created: / 06-06-2014 / 21:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'initialization & release'!
-
-initialize
- super initialize.
- self showPrompt.
-
- "Created: / 06-06-2014 / 22:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-subscribe
- "Register for debugger events. To be overrided by subclasses"
-
- debugger announcer
- when: GDBCommandEvent send: #onCommandEvent: to: self;
- when: GDBCommandResultEvent send: #onCommandResultEvent: to: self;
-
- when: GDBConsoleOutputEvent send: #onConsoleOutputEvent: to: self;
- when: GDBTargetOutputEvent send: #onTargetOutputEvent: to: self.
-
- "Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-unsubscribe
- "Unsubscribe myself fo debugger events"
-
- debugger announcer unsubscribe: self.
- debugger := nil.
-
- "Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'selection handling'!
-
-autoMoveCursorToEndOfSelection
- "Redefined to return false since the cursor should
- not be affected by selecting"
-
- ^ false
-
- "Created: / 07-06-2014 / 01:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!VDBConsoleView methodsFor:'stream messages'!
-
-showPrompt
- self nextPutAll: Prompt
-
- "Created: / 06-06-2014 / 22:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-
-VDBConsoleView initialize!
--- a/VDBDebuggerApplication.st Sat Jun 07 14:42:45 2014 +0100
+++ b/VDBDebuggerApplication.st Mon Jun 09 10:57:26 2014 +0100
@@ -43,7 +43,7 @@
level: 0
hasHorizontalScrollBar: false
hasVerticalScrollBar: false
- majorKey: VDBConsoleApplication
+ majorKey: VDBDebuggerConsoleApplication
subAspectHolders:
(Array
@@ -59,6 +59,8 @@
)
)
+
+ "Modified: / 09-06-2014 / 09:56:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBDebuggerApplication class methodsFor:'plugIn spec'!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBDebuggerConsoleApplication.st Mon Jun 09 10:57:26 2014 +0100
@@ -0,0 +1,80 @@
+"{ Package: 'jv:vdb' }"
+
+VDBAbstractApplication subclass:#VDBDebuggerConsoleApplication
+ instanceVariableNames:'consoleView'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-UI-Console'
+!
+
+
+!VDBDebuggerConsoleApplication class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:VDBConsoleApplication andSelector:#windowSpec
+ VDBConsoleApplication new openInterface:#windowSpec
+ VDBConsoleApplication open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'Debugger Console'
+ name: 'Debugger Console'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 782 332)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (ArbitraryComponentSpec
+ name: 'Console'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ hasBorder: false
+ component: consoleView
+ )
+ )
+
+ )
+ )
+
+ "Modified: / 09-06-2014 / 09:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleApplication methodsFor:'aspects'!
+
+consoleView
+ consoleView isNil ifTrue:[
+ consoleView := VDBDebuggerConsoleView new.
+ consoleView debuggerHolder: self debuggerHolder.
+ ].
+ ^ consoleView
+
+ "Created: / 09-06-2014 / 10:11:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+debuggerHolder:aValueModel
+ super debuggerHolder:aValueModel.
+ self consoleView debuggerHolder:aValueModel
+
+ "Created: / 06-06-2014 / 22:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleApplication class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBDebuggerConsoleView.st Mon Jun 09 10:57:26 2014 +0100
@@ -0,0 +1,223 @@
+"{ Package: 'jv:vdb' }"
+
+TextCollector subclass:#VDBDebuggerConsoleView
+ instanceVariableNames:'debuggerHolder debugger'
+ classVariableNames:'Prompt'
+ poolDictionaries:''
+ category:'VDB-UI-Console'
+!
+
+!VDBDebuggerConsoleView class methodsFor:'initialization'!
+
+initialize
+ "Invoked at system start or when the class is dynamically loaded."
+
+ "/ please change as required (and remove this comment)
+
+ Prompt := '(gdb) '.
+
+ "Modified: / 06-06-2014 / 22:45:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'aspects'!
+
+debuggerHolder
+ "return/create the 'debuggerHolder' value holder (automatically generated)"
+
+ debuggerHolder isNil ifTrue:[
+ debuggerHolder := ValueHolder new.
+ debuggerHolder addDependent:self.
+ ].
+ ^ debuggerHolder
+!
+
+debuggerHolder:aValueModel
+ "set the 'debuggerHolder' value holder (automatically generated)"
+
+ |oldValue newValue|
+
+ debuggerHolder notNil ifTrue:[
+ oldValue := debuggerHolder value.
+ debuggerHolder removeDependent:self.
+ ].
+ debuggerHolder := aValueModel.
+ debuggerHolder notNil ifTrue:[
+ debuggerHolder addDependent:self.
+ ].
+ newValue := debuggerHolder value.
+ oldValue ~~ newValue ifTrue:[
+ self update:#value with:newValue from:debuggerHolder.
+ ].
+! !
+
+!VDBDebuggerConsoleView methodsFor:'change & update'!
+
+update:something with:aParameter from:changedObject
+ "Invoked when an object that I depend upon sends a change notification."
+
+ changedObject == debuggerHolder ifTrue:[
+ debuggerHolder value == debugger ifFalse:[
+ debugger notNil ifTrue:[
+ self unsubscribe.
+ ].
+ debugger := debuggerHolder value.
+ debugger notNil ifTrue:[
+ self subscribe.
+ ].
+ ].
+ ^ self.
+ ].
+ super update:something with:aParameter from:changedObject
+
+ "Modified: / 06-06-2014 / 22:10:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'cursor handling'!
+
+cursorMovementAllowed
+ "return true, if the user may move the cursor around
+ (via button-click, or cursor-key with selection).
+ Here false is returned - the cursor is only moved by
+ cursor positioning escape sequences arriving from the
+ stream."
+
+ ^ false
+
+ "Created: / 07-06-2014 / 01:18:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'event handling'!
+
+keyPress: key x: x y: y
+
+ self cursorLine < self list size ifTrue:[
+ ^ self.
+ ].
+
+ key == #CursorLeft ifTrue:[
+ (self cursorCol) > (Prompt size + 2) ifTrue:[
+ ^ super keyPress: key x: x y: y
+ ].
+ ^ self
+ ].
+
+
+ key == #CursorUp ifTrue:[
+ self keyPressCursorUp.
+ ^ self
+ ].
+ key == #CursorDown ifTrue:[
+ self keyPressCursorDown.
+ ^ self.
+ ].
+ key == #Return ifTrue:[
+ self keyPressReturn.
+ ^ super keyPress: key x: x y: y
+ ].
+
+ ^ super keyPress: key x: x y: y
+
+ "Created: / 06-06-2014 / 22:33:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 07-06-2014 / 01:22:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+keyPressCursorDown
+
+ "Created: / 06-06-2014 / 22:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+keyPressCursorUp
+
+ "Created: / 06-06-2014 / 22:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+keyPressReturn
+ | command |
+
+ command := self list at: self cursorLine.
+ command isEmptyOrNil ifTrue:[ ^ self ].
+ command := command copyFrom: Prompt size + 1.
+ command isEmptyOrNil ifTrue:[
+ self showPrompt.
+ ] ifFalse:[
+ debugger send: (GDBCLICommand new value: command) wait: false.
+ ].
+
+ "Created: / 06-06-2014 / 22:36:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onCommandEvent: event
+
+ "Created: / 06-06-2014 / 22:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onCommandResultEvent: event
+ self showPrompt.
+
+ "Created: / 06-06-2014 / 22:44:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onConsoleOutputEvent: event
+ self show: event value
+
+ "Created: / 06-06-2014 / 21:45:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onTargetOutputEvent: event
+ self show: event value
+
+ "Created: / 06-06-2014 / 21:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'initialization & release'!
+
+initialize
+ super initialize.
+ self showPrompt.
+
+ "Created: / 06-06-2014 / 22:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+subscribe
+ "Register for debugger events. To be overrided by subclasses"
+
+ debugger announcer
+ when: GDBCommandEvent send: #onCommandEvent: to: self;
+ when: GDBCommandResultEvent send: #onCommandResultEvent: to: self;
+
+ when: GDBConsoleOutputEvent send: #onConsoleOutputEvent: to: self;
+ when: GDBTargetOutputEvent send: #onTargetOutputEvent: to: self.
+
+ "Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+unsubscribe
+ "Unsubscribe myself fo debugger events"
+
+ debugger announcer unsubscribe: self.
+ debugger := nil.
+
+ "Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'selection handling'!
+
+autoMoveCursorToEndOfSelection
+ "Redefined to return false since the cursor should
+ not be affected by selecting"
+
+ ^ false
+
+ "Created: / 07-06-2014 / 01:20:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBDebuggerConsoleView methodsFor:'stream messages'!
+
+showPrompt
+ self nextPutAll: Prompt
+
+ "Created: / 06-06-2014 / 22:41:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+
+VDBDebuggerConsoleView initialize!
--- a/VDBEventLogApplication.st Sat Jun 07 14:42:45 2014 +0100
+++ b/VDBEventLogApplication.st Mon Jun 09 10:57:26 2014 +0100
@@ -178,8 +178,9 @@
!VDBEventLogApplication methodsFor:'menu queries'!
hasEventSelectedHolder
- ^ (AspectAdaptor forAspect:#notEmptyNil) subjectChannel: self eventSelectionHolder
+ ^ (AspectAdaptor forAspect:#notEmptyOrNil) subjectChannel: self eventSelectionHolder
"Created: / 07-06-2014 / 14:37:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 09-06-2014 / 10:16:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/VDBInferiorConsoleApplication.st Mon Jun 09 10:57:26 2014 +0100
@@ -0,0 +1,85 @@
+"{ Package: 'jv:vdb' }"
+
+VDBAbstractApplication subclass:#VDBInferiorConsoleApplication
+ instanceVariableNames:'consoleView'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'VDB-UI-Console'
+!
+
+!VDBInferiorConsoleApplication class methodsFor:'interface specs'!
+
+windowSpec
+ "This resource specification was automatically generated
+ by the UIPainter of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIPainter may not be able to read the specification."
+
+ "
+ UIPainter new openOnClass:VDBConsoleApplication andSelector:#windowSpec
+ VDBConsoleApplication new openInterface:#windowSpec
+ VDBConsoleApplication open
+ "
+
+ <resource: #canvas>
+
+ ^
+ #(FullSpec
+ name: windowSpec
+ window:
+ (WindowSpec
+ label: 'Inferior Console'
+ name: 'Inferior Console'
+ min: (Point 10 10)
+ bounds: (Rectangle 0 0 782 332)
+ )
+ component:
+ (SpecCollection
+ collection: (
+ (ArbitraryComponentSpec
+ name: 'Console'
+ layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+ hasBorder: false
+ component: consoleView
+ )
+ )
+
+ )
+ )
+
+ "Modified: / 09-06-2014 / 09:57:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBInferiorConsoleApplication methodsFor:'aspects'!
+
+consoleView
+ consoleView isNil ifTrue:[
+ consoleView :=VT100TerminalView new.
+ debugger notNil ifTrue:[
+ consoleView inStream: debugger inferiorStdin.
+ consoleView outStream: debugger inferiorStdout.
+ consoleView startReaderProcessWhenVisible.
+ ].
+ ].
+ ^ consoleView
+
+ "Created: / 06-06-2014 / 21:33:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 09-06-2014 / 10:02:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!VDBInferiorConsoleApplication methodsFor:'initialization & release'!
+
+unsubscribe
+ "Unsubscribe myself fo debugger events"
+
+ super unsubscribe.
+ consoleView notNil ifTrue:[
+ consoleView stopReaderProcess.
+ consoleView inStream: nil.
+ consoleView outStream: nil.
+ ].
+
+ "Created: / 09-06-2014 / 10:09:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/abbrev.stc Sat Jun 07 14:42:45 2014 +0100
+++ b/abbrev.stc Mon Jun 09 10:57:26 2014 +0100
@@ -2,11 +2,12 @@
# this file is needed for stc to be able to compile modules independently.
# it provides information about a classes filename, category and especially namespace.
VDBAbstractApplication VDBAbstractApplication jv:vdb 'VDB-UI-Abstract' 1
-VDBConsoleView VDBConsoleView jv:vdb 'VDB-UI-Console' 2
+VDBDebuggerConsoleView VDBDebuggerConsoleView jv:vdb 'VDB-UI-Console' 2
VDBInternalPipeStream VDBInternalPipeStream jv:vdb 'VDB-Support' 0
jv_vdb jv_vdb jv:vdb '* Projects & Packages *' 3
VDBAbstractContainer VDBAbstractContainer jv:vdb 'VDB-UI-Abstract' 1
-VDBConsoleApplication VDBConsoleApplication jv:vdb 'VDB-UI-Console' 1
VDBDebuggerApplication VDBDebuggerApplication jv:vdb 'VGB-UI' 1
+VDBDebuggerConsoleApplication VDBDebuggerConsoleApplication jv:vdb 'VDB-UI-Console' 1
VDBEventLogApplication VDBEventLogApplication jv:vdb 'VDB-UI-Events' 1
+VDBInferiorConsoleApplication VDBInferiorConsoleApplication jv:vdb 'VDB-UI-Console' 1
VDBTabbingContainer VDBTabbingContainer jv:vdb 'VDB-UI-Containers' 1
--- a/bc.mak Sat Jun 07 14:42:45 2014 +0100
+++ b/bc.mak Mon Jun 09 10:57:26 2014 +0100
@@ -72,13 +72,14 @@
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)VDBAbstractApplication.$(O) VDBAbstractApplication.$(H): VDBAbstractApplication.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
-$(OUTDIR)VDBConsoleView.$(O) VDBConsoleView.$(H): VDBConsoleView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(STCHDR)
+$(OUTDIR)VDBDebuggerConsoleView.$(O) VDBDebuggerConsoleView.$(H): VDBDebuggerConsoleView.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libwidg\EditTextView.$(H) $(INCLUDE_TOP)\stx\libwidg\ListView.$(H) $(INCLUDE_TOP)\stx\libwidg\TextCollector.$(H) $(INCLUDE_TOP)\stx\libwidg\TextView.$(H) $(STCHDR)
$(OUTDIR)VDBInternalPipeStream.$(O) VDBInternalPipeStream.$(H): VDBInternalPipeStream.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(STCHDR)
$(OUTDIR)jv_vdb.$(O) jv_vdb.$(H): jv_vdb.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
$(OUTDIR)VDBAbstractContainer.$(O) VDBAbstractContainer.$(H): VDBAbstractContainer.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
-$(OUTDIR)VDBConsoleApplication.$(O) VDBConsoleApplication.$(H): VDBConsoleApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
$(OUTDIR)VDBDebuggerApplication.$(O) VDBDebuggerApplication.$(H): VDBDebuggerApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
+$(OUTDIR)VDBDebuggerConsoleApplication.$(O) VDBDebuggerConsoleApplication.$(H): VDBDebuggerConsoleApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
$(OUTDIR)VDBEventLogApplication.$(O) VDBEventLogApplication.$(H): VDBEventLogApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
+$(OUTDIR)VDBInferiorConsoleApplication.$(O) VDBInferiorConsoleApplication.$(H): VDBInferiorConsoleApplication.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
$(OUTDIR)VDBTabbingContainer.$(O) VDBTabbingContainer.$(H): VDBTabbingContainer.st $(INCLUDE_TOP)\jv\vdb\VDBAbstractApplication.$(H) $(INCLUDE_TOP)\jv\vdb\VDBAbstractContainer.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/jv_vdb.st Sat Jun 07 14:42:45 2014 +0100
+++ b/jv_vdb.st Mon Jun 09 10:57:26 2014 +0100
@@ -29,9 +29,9 @@
^ #(
#'stx:libbasic' "LibraryDefinition - superclass of jv_vdb "
- #'stx:libview' "DisplaySurface - superclass of VDBConsoleView "
+ #'stx:libview' "DisplaySurface - superclass of VDBDebuggerConsoleView "
#'stx:libview2' "ApplicationModel - superclass of VDBAbstractApplication "
- #'stx:libwidg' "EditTextView - superclass of VDBConsoleView "
+ #'stx:libwidg' "EditTextView - superclass of VDBDebuggerConsoleView "
)
!
@@ -43,8 +43,9 @@
by searching all classes (and their packages) which are referenced by my classes."
^ #(
- #'jv:libgdbs' "GDBCLICommand - referenced by VDBConsoleView>>keyPressReturn "
+ #'jv:libgdbs' "GDBCLICommand - referenced by VDBDebuggerConsoleView>>keyPressReturn "
#'stx:libbasic2' "List - referenced by VDBEventLogApplication>>eventList "
+ #'stx:libwidg2' "VT100TerminalView - referenced by VDBInferiorConsoleApplication>>consoleView "
)
!
@@ -69,13 +70,14 @@
^ #(
"<className> or (<className> attributes...) in load order"
VDBAbstractApplication
- VDBConsoleView
+ VDBDebuggerConsoleView
VDBInternalPipeStream
#'jv_vdb'
VDBAbstractContainer
- VDBConsoleApplication
VDBDebuggerApplication
+ VDBDebuggerConsoleApplication
VDBEventLogApplication
+ VDBInferiorConsoleApplication
VDBTabbingContainer
)
!
--- a/libInit.cc Sat Jun 07 14:42:45 2014 +0100
+++ b/libInit.cc Mon Jun 09 10:57:26 2014 +0100
@@ -28,13 +28,14 @@
OBJ snd; struct __vmData__ *__pRT__; {
__BEGIN_PACKAGE2__("libjv_vdb", _libjv_vdb_Init, "jv:vdb");
_VDBAbstractApplication_Init(pass,__pRT__,snd);
-_VDBConsoleView_Init(pass,__pRT__,snd);
+_VDBDebuggerConsoleView_Init(pass,__pRT__,snd);
_VDBInternalPipeStream_Init(pass,__pRT__,snd);
_jv_137vdb_Init(pass,__pRT__,snd);
_VDBAbstractContainer_Init(pass,__pRT__,snd);
-_VDBConsoleApplication_Init(pass,__pRT__,snd);
_VDBDebuggerApplication_Init(pass,__pRT__,snd);
+_VDBDebuggerConsoleApplication_Init(pass,__pRT__,snd);
_VDBEventLogApplication_Init(pass,__pRT__,snd);
+_VDBInferiorConsoleApplication_Init(pass,__pRT__,snd);
_VDBTabbingContainer_Init(pass,__pRT__,snd);
--- a/vdb.rc Sat Jun 07 14:42:45 2014 +0100
+++ b/vdb.rc Mon Jun 09 10:57:26 2014 +0100
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
VALUE "ProductName", "LibraryName\0"
VALUE "ProductVersion", "6.2.4.0\0"
- VALUE "ProductDate", "Sat, 07 Jun 2014 13:42:00 GMT\0"
+ VALUE "ProductDate", "Mon, 09 Jun 2014 09:56:23 GMT\0"
END
END