equal
deleted
inserted
replaced
712 |
712 |
713 source := nil. |
713 source := nil. |
714 ! |
714 ! |
715 |
715 |
716 setupFromSource |
716 setupFromSource |
717 "extract privacy, category and selector from the source" |
717 "Extract data from class definition string in source. |
718 |
718 WARNING: This overwrites values in instvars!!" |
719 |parseTree catIdx poolIdx| |
719 |
|
720 |parseTree catIdx poolIdx instVarIdx classVarIdx | |
720 |
721 |
721 source notNil ifTrue:[ |
722 source notNil ifTrue:[ |
722 parseTree := Parser parseExpression:source. |
723 parseTree := Parser parseExpression:source. |
723 (parseTree notNil and:[parseTree isMessage]) ifFalse:[ |
724 (parseTree notNil and:[parseTree isMessage]) ifFalse:[ |
724 self error:'bad change source' mayProceed:true. |
725 self error:'bad change source' mayProceed:true. |
740 poolIdx := definitionSelector keywords indexOf:'poolDictionaries:'. |
741 poolIdx := definitionSelector keywords indexOf:'poolDictionaries:'. |
741 poolIdx ~~ 0 ifTrue:[ |
742 poolIdx ~~ 0 ifTrue:[ |
742 poolDictionaries := (parseTree args at:poolIdx) evaluate. |
743 poolDictionaries := (parseTree args at:poolIdx) evaluate. |
743 ]. |
744 ]. |
744 |
745 |
|
746 instVarIdx := definitionSelector keywords indexOf:'instanceVariableNames:'. |
|
747 instVarIdx ~~ 0 ifTrue:[ |
|
748 instanceVariableNames := (parseTree args at:instVarIdx) value. |
|
749 ]. |
|
750 |
|
751 classVarIdx := definitionSelector keywords indexOf:'classVariableNames:'. |
|
752 classVarIdx ~~ 0 ifTrue:[ |
|
753 classVariableNames := (parseTree args at:classVarIdx) value. |
|
754 ]. |
|
755 |
|
756 |
|
757 |
745 superClassName := parseTree receiver name. |
758 superClassName := parseTree receiver name. |
746 ]. |
759 ]. |
747 |
760 |
748 "Created: / 11-10-2006 / 14:10:02 / cg" |
761 "Created: / 11-10-2006 / 14:10:02 / cg" |
749 "Modified: / 08-11-2010 / 13:47:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
750 "Modified: / 13-06-2012 / 12:25:10 / cg" |
762 "Modified: / 13-06-2012 / 12:25:10 / cg" |
|
763 "Modified: / 30-01-2013 / 12:01:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
751 ! ! |
764 ! ! |
752 |
765 |
753 !ClassDefinitionChange methodsFor:'visiting'! |
766 !ClassDefinitionChange methodsFor:'visiting'! |
754 |
767 |
755 acceptChangeVisitor:aVisitor |
768 acceptChangeVisitor:aVisitor |