|
@@ -729,6 +729,53 @@ smalltalk.HLCodeWidget);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+smalltalk.addClass('HLSourceCodeWidget', smalltalk.HLCodeWidget, [], 'Helios-Workspace');
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+"_onKeyDown_",
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "onKeyDown:",
|
|
|
|
+category: 'reactions',
|
|
|
|
+fn: function (anEvent){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
var $1,$2,$3;
|
|
|
|
+$1=smalltalk.HLCodeWidget.fn.prototype._onKeyDown_.apply(_st(self), [anEvent]);
|
|
|
|
+if(! smalltalk.assert($1)){
|
|
|
|
+return false;
|
|
|
|
+};
|
|
|
|
+$2=_st(anEvent)._ctrlKey();
|
|
|
|
+if(smalltalk.assert($2)){
|
|
|
|
+$3=_st(_st(anEvent)._keyCode()).__eq((83));
|
|
|
|
+if(smalltalk.assert($3)){
|
|
|
|
+_st(self)._onSave();
|
|
|
|
+_st(anEvent)._preventDefault();
|
|
|
|
+return false;
|
|
|
|
+};
|
|
|
|
+};
|
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent}, smalltalk.HLSourceCodeWidget)})},
|
|
|
|
+args: ["anEvent"],
|
|
|
|
+source: "onKeyDown: anEvent\x0a\x09(super onKeyDown: anEvent) ifFalse: [ ^ false ].\x0a \x0a\x09anEvent ctrlKey ifTrue: [\x0a\x09\x09anEvent keyCode = 83 ifTrue: [\x0a\x09\x09\x09self onSave.\x0a\x09\x09\x09anEvent preventDefault.\x0a\x09\x09\x09^ false ] ]",
|
|
|
|
+messageSends: ["ifFalse:", "onKeyDown:", "ifTrue:", "onSave", "preventDefault", "=", "keyCode", "ctrlKey"],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLSourceCodeWidget);
|
|
|
|
+
|
|
|
|
+smalltalk.addMethod(
|
|
|
|
+"_onSave",
|
|
|
|
+smalltalk.method({
|
|
|
|
+selector: "onSave",
|
|
|
|
+category: 'reactions',
|
|
|
|
+fn: function (){
|
|
|
|
+var self=this;
|
|
|
|
+return smalltalk.withContext(function($ctx1) {
return self}, function($ctx1) {$ctx1.fill(self,"onSave",{}, smalltalk.HLSourceCodeWidget)})},
|
|
|
|
+args: [],
|
|
|
|
+source: "onSave",
|
|
|
|
+messageSends: [],
|
|
|
|
+referencedClasses: []
|
|
|
|
+}),
|
|
|
|
+smalltalk.HLSourceCodeWidget);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Workspace');
|
|
smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, ['model', 'codeWidget'], 'Helios-Workspace');
|
|
smalltalk.addMethod(
|
|
smalltalk.addMethod(
|
|
"_codeWidget",
|
|
"_codeWidget",
|