GroovySourceFileWriter.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Jan 2013 00:15:51 +0000
branchrefactoring-classpath
changeset 2000 13a10b73aa83
parent 1864 60a8dc26c8c6
child 2069 75d40b7b986f
permissions -rw-r--r--
Closing branch refactoring-classpath
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1368
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     1
"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     3
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     5
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     8
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    14
 hereby transferred.
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    15
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    18
     see the differences between this version and version stx:libjava
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    19
     as of 1.9.2010
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    20
"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    22
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    23
AbstractSourceFileWriter subclass:#GroovySourceFileWriter
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:''
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    27
	category:'Languages-Groovy-Support'
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    28
!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    29
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    30
!GroovySourceFileWriter class methodsFor:'documentation'!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    31
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    32
copyright
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    33
"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    35
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    37
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    40
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    46
 hereby transferred.
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    47
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    50
     see the differences between this version and version stx:libjava
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    51
     as of 1.9.2010
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    52
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    53
"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    54
! !
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    55
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    56
!GroovySourceFileWriter methodsFor:'source writing'!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    57
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    58
fileOut:class on:stream withTimeStamp:stampIt withInitialize:initIt withDefinition:withDefinition methodFilter:methodFilter encoder:encoderOrNil
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    59
    "raise an error: must be redefined in concrete subclass(es)"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    60
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    61
    ^ self shouldImplement
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    62
!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    63
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    64
fileOutMethods:methods on:stream
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    65
    "superclass AbstractSourceFileWriter says that I am responsible to implement this method"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    66
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    67
    ^ self shouldImplement
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    68
!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    69
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    70
fileOutPackageDefinition:packageId on:stream
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    71
    "Files out a package definition on the stream, so all subsequent
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    72
     code entities will be placed in that package"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    73
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    74
    ^ self shouldImplement
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    75
! !
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    76
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    77
!GroovySourceFileWriter methodsFor:'source writing - comments'!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    78
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    79
fileOutCommentEndOn:aStream
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    80
    "Writes a comment end mark on aStream."
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    81
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    82
    "Modified: / 18-02-2012 / 18:35:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    83
!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    84
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    85
fileOutCommentLine:aString on:aStream
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    86
    "superclass AbstractSourceFileWriter says that I am responsible to implement this method"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    87
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    88
    ^ aStream nextPutAll:'// '; nextPutAll: aString
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    89
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    90
    "Modified: / 18-02-2012 / 18:35:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    91
!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    92
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    93
fileOutCommentStartOn:aStream
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    94
    "Writes a comment start mark on aStream."
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    95
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    96
    "Modified: / 18-02-2012 / 18:35:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    97
! !
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    98
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
    99
!GroovySourceFileWriter class methodsFor:'documentation'!
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
   100
1864
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   101
version_HG
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   102
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   103
    ^ '$Changeset: <not expanded> $'
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   104
!
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   105
1368
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
   106
version_SVN
1864
60a8dc26c8c6 Updated from HG
vranyj1
parents: 1818
diff changeset
   107
    ^ '§Id§'
1368
5f502e712403 Groovy language support and integration
vranyj1
parents:
diff changeset
   108
! !