Tools__MethodRewriter.st
changeset 9988 bd2d92fdf9a3
parent 8817 d39f618e0903
child 10097 10ce33707e4f
equal deleted inserted replaced
9987:7c447dac9d3d 9988:bd2d92fdf9a3
     1 "{ Package: 'cvut:stx/goodies/libtool3' }"
     1 "
       
     2  COPYRIGHT (c) 2006 by eXept Software AG
       
     3 	      All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
       
    12 "{ Package: 'stx:libtool' }"
     2 
    13 
     3 "{ NameSpace: Tools }"
    14 "{ NameSpace: Tools }"
     4 
    15 
     5 ApplicationModel subclass:#MethodRewriter
    16 ApplicationModel subclass:#MethodRewriter
     6 	instanceVariableNames:'replaceTextView classes searchTextView actionInProgresHolder
    17 	instanceVariableNames:'replaceTextView classes searchTextView actionInProgresHolder
    10 	classVariableNames:''
    21 	classVariableNames:''
    11 	poolDictionaries:''
    22 	poolDictionaries:''
    12 	category:'Interface-Method rewriter'
    23 	category:'Interface-Method rewriter'
    13 !
    24 !
    14 
    25 
       
    26 !MethodRewriter class methodsFor:'documentation'!
       
    27 
       
    28 copyright
       
    29 "
       
    30  COPYRIGHT (c) 2006 by eXept Software AG
       
    31 	      All Rights Reserved
       
    32 
       
    33  This software is furnished under a license and may be used
       
    34  only in accordance with the terms of that license and with the
       
    35  inclusion of the above copyright notice.   This software may not
       
    36  be provided or otherwise made available to, or used by, any
       
    37  other person.  No title to or ownership of the software is
       
    38  hereby transferred.
       
    39 "
       
    40 ! !
    15 
    41 
    16 !MethodRewriter class methodsFor:'examples'!
    42 !MethodRewriter class methodsFor:'examples'!
    17 
    43 
    18 templateReplaceAtIfAbsentByAtAifAbsentPut
    44 templateReplaceAtIfAbsentByAtAifAbsentPut
    19 
    45 
   847 
   873 
   848     | matchingMethods |
   874     | matchingMethods |
   849     matchingMethods := Set new.
   875     matchingMethods := Set new.
   850     self
   876     self
   851         withMethodsDo:
   877         withMethodsDo:
   852             [:mth|
   878             [:mth| | tree |
       
   879             tree := mth parseTree.
       
   880             tree ifNil:[self breakPoint: #jv] ifNotNil:[
   853             (ParseTreeSearcher new)
   881             (ParseTreeSearcher new)
   854                 matches:self searchPattern do:[:aNode :answer | matchingMethods add:mth ];
   882                 matches:self searchPattern do:[:aNode :answer | matchingMethods add:mth ];
   855                executeTree:mth parseTree]
   883                executeTree: tree]
       
   884             ]
   856         finallyDo: 
   885         finallyDo: 
   857             [block value: matchingMethods]
   886             [block value: matchingMethods]
   858 
   887 
   859     "Created: / 12-12-2007 / 10:34:50 / janfrog"
   888     "Created: / 12-12-2007 / 10:34:50 / janfrog"
       
   889     "Modified: / 07-04-2011 / 22:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   860 !
   890 !
   861 
   891 
   862 methods
   892 methods
   863 
   893 
   864     ^self methodsFor: classes
   894     ^self methodsFor: classes
   949     "Modified: / 12-12-2007 / 10:45:20 / janfrog"
   979     "Modified: / 12-12-2007 / 10:45:20 / janfrog"
   950 ! !
   980 ! !
   951 
   981 
   952 !MethodRewriter class methodsFor:'documentation'!
   982 !MethodRewriter class methodsFor:'documentation'!
   953 
   983 
   954 version
       
   955     ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodRewriter.st,v 1.3 2009-09-30 12:09:31 fm Exp $'
       
   956 !
       
   957 
       
   958 version_CVS
   984 version_CVS
   959     ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodRewriter.st,v 1.3 2009-09-30 12:09:31 fm Exp $'
   985     ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodRewriter.st,v 1.4 2011-07-01 13:24:24 cg Exp $'
   960 !
   986 !
   961 
   987 
   962 version_CVS_jvrany
   988 version_CVS_jvrany
   963     ^ 'Header: /opt/data/cvs/stx/goodies/libtool3/Tools__MethodRewriter.st,v 1.3 2008-02-17 10:12:04 vranyj1 Exp '
   989     ^ '§Header: /opt/data/cvs/stx/goodies/libtool3/Tools__MethodRewriter.st,v 1.3 2008-02-17 10:12:04 vranyj1 Exp §'
   964 ! !
   990 !
       
   991 
       
   992 version_SVN
       
   993     ^ '§Id: Tools__MethodRewriter.st 7486 2009-10-26 22:06:24Z vranyj1 §'
       
   994 ! !