author | convert-repo |
Wed, 11 Dec 2019 04:28:36 +0000 | |
changeset 1116 | b51ace366efc |
parent 1072 | a44c741ee5ef |
permissions | -rw-r--r-- |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
1 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
2 |
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
374
e65bd2bf892a
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
300
diff
changeset
|
3 |
Copyright (C) 2013-2015 Jan Vrany |
1072 | 4 |
Copyright (C) 2014 Claus Gittinger |
5 |
Copyright (C) 2017 Jan Vrany |
|
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
6 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
7 |
This library is free software; you can redistribute it and/or |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
8 |
modify it under the terms of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
9 |
License as published by the Free Software Foundation; either |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
10 |
version 2.1 of the License. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
11 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
12 |
This library is distributed in the hope that it will be useful, |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
15 |
Lesser General Public License for more details. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
16 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
17 |
You should have received a copy of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
18 |
License along with this library; if not, write to the Free Software |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
19 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
20 |
" |
249
8bc64027b189
Package renamed to stx:goodies/smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
124
diff
changeset
|
21 |
"{ Package: 'stx:goodies/smallsense' }" |
81 | 22 |
|
23 |
"{ NameSpace: SmallSense }" |
|
24 |
||
25 |
ParseNode subclass:#SelectorNode |
|
26 |
instanceVariableNames:'value' |
|
27 |
classVariableNames:'' |
|
28 |
poolDictionaries:'' |
|
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
29 |
category:'SmallSense-Smalltalk' |
81 | 30 |
! |
31 |
||
32 |
!SelectorNode class methodsFor:'documentation'! |
|
33 |
||
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
34 |
copyright |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
35 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
36 |
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE |
374
e65bd2bf892a
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
300
diff
changeset
|
37 |
Copyright (C) 2013-2015 Jan Vrany |
1072 | 38 |
Copyright (C) 2014 Claus Gittinger |
39 |
Copyright (C) 2017 Jan Vrany |
|
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
40 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
41 |
This library is free software; you can redistribute it and/or |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
42 |
modify it under the terms of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
43 |
License as published by the Free Software Foundation; either |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
44 |
version 2.1 of the License. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
45 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
46 |
This library is distributed in the hope that it will be useful, |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
47 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
48 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
49 |
Lesser General Public License for more details. |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
50 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
51 |
You should have received a copy of the GNU Lesser General Public |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
52 |
License along with this library; if not, write to the Free Software |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
53 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
54 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
55 |
! |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
56 |
|
81 | 57 |
documentation |
58 |
" |
|
59 |
A (helper) node that represents a selector (or its part). |
|
60 |
SelectorNodes are not directly created nor used by the |
|
61 |
parser/compiler itself. |
|
62 |
||
63 |
Some custom subclasses (syntax highlighters for instance) |
|
64 |
makes use of it. |
|
65 |
||
66 |
[author:] |
|
67 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
68 |
||
69 |
[instance variables:] |
|
70 |
||
71 |
[class variables:] |
|
72 |
||
73 |
[see also:] |
|
74 |
SyntaxHighlighter2 |
|
75 |
||
76 |
" |
|
77 |
! ! |
|
78 |
||
79 |
!SelectorNode class methodsFor:'instance creation'! |
|
80 |
||
81 |
value: selector from: start to: end |
|
82 |
||
83 |
^self new |
|
84 |
value: selector; |
|
85 |
startPosition:start endPosition: end |
|
86 |
||
87 |
"Created: / 16-02-2012 / 20:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 |
! ! |
|
89 |
||
90 |
!SelectorNode methodsFor:'accessing'! |
|
91 |
||
92 |
value |
|
93 |
^ value |
|
94 |
! |
|
95 |
||
96 |
value:aString |
|
97 |
value := aString. |
|
98 |
! ! |
|
99 |
||
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
100 |
!SelectorNode methodsFor:'navigation-SmallSense'! |
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
101 |
|
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
102 |
navigateToUsing: navigator |
300
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
103 |
| p | |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
104 |
|
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
105 |
p := self parent. |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
106 |
p notNil ifTrue:[ |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
107 |
p navigateToUsing: navigator |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
108 |
] ifFalse:[ |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
109 |
self breakPoint: #jv |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
110 |
]. |
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
111 |
|
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
112 |
"Created: / 24-09-2013 / 10:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
300
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
113 |
"Modified: / 19-11-2014 / 15:47:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
114 |
! ! |
102
538fc4ef040c
CodeNavigation service refactored to support Java (not yet done, though)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
81
diff
changeset
|
115 |
|
1061
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
116 |
!SelectorNode methodsFor:'printing & storing'! |
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
117 |
|
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
118 |
printOn:aStream indent:aSmallInteger |
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
119 |
aStream nextPutAll: value |
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
120 |
|
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
121 |
"Created: / 13-11-2017 / 22:27:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
122 |
! ! |
d3919703de3c
Fixed missing `SelectorNode >> #printOn:indent:`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
374
diff
changeset
|
123 |
|
81 | 124 |
!SelectorNode methodsFor:'testing'! |
125 |
||
126 |
isSelector |
|
127 |
||
128 |
^true |
|
129 |
||
130 |
"Created: / 16-02-2012 / 21:04:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
131 |
! ! |
|
132 |
||
124 | 133 |
!SelectorNode class methodsFor:'documentation'! |
134 |
||
135 |
version_HG |
|
136 |
||
137 |
^ '$Changeset: <not expanded> $' |
|
138 |
! ! |
|
139 |