'From Cuis 1.0 of 28 November 2009 [latest update: #337] on 29 December 2009 at 11:16:29 am'!

!Inspector class methodsFor: 'instance creation' stamp: 'jmv 12/29/2009 11:07'!
openAsMorphOn: anObject withLabel: aLabel
	" Inspector openAsMorphOn: SystemOrganization "
	| window inspector |
	inspector _ self inspect: anObject.
	window _ (SystemWindow labelled: aLabel) model: inspector.
	window addMorph: (
		PluggableListMorph new
			doubleClickSelector: #inspectSelection;
			model: inspector 
			listGetter: #fieldList
			indexGetter: #selectionIndex
			indexSetter: #toggleIndex:
			menuGetter: #fieldListMenu:
			keystrokeAction: #inspectorKey:from:)
		frame: (0@0 corner: self horizontalDividerProportion @ self verticalDividerProportion).
	window addMorph: (PluggableTextMorph
			model: inspector 
			editorClass: inspector editorClass 
			textGetter: #contents 
			textSetter: #accept:
			selectionGetter: #contentsSelection 
			menuGetter: #paneMenu:shifted:editorClass:)
		frame: (self horizontalDividerProportion @0 corner: 1@self verticalDividerProportion).
	window addMorph: ((PluggableTextMorph 
			model: inspector 
			editorClass: inspector editorClass
			textGetter: #trash 
			textSetter: #trash:
			selectionGetter: #contentsSelection 
			menuGetter: #paneMenu:shifted:editorClass:)
					askBeforeDiscardingEdits: false)
		frame: (0@self verticalDividerProportion corner: 1@1).
	window setUpdatablePanesFrom: #(fieldList).
	^ window! !

DictionaryInspector removeSelector: #selectionUnmodifiable!
