Преглед на файлове

No need for #debugCase.

After 0.26.0 error handling reform
and uncaughts now in node as well,
original runCase is good enough.
Herby Vojčík преди 4 години
родител
ревизия
8f95e2aa59
променени са 3 файла, в които са добавени 31 реда и са изтрити 19 реда
  1. 1 1
      package.json
  2. 29 17
      src/IDE.js
  3. 1 1
      src/IDE.st

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
   },
   "dependencies": {
     "@ambers/contrib-web": ">=0.7.3",
-    "@ambers/lang": ">0.25.3",
+    "@ambers/lang": ">=0.26.0",
     "codemirror": ">=5.44.0",
     "jquery-ui-dist": ">=1.9.2",
     "require-css": "^0.1.10"

+ 29 - 17
src/IDE.js

@@ -1,7 +1,7 @@
 define(["amber/boot", "require", "amber/core/Kernel-Objects", "amber/web/Web"], function($boot,requirejs){"use strict";
 var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 var $pkg = $core.addPackage("IDE");
-$pkg.innerEval = function (expr) { return eval(expr); };
+$pkg.context = function () { return {codeMirrorLib:codeMirrorLib}; };
 $pkg.imports = ["codeMirrorLib=codemirror/lib/codemirror", "amber/core/Platform-Services", "amber/web/Web-JQuery", "codemirror/addon/hint/show-hint", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"];
 //>>excludeStart("imports", pragmas.excludeImports);
 var codeMirrorLib;
@@ -9,7 +9,8 @@ $pkg.isReady = new Promise(function (resolve, reject) { requirejs(["codemirror/l
 //>>excludeEnd("imports");
 $pkg.transport = {"type":"amd","amdNamespace":"amber/legacy"};
 
-$core.addClass("ClassesList", $globals.Widget, ["browser", "ul", "nodes"], "IDE");
+$core.addClass("ClassesList", $globals.Widget, "IDE");
+$core.setSlots($globals.ClassesList, ["browser", "ul", "nodes"]);
 $core.addMethod(
 $core.method({
 selector: "browser",
@@ -377,7 +378,7 @@ return $recv($1)._yourself();
 $globals.ClassesList.a$cls);
 
 
-$core.addClass("DebugErrorHandler", $globals.Object, [], "IDE");
+$core.addClass("DebugErrorHandler", $globals.Object, "IDE");
 $core.addMethod(
 $core.method({
 selector: "handleError:",
@@ -457,7 +458,8 @@ return self;
 $globals.DebugErrorHandler.a$cls);
 
 
-$core.addClass("ProgressBar", $globals.Widget, ["percent", "progressDiv", "div"], "IDE");
+$core.addClass("ProgressBar", $globals.Widget, "IDE");
+$core.setSlots($globals.ProgressBar, ["percent", "progressDiv", "div"]);
 $core.addMethod(
 $core.method({
 selector: "percent",
@@ -600,7 +602,8 @@ $globals.ProgressBar);
 
 
 
-$core.addClass("SourceArea", $globals.Widget, ["editor", "div", "receiver", "onDoIt"], "IDE");
+$core.addClass("SourceArea", $globals.Widget, "IDE");
+$core.setSlots($globals.SourceArea, ["editor", "div", "receiver", "onDoIt"]);
 $core.addMethod(
 $core.method({
 selector: "clear",
@@ -1339,7 +1342,8 @@ return self;
 $globals.SourceArea.a$cls);
 
 
-$core.addClass("TabManager", $globals.Widget, ["selectedTab", "tabs", "opened", "ul", "input"], "IDE");
+$core.addClass("TabManager", $globals.Widget, "IDE");
+$core.setSlots($globals.TabManager, ["selectedTab", "tabs", "opened", "ul", "input"]);
 $core.addMethod(
 $core.method({
 selector: "addTab:",
@@ -2375,7 +2379,8 @@ return self;
 $globals.TabManager.a$cls);
 
 
-$core.addClass("TabWidget", $globals.Widget, ["div"], "IDE");
+$core.addClass("TabWidget", $globals.Widget, "IDE");
+$core.setSlots($globals.TabWidget, ["div"]);
 $core.addMethod(
 $core.method({
 selector: "canBeClosed",
@@ -2722,7 +2727,8 @@ return $recv($self._new())._open();
 $globals.TabWidget.a$cls);
 
 
-$core.addClass("Browser", $globals.TabWidget, ["selectedPackage", "selectedClass", "selectedProtocol", "selectedMethod", "packagesList", "classesList", "protocolsList", "methodsList", "sourceArea", "tabsList", "selectedTab", "saveButton", "classButtons", "methodButtons", "unsavedChanges"], "IDE");
+$core.addClass("Browser", $globals.TabWidget, "IDE");
+$core.setSlots($globals.Browser, ["selectedPackage", "selectedClass", "selectedProtocol", "selectedMethod", "packagesList", "classesList", "protocolsList", "methodsList", "sourceArea", "tabsList", "selectedTab", "saveButton", "classButtons", "methodButtons", "unsavedChanges"]);
 $core.addMethod(
 $core.method({
 selector: "addNewClass",
@@ -5606,7 +5612,8 @@ return $recv($1)._selectClass_(aClass);
 $globals.Browser.a$cls);
 
 
-$core.addClass("Debugger", $globals.TabWidget, ["error", "selectedContext", "sourceArea", "ul", "ul2", "inspector", "saveButton", "unsavedChanges", "selectedVariable", "selectedVariableName", "inspectButton"], "IDE");
+$core.addClass("Debugger", $globals.TabWidget, "IDE");
+$core.setSlots($globals.Debugger, ["error", "selectedContext", "sourceArea", "ul", "ul2", "inspector", "saveButton", "unsavedChanges", "selectedVariable", "selectedVariableName", "inspectButton"]);
 $core.addMethod(
 $core.method({
 selector: "allVariables",
@@ -6630,7 +6637,8 @@ $globals.Debugger);
 
 
 
-$core.addClass("IDEInspector", $globals.TabWidget, ["label", "variables", "object", "selectedVariable", "variablesList", "valueTextarea", "diveButton", "sourceArea"], "IDE");
+$core.addClass("IDEInspector", $globals.TabWidget, "IDE");
+$core.setSlots($globals.IDEInspector, ["label", "variables", "object", "selectedVariable", "variablesList", "valueTextarea", "diveButton", "sourceArea"]);
 $core.addMethod(
 $core.method({
 selector: "canBeClosed",
@@ -7411,7 +7419,8 @@ return $recv($1)._yourself();
 $globals.IDEInspector.a$cls);
 
 
-$core.addClass("IDETranscript", $globals.TabWidget, ["textarea"], "IDE");
+$core.addClass("IDETranscript", $globals.TabWidget, "IDE");
+$core.setSlots($globals.IDETranscript, ["textarea"]);
 $core.addMethod(
 $core.method({
 selector: "clear",
@@ -7727,7 +7736,8 @@ return self;
 $globals.IDETranscript.a$cls);
 
 
-$core.addClass("ReferencesBrowser", $globals.TabWidget, ["implementors", "senders", "implementorsList", "input", "timer", "selector", "sendersList", "referencedClasses", "referencedClassesList", "matches", "matchesList"], "IDE");
+$core.addClass("ReferencesBrowser", $globals.TabWidget, "IDE");
+$core.setSlots($globals.ReferencesBrowser, ["implementors", "senders", "implementorsList", "input", "timer", "selector", "sendersList", "referencedClasses", "referencedClassesList", "matches", "matchesList"]);
 $core.addMethod(
 $core.method({
 selector: "canBeClosed",
@@ -8783,7 +8793,8 @@ return $recv($1)._open();
 $globals.ReferencesBrowser.a$cls);
 
 
-$core.addClass("TestRunner", $globals.TabWidget, ["selectedCategories", "packagesList", "selectedClasses", "classesList", "selectedMethods", "progressBar", "methodsList", "result", "statusDiv"], "IDE");
+$core.addClass("TestRunner", $globals.TabWidget, "IDE");
+$core.setSlots($globals.TestRunner, ["selectedCategories", "packagesList", "selectedClasses", "classesList", "selectedMethods", "progressBar", "methodsList", "result", "statusDiv"]);
 $core.addMethod(
 $core.method({
 selector: "allClasses",
@@ -9001,17 +9012,17 @@ selector: "performFailure:",
 protocol: "actions",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aTestCase"],
-source: "performFailure: aTestCase\x0a\x09aTestCase debugCase",
+source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["debugCase"]
+messageSends: ["runCase"]
 }, function ($methodClass){ return function (aTestCase){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(aTestCase)._debugCase();
+$recv(aTestCase)._runCase();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase})});
@@ -9962,7 +9973,8 @@ $globals.TestRunner);
 
 
 
-$core.addClass("Workspace", $globals.TabWidget, ["sourceArea"], "IDE");
+$core.addClass("Workspace", $globals.TabWidget, "IDE");
+$core.setSlots($globals.Workspace, ["sourceArea"]);
 $core.addMethod(
 $core.method({
 selector: "clearWorkspace",

+ 1 - 1
src/IDE.st

@@ -1952,7 +1952,7 @@ testCases
 !TestRunner methodsFor: 'actions'!
 
 performFailure: aTestCase
-	aTestCase debugCase
+	aTestCase runCase
 !
 
 run: aCollection