'From Cuis 2.0 of 12 February 2010 [latest update: #418] on 22 February 2010 at 2:52:10 pm'!

!CodeHolder methodsFor: 'contents' stamp: 'jmv 2/22/2010 14:26'!
contentsSymbol: aSymbol
	"Set the contentsSymbol as indicated.  #source means to show source code, #comment means to show the first comment found in the source code"

	contentsSymbol _ aSymbol.
	self setContentsToForceRefetch.
	self contentsChanged! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:33'!
showDiffs: aBoolean
	"Set whether I'm showing diffs as indicated; use the global preference to determine which kind of diffs to institute."

	self showingAnyKindOfDiffs
		ifFalse: [
			aBoolean ifTrue: [
				self contentsSymbol: self defaultDiffsSymbol]]
		ifTrue: [
			aBoolean ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:28'!
showLineDiffs: aBoolean
	"Set whether I'm showing regular diffs as indicated"

	self showingLineDiffs
		ifFalse: [
			aBoolean ifTrue: [
				self contentsSymbol: #lineDiffs]]
		ifTrue: [
			aBoolean ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:34'!
showPrettyLineDiffs: aBoolean
	"Set whether I'm showing pretty diffs as indicated"

	self showingPrettyLineDiffs
		ifFalse: [
			aBoolean ifTrue: [
				self contentsSymbol: #prettyLineDiffs]]
		ifTrue: [
			aBoolean ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:35'!
showPrettyWordDiffs: aBoolean
	"Set whether I'm showing pretty diffs as indicated"

	self showingPrettyWordDiffs
		ifFalse: [
			aBoolean ifTrue: [
				self contentsSymbol: #prettyWordDiffs]]
		ifTrue: [
			aBoolean ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:33'!
showWordDiffs: aBoolean
	"Set whether I'm showing regular diffs as indicated"

	self showingWordDiffs
		ifFalse: [
			aBoolean ifTrue: [
				self contentsSymbol: #wordDiffs]]
		ifTrue: [
			aBoolean ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:37'!
toggleDiffing
	"Toggle whether diffs should be shown in the code pane.  If any kind of diffs were being shown, stop showing diffs.  If no kind of diffs were being shown, start showing whatever kind of diffs are called for by default."

	self okToChange ifTrue: [
		self showDiffs: self showingAnyKindOfDiffs not ]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:28'!
toggleLineDiffing
	"Toggle whether regular-diffing should be shown in the code pane"

	self okToChange ifTrue: [
		self showLineDiffs: self showingLineDiffs not ]

! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:31'!
togglePlainSource
	"Toggle whether plain source shown in the code pane"

	self okToChange ifTrue: [
		self showingPlainSource
			ifTrue: [
				self contentsSymbol: #documentation]
			ifFalse: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:37'!
togglePrettyLineDiffing
	"Toggle whether pretty-diffing should be shown in the code pane"

	self okToChange ifTrue: [
		self showPrettyLineDiffs: self showingPrettyLineDiffs not ]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:32'!
togglePrettyPrint
	"Toggle whether pretty-print is in effectin the code pane"

	self okToChange ifTrue: [
		self showingPrettyPrint
			ifTrue: [
				self contentsSymbol: #source]
			ifFalse: [
				self contentsSymbol: #prettyPrint]]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:35'!
togglePrettyWordDiffing
	"Toggle whether pretty-diffing should be shown in the code pane"

	self okToChange ifTrue: [
		self showPrettyWordDiffs: self showingPrettyWordDiffs not ]! !

!CodeHolder methodsFor: 'diffs' stamp: 'jmv 2/22/2010 14:38'!
toggleWordDiffing
	"Toggle whether regular-diffing should be shown in the code pane"

	self okToChange ifTrue: [
		self showWordDiffs: self showingWordDiffs not ]! !

!CodeHolder methodsFor: 'what to show' stamp: 'jmv 2/22/2010 14:34'!
showByteCodes: aBoolean
	"Get into or out of bytecode-showoing mode"

	self okToChange ifFalse: [^ self changed: #flash].
	aBoolean
		ifTrue: [
			self contentsSymbol: #byteCodes]
		ifFalse: [
			contentsSymbol == #byteCodes ifTrue: [
				self contentsSymbol: #source]]! !

!CodeHolder methodsFor: 'what to show' stamp: 'jmv 2/22/2010 14:30'!
toggleDecompile
	"Toggle the setting of the showingDecompile flag, unless there are unsubmitted edits that the user declines to discard"

	self okToChange ifTrue: [
		self showDecompile: self showingDecompile not ]! !

!CodeHolder methodsFor: 'what to show' stamp: 'jmv 2/22/2010 14:30'!
toggleShowDocumentation
	"Toggle the setting of the showingDocumentation flag, unless there are unsubmitted edits that the user declines to discard"

	self okToChange ifTrue: [
		self showDocumentation: self showingDocumentation not ]! !

!CodeHolder methodsFor: 'what to show' stamp: 'jmv 2/22/2010 14:36'!
toggleShowingByteCodes
	"Toggle whether the receiver is showing bytecodes"

	self showByteCodes: self showingByteCodes not! !


!Browser methodsFor: 'message list' stamp: 'jmv 2/22/2010 14:51'!
messageListIndex: anInteger
	"Set the selected message selector to be the one indexed by anInteger."

	messageListIndex _ anInteger.
	self editSelection: (anInteger > 0
		ifTrue: [#editMessage]
		ifFalse: [self messageCategoryListIndex > 0
			ifTrue: [#newMessage]
			ifFalse: [self classListIndex > 0
				ifTrue: [#editClass]
				ifFalse: [#newClass]]]).
	self setContentsToForceRefetch.
	self changed: #messageListIndex. "update my selection"
	self contentsChanged.
	self decorateButtons.! !


!MessageSet methodsFor: 'message list' stamp: 'jmv 2/22/2010 14:50'!
messageListIndex: anInteger 
	"Set the index of the selected item to be anInteger."

	messageListIndex _ anInteger.
	self setContentsToForceRefetch.
	self changed: #messageListIndex.	 "update my selection"
	self editSelection: #editMessage.
	self contentsChanged.
	(messageListIndex ~= 0 and: [autoSelectString notNil])
		ifTrue: [self changed: #autoSelect].
	self decorateButtons! !

