author | vranyj1 |
Mon, 03 Dec 2012 22:09:19 +0000 | |
branch | development |
changeset 1859 | 4d42d0099c74 |
parent 1818 | 2e5ed72e7dfd |
child 1879 | 7d232ff32dde |
permissions | -rw-r--r-- |
1210
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
1 |
"{ Package: 'stx:libjava/tools' }" |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
2 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
3 |
SetInspectorView subclass:#JavaSetInspectorView |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
4 |
instanceVariableNames:'' |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
5 |
classVariableNames:'' |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
7 |
category:'Languages-Java-Tools-Inspectors' |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
8 |
! |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
9 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
10 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
11 |
!JavaSetInspectorView methodsFor:'private'! |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
12 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
13 |
baseInspectedObjectClass |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
14 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
15 |
| cls | |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
16 |
cls := inspectedObject class. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
17 |
[ cls name startsWith: 'java/util/' ] whileFalse:[ |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
18 |
cls := cls superclass. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
19 |
]. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
20 |
^cls. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
21 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
22 |
"Created: / 04-12-2011 / 17:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
23 |
! |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
24 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
25 |
indexList |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
26 |
"return a list of indexes to show in the selectionList. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
27 |
Set hasMore to true, if a '...' entry should be added." |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
28 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
29 |
| coll iterator | |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
30 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
31 |
coll := OrderedCollection new. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
32 |
iterator := inspectedObject perform: #'iterator()Ljava/util/Iterator;'. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
33 |
[ ( iterator perform: #'hasNext()Z' ) == 1 ] whileTrue:[ |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
34 |
coll add: ( iterator perform: #'next()Ljava/lang/Object;' ). |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
35 |
coll size >= nShown ifTrue:[ |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
36 |
hasMore := true. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
37 |
^ coll asSortedCollection:[:a :b | a displayString < b displayString]. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
38 |
]. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
39 |
]. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
40 |
^coll asSortedCollection:[:a :b | a displayString < b displayString]. |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
41 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
42 |
"Created: / 04-12-2011 / 17:57:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
43 |
! ! |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
44 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
45 |
!JavaSetInspectorView class methodsFor:'documentation'! |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
46 |
|
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
47 |
version_SVN |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
48 |
^ '$Id$' |
52dcaa706df5
Added custom inspector classes to ease working with java objects
vranyj1
parents:
diff
changeset
|
49 |
! ! |