Fix in Smalltalk type info manager: do not mark classes with no source stream as errorneous.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 22 Aug 2015 00:14:23 +0100
changeset 883 9c644e7c1d97
parent 882 e1e21ed824b5
child 884 919f637c2be9
Fix in Smalltalk type info manager: do not mark classes with no source stream as errorneous. This incorrectly marked all new classes as errorneous causing type inferences not really working properly for them. Naturally, when a class is new, it has no source stream as all methods have source in memory.
Make.proto
SmallSense__Info.st
SmallSense__Manager.st
SmallSense__SmalltalkCompletionEngine.st
SmallSense__SmalltalkCompletionEngineTests.st
SmallSense__SmalltalkInferencer.st
SmallSense__SmalltalkInferencerTests.st
SmallSense__SmalltalkParseNodeVisitor.st
abbrev.stc
bc.mak
refactoring_custom/extensions.st
stx_goodies_smallsense.st
--- a/Make.proto	Sat Aug 08 02:55:51 2015 +0100
+++ b/Make.proto	Sat Aug 22 00:14:23 2015 +0100
@@ -34,7 +34,7 @@
 # add the path(es) here:,
 # ********** OPTIONAL: MODIFY the next lines ***
 # LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/regex -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/libjava/tools -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/changes -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/helpers -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/lint -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/goodies/regex -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libbasic3 -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libhtml -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/libjava/tools -I$(INCLUDE_TOP)/stx/libtool -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libwidg2
 
 
 # if you need any additional defines for embedded C code,
@@ -134,6 +134,7 @@
 	cd ../../libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
 	cd ../../libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
 	cd ../refactoryBrowser/browser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
+	cd ../sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
 	cd ../../libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
 	cd ../refactoryBrowser/lint && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
 	cd ../../libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
--- a/SmallSense__Info.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__Info.st	Sat Aug 22 00:14:23 2015 +0100
@@ -52,8 +52,13 @@
 
 !Info methodsFor:'accessing'!
 
-errorneous:something
-    errorneous := something.
+errorneous:aBoolean
+    aBoolean ifTrue:[  
+        self breakPoint: #jv.  
+    ].
+    errorneous := aBoolean.
+
+    "Modified: / 21-08-2015 / 17:01:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Info methodsFor:'testing'!
@@ -62,6 +67,7 @@
     ^ errorneous == true
 
     "Created: / 21-11-2014 / 16:37:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 17:06:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Info class methodsFor:'documentation'!
--- a/SmallSense__Manager.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__Manager.st	Sat Aug 22 00:14:23 2015 +0100
@@ -84,19 +84,18 @@
     "returns a singleton"
 
     Instance isNil ifTrue:[
-        Instance := self basicNew initialize.
+        Instance := self new
     ].
     ^ Instance.
 
     "Created: / 27-11-2011 / 15:30:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 14:29:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 new
-    "returns a singleton"
+    ^ self basicNew initialize.
 
-    ^ self instance.
-
-    "Modified: / 27-11-2011 / 15:30:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 14:30:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Manager methodsFor:'accessing'!
@@ -251,9 +250,7 @@
             sourceStream := class sourceStream.
         ] on: Error do:[ 
             sourceStream := nil.
-        ].
-        sourceStream isNil ifTrue:[ 
-            info errorneous: true.
+            info errorneous: true. 
             ^ self.
         ].
         class methodsDo:[:mthd|updater add:mthd].
@@ -280,7 +277,7 @@
     ]
 
     "Created: / 27-11-2011 / 18:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 21-11-2014 / 17:17:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 17:06:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 delayedUpdateInfoForClassOrMethod: classOrMethod
--- a/SmallSense__SmalltalkCompletionEngine.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__SmalltalkCompletionEngine.st	Sat Aug 22 00:14:23 2015 +0100
@@ -508,12 +508,20 @@
         self completeInMessageNode:node.
         ^ self
     ].
-    self breakPoint:#jv.
+    node isSelf ifTrue:[  
+        ^ self
+    ]. 
+    node isSuper ifTrue:[  
+        ^ self
+    ]. 
+    node isConstant ifTrue:[ 
+        ^ self
+    ].
 
     "Created: / 07-03-2011 / 18:59:02 / Jakub <zelenja7@fel.cvut.cz>"
     "Modified: / 08-04-2011 / 09:31:51 / Jakub <zelenja7@fel.cvut.cz>"
     "Created: / 26-11-2011 / 17:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 08-04-2014 / 20:52:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 22:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 completeInMessageNode:node
--- a/SmallSense__SmalltalkCompletionEngineTests.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__SmalltalkCompletionEngineTests.st	Sat Aug 22 00:14:23 2015 +0100
@@ -202,5 +202,20 @@
     self assert: (codeView list at: 2) = '    ^ 1 between:  and:  '
 
     "Created: / 07-03-2015 / 10:30:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_methods_02a    
+    | po |
+
+    codeView classHolder value: self class.
+    codeView codeAspect: #method. 
+    self complete:'foo
+    ^ self test_methods_02┃'.
+
+    po := result detect:[:each | each isSmallSenseMethodPO and:[each selector == #test_methods_02a]] ifNone:[ nil ].
+
+    self assert: po notNil.
+
+    "Created: / 21-08-2015 / 16:18:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__SmalltalkInferencer.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__SmalltalkInferencer.st	Sat Aug 22 00:14:23 2015 +0100
@@ -21,7 +21,8 @@
 "{ NameSpace: SmallSense }"
 
 Object subclass:#SmalltalkInferencer
-	instanceVariableNames:'type class classInfo source parser parserClass tree environment'
+	instanceVariableNames:'type class classInfo source parser parserClass tree environment
+		manager'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'SmallSense-Smalltalk-Types-Inference'
@@ -137,10 +138,19 @@
 !
 
 manager
-
-    ^Manager instance
+    manager isNil ifTrue:[
+        manager := Manager instance
+    ].
+    ^ manager
 
     "Created: / 27-11-2011 / 16:16:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 14:32:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+manager: aManager
+    manager := aManager
+
+    "Created: / 21-08-2015 / 14:32:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parser
@@ -211,17 +221,14 @@
 !SmalltalkInferencer methodsFor:'private'!
 
 infer
-
-
-    Phase1 process: tree in: class.
-    Phase2 process: tree in: class.
+    Phase1 process:tree in:class manager:manager.
+    Phase2 process:tree in:class manager:manager.
 
     "
-    (SmallSenseParseNodeInspector new node: tree source: source) open
-    "
+     (SmallSenseParseNodeInspector new node: tree source: source) open"
 
     "Created: / 26-11-2011 / 12:51:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 05-08-2014 / 14:04:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 15:45:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parse
@@ -264,7 +271,7 @@
         self parse.
     ] on: Error do:[:ex|
         Transcript showCR: ex description.
-        ^ self.
+        ^ nil.
     ].
     tree notNil ifTrue:[
         self infer.
@@ -272,7 +279,7 @@
     ^tree
 
     "Created: / 26-11-2011 / 12:50:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 21-03-2014 / 19:00:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 14:35:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkInferencer::Phase1 class methodsFor:'documentation'!
@@ -307,7 +314,7 @@
 
     "/ super initialize.   -- commented since inherited method does nothing
 
-    "Modified: / 26-11-2011 / 19:31:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 15:44:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkInferencer::Phase1 methodsFor:'private'!
@@ -363,13 +370,6 @@
 
 !SmalltalkInferencer::Phase1 methodsFor:'processing'!
 
-process: tree in: cls
-
-    self process: tree in: cls info: (Manager instance infoForClass: cls)
-
-    "Created: / 26-11-2011 / 13:48:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 process: tree in: cls info: clsInfo
 
      | i c def prereqs |
@@ -427,6 +427,15 @@
 
     "Created: / 27-11-2011 / 16:22:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified (comment): / 21-11-2014 / 17:19:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+process:tree in:cls manager:manager 
+    self 
+        process:tree
+        in:cls
+        info:(manager infoForClass:cls)
+
+    "Modified: / 21-08-2015 / 15:44:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkInferencer::Phase1 methodsFor:'visiting'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SmallSense__SmalltalkInferencerTests.st	Sat Aug 22 00:14:23 2015 +0100
@@ -0,0 +1,94 @@
+"
+stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
+Copyright (C) 2013-2015 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+"{ Package: 'stx:goodies/smallsense' }"
+
+"{ NameSpace: SmallSense }"
+
+Smalltalk::TestCase subclass:#SmalltalkInferencerTests
+	instanceVariableNames:'inferencer manager'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SmallSense-Tests'
+!
+
+!SmalltalkInferencerTests class methodsFor:'documentation'!
+
+copyright
+"
+stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
+Copyright (C) 2013-2015 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+! !
+
+!SmalltalkInferencerTests methodsFor:'running'!
+
+setUp
+    manager := SmallSense::Manager new.
+    inferencer := SmallSense::SmalltalkInferencer new.
+    inferencer manager: manager.
+
+    "Created: / 21-08-2015 / 14:28:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+tearDown
+    manager := inferencer := nil
+
+    "Created: / 21-08-2015 / 14:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!SmalltalkInferencerTests methodsFor:'tests'!
+
+test_self_01
+    | tree |
+
+    inferencer class: self class source: 'foo ^ self bar'.
+    tree := inferencer process.
+
+    self assert: tree expression receiver inferedType type isClassType.
+    self assert: tree expression receiver inferedType type klass == self class
+
+    "Created: / 21-08-2015 / 16:13:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_self_02
+    | tree |
+
+    inferencer class: self class source: 'foo self sub'.
+    tree := inferencer process.
+
+    self assert: tree expression receiver inferedType type isClassType.
+    self assert: tree expression receiver inferedType type klass == self class
+
+    "Created: / 21-08-2015 / 16:13:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
--- a/SmallSense__SmalltalkParseNodeVisitor.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/SmallSense__SmalltalkParseNodeVisitor.st	Sat Aug 22 00:14:23 2015 +0100
@@ -78,11 +78,14 @@
 
 !SmalltalkParseNodeVisitor class methodsFor:'processing'!
 
-process: tree in: class
-
-    ^self new process: tree in: class
+process:tree in:class manager:manager 
+    ^ self new 
+        process:tree
+        in:class
+        manager:manager
 
     "Created: / 26-11-2011 / 13:48:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 16:01:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkParseNodeVisitor methodsFor:'initialization'!
@@ -97,10 +100,9 @@
 
 !SmalltalkParseNodeVisitor methodsFor:'processing'!
 
-process: tree in: cls
-
+process:tree in:cls manager:anObject 
     class := cls.
-    self visit: tree
+    self visit:tree
 
     "Created: / 26-11-2011 / 13:48:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
--- a/abbrev.stc	Sat Aug 08 02:55:51 2015 +0100
+++ b/abbrev.stc	Sat Aug 22 00:14:23 2015 +0100
@@ -3,6 +3,7 @@
 # it provides information about a classes filename, category and especially namespace.
 SmallSense::AbstractDIalog SmallSense__AbstractDIalog stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
 SmallSense::AbstractSearchProcessor SmallSense__AbstractSearchProcessor stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
+SmallSense::AbstractTestCase SmallSense__AbstractTestCase stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::CodeHighlightingService SmallSense__CodeHighlightingService stx:goodies/smallsense 'SmallSense-Core-Services' 0
 SmallSense::CodeNavigationService SmallSense__CodeNavigationService stx:goodies/smallsense 'SmallSense-Core-Services' 0
 SmallSense::CompletionContext SmallSense__CompletionContext stx:goodies/smallsense 'SmallSense-Core' 0
@@ -24,12 +25,14 @@
 SmallSense::SettingsAppl SmallSense__SettingsAppl stx:goodies/smallsense 'SmallSense-Core-Interface' 1
 SmallSense::SmalltalkChecker SmallSense__SmalltalkChecker stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
 SmallSense::SmalltalkInferencerParameters SmallSense__SmalltalkInferencerParameters stx:goodies/smallsense 'SmallSense-Smalltalk-Types-Inference' 0
+SmallSense::SmalltalkInferencerTests SmallSense__SmalltalkInferencerTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::SmalltalkLintService SmallSense__SmalltalkLintService stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
 SmallSense::SmalltalkParseNodeVisitor SmallSense__SmalltalkParseNodeVisitor stx:goodies/smallsense 'SmallSense-Smalltalk' 0
 SmallSense::SmalltalkParser SmallSense__SmalltalkParser stx:goodies/smallsense 'SmallSense-Smalltalk' 3
 SmallSense::SmalltalkQuickFixer SmallSense__SmalltalkQuickFixer stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
 SmallSense::SmalltalkSyntaxHighlighter SmallSense__SmalltalkSyntaxHighlighter stx:goodies/smallsense 'SmallSense-Smalltalk' 3
 SmallSense::SmalltalkUnacceptedMethodEnvironment SmallSense__SmalltalkUnacceptedMethodEnvironment stx:goodies/smallsense 'SmallSense-Smalltalk-Lint' 0
+SmallSense::TestCase SmallSense__TestCase stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
 SmallSense::TokenPatternMatcher SmallSense__TokenPatternMatcher stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
 SmallSense::TokenPatternParser SmallSense__TokenPatternParser stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
 SmallSense::TokenPatternToken SmallSense__TokenPatternToken stx:goodies/smallsense 'SmallSense-Utils-Matcher' 0
@@ -44,6 +47,7 @@
 SmallSense::ClassPO SmallSense__ClassPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
 SmallSense::ClassSearchProcessor SmallSense__ClassSearchProcessor stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
 SmallSense::ClassType SmallSense__ClassType stx:goodies/smallsense 'SmallSense-Smalltalk-Types' 0
+SmallSense::CompletionEngineTests SmallSense__CompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::CompositeProcessor SmallSense__CompositeProcessor stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
 SmallSense::ConstantPO SmallSense__ConstantPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
 SmallSense::GenericEditSupport SmallSense__GenericEditSupport stx:goodies/smallsense 'SmallSense-Core-Services' 0
@@ -72,6 +76,7 @@
 SmallSense::JavaCompletionEngine SmallSense__JavaCompletionEngine stx:goodies/smallsense 'SmallSense-Java' 0
 SmallSense::JavaConstructorPO SmallSense__JavaConstructorPO stx:goodies/smallsense 'SmallSense-Java-Interface-PO' 0
 SmallSense::MethodKeywordRestPO SmallSense__MethodKeywordRestPO stx:goodies/smallsense 'SmallSense-Core-Interface-PO' 0
+SmallSense::SmalltalkCompletionEngineTests SmallSense__SmalltalkCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::CetegoryOrProtocolSelectDialog SmallSense__CetegoryOrProtocolSelectDialog stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
 SmallSense::ClassSearchDialog SmallSense__ClassSearchDialog stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 2
 SmallSense::JavaCompletionEngineSimple SmallSense__JavaCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Java' 2
@@ -82,9 +87,7 @@
 SmallSense::GroovyCompletionEngineSimple SmallSense__GroovyCompletionEngineSimple stx:goodies/smallsense 'SmallSense-Groovy' 2
 SmallSense::ProtocolSelectDialog SmallSense__ProtocolSelectDialog stx:goodies/smallsense 'SmallSense-Core-Interface-Search' 1
 SmallSense::AbstractJavaCompletionEngineTests SmallSense__AbstractJavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
-SmallSense::AbstractTestCase SmallSense__AbstractTestCase stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::BaseTestClass SmallSense__BaseTestClass stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::CompletionEngineTests SmallSense__CompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::EditSupportTests SmallSense__EditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::FinderTests SmallSense__FinderTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
 SmallSense::GroovyCompletionEngineSimpleTests SmallSense__GroovyCompletionEngineSimpleTests stx:goodies/smallsense 'SmallSense-Tests' 1
@@ -92,8 +95,6 @@
 SmallSense::JavaCompletionEngineTests SmallSense__JavaCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::JavaEditSupportTests SmallSense__JavaEditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::RecognizerTests SmallSense__RecognizerTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::SmalltalkCompletionEngineTests SmallSense__SmalltalkCompletionEngineTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::SmalltalkEditSupportTests SmallSense__SmalltalkEditSupportTests stx:goodies/smallsense 'SmallSense-Tests' 1
 SmallSense::SmalltalkParserTests SmallSense__SmalltalkParserTests stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
-SmallSense::TestCase SmallSense__TestCase stx:goodies/smallsense 'SmallSense-Tests-Obsolete' 1
 SmallSense::TokenPatternMatcherTests SmallSense__TokenPatternMatcherTests stx:goodies/smallsense 'SmallSense-Tests' 1
--- a/bc.mak	Sat Aug 08 02:55:51 2015 +0100
+++ b/bc.mak	Sat Aug 22 00:14:23 2015 +0100
@@ -35,7 +35,7 @@
 
 
 
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\regex -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\libjava\tools -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\changes -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\helpers -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\lint -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\goodies\regex -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libbasic3 -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libhtml -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\libjava\tools -I$(INCLUDE_TOP)\stx\libtool -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libwidg2
 LOCALDEFINES=
 
 STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
@@ -62,6 +62,7 @@
 	pushd ..\..\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
 	pushd ..\..\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
 	pushd ..\refactoryBrowser\browser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
+	pushd ..\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
 	pushd ..\..\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
 	pushd ..\refactoryBrowser\lint & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
 	pushd ..\..\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
--- a/refactoring_custom/extensions.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/refactoring_custom/extensions.st	Sat Aug 22 00:14:23 2015 +0100
@@ -897,8 +897,15 @@
             ] ifFalse: [
                 | info |
 
-                info := resources string: 'Test Case named %1 not found'.
-                self information: (info bindWith: testClassName)
+                info := resources stringWithCRs: 'No testcase named %1 or %2 found' with: (className, 'Tests') with: (className, 'Test.\\ Generate one?').
+                (Dialog confirm: info) ifTrue:[ 
+                    | context |
+
+                    context := SmallSense::CustomBrowserContext 
+                                    perspective: SmallSense::CustomPerspective classPerspective
+                                    state: navigationState.         
+                    SmallSense::CustomTestCaseCodeGenerator new executeInContext: context.  
+                ].
             ].                                                         
         ].
 
@@ -913,7 +920,7 @@
 
     "Created: / 26-12-2014 / 16:54:30 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
     "Modified: / 27-12-2014 / 19:01:25 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
-    "Modified: / 16-06-2015 / 06:49:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-08-2015 / 14:27:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Tools::NewSystemBrowser methodsFor:'menus extensions-custom refactorings'!
--- a/stx_goodies_smallsense.st	Sat Aug 08 02:55:51 2015 +0100
+++ b/stx_goodies_smallsense.st	Sat Aug 22 00:14:23 2015 +0100
@@ -99,6 +99,7 @@
         #'stx:goodies/refactoryBrowser/lint'    "RBBasicLintRule - extended"
         #'stx:goodies/refactoryBrowser/parser'    "RBBlockNode - extended"
         #'stx:goodies/regex'    "Regex::RxCharSetParser - superclass of SmallSense::TokenPatternParser::TokenSpecParser"
+        #'stx:goodies/sunit'    "TestAsserter - superclass of SmallSense::AbstractTestCase"
         #'stx:libbasic'    "Autoload - superclass of SmallSense::AbstractJavaCompletionEngineTests"
         #'stx:libcomp'    "AbstractSyntaxHighlighter - superclass of SmallSense::SmalltalkParser"
         #'stx:libhtml'    "HTMLDocumentFrame - extended"
@@ -151,6 +152,7 @@
         "<className> or (<className> attributes...) in load order"
         #'SmallSense::AbstractDIalog'
         #'SmallSense::AbstractSearchProcessor'
+        (#'SmallSense::AbstractTestCase' autoload)
         #'SmallSense::CodeHighlightingService'
         #'SmallSense::CodeNavigationService'
         #'SmallSense::CompletionContext'
@@ -172,12 +174,14 @@
         #'SmallSense::SettingsAppl'
         #'SmallSense::SmalltalkChecker'
         #'SmallSense::SmalltalkInferencerParameters'
+        (#'SmallSense::SmalltalkInferencerTests' autoload)
         #'SmallSense::SmalltalkLintService'
         #'SmallSense::SmalltalkParseNodeVisitor'
         #'SmallSense::SmalltalkParser'
         #'SmallSense::SmalltalkQuickFixer'
         #'SmallSense::SmalltalkSyntaxHighlighter'
         #'SmallSense::SmalltalkUnacceptedMethodEnvironment'
+        (#'SmallSense::TestCase' autoload)
         #'SmallSense::TokenPatternMatcher'
         #'SmallSense::TokenPatternParser'
         #'SmallSense::TokenPatternToken'
@@ -192,6 +196,7 @@
         #'SmallSense::ClassPO'
         #'SmallSense::ClassSearchProcessor'
         #'SmallSense::ClassType'
+        (#'SmallSense::CompletionEngineTests' autoload)
         #'SmallSense::CompositeProcessor'
         #'SmallSense::ConstantPO'
         #'SmallSense::GenericEditSupport'
@@ -220,6 +225,7 @@
         #'SmallSense::JavaCompletionEngine'
         #'SmallSense::JavaConstructorPO'
         #'SmallSense::MethodKeywordRestPO'
+        (#'SmallSense::SmalltalkCompletionEngineTests' autoload)
         #'SmallSense::CetegoryOrProtocolSelectDialog'
         #'SmallSense::ClassSearchDialog'
         #'SmallSense::JavaCompletionEngineSimple'
@@ -230,9 +236,7 @@
         #'SmallSense::GroovyCompletionEngineSimple'
         #'SmallSense::ProtocolSelectDialog'
         (#'SmallSense::AbstractJavaCompletionEngineTests' autoload)
-        (#'SmallSense::AbstractTestCase' autoload)
         (#'SmallSense::BaseTestClass' autoload)
-        (#'SmallSense::CompletionEngineTests' autoload)
         (#'SmallSense::EditSupportTests' autoload)
         (#'SmallSense::FinderTests' autoload)
         (#'SmallSense::GroovyCompletionEngineSimpleTests' autoload)
@@ -240,10 +244,8 @@
         (#'SmallSense::JavaCompletionEngineTests' autoload)
         (#'SmallSense::JavaEditSupportTests' autoload)
         (#'SmallSense::RecognizerTests' autoload)
-        (#'SmallSense::SmalltalkCompletionEngineTests' autoload)
         (#'SmallSense::SmalltalkEditSupportTests' autoload)
         (#'SmallSense::SmalltalkParserTests' autoload)
-        (#'SmallSense::TestCase' autoload)
         (#'SmallSense::TokenPatternMatcherTests' autoload)
     )
 !