Tools__Inspector2.st
branchjv
changeset 17133 f9f20407fbf9
parent 16828 3be43a489ae3
parent 16899 aa136f213ebb
child 17137 2c2f7c9fc909
--- a/Tools__Inspector2.st	Mon Oct 03 15:15:56 2016 +0100
+++ b/Tools__Inspector2.st	Sun Oct 09 22:55:02 2016 +0100
@@ -852,7 +852,7 @@
     "/ Do not show language combo when language is Smalltalk.
     "/ For those not working with multiple languages is too disturbing.
     ^ BlockValue
-        with:[:o | o class programmingLanguage isSmalltalk not ]
+        with:[:o | o class programmingLanguage notNil and:[o class programmingLanguage isSmalltalk not] ]
         argument:self currentObjectHolder
 
     "Modified (comment): / 25-10-2013 / 19:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -1033,11 +1033,11 @@
     | currentObject currentObjectLanguage |
 
     currentObject := self currentObject.
-    currentObjectLanguage := currentObject class programmingLanguage.
-    currentObjectLanguage isSmalltalk ifFalse:[
+    currentObjectLanguage := currentObject class programmingLanguage ? SmalltalkLanguage instance.
+    currentObjectLanguage isSmalltalk ifTrue:[
+        self evaluationLanguageList value: (Array with: currentObjectLanguage).
+    ] ifFalse:[
         self evaluationLanguageList value: (Array with: currentObjectLanguage with: SmalltalkLanguage instance)
-    ] ifTrue:[
-        self evaluationLanguageList value: (Array with: currentObjectLanguage).
     ].
 
     self evaluationLanguageHolder value:(EvaluationLanguageMap at: currentObjectLanguage ifAbsent:[currentObjectLanguage])
@@ -1416,10 +1416,8 @@
 
     |tab|
 
-    tab := self tabs at: self selectionIndex.
-    ^tab 
-        ifNil:[nil]
-        ifNotNil:[tab view].
+    tab := self tabs at:self selectionIndex ifAbsent:nil.
+    ^ tab isNil ifTrue:[nil] ifFalse:[tab view].
 
     "Created: / 16-01-2008 / 17:31:19 / janfrog"
 !
@@ -1513,7 +1511,7 @@
     tabs := OrderedCollection new.        
 
     "/ Old style - tabs are specified by method #inspector2Tabs
-    selectors := theObject inspector2Tabs asSet.
+    selectors := (theObject inspector2Tabs ? #(inspector2TabCommon)) asSet.
 
     "/ New style - tab are defined by methods with <inspector2Tab> annotation
     theObject class withAllSuperclassesDo:[:eachClass|