Added `environment` instance variable to Tools__NewSystemBrowser and
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 05 Sep 2013 12:46:11 +0200
changeset 13498 b8d845e42988
parent 13497 47a292f5d956
child 13499 a2c7d7c34d00
Added `environment` instance variable to Tools__NewSystemBrowser and components it uses. The environment is by default initialized to Smalltalk. This allow for displaying limited subset of classes in the browser. The classes displayed does not even have to be classes and does not have to be installed in Smalltalk dictionary.
Tools_BrowserList.st
Tools_ClassCategoryList.st
Tools_ClassGeneratorList.st
Tools_ClassList.st
Tools_FullMethodCategoryList.st
Tools_HierarchicalClassList.st
Tools_HierarchicalProjectList.st
Tools_MethodCategoryList.st
Tools_MethodList.st
Tools_NamespaceList.st
Tools_NavigatorModel.st
Tools_OrganizerCanvas.st
Tools_ProjectList.st
Tools__ChangeList.st
Tools__HierarchicalPackageFilterList.st
Tools__LintService.st
Tools__NewSystemBrowser.st
Tools__VariableList.st
--- a/Tools_BrowserList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_BrowserList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -185,6 +185,18 @@
 
 !BrowserList methodsFor:'accessing'!
 
+environment:env
+    | prevenv |
+
+    prevenv := environment.
+    environment := env.
+    environment ~~ prevenv ifTrue:[
+        self enqueueMessage: #updateList for: self arguments: #()
+    ]
+
+    "Created: / 03-09-2013 / 18:32:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 nameFilter:something
     nameFilter := something.
 ! !
@@ -607,7 +619,7 @@
 delayedUpdate:something with:aParameter from:changedObject
 
     "/ if any of my subclasses want those, they should look for them.
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
 	(something == #Language or:[something == #LanguageTerritory]) ifTrue:[
 	    ^ self
 	].
@@ -868,7 +880,7 @@
 dropClassFiles:files
     files do:[:fn |
         (Dialog confirm:(resources string:'FileIn %1 ?' with:fn baseName allBold)) ifTrue:[
-            Smalltalk fileIn:fn logged:true.
+            environment fileIn:fn logged:true.
         ]
     ].
 
@@ -1878,10 +1890,10 @@
 !BrowserList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.57 2013-03-22 11:36:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.58 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.57 2013-03-22 11:36:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_BrowserList.st,v 1.58 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_ClassCategoryList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_ClassCategoryList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -275,7 +275,7 @@
 
     selectedCategories := self selectedCategoriesStrings.
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         ((something == #classVariables) 
         or:[something == #classDefinition]) ifTrue:[
             listValid == true ifTrue:[
@@ -452,7 +452,7 @@
 update:something with:aParameter from:changedObject
     |categoryOfClass|
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         (something == #methodInClass 
         or:[ something == #classComment
         or:[ something == #methodDictionary
@@ -627,7 +627,7 @@
     ^ Iterator on:[:whatToDo |
             showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ].
 
-            Smalltalk allClassesDo:[:cls |
+            environment allClassesDo:[:cls |
                 (cls isRealNameSpace) ifFalse:[
                     (inclusionTest value:cls) ifTrue:[
                         (nameSpaceFilter isNil
@@ -702,7 +702,7 @@
 
     classes := IdentitySet new.
     inGeneratorHolder isNil ifTrue:[
-        Smalltalk allClassesDo:[:cls | 
+        environment allClassesDo:[:cls | 
             |cat isLoaded|
 
             (cls isRealNameSpace) ifFalse:[
@@ -764,7 +764,7 @@
         setOfCategories := Set withAll:generator.
         generator do:[:cat | categories add:cat string].
         
-        Smalltalk allClassesDo:[:each |
+        environment allClassesDo:[:each |
             |cat|
 
             each isNameSpace ifFalse:[
@@ -852,14 +852,14 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self.
+    environment addDependent:self.
     ChangeSet addDependent:self.
 
     "Created: / 5.2.2000 / 13:42:13 / cg"
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
     ChangeSet removeDependent:self.
 
     "Created: / 5.2.2000 / 13:42:13 / cg"
@@ -1009,10 +1009,10 @@
 !ClassCategoryList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.49 2013-07-20 10:27:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.50 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.49 2013-07-20 10:27:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassCategoryList.st,v 1.50 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_ClassGeneratorList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_ClassGeneratorList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -257,7 +257,7 @@
 delayedUpdate:something with:aParameter from:changedObject
     |cls sel pkg mthd orgMode|
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         orgMode := organizerMode value.
 
         orgMode == OrganizerCanvas organizerModeCategory ifTrue:[
@@ -346,7 +346,7 @@
     hideUnloadedClasses := self hideUnloadedClasses value.
 
     categories := Set new.
-    Smalltalk allClassesDo:[:cls |
+    environment allClassesDo:[:cls |
         (hideUnloadedClasses not or:[cls isLoaded])
         ifTrue:[
             categories add:cls category.
@@ -357,7 +357,7 @@
     "/ really exist; however, during browsing, it makes sense.
     AdditionalEmptyCategories size > 0 ifTrue:[
         "/ remove those that are present ...
-        AdditionalEmptyCategories := AdditionalEmptyCategories select:[:cat | (categories includes:cat) not].
+        AdditionalEmptyCategories := AdditionalEmptyCategories reject:[:cat | (categories includes:cat)].
         categories addAll:AdditionalEmptyCategories.
     ].
     categories := categories asOrderedCollection.
@@ -381,7 +381,7 @@
     allNamespaces := IdentitySet new.
 
     (self hideUnloadedClasses value) ifTrue:[
-        Smalltalk allClassesDo:[:eachClass |
+        environment allClassesDo:[:eachClass |
             eachClass isLoaded ifTrue:[
                 allNamespaces add:(eachClass theNonMetaclass topNameSpace)
             ].
@@ -416,16 +416,16 @@
     allProjects := IdentitySet new.
 
     (self hideUnloadedClasses value) ifTrue:[
-        allProjects := Smalltalk allLoadedProjectIDs.
+        allProjects := environment allLoadedProjectIDs.
     ] ifFalse:[
-        allProjects := Smalltalk allProjectIDs.
+        allProjects := environment allProjectIDs.
     ].
 
     "/ those are simulated - in ST/X, empty projects do not
     "/ really exist; however, during browsing, it makes sense.
     AdditionalEmptyProjects size > 0 ifTrue:[
         "/ remove those that are present ...
-        AdditionalEmptyProjects := AdditionalEmptyProjects select:[:pkg | (allProjects includes:pkg) not].
+        AdditionalEmptyProjects := AdditionalEmptyProjects reject:[:pkg | (allProjects includes:pkg)].
         allProjects addAll:AdditionalEmptyProjects.
     ].
     allProjects sort.
@@ -437,12 +437,12 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self
+    environment addDependent:self
 
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
 
 !
 
@@ -515,9 +515,10 @@
 !ClassGeneratorList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.12 2012-11-03 11:29:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.14 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.12 2012-11-03 11:29:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassGeneratorList.st,v 1.14 2013-09-05 10:46:11 vrany Exp $'
 ! !
+
--- a/Tools_ClassList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_ClassList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -513,7 +513,7 @@
         ^ self.
     ].
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #methodInClass ifTrue:[
             ^ self "no interest" 
         ].    
@@ -822,7 +822,7 @@
 
     classListValue := classList value.
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #classComment ifTrue:[
             ^ self.
         ].
@@ -1186,7 +1186,7 @@
 
     inGeneratorHolder isNil ifTrue:[
         "/ for standAlone testing
-        generator := Smalltalk allClasses.
+        generator := environment allClasses.
         (self hideUnloadedClasses value) ifTrue:[
             generator := generator select:[:cls | cls isLoaded]
         ].
@@ -1315,7 +1315,7 @@
 
     inGeneratorHolder isNil ifTrue:[
         "/ for standAlone testing
-        generator := Smalltalk allClasses.
+        generator := environment allClasses.
         (self hideUnloadedClasses value) ifTrue:[
             generator := generator select:[:cls | cls isLoaded]
         ].
@@ -1412,14 +1412,14 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self.
+    environment addDependent:self.
     ChangeSet addDependent:self.
 
     "Created: / 5.2.2000 / 13:42:17 / cg"
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
     ChangeSet removeDependent:self.
 !
 
@@ -1628,7 +1628,7 @@
 	    |newClass|
 
 	    meta := cls isMeta.
-	    newClass := Smalltalk at:(cls theNonMetaclass name).
+	    newClass := environment at:(cls theNonMetaclass name).
 	    newClass isNil ifTrue:[
 		newClass := cls
 	    ] ifFalse:[
@@ -1645,7 +1645,7 @@
 
 	    cls notNil ifTrue:[
 		meta := cls isMeta.
-		newClass := Smalltalk at:(cls theNonMetaclass name).
+		newClass := environment at:(cls theNonMetaclass name).
 		newClass isNil ifTrue:[
 		    newClass := cls
 		] ifFalse:[
@@ -1723,7 +1723,7 @@
 
         newSelectionIndices := prevSelection 
                             collect:[:item | |cls|
-                                             cls := Smalltalk at:item theNonMetaclass name.   
+                                             cls := environment at:item theNonMetaclass name.   
                                              newList identityIndexOf:cls]
                             thenSelect:[:index | index ~~ 0].
 
@@ -2028,10 +2028,10 @@
 !ClassList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.75 2013-08-31 19:32:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.76 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.75 2013-08-31 19:32:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.76 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_FullMethodCategoryList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_FullMethodCategoryList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -70,7 +70,7 @@
                         protocols size > 0 ifTrue:[
                             protocols size == 1 ifTrue:[
                                 theProtocol := protocols first.
-                                Smalltalk allClassesDo:[:eachClass |
+                                environment allClassesDo:[:eachClass |
                                     eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
                                         |cat|
 
@@ -86,7 +86,7 @@
                                     ].
                                 ]
                             ] ifFalse:[
-                                Smalltalk allClassesDo:[:eachClass |
+                                environment allClassesDo:[:eachClass |
                                     eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
                                         |cat|
 
@@ -123,5 +123,5 @@
 !FullMethodCategoryList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_FullMethodCategoryList.st,v 1.5 2009-09-22 11:25:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_FullMethodCategoryList.st,v 1.6 2013-09-05 10:46:11 vrany Exp $'
 ! !
--- a/Tools_HierarchicalClassList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_HierarchicalClassList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -160,7 +160,7 @@
     self updateList.
 
     selectedClassesHolder value ~= prevSelection ifTrue:[
-	newSelection := prevSelection collect:[:eachOldClass | Smalltalk classNamed:(eachOldClass name)].
+	newSelection := prevSelection collect:[:eachOldClass | environment classNamed:(eachOldClass name)].
 	selectedClassesHolder value:newSelection.
     ]
 
@@ -175,7 +175,7 @@
     prevTop notNil ifTrue:[
 	wasMeta := prevTop isMeta.
 	newTop := prevTop theNonMetaclass.
-	[newTop notNil and:[(Smalltalk at:newTop name) ~= newTop]] whileTrue:[
+	[newTop notNil and:[(environment at:newTop name) ~= newTop]] whileTrue:[
 	    newTop := newTop superclass.
 	].
 	wasMeta ifTrue:[
@@ -221,7 +221,7 @@
     |theClasses|
 
     aSuperclass isNil ifTrue:[
-	theClasses := Smalltalk allClasses select:[:cls | cls superclass isNil]
+	theClasses := environment allClasses select:[:cls | cls superclass isNil]
     ] ifFalse:[
 	theClasses := aSuperclass subclasses.
     ].
@@ -316,7 +316,7 @@
 !HierarchicalClassList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalClassList.st,v 1.12 2013-07-04 15:20:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalClassList.st,v 1.13 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
 
--- a/Tools_HierarchicalProjectList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_HierarchicalProjectList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -248,7 +248,7 @@
 	].
     ].
 
-"/    Smalltalk allClassesDo:[:eachClass |
+"/    environment allClassesDo:[:eachClass |
 "/        |package|
 "/
 "/        package := eachClass package asSymbol.
@@ -518,10 +518,10 @@
 !HierarchicalProjectList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalProjectList.st,v 1.12 2013-04-25 13:10:59 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalProjectList.st,v 1.13 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalProjectList.st,v 1.12 2013-04-25 13:10:59 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_HierarchicalProjectList.st,v 1.13 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_MethodCategoryList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_MethodCategoryList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -419,7 +419,7 @@
 
                     nm := oldClass theNonMetaclass name.
                     oldClass isMeta ifTrue:[
-                        newClass := Smalltalk at:nm.
+                        newClass := environment at:nm.
                         newClass isNil ifTrue:[
                             "/ Transcript showCR:'oops - browser lost class ' , nm.
                             newClass := oldClass
@@ -427,7 +427,7 @@
                             newClass := newClass theMetaclass
                         ]
                     ] ifFalse:[
-                        newClass := Smalltalk at:nm
+                        newClass := environment at:nm
                     ].
                     newClass ~~ oldClass ifTrue:[
                         anyChange := true.
@@ -451,7 +451,7 @@
     selectedProtocolsHolder := self selectedProtocols.
     rawProtocolListHolder := self rawProtocolList.
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         classes notNil ifTrue:[
             something == #methodCategory ifTrue:[
                 cls := aParameter at:1.
@@ -715,9 +715,9 @@
     |cls sel mthd oldMethod newMethod|
 
     "/ some can be ignored immediately
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something isNil ifTrue:[
-            "/ self halt "/ huh - Smalltalk changed - so what ?
+            "/ self halt "/ huh - environment changed - so what ?
             ^ self.
         ].
 
@@ -1586,14 +1586,14 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self.
+    environment addDependent:self.
 "/    ChangeSet addDependent:self.
 
     "Modified: / 10-11-2006 / 17:57:13 / cg"
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
 "/    ChangeSet removeDependent:self.
 !
 
@@ -1690,7 +1690,7 @@
             "/ TODO: start a background thread to compute the stuff below,
             "/ notify me to update the list, when all the lazy info is avail...
         ] ifFalse:[
-            true "aMethod mclass language isSmalltalk" ifTrue:[
+            true "aMethod mclass language isenvironment" ifTrue:[
                 methodsPackage := aMethod package.
 
                 isVersionMethod := aMethod isVersionMethod.
@@ -1799,7 +1799,7 @@
     ].
     categories add:aProtocol.
     aClass changed:#organization.                                                       "/ not really ... to force update
-    Smalltalk changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol).     "/ not really ... to force update
+    environment changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol).     "/ not really ... to force update
 
     "Modified (comment): / 01-08-2012 / 17:30:36 / cg"
 !
@@ -1842,7 +1842,7 @@
     ].
 
     aClass changed:#organization.                      "/ not really ... to force update
-    Smalltalk changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols).     "/ not really ... to force update
+    environment changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols).     "/ not really ... to force update
 
     "Modified (comment): / 01-08-2012 / 17:29:59 / cg"
 !
@@ -1886,7 +1886,7 @@
     categories add:newName.
 
     aClass changed:#organization.                      "/ not really ... to force update
-    Smalltalk changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName).     "/ not really ... to force update
+    environment changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName).     "/ not really ... to force update
 
     "Modified (comment): / 01-08-2012 / 17:30:16 / cg"
 ! !
@@ -2089,11 +2089,11 @@
 !MethodCategoryList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.95 2013-07-20 10:29:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.96 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.95 2013-07-20 10:29:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodCategoryList.st,v 1.96 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
 
--- a/Tools_MethodList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_MethodList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -348,7 +348,7 @@
     selectionHolder := self selectedMethods.
     selection := selectionHolder value.
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         classes notNil ifTrue:[
             something == #classDefinition ifTrue:[
                 cls := aParameter.
@@ -356,7 +356,7 @@
                 (classes contains:[:aClass | aClass name = clsName]) ifFalse:[
                     ^ self   "/ I don't care for that class
                 ].
-                classes := classes collect:[:eachClass | (Smalltalk classNamed:eachClass name) ].
+                classes := classes collect:[:eachClass | (environment classNamed:eachClass name) ].
                 self invalidateList.
 "/                self updateList.
                 ^ self.
@@ -763,12 +763,12 @@
     mustFlushInheritanceInfo := true.
 
     "/ some can be ignored immediately
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         classes isNil ifTrue:[
             ^ self.
         ].
         something isNil ifTrue:[
-            "/ self halt "/ huh - Smalltalk changed - so what ?
+            "/ self halt "/ huh - environment changed - so what ?
             ^ self.
         ].
         something == #classComment ifTrue:[
@@ -1246,14 +1246,14 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self.
+    environment addDependent:self.
 "/    ChangeSet addDependent:self.
 
     "Modified: / 10-11-2006 / 17:57:01 / cg"
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
 "/    ChangeSet removeDependent:self.
 !
 
@@ -1818,10 +1818,10 @@
 !MethodList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.91 2013-08-27 13:33:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.92 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.91 2013-08-27 13:33:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.92 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_NamespaceList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_NamespaceList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -203,7 +203,7 @@
 
     self inSlaveModeOrInvisible 
     ifTrue:[
-	changedObject == Smalltalk ifTrue:[
+	changedObject == environment ifTrue:[
 	    something == #classComment ifTrue:[^ self].
 	].
 	self invalidateList.
@@ -218,7 +218,7 @@
 	^  self
     ].
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
 	something == #newClass ifTrue:[
 	    listValid == true ifTrue:[
 		aParameter isNameSpace ifTrue:[
@@ -254,7 +254,7 @@
 !
 
 update:something with:aParameter from:changedObject
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #methodDictionary ifTrue:[
             ^ self 
         ].
@@ -310,14 +310,14 @@
                 |className|
 
                 className := eachClassToMove nameWithoutPrefix.
-                nameSpace == Smalltalk ifTrue:[
-                    Smalltalk renameClass:eachClassToMove to:className asSymbol.
+                nameSpace == environment ifTrue:[
+                    environment renameClass:eachClassToMove to:className asSymbol.
                 ] ifFalse:[
-                    Smalltalk renameClass:eachClassToMove to:(nameSpace name , '::' , className) asSymbol.
+                    environment renameClass:eachClassToMove to:(nameSpace name , '::' , className) asSymbol.
                     nameSpace changed.
                 ].
             ].
-            Smalltalk changed.
+            environment changed.
         ].
         ^ self
     ].
@@ -358,7 +358,7 @@
     (showAllClasses or:[spaceNames includes:(self class nameListEntryForALL)]) ifTrue:[
         hideUnloadedClasses ifTrue:[
             ^ Iterator on:[:whatToDo |
-                               Smalltalk allClassesDo:[:cls |
+                               environment allClassesDo:[:cls |
                                    cls isLoaded ifTrue:[
                                        cls isRealNameSpace ifFalse:[
                                            whatToDo value:cls
@@ -368,24 +368,24 @@
                           ]
         ].
         ^ Iterator on:[:whatToDo |
-                           Smalltalk allClassesDo:whatToDo
+                           environment allClassesDo:whatToDo
                       ]
     ].
 
     (spaceNames size == 1 
-     and:[spaceNames first = 'Smalltalk']) ifTrue:[
+     and:[spaceNames first = 'environment']) ifTrue:[
         "/ somewhat tuned - quick look if classes name includes colons ...
         ^ Iterator on:[:whatToDo |
-                       Smalltalk allClassesDo:[:cls |
+                       environment allClassesDo:[:cls |
                            |includeIt|
 
                            includeIt := (cls name includes:$:) not.
                            includeIt := includeIt
                                         or:[(cls isPrivate not 
-                                            and:[(cls nameSpace == Smalltalk)])].
+                                            and:[(cls nameSpace == environment)])].
                            includeIt := includeIt
                                         or:[(cls isPrivate  
-                                            and:[(cls topOwningClass nameSpace == Smalltalk)])].
+                                            and:[(cls topOwningClass nameSpace == environment)])].
 
                            includeIt := includeIt
                                         and:[hideUnloadedClasses not or:[cls isLoaded]].
@@ -415,7 +415,7 @@
 
                         showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass]].
 
-                        Smalltalk allClassesDo:[:cls |
+                        environment allClassesDo:[:cls |
                             |spaceOfClass spaceNameOfClass includeIt|
 
                             spaceOfClass := cls isPrivate ifTrue:[cls topOwningClass nameSpace] ifFalse:[cls nameSpace].
@@ -470,7 +470,7 @@
 
     inGeneratorHolder isNil ifTrue:[
         (self hideUnloadedClasses value) ifTrue:[
-            Smalltalk allClassesDo:[:eachClass |
+            environment allClassesDo:[:eachClass |
                 eachClass isLoaded ifTrue:[
                     allNamespaces add:(eachClass theNonMetaclass topNameSpace)
                 ].
@@ -520,13 +520,13 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self
+    environment addDependent:self
 
     "Created: / 18.2.2000 / 01:04:36 / cg"
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
 
     "Created: / 18.2.2000 / 01:04:42 / cg"
 !
@@ -548,7 +548,7 @@
 	oldSelection size > 0 ifTrue:[
 	    newSelection := oldSelection select:[:nm | 
 				(nm = self class nameListEntryForALL) 
-				or:[ (Smalltalk at:nm asSymbol) isNameSpace]
+				or:[ (environment at:nm asSymbol) isNameSpace]
 			    ].
 	    newSelection ~= oldSelection ifTrue:[
 		selectedNamespacesHolder value:newSelection.
@@ -561,5 +561,5 @@
 !NamespaceList class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.20 2012-10-20 19:36:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NamespaceList.st,v 1.21 2013-09-05 10:46:11 vrany Exp $'
 ! !
--- a/Tools_NavigatorModel.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_NavigatorModel.st	Thu Sep 05 12:46:11 2013 +0200
@@ -14,7 +14,7 @@
 "{ NameSpace: Tools }"
 
 ApplicationModel subclass:#NavigatorModel
-	instanceVariableNames:''
+	instanceVariableNames:'environment'
 	classVariableNames:'AllEntry SuperSendEntry UncommentedEntry'
 	poolDictionaries:''
 	category:'Interface-Browsers-New'
@@ -34,6 +34,31 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
+!
+
+documentation
+"
+    A base abstract superclass for all tools browsing the code.
+
+    The `environment` instvar should be used to access the code elements
+    (classes, packages, namespace). The tool should never access Smalltalk
+    directly, but the `environment`. By default, the `environment` is 
+    initialized to Smalltalk. The `environment` could be whatever object
+    you like, but it MUST be polymorph with Smalltalk. Also, all classes-like
+    objects it returns MUST be polymorph with Class. Otherwise, expect
+    a lot of DNUs.
+
+    [author:]
+        Jan Vrany <jan.vrany@fit.cvut.cz>
+
+    [instance variables:]
+        environment         
+
+    [class variables:]
+
+    [see also:]
+
+"
 ! !
 
 !NavigatorModel class methodsFor:'initialization'!
@@ -329,6 +354,50 @@
     "Created: / 06-04-2010 / 11:09:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 07-09-2011 / 10:45:45 / cg"
     "Modified: / 19-01-2012 / 10:43:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+isAbstract
+    ^ self == Tools::NavigatorModel
+
+    "Created: / 03-09-2013 / 15:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!NavigatorModel methodsFor:'accessing'!
+
+environment
+    ^ environment
+
+    "Created: / 03-09-2013 / 19:19:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+environment:env
+    environment := env.
+! !
+
+!NavigatorModel methodsFor:'hooks'!
+
+commonPreBuild
+    | topApp |
+
+    super commonPreBuild.
+    topApp := self topApplication.
+    (topApp notNil and:[topApp ~~ self]) ifTrue:[
+        "Fetch the environment from the top application, fallback to previous environment"
+        self environment: (topApp perform:#environment ifNotUnderstood:[environment])
+    ]
+
+    "Created: / 03-09-2013 / 16:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 03-09-2013 / 18:31:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!NavigatorModel methodsFor:'initialization'!
+
+initialize
+
+    super initialize.
+    environment := Smalltalk.
+
+    "Created: / 03-09-2013 / 15:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !NavigatorModel methodsFor:'misc'!
@@ -356,15 +425,21 @@
 !NavigatorModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.23 2012-11-07 13:57:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.24 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.23 2012-11-07 13:57:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.24 2013-09-05 10:46:11 vrany Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 !
 
 version_SVN
     ^ '§Id: Tools__NavigatorModel.st 7802 2011-07-05 18:33:36Z vranyj1 §'
 ! !
 
+
 NavigatorModel initialize!
--- a/Tools_OrganizerCanvas.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_OrganizerCanvas.st	Thu Sep 05 12:46:11 2013 +0200
@@ -4806,7 +4806,7 @@
         categories := self selectedCategories value.
         categories notEmptyOrNil ifTrue:[
             includesAll := categories includes:BrowserList nameListEntryForALL.
-            classes :=  Smalltalk allClassesForWhich:[:aClass |
+            classes :=  environment allClassesForWhich:[:aClass |
                 (includesAll or:[categories includes:aClass category]).
             ].
         ].
@@ -4943,7 +4943,7 @@
         categories := self selectedCategories value.
         categories notEmptyOrNil ifTrue:[
             categories do:[:eachCategory |
-                classes addAll:(Smalltalk allClassesInCategory:eachCategory)
+                classes addAll:(environment allClassesInCategory:eachCategory)
             ].
         ].
     ].
@@ -5044,10 +5044,10 @@
 !OrganizerCanvas class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_OrganizerCanvas.st,v 1.54 2013-04-26 09:48:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_OrganizerCanvas.st,v 1.55 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_OrganizerCanvas.st,v 1.54 2013-04-26 09:48:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_OrganizerCanvas.st,v 1.55 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools_ProjectList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools_ProjectList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -232,7 +232,7 @@
     self inSlaveModeOrInvisible 
     "/ (self slaveMode value == true) 
     ifTrue:[
-        (changedObject == Smalltalk
+        (changedObject == environment
         or:[ something == #projectOrganization ]) ifTrue:[
             listValid ifFalse:[ ^ self].
             listValid := false
@@ -284,7 +284,7 @@
         ^  self
     ].
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #projectOrganization ifTrue:[
             self invalidateList.
             slaveMode value == true ifFalse:[
@@ -375,7 +375,7 @@
         ^ self
     ].
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #methodDictionary ifTrue:[
             ^ self 
         ].
@@ -547,7 +547,7 @@
     (selectedPackages includes:(self class nameListEntryForALL)) ifTrue:[
         hideUnloadedClasses ifTrue:[
             ^ Iterator on:[:whatToDo |
-                               Smalltalk allClassesDo:[:cls |
+                               environment allClassesDo:[:cls |
                                    cls isLoaded ifTrue:[
                                        cls isRealNameSpace ifFalse:[
                                            whatToDo value:cls
@@ -557,7 +557,7 @@
                           ]
         ].
         ^ Iterator on:[:whatToDo |
-                           Smalltalk allClassesDo:[:cls |
+                           environment allClassesDo:[:cls |
                                cls isRealNameSpace ifFalse:[
                                    whatToDo value:cls
                                ]
@@ -574,7 +574,7 @@
 
                            showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ].
 
-                           Smalltalk allClassesDo:[:cls |
+                           environment allClassesDo:[:cls |
                                |doInclude|
 
                                (hideUnloadedClasses not or:[cls isLoaded])
@@ -607,7 +607,7 @@
 
                        showChangedClasses ifTrue:[ changedClasses := ChangeSet current changedClasses ].
 
-                       Smalltalk allClassesDo:[:cls |
+                       environment allClassesDo:[:cls |
                            |doInclude|
 
                            (hideUnloadedClasses not or:[cls isLoaded])
@@ -707,7 +707,7 @@
                 ].
             ].
 
-        Smalltalk allClassesDo:[:eachClass |
+        environment allClassesDo:[:eachClass |
             |cls pkg p classPackage|
 
             eachClass isRealNameSpace ifFalse:[
@@ -807,12 +807,12 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self.
+    environment addDependent:self.
     ChangeSet addDependent:self.
 !
 
 makeIndependent
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
     ChangeSet removeDependent:self.
 !
 
@@ -823,8 +823,8 @@
 "/    workerQueue 
 "/        nextPut:[
 "/            | repo newEntry branch mark|
-"/            "/ use Smalltalk-at to trick the dependency/prerequisite generator
-"/            repo := (Smalltalk at:#SVN::RepositoryManager) current 
+"/            "/ use environment-at to trick the dependency/prerequisite generator
+"/            repo := (environment at:#SVN::RepositoryManager) current 
 "/                        repositoryForPackage: package onlyFromCache: false.
 "/            repo ifNotNil:[
 "/                mark := ' [SVN]'.
@@ -990,7 +990,7 @@
     ].
     AdditionalEmptyProjects add:aProject.
 
-    Smalltalk changed:#projectOrganization   "/ not really ... to force update
+    environment changed:#projectOrganization   "/ not really ... to force update
 
     "Created: / 17.2.2000 / 23:44:27 / cg"
 !
@@ -1003,7 +1003,7 @@
 	    AdditionalEmptyProjects remove:eachProject ifAbsent:nil.
 	].
     ].
-    Smalltalk changed:#projectOrganization   "/ not really ... to force update
+    environment changed:#projectOrganization   "/ not really ... to force update
 
     "Created: / 17.2.2000 / 23:45:24 / cg"
 ! !
@@ -1011,10 +1011,10 @@
 !ProjectList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.65 2013-06-05 13:22:39 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.66 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.65 2013-06-05 13:22:39 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_ProjectList.st,v 1.66 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools__ChangeList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools__ChangeList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -748,7 +748,7 @@
         ]
     ].
 
-    browserClass := Smalltalk browserClass.
+    browserClass := environment browserClass.
     methodsOnly 
         ifTrue:
             [methods size = 1 
@@ -1201,11 +1201,11 @@
 !ChangeList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.24 2013-04-14 19:55:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.25 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.24 2013-04-14 19:55:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.25 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_SVN
--- a/Tools__HierarchicalPackageFilterList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools__HierarchicalPackageFilterList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -188,7 +188,7 @@
         ].
     ].
 
-"/    Smalltalk allClassesDo:[:eachClass |
+"/    environment allClassesDo:[:eachClass |
 "/        |package|
 "/
 "/        package := eachClass package asSymbol.
@@ -300,7 +300,7 @@
 !HierarchicalPackageFilterList::PackageItem class methodsFor:'documentation'!
 
 version
-    ^'$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.3 2013-04-25 13:11:37 stefan Exp $'
+    ^'$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.4 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
 !HierarchicalPackageFilterList::PackageItem class methodsFor:'image specs'!
@@ -460,7 +460,7 @@
 !HierarchicalPackageFilterList class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.3 2013-04-25 13:11:37 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.4 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_SVN
--- a/Tools__LintService.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools__LintService.st	Thu Sep 05 12:46:11 2013 +0200
@@ -194,7 +194,7 @@
         (app respondsTo: #selectedLintRules) ifTrue:[
             self ruleHolderFromApp: app selectedLintRules
         ] ifFalse:[
-            self breakPoint:#jv.
+            "/ self breakPoint:#jv.
             "/ Transcript showCR:'LintService [info]: app does not provide a lintRuleHolder'
         ]
     ].
@@ -214,10 +214,10 @@
 !LintService class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintService.st,v 1.8 2013-07-22 12:01:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintService.st,v 1.9 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintService.st,v 1.8 2013-07-22 12:01:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__LintService.st,v 1.9 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
--- a/Tools__NewSystemBrowser.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools__NewSystemBrowser.st	Thu Sep 05 12:46:11 2013 +0200
@@ -14,7 +14,7 @@
 "{ NameSpace: Tools }"
 
 SystemBrowser subclass:#NewSystemBrowser
-	instanceVariableNames:'navigationState bufferNameList selectedBuffer buffers
+	instanceVariableNames:'environment navigationState bufferNameList selectedBuffer buffers
 		bufferUsageOrder browserCanvas immediateUpdate showClassPackages
 		lastMethodCategory lastMethodMoveClass browserCanvasType
 		syntaxColoringProcessRunning syntaxColoringProcess
@@ -17973,6 +17973,7 @@
     ^ className
 
     "Modified: / 29-08-2013 / 12:24:28 / cg"
+    "Modified: / 04-09-2013 / 17:48:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 enterBoxTitle:title okText:okText label:label
@@ -17997,6 +17998,16 @@
     buffers notNil ifTrue:[ buffers do:aBlock ]
 !
 
+environment
+    ^ environment
+
+    "Created: / 03-09-2013 / 19:18:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+environment:env
+    environment := env.
+!
+
 isEmbeddedBrowser
     "allows the inspector to disable certain menu items (+ buffer)"
 
@@ -18850,6 +18861,8 @@
     "Created: / 24.2.2000 / 23:28:06 / cg"
 ! !
 
+
+
 !NewSystemBrowser methodsFor:'aspects-organization'!
 
 categoryMenuVisible
@@ -20774,7 +20787,7 @@
         contains:[:nm |
             |ns|
 
-            ns := Smalltalk at:nm asSymbol ifAbsent:nil.
+            ns := environment at:nm asSymbol ifAbsent:nil.
             ns notNil
             and:[ns allClasses size ~~ 0]
         ]
@@ -22203,7 +22216,7 @@
     ^ (codeView := self codeView) hasSelection
     and:[ (s := codeView selectionAsString) isValidSmalltalkIdentifier
     and:[ s isUppercaseFirst
-    and:[ (Smalltalk includesKey:s) not
+    and:[ (environment includesKey:s) not
     and:[ (selClass := self theSingleSelectedClass) notNil
     and:[ (selClass theNonMetaclass classVarNames includes:s) not ]]]]]
 
@@ -22475,7 +22488,7 @@
     selection := self selectionInCodeView.
 
     selection := selection withoutSeparators.
-    cls := Smalltalk classNamed:selection.
+    cls := environment classNamed:selection.
     ^ cls
 !
 
@@ -22513,6 +22526,7 @@
     ^ UserPreferences current useSearchBarInBrowser or:[self codeView searchBarActionBlock notNil]
 ! !
 
+
 !NewSystemBrowser methodsFor:'change & update'!
 
 categorySelectionChanged
@@ -23275,7 +23289,7 @@
         ^ self.
     ].
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         codeAspect := self codeAspect.
         isForAspect := (codeAspect == something)
                        and:[ something == #classDefinition
@@ -23717,6 +23731,15 @@
     "Modified: / 02-07-2011 / 18:33:22 / cg"
 ! !
 
+!NewSystemBrowser methodsFor:'initialization'!
+
+initialize
+    super initialize.
+    environment := Smalltalk
+
+    "Created: / 03-09-2013 / 19:13:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !NewSystemBrowser methodsFor:'menu actions-browse'!
 
 browseClassesReferringToAnyPool:poolsArg in:doWhat
@@ -23733,7 +23756,7 @@
                     poolOrName isSharedPool ifTrue:[
                         poolOrName
                     ] ifFalse:[
-                        p := Smalltalk classNamed:poolNameString.
+                        p := environment classNamed:poolNameString.
                         (p notNil and:[p isSharedPool]) ifTrue:[
                             p
                         ] ifFalse:[
@@ -23746,7 +23769,7 @@
         ^ self
     ].
 
-    classes := Smalltalk allClasses
+    classes := environment allClasses
                 select:[:cls | 
                         cls isMeta not and:[(cls sharedPools includesAny:pools)]
                 ].
@@ -23847,7 +23870,7 @@
 
         s := contents withoutSpaces.
         box topView withWaitCursorDo:[
-            what := Smalltalk selectorCompletion:s.
+            what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:environment.
             inputField contents:what first.
             (what at:2) size ~~ 1 ifTrue:[
                 self window beep
@@ -23882,6 +23905,8 @@
         ].
         self rememberSearchPattern:sel.
     ].
+
+    "Modified: / 04-09-2013 / 17:40:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 browseMenuAllSubclassesOf
@@ -23901,7 +23926,7 @@
                 className includesMatchCharacters ifTrue:[
                     className := self askForClassNameMatching:className.
                 ].
-                class := (Smalltalk classNamed:className) theNonMetaclass.
+                class := (environment classNamed:className) theNonMetaclass.
                 searchBlock := [ class allSubclasses ]
             ].
 
@@ -23930,7 +23955,7 @@
     |searchBlock|
 
     searchBlock := [
-                        (Smalltalk allClassesForWhich:[:someClass | someClass wasAutoloaded])
+                        (environment allClassesForWhich:[:someClass | someClass wasAutoloaded])
                             asOrderedCollection
                    ].
 
@@ -23992,7 +24017,7 @@
 
     ^ self
         browseMenuClassExtensionsFor:nil
-        in:Smalltalk allClasses
+        in:environment allClasses
         label:'All Class Extensions'
         openAs:openHow
 !
@@ -24015,7 +24040,7 @@
     allInstVariables := Set new.
     allClassVariables := Set new.
     allClassInstVariables := Set new.
-    Smalltalk allClassesDo:[:cls |
+    environment allClassesDo:[:cls |
         cls isMeta ifFalse:[
             allInstVariables addAll:(cls instVarNames).
             allClassVariables addAll:(cls classVarNames).
@@ -24061,7 +24086,7 @@
         |s what m|
 
         s := contents withoutSpaces.
-        what := Smalltalk classnameCompletion:s.
+        what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:environment .
         box contents:what first.
         (what at:2) size ~~ 1 ifTrue:[
             self builder window beep
@@ -24084,7 +24109,7 @@
         checkFilterBlock := [:v | varNamesToSearch includes:v]
     ].
 
-    classes := Smalltalk allClasses select:[:cls |
+    classes := environment allClasses select:[:cls |
                     cls isMeta not
                     and:[(cls instVarNames contains:checkFilterBlock)
                          or:[(cls classVarNames contains:checkFilterBlock)
@@ -24110,6 +24135,7 @@
 
     "Created: / 01-03-2000 / 11:12:38 / cg"
     "Modified: / 29-08-2013 / 12:23:08 / cg"
+    "Modified: / 04-09-2013 / 17:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 browseMenuClassesForWhich: aFilter label: label
@@ -24122,7 +24148,7 @@
 
                         classes := OrderedCollection new.
 
-                        Smalltalk allClassesDo:[:eachClass |
+                        environment allClassesDo:[:eachClass |
                             (aFilter value: eachClass) ifTrue:[
                                 classes add:eachClass
                             ]
@@ -24229,7 +24255,7 @@
 
             appHistory := ApplicationModel recentlyOpenedApplications.
             appHistory
-                collect:[:nm | Smalltalk classNamed:nm]
+                collect:[:nm | environment classNamed:nm]
                 as:OrderedCollection
         ].
 
@@ -24280,7 +24306,7 @@
         |s what m|
 
         s := contents withoutSpaces.
-        what := DoWhatIMeanSupport poolnameCompletion:s inEnvironment:Smalltalk.
+        what := DoWhatIMeanSupport poolnameCompletion:s inEnvironment:environment.
         box contents:what first.
         (what at:2) size ~~ 1 ifTrue:[
             self builder window beep
@@ -24294,7 +24320,7 @@
     poolNameString isEmptyOrNil ifTrue:[
         ^ self
     ].
-    pool := Smalltalk classNamed:poolNameString.
+    pool := environment classNamed:poolNameString.
     pool isNil ifTrue:[
         Dialog warn:'No such pool: ', poolNameString.
         ^ self.
@@ -24311,7 +24337,7 @@
 browseMenuClassesWithFilter:aFilterBlock label:aLabelString
     |searchBlock|
 
-    searchBlock := [ Smalltalk allClasses select:aFilterBlock ].
+    searchBlock := [ environment allClasses select:aFilterBlock ].
 
     ^ self
         spawnClassBrowserForSearch:searchBlock
@@ -24357,7 +24383,7 @@
                     spawnClassExtensionBrowserForSearch:[
                         |classes|
 
-                        classes := Smalltalk allClassesForWhich:[:someClass |
+                        classes := environment allClassesForWhich:[:someClass |
                             |include|
 
                             include := false.
@@ -24427,7 +24453,7 @@
     ].
 
     self withWaitCursorDo:[
-        classes := Smalltalk allClasses select:[:cls |
+        classes := environment allClasses select:[:cls |
                         |s m found|
 
                         (cls isLoaded and:[cls isMeta not]) ifTrue:[
@@ -25275,7 +25301,7 @@
 
     self
         spawnMethodBrowserForSearch:[ 
-            Smalltalk allMethodsForWhich:[:m | m isWrapped or:[m isMethodWithBreakpoints]].
+            environment allMethodsForWhich:[:m | m isWrapped or:[m isMethodWithBreakpoints]].
         ]
         sortBy:#class in:#newBuffer 
         label:'BreakPointed Methods'
@@ -25389,9 +25415,9 @@
                                 ] ifFalse:[
                                     baseName := sym.
                                 ].
-                                (val := Smalltalk at:sym) isBehavior ifTrue:[
+                                (val := environment at:sym) isBehavior ifTrue:[
                                     otherKeysReferringToValue := OrderedCollection new.
-                                    Smalltalk keysAndValuesDo:[:k :v | v == val ifTrue:[
+                                    environment keysAndValuesDo:[:k :v | v == val ifTrue:[
                                                                            (k ~~ sym and:[k ~~ #'Parser:PrevClass']) ifTrue:[
                                                                                otherKeysReferringToValue add:k
                                                                            ]
@@ -25451,7 +25477,7 @@
                            ].
                        ].
                        "/ recollect realClasses from names (in case of class-changes)
-                       realClasses := classes collect:[:eachClass | Smalltalk at:eachClass name].
+                       realClasses := classes collect:[:eachClass | environment at:eachClass name].
                        self class
                                findMethodsIn:realClasses
                                where:matchBlock
@@ -25614,7 +25640,7 @@
 "/                        methods := OrderedCollection new.
 "/                        defaultId := PackageId noProjectID.
 "/
-"/                        Smalltalk allMethodsDo:[:mthd |
+"/                        environment allMethodsDo:[:mthd |
 "/                            mthd package = defaultId ifTrue:[
 "/                                methods add:mthd.
 "/                            ].
@@ -25692,9 +25718,9 @@
 "/                                ] ifFalse:[
 "/                                    baseName := sym.
 "/                                ].
-"/                                (val := Smalltalk at:sym) isBehavior ifTrue:[
+"/                                (val := environment at:sym) isBehavior ifTrue:[
 "/                                    otherKeysReferringToValue := OrderedCollection new.
-"/                                    Smalltalk keysAndValuesDo:[:k :v | v == val ifTrue:[
+"/                                    environment keysAndValuesDo:[:k :v | v == val ifTrue:[
 "/                                                                           k ~~ sym ifTrue:[
 "/                                                                               otherKeysReferringToValue add:k
 "/                                                                           ]
@@ -25763,7 +25789,7 @@
                             access:#write.
 
                        "/ recollect realClasses from names (in case of class-changes)
-                       realClasses := classes collect:[:eachClass | Smalltalk at:eachClass name].
+                       realClasses := classes collect:[:eachClass | environment at:eachClass name].
                        self class
                            findMethodsIn:realClasses
                            where:matchBlock
@@ -25786,7 +25812,7 @@
 browseMethodsForWhich:checkBlock in:openHow label:aString
     |searchBlock|
 
-    searchBlock := [ Smalltalk allMethodsForWhich:checkBlock ].
+    searchBlock := [ environment allMethodsForWhich:checkBlock ].
 
     ^ self
         spawnMethodBrowserForSearch:searchBlock
@@ -25897,7 +25923,7 @@
     |classes|
 
     classes := IdentitySet new.
-    Smalltalk allClassesDo:[:eachClass |
+    environment allClassesDo:[:eachClass |
         (eachClass isMeta not
         and:[eachClass isLoaded
         and:[eachClass isNameSpace not
@@ -26514,7 +26540,7 @@
 categoryMenuNewCategory
     |box newCategory allClassCategories|
 
-    allClassCategories := Smalltalk allClassCategories.
+    allClassCategories := environment allClassCategories.
 
     box := self
                 enterBoxTitle:'Name of new class category:'
@@ -26717,7 +26743,7 @@
                 guess := eachCategory string.
             ].
 
-            allCategories := Smalltalk allClassCategories asArray sort.
+            allCategories := environment allClassCategories asArray sort.
             combosList := LastCategoryRenames.
             (combosList size > 0 and:[combosList includes:eachCategory]) ifFalse:[
                 combosList size == 0 ifTrue:[
@@ -26864,7 +26890,7 @@
     pattern := pattern string.
 
     matchingCategories := Set new.
-    Smalltalk allClassesAndMetaclassesDo:[:eachClass |
+    environment allClassesAndMetaclassesDo:[:eachClass |
         |cat|
 
         cat := eachClass category.
@@ -27636,7 +27662,7 @@
         answer == true ifTrue:[
             self withWaitCursorDo:[
                     aClass unload.
-                    Smalltalk changed:#classDefinition with:aClass
+                    environment changed:#classDefinition with:aClass
                 ].
             ^ self
         ]
@@ -27854,7 +27880,7 @@
     ].
 
     LastMethodMoveOrCopyTargetClass notNil ifTrue:[
-        initial := Smalltalk classNamed:LastMethodMoveOrCopyTargetClass.
+        initial := environment classNamed:LastMethodMoveOrCopyTargetClass.
         initial notNil ifTrue:[
             (currentClass notNil and:[currentClass theNonMetaclass name = initial name]) ifTrue:[
                 initial := nil
@@ -28084,7 +28110,7 @@
 
     className := self searchMenuFindClassToAdd.
     className isNil ifTrue:[^ self].
-    class := Smalltalk at:className asSymbol ifAbsent:nil.
+    class := environment at:className asSymbol ifAbsent:nil.
     class isNil ifTrue:[
         ^ self warn:'No such class'
     ].
@@ -28273,7 +28299,7 @@
     otherClassName isNil ifTrue:[^ self].
     (otherClassName startsWith:'---- ') ifTrue:[^ self].
 
-    otherClass := Smalltalk classNamed:otherClassName.
+    otherClass := environment classNamed:otherClassName.
     otherClass isNil ifTrue:[
         self warn:'no such class: ', otherClassName.
         ^ self
@@ -28311,7 +28337,7 @@
 
     currentClassName := currentClass name.
     newClassName := currentClassName.
-"/    (nameSpace := currentClass nameSpace) == Smalltalk ifTrue:[
+"/    (nameSpace := currentClass nameSpace) == environment ifTrue:[
 "/        newClassName := 'CopyOf' , currentClassName.
 "/    ] ifFalse:[
 "/        newClassName := nameSpace name , '::' , 'CopyOf' , currentClass nameWithoutPrefix.
@@ -28323,7 +28349,7 @@
     (newClassName isEmptyOrNil or:[newClassName withoutSeparators = currentClassName]) ifTrue:[
         ^ self
     ].
-    (Smalltalk classNamed:newClassName) notNil ifTrue:[
+    (environment classNamed:newClassName) notNil ifTrue:[
         (self confirm:(resources string:'A class named: ''%1'' already exists.\\Overwrite ?' with:newClassName) withCRs)
             ifFalse:[^ self]
     ].
@@ -28351,7 +28377,7 @@
     ].
 
     ownerName notNil ifTrue:[
-        (Smalltalk classNamed:ownerName) isNil ifTrue:[
+        (environment classNamed:ownerName) isNil ifTrue:[
             (Dialog confirm:(resources
                                 stringWithCRs:'No class or nameSpace named: "%1"\\Create as Namespace ?' with:ownerName))
             ifFalse:[
@@ -28359,7 +28385,7 @@
             ].
             newOwnerClass := NameSpace fullName:ownerName.
         ].
-        newOwnerClass := Smalltalk at:ownerName asSymbol.
+        newOwnerClass := environment at:ownerName asSymbol.
         (newOwnerClass == Smalltalk or:[newOwnerClass isNameSpace]) ifTrue:[
             newOwnerClass == Smalltalk ifFalse:[
                 newClassName := ownerName , '::' , newClassName.
@@ -29128,7 +29154,7 @@
 
             (theClass theMetaclass allInstanceVariableNames asSet includes:singletonVar) ifFalse:[
                 theClass theMetaclass addInstVarName:singletonVar.
-                theClass := Smalltalk at:(eachClass theNonMetaclass name).
+                theClass := environment at:(eachClass theNonMetaclass name).
             ].
             generator createSingletonPatternInstanceCreationMethodsIn:theClass usingVariable:singletonVar
         ].
@@ -29276,7 +29302,7 @@
                                 string:'Enter name for new parent class of the selected class(es):').
     name isEmpty ifTrue: [^self].
 
-    existingClass := Smalltalk classNamed:name.
+    existingClass := environment classNamed:name.
     existingClass notNil ifTrue:[
         (Dialog confirm:(resources
                                 string:'A Class named "%1" already exists - make the selected class(es) a subclass of it ?'))
@@ -29500,7 +29526,7 @@
     newOwnerName isNil ifTrue:[^ self].
     (newOwnerName startsWith:'---- ') ifTrue:[^ self].
 
-    newOwner := Smalltalk classNamed:newOwnerName.
+    newOwner := environment classNamed:newOwnerName.
     newOwner isNil ifTrue:[
         (currentClass nameSpace notNil and:[currentClass nameSpace ~~ Smalltalk]) ifTrue:[
             newOwner := currentClass nameSpace classNamed:newOwnerName
@@ -29515,8 +29541,8 @@
     classes do:[:eachClass |
         eachClass autoload.
         newName := newOwner name , '::' , eachClass nameWithoutPrefix.
-        (Smalltalk classNamed:newName) notNil ifTrue:[
-            (Smalltalk classNamed:newName) ~~ eachClass ifTrue:[
+        (environment classNamed:newName) notNil ifTrue:[
+            (environment classNamed:newName) ~~ eachClass ifTrue:[
                 self warn:'A class named ' , newName , ' already exists.'.
                 ^ self
             ].
@@ -29557,7 +29583,7 @@
             nsName isNameSpace ifTrue:[
                 ns := nsName
             ] ifFalse:[
-                ns := Smalltalk at:nsName.
+                ns := environment at:nsName.
             ].
         ].
 
@@ -29585,7 +29611,7 @@
             title:(resources string:'Move to Namespace')
             initialText:(LastNameSpaceMove ? '').
     nsName isEmptyOrNil ifTrue:[^ self].
-    ns := Smalltalk at:nsName asSymbol.
+    ns := environment at:nsName asSymbol.
     LastNameSpaceMove := nsName.
 
     self selectedNonMetaclassesDo:[:eachClass |
@@ -29607,7 +29633,7 @@
 classMenuMoveToCategory
     |allCategories box|
 
-    allCategories := Smalltalk allClassCategories asArray sort.
+    allCategories := environment allClassCategories asArray sort.
 
     box := ListSelectionBox new.
     box title:(resources string:'Move class(es) to which category:').
@@ -29622,7 +29648,7 @@
         |s what|
 
         s := contents withoutLeadingSeparators.
-        what := Smalltalk classCategoryCompletion:s.
+        what := environment classCategoryCompletion:s.
         box contents:what first.
         (what at:2) size ~~ 1 ifTrue:[
             self builder window beep
@@ -29646,7 +29672,7 @@
                         initialText:(LastNameSpaceMove ? '').
     newNameSpace size == 0 ifTrue:[^ self].
 
-    ns := Smalltalk at:newNameSpace asSymbol.
+    ns := environment at:newNameSpace asSymbol.
     ns isNil ifTrue:[
         (self confirm:(resources string:'No such nameSpace exists.\\Create "%1" ?' with:newNameSpace) withCRs) ifFalse:[
             ^ self
@@ -30007,7 +30033,7 @@
     language := dialog language.
     newClassName := dialog classNameHolder value withoutSeparators.
     superclassName := dialog superclassNameHolder value withoutSeparators.
-    superclass := Smalltalk classNamed:superclassName.
+    superclass := environment classNamed:superclassName.
     package := (dialog packageHolder value ? '') withoutSeparators.
     namespaceName := (dialog nameSpaceHolder value ? 'Smalltalk') withoutSeparators.
     category := (dialog categoryHolder value ? '* as yet unspecified *') withoutSeparators.
@@ -30335,7 +30361,7 @@
     "/ extract owner or namespace, to see if this implies a change
     newOwnerOrNameSpacePath := OrderedCollection new.
 
-    nsOrOwner := Smalltalk.
+    nsOrOwner := environment.
     s := newNameString readStream.
     [s atEnd] whileFalse:[
         nextWord := s nextAlphaNumericWord.
@@ -30387,7 +30413,7 @@
 
     "/ check if the target already exists - confirm if so.
 
-    (cls := Smalltalk classNamed:newNameString) notNil ifTrue:[
+    (cls := environment classNamed:newNameString) notNil ifTrue:[
         (self confirm:(resources string:'Attention: a class named ''%1'' already present (in the ''%2'' category).\\Rename over it ?'
                                  with:newNameString allBold
                                  with:cls category allBold) withCRs)
@@ -30420,7 +30446,7 @@
 
     self busyLabel:('Searching for references to ' , oldSym).
     referingMethods := SystemBrowser
-                            allMethodsIn:(Smalltalk allClasses)
+                            allMethodsIn:(environment allClasses)
                             where:(SystemBrowser searchBlockForReferendsOf:oldSym).
     self normalLabel.
     referingMethods isEmpty ifTrue:[
@@ -30478,7 +30504,7 @@
         answer == #renameAndRewrite ifTrue:[
             self performRefactoring:(RenameClassRefactoring renameClassNamed:oldSym to:newNameString).
             referingMethods := SystemBrowser
-                            allMethodsIn:(Smalltalk allClasses)
+                            allMethodsIn:(environment allClasses)
                             where:(SystemBrowser searchBlockForReferendsOf:newNameString).
             UserInformation ignoreIn:[
                 browser := self
@@ -30496,7 +30522,7 @@
         (self confirm:(resources string:'Create a new source container for ''%1'' ?' with:newNameString allBold))
         ifTrue:[
             currentClass setClassFilename:nil.
-            SourceCodeManagerUtilities default createSourceContainerForClass:(Smalltalk at:newNameString asSymbol)
+            SourceCodeManagerUtilities default createSourceContainerForClass:(environment at:newNameString asSymbol)
         ]
     ].
 
@@ -30786,7 +30812,7 @@
         (selectedNamespaces := self selectedNamespaces value) size > 0 ifTrue:[
             selectedNamespaces size == 1 ifTrue:[
                 selectedNamespaces first ~= BrowserList nameListEntryForALL ifTrue:[
-                    currentNamespace := Smalltalk at:selectedNamespaces first asSymbol.
+                    currentNamespace := environment at:selectedNamespaces first asSymbol.
                 ]
             ]
         ]
@@ -30880,7 +30906,7 @@
         ]
     ] ifFalse:[
         namePrefix := ''.
-        existingNames := Smalltalk keys
+        existingNames := environment keys
     ].
 
     name := nsTemplate , nameProto , i printString.
@@ -31030,7 +31056,7 @@
     newMetaclass instanceVariableNames:(aClass class instanceVariableString).
 
     "/ sigh - must refetch in case of changed instVars.
-    newClass := Smalltalk at:realNewClassName.
+    newClass := environment at:realNewClassName.
     newMetaclass := newClass class.
 
     aClass methodDictionary
@@ -31086,11 +31112,11 @@
 
     movedInstMethods notEmpty ifTrue:[
         aClass theNonMetaclass changed:#projectOrganization.
-        Smalltalk changed:#projectOrganization with:(Array with:aClass theNonMetaclass with:movedInstMethods).
+        environment changed:#projectOrganization with:(Array with:aClass theNonMetaclass with:movedInstMethods).
     ].
     movedClassMethods notEmpty ifTrue:[
         aClass theMetaclass changed:#projectOrganization.
-        Smalltalk changed:#projectOrganization with:(Array with:aClass theMetaclass with:movedClassMethods).
+        environment changed:#projectOrganization with:(Array with:aClass theMetaclass with:movedClassMethods).
     ]
 !
 
@@ -31415,7 +31441,7 @@
 
         cls := eachClass theNonMetaclass.
         cls isPrivate ifFalse:[
-            Smalltalk changeCategoryOf:cls to:newCategory.
+            environment changeCategoryOf:cls to:newCategory.
         ]
     ].
 
@@ -31427,6 +31453,8 @@
     LastCategoryRenames size > 10 ifTrue:[
         LastCategoryRenames removeLast.
     ].
+
+    "Modified: / 04-09-2013 / 17:45:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 moveClasses:classes toProject:newProject
@@ -31484,11 +31512,11 @@
         anyMethodMoved ifTrue:[
             theClass changed:#projectOrganization.
             theClass theMetaclass changed:#projectOrganization.
-            Smalltalk changed:#projectOrganization with:(Array with:theClass with:oldProject).
+            environment changed:#projectOrganization with:(Array with:theClass with:oldProject).
         ].
     ].
     anyClassMoved ifTrue:[
-        Smalltalk changed:#projectOrganization.
+        environment changed:#projectOrganization.
     ].
     self rememberLastProjectMoveTo:newProject
 
@@ -32056,7 +32084,7 @@
 
             symOutsideNamespace := eachNonMetaClassInQuestion name.
 
-            refsHere := findRefs value:(Smalltalk allClasses) value:symOutsideNamespace value:symOutsideNamespace.
+            refsHere := findRefs value:(environment allClasses) value:symOutsideNamespace value:symOutsideNamespace.
             allRefs addAll:refsHere.
 
             (eachNonMetaClassInQuestion nameSpace notNil
@@ -35112,7 +35140,7 @@
     selector := currentMethod selector.
 
     "/ how many senders are there ?
-    senders := SystemBrowser findSendersOf:selector in:(Smalltalk allClasses) ignoreCase:false match:false.
+    senders := SystemBrowser findSendersOf:selector in:(environment allClasses) ignoreCase:false match:false.
     nSenders := senders size.
 
     tree := cls parseTreeFor:selector.
@@ -35168,7 +35196,7 @@
                         newSelector:newSelector
                         initializer:initializer.
 
-    (self findSendersOf:selector in:(Smalltalk allClasses) andConfirmRefactoring:refactoring) ifTrue:[
+    (self findSendersOf:selector in:(environment allClasses) andConfirmRefactoring:refactoring) ifTrue:[
         self performRefactoring:refactoring.
         self switchToSelector:newSelector
     ]
@@ -35213,7 +35241,7 @@
     varName := self codeView selectionAsString.
     (varName isValidSmalltalkIdentifier
     and:[ varName isUppercaseFirst
-    and:[ (Smalltalk includesKey:varName) not
+    and:[ (environment includesKey:varName) not
     and:[ (cls := self theSingleSelectedClass) notNil
     and:[ (cls theNonMetaclass classVarNames includes:varName) not
     ]]]]) ifFalse:[
@@ -35660,7 +35688,7 @@
     rslt isNil ifTrue:[^ self ].
 
     senders := self class findSendersOf:inlinedSelector
-                    in:Smalltalk allClasses
+                    in:environment allClasses
                     ignoreCase:false
                     match:false.
 
@@ -35820,7 +35848,7 @@
         immediateUpdate value:false.
 
         "/ must reselect manually here
-        newClass := Smalltalk classNamed:(mClass name).
+        newClass := environment classNamed:(mClass name).
         newMethod := newClass compiledMethodAt:mSelector.
         newClass ~~ self theSingleSelectedClass ifTrue:[
             self selectClass:newClass.
@@ -36549,7 +36577,7 @@
 !
 
 findSendersOf:selector andConfirmRefactoring:refactoring
-    ^ self findSendersOf:selector in:(Smalltalk allClasses) andConfirmRefactoring:refactoring
+    ^ self findSendersOf:selector in:(environment allClasses) andConfirmRefactoring:refactoring
 
     "Modified: / 28-02-2007 / 21:20:23 / cg"
 !
@@ -36899,7 +36927,7 @@
             ]
         ].
     ].
-    Smalltalk changed:#coverageInfo.
+    environment changed:#coverageInfo.
     self showCoverageInformation changed.   "/ to force update
 !
 
@@ -37232,7 +37260,7 @@
     self withWaitCursorDo:[
         InstrumentedMethod cleanAllInfoWithChange:false
     ].
-    Smalltalk changed:#coverageInfo.
+    environment changed:#coverageInfo.
     self showCoverageInformation changed.   "/ to force update
 
     "Created: / 27-04-2010 / 19:00:32 / cg"
@@ -37581,6 +37609,7 @@
     HTMLDocumentView openFullOnDocumentationFile:'TOP.html'
 ! !
 
+
 !NewSystemBrowser methodsFor:'menu actions-inheritance'!
 
 inheritanceMenuNavigateToClass
@@ -37814,7 +37843,7 @@
     |selectedNameSpaces selectedNameSpaceClasses|
 
     selectedNameSpaces := self selectedNamespaces value.
-    selectedNameSpaceClasses := Smalltalk allClasses select:[:eachClass |
+    selectedNameSpaceClasses := environment allClasses select:[:eachClass |
                                                                   eachClass isPrivate not
                                                                   and:[selectedNameSpaces includes:eachClass nameSpace name]
                                                              ] .
@@ -37831,7 +37860,7 @@
     (nm isNil or:[(nm := nm withoutSeparators) size == 0]) ifTrue:[
         ^ self
     ].
-    existing := Smalltalk at:nm asSymbol ifAbsent:nil.
+    existing := environment at:nm asSymbol ifAbsent:nil.
     existing notNil ifTrue:[
         existing isNameSpace ifTrue:[
             self warn:'A NameSpace named ''%1'' alread exists.' with:nm.
@@ -37852,6 +37881,8 @@
         ^ self
     ].
     self selectedNamespaces value:(Array with:nm)
+
+    "Modified: / 04-09-2013 / 17:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 nameSpaceMenuRemove
@@ -37861,8 +37892,8 @@
         |ns|
 
         nm ~= BrowserList nameListEntryForALL ifTrue:[
-            ns := Smalltalk at:nm asSymbol.
-            Smalltalk removeClass:ns.
+            ns := environment at:nm asSymbol.
+            environment removeClass:ns.
         ]
     ].
 !
@@ -38480,7 +38511,7 @@
         [:package |
             |classesInPackage|
 
-            classesInPackage := Smalltalk allClassesInPackage:package.
+            classesInPackage := environment allClassesInPackage:package.
             classesInPackage isEmpty ifTrue:[
                 defaultProjectType := LastNewProjectType ? ProjectDefinition guiApplicationType
             ] ifFalse:[
@@ -38881,7 +38912,7 @@
             mgr := SourceCodeManagerUtilities sourceCodeManagerFor:definitionClass
         ].
 
-        classes := Smalltalk allClassesInPackage:eachPackageID.
+        classes := environment allClassesInPackage:eachPackageID.
         classes := classes reject:[:cls | cls isPrivate ].
         self checkOutClasses:classes askForRevision:false usingManager: mgr.
     ].
@@ -38905,7 +38936,7 @@
 "/        perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st'].
 "/        perProjectInfo := Dictionary withAssociations:perProjectInfo.
 "/
-"/        classesInImage := Smalltalk allClassesInPackage:eachProject.
+"/        classesInImage := environment allClassesInPackage:eachProject.
 "/        filesInImage := (classesInImage collect:[:cls | cls classBaseFilename]) asSet.
 "/        "/ any differences ?
 "/        classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)].
@@ -39145,7 +39176,7 @@
 
             classesInProject := IdentitySet new.
             needExtensionsContainer := false.
-            Smalltalk allClassesDo:[:aClass |
+            environment allClassesDo:[:aClass |
                 (packageToCheck = aClass package) ifTrue:[
                     aClass isPrivate ifFalse:[
                         classesInProject add:aClass .
@@ -39459,7 +39490,7 @@
         self selectedProjectClasses do:[:eachClass |
             mgr addClass:eachClass.
         ].
-        Smalltalk allClassesDo:[:eachClass |
+        environment allClassesDo:[:eachClass |
             eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
                 |mPckg|
 
@@ -39487,7 +39518,7 @@
             eachClass fileOutOn:s.
         ].
 
-        Smalltalk allClassesDo:[:eachClass |
+        environment allClassesDo:[:eachClass |
             eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
                 |mPckg|
 
@@ -39618,7 +39649,7 @@
 
     "/ extensions...
     methodsToFileOut := OrderedCollection new.
-    Smalltalk allClassesDo:[:eachClass |
+    environment allClassesDo:[:eachClass |
         eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
             |mPckg|
 
@@ -39683,7 +39714,7 @@
             perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st'].
             perProjectInfo := Dictionary withAssociations:perProjectInfo.
 
-            classesInImage := Smalltalk allClassesInPackage:eachProject.
+            classesInImage := environment allClassesInPackage:eachProject.
             autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded].
             classesInImage := classesInImage select:[:cls | cls isLoaded and:[cls isPrivate not]].
 "/            filesInImage := classesInImage collect:[:cls | cls classBaseFilename] as:Set.
@@ -40246,7 +40277,7 @@
             appClassName := Dialog
                                 request:(resources stringWithCRs:'Create initial application class?\(Enter name or cancel)').
             appClassName notEmptyOrNil ifTrue:[
-                (appClass := Smalltalk classNamed:appClassName) notNil ifTrue:[
+                (appClass := environment classNamed:appClassName) notNil ifTrue:[
                     Dialog warn:(resources stringWithCRs:'Application class already exists\(in "%1")' with:appClass package).
                 ] ifFalse:[
                     theCode := '
@@ -40266,7 +40297,7 @@
                             doAcceptClassDefinition:theCode
                             usingCompiler:Compiler.
                     ].
-                    appClass := Smalltalk classNamed:appClassName.
+                    appClass := environment classNamed:appClassName.
                     appClass package:package.
                     self classMenuGenerateApplicationCodeForClasses:{ appClass }.
                     appClass instAndClassMethodsDo:[:m | m package:package].
@@ -40275,7 +40306,7 @@
                 appClassName := nil "/ for xxx below
             ].
             defaultStartupClassName := (appClassName ? 'xxx'),'Start'.
-            (Smalltalk classNamed:defaultStartupClassName) notNil ifTrue:[
+            (environment classNamed:defaultStartupClassName) notNil ifTrue:[
                 defaultStartupClassName := nil
             ].
             startupClassName := Dialog
@@ -40283,7 +40314,7 @@
                                         stringWithCRs:'Create startup class (e.g. main)?\(Enter name or cancel)')
                                     initialAnswer:defaultStartupClassName.
             startupClassName notEmptyOrNil ifTrue:[
-                (startupClass := Smalltalk classNamed:startupClassName) notNil ifTrue:[
+                (startupClass := environment classNamed:startupClassName) notNil ifTrue:[
                     Dialog warn:(resources stringWithCRs:'Startup class already exists\(in "%1")' with:startupClass package).
                 ] ifFalse:[
                     theCode := '
@@ -40301,7 +40332,7 @@
                     ] ifFalse:[
                         self doAcceptClassDefinition:theCode usingCompiler:Compiler.
                     ].
-                    (startupClass := Smalltalk classNamed:startupClassName) notNil ifTrue:[
+                    (startupClass := environment classNamed:startupClassName) notNil ifTrue:[
                         startupClass package:package.
                     ]
                 ].
@@ -40325,6 +40356,7 @@
     ].
 
     "Modified: / 23-07-2012 / 13:44:04 / cg"
+    "Modified: / 04-09-2013 / 17:46:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 projectMenuProperties
@@ -40421,7 +40453,7 @@
 
     "/ classes ...
     "/ ... and individual methods (extensions)
-    Smalltalk allClassesDo:[:aClass |
+    environment allClassesDo:[:aClass |
         (aClass package = projectToRemove) ifTrue:[
             classesToRemove add:aClass.
         ] ifFalse:[
@@ -40627,7 +40659,7 @@
         detect:[:aName |
             |cls|
 
-            cls := Smalltalk at:aName asSymbol.
+            cls := environment at:aName asSymbol.
             cls isNil
         ]
         ifNone:nil)
@@ -40642,13 +40674,13 @@
             contains:[:aName |
                 |cls|
 
-                cls := Smalltalk at:aName asSymbol.
+                cls := environment at:aName asSymbol.
                 cls notNil and:[cls isLoaded not]
             ])
         ifTrue:[
             (Dialog confirm:'Autoload missing class(es) ?\\Notice: generated abbrev.stc file is wrong if autoloaded classes are unloaded' withCRs) ifTrue:[
                 defClass compiled_classNames do:[:aName |
-                    (Smalltalk at:aName asSymbol) autoload
+                    (environment at:aName asSymbol) autoload
                 ].
             ].
         ].
@@ -40722,7 +40754,7 @@
         detect:[:aName |
             |cls|
 
-            cls := Smalltalk at:aName asSymbol.
+            cls := environment at:aName asSymbol.
             cls isNil
         ]
         ifNone:nil)
@@ -40737,13 +40769,13 @@
             contains:[:aName |
                 |cls|
 
-                cls := Smalltalk at:aName asSymbol.
+                cls := environment at:aName asSymbol.
                 cls notNil and:[cls isLoaded not]
             ])
         ifTrue:[
             (Dialog confirm:'Autoload missing class(es) ?\\Notice: generated abbrev.stc file is wrong if autoloaded classes are unloaded' withCRs) ifTrue:[
                 defClass compiled_classNames do:[:aName |
-                    (Smalltalk at:aName asSymbol) autoload
+                    (environment at:aName asSymbol) autoload
                 ].
             ].
         ].
@@ -40864,7 +40896,7 @@
 "/            containers := containers select:[:each | (each startsWith:'.') not].
 
             classesInProject := IdentitySet new.
-            Smalltalk allClassesDo:[:aClass |
+            environment allClassesDo:[:aClass |
                 (packageToCheck = aClass package) ifTrue:[
                     aClass isPrivate ifFalse:[
                         aClass isObsolete ifTrue:[
@@ -40979,7 +41011,7 @@
     projectList1 selectedProjects value:packagesToFindMissing.    
     projectList2 selectedProjects value:#('stx').    
 
-    packageHull := [:packageIDs | Smalltalk allProjectIDs select:[:p | packageIDs 
+    packageHull := [:packageIDs | environment allProjectIDs select:[:p | packageIDs 
                                                                         contains:[:packageId |
                                                                             p = packageId 
                                                                             or:[ (p startsWith:packageId,':')
@@ -41028,7 +41060,7 @@
     packagesToFindMissing := projectList1 selectedProjects value.
     packagesToFindCalled := projectList2 selectedProjects value.
 
-    classesToFindMissing := Smalltalk allClasses select:[:cls |
+    classesToFindMissing := environment allClasses select:[:cls |
                                 |p|
 
                                 p := cls package.
@@ -41040,7 +41072,7 @@
                             ].
     classesToFindMissing := classesToFindMissing asOrderedCollection sort:[:a :b | a name < b name].    
 
-    classesToFindCalled := Smalltalk allClasses select:[:cls |
+    classesToFindCalled := environment allClasses select:[:cls |
                                 |p|
 
                                 p := cls package.
@@ -41175,7 +41207,7 @@
 
     selectedProjects := self selectedProjects value ? #().
     (selectedProjects includes:(BrowserList nameListEntryForALL)) ifTrue:[
-        allProjects := Smalltalk allClasses collect:[:eachClass | eachClass package] as:Set.
+        allProjects := environment allClasses collect:[:eachClass | eachClass package] as:Set.
         selectedProjects := allProjects select:[:each| each notNil].
     ].
     selectedProjects := selectedProjects asOrderedCollection.
@@ -41228,7 +41260,7 @@
 
     |classes title|
 
-    classes := Smalltalk allClasses
+    classes := environment allClasses
                 reject:[:each | (projects includes:each package) ].
 
     projects size == 1 ifTrue:[
@@ -41537,7 +41569,7 @@
     newClassName isNil ifTrue:[^ self].
     (newClassName startsWith:'---- ') ifTrue:[^ self].
 
-    newClass := Smalltalk classNamed:newClassName.
+    newClass := environment classNamed:newClassName.
     newClass isNil ifTrue:[
         self warn:'no such class: ', newClassName.
         ^ self
@@ -41639,7 +41671,7 @@
     ].
 
 "/    allMethodCategories := Set new.
-"/    Smalltalk allBehaviorsDo:[:eachClass |
+"/    environment allBehaviorsDo:[:eachClass |
 "/        allMethodCategories addAll:eachClass categories
 "/    ].
 "/
@@ -41791,7 +41823,7 @@
     someCategories notEmpty ifTrue:[
         someCategories add:''.
     ].
-    someCategories addAll:(Smalltalk allMethodCategories reject:[:cat | (someCategories includes:cat) ]) asOrderedCollection sort.
+    someCategories addAll:(environment allMethodCategories reject:[:cat | (someCategories includes:cat) ]) asOrderedCollection sort.
 
     newCategory := self
                         askForMethodCategory:msg
@@ -41908,7 +41940,7 @@
     pattern := pattern string.
 
     matchingProtocols := Set new.
-    Smalltalk allClassesAndMetaclassesDo:[:eachClass |
+    environment allClassesAndMetaclassesDo:[:eachClass |
         eachClass isLoaded ifTrue:[
             eachClass categories do:[:cat |
                 (pattern match:cat) ifTrue:[
@@ -41969,7 +42001,7 @@
 
                                 all := protocols includes:(BrowserList nameListEntryForALL).
                                 self withWaitCursorDo:[
-                                    Smalltalk allClassesAndMetaclassesDo:[:eachClass |
+                                    environment allClassesAndMetaclassesDo:[:eachClass |
                                         eachClass categories do:[:cat |
                                             (all or:[protocols includes:cat]) ifTrue:[
                                                 whatToDo value:eachClass value:cat.
@@ -42101,7 +42133,7 @@
         className includesMatchCharacters ifFalse:[
             currentNamespace := self currentNamespace.
 
-            aliases := Smalltalk
+            aliases := environment
                         keysAndValuesSelect:[:nm :val | (nm sameAs:classNameArg) ]
                         thenCollect:[:nm :val | val isNil 
                                                     ifTrue:[ nil ]
@@ -42189,12 +42221,12 @@
     ].
 
     className includesMatchCharacters ifFalse:[
-        class := Smalltalk at:className asSymbol.
+        class := environment at:className asSymbol.
         class isBehavior ifTrue:[
             classes := IdentitySet with:class
         ]
     ] ifTrue:[
-        classes := Smalltalk allClasses select:[:each | className match:each name] as:IdentitySet.
+        classes := environment allClasses select:[:each | className match:each name] as:IdentitySet.
     ].
     classes size == 0 ifTrue:[
         ^ self warn:'No className matches'.
@@ -42401,7 +42433,7 @@
             searchPattern := box contents.
             searchPattern includesMatchCharacters ifTrue:[
                 matchingSelectors := Set new.
-                Smalltalk allMethodsWithSelectorDo:[:eachMethod :eachSelector |
+                environment allMethodsWithSelectorDo:[:eachMethod :eachSelector |
                     (searchPattern match:eachSelector) ifTrue:[
                         matchingSelectors add:eachSelector.
                     ].
@@ -42422,7 +42454,7 @@
                 s includesMatchCharacters ifTrue:[
                     matchBlock value
                 ] ifFalse:[
-                    what := Smalltalk selectorCompletion:s.
+                    what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:environment.
                     longest := what first.
                     matching := what last.
                     box list:matching.
@@ -42485,6 +42517,8 @@
         ].
         box showAtPointer.
     ] valueWithRestart
+
+    "Modified: / 04-09-2013 / 17:41:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 searchMenuFindResponseTo
@@ -42550,7 +42584,7 @@
     ].
 
     LastMethodMoveOrCopyTargetClass notNil ifTrue:[
-        initial := Smalltalk classNamed:LastMethodMoveOrCopyTargetClass.
+        initial := environment classNamed:LastMethodMoveOrCopyTargetClass.
         initial notNil ifTrue:[
             (currentClass notNil and:[currentClass theNonMetaclass name = initial name]) ifTrue:[
                 initial := nil
@@ -43134,7 +43168,7 @@
 
     classesChanged do:[:eachClass |
         eachClass changed:#projectOrganization.
-        Smalltalk changed:#projectOrganization with:(Array with:eachClass theNonMetaclass with:(methods select:[:m | m mclass == eachClass])).
+        environment changed:#projectOrganization with:(Array with:eachClass theNonMetaclass with:(methods select:[:m | m mclass == eachClass])).
     ].
 
     "Created: / 17-02-2000 / 23:04:45 / cg"
@@ -43385,10 +43419,10 @@
 
     renameOnly ifFalse:[
         affectedClasses := rewriteLocalSendersOnly
-                                ifTrue:[ Smalltalk allClasses ]
+                                ifTrue:[ environment allClasses ]
                                 ifFalse:[ 
                                     rewritePackageLocalSendersOnly
-                                        ifTrue:[ Smalltalk allClassesInPackage:aClass package ]
+                                        ifTrue:[ environment allClassesInPackage:aClass package ]
                                         ifFalse:[ aClass withAllSubclasses ]].
         "/ ask if so many methods should be rewritten; give chance to cancel
         (self findSendersOf:oldSelector in:affectedClasses andConfirmRefactoring:refactoring) ifFalse:[ ^ self ].
@@ -44657,7 +44691,7 @@
     "/ majority is defined: more than 2/3 of the other impls are in a particular package:
     projectsOfOtherImplementations := affectedMethods 
                                         collectAll:[:eachMethod |
-                                            (Smalltalk allImplementorsOf:eachMethod selector) 
+                                            (environment allImplementorsOf:eachMethod selector) 
                                                 collect:[:cls | (cls compiledMethodAt:eachMethod selector) package]
                                         ] as: Bag.
 
@@ -44769,7 +44803,7 @@
     ].
 
     "/ add actual categories of selected methods
-    (SystemBrowser findImplementorsOfAny:selectors in:(Smalltalk allClasses) ignoreCase:false)
+    (SystemBrowser findImplementorsOfAny:selectors in:(environment allClasses) ignoreCase:false)
     do:[:otherMethod |
         |cat|
 
@@ -45188,7 +45222,7 @@
 
     self withSearchCursorDo:[
         "/ search through all of the system
-        Smalltalk allMethodsDo:[:mthd |
+        environment allMethodsDo:[:mthd |
             |sent resources newFound any|
 
             any := false.
@@ -45554,7 +45588,7 @@
             searchBlock := [:whichMethod |
                                 | sentMessages |
                                 sentMessages := whichMethod messagesSent.
-                                self class findImplementorsOfAny:sentMessages in:(Smalltalk allClasses) ignoreCase:false.
+                                self class findImplementorsOfAny:sentMessages in:(environment allClasses) ignoreCase:false.
                            ].
 
             generator := Iterator on:[:whatToDo |
@@ -45977,7 +46011,7 @@
         spawnMethodImplementorsBrowserFor:aSelectorCollection
         match:doMatch
         in:openHow
-        classes:Smalltalk allClasses
+        classes:environment allClasses
         label:'Implementors'
 
     "Modified: / 05-09-2006 / 11:07:20 / cg"
@@ -46013,7 +46047,7 @@
                                 ] ifFalse:[
                                     list addAll:(self class
                                                     findImplementorsOf:aSelector
-                                                    in:Smalltalk allClasses
+                                                    in:environment allClasses
                                                     ignoreCase:false
                                                 )
                                 ].
@@ -46159,7 +46193,7 @@
     self
         spawnMethodSendersBrowserFor:aSelectorCollection
         in:openHow
-        classes:Smalltalk allClasses
+        classes:environment allClasses
         label:'Senders'
 
     "Modified: / 13-02-2012 / 13:17:20 / cg"
@@ -46259,7 +46293,7 @@
                                 cachedList := nil
                             ] ifFalse:[
                                 l := OrderedCollection new.
-                                Smalltalk allClasses
+                                environment allClasses
                                     do:[:eachClass |
                                         l addAll:(eachClass extensions
                                                     select:[:extensionMethod |
@@ -46336,7 +46370,7 @@
                                 selector isNil ifTrue:[
                                     #()
                                 ] ifFalse:[
-                                    self class allCallsOn:selector in:(Smalltalk allClasses) ignoreCase:false match:false.
+                                    self class allCallsOn:selector in:(environment allClasses) ignoreCase:false match:false.
                                 ].
                            ].
 
@@ -46415,6 +46449,7 @@
     "Modified: / 28-02-2012 / 16:48:38 / cg"
 ! !
 
+
 !NewSystemBrowser methodsFor:'menu actions-variables'!
 
 browseVarRefsOrModsWithTitle:browserTitle boxTitle:boxTitle variables:varType access:accessType all:browseAll
@@ -46469,7 +46504,7 @@
     varType == #poolVarNames ifTrue:[
         "/ also check classes which refer to that pool
         copyOfClasses := IdentitySet withAll:classes.
-        Smalltalk allClassesDo:[:someOtherClass |
+        environment allClassesDo:[:someOtherClass |
             (someOtherClass sharedPools includesAny:copyOfClasses) ifTrue:[
                 classes add:someOtherClass.
             ]
@@ -47508,7 +47543,7 @@
                 subInstCount := subInstCount + 1
             ]
         ].
-        classes := classes collect:[:eachName | Smalltalk classNamed:eachName].
+        classes := classes collect:[:eachName | environment classNamed:eachName].
 
         (instCount == 0 and:[subInstCount == 0]) ifTrue:[
             self warn:(resources
@@ -48415,7 +48450,7 @@
                 item := MenuItem label:itemLabel.
                 item itemValue:#'switchToFindHistoryEntry:' argument:entry.
                 m addItem:item.
-                (Smalltalk classNamed:(entry className ? '?')) isBehavior ifFalse:[
+                (environment classNamed:(entry className ? '?')) isBehavior ifFalse:[
                     item enabled:false.
                     item label:(LabelAndIcon icon:(ToolbarIconLibrary erase16x16Icon2) string:itemLabel)
                 ].
@@ -48457,7 +48492,7 @@
             |cls ns|
 
             lit isSymbol ifTrue:[
-                (((cls := Smalltalk at:lit) notNil and:[ cls isBehavior ])
+                (((cls := environment at:lit) notNil and:[ cls isBehavior ])
                 "JV@2011-11-25: Added check if the nameSpace is really a namespace, it may be
                  a class if m mclass is a privateClass...
                  ---------------------------------------------v"
@@ -48490,8 +48525,8 @@
     ^ m
 
     "Created: / 26-10-2011 / 18:15:01 / cg"
-    "Modified (comment): / 25-11-2011 / 21:57:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 09-09-2012 / 13:17:27 / cg"
+    "Modified: / 04-09-2013 / 17:43:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 goBackInGlobalHistoryMenu
@@ -49590,6 +49625,7 @@
     "Modified: / 19-10-2011 / 16:48:31 / cg"
 ! !
 
+
 !NewSystemBrowser methodsFor:'menus-dynamic-popup'!
 
 categoryPopUpMenu
@@ -49957,7 +49993,7 @@
 
     classes := OrderedCollection new.
     (sel := aSelectorString asSymbolIfInterned) notNil ifTrue:[
-        Smalltalk allClassesDo:[:aClass |
+        environment allClassesDo:[:aClass |
             (aClass includesSelector:sel) ifTrue:[
                 classes add:aClass.
             ].
@@ -50247,7 +50283,7 @@
 switchToClassNameMatching:aMatchString
     |className class|
 
-    class := Smalltalk classNamed:aMatchString.
+    class := environment classNamed:aMatchString.
 
     class notNil ifTrue:[
         self switchToClass:class
@@ -50269,21 +50305,21 @@
     ].
 
     aMatchString knownAsSymbol ifTrue:[
-        class := Smalltalk classNamed:aMatchString.
+        class := environment classNamed:aMatchString.
         class notNil ifTrue:[
             self switchToClass:class.
             ^ self.
         ].
-        classesMatchingCaseless := Smalltalk keys select:[:nm | nm sameAs:aMatchString].
+        classesMatchingCaseless := environment keys select:[:nm | nm sameAs:aMatchString].
 "/        matchStringLowercase := aMatchString asLowercase.
-"/        classesWithPrefixCaseless := Smalltalk keys select:[:nm | nm asLowercase startsWith:aMatchString].
-
-"/        impl := Smalltalk allImplementorsOf:aMatchString asSymbol.
+"/        classesWithPrefixCaseless := environment keys select:[:nm | nm asLowercase startsWith:aMatchString].
+
+"/        impl := environment allImplementorsOf:aMatchString asSymbol.
 "/        impl notEmptyOrNil ifTrue:[
 "/        ].
         (aMatchString first isLetter not
          or:[ aMatchString first isLowercase]) ifTrue:[
-            implementors := SystemBrowser findImplementorsMatching:aMatchString in:(Smalltalk allClasses) ignoreCase:true.
+            implementors := SystemBrowser findImplementorsMatching:aMatchString in:(environment allClasses) ignoreCase:true.
             implementors size > 0 ifTrue:[
                 (classesMatchingCaseless isEmpty and:[implementors size == 1]) ifTrue:[
                     answer := Dialog
@@ -50333,7 +50369,7 @@
                         spawnMethodBrowserForSearch:[
                                 SystemBrowser
                                     findImplementorsOf:aMatchString
-                                    in:Smalltalk allClasses
+                                    in:environment allClasses
                                     ignoreCase:false.
                             ]
                         sortBy:#class
@@ -50343,7 +50379,7 @@
                 ].
                 answer ~~ #searchClass ifTrue:[
                     answer isSymbol ifTrue:[
-                        self switchToClass:(Smalltalk classNamed:answer).
+                        self switchToClass:(environment classNamed:answer).
                     ] ifFalse:[
                         self switchToClass:(answer mclass) selector:(answer selector).
                     ].
@@ -50400,7 +50436,7 @@
 
     entry isNil ifTrue:[^ self].
 
-    cls := Smalltalk at:entry className.
+    cls := environment at:entry className.
     cls isNil ifTrue:[
         self warn:'Oops - class is gone'.
         ^ self
@@ -52111,7 +52147,7 @@
                         dialog searchAreaSelected == #currentPackage ifTrue:[
                             aSelectorOrBlock isArray ifTrue:[
                                 "/ findSendersOf:inMethods:ignoreCase:match:
-                                extensionMethods := Smalltalk allExtensionsForPackage:(dialog currentPackage).
+                                extensionMethods := environment allExtensionsForPackage:(dialog currentPackage).
                                 arguments2 := arguments copy.
                                 arguments2 at:2 put:extensionMethods.    
                                 moreResults := self class perform:(aSelectorOrBlock at:2) withArguments:arguments2.
@@ -52229,6 +52265,7 @@
     ] valueWithRestart.
 
     "Modified: / 20-08-2012 / 13:26:06 / cg"
+    "Modified: / 04-09-2013 / 17:39:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 askForMethodAndSpawnSearchTitle:title browserLabel:labelHolderOrBlock searchWith:aSelectorOrBlock searchWhat:searchWhat searchArea:whereDefault
@@ -52297,7 +52334,7 @@
         idx := shownCategories findFirst:[:l | l startsWith:best].
         idx == 0 ifTrue:[
             allMethodCategories isNil ifTrue:[
-                allMethodCategories := Smalltalk allMethodCategories asArray sort.
+                allMethodCategories := environment allMethodCategories asArray sort.
             ].
             box list:allMethodCategories.
             shownCategories := allMethodCategories.
@@ -52400,7 +52437,7 @@
 
     |offered already allProjects classesProjects selectedClasses selectedMethods|
 
-    allProjects := Smalltalk allProjectIDs.
+    allProjects := environment allProjectIDs.
 
     selectedClasses := self selectedClassesValue.
     selectedClasses notNil ifTrue:[
@@ -52498,7 +52535,7 @@
 
         box topView withWaitCursorDo:[
             s := contents withoutSpaces.
-            what := Smalltalk selectorCompletion:s.
+            what := DoWhatIMeanSupport selectorCompletion:s inEnvironment:environment .
             longest := what first.
             matching := what last.
             box list:matching.
@@ -52543,6 +52580,7 @@
     ^ selector
 
     "Modified (comment): / 29-08-2013 / 12:16:12 / cg"
+    "Modified: / 04-09-2013 / 17:40:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 askIfModified
@@ -52876,7 +52914,7 @@
     |class selectedClass ns|
 
     aClassName isNil ifTrue:[^ nil].
-    class := Smalltalk classNamed:aClassName.
+    class := environment classNamed:aClassName.
     class isNil ifTrue:[
         selectedClass := self theSingleSelectedClass.
         selectedClass notNil ifTrue:[
@@ -53023,7 +53061,7 @@
 listOfNamespaces := self selectedNamespaces value.
 
     currentNamespace = (BrowserList nameListEntryForALL) ifTrue:[
-        (cls := Smalltalk at:nameSym) notNil ifTrue:[
+        (cls := environment at:nameSym) notNil ifTrue:[
             meta ifTrue:[^ cls class].
             ^ cls
         ]
@@ -53037,14 +53075,14 @@
         ]
     ].
     currentNamespace ~= (BrowserList nameListEntryForALL) ifTrue:[
-        (cls := Smalltalk at:nameSym) notNil ifTrue:[
+        (cls := environment at:nameSym) notNil ifTrue:[
             meta ifTrue:[^ cls class].
             ^ cls
         ]
     ].
 
     (nm startsWith:'Smalltalk::') ifTrue:[
-        cls := Smalltalk classNamed:(nm withoutPrefix:'Smalltalk::').
+        cls := environment classNamed:(nm withoutPrefix:'Smalltalk::').
         cls notNil ifTrue:[
             meta ifTrue:[^ cls class].
             ^ cls
@@ -53079,7 +53117,7 @@
 
     sel := self selectionInCodeView.
     sel notNil ifTrue:[
-        (sel knownAsSymbol and:[Smalltalk includesKey:sel asSymbol]) ifTrue:[
+        (sel knownAsSymbol and:[environment includesKey:sel asSymbol]) ifTrue:[
             ^ sel
         ].
 
@@ -53144,17 +53182,18 @@
     |currentNamespace|
 
     currentNamespace := self currentNamespace.
-    currentNamespace isNil ifTrue:[
+    (currentNamespace isNil and:[environment == Smalltalk]) ifTrue:[
         ^ Array with:Smalltalk
     ].
 
     currentNamespace = (BrowserList nameListEntryForALL) ifTrue:[
-        ^ self listOfAllNamespaces
+        ^ environment listOfAllNamespaces
     ].
 
     ^ Array with:currentNamespace
 
-    "Modified: / 24.2.2000 / 13:49:20 / cg"
+    "Modified: / 24-02-2000 / 13:49:20 / cg"
+    "Modified: / 04-09-2013 / 17:44:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 newBrowserOrBufferDependingOn:openHowWanted label:labelOrNil forSpec:spec setupWith:aBlock
@@ -53411,7 +53450,7 @@
         changedClasses := ChangeSet current changedClasses collect:[:cls | cls theNonMetaclass].
     ].
 
-    ^ Smalltalk allClassesForWhich:[:aClass |
+    ^ environment allClassesForWhich:[:aClass |
         (allCategories 
             or:[(aCollectionOfCategories includes:aClass category)
             or:[includeChangedPseudoCategory and:[changedClasses includes:aClass]]])
@@ -53568,11 +53607,11 @@
 
     selectedProjects := self selectedProjects value.
     allIncluded := selectedProjects includes:(BrowserList nameListEntryForALL).
-    allIncluded ifTrue:[ ^ Smalltalk allClasses ].
+    allIncluded ifTrue:[ ^ environment allClasses ].
 
     setOfClasses := IdentitySet new.
 
-    Smalltalk allClassesDo:[:aClass |
+    environment allClassesDo:[:aClass |
         (selectedProjects includes:aClass package) ifTrue:[
             setOfClasses add:aClass .
         ]
@@ -53600,7 +53639,7 @@
     allIncluded := protocols includes:(BrowserList nameListEntryForALL).
 
     navigationState isFullProtocolBrowser ifTrue:[
-        targets := Smalltalk allClassesAndMetaclasses
+        targets := environment allClassesAndMetaclasses
     ] ifFalse:[
         targets := self selectedClassesValue
     ].
@@ -53635,7 +53674,7 @@
     protocols := self selectedProtocolsValue.
 
     navigationState isFullProtocolBrowser ifTrue:[
-        targets := Smalltalk allClassesAndMetaclasses
+        targets := environment allClassesAndMetaclasses
     ] ifFalse:[
         targets := self selectedClassesValue
     ].
@@ -54010,6 +54049,7 @@
     ^ navigationState projectListApplication
 ! !
 
+
 !NewSystemBrowser methodsFor:'private-history'!
 
 lastSearchPatterns
@@ -54471,7 +54511,7 @@
 
     implementors := SystemBrowser
         findImplementorsOf:aMethod selector
-        in:(Smalltalk allClasses)
+        in:(environment allClasses)
         ignoreCase:false.
 
     implementors notEmpty ifTrue:[
@@ -54490,7 +54530,7 @@
 false ifTrue:[  "/ too slow
     senders := SystemBrowser
         findSendersOf:aMethod selector
-        in:(Smalltalk allClasses)
+        in:(environment allClasses)
         ignoreCase:false.
     senders notEmpty ifTrue:[
         msg2 := 'Sent from ' , senders size printString, ' methods.'.
@@ -54739,7 +54779,7 @@
     env := self theSingleSelectedNamespace ? #Smalltalk.
     env = NavigatorModel nameListEntryForALL
         ifTrue:[env := #Smalltalk].
-    env := Smalltalk at: env.
+    env := environment at: env.
     partialName isEmptyOrNil
         ifTrue:
             [#('' #())]
@@ -54763,7 +54803,7 @@
 
     env := self theSingleSelectedNamespace ? #Smalltalk.
     env = NavigatorModel nameListEntryForALL ifTrue:[env := #Smalltalk].
-    env := Smalltalk at: env.
+    env := environment at: env.
 
     pattern := StringPattern readFrom: patternString onError: [^#('' #())].
     matches := OrderedCollection new.
@@ -55182,9 +55222,9 @@
                 cls := methodsClass.
                 (cls notNil and:[cls isObsolete]) ifTrue:[
                     cls isMeta ifTrue:[
-                        cls := (Smalltalk at:cls theNonMetaclass name) class
+                        cls := (environment at:cls theNonMetaclass name) class
                     ] ifFalse:[
-                        cls := Smalltalk at:cls name
+                        cls := environment at:cls name
                     ].
                 ].
                 "check after every lengthy operation if modified by user in the meantime..."
@@ -55671,7 +55711,7 @@
 
     super postBuildWith:aBuilder.
 
-    Smalltalk addDependent:self.
+    environment addDependent:self.
 
     self codeInfoVisible value ifTrue:[ self codeInfoVisibilityChanged ].
     (self toolBarVisibleHolder value or:[self bookmarkBarVisibleHolder value])
@@ -56012,7 +56052,7 @@
         ].
     ].
 
-    Smalltalk removeDependent:self.
+    environment removeDependent:self.
     super closeRequest.
 
     "Created: / 11-02-2000 / 13:23:00 / cg"
@@ -56931,7 +56971,7 @@
 do:[
                             ("self canUseRefactoringSupport"
                              language isSmalltalk
-                             and:[(Smalltalk at:cls theNonMetaclass name)==cls
+                             and:[(environment at:cls theNonMetaclass name)==cls
                              and:[cls programmingLanguage == language
                              and:[InteractiveAddMethodChange notNil]]]
                             ) ifTrue:[
@@ -57029,6 +57069,7 @@
 
     "Created: / 30-12-2009 / 20:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 02-08-2012 / 09:37:29 / cg"
+    "Modified: / 04-09-2013 / 17:38:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 askForInitialApplicationCodeFor:aClass
@@ -57128,7 +57169,7 @@
             ^ classes asArray.
         ].
 
-        cls := Smalltalk at:className asSymbol.
+        cls := environment at:className asSymbol.
         cls isNil ifTrue:[
             self warn:'No such class - try again'.
             ^ nil
@@ -57160,7 +57201,7 @@
     ].
 
     [
-        Smalltalk removeDependent:self.   "/ avoid update
+        environment removeDependent:self.   "/ avoid update
         ClassDescription updateHistoryLineQuerySignal answer:true do:[
             (ClassDescription updateChangeFileQuerySignal
             , ClassDescription updateChangeListQuerySignal) answer:self suppressChangeSetUpdate not
@@ -57172,7 +57213,7 @@
         codeView modified:false.
         navigationState realModifiedState:false.
     ] ensure:[
-        Smalltalk addDependent:self.
+        environment addDependent:self.
     ].
 
     self codeAspect:aspect.
@@ -57870,7 +57911,7 @@
     classes := self selectedClassesValue.
     names := classes collect:[:cls | cls name].
     self unloadClasses:classes.
-    self loadClasses:(names collect:[:nm | Smalltalk classNamed:nm]).
+    self loadClasses:(names collect:[:nm | environment classNamed:nm]).
 
     "/ to force update.
     "/ (I guess, this is not needed)
@@ -58997,15 +59038,20 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1972 2013-09-02 15:16:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1973 2013-09-05 10:46:11 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1972 2013-09-02 15:16:51 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1973 2013-09-05 10:46:11 vrany Exp $'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 !
 
 version_SVN
-    ^ '$Id: Tools__NewSystemBrowser.st,v 1.1972 2013-09-02 15:16:51 cg Exp $'
+    ^ '$Id: Tools__NewSystemBrowser.st,v 1.1973 2013-09-05 10:46:11 vrany Exp $'
 ! !
 
 
--- a/Tools__VariableList.st	Wed Sep 04 23:50:52 2013 +0200
+++ b/Tools__VariableList.st	Thu Sep 05 12:46:11 2013 +0200
@@ -269,7 +269,7 @@
         self invalidateList.
         ^ self.
     ].
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         (something == #projectOrganization) ifTrue:[^ self].
         (something == #currentChangeSet) ifTrue:[^ self].
         (something == #aboutToAutoloadClass) ifTrue:[^ self].
@@ -289,10 +289,10 @@
                         cls isObsolete ifTrue:[
                             cls isMeta ifTrue:[
                                 nm := cls theNonMetaclass name.
-                                selectedClasses at:idx put:(Smalltalk at:nm) class.
+                                selectedClasses at:idx put:(environment at:nm) class.
                             ] ifFalse:[
                                 nm := cls name.
-                                selectedClasses at:idx put:(Smalltalk at:nm).
+                                selectedClasses at:idx put:(environment at:nm).
                             ].
                             anyChange := true.
                         ] ifFalse:[
@@ -328,7 +328,7 @@
                 selectedClasses keysAndValuesDo:[:idx :cls | |nm|
                     cls isObsolete ifTrue:[
                         nm := cls name.
-                        selectedClasses at:idx put:(Smalltalk at:nm).
+                        selectedClasses at:idx put:(environment at:nm).
                         anyChange := true.
                     ]
                 ].
@@ -357,12 +357,12 @@
 !
 
 makeDependent
-    Smalltalk addDependent:self
+    environment addDependent:self
 
 !
 
 makeIndependent
-    Smalltalk removeDependent:self
+    environment removeDependent:self
 
 !
 
@@ -376,7 +376,7 @@
 update:something with:aParameter from:changedObject
     "/ ^ self delayedUpdate:something with:aParameter from:changedObject.
 
-    changedObject == Smalltalk ifTrue:[
+    changedObject == environment ifTrue:[
         something == #methodDictionary ifTrue:[
             ^ self 
         ].
@@ -864,6 +864,6 @@
 !VariableList class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.24 2013-09-02 12:14:09 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__VariableList.st,v 1.25 2013-09-05 10:46:11 vrany Exp $'
 ! !