|  | @@ -1,281 +1,171 @@
 | 
											
												
													
														|  |  Smalltalk current createPackage: 'IDE' properties: #{}!
 |  |  Smalltalk current createPackage: 'IDE' properties: #{}!
 | 
											
												
													
														|  | -Widget subclass: #TabManager
 |  | 
 | 
											
												
													
														|  | -	instanceVariableNames: 'selectedTab tabs opened ul input'
 |  | 
 | 
											
												
													
														|  | 
 |  | +ErrorHandler subclass: #DebugErrorHandler
 | 
											
												
													
														|  | 
 |  | +	instanceVariableNames: ''
 | 
											
												
													
														|  |  	category: 'IDE'!
 |  |  	category: 'IDE'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'accessing'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!DebugErrorHandler methodsFor: 'error handling'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -tabs
 |  | 
 | 
											
												
													
														|  | -    ^tabs ifNil: [tabs := Array new]
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +handleError: anError
 | 
											
												
													
														|  | 
 |  | +	[Debugger new
 | 
											
												
													
														|  | 
 |  | +		error: anError;
 | 
											
												
													
														|  | 
 |  | +		open] on: Error do: [:error |
 | 
											
												
													
														|  | 
 |  | +			ErrorHandler new handleError: error]
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -labelFor: aWidget
 |  | 
 | 
											
												
													
														|  | -	| label maxSize |
 |  | 
 | 
											
												
													
														|  | -	maxSize := 15.
 |  | 
 | 
											
												
													
														|  | -	label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).
 |  | 
 | 
											
												
													
														|  | -	aWidget label size > maxSize ifTrue: [
 |  | 
 | 
											
												
													
														|  | -		label := label, '...'].
 |  | 
 | 
											
												
													
														|  | -	^label
 |  | 
 | 
											
												
													
														|  | 
 |  | +!DebugErrorHandler class methodsFor: 'initialization'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +initialize
 | 
											
												
													
														|  | 
 |  | +	self register
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'actions'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +Widget subclass: #ClassesListNode
 | 
											
												
													
														|  | 
 |  | +	instanceVariableNames: 'browser theClass level nodes'
 | 
											
												
													
														|  | 
 |  | +	category: 'IDE'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -updateBodyMargin
 |  | 
 | 
											
												
													
														|  | -    self setBodyMargin: '#jtalk' asJQuery height
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesListNode methodsFor: ''!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -updatePosition
 |  | 
 | 
											
												
													
														|  | -    <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +renderOn: html
 | 
											
												
													
														|  | 
 |  | +	| li cssClass |
 | 
											
												
													
														|  | 
 |  | +	cssClass := ''.
 | 
											
												
													
														|  | 
 |  | +	li := html li 
 | 
											
												
													
														|  | 
 |  | +		onClick: [self browser selectClass: self theClass]. 
 | 
											
												
													
														|  | 
 |  | +	li asJQuery html: self label.
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -removeBodyMargin
 |  | 
 | 
											
												
													
														|  | -    self setBodyMargin: 0
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +	self browser selectedClass = self theClass ifTrue:  [
 | 
											
												
													
														|  | 
 |  | +		cssClass := cssClass, ' selected'].
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -setBodyMargin: anInteger
 |  | 
 | 
											
												
													
														|  | -    '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +	self theClass comment isEmpty ifFalse: [
 | 
											
												
													
														|  | 
 |  | +		cssClass := cssClass, ' commented'].
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -onResize: aBlock
 |  | 
 | 
											
												
													
														|  | -    <jQuery('#jtalk').resizable({
 |  | 
 | 
											
												
													
														|  | -	handles: 'n', 
 |  | 
 | 
											
												
													
														|  | -	resize: aBlock,
 |  | 
 | 
											
												
													
														|  | -	minHeight: 230
 |  | 
 | 
											
												
													
														|  | -})>
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +	li class: cssClass.
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -onWindowResize: aBlock
 |  | 
 | 
											
												
													
														|  | -    <jQuery(window).resize(aBlock)>
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +	self nodes do: [:each |
 | 
											
												
													
														|  | 
 |  | +		each renderOn: html]
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -open
 |  | 
 | 
											
												
													
														|  | -    opened ifFalse: [
 |  | 
 | 
											
												
													
														|  | -	'body' asJQuery addClass: 'jtalkBody'.
 |  | 
 | 
											
												
													
														|  | -	'#jtalk' asJQuery show.
 |  | 
 | 
											
												
													
														|  | -	ul asJQuery show.
 |  | 
 | 
											
												
													
														|  | -	self updateBodyMargin.
 |  | 
 | 
											
												
													
														|  | -	selectedTab show.
 |  | 
 | 
											
												
													
														|  | -	opened := true]
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesListNode methodsFor: 'accessing'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +nodes
 | 
											
												
													
														|  | 
 |  | +	^nodes
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -close
 |  | 
 | 
											
												
													
														|  | -    opened ifTrue: [
 |  | 
 | 
											
												
													
														|  | -	'#jtalk' asJQuery hide.
 |  | 
 | 
											
												
													
														|  | -	ul asJQuery hide.
 |  | 
 | 
											
												
													
														|  | -	selectedTab hide.
 |  | 
 | 
											
												
													
														|  | -	self removeBodyMargin.
 |  | 
 | 
											
												
													
														|  | -	'body' asJQuery removeClass: 'jtalkBody'.
 |  | 
 | 
											
												
													
														|  | -	opened := false]
 |  | 
 | 
											
												
													
														|  | 
 |  | +theClass
 | 
											
												
													
														|  | 
 |  | +	^theClass
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -newBrowserTab
 |  | 
 | 
											
												
													
														|  | -    Browser open
 |  | 
 | 
											
												
													
														|  | 
 |  | +theClass: aClass
 | 
											
												
													
														|  | 
 |  | +	theClass := aClass
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -selectTab: aWidget
 |  | 
 | 
											
												
													
														|  | -    self open.
 |  | 
 | 
											
												
													
														|  | -    selectedTab := aWidget.
 |  | 
 | 
											
												
													
														|  | -    self tabs do: [:each |
 |  | 
 | 
											
												
													
														|  | -	each hide].
 |  | 
 | 
											
												
													
														|  | -    aWidget show.
 |  | 
 | 
											
												
													
														|  | -	
 |  | 
 | 
											
												
													
														|  | -    self update
 |  | 
 | 
											
												
													
														|  | 
 |  | +browser
 | 
											
												
													
														|  | 
 |  | +	^browser
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -closeTab: aWidget
 |  | 
 | 
											
												
													
														|  | -    self removeTab: aWidget.
 |  | 
 | 
											
												
													
														|  | -    self selectTab: self tabs last.
 |  | 
 | 
											
												
													
														|  | -    aWidget remove.
 |  | 
 | 
											
												
													
														|  | -    self update
 |  | 
 | 
											
												
													
														|  | 
 |  | +browser: aBrowser
 | 
											
												
													
														|  | 
 |  | +	browser := aBrowser
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -search: aString
 |  | 
 | 
											
												
													
														|  | -	| searchedClass |
 |  | 
 | 
											
												
													
														|  | -	searchedClass := Smalltalk current at: aString.
 |  | 
 | 
											
												
													
														|  | -		searchedClass isClass
 |  | 
 | 
											
												
													
														|  | -			ifTrue: [Browser openOn: searchedClass]
 |  | 
 | 
											
												
													
														|  | -			ifFalse: [ReferencesBrowser search: aString]
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | 
 |  | +level
 | 
											
												
													
														|  | 
 |  | +	^level
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'adding/Removing'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +level: anInteger
 | 
											
												
													
														|  | 
 |  | +	level := anInteger
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -addTab: aWidget
 |  | 
 | 
											
												
													
														|  | -    self tabs add: aWidget.
 |  | 
 | 
											
												
													
														|  | -    aWidget appendToJQuery: '#jtalk' asJQuery.
 |  | 
 | 
											
												
													
														|  | -    aWidget hide
 |  | 
 | 
											
												
													
														|  | 
 |  | +label
 | 
											
												
													
														|  | 
 |  | +	| str |
 | 
											
												
													
														|  | 
 |  | +	str := String new writeStream.
 | 
											
												
													
														|  | 
 |  | +	self level timesRepeat: [
 | 
											
												
													
														|  | 
 |  | +		str nextPutAll: '    '].
 | 
											
												
													
														|  | 
 |  | +	str nextPutAll: self theClass name.
 | 
											
												
													
														|  | 
 |  | +	^str contents
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -removeTab: aWidget
 |  | 
 | 
											
												
													
														|  | -    self tabs remove: aWidget.
 |  | 
 | 
											
												
													
														|  | -    self update
 |  | 
 | 
											
												
													
														|  | 
 |  | +getNodesFrom: aCollection
 | 
											
												
													
														|  | 
 |  | +	| children others |
 | 
											
												
													
														|  | 
 |  | +	children := #().
 | 
											
												
													
														|  | 
 |  | +	others := #().
 | 
											
												
													
														|  | 
 |  | +	aCollection do: [:each |
 | 
											
												
													
														|  | 
 |  | +		(each superclass = self theClass)
 | 
											
												
													
														|  | 
 |  | +			ifTrue: [children add: each]
 | 
											
												
													
														|  | 
 |  | +			ifFalse: [others add: each]].
 | 
											
												
													
														|  | 
 |  | +	nodes:= children collect: [:each |
 | 
											
												
													
														|  | 
 |  | +		ClassesListNode on: each browser: self browser classes: others level: self level + 1]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'initialization'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesListNode class methodsFor: 'instance creation'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -initialize
 |  | 
 | 
											
												
													
														|  | -    super initialize.
 |  | 
 | 
											
												
													
														|  | -    opened := true.
 |  | 
 | 
											
												
													
														|  | -    [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
 |  | 
 | 
											
												
													
														|  | -    'body' asJQuery 
 |  | 
 | 
											
												
													
														|  | -	addClass: 'jtalkBody'.
 |  | 
 | 
											
												
													
														|  | -    self appendToJQuery: '#jtalk' asJQuery.
 |  | 
 | 
											
												
													
														|  | -    self 
 |  | 
 | 
											
												
													
														|  | -	addTab: IDETranscript current;
 |  | 
 | 
											
												
													
														|  | -	addTab: Workspace new;
 |  | 
 | 
											
												
													
														|  | -	addTab: TestRunner new.
 |  | 
 | 
											
												
													
														|  | -    self selectTab: self tabs last.
 |  | 
 | 
											
												
													
														|  | -    self 
 |  | 
 | 
											
												
													
														|  | -	onResize: [self updateBodyMargin; updatePosition];
 |  | 
 | 
											
												
													
														|  | -	onWindowResize: [self updatePosition]
 |  | 
 | 
											
												
													
														|  | 
 |  | +on: aClass browser: aBrowser classes: aCollection level: anInteger
 | 
											
												
													
														|  | 
 |  | +	^self new
 | 
											
												
													
														|  | 
 |  | +		theClass: aClass;
 | 
											
												
													
														|  | 
 |  | +		browser: aBrowser;
 | 
											
												
													
														|  | 
 |  | +		level: anInteger;
 | 
											
												
													
														|  | 
 |  | +		getNodesFrom: aCollection;
 | 
											
												
													
														|  | 
 |  | +		yourself
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'rendering'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +Widget subclass: #ClassesList
 | 
											
												
													
														|  | 
 |  | +	instanceVariableNames: 'browser ul nodes'
 | 
											
												
													
														|  | 
 |  | +	category: 'IDE'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderOn: html
 |  | 
 | 
											
												
													
														|  | -	html div id: 'logo'.
 |  | 
 | 
											
												
													
														|  | -	self renderToolbarOn: html.
 |  | 
 | 
											
												
													
														|  | -	ul := html ul
 |  | 
 | 
											
												
													
														|  | -		id: 'jtalkTabs';
 |  | 
 | 
											
												
													
														|  | -		yourself.
 |  | 
 | 
											
												
													
														|  | -	self renderTabs
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesList methodsFor: 'accessing'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +category
 | 
											
												
													
														|  | 
 |  | +	^self browser selectedPackage
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderTabFor: aWidget on: html
 |  | 
 | 
											
												
													
														|  | -	| li |
 |  | 
 | 
											
												
													
														|  | -	li := html li.
 |  | 
 | 
											
												
													
														|  | -	selectedTab = aWidget ifTrue: [
 |  | 
 | 
											
												
													
														|  | -	li class: 'selected'].
 |  | 
 | 
											
												
													
														|  | -	li with: [
 |  | 
 | 
											
												
													
														|  | -		html span class: 'ltab'.
 |  | 
 | 
											
												
													
														|  | -		html span
 |  | 
 | 
											
												
													
														|  | -			class: 'mtab';
 |  | 
 | 
											
												
													
														|  | -			with: [
 |  | 
 | 
											
												
													
														|  | -				aWidget canBeClosed ifTrue: [
 |  | 
 | 
											
												
													
														|  | -					html span 
 |  | 
 | 
											
												
													
														|  | -						class: 'close';
 |  | 
 | 
											
												
													
														|  | -						with: 'x';
 |  | 
 | 
											
												
													
														|  | -					onClick: [self closeTab: aWidget]].
 |  | 
 | 
											
												
													
														|  | -			html span with: (self labelFor: aWidget)].
 |  | 
 | 
											
												
													
														|  | -		html span class: 'rtab'];
 |  | 
 | 
											
												
													
														|  | -	onClick: [self selectTab: aWidget]
 |  | 
 | 
											
												
													
														|  | 
 |  | +nodes
 | 
											
												
													
														|  | 
 |  | +	nodes ifNil: [nodes := self getNodes].
 | 
											
												
													
														|  | 
 |  | +	^nodes
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderTabs
 |  | 
 | 
											
												
													
														|  | -	ul contents: [:html |
 |  | 
 | 
											
												
													
														|  | -	    self tabs do: [:each |
 |  | 
 | 
											
												
													
														|  | -		self renderTabFor: each on: html].
 |  | 
 | 
											
												
													
														|  | -	    html li
 |  | 
 | 
											
												
													
														|  | -		class: 'newtab';
 |  | 
 | 
											
												
													
														|  | -		with: [
 |  | 
 | 
											
												
													
														|  | -			html span class: 'ltab'.
 |  | 
 | 
											
												
													
														|  | -			html span class: 'mtab'; with: ' + '.
 |  | 
 | 
											
												
													
														|  | -			html span class: 'rtab'];
 |  | 
 | 
											
												
													
														|  | -		onClick: [self newBrowserTab]]
 |  | 
 | 
											
												
													
														|  | 
 |  | +browser
 | 
											
												
													
														|  | 
 |  | +	^browser
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderToolbarOn: html
 |  | 
 | 
											
												
													
														|  | -	html div 
 |  | 
 | 
											
												
													
														|  | -		id: 'jt_toolbar';
 |  | 
 | 
											
												
													
														|  | -		with: [
 |  | 
 | 
											
												
													
														|  | -			input := html input 
 |  | 
 | 
											
												
													
														|  | -				class: 'implementors';
 |  | 
 | 
											
												
													
														|  | -				yourself.
 |  | 
 | 
											
												
													
														|  | -			input onKeyPress: [:event |
 |  | 
 | 
											
												
													
														|  | -				event keyCode = 13 ifTrue: [
 |  | 
 | 
											
												
													
														|  | -				self search: input asJQuery val]].
 |  | 
 | 
											
												
													
														|  | -			html div id: 'jt_close'; onClick: [self close]]
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | 
 |  | +browser: aBrowser
 | 
											
												
													
														|  | 
 |  | +	browser := aBrowser
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabManager methodsFor: 'updating'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +getNodes
 | 
											
												
													
														|  | 
 |  | +	| classes children others |
 | 
											
												
													
														|  | 
 |  | +	classes := self browser classes.
 | 
											
												
													
														|  | 
 |  | +	children := #().
 | 
											
												
													
														|  | 
 |  | +	others := #().
 | 
											
												
													
														|  | 
 |  | +	classes do: [:each |
 | 
											
												
													
														|  | 
 |  | +		(classes includes: each superclass)
 | 
											
												
													
														|  | 
 |  | +			ifFalse: [children add: each]
 | 
											
												
													
														|  | 
 |  | +			ifTrue: [others add: each]].
 | 
											
												
													
														|  | 
 |  | +	^children collect: [:each |
 | 
											
												
													
														|  | 
 |  | +		ClassesListNode on: each browser: self browser classes: others level: 0]
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -update
 |  | 
 | 
											
												
													
														|  | -	self renderTabs
 |  | 
 | 
											
												
													
														|  | 
 |  | +resetNodes
 | 
											
												
													
														|  | 
 |  | +	nodes := nil
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -TabManager class instanceVariableNames: 'current'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -!TabManager class methodsFor: 'instance creation'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -current
 |  | 
 | 
											
												
													
														|  | -    ^current ifNil: [current := super new]
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -new
 |  | 
 | 
											
												
													
														|  | -    self shouldNotImplement
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -Widget subclass: #TabWidget
 |  | 
 | 
											
												
													
														|  | -	instanceVariableNames: 'div'
 |  | 
 | 
											
												
													
														|  | -	category: 'IDE'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -!TabWidget methodsFor: 'accessing'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -label
 |  | 
 | 
											
												
													
														|  | -    self subclassResponsibility
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -!TabWidget methodsFor: 'actions'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -open
 |  | 
 | 
											
												
													
														|  | -    TabManager current addTab: self.
 |  | 
 | 
											
												
													
														|  | -    TabManager current selectTab: self
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -show
 |  | 
 | 
											
												
													
														|  | -	div asJQuery show
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -hide
 |  | 
 | 
											
												
													
														|  | -	div asJQuery hide
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -remove
 |  | 
 | 
											
												
													
														|  | -	div asJQuery remove
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -close
 |  | 
 | 
											
												
													
														|  | -    TabManager current closeTab: self
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -!TabWidget methodsFor: 'rendering'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesList methodsFor: 'rendering'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  renderOn: html
 |  |  renderOn: html
 | 
											
												
													
														|  | -	div := html div
 |  | 
 | 
											
												
													
														|  | -		class: 'jtalkTool';
 |  | 
 | 
											
												
													
														|  | 
 |  | +	ul := html ul
 | 
											
												
													
														|  | 
 |  | +		class: 'jt_column browser classes';
 | 
											
												
													
														|  |  		yourself.
 |  |  		yourself.
 | 
											
												
													
														|  | -	self renderTab
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -renderBoxOn: html
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -renderButtonsOn: html
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -update
 |  | 
 | 
											
												
													
														|  | -	self renderTab
 |  | 
 | 
											
												
													
														|  | 
 |  | +	self updateNodes
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderTab
 |  | 
 | 
											
												
													
														|  | -	div contents: [:html |
 |  | 
 | 
											
												
													
														|  | -	    html div
 |  | 
 | 
											
												
													
														|  | -		class: 'jt_box';
 |  | 
 | 
											
												
													
														|  | -		with: [self renderBoxOn: html].
 |  | 
 | 
											
												
													
														|  | -	    html div
 |  | 
 | 
											
												
													
														|  | -		class: 'jt_buttons';
 |  | 
 | 
											
												
													
														|  | -		with: [self renderButtonsOn: html]]
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -!TabWidget methodsFor: 'testing'!
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -canBeClosed
 |  | 
 | 
											
												
													
														|  | -    ^false
 |  | 
 | 
											
												
													
														|  | 
 |  | +updateNodes
 | 
											
												
													
														|  | 
 |  | +	ul contents: [:html |
 | 
											
												
													
														|  | 
 |  | +		self nodes do: [:each |
 | 
											
												
													
														|  | 
 |  | +			each renderOn: html]]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!TabWidget class methodsFor: 'instance creation'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!ClassesList class methodsFor: 'instance creation'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -open
 |  | 
 | 
											
												
													
														|  | -    ^self new open
 |  | 
 | 
											
												
													
														|  | 
 |  | +on: aBrowser
 | 
											
												
													
														|  | 
 |  | +	^self new 
 | 
											
												
													
														|  | 
 |  | +		browser: aBrowser; 
 | 
											
												
													
														|  | 
 |  | +		yourself
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  Widget subclass: #SourceArea
 |  |  Widget subclass: #SourceArea
 | 
											
										
											
												
													
														|  | @@ -438,173 +328,283 @@ renderOn: html
 | 
											
												
													
														|  |      div onKeyDown: [:e | self handleKeyDown: e]
 |  |      div onKeyDown: [:e | self handleKeyDown: e]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -Widget subclass: #ClassesList
 |  | 
 | 
											
												
													
														|  | -	instanceVariableNames: 'browser ul nodes'
 |  | 
 | 
											
												
													
														|  | 
 |  | +Widget subclass: #TabWidget
 | 
											
												
													
														|  | 
 |  | +	instanceVariableNames: 'div'
 | 
											
												
													
														|  |  	category: 'IDE'!
 |  |  	category: 'IDE'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesList methodsFor: 'accessing'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabWidget methodsFor: 'accessing'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -category
 |  | 
 | 
											
												
													
														|  | -	^self browser selectedPackage
 |  | 
 | 
											
												
													
														|  | -!
 |  | 
 | 
											
												
													
														|  | 
 |  | +label
 | 
											
												
													
														|  | 
 |  | +    self subclassResponsibility
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -nodes
 |  | 
 | 
											
												
													
														|  | -	nodes ifNil: [nodes := self getNodes].
 |  | 
 | 
											
												
													
														|  | -	^nodes
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabWidget methodsFor: 'actions'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +open
 | 
											
												
													
														|  | 
 |  | +    TabManager current addTab: self.
 | 
											
												
													
														|  | 
 |  | +    TabManager current selectTab: self
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -browser
 |  | 
 | 
											
												
													
														|  | -	^browser
 |  | 
 | 
											
												
													
														|  | 
 |  | +show
 | 
											
												
													
														|  | 
 |  | +	div asJQuery show
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -browser: aBrowser
 |  | 
 | 
											
												
													
														|  | -	browser := aBrowser
 |  | 
 | 
											
												
													
														|  | 
 |  | +hide
 | 
											
												
													
														|  | 
 |  | +	div asJQuery hide
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -getNodes
 |  | 
 | 
											
												
													
														|  | -	| classes children others |
 |  | 
 | 
											
												
													
														|  | -	classes := self browser classes.
 |  | 
 | 
											
												
													
														|  | -	children := #().
 |  | 
 | 
											
												
													
														|  | -	others := #().
 |  | 
 | 
											
												
													
														|  | -	classes do: [:each |
 |  | 
 | 
											
												
													
														|  | -		(classes includes: each superclass)
 |  | 
 | 
											
												
													
														|  | -			ifFalse: [children add: each]
 |  | 
 | 
											
												
													
														|  | -			ifTrue: [others add: each]].
 |  | 
 | 
											
												
													
														|  | -	^children collect: [:each |
 |  | 
 | 
											
												
													
														|  | -		ClassesListNode on: each browser: self browser classes: others level: 0]
 |  | 
 | 
											
												
													
														|  | 
 |  | +remove
 | 
											
												
													
														|  | 
 |  | +	div asJQuery remove
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -resetNodes
 |  | 
 | 
											
												
													
														|  | -	nodes := nil
 |  | 
 | 
											
												
													
														|  | 
 |  | +close
 | 
											
												
													
														|  | 
 |  | +    TabManager current closeTab: self
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesList methodsFor: 'rendering'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabWidget methodsFor: 'rendering'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  renderOn: html
 |  |  renderOn: html
 | 
											
												
													
														|  | -	ul := html ul
 |  | 
 | 
											
												
													
														|  | -		class: 'jt_column browser classes';
 |  | 
 | 
											
												
													
														|  | 
 |  | +	div := html div
 | 
											
												
													
														|  | 
 |  | +		class: 'jtalkTool';
 | 
											
												
													
														|  |  		yourself.
 |  |  		yourself.
 | 
											
												
													
														|  | -	self updateNodes
 |  | 
 | 
											
												
													
														|  | 
 |  | +	self renderTab
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -updateNodes
 |  | 
 | 
											
												
													
														|  | -	ul contents: [:html |
 |  | 
 | 
											
												
													
														|  | -		self nodes do: [:each |
 |  | 
 | 
											
												
													
														|  | -			each renderOn: html]]
 |  | 
 | 
											
												
													
														|  | 
 |  | +renderBoxOn: html
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderButtonsOn: html
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +update
 | 
											
												
													
														|  | 
 |  | +	self renderTab
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderTab
 | 
											
												
													
														|  | 
 |  | +	div contents: [:html |
 | 
											
												
													
														|  | 
 |  | +	    html div
 | 
											
												
													
														|  | 
 |  | +		class: 'jt_box';
 | 
											
												
													
														|  | 
 |  | +		with: [self renderBoxOn: html].
 | 
											
												
													
														|  | 
 |  | +	    html div
 | 
											
												
													
														|  | 
 |  | +		class: 'jt_buttons';
 | 
											
												
													
														|  | 
 |  | +		with: [self renderButtonsOn: html]]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesList class methodsFor: 'instance creation'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabWidget methodsFor: 'testing'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -on: aBrowser
 |  | 
 | 
											
												
													
														|  | -	^self new 
 |  | 
 | 
											
												
													
														|  | -		browser: aBrowser; 
 |  | 
 | 
											
												
													
														|  | -		yourself
 |  | 
 | 
											
												
													
														|  | 
 |  | +canBeClosed
 | 
											
												
													
														|  | 
 |  | +    ^false
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -Widget subclass: #ClassesListNode
 |  | 
 | 
											
												
													
														|  | -	instanceVariableNames: 'browser theClass level nodes'
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabWidget class methodsFor: 'instance creation'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +open
 | 
											
												
													
														|  | 
 |  | +    ^self new open
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +Widget subclass: #TabManager
 | 
											
												
													
														|  | 
 |  | +	instanceVariableNames: 'selectedTab tabs opened ul input'
 | 
											
												
													
														|  |  	category: 'IDE'!
 |  |  	category: 'IDE'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesListNode methodsFor: ''!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'accessing'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -renderOn: html
 |  | 
 | 
											
												
													
														|  | -	| li cssClass |
 |  | 
 | 
											
												
													
														|  | -	cssClass := ''.
 |  | 
 | 
											
												
													
														|  | -	li := html li 
 |  | 
 | 
											
												
													
														|  | -		onClick: [self browser selectClass: self theClass]. 
 |  | 
 | 
											
												
													
														|  | -	li asJQuery html: self label.
 |  | 
 | 
											
												
													
														|  | 
 |  | +tabs
 | 
											
												
													
														|  | 
 |  | +    ^tabs ifNil: [tabs := Array new]
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -	self browser selectedClass = self theClass ifTrue:  [
 |  | 
 | 
											
												
													
														|  | -		cssClass := cssClass, ' selected'].
 |  | 
 | 
											
												
													
														|  | 
 |  | +labelFor: aWidget
 | 
											
												
													
														|  | 
 |  | +	| label maxSize |
 | 
											
												
													
														|  | 
 |  | +	maxSize := 15.
 | 
											
												
													
														|  | 
 |  | +	label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).
 | 
											
												
													
														|  | 
 |  | +	aWidget label size > maxSize ifTrue: [
 | 
											
												
													
														|  | 
 |  | +		label := label, '...'].
 | 
											
												
													
														|  | 
 |  | +	^label
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -	self theClass comment isEmpty ifFalse: [
 |  | 
 | 
											
												
													
														|  | -		cssClass := cssClass, ' commented'].
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'actions'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -	li class: cssClass.
 |  | 
 | 
											
												
													
														|  | 
 |  | +updateBodyMargin
 | 
											
												
													
														|  | 
 |  | +    self setBodyMargin: '#jtalk' asJQuery height
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -	self nodes do: [:each |
 |  | 
 | 
											
												
													
														|  | -		each renderOn: html]
 |  | 
 | 
											
												
													
														|  | -! !
 |  | 
 | 
											
												
													
														|  | 
 |  | +updatePosition
 | 
											
												
													
														|  | 
 |  | +    <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesListNode methodsFor: 'accessing'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +removeBodyMargin
 | 
											
												
													
														|  | 
 |  | +    self setBodyMargin: 0
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -nodes
 |  | 
 | 
											
												
													
														|  | -	^nodes
 |  | 
 | 
											
												
													
														|  | 
 |  | +setBodyMargin: anInteger
 | 
											
												
													
														|  | 
 |  | +    '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -theClass
 |  | 
 | 
											
												
													
														|  | -	^theClass
 |  | 
 | 
											
												
													
														|  | 
 |  | +onResize: aBlock
 | 
											
												
													
														|  | 
 |  | +    <jQuery('#jtalk').resizable({
 | 
											
												
													
														|  | 
 |  | +	handles: 'n', 
 | 
											
												
													
														|  | 
 |  | +	resize: aBlock,
 | 
											
												
													
														|  | 
 |  | +	minHeight: 230
 | 
											
												
													
														|  | 
 |  | +})>
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -theClass: aClass
 |  | 
 | 
											
												
													
														|  | -	theClass := aClass
 |  | 
 | 
											
												
													
														|  | 
 |  | +onWindowResize: aBlock
 | 
											
												
													
														|  | 
 |  | +    <jQuery(window).resize(aBlock)>
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -browser
 |  | 
 | 
											
												
													
														|  | -	^browser
 |  | 
 | 
											
												
													
														|  | 
 |  | +open
 | 
											
												
													
														|  | 
 |  | +    opened ifFalse: [
 | 
											
												
													
														|  | 
 |  | +	'body' asJQuery addClass: 'jtalkBody'.
 | 
											
												
													
														|  | 
 |  | +	'#jtalk' asJQuery show.
 | 
											
												
													
														|  | 
 |  | +	ul asJQuery show.
 | 
											
												
													
														|  | 
 |  | +	self updateBodyMargin.
 | 
											
												
													
														|  | 
 |  | +	selectedTab show.
 | 
											
												
													
														|  | 
 |  | +	opened := true]
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -browser: aBrowser
 |  | 
 | 
											
												
													
														|  | -	browser := aBrowser
 |  | 
 | 
											
												
													
														|  | 
 |  | +close
 | 
											
												
													
														|  | 
 |  | +    opened ifTrue: [
 | 
											
												
													
														|  | 
 |  | +	'#jtalk' asJQuery hide.
 | 
											
												
													
														|  | 
 |  | +	ul asJQuery hide.
 | 
											
												
													
														|  | 
 |  | +	selectedTab hide.
 | 
											
												
													
														|  | 
 |  | +	self removeBodyMargin.
 | 
											
												
													
														|  | 
 |  | +	'body' asJQuery removeClass: 'jtalkBody'.
 | 
											
												
													
														|  | 
 |  | +	opened := false]
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -level
 |  | 
 | 
											
												
													
														|  | -	^level
 |  | 
 | 
											
												
													
														|  | 
 |  | +newBrowserTab
 | 
											
												
													
														|  | 
 |  | +    Browser open
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -level: anInteger
 |  | 
 | 
											
												
													
														|  | -	level := anInteger
 |  | 
 | 
											
												
													
														|  | 
 |  | +selectTab: aWidget
 | 
											
												
													
														|  | 
 |  | +    self open.
 | 
											
												
													
														|  | 
 |  | +    selectedTab := aWidget.
 | 
											
												
													
														|  | 
 |  | +    self tabs do: [:each |
 | 
											
												
													
														|  | 
 |  | +	each hide].
 | 
											
												
													
														|  | 
 |  | +    aWidget show.
 | 
											
												
													
														|  | 
 |  | +	
 | 
											
												
													
														|  | 
 |  | +    self update
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -label
 |  | 
 | 
											
												
													
														|  | -	| str |
 |  | 
 | 
											
												
													
														|  | -	str := String new writeStream.
 |  | 
 | 
											
												
													
														|  | -	self level timesRepeat: [
 |  | 
 | 
											
												
													
														|  | -		str nextPutAll: '    '].
 |  | 
 | 
											
												
													
														|  | -	str nextPutAll: self theClass name.
 |  | 
 | 
											
												
													
														|  | -	^str contents
 |  | 
 | 
											
												
													
														|  | 
 |  | +closeTab: aWidget
 | 
											
												
													
														|  | 
 |  | +    self removeTab: aWidget.
 | 
											
												
													
														|  | 
 |  | +    self selectTab: self tabs last.
 | 
											
												
													
														|  | 
 |  | +    aWidget remove.
 | 
											
												
													
														|  | 
 |  | +    self update
 | 
											
												
													
														|  |  !
 |  |  !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -getNodesFrom: aCollection
 |  | 
 | 
											
												
													
														|  | -	| children others |
 |  | 
 | 
											
												
													
														|  | -	children := #().
 |  | 
 | 
											
												
													
														|  | -	others := #().
 |  | 
 | 
											
												
													
														|  | -	aCollection do: [:each |
 |  | 
 | 
											
												
													
														|  | -		(each superclass = self theClass)
 |  | 
 | 
											
												
													
														|  | -			ifTrue: [children add: each]
 |  | 
 | 
											
												
													
														|  | -			ifFalse: [others add: each]].
 |  | 
 | 
											
												
													
														|  | -	nodes:= children collect: [:each |
 |  | 
 | 
											
												
													
														|  | -		ClassesListNode on: each browser: self browser classes: others level: self level + 1]
 |  | 
 | 
											
												
													
														|  | 
 |  | +search: aString
 | 
											
												
													
														|  | 
 |  | +	| searchedClass |
 | 
											
												
													
														|  | 
 |  | +	searchedClass := Smalltalk current at: aString.
 | 
											
												
													
														|  | 
 |  | +		searchedClass isClass
 | 
											
												
													
														|  | 
 |  | +			ifTrue: [Browser openOn: searchedClass]
 | 
											
												
													
														|  | 
 |  | +			ifFalse: [ReferencesBrowser search: aString]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!ClassesListNode class methodsFor: 'instance creation'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'adding/Removing'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -on: aClass browser: aBrowser classes: aCollection level: anInteger
 |  | 
 | 
											
												
													
														|  | -	^self new
 |  | 
 | 
											
												
													
														|  | -		theClass: aClass;
 |  | 
 | 
											
												
													
														|  | -		browser: aBrowser;
 |  | 
 | 
											
												
													
														|  | -		level: anInteger;
 |  | 
 | 
											
												
													
														|  | -		getNodesFrom: aCollection;
 |  | 
 | 
											
												
													
														|  | -		yourself
 |  | 
 | 
											
												
													
														|  | 
 |  | +addTab: aWidget
 | 
											
												
													
														|  | 
 |  | +    self tabs add: aWidget.
 | 
											
												
													
														|  | 
 |  | +    aWidget appendToJQuery: '#jtalk' asJQuery.
 | 
											
												
													
														|  | 
 |  | +    aWidget hide
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +removeTab: aWidget
 | 
											
												
													
														|  | 
 |  | +    self tabs remove: aWidget.
 | 
											
												
													
														|  | 
 |  | +    self update
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -ErrorHandler subclass: #DebugErrorHandler
 |  | 
 | 
											
												
													
														|  | -	instanceVariableNames: ''
 |  | 
 | 
											
												
													
														|  | -	category: 'IDE'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'initialization'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!DebugErrorHandler methodsFor: 'error handling'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +initialize
 | 
											
												
													
														|  | 
 |  | +    super initialize.
 | 
											
												
													
														|  | 
 |  | +    opened := true.
 | 
											
												
													
														|  | 
 |  | +    [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
 | 
											
												
													
														|  | 
 |  | +    'body' asJQuery 
 | 
											
												
													
														|  | 
 |  | +	addClass: 'jtalkBody'.
 | 
											
												
													
														|  | 
 |  | +    self appendToJQuery: '#jtalk' asJQuery.
 | 
											
												
													
														|  | 
 |  | +    self 
 | 
											
												
													
														|  | 
 |  | +	addTab: IDETranscript current;
 | 
											
												
													
														|  | 
 |  | +	addTab: Workspace new;
 | 
											
												
													
														|  | 
 |  | +	addTab: TestRunner new.
 | 
											
												
													
														|  | 
 |  | +    self selectTab: self tabs last.
 | 
											
												
													
														|  | 
 |  | +    self 
 | 
											
												
													
														|  | 
 |  | +	onResize: [self updateBodyMargin; updatePosition];
 | 
											
												
													
														|  | 
 |  | +	onWindowResize: [self updatePosition]
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -handleError: anError
 |  | 
 | 
											
												
													
														|  | -	[Debugger new
 |  | 
 | 
											
												
													
														|  | -		error: anError;
 |  | 
 | 
											
												
													
														|  | -		open] on: Error do: [:error |
 |  | 
 | 
											
												
													
														|  | -			ErrorHandler new handleError: error]
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'rendering'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderOn: html
 | 
											
												
													
														|  | 
 |  | +	html div id: 'logo'.
 | 
											
												
													
														|  | 
 |  | +	self renderToolbarOn: html.
 | 
											
												
													
														|  | 
 |  | +	ul := html ul
 | 
											
												
													
														|  | 
 |  | +		id: 'jtalkTabs';
 | 
											
												
													
														|  | 
 |  | +		yourself.
 | 
											
												
													
														|  | 
 |  | +	self renderTabs
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderTabFor: aWidget on: html
 | 
											
												
													
														|  | 
 |  | +	| li |
 | 
											
												
													
														|  | 
 |  | +	li := html li.
 | 
											
												
													
														|  | 
 |  | +	selectedTab = aWidget ifTrue: [
 | 
											
												
													
														|  | 
 |  | +	li class: 'selected'].
 | 
											
												
													
														|  | 
 |  | +	li with: [
 | 
											
												
													
														|  | 
 |  | +		html span class: 'ltab'.
 | 
											
												
													
														|  | 
 |  | +		html span
 | 
											
												
													
														|  | 
 |  | +			class: 'mtab';
 | 
											
												
													
														|  | 
 |  | +			with: [
 | 
											
												
													
														|  | 
 |  | +				aWidget canBeClosed ifTrue: [
 | 
											
												
													
														|  | 
 |  | +					html span 
 | 
											
												
													
														|  | 
 |  | +						class: 'close';
 | 
											
												
													
														|  | 
 |  | +						with: 'x';
 | 
											
												
													
														|  | 
 |  | +					onClick: [self closeTab: aWidget]].
 | 
											
												
													
														|  | 
 |  | +			html span with: (self labelFor: aWidget)].
 | 
											
												
													
														|  | 
 |  | +		html span class: 'rtab'];
 | 
											
												
													
														|  | 
 |  | +	onClick: [self selectTab: aWidget]
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderTabs
 | 
											
												
													
														|  | 
 |  | +	ul contents: [:html |
 | 
											
												
													
														|  | 
 |  | +	    self tabs do: [:each |
 | 
											
												
													
														|  | 
 |  | +		self renderTabFor: each on: html].
 | 
											
												
													
														|  | 
 |  | +	    html li
 | 
											
												
													
														|  | 
 |  | +		class: 'newtab';
 | 
											
												
													
														|  | 
 |  | +		with: [
 | 
											
												
													
														|  | 
 |  | +			html span class: 'ltab'.
 | 
											
												
													
														|  | 
 |  | +			html span class: 'mtab'; with: ' + '.
 | 
											
												
													
														|  | 
 |  | +			html span class: 'rtab'];
 | 
											
												
													
														|  | 
 |  | +		onClick: [self newBrowserTab]]
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +renderToolbarOn: html
 | 
											
												
													
														|  | 
 |  | +	html div 
 | 
											
												
													
														|  | 
 |  | +		id: 'jt_toolbar';
 | 
											
												
													
														|  | 
 |  | +		with: [
 | 
											
												
													
														|  | 
 |  | +			input := html input 
 | 
											
												
													
														|  | 
 |  | +				class: 'implementors';
 | 
											
												
													
														|  | 
 |  | +				yourself.
 | 
											
												
													
														|  | 
 |  | +			input onKeyPress: [:event |
 | 
											
												
													
														|  | 
 |  | +				event keyCode = 13 ifTrue: [
 | 
											
												
													
														|  | 
 |  | +				self search: input asJQuery val]].
 | 
											
												
													
														|  | 
 |  | +			html div id: 'jt_close'; onClick: [self close]]
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -!DebugErrorHandler class methodsFor: 'initialization'!
 |  | 
 | 
											
												
													
														|  | 
 |  | +!TabManager methodsFor: 'updating'!
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -initialize
 |  | 
 | 
											
												
													
														|  | -	self register
 |  | 
 | 
											
												
													
														|  | 
 |  | +update
 | 
											
												
													
														|  | 
 |  | +	self renderTabs
 | 
											
												
													
														|  | 
 |  | +! !
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +TabManager class instanceVariableNames: 'current'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +!TabManager class methodsFor: 'instance creation'!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +current
 | 
											
												
													
														|  | 
 |  | +    ^current ifNil: [current := super new]
 | 
											
												
													
														|  | 
 |  | +!
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +new
 | 
											
												
													
														|  | 
 |  | +    self shouldNotImplement
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  TabWidget subclass: #Workspace
 |  |  TabWidget subclass: #Workspace
 | 
											
										
											
												
													
														|  | @@ -1098,7 +1098,7 @@ ajaxPutAt: anURL data: aString
 | 
											
												
													
														|  |  	jQuery 
 |  |  	jQuery 
 | 
											
												
													
														|  |  		ajax: anURL	options: #{	'type' -> 'PUT'.
 |  |  		ajax: anURL	options: #{	'type' -> 'PUT'.
 | 
											
												
													
														|  |  								'data' -> aString.
 |  |  								'data' -> aString.
 | 
											
												
													
														|  | -								'contentType' -> 'text/plain'.
 |  | 
 | 
											
												
													
														|  | 
 |  | +								'contentType' -> 'text/plain;charset=UTF-8'.
 | 
											
												
													
														|  |  								'error' -> [window alert: 'PUT request failed at:  ', anURL] }
 |  |  								'error' -> [window alert: 'PUT request failed at:  ', anURL] }
 | 
											
												
													
														|  |  ! !
 |  |  ! !
 | 
											
												
													
														|  |  
 |  |  
 |