8998 |
8998 |
8999 codeMenu notNil ifTrue:[ |
8999 codeMenu notNil ifTrue:[ |
9000 m subMenuAt:#codeMenu put:codeMenu. |
9000 m subMenuAt:#codeMenu put:codeMenu. |
9001 ]. |
9001 ]. |
9002 |
9002 |
9003 self environment ~~ Smalltalk ifTrue:[ |
9003 self isSimulatedEnvironment ifTrue:[ |
9004 m disableAll:#(methodCategoryNewCategory methodCategoryCreateAccessMethods methodCategoryRemove |
9004 m disableAll:#(methodCategoryNewCategory methodCategoryCreateAccessMethods methodCategoryRemove |
9005 methodCategoryRename codeMenu methodCategoryCopyCategory |
9005 methodCategoryRename codeMenu methodCategoryCopyCategory |
|
9006 methodCategorySpawnCategory |
9006 ) |
9007 ) |
9007 ]. |
9008 ]. |
9008 |
9009 |
9009 ^ m |
9010 ^ m |
9010 |
9011 |
9669 openOn:codeView contents asString string |
9670 openOn:codeView contents asString string |
9670 label:(resources string:'code here') |
9671 label:(resources string:'code here') |
9671 and:method source asString string |
9672 and:method source asString string |
9672 label:'method compare'. |
9673 label:'method compare'. |
9673 v label:'comparing with ' , className , ' ' , methodName. |
9674 v label:'comparing with ' , className , ' ' , methodName. |
|
9675 |
|
9676 "Modified: 7.11.1996 / 18:53:55 / cg" |
|
9677 ! |
|
9678 |
|
9679 methodCompareSourceAgainstCurrent |
|
9680 "compare with some other methods source" |
|
9681 |
|
9682 |prev v classAndMethod words className methodName |
|
9683 meta class method codeHere codeRemote selector| |
|
9684 |
|
9685 self checkMethodSelected ifFalse:[^ self]. |
|
9686 class := currentMethod mclass. |
|
9687 selector := currentMethod selector. |
|
9688 |
|
9689 codeHere := ((Smalltalk at:(class name asSymbol)) compiledMethodAt:selector) source. |
|
9690 codeRemote := currentMethod source. |
|
9691 |
|
9692 v := DiffTextView |
|
9693 openOn:codeHere asString string |
|
9694 label:(resources string:'method here') |
|
9695 and:codeRemote asString string |
|
9696 label:'method remote'. |
|
9697 v label:'comparing with local version'. |
9674 |
9698 |
9675 "Modified: 7.11.1996 / 18:53:55 / cg" |
9699 "Modified: 7.11.1996 / 18:53:55 / cg" |
9676 ! |
9700 ! |
9677 |
9701 |
9678 methodCompareWithPreviousVersion |
9702 methodCompareWithPreviousVersion |
10043 <resource: #programMenu > |
10067 <resource: #programMenu > |
10044 <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda #Ctrl) > |
10068 <resource: #keyboard ( #Cmds #Cmdi #Cmdg #Cmdt #Cmda #Ctrl) > |
10045 |
10069 |
10046 |specialMenu m items |
10070 |specialMenu m items |
10047 newItems brkItems fileItems mthdItems |
10071 newItems brkItems fileItems mthdItems |
10048 searchItems sepLocalItems sepMthdItems localSearchItems| |
10072 searchItems sepLocalItems sepMthdItems| |
10049 |
10073 |
10050 currentMethod notNil ifTrue:[ |
10074 currentMethod notNil ifTrue:[ |
10051 currentMethod isCountingMemoryUsage ifTrue:[ |
10075 currentMethod isCountingMemoryUsage ifTrue:[ |
10052 brkItems := #( |
10076 brkItems := #( |
10053 ('-' nil) |
10077 ('-' nil) |
10098 ] |
10122 ] |
10099 ] |
10123 ] |
10100 ] |
10124 ] |
10101 ]. |
10125 ]. |
10102 |
10126 |
10103 currentMethod isJavaMethod ifTrue:[ |
10127 self isSimulatedEnvironment ifTrue:[ |
|
10128 brkItems := #(). |
|
10129 items := #( |
|
10130 ('Compare against...' methodCompareSource ) |
|
10131 ('Compare against current' methodCompareSourceAgainstCurrent ) |
|
10132 ('Inspect Method' methodInspect ) |
|
10133 ). |
|
10134 ] ifFalse:[ |
10104 items := #( |
10135 items := #( |
10105 ('Compare against...' methodCompareSource ) |
10136 ('Compare against...' methodCompareSource ) |
10106 ('Inspect Method' methodInspect ) |
10137 ('Inspect Method' methodInspect ) |
|
10138 ). |
|
10139 ]. |
|
10140 |
|
10141 currentMethod isJavaMethod ifTrue:[ |
|
10142 items := items , #( |
10107 ('Decompile' methodDecompile ) |
10143 ('Decompile' methodDecompile ) |
10108 ('-' nil ) |
10144 ('-' nil ) |
10109 ('Flush code' methodFlushCode ) |
10145 ('Flush code' methodFlushCode ) |
10110 ). |
10146 ). |
10111 items := items , brkItems. |
|
10112 |
|
10113 ] ifFalse:[ |
10147 ] ifFalse:[ |
10114 |
10148 |
10115 items := #( |
10149 items := items , #( |
10116 ('Compare against...' methodCompareSource ) |
|
10117 ('Inspect Method' methodInspect ) |
|
10118 ('stc-compile' methodSTCCompile ) |
10150 ('stc-compile' methodSTCCompile ) |
10119 ('Decompile' methodDecompile ) |
10151 ('Decompile' methodDecompile ) |
10120 ('-' nil ) |
10152 ('-' nil ) |
10121 ('Package...' methodModifyPackage ) |
10153 ('Package...' methodModifyPackage ) |
10122 ). |
10154 ). |