author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 26 Oct 2017 12:35:22 +0000 | |
changeset 1059 | acfcb242f75e |
parent 374 | e65bd2bf892a |
child 1061 | d3919703de3c |
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 |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
4 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
5 |
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
|
6 |
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
|
7 |
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
|
8 |
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
|
9 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
10 |
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
|
11 |
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
|
12 |
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
|
13 |
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
|
14 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
15 |
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
|
16 |
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
|
17 |
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
|
18 |
" |
249
8bc64027b189
Package renamed to stx:goodies/smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
124
diff
changeset
|
19 |
"{ Package: 'stx:goodies/smallsense' }" |
81 | 20 |
|
21 |
"{ NameSpace: SmallSense }" |
|
22 |
||
23 |
ParseNode subclass:#SelectorNode |
|
24 |
instanceVariableNames:'value' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
27 |
category:'SmallSense-Smalltalk' |
81 | 28 |
! |
29 |
||
30 |
!SelectorNode class methodsFor:'documentation'! |
|
31 |
||
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
32 |
copyright |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
33 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
34 |
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
|
35 |
Copyright (C) 2013-2015 Jan Vrany |
252
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
36 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
37 |
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
|
38 |
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
|
39 |
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
|
40 |
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
|
41 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
42 |
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
|
43 |
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
|
44 |
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
|
45 |
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
|
46 |
|
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
47 |
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
|
48 |
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
|
49 |
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
|
50 |
" |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
51 |
! |
feba6ee5c814
Added copyright notice and license information (LGPL2)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
249
diff
changeset
|
52 |
|
81 | 53 |
documentation |
54 |
" |
|
55 |
A (helper) node that represents a selector (or its part). |
|
56 |
SelectorNodes are not directly created nor used by the |
|
57 |
parser/compiler itself. |
|
58 |
||
59 |
Some custom subclasses (syntax highlighters for instance) |
|
60 |
makes use of it. |
|
61 |
||
62 |
[author:] |
|
63 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
64 |
||
65 |
[instance variables:] |
|
66 |
||
67 |
[class variables:] |
|
68 |
||
69 |
[see also:] |
|
70 |
SyntaxHighlighter2 |
|
71 |
||
72 |
" |
|
73 |
! ! |
|
74 |
||
75 |
!SelectorNode class methodsFor:'instance creation'! |
|
76 |
||
77 |
value: selector from: start to: end |
|
78 |
||
79 |
^self new |
|
80 |
value: selector; |
|
81 |
startPosition:start endPosition: end |
|
82 |
||
83 |
"Created: / 16-02-2012 / 20:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
84 |
! ! |
|
85 |
||
86 |
!SelectorNode methodsFor:'accessing'! |
|
87 |
||
88 |
value |
|
89 |
^ value |
|
90 |
! |
|
91 |
||
92 |
value:aString |
|
93 |
value := aString. |
|
94 |
! ! |
|
95 |
||
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
96 |
!SelectorNode methodsFor:'navigation-SmallSense'! |
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
97 |
|
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
98 |
navigateToUsing: navigator |
300
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
99 |
| p | |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
100 |
|
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
101 |
p := self parent. |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
102 |
p notNil ifTrue:[ |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
103 |
p navigateToUsing: navigator |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
104 |
] ifFalse:[ |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
105 |
self breakPoint: #jv |
f5466d944367
Workaround for weird DNU in SelectorNode>>navigateToUsing:
Claus Gittinger
parents:
252
diff
changeset
|
106 |
]. |
104
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
107 |
|
3b05b2d777dd
Some more support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
108 |
"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
|
109 |
"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
|
110 |
! ! |
102
538fc4ef040c
CodeNavigation service refactored to support Java (not yet done, though)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
81
diff
changeset
|
111 |
|
81 | 112 |
!SelectorNode methodsFor:'testing'! |
113 |
||
114 |
isSelector |
|
115 |
||
116 |
^true |
|
117 |
||
118 |
"Created: / 16-02-2012 / 21:04:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! ! |
|
120 |
||
124 | 121 |
!SelectorNode class methodsFor:'documentation'! |
122 |
||
123 |
version_HG |
|
124 |
||
125 |
^ '$Changeset: <not expanded> $' |
|
126 |
! ! |
|
127 |