--- a/Tools__Inspector2.st Wed May 11 10:47:51 2016 +0200
+++ b/Tools__Inspector2.st Wed May 11 10:48:20 2016 +0200
@@ -24,7 +24,7 @@
!
Model subclass:#NavigationState
- instanceVariableNames:'theObject index tabs selectionIndex displayString'
+ instanceVariableNames:'application theObject index tabs selectionIndex displayString'
classVariableNames:''
poolDictionaries:''
privateIn:Inspector2
@@ -914,6 +914,12 @@
^ builder booleanValueAspectFor:#showAlphabeticalHolder
!
+sortOrderHolder
+ ^ builder
+ valueAspectFor:#sortOrderHolder
+ initialValue:(InspectorView defaultSortOrder)
+!
+
tabLabelsAspect
^ (AspectAdaptor forAspect:#tabLabels)
subjectChannel:self navigationStateAspect
@@ -1050,14 +1056,6 @@
#todo
! !
-!Inspector2 methodsFor:'hooks'!
-
-postBuildEvaluationLanguageCombo: aComboBoxView
-"/ aComboBoxView font: (aComboBoxView font asSize: (aComboBoxView font size * 1.5) rounded)
-
- "Modified: / 26-10-2013 / 01:00:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!Inspector2 methodsFor:'menu'!
backButtonMenuChannel
@@ -1218,6 +1216,7 @@
!
openOn: anObject
+ self createBuilder.
self inspect: anObject.
self openWithExtent:LastExtent.
@@ -1225,6 +1224,12 @@
"Modified: / 11-07-2011 / 22:31:42 / cg"
!
+postBuildEvaluationLanguageCombo: aComboBoxView
+"/ aComboBoxView font: (aComboBoxView font asSize: (aComboBoxView font size * 1.5) rounded)
+
+ "Modified: / 26-10-2013 / 01:00:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
postBuildWith:aBuilder
super postBuildWith:aBuilder.
self updateWindowLabel.
@@ -1254,6 +1259,7 @@
| current new |
new := NavigationState for: anObject.
+ new application:self.
current := self currentState.
(current notNil "and:[anObject isKindOf: current theObject class]") ifTrue:[
| currentTabLabel newSelectionIndex |
@@ -1276,28 +1282,24 @@
!
setDoItActionForLanguage: language
-
-
self currentState tabViews do:[:view |
(view respondsTo: #workspace) ifTrue:[
- view workspace editedLanguage: language.
- view workspace doItAction:
- [:theCode |
- |evaluator|
+ view workspace
+ editedLanguage: language;
+ doItAction:
+ [:theCode |
+ |evaluator|
- (evaluator := language evaluatorClass)
- notNil ifTrue:[
- evaluator
- evaluate:theCode
- in:nil
- receiver:self currentObject
- notifying:view workspace
- logged:true
- ifFail:nil
- ] ifFalse:[
- 'object''s class provides no evaluator'
- ]
- ].
+ (evaluator := language evaluatorClass) notNil ifTrue:[
+ evaluator
+ evaluate:theCode in:nil
+ receiver:self currentObject
+ notifying:view workspace
+ logged:true ifFail:nil
+ ] ifFalse:[
+ 'object''s class provides no evaluator'
+ ]
+ ].
].
]
@@ -1329,6 +1331,14 @@
!Inspector2::NavigationState methodsFor:'accessing'!
+application
+ ^ application
+!
+
+application:anInspectorApp
+ application := anInspectorApp.
+!
+
index
^ index
!
@@ -1452,20 +1462,25 @@
| tab |
- tab := [ theObject perform: selector ]
- on: Error
- do:[:ex|
- "/ for debugging:
- "/ ex reject.
- Transcript show:'error in inspector setup: ',ex description.
- Tools::Inspector2Tab new
- label: selector;
- text:
- (ex description, Character cr, Character cr,
- ex suspendedContext fullPrintAllString)
- ].
+ tab :=
+ [ theObject perform: selector ]
+ on: Error
+ do:[:ex|
+ "/ for debugging:
+ "/ ex reject.
+ Transcript show:'error in inspector setup: ',ex description.
+ Tools::Inspector2Tab new
+ application:application;
+ label: selector;
+ text:
+ (ex description, Character cr, Character cr,
+ ex suspendedContext fullPrintAllString)
+ ].
(tab notNil and:[tab isKindOf: Tools::Inspector2Tab]) ifTrue:[
- tabs add: tab
+ tabs add: tab.
+ (tab view respondsTo:#sortOrderHolder) ifTrue:[
+ tab view sortOrderHolder:(application sortOrderHolder)
+ ].
]
"Created: / 03-02-2015 / 11:03:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"