--- a/CustomContext.st Tue Nov 18 09:33:03 2014 +0000
+++ b/CustomContext.st Wed Nov 19 19:39:02 2014 +0100
@@ -1,21 +1,21 @@
"{ Package: 'jn:refactoring_custom' }"
Object subclass:#CustomContext
- instanceVariableNames:''
- classVariableNames:'SmalltalkNamespace'
+ instanceVariableNames:'model'
+ classVariableNames:''
poolDictionaries:''
category:'Interface-Refactoring-Custom'
!
-!CustomContext class methodsFor:'initialization'!
+!CustomContext class methodsFor:'instance creation'!
-initialize
- "Invoked at system start or when the class is dynamically loaded."
+new
+ "Returns an initialized instance"
- SmalltalkNamespace := RBNamespace onEnvironment: BrowserEnvironment new.
+ ^ self basicNew initialize.
- "Modified: / 14-11-2014 / 19:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-11-2014 / 09:36:37 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
!CustomContext class methodsFor:'queries'!
@@ -28,6 +28,24 @@
^ self == CustomContext.
! !
+!CustomContext methodsFor:'accessing'!
+
+model
+ "Returns a class model on we operate e.g. RBNamespace, CustomNamespace"
+
+ ^ model
+
+ "Modified (comment): / 19-11-2014 / 10:00:29 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+!
+
+model: anRBNamespace
+ "see model"
+
+ model := anRBNamespace
+
+ "Modified (format): / 19-11-2014 / 10:01:10 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!CustomContext methodsFor:'accessing-selection'!
selectedClassCategories
@@ -89,18 +107,27 @@
"Created: / 05-05-2014 / 00:14:59 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
! !
+!CustomContext methodsFor:'initialization'!
+
+initialize
+
+ model := CustomNamespace onEnvironment: BrowserEnvironment new.
+
+ "Modified: / 14-11-2014 / 19:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-11-2014 / 09:35:26 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
+! !
+
!CustomContext methodsFor:'private'!
asRBClass: cls
- "For given real class, return a curresponding RBClass"
+ "For given real class, return a corresponding RBClass"
^ Object isMetaclass
- ifTrue:[ SmalltalkNamespace metaclassNamed: cls theNonMetaclass name]
- ifFalse:[SmalltalkNamespace classNamed: cls name ]
-
- "Ceated: / 14-11-2014 / 19:26:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ ifTrue:[ model metaclassNamed: cls theNonMetaclass name ]
+ ifFalse:[ model classNamed: cls name ]
"Created: / 14-11-2014 / 19:26:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 19-11-2014 / 09:39:15 / Jakub Nesveda <nesvejak@fit.cvut.cz>"
!
asRBMethod: aMethod
@@ -134,5 +161,3 @@
^ '$Changeset: <not expanded> $'
! !
-
-CustomContext initialize!