|
@@ -6,29 +6,24 @@ Widget subclass: #TabManager
|
|
|
|
|
|
tabs
|
|
tabs
|
|
^tabs ifNil: [tabs := Array new]
|
|
^tabs ifNil: [tabs := Array new]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabManager methodsFor: 'actions'!
|
|
!TabManager methodsFor: 'actions'!
|
|
|
|
|
|
updateBodyMargin
|
|
updateBodyMargin
|
|
self setBodyMargin: '#jtalk' asJQuery height + 27
|
|
self setBodyMargin: '#jtalk' asJQuery height + 27
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updatePosition
|
|
updatePosition
|
|
{'jQuery(''#jtalk'').css(''top'', '''''').css(''bottom'', ''27px'');'}
|
|
{'jQuery(''#jtalk'').css(''top'', '''''').css(''bottom'', ''27px'');'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
removeBodyMargin
|
|
removeBodyMargin
|
|
self setBodyMargin: 0
|
|
self setBodyMargin: 0
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
setBodyMargin: anInteger
|
|
setBodyMargin: anInteger
|
|
'.jtalkBody' asJQuery cssAt: 'margin-bottom' put: anInteger asString, 'px'
|
|
'.jtalkBody' asJQuery cssAt: 'margin-bottom' put: anInteger asString, 'px'
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
onResize: aBlock
|
|
onResize: aBlock
|
|
@@ -37,12 +32,10 @@ onResize: aBlock
|
|
resize: aBlock,
|
|
resize: aBlock,
|
|
minHeight: 230
|
|
minHeight: 230
|
|
});'}
|
|
});'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
onWindowResize: aBlock
|
|
onWindowResize: aBlock
|
|
{'jQuery(window).resize(aBlock)'}
|
|
{'jQuery(window).resize(aBlock)'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
open
|
|
open
|
|
@@ -53,7 +46,6 @@ open
|
|
self updateBodyMargin.
|
|
self updateBodyMargin.
|
|
selectedTab root asJQuery show.
|
|
selectedTab root asJQuery show.
|
|
opened := true]
|
|
opened := true]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
close
|
|
close
|
|
@@ -63,12 +55,10 @@ close
|
|
self removeBodyMargin.
|
|
self removeBodyMargin.
|
|
'body' asJQuery removeClass: 'jtalkBody'.
|
|
'body' asJQuery removeClass: 'jtalkBody'.
|
|
opened := false]
|
|
opened := false]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
newBrowserTab
|
|
newBrowserTab
|
|
Browser open
|
|
Browser open
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectTab: aWidget
|
|
selectTab: aWidget
|
|
@@ -78,7 +68,6 @@ selectTab: aWidget
|
|
each root asJQuery hide].
|
|
each root asJQuery hide].
|
|
aWidget root asJQuery show.
|
|
aWidget root asJQuery show.
|
|
self update
|
|
self update
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
closeTab: aWidget
|
|
closeTab: aWidget
|
|
@@ -86,7 +75,6 @@ closeTab: aWidget
|
|
self selectTab: self tabs last.
|
|
self selectTab: self tabs last.
|
|
aWidget root asJQuery remove.
|
|
aWidget root asJQuery remove.
|
|
self update
|
|
self update
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabManager methodsFor: 'adding/Removing'!
|
|
!TabManager methodsFor: 'adding/Removing'!
|
|
@@ -95,13 +83,11 @@ addTab: aWidget
|
|
self tabs add: aWidget.
|
|
self tabs add: aWidget.
|
|
'#jtalk' asJQuery append: aWidget.
|
|
'#jtalk' asJQuery append: aWidget.
|
|
aWidget root asJQuery hide
|
|
aWidget root asJQuery hide
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
removeTab: aWidget
|
|
removeTab: aWidget
|
|
self tabs remove: aWidget.
|
|
self tabs remove: aWidget.
|
|
self update
|
|
self update
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabManager methodsFor: 'initialization'!
|
|
!TabManager methodsFor: 'initialization'!
|
|
@@ -120,7 +106,6 @@ initialize
|
|
self
|
|
self
|
|
onResize: [self updateBodyMargin; updatePosition];
|
|
onResize: [self updateBodyMargin; updatePosition];
|
|
onWindowResize: [self updatePosition]
|
|
onWindowResize: [self updatePosition]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabManager methodsFor: 'rendering'!
|
|
!TabManager methodsFor: 'rendering'!
|
|
@@ -139,7 +124,6 @@ renderOn: html
|
|
class: 'newtab';
|
|
class: 'newtab';
|
|
with: ' + ';
|
|
with: ' + ';
|
|
onClick: [self newBrowserTab]]
|
|
onClick: [self newBrowserTab]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderTabFor: aWidget on: html
|
|
renderTabFor: aWidget on: html
|
|
@@ -156,7 +140,6 @@ renderTabFor: aWidget on: html
|
|
class: 'close';
|
|
class: 'close';
|
|
with: 'x';
|
|
with: 'x';
|
|
onClick: [self closeTab: aWidget]]]
|
|
onClick: [self closeTab: aWidget]]]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
TabManager class instanceVariableNames: 'current'!
|
|
TabManager class instanceVariableNames: 'current'!
|
|
@@ -165,12 +148,10 @@ TabManager class instanceVariableNames: 'current'!
|
|
|
|
|
|
current
|
|
current
|
|
^current ifNil: [current := super new]
|
|
^current ifNil: [current := super new]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
new
|
|
new
|
|
self shouldNotImplement
|
|
self shouldNotImplement
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
Widget subclass: #TabWidget
|
|
Widget subclass: #TabWidget
|
|
@@ -181,7 +162,6 @@ Widget subclass: #TabWidget
|
|
|
|
|
|
label
|
|
label
|
|
self subclassResponsibility
|
|
self subclassResponsibility
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabWidget methodsFor: 'actions'!
|
|
!TabWidget methodsFor: 'actions'!
|
|
@@ -190,7 +170,6 @@ open
|
|
TabManager current
|
|
TabManager current
|
|
addTab: self;
|
|
addTab: self;
|
|
selectTab: self
|
|
selectTab: self
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabWidget methodsFor: 'rendering'!
|
|
!TabWidget methodsFor: 'rendering'!
|
|
@@ -205,29 +184,24 @@ renderOn: html
|
|
html div
|
|
html div
|
|
class: 'jt_buttons';
|
|
class: 'jt_buttons';
|
|
with: [self renderButtonsOn: html]]
|
|
with: [self renderButtonsOn: html]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderBoxOn: html
|
|
renderBoxOn: html
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderButtonsOn: html
|
|
renderButtonsOn: html
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabWidget methodsFor: 'testing'!
|
|
!TabWidget methodsFor: 'testing'!
|
|
|
|
|
|
canBeClosed
|
|
canBeClosed
|
|
^false
|
|
^false
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!TabWidget class methodsFor: 'instance creation'!
|
|
!TabWidget class methodsFor: 'instance creation'!
|
|
|
|
|
|
open
|
|
open
|
|
^self new open
|
|
^self new open
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
TabWidget subclass: #Workspace
|
|
TabWidget subclass: #Workspace
|
|
@@ -238,32 +212,26 @@ TabWidget subclass: #Workspace
|
|
|
|
|
|
label
|
|
label
|
|
^'[Workspace]'
|
|
^'[Workspace]'
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selection
|
|
selection
|
|
{'return document.selection'}
|
|
{'return document.selection'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectionStart
|
|
selectionStart
|
|
{'return jQuery(''.jt_workspace'')[0].selectionStart'}
|
|
{'return jQuery(''.jt_workspace'')[0].selectionStart'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectionEnd
|
|
selectionEnd
|
|
{'return jQuery(''.jt_workspace'')[0].selectionEnd'}
|
|
{'return jQuery(''.jt_workspace'')[0].selectionEnd'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectionStart: anInteger
|
|
selectionStart: anInteger
|
|
{'jQuery(''.jt_workspace'')[0].selectionStart = anInteger'}
|
|
{'jQuery(''.jt_workspace'')[0].selectionStart = anInteger'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectionEnd: anInteger
|
|
selectionEnd: anInteger
|
|
{'jQuery(''.jt_workspace'')[0].selectionEnd = anInteger'}
|
|
{'jQuery(''.jt_workspace'')[0].selectionEnd = anInteger'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
currentLine
|
|
currentLine
|
|
@@ -276,7 +244,6 @@ currentLine
|
|
endLine >= self selectionStart ifTrue: [
|
|
endLine >= self selectionStart ifTrue: [
|
|
self selectionEnd: endLine.
|
|
self selectionEnd: endLine.
|
|
^each]]
|
|
^each]]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Workspace methodsFor: 'actions'!
|
|
!Workspace methodsFor: 'actions'!
|
|
@@ -299,12 +266,10 @@ handleKeyDown: anEvent
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}'}
|
|
}'}
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
clearWorkspace
|
|
clearWorkspace
|
|
textarea asJQuery val: ''
|
|
textarea asJQuery val: ''
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
doIt
|
|
doIt
|
|
@@ -319,7 +284,6 @@ doIt
|
|
|
|
|
|
printIt
|
|
printIt
|
|
self print: self doIt printString
|
|
self print: self doIt printString
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
print: aString
|
|
print: aString
|
|
@@ -331,7 +295,6 @@ print: aString
|
|
(textarea asJQuery val copyFrom: start + 1 to: textarea asJQuery val size)).
|
|
(textarea asJQuery val copyFrom: start + 1 to: textarea asJQuery val size)).
|
|
self selectionStart: start.
|
|
self selectionStart: start.
|
|
self selectionEnd: start + aString size + 2
|
|
self selectionEnd: start + aString size + 2
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
eval: aString
|
|
eval: aString
|
|
@@ -341,12 +304,10 @@ eval: aString
|
|
node isParseFailure ifTrue: [
|
|
node isParseFailure ifTrue: [
|
|
^self alert: node reason, ', position: ', node position].
|
|
^self alert: node reason, ', position: ', node position].
|
|
^compiler loadExpression: aString
|
|
^compiler loadExpression: aString
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
inspectIt
|
|
inspectIt
|
|
self doIt inspect
|
|
self doIt inspect
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Workspace methodsFor: 'rendering'!
|
|
!Workspace methodsFor: 'rendering'!
|
|
@@ -358,7 +319,6 @@ renderBoxOn: html
|
|
textarea
|
|
textarea
|
|
class: 'jt_workspace';
|
|
class: 'jt_workspace';
|
|
at: 'spellcheck' put: 'false'
|
|
at: 'spellcheck' put: 'false'
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderButtonsOn: html
|
|
renderButtonsOn: html
|
|
@@ -377,7 +337,6 @@ renderButtonsOn: html
|
|
html button
|
|
html button
|
|
with: 'Clear workspace';
|
|
with: 'Clear workspace';
|
|
onClick: [self clearWorkspace]
|
|
onClick: [self clearWorkspace]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
TabWidget subclass: #Transcript
|
|
TabWidget subclass: #Transcript
|
|
@@ -388,25 +347,20 @@ TabWidget subclass: #Transcript
|
|
|
|
|
|
label
|
|
label
|
|
^'[Transcript]'
|
|
^'[Transcript]'
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Transcript methodsFor: 'actions'!
|
|
!Transcript methodsFor: 'actions'!
|
|
|
|
|
|
show: anObject
|
|
show: anObject
|
|
textarea asJQuery val: textarea asJQuery val, anObject asString.
|
|
textarea asJQuery val: textarea asJQuery val, anObject asString.
|
|
-
|
|
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
cr
|
|
cr
|
|
textarea asJQuery val: textarea asJQuery val, String cr.
|
|
textarea asJQuery val: textarea asJQuery val, String cr.
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
clear
|
|
clear
|
|
textarea asJQuery val: ''
|
|
textarea asJQuery val: ''
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Transcript methodsFor: 'rendering'!
|
|
!Transcript methodsFor: 'rendering'!
|
|
@@ -417,14 +371,12 @@ renderBoxOn: html
|
|
textarea
|
|
textarea
|
|
class: 'jt_transcript';
|
|
class: 'jt_transcript';
|
|
at: 'spellcheck' put: 'false'
|
|
at: 'spellcheck' put: 'false'
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderButtonsOn: html
|
|
renderButtonsOn: html
|
|
html button
|
|
html button
|
|
with: 'Clear transcript';
|
|
with: 'Clear transcript';
|
|
onClick: [self clear]
|
|
onClick: [self clear]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
Transcript class instanceVariableNames: 'current'!
|
|
Transcript class instanceVariableNames: 'current'!
|
|
@@ -433,34 +385,28 @@ Transcript class instanceVariableNames: 'current'!
|
|
|
|
|
|
open
|
|
open
|
|
self current open
|
|
self current open
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
new
|
|
new
|
|
self shouldNotImplement
|
|
self shouldNotImplement
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
current
|
|
current
|
|
^current ifNil: [current := super new]
|
|
^current ifNil: [current := super new]
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Transcript class methodsFor: 'printing'!
|
|
!Transcript class methodsFor: 'printing'!
|
|
|
|
|
|
show: anObject
|
|
show: anObject
|
|
self current show: anObject
|
|
self current show: anObject
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
cr
|
|
cr
|
|
self current show: String cr
|
|
self current show: String cr
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
clear
|
|
clear
|
|
self current clear
|
|
self current clear
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
TabWidget subclass: #Browser
|
|
TabWidget subclass: #Browser
|
|
@@ -473,7 +419,6 @@ label
|
|
^selectedClass
|
|
^selectedClass
|
|
ifNil: ['Browser (nil)']
|
|
ifNil: ['Browser (nil)']
|
|
ifNotNil: [selectedClass name]
|
|
ifNotNil: [selectedClass name]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
categories
|
|
categories
|
|
@@ -483,14 +428,12 @@ categories
|
|
(categories includes: each category) ifFalse: [
|
|
(categories includes: each category) ifFalse: [
|
|
categories add: each category]].
|
|
categories add: each category]].
|
|
^categories sort
|
|
^categories sort
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
classes
|
|
classes
|
|
^(Smalltalk current classes
|
|
^(Smalltalk current classes
|
|
select: [:each | each category = selectedCategory])
|
|
select: [:each | each category = selectedCategory])
|
|
sort: [:a :b | a name > b name]
|
|
sort: [:a :b | a name > b name]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
protocols
|
|
protocols
|
|
@@ -521,7 +464,6 @@ methods
|
|
ifNotNil: [
|
|
ifNotNil: [
|
|
klass methodDictionary values select: [:each |
|
|
klass methodDictionary values select: [:each |
|
|
each category = selectedProtocol]]) sort: [:a :b | a selector > b selector]
|
|
each category = selectedProtocol]]) sort: [:a :b | a selector > b selector]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
source
|
|
source
|
|
@@ -532,14 +474,12 @@ source
|
|
^selectedClass
|
|
^selectedClass
|
|
ifNil: ['']
|
|
ifNil: ['']
|
|
ifNotNil: [self classCommentSource]
|
|
ifNotNil: [self classCommentSource]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
methodSource
|
|
methodSource
|
|
^selectedMethod
|
|
^selectedMethod
|
|
ifNil: [self dummyMethodSource]
|
|
ifNil: [self dummyMethodSource]
|
|
ifNotNil: [selectedMethod source]
|
|
ifNotNil: [selectedMethod source]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
dummyMethodSource
|
|
dummyMethodSource
|
|
@@ -548,14 +488,12 @@ dummyMethodSource
|
|
|
|
|
|
| temporary variable names |
|
|
| temporary variable names |
|
|
statements'
|
|
statements'
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
declarationSource
|
|
declarationSource
|
|
^selectedTab = #instance
|
|
^selectedTab = #instance
|
|
ifTrue: [self classDeclarationSource]
|
|
ifTrue: [self classDeclarationSource]
|
|
ifFalse: [self metaclassDeclarationSource]
|
|
ifFalse: [self metaclassDeclarationSource]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
classDeclarationSource
|
|
classDeclarationSource
|
|
@@ -577,7 +515,6 @@ classDeclarationSource
|
|
nextPutAll: selectedClass category;
|
|
nextPutAll: selectedClass category;
|
|
nextPutAll: ''''].
|
|
nextPutAll: ''''].
|
|
^stream contents
|
|
^stream contents
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
metaclassDeclarationSource
|
|
metaclassDeclarationSource
|
|
@@ -593,12 +530,10 @@ metaclassDeclarationSource
|
|
separatedBy: [stream nextPutAll: ' '].
|
|
separatedBy: [stream nextPutAll: ' '].
|
|
stream nextPutAll: ''''].
|
|
stream nextPutAll: ''''].
|
|
^stream contents
|
|
^stream contents
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
classCommentSource
|
|
classCommentSource
|
|
^selectedClass comment
|
|
^selectedClass comment
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Browser methodsFor: 'actions'!
|
|
!Browser methodsFor: 'actions'!
|
|
@@ -606,34 +541,28 @@ classCommentSource
|
|
enableSaveButton
|
|
enableSaveButton
|
|
saveButton removeAt: 'disabled'.
|
|
saveButton removeAt: 'disabled'.
|
|
unsavedChanges := true
|
|
unsavedChanges := true
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
disableSaveButton
|
|
disableSaveButton
|
|
saveButton ifNotNil: [
|
|
saveButton ifNotNil: [
|
|
saveButton at: 'disabled' put: true].
|
|
saveButton at: 'disabled' put: true].
|
|
unsavedChanges := false
|
|
unsavedChanges := false
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
hideClassButtons
|
|
hideClassButtons
|
|
classButtons asJQuery hide
|
|
classButtons asJQuery hide
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
showClassButtons
|
|
showClassButtons
|
|
classButtons asJQuery show
|
|
classButtons asJQuery show
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
hideMethodButtons
|
|
hideMethodButtons
|
|
methodButtons asJQuery hide
|
|
methodButtons asJQuery hide
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
showMethodButtons
|
|
showMethodButtons
|
|
methodButtons asJQuery show
|
|
methodButtons asJQuery show
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
compile
|
|
compile
|
|
@@ -644,19 +573,16 @@ compile
|
|
(selectedProtocol notNil or: [selectedMethod notNil])
|
|
(selectedProtocol notNil or: [selectedMethod notNil])
|
|
ifFalse: [self compileDefinition]
|
|
ifFalse: [self compileDefinition]
|
|
ifTrue: [self compileMethodDefinition]
|
|
ifTrue: [self compileMethodDefinition]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
compileClassComment
|
|
compileClassComment
|
|
selectedClass comment: sourceTextarea asJQuery val
|
|
selectedClass comment: sourceTextarea asJQuery val
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
compileMethodDefinition
|
|
compileMethodDefinition
|
|
selectedTab = #instance
|
|
selectedTab = #instance
|
|
ifTrue: [self compileMethodDefinitionFor: selectedClass]
|
|
ifTrue: [self compileMethodDefinitionFor: selectedClass]
|
|
ifFalse: [self compileMethodDefinitionFor: selectedClass class]
|
|
ifFalse: [self compileMethodDefinitionFor: selectedClass class]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
compileMethodDefinitionFor: aClass
|
|
compileMethodDefinitionFor: aClass
|
|
@@ -677,7 +603,6 @@ compileMethodDefinitionFor: aClass
|
|
aClass addCompiledMethod: method.
|
|
aClass addCompiledMethod: method.
|
|
self updateMethodsList.
|
|
self updateMethodsList.
|
|
self selectMethod: method
|
|
self selectMethod: method
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
compileDefinition
|
|
compileDefinition
|
|
@@ -686,7 +611,6 @@ compileDefinition
|
|
self
|
|
self
|
|
updateCategoriesList;
|
|
updateCategoriesList;
|
|
updateClassesList
|
|
updateClassesList
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
commitCategory
|
|
commitCategory
|
|
@@ -701,14 +625,12 @@ commitCategory
|
|
at: 'data' put: (ChunkExporter new exportCategory: selectedCategory);
|
|
at: 'data' put: (ChunkExporter new exportCategory: selectedCategory);
|
|
at: 'error' put: [self alert: 'Commit failed!!'];
|
|
at: 'error' put: [self alert: 'Commit failed!!'];
|
|
send]
|
|
send]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
cancelChanges
|
|
cancelChanges
|
|
^unsavedChanges
|
|
^unsavedChanges
|
|
ifTrue: [self confirm: 'Cancel changes?']
|
|
ifTrue: [self confirm: 'Cancel changes?']
|
|
ifFalse: [true]
|
|
ifFalse: [true]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
removeClass
|
|
removeClass
|
|
@@ -716,7 +638,6 @@ removeClass
|
|
ifTrue: [
|
|
ifTrue: [
|
|
Smalltalk current basicDelete: selectedClass name.
|
|
Smalltalk current basicDelete: selectedClass name.
|
|
self selectClass: nil]
|
|
self selectClass: nil]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
removeMethod
|
|
removeMethod
|
|
@@ -727,7 +648,6 @@ removeMethod
|
|
ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
|
|
ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
|
|
ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].
|
|
ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].
|
|
self selectMethod: nil]]
|
|
self selectMethod: nil]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
setMethodProtocol: aString
|
|
setMethodProtocol: aString
|
|
@@ -742,7 +662,6 @@ setMethodProtocol: aString
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList;
|
|
updateMethodsList;
|
|
updateSourceAndButtons]]
|
|
updateSourceAndButtons]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
addNewProtocol
|
|
addNewProtocol
|
|
@@ -751,7 +670,6 @@ addNewProtocol
|
|
newProtocol notEmpty ifTrue: [
|
|
newProtocol notEmpty ifTrue: [
|
|
selectedMethod category: newProtocol.
|
|
selectedMethod category: newProtocol.
|
|
self setMethodProtocol: newProtocol]
|
|
self setMethodProtocol: newProtocol]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectCategory: aCategory
|
|
selectCategory: aCategory
|
|
@@ -764,7 +682,6 @@ selectCategory: aCategory
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList;
|
|
updateMethodsList;
|
|
updateSourceAndButtons]
|
|
updateSourceAndButtons]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectClass: aClass
|
|
selectClass: aClass
|
|
@@ -776,7 +693,6 @@ selectClass: aClass
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList;
|
|
updateMethodsList;
|
|
updateSourceAndButtons]
|
|
updateSourceAndButtons]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectProtocol: aString
|
|
selectProtocol: aString
|
|
@@ -787,7 +703,6 @@ selectProtocol: aString
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList;
|
|
updateMethodsList;
|
|
updateSourceAndButtons]
|
|
updateSourceAndButtons]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectMethod: aMethod
|
|
selectMethod: aMethod
|
|
@@ -797,7 +712,6 @@ selectMethod: aMethod
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList;
|
|
updateMethodsList;
|
|
updateSourceAndButtons]
|
|
updateSourceAndButtons]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
selectTab: aString
|
|
selectTab: aString
|
|
@@ -805,7 +719,6 @@ selectTab: aString
|
|
selectedTab := aString.
|
|
selectedTab := aString.
|
|
self selectProtocol: nil.
|
|
self selectProtocol: nil.
|
|
self updateTabsList]
|
|
self updateTabsList]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renameClass
|
|
renameClass
|
|
@@ -816,7 +729,6 @@ renameClass
|
|
self
|
|
self
|
|
updateClassesList;
|
|
updateClassesList;
|
|
updateSourceAndButtons]
|
|
updateSourceAndButtons]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
addInstanceVariableNamed: aString toClass: aClass
|
|
addInstanceVariableNamed: aString toClass: aClass
|
|
@@ -838,7 +750,6 @@ initialize
|
|
super initialize.
|
|
super initialize.
|
|
selectedTab := #instance.
|
|
selectedTab := #instance.
|
|
unsavedChanges := false
|
|
unsavedChanges := false
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Browser methodsFor: 'rendering'!
|
|
!Browser methodsFor: 'rendering'!
|
|
@@ -848,7 +759,6 @@ renderBoxOn: html
|
|
renderTopPanelOn: html;
|
|
renderTopPanelOn: html;
|
|
renderTabsOn: html;
|
|
renderTabsOn: html;
|
|
renderBottomPanelOn: html
|
|
renderBottomPanelOn: html
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderTopPanelOn: html
|
|
renderTopPanelOn: html
|
|
@@ -870,13 +780,11 @@ renderTopPanelOn: html
|
|
updateProtocolsList;
|
|
updateProtocolsList;
|
|
updateMethodsList.
|
|
updateMethodsList.
|
|
html div class: 'jt_clear']
|
|
html div class: 'jt_clear']
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderTabsOn: html
|
|
renderTabsOn: html
|
|
tabsList := html ul class: 'jt_tabs'.
|
|
tabsList := html ul class: 'jt_tabs'.
|
|
self updateTabsList.
|
|
self updateTabsList.
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderBottomPanelOn: html
|
|
renderBottomPanelOn: html
|
|
@@ -888,7 +796,6 @@ renderBottomPanelOn: html
|
|
class: 'source';
|
|
class: 'source';
|
|
at: 'spellcheck' put: 'false'.
|
|
at: 'spellcheck' put: 'false'.
|
|
sourceTextarea asJQuery call: 'tabby']
|
|
sourceTextarea asJQuery call: 'tabby']
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderButtonsOn: html
|
|
renderButtonsOn: html
|
|
@@ -899,14 +806,12 @@ renderButtonsOn: html
|
|
methodButtons := html span.
|
|
methodButtons := html span.
|
|
classButtons := html span.
|
|
classButtons := html span.
|
|
self updateSourceAndButtons
|
|
self updateSourceAndButtons
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Browser methodsFor: 'testing'!
|
|
!Browser methodsFor: 'testing'!
|
|
|
|
|
|
canBeClosed
|
|
canBeClosed
|
|
^true
|
|
^true
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Browser methodsFor: 'updating'!
|
|
!Browser methodsFor: 'updating'!
|
|
@@ -923,7 +828,6 @@ updateCategoriesList
|
|
li
|
|
li
|
|
with: label;
|
|
with: label;
|
|
onClick: [self selectCategory: each]]]
|
|
onClick: [self selectCategory: each]]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updateClassesList
|
|
updateClassesList
|
|
@@ -936,7 +840,6 @@ updateClassesList
|
|
li
|
|
li
|
|
with: each name;
|
|
with: each name;
|
|
onClick: [self selectClass: each]]]
|
|
onClick: [self selectClass: each]]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updateProtocolsList
|
|
updateProtocolsList
|
|
@@ -948,7 +851,6 @@ updateProtocolsList
|
|
li
|
|
li
|
|
with: each;
|
|
with: each;
|
|
onClick: [self selectProtocol: each]]]
|
|
onClick: [self selectProtocol: each]]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updateMethodsList
|
|
updateMethodsList
|
|
@@ -960,7 +862,6 @@ updateMethodsList
|
|
li
|
|
li
|
|
with: each selector;
|
|
with: each selector;
|
|
onClick: [self selectMethod: each]]]
|
|
onClick: [self selectMethod: each]]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updateTabsList
|
|
updateTabsList
|
|
@@ -980,7 +881,6 @@ updateTabsList
|
|
li
|
|
li
|
|
with: 'Comment';
|
|
with: 'Comment';
|
|
onClick: [self selectTab: #comment]]
|
|
onClick: [self selectTab: #comment]]
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
updateSourceAndButtons
|
|
updateSourceAndButtons
|
|
@@ -1032,7 +932,6 @@ updateSourceAndButtons
|
|
self hideClassButtons.
|
|
self hideClassButtons.
|
|
self showMethodButtons].
|
|
self showMethodButtons].
|
|
sourceTextarea asJQuery val: self source
|
|
sourceTextarea asJQuery val: self source
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Browser class methodsFor: 'accessing'!
|
|
!Browser class methodsFor: 'accessing'!
|
|
@@ -1052,12 +951,10 @@ openOn: aClass
|
|
open;
|
|
open;
|
|
selectCategory: aClass category;
|
|
selectCategory: aClass category;
|
|
selectClass: aClass
|
|
selectClass: aClass
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
open
|
|
open
|
|
self new open
|
|
self new open
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
TabWidget subclass: #Inspector
|
|
TabWidget subclass: #Inspector
|
|
@@ -1127,7 +1024,6 @@ renderTopPanelOn: html
|
|
updateVariablesList;
|
|
updateVariablesList;
|
|
updateValueTextarea.
|
|
updateValueTextarea.
|
|
html div class: 'jt_clear']
|
|
html div class: 'jt_clear']
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderBottomPanelOn: html
|
|
renderBottomPanelOn: html
|
|
@@ -1138,7 +1034,6 @@ renderBottomPanelOn: html
|
|
class: 'source';
|
|
class: 'source';
|
|
at: 'spellcheck' put: 'false'.
|
|
at: 'spellcheck' put: 'false'.
|
|
workspaceTextarea asJQuery call: 'tabby']
|
|
workspaceTextarea asJQuery call: 'tabby']
|
|
-
|
|
|
|
!
|
|
!
|
|
|
|
|
|
renderButtonsOn: html
|
|
renderButtonsOn: html
|
|
@@ -1149,7 +1044,6 @@ renderButtonsOn: html
|
|
with: 'Dive';
|
|
with: 'Dive';
|
|
onClick: [self dive].
|
|
onClick: [self dive].
|
|
self updateButtons
|
|
self updateButtons
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Inspector methodsFor: 'testing'!
|
|
!Inspector methodsFor: 'testing'!
|
|
@@ -1189,7 +1083,6 @@ updateButtons
|
|
(self selectedVariable notNil and: [(self variables at: self selectedVariable) notNil])
|
|
(self selectedVariable notNil and: [(self variables at: self selectedVariable) notNil])
|
|
ifFalse: [diveButton at: 'disabled' put: true]
|
|
ifFalse: [diveButton at: 'disabled' put: true]
|
|
ifTrue: [diveButton removeAt: 'disabled']
|
|
ifTrue: [diveButton removeAt: 'disabled']
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Inspector class methodsFor: 'instance creation'!
|
|
!Inspector class methodsFor: 'instance creation'!
|
|
@@ -1394,8 +1287,6 @@ inspectOn: anInspector
|
|
anInspector
|
|
anInspector
|
|
setLabel: self printString;
|
|
setLabel: self printString;
|
|
setVariables: variables
|
|
setVariables: variables
|
|
-
|
|
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Date methodsFor: '*IDE'!
|
|
!Date methodsFor: '*IDE'!
|
|
@@ -1414,8 +1305,6 @@ inspectOn: anInspector
|
|
anInspector
|
|
anInspector
|
|
setLabel: self printString;
|
|
setLabel: self printString;
|
|
setVariables: variables
|
|
setVariables: variables
|
|
-
|
|
|
|
-
|
|
|
|
! !
|
|
! !
|
|
|
|
|
|
!Collection methodsFor: '*IDE'!
|
|
!Collection methodsFor: '*IDE'!
|