Java compiler problem highlighting improved. development
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 06 Aug 2013 11:19:07 +0100
branchdevelopment
changeset 2645 b7a540a27521
parent 2644 e61250315ca8
child 2646 39856623a013
Java compiler problem highlighting improved.
JavaClassRegistry.st
Make.proto
experiments/JavaCompiler.st
experiments/JavaCompilerProblemRegistry.st
experiments/Make.proto
experiments/Make.spec
experiments/abbrev.stc
experiments/bc.mak
experiments/experiments.rc
experiments/libInit.cc
experiments/stx_libjava_experiments.st
libjava.rc
stx_libjava.st
tools/JavaCompilerProblemHighlighter.st
tools/JavaCompilerProblemService.st
tools/JavaSyntaxHighlighter.st
tools/Make.proto
tools/bc.mak
tools/tools.rc
--- a/JavaClassRegistry.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/JavaClassRegistry.st	Tue Aug 06 11:19:07 2013 +0100
@@ -321,6 +321,13 @@
                             put: reloadedClass.
                         self registerClassInSmalltalk: reloadedClass notify: false.
                     ].
+                    "Transfer all possible problems from old class to new class"
+                    JavaCompilerProblemRegistry notNil ifTrue:[
+                        | problems |
+
+                        problems := JavaCompilerProblemRegistry problemsFor: newClass.
+                        JavaCompilerProblemRegistry problemsFor: reloadedClass put: problems.
+                    ].
                     Smalltalk changed: #classDefinition with: reloadedClass.
                     ^self.             
                 ].
@@ -342,7 +349,7 @@
 
     "Created: / 23-10-2011 / 11:53:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 02-11-2011 / 18:40:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-    "Modified: / 04-08-2013 / 14:01:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-08-2013 / 10:46:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 registerClassInSmalltalk: javaclass notify: doNotify
--- a/Make.proto	Mon Aug 05 10:55:37 2013 +0100
+++ b/Make.proto	Tue Aug 06 11:19:07 2013 +0100
@@ -21,7 +21,7 @@
 INCLUDE_TOP=$(TOP)/..
 
 # subdirectories where targets are to be made:
-SUBDIRS= tools experiments
+SUBDIRS= experiments tools
 
 
 # subdirectories where Makefiles are to be made:
--- a/experiments/JavaCompiler.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/JavaCompiler.st	Tue Aug 06 11:19:07 2013 +0100
@@ -282,18 +282,15 @@
             setClassfileBytes: each getBytes;
             yourself].
 
-    problems := javac getResult getProblems.
-    problems notEmptyOrNil ifTrue:[
-        classes do:[:each|
-            Problems at: each put: problems
-        ]
+    problems := javac getResult getProblems asNilIfEmpty.
+    classes do:[:each|
+        JavaCompilerProblemRegistry problemsFor: each put: problems
     ].
-
     ^classes.
 
     "Created: / 15-12-2012 / 23:04:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 16-12-2012 / 15:36:16 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
-    "Modified: / 07-05-2013 / 11:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-08-2013 / 10:45:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaCompiler::ClassSourceAnalyzer class methodsFor:'accessing'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/experiments/JavaCompilerProblemRegistry.st	Tue Aug 06 11:19:07 2013 +0100
@@ -0,0 +1,150 @@
+"
+ Copyright (c) 2010-2011 Jan Vrany, Jan Kurs & Marcel Hlopko,
+                         SWING Research Group, Czech Technical University 
+                         in Prague
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the 'Software'), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+"
+"{ Package: 'stx:libjava/experiments' }"
+
+Object subclass:#JavaCompilerProblemRegistry
+	instanceVariableNames:'problems'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Languages-Java-Support-Compiling'
+!
+
+JavaCompilerProblemRegistry class instanceVariableNames:'theOneAndOnlyInstance'
+
+"
+ No other class instance variables are inherited by this class.
+"
+!
+
+!JavaCompilerProblemRegistry class methodsFor:'documentation'!
+
+copyright
+"
+ Copyright (c) 2010-2011 Jan Vrany, Jan Kurs & Marcel Hlopko,
+                         SWING Research Group, Czech Technical University 
+                         in Prague
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the 'Software'), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+
+"
+! !
+
+!JavaCompilerProblemRegistry class methodsFor:'instance creation'!
+
+flush
+    "flushes the cached singleton"
+
+    theOneAndOnlyInstance := nil
+
+    "
+     self flushSingleton
+    "
+
+    "Created: / 06-08-2013 / 10:19:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+instance
+    "returns a singleton"
+
+    theOneAndOnlyInstance isNil ifTrue:[
+        theOneAndOnlyInstance := self basicNew initialize.
+    ].
+    ^ theOneAndOnlyInstance.
+
+    "Created: / 06-08-2013 / 10:19:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+new
+    "returns a singleton"
+
+    ^ self instance.
+
+    "Modified: / 06-08-2013 / 10:20:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCompilerProblemRegistry class methodsFor:'accessing'!
+
+problemsFor: jclass
+    ^ self instance problemsFor: jclass.
+
+    "Created: / 06-08-2013 / 10:29:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+problemsFor: jclass put: problems
+    ^ self instance problemsFor: jclass put: problems
+
+    "Created: / 06-08-2013 / 10:29:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCompilerProblemRegistry methodsFor:'accessing'!
+
+problemsFor: jclass
+    ^ problems at: jclass ifAbsent:[nil]
+
+    "Created: / 06-08-2013 / 10:24:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+problemsFor: jclass put: problemsForClass
+    problemsForClass isNil ifTrue:[
+        problems removeKey: jclass ifAbsent:[nil].
+    ] ifFalse:[
+        problems at: jclass put: problemsForClass.
+    ].
+    self changed: #problems with: jclass.
+
+    "Created: / 06-08-2013 / 10:25:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCompilerProblemRegistry methodsFor:'initialization'!
+
+initialize
+    "Invoked when a new instance is created."
+
+    problems := WeakIdentityDictionary new.
+
+    "Modified: / 06-08-2013 / 10:20:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/experiments/Make.proto	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/Make.proto	Tue Aug 06 11:19:07 2013 +0100
@@ -169,6 +169,7 @@
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
 $(OUTDIR)JavaByteCodeInterpreter.$(O) JavaByteCodeInterpreter.$(H): JavaByteCodeInterpreter.st $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaCompiler.$(O) JavaCompiler.$(H): JavaCompiler.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(STCHDR)
+$(OUTDIR)JavaCompilerProblemRegistry.$(O) JavaCompilerProblemRegistry.$(H): JavaCompilerProblemRegistry.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaMethodWrapperCompiler.$(O) JavaMethodWrapperCompiler.$(H): JavaMethodWrapperCompiler.st $(INCLUDE_TOP)/stx/libjava/Java.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)NoReflectionObject.$(O) NoReflectionObject.$(H): NoReflectionObject.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)PersonSample.$(O) PersonSample.$(H): PersonSample.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/experiments/Make.spec	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/Make.spec	Tue Aug 06 11:19:07 2013 +0100
@@ -52,6 +52,7 @@
 COMMON_CLASSES= \
 	JavaByteCodeInterpreter \
 	JavaCompiler \
+	JavaCompilerProblemRegistry \
 	JavaMethodWrapperCompiler \
 	NoReflectionObject \
 	PersonSample \
@@ -66,6 +67,7 @@
 COMMON_OBJS= \
     $(OUTDIR_SLASH)JavaByteCodeInterpreter.$(O) \
     $(OUTDIR_SLASH)JavaCompiler.$(O) \
+    $(OUTDIR_SLASH)JavaCompilerProblemRegistry.$(O) \
     $(OUTDIR_SLASH)JavaMethodWrapperCompiler.$(O) \
     $(OUTDIR_SLASH)NoReflectionObject.$(O) \
     $(OUTDIR_SLASH)PersonSample.$(O) \
--- a/experiments/abbrev.stc	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/abbrev.stc	Tue Aug 06 11:19:07 2013 +0100
@@ -6,12 +6,13 @@
 JavaByteCodeInterpreterTests JavaByteCodeInterpreterTests stx:libjava/experiments 'Languages-Java-Tests' 1
 JavaClassReloadingTests JavaClassReloadingTests stx:libjava/experiments 'Languages-Java-Tests-ClassReloading' 1
 JavaCompiler JavaCompiler stx:libjava/experiments 'Languages-Java-Support-Compiling' 0
+JavaCompilerProblemRegistry JavaCompilerProblemRegistry stx:libjava/experiments 'Languages-Java-Support-Compiling' 1
 JavaCompilerTests JavaCompilerTests stx:libjava/experiments 'Languages-Java-Tests-Compiling' 1
 JavaMethodWrapperCompiler JavaMethodWrapperCompiler stx:libjava/experiments 'Languages-Java-Experiments-Lookup' 0
+JavaSingleClassReloadingTests JavaSingleClassReloadingTests stx:libjava/experiments 'Languages-Java-Tests-ClassReloading' 1
 NoReflectionObject NoReflectionObject stx:libjava/experiments 'Languages-Java-Experiments-Lookup' 0
 PersonSample PersonSample stx:libjava/experiments 'Languages-Java-Experiments-Tests' 0
 SampleHandler SampleHandler stx:libjava/experiments 'Languages-Java-Experiments-Tests' 0
 SetSample SetSample stx:libjava/experiments 'Languages-Java-Experiments-Tests' 0
 stx_libjava_experiments stx_libjava_experiments stx:libjava/experiments '* Projects & Packages *' 3
 JavaByteCodeSteppableInterpreter JavaByteCodeSteppableInterpreter stx:libjava/experiments 'Languages-Java-Bytecode' 0
-JavaSingleClassReloadingTests JavaSingleClassReloadingTests stx:libjava/experiments 'Languages-Java-Tests-ClassReloading' 1
--- a/experiments/bc.mak	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/bc.mak	Tue Aug 06 11:19:07 2013 +0100
@@ -93,6 +93,7 @@
 # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
 $(OUTDIR)JavaByteCodeInterpreter.$(O) JavaByteCodeInterpreter.$(H): JavaByteCodeInterpreter.st $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaCompiler.$(O) JavaCompiler.$(H): JavaCompiler.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(STCHDR)
+$(OUTDIR)JavaCompilerProblemRegistry.$(O) JavaCompilerProblemRegistry.$(H): JavaCompilerProblemRegistry.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaMethodWrapperCompiler.$(O) JavaMethodWrapperCompiler.$(H): JavaMethodWrapperCompiler.st $(INCLUDE_TOP)\stx\libjava\Java.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)NoReflectionObject.$(O) NoReflectionObject.$(H): NoReflectionObject.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)PersonSample.$(O) PersonSample.$(H): PersonSample.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/experiments/experiments.rc	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/experiments.rc	Tue Aug 06 11:19:07 2013 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2013\nCopyright eXept Software AG 1998-2013\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Mon, 05 Aug 2013 09:45:41 GMT\0"
+      VALUE "ProductDate", "Tue, 06 Aug 2013 10:05:34 GMT\0"
     END
 
   END
--- a/experiments/libInit.cc	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/libInit.cc	Tue Aug 06 11:19:07 2013 +0100
@@ -29,6 +29,7 @@
 __BEGIN_PACKAGE2__("libstx_libjava_experiments", _libstx_libjava_experiments_Init, "stx:libjava/experiments");
 _JavaByteCodeInterpreter_Init(pass,__pRT__,snd);
 _JavaCompiler_Init(pass,__pRT__,snd);
+_JavaCompilerProblemRegistry_Init(pass,__pRT__,snd);
 _JavaMethodWrapperCompiler_Init(pass,__pRT__,snd);
 _NoReflectionObject_Init(pass,__pRT__,snd);
 _PersonSample_Init(pass,__pRT__,snd);
--- a/experiments/stx_libjava_experiments.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/experiments/stx_libjava_experiments.st	Tue Aug 06 11:19:07 2013 +0100
@@ -63,10 +63,6 @@
  OTHER DEALINGS IN THE SOFTWARE.
 
 "
-!
-
-extensionsVersion_SVN
-    ^ '$Id: stx_libjava_experiments.st,v 1.3 2013-02-25 11:15:34 vrany Exp $'
 ! !
 
 !stx_libjava_experiments class methodsFor:'description'!
@@ -77,15 +73,13 @@
      or classes which are extended by this package.
      This list can be maintained manually or (better) generated and
      updated by scanning the superclass hierarchies
-     (the browser has a menu function for that)
-     However, often too much is found, and you may want to explicitely
-     exclude individual packages in the #excludedFromPreRequisites method."
+     (the browser has a menu function for that)"
 
     ^ #(
-        #'stx:goodies/petitparser'    "PPDelegateParser - superclass of JavaCompiler::ClassSourceAnalyzer "
-        #'stx:goodies/sunit'    "TestAsserter - superclass of JavaSingleClassReloadingTests "
-        #'stx:libbasic'    "LibraryDefinition - superclass of stx_libjava_experiments "
-        #'stx:libjava'    "JavaByteCodeProcessor - superclass of JavaByteCodeInterpreter "
+        #'stx:goodies/petitparser'    "PPCompositeParser - superclass of JavaCompiler::ClassSourceAnalyzer "
+        #'stx:goodies/sunit'    "TestAsserter - superclass of JavaClassReloadingTests "
+        #'stx:libbasic'    "Autoload - superclass of Benchmarks::JavaLookup "
+        #'stx:libjava'    "Java - superclass of JavaMethodWrapperCompiler "
         #'stx:libjava/tools'    "JavaParserI - superclass of JavaCompiler::ClassSourceAnalyzer "
     )
 !
@@ -117,7 +111,7 @@
      exclude individual packages in the #excludedFromPreRequisites method."
 
     ^ #(
-        #'stx:libcomp'    "SourceFileLoader - referenced by JavaCompiler>>compile:in:notifying:ifFail: "
+        #'stx:libcomp'    "SourceFileLoader - referenced by JavaCompiler class>>compile:forClass:inCategory:notifying:install:skipIfSame:silent: "
     )
 !
 
@@ -195,15 +189,16 @@
         (JavaByteCodeInterpreterTests autoload)
         (JavaClassReloadingTests autoload)
         JavaCompiler
+        JavaCompilerProblemRegistry
         (JavaCompilerTests autoload)
         JavaMethodWrapperCompiler
+        (JavaSingleClassReloadingTests autoload)
         NoReflectionObject
         PersonSample
         SampleHandler
         SetSample
         #'stx_libjava_experiments'
         JavaByteCodeSteppableInterpreter
-        (JavaSingleClassReloadingTests autoload)
     )
 !
 
--- a/libjava.rc	Mon Aug 05 10:55:37 2013 +0100
+++ b/libjava.rc	Tue Aug 06 11:19:07 2013 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n          SWING Research Group, Czech Technical University In Prague\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Mon, 05 Aug 2013 09:43:35 GMT\0"
+      VALUE "ProductDate", "Tue, 06 Aug 2013 10:09:04 GMT\0"
     END
 
   END
--- a/stx_libjava.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/stx_libjava.st	Tue Aug 06 11:19:07 2013 +0100
@@ -156,7 +156,7 @@
      (the browser has a menu function for that)"
 
     ^ #(
-        #'stx:goodies/sunit'    "TestAsserter - superclass of JavaAntProjectResource "
+        #'stx:goodies/sunit'    "TestAsserter - superclass of JavaByteCodeProcessorTests "
         #'stx:libbasic'    "AbstractNumberVector - extended "
         #'stx:libbasic2'    "BitArray - extended "
         #'stx:libbasic3'    "WrappedMethod - extended "
@@ -191,8 +191,8 @@
      for those, redefine requiredPrerequisites"
 
     ^ #(
+        #'stx:libjava/experiments'
         #'stx:libjava/tools'
-        #'stx:libjava/experiments'
     )
 ! !
 
--- a/tools/JavaCompilerProblemHighlighter.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/JavaCompilerProblemHighlighter.st	Tue Aug 06 11:19:07 2013 +0100
@@ -155,13 +155,13 @@
 
 format: text
     ^ class isJavaClass ifTrue:[
-        self format: text problems: (JavaCompiler problemsForClass: class)
+        self format: text problems: (JavaCompilerProblemRegistry problemsFor: class)
     ] ifFalse:[
         text
     ]
 
     "Created: / 04-08-2011 / 23:51:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 15-04-2013 / 23:31:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-08-2013 / 10:44:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 format: source problem: problem
--- a/tools/JavaCompilerProblemService.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/JavaCompilerProblemService.st	Tue Aug 06 11:19:07 2013 +0100
@@ -41,6 +41,55 @@
     "Modified: / 04-08-2013 / 14:26:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!JavaCompilerProblemService methodsFor:'change & update'!
+
+update: aspect with: param from: sender
+
+    "Get updated whenever something changes in the code view.
+     Subclasses may override this"
+
+    aspect == #problems ifTrue:[
+        | cls method |
+
+        method := codeView method.
+        cls := method notNil ifTrue:[method mclass] ifFalse:[codeView classHolder value].
+        cls == param ifTrue:[
+            self rehighlight: true.
+        ]
+    ].
+
+    "Created: / 06-08-2013 / 10:37:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCompilerProblemService methodsFor:'private'!
+
+rehighlight: delayed
+
+    | service |
+    service := self service: SmallSenseSyntaxHighlightingService name.
+    service isNil ifTrue:[
+        service := self service: Tools::CodeHighlightingService name
+    ].
+    service notNil ifTrue:[
+        service sourceChanged: true.
+    ]
+
+    "Created: / 27-01-2012 / 17:06:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-08-2013 / 10:32:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCompilerProblemService methodsFor:'registering'!
+
+registerIn: aCodeView
+
+    "Installs myself in aCodeView"
+
+    super registerIn: aCodeView.
+    JavaCompilerProblemRegistry instance addDependent: self.
+
+    "Created: / 06-08-2013 / 10:33:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaCompilerProblemService class methodsFor:'documentation'!
 
 version_HG
--- a/tools/JavaSyntaxHighlighter.st	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/JavaSyntaxHighlighter.st	Tue Aug 06 11:19:07 2013 +0100
@@ -262,7 +262,7 @@
                 ifPresent:[:sourceAndText|
                     sourceAndText first = source ifTrue:[
                         sourceText := sourceAndText second.
-                        ^sourceText.
+                        ^sourceText deepCopy.
                     ].
 
                 ].
@@ -296,7 +296,7 @@
     ^sourceText
 
     "Created: / 17-03-2012 / 14:02:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 04-08-2013 / 03:30:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-08-2013 / 10:55:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaSyntaxHighlighter methodsFor:'syntax detection'!
--- a/tools/Make.proto	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/Make.proto	Tue Aug 06 11:19:07 2013 +0100
@@ -198,7 +198,7 @@
 $(OUTDIR)JavaConstructorDeclarationNode.$(O) JavaConstructorDeclarationNode.$(H): JavaConstructorDeclarationNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaMethodLikeDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaEnumDeclarationNode.$(O) JavaEnumDeclarationNode.$(H): JavaEnumDeclarationNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaTypeDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)JavaInterfaceDeclarationNode.$(O) JavaInterfaceDeclarationNode.$(H): JavaInterfaceDeclarationNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaTypeDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaDeclarationNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScanner.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScannerBase.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNodeBuilder.$(H) $(STCHDR)
+$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNodeBuilder.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScanner.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScannerBase.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(STCHDR)
 $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libjava/JavaObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)/stx/libtool/SystemBrowser.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
--- a/tools/bc.mak	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/bc.mak	Tue Aug 06 11:19:07 2013 +0100
@@ -122,7 +122,7 @@
 $(OUTDIR)JavaConstructorDeclarationNode.$(O) JavaConstructorDeclarationNode.$(H): JavaConstructorDeclarationNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaMethodLikeDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaEnumDeclarationNode.$(O) JavaEnumDeclarationNode.$(H): JavaEnumDeclarationNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaTypeDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)JavaInterfaceDeclarationNode.$(O) JavaInterfaceDeclarationNode.$(H): JavaInterfaceDeclarationNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaTypeDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaDeclarationNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScanner.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScannerBase.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNodeBuilder.$(H) $(STCHDR)
+$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNodeBuilder.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScanner.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScannerBase.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(STCHDR)
 $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libjava\JavaObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)\stx\libtool\SystemBrowser.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(STCHDR)
 
 # ENDMAKEDEPEND --- do not remove this line
--- a/tools/tools.rc	Mon Aug 05 10:55:37 2013 +0100
+++ b/tools/tools.rc	Tue Aug 06 11:19:07 2013 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Mon, 05 Aug 2013 09:49:38 GMT\0"
+      VALUE "ProductDate", "Tue, 06 Aug 2013 09:59:53 GMT\0"
     END
 
   END