class: DebugView
changed: #updateForContext:
update the comment characters as per selected
method's programming language
--- a/DebugView.st Mon May 12 19:58:40 2014 +0200
+++ b/DebugView.st Mon May 12 22:56:42 2014 +0200
@@ -8643,33 +8643,33 @@
codeView classHolder value: ((method respondsTo: #mclass) ifTrue:[method mclass] ifFalse:[rec class])
] ifFalse:[
- UserPreferences current syntaxColoring ifTrue:[
- implementorClass isNil ifTrue:[
- (con isBlockContext
- and:[con home isNil
- and:[con guessedHome notNil]])
- ifTrue:[
- implementorClass := con guessedHome mclass
- ]
- ].
- implementorClass notNil ifTrue:[
- (highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[
- code size < 100000 ifTrue:[
- Error handle:[:ex |
- ] do:[
- code := highlighter formatMethodSource:code in:implementorClass.
+ UserPreferences current syntaxColoring ifTrue:[
+ implementorClass isNil ifTrue:[
+ (con isBlockContext
+ and:[con home isNil
+ and:[con guessedHome notNil]])
+ ifTrue:[
+ implementorClass := con guessedHome mclass
+ ]
+ ].
+ implementorClass notNil ifTrue:[
+ (highlighter := implementorClass syntaxHighlighterClass) notNil ifTrue:[
+ code size < 100000 ifTrue:[
+ Error handle:[:ex |
+ ] do:[
+ code := highlighter formatMethodSource:code in:implementorClass.
+ ]
]
]
]
- ]
- ].
+ ].
"/ code ~= (codeView contents) ifTrue:[
- cannotAcceptDueToOutdatedClass ifTrue:[
- codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString).
- ] ifFalse:[
- codeView setContents:code.
- ].
+ cannotAcceptDueToOutdatedClass ifTrue:[
+ codeView setContents:(('Obsolete code (outdated due to class change). Use Browser.' colorizeAllWith:Color red),Character cr,Character cr,code asString).
+ ] ifFalse:[
+ codeView setContents:code.
+ ].
"/ ].
].
(lineNrInMethod notNil
@@ -8711,12 +8711,15 @@
(rec isJavaObject
and:[method isNil or:[method isJavaMethod not]]) ifTrue:[
"/ although a java object, use the smalltalk parser here for doIts.
- evaluatorClass := Parser
+ evaluatorClass := Parser.
+ codeView commentStrings:#( '//' ( '/*' '*/' ) ).
] ifFalse:[
(method notNil and:[method mclass notNil]) ifTrue:[
evaluatorClass := method mclass evaluatorClass.
+ codeView commentStrings:method mclass programmingLanguage commentStrings.
] ifFalse:[
evaluatorClass := rec class evaluatorClass.
+ codeView commentStrings:rec class programmingLanguage commentStrings.
].
].
@@ -8733,6 +8736,7 @@
];
editedMethodOrClass:(method ? rec class).
+
self setCurrentMethod:method.
selectedContext := homeContext ? con.
@@ -9089,15 +9093,15 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.652 2014-05-08 13:59:19 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.653 2014-05-12 20:56:42 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.652 2014-05-08 13:59:19 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.653 2014-05-12 20:56:42 cg Exp $'
!
version_SVN
- ^ '$Id: DebugView.st,v 1.652 2014-05-08 13:59:19 vrany Exp $'
+ ^ '$Id: DebugView.st,v 1.653 2014-05-12 20:56:42 cg Exp $'
! !