144 |
144 |
145 |onToggle offToggle| |
145 |onToggle offToggle| |
146 |
146 |
147 showInstance ~~ aBoolean ifTrue:[ |
147 showInstance ~~ aBoolean ifTrue:[ |
148 self checkSelectionChangeAllowed ifTrue:[ |
148 self checkSelectionChangeAllowed ifTrue:[ |
149 aBoolean ifTrue:[ |
149 instanceToggle notNil ifTrue:[ |
150 offToggle := classToggle. |
150 aBoolean ifTrue:[ |
151 onToggle := instanceToggle. |
151 offToggle := classToggle. |
152 ] ifFalse:[ |
152 onToggle := instanceToggle. |
153 onToggle := classToggle. |
153 ] ifFalse:[ |
154 offToggle := instanceToggle. |
154 onToggle := classToggle. |
|
155 offToggle := instanceToggle. |
|
156 ]. |
|
157 onToggle turnOn. |
|
158 offToggle turnOff. |
155 ]. |
159 ]. |
156 onToggle turnOn. |
|
157 offToggle turnOff. |
|
158 |
|
159 showInstance := aBoolean. |
160 showInstance := aBoolean. |
160 |
161 |
161 (variableListView notNil |
162 (variableListView notNil |
162 and:[variableListView hasSelection]) ifTrue:[ |
163 and:[variableListView hasSelection]) ifTrue:[ |
163 self unhilightMethodCategories. |
164 self unhilightMethodCategories. |
4744 ! |
4745 ! |
4745 |
4746 |
4746 methodCategoryCreateDocumentationMethods |
4747 methodCategoryCreateDocumentationMethods |
4747 "create empty documentation methods" |
4748 "create empty documentation methods" |
4748 |
4749 |
4749 |cls| |
4750 |cls histStream| |
4750 |
4751 |
4751 self checkClassSelected ifFalse:[^ self]. |
4752 self checkClassSelected ifFalse:[^ self]. |
4752 |
4753 |
4753 cls := currentClass class. |
4754 cls := currentClass class. |
4754 |
4755 |
4755 self withWaitCursorDo:[ |
4756 self withWaitCursorDo:[ |
4756 |nm names source| |
4757 |nm names source| |
|
4758 |
|
4759 "/ add version method containing RCS template |
|
4760 "/ but only if not already present. |
4757 |
4761 |
4758 (cls implements:#version) ifFalse:[ |
4762 (cls implements:#version) ifFalse:[ |
4759 Compiler compile: |
4763 Compiler compile: |
4760 'version |
4764 'version |
4761 " |
4765 " |
4762 $' , 'Header$ |
4766 $' , 'Header$ |
4763 " |
4767 " |
4764 ' forClass:cls inCategory:'documentation'. |
4768 ' forClass:cls |
4765 ]. |
4769 inCategory:'documentation'. |
|
4770 ]. |
|
4771 |
|
4772 "/ add documentation method containing doc template |
|
4773 "/ but only if not already present. |
|
4774 |
4766 (cls implements:#documentation) ifFalse:[ |
4775 (cls implements:#documentation) ifFalse:[ |
4767 Compiler compile: |
4776 Compiler compile: |
4768 'documentation |
4777 'documentation |
4769 " |
4778 " |
4770 documentation to be added. |
4779 documentation to be added. |
4771 " |
4780 " |
4772 ' forClass:cls inCategory:'documentation'. |
4781 ' forClass:cls |
4773 ]. |
4782 inCategory:'documentation'. |
|
4783 ]. |
|
4784 |
|
4785 "/ add examples method containing examples template |
|
4786 "/ but only if not already present. |
|
4787 |
4774 (cls implements:#examples) ifFalse:[ |
4788 (cls implements:#examples) ifFalse:[ |
4775 Compiler compile: |
4789 Compiler compile: |
4776 'examples |
4790 'examples |
4777 " |
4791 " |
4778 examples to be added. |
4792 examples to be added. |
4779 " |
4793 " |
4780 ' forClass:cls inCategory:'documentation'. |
4794 ' forClass:cls |
4781 ]. |
4795 inCategory:'documentation'. |
|
4796 ]. |
|
4797 |
|
4798 "/ add history method containing created-entry |
|
4799 "/ but only if not already present. |
|
4800 |
|
4801 (cls implements:#history) ifFalse:[ |
|
4802 histStream := ReadWriteStream on: String new. |
|
4803 histStream nextPutAll: 'history'; cr. |
|
4804 HistoryLine isBehavior ifTrue:[ |
|
4805 histStream nextPutAll: (HistoryLine created printString); cr. |
|
4806 ] ifFalse:[ |
|
4807 histStream cr. |
|
4808 ]. |
|
4809 Compiler compile:(histStream contents) |
|
4810 forClass:cls |
|
4811 inCategory:'documentation'. |
|
4812 ]. |
|
4813 |
4782 self instanceProtocol:false. |
4814 self instanceProtocol:false. |
4783 self switchToMethodNamed:#documentation |
4815 self switchToMethodNamed:#documentation |
4784 "/ self updateMethodCategoryListWithScroll:false. |
4816 "/ self updateMethodCategoryListWithScroll:false. |
4785 "/ self updateMethodListWithScroll:false |
4817 "/ self updateMethodListWithScroll:false |
4786 ] |
4818 ] |