author | Jan Vrany <jan.vrany@labware.com> |
Tue, 09 Aug 2022 14:33:27 +0100 | |
changeset 4012 | 117835eb9839 |
parent 3412 | df11bb428463 |
child 3892 | b1c8fc0d8c63 |
permissions | -rw-r--r-- |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'stx:libjava/tools' }" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
Tools::Toolbox subclass:#JavaToolbox |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
4 |
instanceVariableNames:'' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
classVariableNames:'' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
category:'Languages-Java-Tools' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
!JavaToolbox class methodsFor:'documentation'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
documentation |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
JavaToolbox contains various utility method used by other tools |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
to perform language-specific tasks. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
[author:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
[instance variables:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
[class variables:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
[see also:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
25 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
26 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
!JavaToolbox methodsFor:'browsing'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
spawnBrowserOnAllImplementorsOf: selector class: class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
| label | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
self ensureBrowser. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
browser withWaitCursorDo:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
label := browser resources string:'Implementors of %1' with: (self displayStringForSelector: selector in: class name). |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
browser |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
spawnMethodBrowserForSearch:[self searchForImplementorsOf: selector class: class] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
sortBy:#class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
40 |
in:#newBuffer |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
label:label. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
44 |
"Created: / 01-09-2013 / 17:59:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
"Modified: / 05-09-2013 / 12:44:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
spawnBrowserOnAllSendersOf: selector class: class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
| label search | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
self ensureBrowser. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
browser withWaitCursorDo:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
label := browser resources string:'Senders of %1' with: (self displayStringForSelector: selector in: class name). |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
search := selector upTo: $(. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
browser |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
spawnMethodBrowserForSearch:[self searchForSendersOf: selector class: class] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
57 |
sortBy:#class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
58 |
in:#newBuffer |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
59 |
label:label. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
browser autoSearchSelector:search ignoreCase:false doMatch:false. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
"Created: / 01-09-2013 / 17:59:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
64 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
65 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
66 |
spawnBrowserOnClass: class selector: selector |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
67 |
self spawnBrowserOnMethod: (class compiledMethodAt: selector asSymbol) |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
68 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
69 |
"Created: / 25-09-2013 / 00:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
70 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
71 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
72 |
spawnBrowserOnMethod: method |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
73 |
browser isNil ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
74 |
Tools::NewSystemBrowser openInMethod:method. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
75 |
^ self |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
76 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
77 |
(UserPreferences current alwaysOpenNewTabWhenCtrlClick |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
78 |
or:[self browser navigationState modified]) |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
79 |
ifTrue: |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
80 |
[self browser |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
81 |
spawnFullBrowserInClass: method mclass |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
82 |
selector:method selector |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
83 |
in:#newBuffer] |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
84 |
ifFalse: |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
85 |
[self browser |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
86 |
switchToClass: method containingClass |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
87 |
selector: method selector]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
88 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
89 |
"Created: / 25-09-2013 / 00:12:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
92 |
!JavaToolbox methodsFor:'menus'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
94 |
implementorMenuFor: selector inClassNamed: className |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
95 |
| menu definingClasses implementors | |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
96 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
97 |
menu := Menu new. |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
98 |
definingClasses := environment allClasses select:[:cls | cls isJavaClass and:[cls binaryName = className ]]. |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
99 |
definingClasses do:[:cls| |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
100 |
menu addItem: |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
101 |
(MenuItem label: (self displayStringForSelector: selector in: cls binaryName withClassName: true) |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
102 |
itemValue:[ self spawnBrowserOnClass: cls selector: selector]). |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
103 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
104 |
implementors := Set new. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
105 |
definingClasses do:[:cls | implementors addAll: (self searchForImplementorsOf: selector class: cls)]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
106 |
implementors := implementors reject:[:m | definingClasses includes: m mclass ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
107 |
implementors := implementors asSortedCollection:[:a :b | a mclass lastName < b mclass lastName ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
108 |
implementors notEmptyOrNil ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
109 |
menu addSeparator. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
110 |
implementors do:[:m| |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
111 |
menu addItem: |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
112 |
(MenuItem label: (self displayStringForSelector: selector in: m mclass binaryName withClassName: true) |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
113 |
itemValue:[ self spawnBrowserOnMethod: m]). |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
114 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
115 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
116 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
117 |
^ menu |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
118 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
119 |
"Created: / 24-09-2013 / 23:48:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
120 |
"Modified: / 22-10-2013 / 22:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
121 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
122 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
123 |
messagesMenuFor:actionSelector |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
124 |
withMethods: methods |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
125 |
withMethodSelectors:withMethodSelectors |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
126 |
withSentSelectors: withSentSelectors |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
127 |
withSelfSelectorsOnly: withSelfSelectorsOnly |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
128 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
| xlatedSelector menu builder sent | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
130 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
131 |
actionSelector == #spawnBrowserOnAllSendersOf: ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
xlatedSelector := #spawnBrowserOnAllSendersOf:class: |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
133 |
] ifFalse:[actionSelector == #spawnBrowserOnAllImplementorsOf: ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
134 |
xlatedSelector := #spawnBrowserOnAllImplementorsOf:class: |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
] ifFalse:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
^ Menu new |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
137 |
addItem: ((MenuItem label: 'Not supported for Java') enabled: false); |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
138 |
yourself. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
]]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
builder := [:class :selector | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
menu addItem: |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
143 |
(MenuItem |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
label: (self displayStringForSelector: selector in: class name) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
itemValue: [ self perform: xlatedSelector with: selector with: class ]) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
146 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
147 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
148 |
menu := Menu new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
149 |
withMethodSelectors ifTrue:[ |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2803
diff
changeset
|
150 |
methods do:[:m | builder value: m originalMethodIfWrapped javaClass value: m selector ]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
151 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
152 |
withSentSelectors ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
153 |
sent := Set new. |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2803
diff
changeset
|
154 |
methods do:[:m | sent addAll: m originalMethodIfWrapped analyzer methodsInvoked ]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
155 |
sent notEmptyOrNil ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
156 |
withMethodSelectors ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
157 |
menu addSeparator. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
158 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
sent := sent asSortedCollection:[:a :b|a selector < b selector ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
sent do:[:mref | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
builder value: mref classRef javaClass value: mref selector |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
164 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
165 |
^ menu. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
"Created: / 01-09-2013 / 17:03:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2803
diff
changeset
|
168 |
"Modified: / 16-10-2013 / 01:14:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
169 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
170 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
171 |
sendersMenuFor: selector inClassNamed: className |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
172 |
| menu definingClasses senders | |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
173 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
174 |
menu := Menu new. |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
175 |
definingClasses := environment allClasses select:[:cls | cls isJavaClass and:[cls binaryName = className ]]. |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
176 |
senders := Set new. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
177 |
definingClasses do:[:cls | senders addAll: (self searchForSendersOf: selector class: cls)]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
178 |
senders := senders reject:[:m | definingClasses includes: m mclass ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
179 |
senders := senders asSortedCollection:[:a :b | a mclass lastName < b mclass lastName ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
180 |
senders notEmptyOrNil ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
181 |
senders do:[:m| |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
182 |
menu addItem: |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
183 |
(MenuItem label: (self displayStringForSelector: selector in: m mclass binaryName withClassName: true) |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
184 |
itemValue:[ self spawnBrowserOnMethod: m]). |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
185 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
186 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
187 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
188 |
^ menu |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
189 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
190 |
"Created: / 25-09-2013 / 10:08:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2886
38bc44ad0f95
More fixes after Java class name refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
191 |
"Modified: / 22-10-2013 / 22:30:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
192 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
193 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
194 |
!JavaToolbox methodsFor:'private-presentation'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
195 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
196 |
displayStringForSelector: selector in: className |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
197 |
^ self displayStringForSelector: selector in: className withClassName: false. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
198 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
199 |
"Created: / 31-08-2013 / 23:31:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
200 |
"Modified: / 25-09-2013 / 00:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
201 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
202 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
203 |
displayStringForSelector: selector in: className withClassName: withClassName |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
204 |
| i name descriptor package localName displayString| |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
205 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
206 |
i := selector indexOf: $(. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
207 |
name := selector copyTo: i - 1. |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
208 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
209 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
210 |
descriptor := selector copyFrom: i. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
211 |
i := className lastIndexOf: $/. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
212 |
package := className copyTo: i - 1. |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
213 |
localName := className copyFrom: i + 1. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
214 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
215 |
name = #'<clinit>' ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
216 |
displayString := 'static' asText allBold , ' {}' |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
217 |
] ifFalse:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
218 |
name = '<init>' ifTrue:[ |
2803
ba98473322b9
Fix in JavaToolbox>>#displayStringForSelector:in:withClassName:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2776
diff
changeset
|
219 |
displayString := JavaMethod specTextFromSignature:descriptor in: package withName: localName isConstructor: true |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
220 |
] ifFalse:[ |
2803
ba98473322b9
Fix in JavaToolbox>>#displayStringForSelector:in:withClassName:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2776
diff
changeset
|
221 |
displayString := JavaMethod specTextFromSignature:descriptor in: package withName: name isConstructor: true |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
222 |
]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
223 |
]. |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
224 |
withClassName ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
225 |
displayString := displayString , ' in ' , (localName asText allBold). |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
226 |
]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
227 |
^ displayString |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
228 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
229 |
"Created: / 25-09-2013 / 00:37:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2803
ba98473322b9
Fix in JavaToolbox>>#displayStringForSelector:in:withClassName:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2776
diff
changeset
|
230 |
"Modified: / 07-10-2013 / 08:18:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
231 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
232 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
233 |
!JavaToolbox methodsFor:'searching'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
234 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
235 |
searchForDeclarationOf: selector class: class in: classes |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
236 |
"Return 'declaration' of method with given selector in given class. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
237 |
By 'declaration' we mean top-most definition of the method or |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
238 |
definition of the method in one of class's interface. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
239 |
Returns the class (ot interface) in which the method is |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
240 |
first declared." |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
241 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
242 |
| current declaring | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
243 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
244 |
current := declaring := class. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
245 |
[ current ~~ JavaObject ] whileTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
246 |
(current canUnderstand: selector) ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
247 |
declaring := current. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
248 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
249 |
current allInterfaces do:[:iface| |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
250 |
(iface canUnderstand: selector) ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
251 |
^ iface |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
252 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
253 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
254 |
current := current superclass. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
255 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
256 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
257 |
^ declaring |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
258 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
259 |
"Created: / 05-09-2013 / 13:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
260 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
261 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
262 |
searchForImplementorsOf: selector class: class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
263 |
^ self searchForImplementorsOf: selector class: class in: environment allClasses |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
264 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
265 |
"Created: / 05-09-2013 / 12:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
266 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
267 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
268 |
searchForImplementorsOf: selector class: class in: classes |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
269 |
| implementors | |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
270 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
271 |
implementors := Set new. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
272 |
self searchForImplementorsOf: selector class: class in: classes whenFoundDo: [:mthd | implementors add: mthd ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
273 |
^ implementors |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
274 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
275 |
"Created: / 05-09-2013 / 12:45:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
276 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
277 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
278 |
searchForImplementorsOf: selector class: class in: classes whenFoundDo: block |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
279 |
| searchSelector searchClass | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
280 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
281 |
searchSelector := selector asSymbolIfInterned. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
282 |
searchSelector isNil ifTrue:[ ^ self ]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
283 |
searchClass := self searchForDeclarationOf: selector class: class in: classes. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
284 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
285 |
classes do: [:cls | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
286 |
cls isJavaClass ifTrue: [ |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
287 |
((cls methodDictionary includesKey: searchSelector) and:[ JavaVM canCast: cls to: searchClass]) ifTrue:[ |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
288 |
| m | |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
289 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
290 |
m := cls compiledMethodAt: searchSelector. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
291 |
m isNil ifTrue:[ self error: 'Should not happen' ]. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
292 |
block value: m. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
293 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
294 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
295 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
296 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
297 |
"Created: / 05-09-2013 / 12:45:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
298 |
"Modified: / 25-09-2013 / 10:05:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
299 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
300 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
301 |
searchForSendersOf: selector class: class |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
302 |
^ self searchForSendersOf: selector class: class in: environment allClasses |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
303 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
304 |
"Created: / 01-09-2013 / 10:07:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
305 |
"Modified: / 05-09-2013 / 12:46:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
306 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
307 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
308 |
searchForSendersOf: selector class: class in: classes |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
309 |
| senders | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
310 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
311 |
senders := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
312 |
self searchForSendersOf: selector class: class in: classes whenFoundDo: [:mthd | senders add: mthd ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
313 |
^ senders |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
314 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
315 |
"Created: / 01-09-2013 / 10:07:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
316 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
317 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
318 |
searchForSendersOf: selector class: class in: classes whenFoundDo: block |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
319 |
| searchSelector searchClass | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
320 |
|
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
321 |
searchSelector := selector asSymbolIfInterned. |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
322 |
searchSelector isNil ifTrue:[ ^ self ]. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
323 |
searchClass := self searchForDeclarationOf: selector class: class in: classes. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
324 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
325 |
classes do: [:cls | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
326 |
cls isJavaClass ifTrue: [ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
327 |
| matching | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
328 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
329 |
matching := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
330 |
"/ Quickly scan constant pool without need of analyzing |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
331 |
"/ each method... |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
332 |
cls constantPool do:[:ref| |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
333 |
ref isJavaMethodRef ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
334 |
(ref selector == searchSelector and:[ JavaVM canCast: ref classRef javaClass to: searchClass]) ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
335 |
matching add: ref. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
336 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
337 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
338 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
339 |
matching notEmpty ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
340 |
cls methodDictionary keysAndValuesDo:[:selector :method| |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
341 |
(method isJavaMethod and:[method analyzer methodsInvoked includesAny: matching]) ifTrue:[ |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
342 |
block value: method |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
343 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
344 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
345 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
346 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
347 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
348 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
349 |
"Created: / 01-09-2013 / 03:11:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
350 |
"Modified: / 25-09-2013 / 10:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
351 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
352 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
353 |
!JavaToolbox class methodsFor:'documentation'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
354 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
355 |
version_CVS |
3412
df11bb428463
Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3360
diff
changeset
|
356 |
^ '$Header: /cvs/stx/stx/libjava/tools/JavaToolbox.st,v 1.4 2015-03-20 13:29:52 vrany Exp $' |
2776
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
357 |
! |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
358 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
359 |
version_HG |
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
360 |
|
bf52a1e5701b
Support for implementors/senders menu.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
361 |
^ '$Changeset: <not expanded> $' |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
362 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
363 |