--- a/InspectorView.st Fri Nov 20 06:48:55 2015 +0100
+++ b/InspectorView.st Sat Nov 21 06:50:01 2015 +0100
@@ -3135,8 +3135,8 @@
d := self derivedFields.
(d isDictionary) ifTrue:[
- actionItems := d keys select:[:k | k startsWith:'!!'] as:OrderedCollection .
- valueItems := d keys select:[:k | k startsWith:'-'] as:OrderedCollection.
+ actionItems := d keys select:[:k | k startsWith:$!!] as:OrderedCollection .
+ valueItems := d keys select:[:k | k startsWith:$-] as:OrderedCollection.
otherItems := d keys select:[:k | (k startsWithAnyOf:#('!!' '-')) not] as:OrderedCollection.
^ ((actionItems sort , valueItems sort) collect:[:k | (k copyTo:1),(k copyFrom:2) allItalic])
,
@@ -3220,8 +3220,10 @@
firstRealIndex := 2.
].
- [line := self listEntryAt:firstRealIndex.
- (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]] whileTrue:[
+ [
+ line := self listEntryAt:firstRealIndex.
+ line notNil and:[self isSpecialPseudoNameEntry:line]
+ ] whileTrue:[
firstRealIndex := firstRealIndex + 1.
idx := idx - 1.
].
@@ -3335,7 +3337,7 @@
|line|
line := self listEntryAt:firstRealIndex.
- (line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]
+ line notNil and:[self isSpecialPseudoNameEntry:line]
] whileTrue:[
firstRealIndex := firstRealIndex + 1.
].
@@ -3424,8 +3426,7 @@
firstRealIndex := 1.
line := (self listEntryAt:lineNr) string.
- ((line startsWith:'-') and:[line size < 2 or:[line second isDigit not]])
- ifTrue:[^ nil].
+ (self isSpecialPseudoNameEntry:line) ifTrue:[^ nil].
nm := line asCollectionOfWords first.
idx := object class allInstVarNames indexOf:nm.
@@ -3458,6 +3459,11 @@
"Modified: / 20-07-2012 / 11:11:10 / cg"
!
+isSpecialPseudoNameEntry:line
+ ^ (line startsWith:$-)
+ and:[line size < 2 or:[line second isDigit not]]
+!
+
keyIndexForLine:lineNr
"helper - return the index of the key-list;
nil, if self or a namedInstVar is selected."
@@ -3476,9 +3482,9 @@
firstRealIndex := firstRealIndex + 1.
].
- [line := self listEntryAt:firstRealIndex.
- line notNil
- and:[(line startsWith:'-') and:[line size < 2 or:[line second isDigit not]]]
+ [
+ line := self listEntryAt:firstRealIndex.
+ line notNil and:[ self isSpecialPseudoNameEntry:line ]
] whileTrue:[
firstRealIndex := firstRealIndex + 1.
idx := idx - 1.