author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 24 Sep 2013 01:53:26 +0100 | |
changeset 100 | 6d2fb43e661b |
parent 99 | 6943778c2db7 |
child 101 | a300290bf8fc |
permissions | -rw-r--r-- |
32
658f47bc231e
Code moved to package jv:smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
29
diff
changeset
|
1 |
"{ Package: 'jv:smallsense' }"! |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
!AssignmentNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
childNamesAndValuesDo:aBlock |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
aBlock value: #variable value: variable. |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
aBlock value: #expression value: expression. |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
"Modified: / 26-11-2011 / 10:39:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
! ! |
11 | 12 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
!AssignmentNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
inferedType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
^ expression inferedType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
"Created: / 26-11-2011 / 12:38:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
! ! |
11 | 21 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
!AssignmentNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
inferedType: aSmallSenseType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
^ self shouldNotImplement |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
"Created: / 26-11-2011 / 12:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
! ! |
11 | 30 |
|
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
31 |
!BlockNode methodsFor:'enumeration'! |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
32 |
|
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
33 |
childNamesAndValuesDo:aBlock |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
34 |
"Enumerates all direct children and evaluates a block |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
35 |
with its name (usually instVar name) and the node itself" |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
36 |
|
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
37 |
aBlock value:'statements' value: statements |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
38 |
|
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
39 |
"Created: / 20-09-2013 / 01:03:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
40 |
! ! |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
41 |
|
11 | 42 |
!ConfigurableFeatures class methodsFor:'queries-features'! |
43 |
||
44 |
hasSmallSenseEnabled |
|
45 |
||
46 |
^UserPreferences current smallSenseEnabled |
|
47 |
||
48 |
||
49 |
" |
|
50 |
ConfigurableFeatures hasSmallSenseEnabled |
|
51 |
ConfigurableFeatures includesFeature:'SmallSenseEnabled' |
|
52 |
" |
|
53 |
||
54 |
"Created: / 27-11-2011 / 17:22:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
55 |
! ! |
|
56 |
||
63
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
57 |
!DoWhatIMeanSupport methodsFor:'code completion - smallsense'! |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
58 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
59 |
smallSenseCodeCompletionForClass:classOrNilArg context:contextOrNil codeView:codeViewArg |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
60 |
"SmallSense version of #codeCompletionForClass:context:codeView:. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
61 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
62 |
When SmallSense is loaded, this method is swizzled as #codeCompletionForClass:context:codeView:. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
63 |
into DoWhatIMeanSupport. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
64 |
" |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
65 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
66 |
<swizzle: #codeCompletionForClass:context:codeView:> |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
67 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
68 |
| p node text items mode | |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
69 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
70 |
codeView := codeViewArg. |
75
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
71 |
"/ The respondsTo: hack is because CVS CodeView2 has no #mode method. |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
72 |
mode := (codeView respondsTo:#mode) ifTrue:[codeView mode] ifFalse:[#method]. |
63
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
73 |
contextOrNil notNil ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
74 |
mode := #method. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
75 |
]. |
75
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
76 |
items := SmallSense::Recognizer |
63
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
77 |
resultSetFor: mode |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
78 |
source: codeView contents |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
79 |
class: classOrNilArg |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
80 |
line: codeView cursorLine |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
81 |
column: codeView cursorCol. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
82 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
83 |
items notEmptyOrNil ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
84 |
(p := items position) notNil ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
85 |
node := p node. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
86 |
node notNil ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
87 |
(node isVariable and:[p isInNode]) ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
88 |
text := node name |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
89 |
] ifFalse:[node isMessage ifTrue:[ |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
90 |
text := node selector |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
91 |
]]. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
92 |
]. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
93 |
]. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
94 |
]. |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
95 |
|
75
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
96 |
SmallSense::CompletionWindow openForView: codeView text: text items: items. |
63
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
97 |
|
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
98 |
"Created: / 19-08-2013 / 15:01:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
75
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
99 |
"Modified: / 02-09-2013 / 12:52:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
63
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
100 |
! ! |
fe86b749d233
Support for SmallSense code completion in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
60
diff
changeset
|
101 |
|
16 | 102 |
!HTMLDocumentView methodsFor:'actions'! |
103 |
||
104 |
doQuickFix: quickFixNo |
|
105 |
| app | |
|
106 |
||
107 |
app := self application. |
|
108 |
app notNil ifTrue:[ |
|
23 | 109 |
app doQuickFix: quickFixNo |
16 | 110 |
]. |
111 |
||
112 |
"Created: / 16-02-2012 / 14:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
113 |
! ! |
|
114 |
||
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
115 |
!MessageNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
116 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
117 |
childNamesAndValuesDo:aBlock |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
118 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
119 |
aBlock value: #receiver value: receiver. |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
120 |
argArray notNil ifTrue:[ |
23 | 121 |
argArray withIndexDo:[:node :idx| |
122 |
aBlock value: 'arg[' , idx printString , ']' value: node |
|
123 |
] |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
124 |
] |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
126 |
"Modified: / 26-11-2011 / 12:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
! ! |
11 | 128 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
!ParseErrorNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
130 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
131 |
childNamesAndValuesDo:aBlock |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
"superclass ParseNode says that I am responsible to implement this method" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
133 |
|
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
134 |
^ children withIndexDo:[:child :index | |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
135 |
aBlock value:'child[' , index printString , ']' value: child |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
136 |
] |
60
0daf99c34c5e
Initial support for syntax-error tolerant parsing of Smalltalk.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
51
diff
changeset
|
137 |
|
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
138 |
"Modified: / 20-09-2013 / 01:00:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
! ! |
11 | 140 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
!ParseNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
|
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
143 |
childNamesAndValuesDo:aBlock |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
"Enumerates all direct children and evaluates a block |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
with its name (usually instVar name) and the node itself" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
146 |
|
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
147 |
self class allInstVarNames withIndexDo:[:n :i| |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
148 |
| v | |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
149 |
|
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
150 |
v := self instVarAt: i. |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
151 |
(v isKindOf: ParseNode) ifTrue:[ |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
152 |
aBlock value: n value: v |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
153 |
] ifFalse:[ |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
154 |
(v isSequenceable) ifTrue:[ |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
155 |
v withIndexDo:[ :v2 :i2| |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
156 |
(v2 isKindOf: ParseNode) ifTrue:[ |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
157 |
aBlock value: (n, '[' , i2 printString , ']') value: v2. |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
158 |
] |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
159 |
] |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
160 |
] |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
161 |
] |
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
162 |
] |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
"Created: / 26-11-2011 / 10:38:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
98
c21c3e61a377
Fixes for ParseNodeInspector. Display nodes with no source position info in red.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
165 |
"Modified: / 19-09-2013 / 18:18:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
! ! |
11 | 167 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
!ParseNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
170 |
inferedType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
171 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
172 |
| t | |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
173 |
t := self objectAttributeAt:#inferedType. |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
174 |
t isNil ifTrue:[t := SmallSense::Type unknown]. |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
175 |
^t |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
176 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
177 |
"Created: / 26-11-2011 / 12:38:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
178 |
"Modified: / 24-08-2013 / 20:46:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
179 |
! ! |
11 | 180 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
181 |
!ParseNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
182 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
183 |
inferedType: aSmallSenseType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
184 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
185 |
^ self objectAttributeAt:#inferedType put: aSmallSenseType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
186 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
187 |
"Created: / 26-11-2011 / 12:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
188 |
! ! |
11 | 189 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
190 |
!ParseNode methodsFor:'testing'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
191 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
192 |
isSelector |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
193 |
"return true, if this is a node for an selctors" |
23 | 194 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
195 |
^ false |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
196 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
197 |
"Created: / 22-02-2011 / 21:44:45 / Jakub <zelenja7@fel.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
198 |
! ! |
11 | 199 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
200 |
!PrimaryNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
201 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
202 |
childNamesAndValuesDo:aBlock |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
203 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
204 |
"Initionally left blank, primary nodes have no children" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
205 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
206 |
"Modified: / 26-11-2011 / 11:49:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
207 |
! ! |
11 | 208 |
|
9 | 209 |
!RBLintRule methodsFor:'accessing'! |
210 |
||
211 |
fixes: aSmallSenseQuickFixer |
|
212 |
"Adds all possible code fixes to given quick fixer. |
|
213 |
Default is to do nothing, meaning that there are |
|
214 |
no quickfixes available" |
|
215 |
||
216 |
"Created: / 01-02-2012 / 12:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
217 |
! ! |
|
11 | 218 |
|
9 | 219 |
!RBTransformationRule methodsFor:'accessing'! |
220 |
||
221 |
fixes: fixer |
|
17
8443d79a77ac
Improvements in background lint checker
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
222 |
| changes | |
9 | 223 |
|
17
8443d79a77ac
Improvements in background lint checker
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
224 |
changes := self changes. |
8443d79a77ac
Improvements in background lint checker
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
225 |
changes notEmptyOrNil ifTrue:[ |
23 | 226 |
fixer fix |
227 |
label:'Rewrite the code'; |
|
228 |
action: [ fixer apply: |
|
229 |
((ChangeSet withAll:self changes) name: self name) |
|
230 |
]. |
|
17
8443d79a77ac
Improvements in background lint checker
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16
diff
changeset
|
231 |
] |
9 | 232 |
|
233 |
"Created: / 01-02-2012 / 12:11:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
234 |
! ! |
|
11 | 235 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
236 |
!StatementNode methodsFor:'enumeration'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
237 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
238 |
childNamesAndValuesDo:aBlock |
15
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
239 |
| stmt index | |
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
240 |
stmt := self. |
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
241 |
index := 1. |
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
242 |
[ stmt notNil ] whileTrue:[ |
23 | 243 |
aBlock value: ('statement[%1]' bindWith: index) value: stmt expression. |
244 |
stmt := stmt nextStatement. |
|
245 |
index := index + 1. |
|
15
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
246 |
] |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
247 |
|
15
23ecfbccccd5
Updates in SmallSenseParseNodeInspector
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
248 |
"Modified: / 15-02-2012 / 12:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
249 |
! ! |
11 | 250 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
251 |
!StatementNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
252 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
253 |
inferedType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
254 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
255 |
^ expression inferedType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
256 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
257 |
"Created: / 26-11-2011 / 12:38:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
258 |
! ! |
11 | 259 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
260 |
!StatementNode methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
261 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
262 |
inferedType: aSmallSenseType |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
263 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
264 |
^ self shouldNotImplement |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
265 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
266 |
"Created: / 26-11-2011 / 12:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
267 |
! ! |
11 | 268 |
|
75
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
269 |
!Tools::CodeCompletionService class methodsFor:'testing'! |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
270 |
|
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
271 |
smallSenseIsUsefulFor:aCodeView |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
272 |
"No old completion once there's SmallSense :-)" |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
273 |
|
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
274 |
<swizzle: #isUsefulFor:> |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
275 |
|
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
276 |
^ false. |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
277 |
|
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
278 |
"Created: / 02-09-2013 / 12:58:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
279 |
! ! |
2046f40e5dde
Fixes to make SmallSense code completion working on eXept CVS version (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
69
diff
changeset
|
280 |
|
42
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
281 |
!Tools::CodeHighlightingService class methodsFor:'instance creation'! |
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
282 |
|
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
283 |
new |
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
284 |
"return an initialized instance" |
99
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
285 |
|
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
286 |
^ (SmallSense::CodeHighlightingService ? self) basicNew initialize. |
42
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
287 |
|
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
288 |
"Created: / 27-07-2013 / 22:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
99
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
289 |
"Modified: / 23-09-2013 / 14:32:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
290 |
! ! |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
291 |
|
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
292 |
!Tools::CodeNavigationService class methodsFor:'instance creation'! |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
293 |
|
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
294 |
new |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
295 |
"return an initialized instance" |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
296 |
|
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
297 |
^ (SmallSense::CodeNavigationService ? self) basicNew initialize. |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
298 |
|
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
299 |
"Created: / 27-07-2013 / 22:47:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6943778c2db7
SyntaxHighlightingService renamed to CodeHighlightingService to match those in tools.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
98
diff
changeset
|
300 |
"Modified: / 23-09-2013 / 14:32:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
42
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
301 |
! ! |
48307f46ff8e
Edit support cut off to a new service. Added SmallSense syntax highlighting service.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
34
diff
changeset
|
302 |
|
64
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
303 |
!Tools::NavigationState methodsFor:'aspects - SmallSense'! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
304 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
305 |
smallSenseSelectedClasses |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
306 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
307 |
<swizzle: #selectedClasses> |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
308 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
309 |
selectedClasses isNil ifTrue:[ |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
310 |
selectedClasses := "SpecialValueHolder with:nil." nil asValue. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
311 |
(ConfigurableFeatures includesFeature:'SmallSenseEnabled') ifTrue:[ |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
312 |
selectedClasses onChangeEvaluate:[ |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
313 |
selectedClasses value ? #() do:[:cls| |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
314 |
(Smalltalk at:#SmallSense::Manager) instance updateInfoForClass: cls. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
315 |
]. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
316 |
] |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
317 |
] |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
318 |
]. |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
319 |
^ selectedClasses |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
320 |
|
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
321 |
"Created: / 24-08-2013 / 21:53:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
322 |
! ! |
2257d7223898
All classes moved to namespace SmallSense.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
63
diff
changeset
|
323 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
324 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
325 |
|
5
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
326 |
smallSenseBackgroundLintEnabled |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
327 |
"Return true if SmallSense background source checking is enabled" |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
328 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
329 |
^self at:#smallSenseBackgroundLintEnabled ifAbsent:[false] |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
330 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
331 |
"Created: / 30-01-2012 / 19:59:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
332 |
! ! |
11 | 333 |
|
5
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
334 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
335 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
336 |
smallSenseBackgroundLintEnabled: aBoolean |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
337 |
"Return true if SmallSense background source checking is enabled" |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
338 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
339 |
^self at:#smallSenseBackgroundLintEnabled put: aBoolean |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
340 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
341 |
" |
23 | 342 |
UserPreferences current smallSenseBackgroundLintEnabled |
343 |
UserPreferences current smallSenseBackgroundLintEnabled: true |
|
344 |
UserPreferences current smallSenseBackgroundLintEnabled: false |
|
5
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
345 |
" |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
346 |
|
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
347 |
"Created: / 30-01-2012 / 20:00:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
348 |
! ! |
11 | 349 |
|
350 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
|
351 |
||
352 |
smallSenseBackgroundTypingEnabled |
|
353 |
"Return true if SmallSense background source checking is enabled" |
|
354 |
||
355 |
^self at:#smallSenseBackgroundTypingEnabled ifAbsent:[false] |
|
356 |
||
357 |
"Created: / 04-02-2012 / 21:41:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
358 |
! ! |
|
359 |
||
360 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
|
361 |
||
362 |
smallSenseBackgroundTypingEnabled: aBoolean |
|
363 |
"Return true if SmallSense background source checking is enabled" |
|
364 |
||
365 |
^self at:#smallSenseBackgroundTypingEnabled put: aBoolean |
|
366 |
||
367 |
" |
|
23 | 368 |
UserPreferences current smallSenseBackgroundTypingEnabled |
369 |
UserPreferences current smallSenseBackgroundTypingEnabled: true |
|
370 |
UserPreferences current smallSenseBackgroundTypingEnabled: false |
|
11 | 371 |
" |
372 |
||
373 |
"Created: / 04-02-2012 / 21:41:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
374 |
! ! |
|
375 |
||
5
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
376 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
9b296f3ad0a4
Added code critics (lint) window
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
377 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
378 |
smallSenseEnabled |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
379 |
"Return true if SmallSense is enabled" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
380 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
381 |
^self at:#smallSenseEnabled ifAbsent:[false] |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
382 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
383 |
"Created: / 27-11-2011 / 17:20:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
384 |
! ! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
385 |
|
20
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
386 |
!UserPreferences methodsFor:'accessing-SmallSense'! |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
387 |
|
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
388 |
smallSenseEnabled: aBoolean |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
389 |
"enable/disable SmallSense" |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
390 |
|
23 | 391 |
^self at:#smallSenseEnabled put: aBoolean. |
20
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
392 |
|
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
393 |
" |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
394 |
UserPreferences current smallSenseEnabled. |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
395 |
UserPreferences current smallSenseEnabled: true. |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
396 |
UserPreferences current smallSenseEnabled: false. |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
397 |
" |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
398 |
|
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
399 |
"Created: / 02-04-2012 / 11:37:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
400 |
! ! |
65bee305e13f
Added UserPreferences>>smallSenseEnabled:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
19
diff
changeset
|
401 |
|
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
402 |
!VariableNode methodsFor:'queries'! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
403 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
404 |
isGlobalOrPrivateClass |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
405 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
406 |
^ type == #GlobalVariable or:[type == #PrivateClass] |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
407 |
|
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
408 |
"Created: / 27-11-2011 / 16:31:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
409 |
! ! |
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
410 |
|
100
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
411 |
!Workspace class methodsFor:'defaults - smallsense'! |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
412 |
|
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
413 |
smallSenseCodeCompletionServiceClass |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
414 |
<swizzle: #codeCompletionServiceClass> |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
415 |
|
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
416 |
^ SmallSense::CodeCompletionService |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
417 |
|
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
418 |
"Created: / 24-09-2013 / 00:29:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
419 |
! ! |
6d2fb43e661b
Initial support for complete-as-you-type.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
99
diff
changeset
|
420 |
|
32
658f47bc231e
Code moved to package jv:smallsense
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
29
diff
changeset
|
421 |
!jv_smallsense class methodsFor:'documentation'! |
0
893cc7b0ed1d
copied smallsense from old /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
422 |
|
29
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
423 |
extensionsVersion_HG |
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
424 |
|
fe650a6e5704
Moved NavigationState>>selectedClasses to package stx:libtool.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
24
diff
changeset
|
425 |
^ '$Changeset: <not expanded> $' |
34
5be71b1d52ec
SmallSenseResultItem ranemd to SmallSensePO.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
32
diff
changeset
|
426 |
! ! |