Tools__NewSystemBrowser.st
changeset 15605 96f27c4eec05
parent 15604 f1eec14ef278
child 15606 4756ec1dfc4d
child 15622 e467bad9d69f
--- a/Tools__NewSystemBrowser.st	Fri May 01 11:07:50 2015 +0200
+++ b/Tools__NewSystemBrowser.st	Fri May 01 16:50:21 2015 +0200
@@ -58118,7 +58118,7 @@
 
     sel := methodHere selector.
 
-    "/ these are meant to be empty nad only contain different comments...
+    "/ these are meant to be empty and only contain different comments...
     ( #(
         documentation
         version
@@ -58149,62 +58149,8 @@
                     onError: [:aString :position | ^ nil "ignore any error"].
     treeThere isNil ifTrue:[^ nil].
 
-    dictionary := Dictionary new.
-    (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
-        mClass := methodHere mclass theNonMetaclass.
-        "/ must try again, but remove mappings to classVariables and classInstanceVariables ...
-        mClass allClassVarNames do:[:each |
-            dictionary removeKey:each ifAbsent:nil.
-            dictionary removeValue:each ifAbsent:nil.
-        ].
-
-        mClass allInstVarNames do:[:each |
-"/            dictionary removeKey:each ifAbsent:nil.
-"/            dictionary removeValue:each ifAbsent:nil.
-            dictionary at:each put:each
-        ].
-        mClass allClassVarNames do:[:each |
-            dictionary at:each put:each
-        ].
-
-        (treeHere body equalTo: treeThere body withMapping: dictionary) ifTrue:[
-            "/ super and here mean something different in a subclass; may not ne present.
-            (dictionary keys contains:[:key | (key = 'super') or:[key = 'here']]) ifFalse:[
-                (dictionary values contains:[:value | value = 'super' or:[value = 'here']]) ifFalse:[
-                    "/ look at the mapping dictionary ..
-                    "/ remove equivalently mapped ones ..
-                    dictionary keys
-                        select:[:key | (dictionary at:key) = key]
-                        thenDo:[:key | dictionary removeKey:key].
-
-                    "/ now, no upper-case variables are allowed ...
-                    (dictionary keys contains:[:key | key isUppercaseFirst]) ifFalse:[
-                        "/ ignore (possibly renamed) arguments ...
-                        dictionary keys
-                            select:[:key | treeHere arguments contains:[:argVar | argVar name = key]]
-                            thenDo:[:eachArgHere |
-                                |argIndexHere argThere argIndexThere|
-
-                                argIndexHere := treeHere arguments findFirst:[:argVar | argVar name = eachArgHere].
-                                argThere := dictionary at:eachArgHere.
-                                argIndexThere := treeThere arguments findFirst:[:argVar | argVar name = argThere].
-                                argIndexHere == argIndexThere ifTrue:[
-                                    dictionary removeKey:eachArgHere
-                                ].
-                            ].
-
-                        remainingRenames := dictionary keys.
-                        (remainingRenames contains:[:key | treeHere arguments contains:[:argVar | argVar name = key]])
-                        ifFalse:[
-                            (remainingRenames contains:[:key | treeThere arguments contains:[:argVar | argVar name = key]])
-                            ifFalse:[
-                                ^ 'This method''s functionality is already inherited from ', implClass name , '.\\You may want to remove it here.'.
-                            ]
-                        ]
-                    ].
-                ].
-            ].
-        ].
+    (RBCodeDuplicationRule isParseTree:treeHere in:aClass duplicateOfTree:treeThere) ifTrue:[
+        ^ 'This method''s functionality is already inherited from ', implClass name , '.\\You may want to remove it here.'.
     ].
     ^ nil
 
@@ -62461,11 +62407,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2218 2015-05-01 09:07:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2218 2015-05-01 09:07:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
 !
 
 version_HG
@@ -62474,7 +62420,7 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__NewSystemBrowser.st,v 1.2218 2015-05-01 09:07:50 cg Exp $'
+    ^ '$Id: Tools__NewSystemBrowser.st,v 1.2219 2015-05-01 14:50:21 cg Exp $'
 ! !