JavaAnnotation.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 03 Oct 2013 10:34:10 +0200
changeset 2764 dfac4cae11e9
parent 2678 c865275e48a7
child 2731 13f5be2bf83b
permissions -rw-r--r--
Added GroovySourceHighlighter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     1
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
     3
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
     4
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
     5
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     6
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     7
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     8
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
     9
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    10
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    12
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    13
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    14
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    15
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    16
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    17
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    18
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    19
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    20
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    21
"{ Package: 'stx:libjava' }"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    22
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    23
Object subclass:#JavaAnnotation
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    24
	instanceVariableNames:'nameIndex name valuesCount values parent'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    25
	classVariableNames:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    26
	poolDictionaries:''
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    27
	category:'Languages-Java-Reader-Support'
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    28
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    29
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    30
!JavaAnnotation class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    31
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    32
copyright
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    33
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    34
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    35
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    36
 New code and modifications done at SWING Research Group [1]:
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    37
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    38
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    39
                            SWING Research Group, Czech Technical University in Prague
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    40
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    41
 This software is furnished under a license and may be used
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    42
 only in accordance with the terms of that license and with the
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    44
 be provided or otherwise made available to, or used by, any
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    45
 other person.  No title to or ownership of the software is
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    46
 hereby transferred.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    47
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    48
 [1] Code written at SWING Research Group contains a signature
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    49
     of one of the above copright owners. For exact set of such code,
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    50
     see the differences between this version and version stx:libjava
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
    51
     as of 1.9.2010
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    52
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    53
"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    54
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    55
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    56
!JavaAnnotation class methodsFor:'instance creation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    57
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    58
for:parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    59
    "Create & return a new instance for given parent."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    60
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    61
    ^ self basicNew initializeFor:parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    62
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    63
    " 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    64
    JavaAnnotation for: nil.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    65
    "
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    66
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    67
    "Modified: / 17-12-2010 / 16:32:46 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    68
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    69
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    70
!JavaAnnotation methodsFor:'accessing'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    71
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    72
constantPool
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    73
 ^parent constantPool.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    74
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    75
    "Created: / 17-12-2010 / 14:21:59 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    76
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    77
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    78
name
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    79
    name isNil ifTrue: [self constantPool at: nameIndex] ifFalse: [^name].
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    80
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    81
    "Modified: / 17-12-2010 / 18:01:14 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    82
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    83
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    84
name: something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    85
    name := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    86
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    87
    "Created: / 17-12-2010 / 18:02:30 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    88
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    89
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    90
nameIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    91
    ^ nameIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    92
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    93
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    94
nameIndex: something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    95
    nameIndex := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    96
    name := self constantPool at: nameIndex.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    97
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    98
    "Created: / 17-12-2010 / 18:02:14 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
    99
    "Modified: / 17-12-2010 / 19:47:41 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   100
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   101
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   102
parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   103
    ^ parent
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   104
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   105
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   106
parent:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   107
    parent := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   108
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   109
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   110
valueAt: anIndex
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   111
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   112
^ values at: anIndex value.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   113
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   114
    "Created: / 17-12-2010 / 14:26:38 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   115
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   116
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   117
values
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   118
    ^ values
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   119
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   120
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   121
values:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   122
    values := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   123
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   124
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   125
valuesCount
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   126
    ^ valuesCount
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   127
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   128
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   129
valuesCount:something
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   130
    valuesCount := something.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   131
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   132
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   133
!JavaAnnotation methodsFor:'initialization'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   134
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   135
initialize
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   136
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   137
    values := Dictionary new.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   138
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   139
    "Created: / 17-12-2010 / 16:35:08 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   140
!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   141
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   142
initializeFor:aParent 
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   143
    "Invoked when a new instance is created for aParent."
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   144
    
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   145
    parent := aParent.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   146
    self initialize.
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   147
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   148
    "Modified: / 17-12-2010 / 16:33:59 / Marcel Hlopko <hlopik@gmail.com>"
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   149
! !
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   150
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   151
!JavaAnnotation class methodsFor:'documentation'!
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   152
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   153
version_CVS
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2396
diff changeset
   154
    ^ '$Header: /cvs/stx/stx/libjava/JavaAnnotation.st,v 1.6 2013-09-06 00:41:08 vrany Exp $'
2317
d062ed801490 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   155
!
d062ed801490 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2217
diff changeset
   156
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   157
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   158
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   159
    ^ '$Changeset: <not expanded> $'
2217
172d0e38d498 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   160
!
172d0e38d498 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 2152
diff changeset
   161
749
e898eaeff091 Synchronized with CVS repository at:
vranyj1
parents:
diff changeset
   162
version_SVN
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   163
    ^ '§Id§'
2152
1cbdfbcc685c Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 749
diff changeset
   164
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2317
diff changeset
   165