1706 ! ! |
1706 ! ! |
1707 |
1707 |
1708 !MethodCategoryList methodsFor:'special'! |
1708 !MethodCategoryList methodsFor:'special'! |
1709 |
1709 |
1710 addAdditionalProtocol:aProtocol forClass:aClass |
1710 addAdditionalProtocol:aProtocol forClass:aClass |
|
1711 "those are simulated - in ST/X, empty categories do not really exist; |
|
1712 (because the category is an attribute of the method) |
|
1713 However, during browsing, it makes sense. Therefore, empty categories are |
|
1714 remembered here" |
|
1715 |
1711 |categories| |
1716 |categories| |
1712 |
1717 |
1713 "/ those are simulated - in ST/X, empty categories do not |
|
1714 "/ really exist; however, during browsing, it makes sense. |
|
1715 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ |
1718 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ |
1716 AdditionalEmptyCategoriesPerClassName := Dictionary new. |
1719 AdditionalEmptyCategoriesPerClassName := Dictionary new. |
1717 ]. |
1720 ]. |
1718 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1721 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1719 categories isNil ifTrue:[ |
1722 categories isNil ifTrue:[ |
1721 AdditionalEmptyCategoriesPerClassName at:aClass name put:categories. |
1724 AdditionalEmptyCategoriesPerClassName at:aClass name put:categories. |
1722 ]. |
1725 ]. |
1723 categories add:aProtocol. |
1726 categories add:aProtocol. |
1724 aClass changed:#organization. "/ not really ... to force update |
1727 aClass changed:#organization. "/ not really ... to force update |
1725 Smalltalk changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol). "/ not really ... to force update |
1728 Smalltalk changed:#methodCategoryAdded with:(Array with:aClass with:aProtocol). "/ not really ... to force update |
|
1729 |
|
1730 "Modified (comment): / 01-08-2012 / 17:30:36 / cg" |
1726 ! |
1731 ! |
1727 |
1732 |
1728 additionalProtocolForClass:aClass |
1733 additionalProtocolForClass:aClass |
1729 "/ those are simulated - in ST/X, empty categories do not |
1734 "those are simulated - in ST/X, empty categories do not really exist; |
1730 "/ really exist; however, during browsing, it makes sense. |
1735 (because the category is an attribute of the method) |
|
1736 However, during browsing, it makes sense. Therefore, empty categories are |
|
1737 remembered here" |
|
1738 |
1731 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ ^ #() ]. |
1739 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[ ^ #() ]. |
1732 ^ AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:[ #() ]. |
1740 ^ AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:[ #() ]. |
|
1741 |
|
1742 "Modified (comment): / 01-08-2012 / 17:29:16 / cg" |
1733 ! |
1743 ! |
1734 |
1744 |
1735 clearLastSelectedProtocol |
1745 clearLastSelectedProtocol |
1736 lastSelectedProtocols := nil |
1746 lastSelectedProtocols := nil |
1737 ! |
1747 ! |
1739 lastSelectedProtocols |
1749 lastSelectedProtocols |
1740 ^ lastSelectedProtocols |
1750 ^ lastSelectedProtocols |
1741 ! |
1751 ! |
1742 |
1752 |
1743 removeAdditionalProtocol:aListOfProtocols forClass:aClass |
1753 removeAdditionalProtocol:aListOfProtocols forClass:aClass |
|
1754 "those are simulated - in ST/X, empty categories do not really exist; |
|
1755 (because the category is an attribute of the method) |
|
1756 However, during browsing, it makes sense. Therefore, empty categories are |
|
1757 remembered here" |
|
1758 |
1744 |categories| |
1759 |categories| |
1745 |
|
1746 "/ those are simulated - in ST/X, empty categories do not |
|
1747 "/ really exist; however, during browsing, it makes sense. |
|
1748 |
1760 |
1749 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
1761 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
1750 |
1762 |
1751 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1763 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1752 categories isNil ifTrue:[^ self]. |
1764 categories isNil ifTrue:[^ self]. |
1755 AdditionalEmptyCategoriesPerClassName removeKey:aClass name. |
1767 AdditionalEmptyCategoriesPerClassName removeKey:aClass name. |
1756 ]. |
1768 ]. |
1757 |
1769 |
1758 aClass changed:#organization. "/ not really ... to force update |
1770 aClass changed:#organization. "/ not really ... to force update |
1759 Smalltalk changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols). "/ not really ... to force update |
1771 Smalltalk changed:#methodCategoriesRemoved with:(Array with:aClass with:aListOfProtocols). "/ not really ... to force update |
|
1772 |
|
1773 "Modified (comment): / 01-08-2012 / 17:29:59 / cg" |
1760 ! |
1774 ! |
1761 |
1775 |
1762 removeAllAdditionalProtocol |
1776 removeAllAdditionalProtocol |
1763 "/ those are simulated - in ST/X, empty categories do not |
1777 "those are simulated - in ST/X, empty categories do not really exist; |
1764 "/ really exist; however, during browsing, it makes sense. |
1778 (because the category is an attribute of the method) |
|
1779 However, during browsing, it makes sense. Therefore, empty categories are |
|
1780 remembered here" |
|
1781 |
1765 AdditionalEmptyCategoriesPerClassName := nil |
1782 AdditionalEmptyCategoriesPerClassName := nil |
1766 |
1783 |
1767 |
1784 "Modified (comment): / 01-08-2012 / 17:30:05 / cg" |
1768 ! |
1785 ! |
1769 |
1786 |
1770 removeAllAdditionalProtocolForClass:aClass |
1787 removeAllAdditionalProtocolForClass:aClass |
1771 "/ those are simulated - in ST/X, empty categories do not |
1788 "those are simulated - in ST/X, empty categories do not really exist; |
1772 "/ really exist; however, during browsing, it makes sense. |
1789 (because the category is an attribute of the method) |
|
1790 However, during browsing, it makes sense. Therefore, empty categories are |
|
1791 remembered here" |
|
1792 |
1773 AdditionalEmptyCategoriesPerClassName notNil ifTrue:[ |
1793 AdditionalEmptyCategoriesPerClassName notNil ifTrue:[ |
1774 AdditionalEmptyCategoriesPerClassName removeKey:aClass name ifAbsent:nil |
1794 AdditionalEmptyCategoriesPerClassName removeKey:aClass name ifAbsent:nil |
1775 ]. |
1795 ]. |
1776 |
1796 |
1777 |
1797 "Modified (comment): / 01-08-2012 / 17:30:10 / cg" |
1778 ! |
1798 ! |
1779 |
1799 |
1780 renameAdditionalProtocol:oldName to:newName forClass:aClass |
1800 renameAdditionalProtocol:oldName to:newName forClass:aClass |
|
1801 "those are simulated - in ST/X, empty categories do not really exist; |
|
1802 (because the category is an attribute of the method) |
|
1803 However, during browsing, it makes sense. Therefore, empty categories are |
|
1804 remembered here" |
|
1805 |
1781 |categories| |
1806 |categories| |
1782 |
|
1783 "/ those are simulated - in ST/X, empty categories do not |
|
1784 "/ really exist; however, during browsing, it makes sense. |
|
1785 |
1807 |
1786 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
1808 AdditionalEmptyCategoriesPerClassName isNil ifTrue:[^ self]. |
1787 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1809 categories := AdditionalEmptyCategoriesPerClassName at:aClass name ifAbsent:nil. |
1788 categories isNil ifTrue:[^ self]. |
1810 categories isNil ifTrue:[^ self]. |
1789 categories remove:oldName ifAbsent:nil. |
1811 categories remove:oldName ifAbsent:nil. |
1790 categories add:newName. |
1812 categories add:newName. |
1791 |
1813 |
1792 aClass changed:#organization. "/ not really ... to force update |
1814 aClass changed:#organization. "/ not really ... to force update |
1793 Smalltalk changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName). "/ not really ... to force update |
1815 Smalltalk changed:#methodCategoryRenamed with:(Array with:aClass with:oldName with:newName). "/ not really ... to force update |
|
1816 |
|
1817 "Modified (comment): / 01-08-2012 / 17:30:16 / cg" |
1794 ! ! |
1818 ! ! |
1795 |
1819 |
1796 !MethodCategoryList::CachedMethodInfo class methodsFor:'initialization'! |
1820 !MethodCategoryList::CachedMethodInfo class methodsFor:'initialization'! |
1797 |
1821 |
1798 initialize |
1822 initialize |