--- a/BrowserView.st Mon Feb 18 17:21:45 2002 +0100
+++ b/BrowserView.st Mon Feb 18 18:31:17 2002 +0100
@@ -9000,9 +9000,10 @@
m subMenuAt:#codeMenu put:codeMenu.
].
- self environment ~~ Smalltalk ifTrue:[
+ self isSimulatedEnvironment ifTrue:[
m disableAll:#(methodCategoryNewCategory methodCategoryCreateAccessMethods methodCategoryRemove
methodCategoryRename codeMenu methodCategoryCopyCategory
+ methodCategorySpawnCategory
)
].
@@ -9675,6 +9676,29 @@
"Modified: 7.11.1996 / 18:53:55 / cg"
!
+methodCompareSourceAgainstCurrent
+ "compare with some other methods source"
+
+ |prev v classAndMethod words className methodName
+ meta class method codeHere codeRemote selector|
+
+ self checkMethodSelected ifFalse:[^ self].
+ class := currentMethod mclass.
+ selector := currentMethod selector.
+
+ codeHere := ((Smalltalk at:(class name asSymbol)) compiledMethodAt:selector) source.
+ codeRemote := currentMethod source.
+
+ v := DiffTextView
+ openOn:codeHere asString string
+ label:(resources string:'method here')
+ and:codeRemote asString string
+ label:'method remote'.
+ v label:'comparing with local version'.
+
+ "Modified: 7.11.1996 / 18:53:55 / cg"
+!
+
methodCompareWithPreviousVersion
"compare with previous version"
@@ -10045,7 +10069,7 @@
|specialMenu m items
newItems brkItems fileItems mthdItems
- searchItems sepLocalItems sepMthdItems localSearchItems|
+ searchItems sepLocalItems sepMthdItems|
currentMethod notNil ifTrue:[
currentMethod isCountingMemoryUsage ifTrue:[
@@ -10100,21 +10124,29 @@
]
].
- currentMethod isJavaMethod ifTrue:[
+ self isSimulatedEnvironment ifTrue:[
+ brkItems := #().
+ items := #(
+ ('Compare against...' methodCompareSource )
+ ('Compare against current' methodCompareSourceAgainstCurrent )
+ ('Inspect Method' methodInspect )
+ ).
+ ] ifFalse:[
items := #(
('Compare against...' methodCompareSource )
('Inspect Method' methodInspect )
+ ).
+ ].
+
+ currentMethod isJavaMethod ifTrue:[
+ items := items , #(
('Decompile' methodDecompile )
('-' nil )
('Flush code' methodFlushCode )
).
- items := items , brkItems.
-
] ifFalse:[
- items := #(
- ('Compare against...' methodCompareSource )
- ('Inspect Method' methodInspect )
+ items := items , #(
('stc-compile' methodSTCCompile )
('Decompile' methodDecompile )
('-' nil )
@@ -10139,8 +10171,8 @@
, items.
].
- items := items , brkItems.
- ].
+ ].
+ items := items , brkItems.
specialMenu := PopUpMenu itemList:items resources:resources.
@@ -14923,6 +14955,6 @@
!BrowserView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.712 2002-02-18 16:21:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.713 2002-02-18 17:31:17 cg Exp $'
! !
BrowserView initialize!