Tools_NavigatorModel.st
branchdefault-browser-environment
changeset 13473 d8e9ed472e9f
parent 12042 e6d76cfa0b1b
child 13474 6a737cc259fc
--- a/Tools_NavigatorModel.st	Mon Sep 02 19:56:33 2013 +0200
+++ b/Tools_NavigatorModel.st	Tue Sep 03 16:14:28 2013 +0100
@@ -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,22 @@
     "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:'initialization'!
+
+initialize
+
+    super initialize.
+    environment := Smalltalk.
+
+    "Created: / 03-09-2013 / 15:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !NavigatorModel methodsFor:'misc'!
@@ -363,8 +404,14 @@
     ^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.23 2012-11-07 13:57:05 cg Exp $'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '§Id: Tools__NavigatorModel.st 7802 2011-07-05 18:33:36Z vranyj1 §'
 ! !
 
+
 NavigatorModel initialize!