SyntaxElementVariable.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 01 Apr 2015 10:38:01 +0100
branchjv
changeset 15566 184cea584be5
parent 13609 8b400fde34ef
parent 13821 3e9428fa12b6
child 16738 1a1b5477fdd5
permissions -rw-r--r--
Merged 25c2a13f00c5 and e6512d88f1ab (branch default - CVS HEAD)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13821
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     1
"
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     3
	      All Rights Reserved
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     4
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     5
 This software is furnished under a license and may be used
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     6
 only in accordance with the terms of that license and with the
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     8
 be provided or otherwise made available to, or used by, any
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
     9
 other person.  No title to or ownership of the software is
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    10
 hereby transferred.
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    11
"
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
SyntaxElement subclass:#SyntaxElementVariable
12978
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    15
	instanceVariableNames:'name assigned'
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'Interface-CodeView-Syntax'
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!SyntaxElementVariable class methodsFor:'documentation'!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
13821
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    23
copyright
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    24
"
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    25
 COPYRIGHT (c) 2006 by eXept Software AG
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    26
	      All Rights Reserved
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    27
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    28
 This software is furnished under a license and may be used
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    29
 only in accordance with the terms of that license and with the
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    31
 be provided or otherwise made available to, or used by, any
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    32
 other person.  No title to or ownership of the software is
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    33
 hereby transferred.
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    34
"
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    35
!
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
    36
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
documentation
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
 Replace 'SyntaxElement', 'NewClass1' and
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
 the empty string arguments by true values.
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
 Install (or change) the class by 'accepting',
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
 either via the menu or the keyboard (usually CMD-A).
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
 You can also change the category simply by editing
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
 the categoryString and accepting.
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
 To be nice to others (and yourself later), do not forget to
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
 add some documentation; preferably under the classes documentation
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
 protocol.
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
 (see the `create documentation stubs' item in the methodList menu;
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
  switch from instance to class to find this menu item.)
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
 Notice, that ST/X uses the convention to document the class using
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
 comment-only class methods (however, ST80 comments are supported and
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
 can be changed via the class-documentation menu).
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
"
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
! !
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
!SyntaxElementVariable methodsFor:'accessing'!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
assigned
13532
aa233ac282bc class: SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12995
diff changeset
    64
    ^ assigned ? false
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
assigned:something
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    assigned := something.
12978
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    69
!
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    70
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    71
name
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    72
    ^ name
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    73
!
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    74
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    75
name:something
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    76
    name := something.
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
! !
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
!SyntaxElementVariable methodsFor:'queries'!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
12978
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    81
isClass
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    82
    ^ type == #class
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    83
!
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    84
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    85
isGlobal 
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    86
    ^ (type == #GlobalVariable) or:[ type == #class]
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    87
!
48139ad13bf6 SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12910
diff changeset
    88
12995
211c2022783c class: SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12988
diff changeset
    89
isInstanceVariable
211c2022783c class: SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12988
diff changeset
    90
    ^ (type == #InstanceVariable) 
211c2022783c class: SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12988
diff changeset
    91
!
211c2022783c class: SyntaxElementVariable
Claus Gittinger <cg@exept.de>
parents: 12988
diff changeset
    92
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
isVariable
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    ^ true
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
! !
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
!SyntaxElementVariable class methodsFor:'documentation'!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
version
13821
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
   100
    ^ '$Header: /cvs/stx/stx/libtool/SyntaxElementVariable.st,v 1.6 2014-02-05 18:57:25 cg Exp $'
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
!
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
version_CVS
13821
3e9428fa12b6 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13532
diff changeset
   104
    ^ '$Header: /cvs/stx/stx/libtool/SyntaxElementVariable.st,v 1.6 2014-02-05 18:57:25 cg Exp $'
12910
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
! !
a78434864ebb initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106