equal
deleted
inserted
replaced
1623 ! |
1623 ! |
1624 |
1624 |
1625 doSave |
1625 doSave |
1626 "generate code for class and instance" |
1626 "generate code for class and instance" |
1627 |
1627 |
1628 |cls code spec category mthd list| |
1628 |cls code spec category package mthd list| |
1629 |
1629 |
1630 (specClass notNil and:[specSelector notNil]) |
1630 (specClass notNil and:[specSelector notNil]) |
1631 ifFalse: |
1631 ifFalse: |
1632 [ |
1632 [ |
1633 ^self doSaveAs |
1633 ^self doSaveAs |
1648 |
1648 |
1649 category := 'list specs'. |
1649 category := 'list specs'. |
1650 |
1650 |
1651 (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
1651 (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
1652 category := mthd category. |
1652 category := mthd category. |
|
1653 package := mthd package. |
1653 ]. |
1654 ]. |
1654 |
1655 |
1655 code := Character excla asString |
1656 code := Character excla asString |
1656 , cls name , ' class methodsFor:' , category storeString |
1657 , cls name , ' class methodsFor:' , category storeString |
1657 , Character excla asString , '\\' |
1658 , Character excla asString , '\\' |
1673 , ' ' |
1674 , ' ' |
1674 , Character excla asString |
1675 , Character excla asString |
1675 , '\'. |
1676 , '\'. |
1676 |
1677 |
1677 code := code withCRs. |
1678 code := code withCRs. |
1678 (ReadStream on:code) fileIn. |
1679 Class packageQuerySignal |
1679 |
1680 answer:package |
1680 (cls canUnderstand:specSelector) ifFalse:[ |
1681 do:[ |
1681 (YesNoBox confirm:(resources string:'Generate aspect method for tabList (#%1)?' with:specSelector)) ifTrue:[ |
1682 (ReadStream on:code) fileIn. |
1682 self doGenerateAspectMethod |
1683 |
1683 ] |
1684 (cls canUnderstand:specSelector) ifFalse:[ |
1684 ]. |
1685 (YesNoBox confirm:(resources string:'Generate aspect method for tabList (#%1)?' with:specSelector)) ifTrue:[ |
|
1686 self doGenerateAspectMethod |
|
1687 ] |
|
1688 ]. |
|
1689 ]. |
1685 |
1690 |
1686 self addHistoryEntryForClass:cls selector:specSelector. |
1691 self addHistoryEntryForClass:cls selector:specSelector. |
1687 self clearModified. |
1692 self clearModified. |
1688 hasSaved := true. |
1693 hasSaved := true. |
1689 ! |
1694 ! |