AbstractSourceFileWriter.st
branchjv
changeset 23546 0bb5e8a11f90
parent 23107 40173e082cbc
equal deleted inserted replaced
23545:22577f834a76 23546:0bb5e8a11f90
    19 	classVariableNames:''
    19 	classVariableNames:''
    20 	poolDictionaries:''
    20 	poolDictionaries:''
    21 	category:'Kernel-Classes-Support'
    21 	category:'Kernel-Classes-Support'
    22 !
    22 !
    23 
    23 
       
    24 Query subclass:#ClassSourceRewriteQuery
       
    25 	instanceVariableNames:'source klass'
       
    26 	classVariableNames:''
       
    27 	poolDictionaries:''
       
    28 	privateIn:AbstractSourceFileWriter
       
    29 !
       
    30 
    24 Query subclass:#MethodSourceRewriteQuery
    31 Query subclass:#MethodSourceRewriteQuery
    25 	instanceVariableNames:'method source'
    32 	instanceVariableNames:'source method'
    26 	classVariableNames:''
    33 	classVariableNames:''
    27 	poolDictionaries:''
    34 	poolDictionaries:''
    28 	privateIn:AbstractSourceFileWriter
    35 	privateIn:AbstractSourceFileWriter
    29 !
    36 !
    30 
    37 
    56 isAbstract
    63 isAbstract
    57     ^ self == AbstractSourceFileWriter
    64     ^ self == AbstractSourceFileWriter
    58 ! !
    65 ! !
    59 
    66 
    60 !AbstractSourceFileWriter class methodsFor:'signal constants'!
    67 !AbstractSourceFileWriter class methodsFor:'signal constants'!
       
    68 
       
    69 classSourceRewriteQuery
       
    70     "
       
    71     Hook to allow for just-in-time rewriting of a class definition while filing out.
       
    72     This can be used (is used) by source code exporters that need to rewrite class
       
    73     definitions on the fly. 
       
    74 
       
    75     See for example BeeProjectWriter.
       
    76     "
       
    77 
       
    78 
       
    79     ^ ClassSourceRewriteQuery
       
    80 
       
    81     "Created: / 24-10-2018 / 10:49:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    82 !
    61 
    83 
    62 methodSourceRewriteQuery
    84 methodSourceRewriteQuery
    63     "hook to allow for just-in-time rewriting of a method's sourceCode while filing out
    85     "hook to allow for just-in-time rewriting of a method's sourceCode while filing out
    64     used when saving version_XXX methods in a non-XXX sourceCodeManager
    86     used when saving version_XXX methods in a non-XXX sourceCodeManager
    65     (i.e. to rewrite all non-CVS version methods while saving into a CVS repository)
    87     (i.e. to rewrite all non-CVS version methods while saving into a CVS repository)
   196     ^self subclassResponsibility
   218     ^self subclassResponsibility
   197 
   219 
   198     "Created: / 21-08-2009 / 09:40:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
   220     "Created: / 21-08-2009 / 09:40:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
   199 ! !
   221 ! !
   200 
   222 
       
   223 
       
   224 !AbstractSourceFileWriter::ClassSourceRewriteQuery methodsFor:'accessing'!
       
   225 
       
   226 klass
       
   227     ^ klass
       
   228 !
       
   229 
       
   230 klass:aClass
       
   231     klass := aClass.
       
   232 !
       
   233 
       
   234 klass:aClass source: aString
       
   235     klass := aClass.
       
   236     source := aString.
       
   237 
       
   238     "Created: / 24-10-2018 / 11:10:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   239 !
       
   240 
       
   241 source
       
   242     ^ source
       
   243 !
       
   244 
       
   245 source:aString
       
   246     source := aString.
       
   247 ! !
       
   248 
   201 !AbstractSourceFileWriter::MethodSourceRewriteQuery class methodsFor:'documentation'!
   249 !AbstractSourceFileWriter::MethodSourceRewriteQuery class methodsFor:'documentation'!
   202 
   250 
   203 documentation
   251 documentation
   204 "
   252 "
   205     hook to allow for just-in-time rewriting of a method's sourceCode while filing out
   253     hook to allow for just-in-time rewriting of a method's sourceCode while filing out
   236 
   284 
   237 version_CVS
   285 version_CVS
   238     ^ '$Header$'
   286     ^ '$Header$'
   239 !
   287 !
   240 
   288 
       
   289 version_HG
       
   290 
       
   291     ^ '$Changeset: <not expanded> $'
       
   292 !
       
   293 
   241 version_SVN
   294 version_SVN
   242     ^ '$ Id: AbstractSourceFileWriter.st 10643 2011-06-08 21:53:07Z vranyj1  $'
   295     ^ '$ Id: AbstractSourceFileWriter.st 10643 2011-06-08 21:53:07Z vranyj1  $'
   243 ! !
   296 ! !
   244 
   297