Skip to content

Commit

Permalink
Split Helios-Core into Helios-Core and Helios-Environments
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasPetton committed Nov 6, 2012
1 parent 2f77965 commit d57aff1
Show file tree
Hide file tree
Showing 7 changed files with 410 additions and 407 deletions.
2 changes: 1 addition & 1 deletion helios.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</head>
<body>

<script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Commands', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Workspace', 'Helios-Inspector', 'Helios-Announcements']}) </script>
<script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Environments', 'Helios-Commands', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Workspace', 'Helios-Inspector', 'Helios-Announcements']}) </script>

</body>
</html>
131 changes: 0 additions & 131 deletions js/Helios-Core.deploy.js
Original file line number Diff line number Diff line change
@@ -1,135 +1,4 @@
smalltalk.addPackage('Helios-Core', {});
smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Core');
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
fn: function (someCode, aReceiver) {
var self = this;
var $1;
$1 = smalltalk.send(self, "_subclassResponsibility", []);
return $1;
}
}),
smalltalk.HLEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
fn: function () {
var self = this;
var $1;
$1 = smalltalk.send(self, "_subclassResponsibility", []);
return $1;
}
}),
smalltalk.HLEnvironment);



smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
fn: function (someCode, aReceiver) {
var self = this;
var $1, $2;
var $early = {};
try {
var compiler;
compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [someCode]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
$2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [someCode]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [aReceiver, []]);
return $2;
} catch (e) {
if (e === $early) {
return e[0];
}
throw e;
}
}
}),
smalltalk.HLLocalEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
fn: function () {
var self = this;
var $1;
$1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packages", []);
return $1;
}
}),
smalltalk.HLLocalEnvironment);



smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
fn: function (someCode, aReceiver) {
var self = this;
smalltalk.send(self, "_notYetImplemented", []);
return self;
}
}),
smalltalk.HLRemoteEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
fn: function () {
var self = this;
return self;
}
}),
smalltalk.HLRemoteEnvironment);



smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Core');
smalltalk.addMethod(
"_doesNotUnderstand_",
smalltalk.method({
selector: "doesNotUnderstand:",
fn: function (aMessage) {
var self = this;
return self;
}
}),
smalltalk.HLRemoteObject);

smalltalk.addMethod(
"_inspectOn_",
smalltalk.method({
selector: "inspectOn:",
fn: function (anInspector) {
var self = this;
return self;
}
}),
smalltalk.HLRemoteObject);

smalltalk.addMethod(
"_printString",
smalltalk.method({
selector: "printString",
fn: function () {
var self = this;
return "this is a remote object";
}
}),
smalltalk.HLRemoteObject);



smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
smalltalk.addMethod(
"_clear",
Expand Down
178 changes: 0 additions & 178 deletions js/Helios-Core.js
Original file line number Diff line number Diff line change
@@ -1,182 +1,4 @@
smalltalk.addPackage('Helios-Core', {});
smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Core');
smalltalk.HLEnvironment.comment="Abstract class defining common behavior for local and remote environments"
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
category: 'actions',
fn: function (someCode, aReceiver) {
var self = this;
var $1;
$1 = smalltalk.send(self, "_subclassResponsibility", []);
return $1;
},
args: ["someCode", "aReceiver"],
source: "eval: someCode on: aReceiver\x0a\x0a\x09^ self subclassResponsibility",
messageSends: ["subclassResponsibility"],
referencedClasses: []
}),
smalltalk.HLEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
category: 'accessing',
fn: function () {
var self = this;
var $1;
$1 = smalltalk.send(self, "_subclassResponsibility", []);
return $1;
},
args: [],
source: "packages\x0a\x0a\x09^ self subclassResponsibility",
messageSends: ["subclassResponsibility"],
referencedClasses: []
}),
smalltalk.HLEnvironment);



smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
category: 'actions',
fn: function (someCode, aReceiver) {
var self = this;
var $1, $2;
var $early = {};
try {
var compiler;
compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [someCode]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
$2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [someCode]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [aReceiver, []]);
return $2;
} catch (e) {
if (e === $early) {
return e[0];
}
throw e;
}
},
args: ["someCode", "aReceiver"],
source: "eval: someCode on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: someCode] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', someCode, '] value' forClass: DoIt)) fn applyTo: aReceiver arguments: #()",
messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "fn", "eval:", "compile:forClass:", ","],
referencedClasses: ["Compiler", "Error", "DoIt"]
}),
smalltalk.HLLocalEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
category: 'accessing',
fn: function () {
var self = this;
var $1;
$1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packages", []);
return $1;
},
args: [],
source: "packages\x0a\x0a\x09^ Smalltalk current packages",
messageSends: ["packages", "current"],
referencedClasses: ["Smalltalk"]
}),
smalltalk.HLLocalEnvironment);



smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Core');
smalltalk.addMethod(
"_eval_on_",
smalltalk.method({
selector: "eval:on:",
category: 'actions',
fn: function (someCode, aReceiver) {
var self = this;
smalltalk.send(self, "_notYetImplemented", []);
return self;
},
args: ["someCode", "aReceiver"],
source: "eval: someCode on: aReceiver\x0a\x0a\x09\x22Note for future self and friends:\x0a whatever way this compilation happens on the other side, \x0a it should return a proxy to the remote resulting object\x22\x0a \x0a self notYetImplemented",
messageSends: ["notYetImplemented"],
referencedClasses: []
}),
smalltalk.HLRemoteEnvironment);

smalltalk.addMethod(
"_packages",
smalltalk.method({
selector: "packages",
category: 'accessing',
fn: function () {
var self = this;
return self;
},
args: [],
source: "packages\x0a\x09\x22Answer the remote environment's packages\x22\x0a \x0a\x09\x22to-do\x22\x0a \x0a \x22Note for future self and friends:\x0a the problem with remote stuff is that the answers shouldn't be expected to be\x0a received in a syncrhonous fashion. Everything network is asyc, so you *are going to deal with callbacks* here\x22",
messageSends: [],
referencedClasses: []
}),
smalltalk.HLRemoteEnvironment);



smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Core');
smalltalk.HLRemoteObject.comment="This is a local proxy to a remote object.\x0aTipically useful for evaluating and inspecting and interacting with instances of a remote VM.\x0a"
smalltalk.addMethod(
"_doesNotUnderstand_",
smalltalk.method({
selector: "doesNotUnderstand:",
category: 'actions',
fn: function (aMessage) {
var self = this;
return self;
},
args: ["aMessage"],
source: "doesNotUnderstand: aMessage\x0a\x0a\x09\x22to-do\x0a\x0a\x09aham, blah blah\x0a\x0a\x09super doesNotUnderstand: aMessage\x22",
messageSends: [],
referencedClasses: []
}),
smalltalk.HLRemoteObject);

smalltalk.addMethod(
"_inspectOn_",
smalltalk.method({
selector: "inspectOn:",
category: 'actions',
fn: function (anInspector) {
var self = this;
return self;
},
args: ["anInspector"],
source: "inspectOn: anInspector\x0a\x0a\x09\x22to-do\x22\x0a\x0a\x09\x22this is a source of so much fun...\x22\x0a",
messageSends: [],
referencedClasses: []
}),
smalltalk.HLRemoteObject);

smalltalk.addMethod(
"_printString",
smalltalk.method({
selector: "printString",
category: 'actions',
fn: function () {
var self = this;
return "this is a remote object";
},
args: [],
source: "printString\x0a\x09^ 'this is a remote object'",
messageSends: [],
referencedClasses: []
}),
smalltalk.HLRemoteObject);



smalltalk.addClass('HLSourceArea', smalltalk.Widget, ['editor', 'textarea', 'div', 'receiver', 'onDoIt'], 'Helios-Core');
smalltalk.addMethod(
"_clear",
Expand Down
Loading

0 comments on commit d57aff1

Please sign in to comment.