equal
deleted
inserted
replaced
806 ] ifFalse:[ |
806 ] ifFalse:[ |
807 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
807 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
808 ]. |
808 ]. |
809 code := code, thisCode. |
809 code := code, thisCode. |
810 definedMethodSelectors add:sym. |
810 definedMethodSelectors add:sym. |
|
811 Transcript showCR:'code generated for aspect: ' , sym |
811 ] ifTrue:[ |
812 ] ifTrue:[ |
812 Transcript showCR:'no code generated for aspect: ' , sym , ' (method already exists)' |
813 Transcript showCR:'*** no code generated for aspect: ' , sym , ' (method already exists)' |
813 ]. |
814 ]. |
814 ]. |
815 ]. |
815 ]. |
816 ]. |
816 |
817 |
817 "/ for each aspect, generate getter (if not yet implemented) |
818 "/ for each aspect, generate getter (if not yet implemented) |
822 sym := aSel asSymbol. |
823 sym := aSel asSymbol. |
823 (definedMethodSelectors includes:sym) ifFalse:[ |
824 (definedMethodSelectors includes:sym) ifFalse:[ |
824 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
825 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
825 code := code , thisCode. |
826 code := code , thisCode. |
826 definedMethodSelectors add:sym. |
827 definedMethodSelectors add:sym. |
|
828 Transcript showCR:'code generated for aspect: ' , sym |
827 ] |
829 ] |
828 ]. |
830 ]. |
829 |
831 |
830 "/ exported aspects - need setter methods |
832 "/ exported aspects - need setter methods |
831 exportSels := (treeView exportedAspects ? #()) collect:[:entry | (entry subAspect , ':') asSymbol]. |
833 exportSels := (treeView exportedAspects ? #()) collect:[:entry | (entry subAspect , ':') asSymbol]. |
837 (definedMethodSelectors includes:sym) ifFalse:[ |
839 (definedMethodSelectors includes:sym) ifFalse:[ |
838 aspect := (aSel copyWithoutLast:1) asSymbol. |
840 aspect := (aSel copyWithoutLast:1) asSymbol. |
839 thisCode := (self generateAspectSetMethodFor:aspect spec:protoSpec inClass:cls). |
841 thisCode := (self generateAspectSetMethodFor:aspect spec:protoSpec inClass:cls). |
840 code := code , thisCode. |
842 code := code , thisCode. |
841 definedMethodSelectors add:sym. |
843 definedMethodSelectors add:sym. |
|
844 Transcript showCR:'export code generated for aspect: ' , sym |
842 ] |
845 ] |
843 ]. |
846 ]. |
844 |
847 |
845 self generateCodeFrom:(aProp spec actionSelectors) in:cls |
848 self generateCodeFrom:(aProp spec actionSelectors) in:cls |
846 do:[:aSel| |
849 do:[:aSel| |
849 sym := aSel asSymbol. |
852 sym := aSel asSymbol. |
850 (definedMethodSelectors includes:sym) ifFalse:[ |
853 (definedMethodSelectors includes:sym) ifFalse:[ |
851 thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls). |
854 thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls). |
852 code := code , thisCode. |
855 code := code , thisCode. |
853 definedMethodSelectors add:sym. |
856 definedMethodSelectors add:sym. |
|
857 Transcript showCR:'action generated for aspect: ' , sym |
854 ] |
858 ] |
855 ]. |
859 ]. |
856 |
860 |
857 self generateCodeFrom:(aProp spec valueSelectors) in:cls |
861 self generateCodeFrom:(aProp spec valueSelectors) in:cls |
858 do:[:aSel| |
862 do:[:aSel| |
863 "/ uppercase: - assume its a globals name. |
867 "/ uppercase: - assume its a globals name. |
864 aSel first isUppercase ifFalse:[ |
868 aSel first isUppercase ifFalse:[ |
865 thisCode := (self generateValueMethodFor:aSel spec:protoSpec inClass:cls). |
869 thisCode := (self generateValueMethodFor:aSel spec:protoSpec inClass:cls). |
866 code := code , thisCode. |
870 code := code , thisCode. |
867 definedMethodSelectors add:sym. |
871 definedMethodSelectors add:sym. |
|
872 Transcript showCR:'code generated for aspect: ' , sym |
868 ] |
873 ] |
869 ] |
874 ] |
870 ]. |
875 ]. |
871 ]. |
876 ]. |
872 |
877 |