|
@@ -75,7 +75,7 @@ renderOn: html
|
|
onClick: [self browser selectClass: self theClass].
|
|
onClick: [self browser selectClass: self theClass].
|
|
li asJQuery html: self label.
|
|
li asJQuery html: self label.
|
|
|
|
|
|
- self browser selectedClass = self theClass ifTrue: [
|
|
|
|
|
|
+ self browser selectedClass = self theClass ifTrue: [
|
|
cssClass := cssClass, ' selected'].
|
|
cssClass := cssClass, ' selected'].
|
|
|
|
|
|
self theClass comment isEmpty ifFalse: [
|
|
self theClass comment isEmpty ifFalse: [
|
|
@@ -242,7 +242,7 @@ doIt
|
|
!
|
|
!
|
|
|
|
|
|
eval: aString
|
|
eval: aString
|
|
- | compiler |
|
|
|
|
|
|
+ | compiler |
|
|
compiler := Compiler new.
|
|
compiler := Compiler new.
|
|
[ compiler parseExpression: aString ] on: Error do: [:ex |
|
|
[ compiler parseExpression: aString ] on: Error do: [:ex |
|
|
^window alert: ex messageText].
|
|
^window alert: ex messageText].
|
|
@@ -783,7 +783,7 @@ addNewClass
|
|
className := window prompt: 'New class'.
|
|
className := window prompt: 'New class'.
|
|
(className notNil and: [className notEmpty]) ifTrue: [
|
|
(className notNil and: [className notEmpty]) ifTrue: [
|
|
Object subclass: className instanceVariableNames: '' package: self selectedPackage.
|
|
Object subclass: className instanceVariableNames: '' package: self selectedPackage.
|
|
- self
|
|
|
|
|
|
+ self
|
|
resetClassesList;
|
|
resetClassesList;
|
|
updateClassesList.
|
|
updateClassesList.
|
|
self selectClass: (Smalltalk current at: className)]
|
|
self selectClass: (Smalltalk current at: className)]
|
|
@@ -806,12 +806,12 @@ cancelChanges
|
|
commitPackage
|
|
commitPackage
|
|
selectedPackage ifNotNil: [ |package|
|
|
selectedPackage ifNotNil: [ |package|
|
|
package := Package named: selectedPackage.
|
|
package := Package named: selectedPackage.
|
|
- { Exporter -> (package commitPathJs, '/', selectedPackage, '.js').
|
|
|
|
|
|
+ { Exporter -> (package commitPathJs, '/', selectedPackage, '.js').
|
|
StrippedExporter -> (package commitPathJs, '/', selectedPackage, '.deploy.js').
|
|
StrippedExporter -> (package commitPathJs, '/', selectedPackage, '.deploy.js').
|
|
- ChunkExporter -> (package commitPathSt, '/', selectedPackage, '.st')
|
|
|
|
|
|
+ ChunkExporter -> (package commitPathSt, '/', selectedPackage, '.st')
|
|
} do: [:commitStrategy| |fileContents|
|
|
} do: [:commitStrategy| |fileContents|
|
|
fileContents := (commitStrategy key new exportPackage: selectedPackage).
|
|
fileContents := (commitStrategy key new exportPackage: selectedPackage).
|
|
- self ajaxPutAt: commitStrategy value data: fileContents
|
|
|
|
|
|
+ self ajaxPutAt: commitStrategy value data: fileContents
|
|
]
|
|
]
|
|
]
|
|
]
|
|
!
|
|
!
|
|
@@ -863,8 +863,8 @@ compileMethodDefinitionFor: aClass
|
|
compiler currentClass: aClass.
|
|
compiler currentClass: aClass.
|
|
method := compiler eval: (compiler compileNode: node).
|
|
method := compiler eval: (compiler compileNode: node).
|
|
compiler unknownVariables do: [:each |
|
|
compiler unknownVariables do: [:each |
|
|
- "Do not try to redeclare javascript's objects"
|
|
|
|
- (window at: each) ifNil: [
|
|
|
|
|
|
+ "Do not try to redeclare javascript's objects"
|
|
|
|
+ (window at: each) ifNil: [
|
|
(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
|
|
(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
|
|
self addInstanceVariableNamed: each toClass: aClass.
|
|
self addInstanceVariableNamed: each toClass: aClass.
|
|
^self compileMethodDefinitionFor: aClass]]].
|
|
^self compileMethodDefinitionFor: aClass]]].
|
|
@@ -878,7 +878,7 @@ copyClass
|
|
className := window prompt: 'Copy class'.
|
|
className := window prompt: 'Copy class'.
|
|
(className notNil and: [className notEmpty]) ifTrue: [
|
|
(className notNil and: [className notEmpty]) ifTrue: [
|
|
ClassBuilder new copyClass: self selectedClass named: className.
|
|
ClassBuilder new copyClass: self selectedClass named: className.
|
|
- self
|
|
|
|
|
|
+ self
|
|
resetClassesList;
|
|
resetClassesList;
|
|
updateClassesList.
|
|
updateClassesList.
|
|
self selectClass: (Smalltalk current at: className)]
|
|
self selectClass: (Smalltalk current at: className)]
|
|
@@ -891,7 +891,7 @@ disableSaveButton
|
|
!
|
|
!
|
|
|
|
|
|
handleSourceAreaKeyDown: anEvent
|
|
handleSourceAreaKeyDown: anEvent
|
|
- <if(anEvent.ctrlKey) {
|
|
|
|
|
|
+ <if(anEvent.ctrlKey) {
|
|
if(anEvent.keyCode === 83) { //ctrl+s
|
|
if(anEvent.keyCode === 83) { //ctrl+s
|
|
self._compile();
|
|
self._compile();
|
|
anEvent.preventDefault();
|
|
anEvent.preventDefault();
|
|
@@ -974,7 +974,7 @@ searchReferencesOf: aString
|
|
selectCategory: aCategory
|
|
selectCategory: aCategory
|
|
self cancelChanges ifTrue: [
|
|
self cancelChanges ifTrue: [
|
|
selectedPackage := aCategory.
|
|
selectedPackage := aCategory.
|
|
- selectedClass := selectedProtocol := selectedMethod := nil.
|
|
|
|
|
|
+ selectedClass := selectedProtocol := selectedMethod := nil.
|
|
self resetClassesList.
|
|
self resetClassesList.
|
|
self
|
|
self
|
|
updateCategoriesList;
|
|
updateCategoriesList;
|
|
@@ -1056,7 +1056,7 @@ initialize
|
|
|
|
|
|
ajaxPutAt: aURL data: aString
|
|
ajaxPutAt: aURL data: aString
|
|
jQuery
|
|
jQuery
|
|
- ajax: aURL options: #{ 'type' -> 'PUT'.
|
|
|
|
|
|
+ ajax: aURL options: #{ 'type' -> 'PUT'.
|
|
'data' -> aString.
|
|
'data' -> aString.
|
|
'contentType' -> 'text/plain;charset=UTF-8'.
|
|
'contentType' -> 'text/plain;charset=UTF-8'.
|
|
'error' -> [:xhr | window alert: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"'] }
|
|
'error' -> [:xhr | window alert: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"'] }
|
|
@@ -1444,7 +1444,7 @@ renderButtonsOn: html
|
|
class: 'amber_button debugger inspect';
|
|
class: 'amber_button debugger inspect';
|
|
with: 'Inspect';
|
|
with: 'Inspect';
|
|
onClick: [self inspectSelectedVariable].
|
|
onClick: [self inspectSelectedVariable].
|
|
- self
|
|
|
|
|
|
+ self
|
|
updateSourceArea;
|
|
updateSourceArea;
|
|
updateStatus;
|
|
updateStatus;
|
|
updateVariablesList;
|
|
updateVariablesList;
|
|
@@ -1493,7 +1493,7 @@ updateInspector
|
|
!
|
|
!
|
|
|
|
|
|
updateSourceArea
|
|
updateSourceArea
|
|
- sourceArea val: self source
|
|
|
|
|
|
+ sourceArea val: self source
|
|
!
|
|
!
|
|
|
|
|
|
updateStatus
|
|
updateStatus
|