Fixes to for JDI debugger.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 25 Mar 2014 15:36:38 +0000
changeset 3049 033e56844dc9
parent 3048 74535b57b370
child 3050 d23f94ac7fd5
child 3127 7c91a4227264
Fixes to for JDI debugger. Use lexical highlighting in JDI debugger source view.
tools/JavaSourceHighlighter.st
--- a/tools/JavaSourceHighlighter.st	Fri Mar 21 13:25:14 2014 +0000
+++ b/tools/JavaSourceHighlighter.st	Tue Mar 25 15:36:38 2014 +0000
@@ -221,7 +221,7 @@
     preferences isNil ifTrue:[
         preferences := UserPreferences current.
     ].
-    cacheIt := class notNil and:[class theNonMetaclass isJavaClass].
+    cacheIt := class notNil and: [class isBehavior and:[class theNonMetaclass isJavaClass]].
     cacheIt ifTrue:[
         document := JavaSourceDocument cachedDocumentFor: class theNonMetaclass.
         document notNil ifTrue:[
@@ -286,7 +286,7 @@
     ]
 
     "Created: / 04-08-2011 / 23:44:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 14-01-2014 / 09:47:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 25-03-2014 / 13:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 formatClassDefinition:source in:class elementsInto: els
@@ -432,7 +432,7 @@
     process := Processor activeProcess.
     wgroups := WindowGroup scheduledWindowGroups.
     [ process notNil ] whileTrue:[
-        | groups wg |
+        | groups wg application |
         groups := wgroups select:[:wg | wg process == process ].
         groups notEmpty ifTrue:[
             wg := groups detect:[:wg | wg isModal] ifNone:nil.
@@ -440,14 +440,17 @@
                 wg := groups anElement
             ].
             (wg mainView class == DebugView) ifTrue:[ ^ true ].
-            (wg mainView notNil and:[wg mainView application class == Tools::NewSystemBrowser]) ifTrue:[ ^ false ].
+            (wg mainView notNil and:[(application := wg mainView application) notNil]) ifTrue:[
+                application class == (Smalltalk at: #'JDI::DebuggerApplication') ifTrue:[ ^ true ].
+                application class == Tools::NewSystemBrowser ifTrue:[ ^ false ].
+            ]
         ].
         process := process parentProcess.                    
     ].
     ^ false
 
     "Created: / 09-09-2013 / 02:25:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 27-10-2013 / 09:41:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 25-03-2014 / 13:32:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaSourceHighlighter methodsFor:'syntax detection'!