CypressMethod.st
changeset 17 d387df3d4e46
parent 15 31a33727c629
child 23 c9db5d8c9d2e
--- a/CypressMethod.st	Mon Sep 17 22:08:34 2012 +0000
+++ b/CypressMethod.st	Tue Sep 18 10:40:17 2012 +0000
@@ -27,17 +27,39 @@
 !CypressMethod methodsFor:'accessing'!
 
 category
-    ^ category
+    ^ category ? '* as yet unclassified *'
+
+    "Modified: / 18-09-2012 / 10:56:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+category:something
+    category := something.
+!
+
+fullClassName
+    ^meta == true 
+        ifTrue:[klass , ' class']
+        ifFalse:[klass]
+
+    "Created: / 18-09-2012 / 10:54:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 klass
     ^ klass
 !
 
+klass:something
+    klass := something.
+!
+
 meta
     ^ meta
 !
 
+meta:something
+    meta := something.
+!
+
 selector
     ^self name
 
@@ -46,6 +68,27 @@
 
 source
     ^ source
+!
+
+source:aString
+    source := aString.
+    name := (Parser parseMethodSpecification: source) selector
+
+    "Modified: / 18-09-2012 / 11:09:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!CypressMethod methodsFor:'converting'!
+
+asChange
+    "superclass CypressModel says that I am responsible to implement this method"
+
+    ^ MethodDefinitionChange new
+        className: self fullClassName;
+        category: self category;
+        source: self source;
+        selector: self name.
+
+    "Modified: / 18-09-2012 / 11:10:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !CypressMethod methodsFor:'initialization'!
@@ -66,6 +109,16 @@
     "Created: / 11-09-2012 / 00:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!CypressMethod methodsFor:'private'!
+
+changesInto:aChangeSet
+    "superclass CypressModel says that I am responsible to implement this method"
+
+    ^ aChangeSet add: self asChange
+
+    "Modified: / 18-09-2012 / 10:57:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !CypressMethod class methodsFor:'documentation'!
 
 version_SVN