|
@@ -79,55 +79,65 @@ selector: "getNodes",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-var classes,children,others;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$2;
|
|
|
|
-$1=$self._browser();
|
|
|
|
|
|
+return $recv($globals.ClassBuilder)._sortClasses_($recv($self._browser())._classes());
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-$ctx1.sendIdx["browser"]=1;
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"getNodes",{})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-classes=$recv($1)._classes();
|
|
|
|
-children=[];
|
|
|
|
-others=[];
|
|
|
|
-$recv(classes)._do_((function(each){
|
|
|
|
|
|
+},
|
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
+args: [],
|
|
|
|
+source: "getNodes\x0a\x09^ ClassBuilder sortClasses: self browser classes",
|
|
|
|
+referencedClasses: ["ClassBuilder"],
|
|
|
|
+//>>excludeEnd("ide");
|
|
|
|
+pragmas: [],
|
|
|
|
+messageSends: ["sortClasses:", "classes", "browser"]
|
|
|
|
+}),
|
|
|
|
+$globals.ClassesList);
|
|
|
|
+
|
|
|
|
+$core.addMethod(
|
|
|
|
+$core.method({
|
|
|
|
+selector: "labelOf:level:",
|
|
|
|
+protocol: "rendering",
|
|
|
|
+fn: function (aClass,anInteger){
|
|
|
|
+var self=this,$self=this;
|
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
+//>>excludeEnd("ctx");
|
|
|
|
+return $recv($globals.String)._streamContents_((function(str){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$2=$recv(classes)._includes_($recv(each)._superclass());
|
|
|
|
-if($core.assert($2)){
|
|
|
|
-return $recv(others)._add_(each);
|
|
|
|
-} else {
|
|
|
|
-return $recv(children)._add_(each);
|
|
|
|
|
|
+$recv(anInteger)._timesRepeat_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-$ctx2.sendIdx["add:"]=1;
|
|
|
|
|
|
+return $core.withContext(function($ctx3) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-}
|
|
|
|
|
|
+return $recv(str)._nextPutAll_(" ");
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
|
|
|
|
+$ctx3.sendIdx["nextPutAll:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-}));
|
|
|
|
-return $recv(children)._collect_((function(each){
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,$self._browser(),others,(0));
|
|
|
|
|
|
+}));
|
|
|
|
+return $recv(str)._nextPutAll_($recv(aClass)._name());
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"labelOf:level:",{aClass:aClass,anInteger:anInteger})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-args: [],
|
|
|
|
-source: "getNodes\x0a\x09| classes children others |\x0a\x09classes := self browser classes.\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [ :each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [ children add: each ]\x0a\x09\x09\x09ifTrue: [ others add: each ]].\x0a\x09^ children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: 0 ]",
|
|
|
|
-referencedClasses: ["ClassesListNode"],
|
|
|
|
|
|
+args: ["aClass", "anInteger"],
|
|
|
|
+source: "labelOf: aClass level: anInteger\x0a\x09^ String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: ' ' ].\x0a\x09\x09str nextPutAll: aClass name ]",
|
|
|
|
+referencedClasses: ["String"],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"]
|
|
|
|
|
|
+messageSends: ["streamContents:", "timesRepeat:", "nextPutAll:", "name"]
|
|
}),
|
|
}),
|
|
$globals.ClassesList);
|
|
$globals.ClassesList);
|
|
|
|
|
|
@@ -165,461 +175,218 @@ $globals.ClassesList);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "renderOn:",
|
|
|
|
|
|
+selector: "renderNode:level:on:",
|
|
protocol: "rendering",
|
|
protocol: "rendering",
|
|
-fn: function (html){
|
|
|
|
|
|
+fn: function (aClassAndSubclasses,anInteger,html){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
|
|
+var cssClass,aClass;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$recv(html)._ul();
|
|
|
|
-$recv($1)._class_("amber_column browser classes");
|
|
|
|
-$self.ul=$recv($1)._yourself();
|
|
|
|
-$self._updateNodes();
|
|
|
|
-return self;
|
|
|
|
|
|
+var $3,$2,$1,$4;
|
|
|
|
+cssClass="";
|
|
|
|
+aClass=$recv(aClassAndSubclasses)._first();
|
|
|
|
+$3=$self._browser();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html})});
|
|
|
|
|
|
+$ctx1.sendIdx["browser"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: ["html"],
|
|
|
|
-source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: ["class:", "ul", "yourself", "updateNodes"]
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesList);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "resetNodes",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-$self.nodes=nil;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: [],
|
|
|
|
-source: "resetNodes\x0a\x09nodes := nil",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: []
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesList);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "updateNodes",
|
|
|
|
-protocol: "rendering",
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
|
|
+$2=$recv($3)._selectedClass();
|
|
|
|
+$1=$recv($2).__eq(aClass);
|
|
|
|
+if($core.assert($1)){
|
|
|
|
+cssClass=$recv(cssClass).__comma(" selected");
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
|
|
+$ctx1.sendIdx[","]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$recv($self.ul)._contents_((function(html){
|
|
|
|
|
|
+cssClass;
|
|
|
|
+}
|
|
|
|
+$recv($recv(aClass)._comment())._ifNotEmpty_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv($self._nodes())._do_((function(each){
|
|
|
|
|
|
+cssClass=$recv(cssClass).__comma(" commented");
|
|
|
|
+return cssClass;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-return $core.withContext(function($ctx3) {
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv(each)._renderOn_(html);
|
|
|
|
|
|
+}));
|
|
|
|
+$4=$recv(html)._li();
|
|
|
|
+$recv($4)._class_(cssClass);
|
|
|
|
+$recv($4)._onClick_((function(){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
|
|
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-}));
|
|
|
|
|
|
+return $recv($self._browser())._selectClass_(aClass);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
-return self;
|
|
|
|
|
|
+$recv($4)._in_((function(li){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"updateNodes",{})});
|
|
|
|
|
|
+return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: [],
|
|
|
|
-source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: ["contents:", "do:", "nodes", "renderOn:"]
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesList);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "on:",
|
|
|
|
-protocol: "instance creation",
|
|
|
|
-fn: function (aBrowser){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
|
|
+return $recv($recv(li)._asJQuery())._html_($self._labelOf_level_(aClass,anInteger));
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-return $core.withContext(function($ctx1) {
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({li:li},$ctx1,4)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-$1=$self._new();
|
|
|
|
-$recv($1)._browser_(aBrowser);
|
|
|
|
-return $recv($1)._yourself();
|
|
|
|
|
|
+}));
|
|
|
|
+$self._renderNodes_level_on_($recv(aClassAndSubclasses)._second(),$recv(anInteger).__plus((1)),html);
|
|
|
|
+return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"renderNode:level:on:",{aClassAndSubclasses:aClassAndSubclasses,anInteger:anInteger,html:html,cssClass:cssClass,aClass:aClass})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-args: ["aBrowser"],
|
|
|
|
-source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: ["browser:", "new", "yourself"]
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesList.a$cls);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-$core.addClass("ClassesListNode", $globals.Widget, ["browser", "theClass", "level", "nodes"], "IDE");
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "browser",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-return $self.browser;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: [],
|
|
|
|
-source: "browser\x0a\x09^ browser",
|
|
|
|
|
|
+args: ["aClassAndSubclasses", "anInteger", "html"],
|
|
|
|
+source: "renderNode: aClassAndSubclasses level: anInteger on: html\x0a\x09| cssClass aClass |\x0a\x09cssClass := ''.\x0a\x09aClass := aClassAndSubclasses first.\x0a\x09self browser selectedClass = aClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected' ].\x0a\x0a\x09aClass comment ifNotEmpty: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x0a\x09html li\x0a\x09\x09class: cssClass;\x0a\x09\x09onClick: [ self browser selectClass: aClass ];\x0a\x09\x09in: [ :li | li asJQuery html: (self labelOf: aClass level: anInteger) ].\x0a\x0a\x09self renderNodes: aClassAndSubclasses second level: anInteger + 1 on: html",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: []
|
|
|
|
|
|
+messageSends: ["first", "ifTrue:", "=", "selectedClass", "browser", ",", "ifNotEmpty:", "comment", "class:", "li", "onClick:", "selectClass:", "in:", "html:", "asJQuery", "labelOf:level:", "renderNodes:level:on:", "second", "+"]
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "browser:",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (aBrowser){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-$self.browser=aBrowser;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: ["aBrowser"],
|
|
|
|
-source: "browser: aBrowser\x0a\x09browser := aBrowser",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: []
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesListNode);
|
|
|
|
|
|
+$globals.ClassesList);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "getNodesFrom:",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (aCollection){
|
|
|
|
|
|
+selector: "renderNodes:level:on:",
|
|
|
|
+protocol: "rendering",
|
|
|
|
+fn: function (aCollection,anInteger,html){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-var children,others;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1;
|
|
|
|
-children=[];
|
|
|
|
-others=[];
|
|
|
|
$recv(aCollection)._do_((function(each){
|
|
$recv(aCollection)._do_((function(each){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-$1=$recv($recv(each)._superclass()).__eq($self._theClass());
|
|
|
|
-if($core.assert($1)){
|
|
|
|
-return $recv(children)._add_(each);
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx2.sendIdx["add:"]=1;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-} else {
|
|
|
|
-return $recv(others)._add_(each);
|
|
|
|
-}
|
|
|
|
|
|
+return $self._renderNode_level_on_(each,anInteger,html);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
-$self.nodes=$recv(children)._collect_((function(each){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,$self._browser(),others,$recv($self._level()).__plus((1)));
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}));
|
|
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"renderNodes:level:on:",{aCollection:aCollection,anInteger:anInteger,html:html})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-args: ["aCollection"],
|
|
|
|
-source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [ :each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [ children add: each ]\x0a\x09\x09\x09ifFalse: [ others add: each ]].\x0a\x09nodes:= children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: self level + 1 ]",
|
|
|
|
-referencedClasses: ["ClassesListNode"],
|
|
|
|
|
|
+args: ["aCollection", "anInteger", "html"],
|
|
|
|
+source: "renderNodes: aCollection level: anInteger on: html\x0a\x09aCollection do: [ :each |\x0a\x09\x09self renderNode: each level: anInteger on: html ]",
|
|
|
|
+referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"]
|
|
|
|
|
|
+messageSends: ["do:", "renderNode:level:on:"]
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode);
|
|
|
|
|
|
+$globals.ClassesList);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "label",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (){
|
|
|
|
|
|
+selector: "renderOn:",
|
|
|
|
+protocol: "rendering",
|
|
|
|
+fn: function (html){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-var str;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-str=$recv($recv($globals.String)._new())._writeStream();
|
|
|
|
-$recv($self._level())._timesRepeat_((function(){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-return $recv(str)._nextPutAll_(" ");
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx2.sendIdx["nextPutAll:"]=1;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}));
|
|
|
|
-$recv(str)._nextPutAll_($recv($self._theClass())._name());
|
|
|
|
-return $recv(str)._contents();
|
|
|
|
|
|
+var $1;
|
|
|
|
+$1=$recv(html)._ul();
|
|
|
|
+$recv($1)._class_("amber_column browser classes");
|
|
|
|
+$self.ul=$recv($1)._yourself();
|
|
|
|
+$self._updateNodes();
|
|
|
|
+return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"label",{str:str})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-args: [],
|
|
|
|
-source: "label\x0a\x09| str |\x0a\x09str := String new writeStream.\x0a\x09self level timesRepeat: [\x0a\x09\x09str nextPutAll: ' ' ].\x0a\x09str nextPutAll: self theClass name.\x0a\x09^ str contents",
|
|
|
|
-referencedClasses: ["String"],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"]
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesListNode);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "level",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-return $self.level;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: [],
|
|
|
|
-source: "level\x0a\x09^ level",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: []
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesListNode);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "level:",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (anInteger){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-$self.level=anInteger;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: ["anInteger"],
|
|
|
|
-source: "level: anInteger\x0a\x09level := anInteger",
|
|
|
|
|
|
+args: ["html"],
|
|
|
|
+source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: []
|
|
|
|
|
|
+messageSends: ["class:", "ul", "yourself", "updateNodes"]
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode);
|
|
|
|
|
|
+$globals.ClassesList);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "nodes",
|
|
|
|
|
|
+selector: "resetNodes",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-return $self.nodes;
|
|
|
|
|
|
+$self.nodes=nil;
|
|
|
|
+return self;
|
|
|
|
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "nodes\x0a\x09^ nodes",
|
|
|
|
|
|
+source: "resetNodes\x0a\x09nodes := nil",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
messageSends: []
|
|
messageSends: []
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode);
|
|
|
|
|
|
+$globals.ClassesList);
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "renderOn:",
|
|
|
|
|
|
+selector: "updateNodes",
|
|
protocol: "rendering",
|
|
protocol: "rendering",
|
|
-fn: function (html){
|
|
|
|
|
|
+fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-var li,cssClass;
|
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$2,$4,$5,$3;
|
|
|
|
-cssClass="";
|
|
|
|
-li=$recv($recv(html)._li())._onClick_((function(){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-$1=$self._browser();
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx2.sendIdx["browser"]=1;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-$2=$self._theClass();
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx2.sendIdx["theClass"]=1;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-return $recv($1)._selectClass_($2);
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}));
|
|
|
|
-$recv($recv(li)._asJQuery())._html_($self._label());
|
|
|
|
-$4=$recv($self._browser())._selectedClass();
|
|
|
|
-$5=$self._theClass();
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx1.sendIdx["theClass"]=2;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-$3=$recv($4).__eq($5);
|
|
|
|
-if($core.assert($3)){
|
|
|
|
-cssClass=$recv(cssClass).__comma(" selected");
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-$ctx1.sendIdx[","]=1;
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-cssClass;
|
|
|
|
-}
|
|
|
|
-$recv($recv($self._theClass())._comment())._ifNotEmpty_((function(){
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-return $core.withContext(function($ctx2) {
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-cssClass=$recv(cssClass).__comma(" commented");
|
|
|
|
-return cssClass;
|
|
|
|
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
|
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
|
|
|
|
-//>>excludeEnd("ctx");
|
|
|
|
-}));
|
|
|
|
-$recv(li)._class_(cssClass);
|
|
|
|
-$recv($self._nodes())._do_((function(each){
|
|
|
|
|
|
+$recv($self.ul)._contents_((function(html){
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx2) {
|
|
return $core.withContext(function($ctx2) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-return $recv(each)._renderOn_(html);
|
|
|
|
|
|
+return $self._renderNodes_level_on_($self._nodes(),(0),html);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
|
|
|
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
}));
|
|
}));
|
|
return self;
|
|
return self;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"updateNodes",{})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: ["html"],
|
|
|
|
-source: "renderOn: html\x0a\x09| li cssClass |\x0a\x09cssClass := ''.\x0a\x09li := html li\x0a\x09\x09onClick: [ self browser selectClass: self theClass ].\x0a\x09li asJQuery html: self label.\x0a\x0a\x09self browser selectedClass = self theClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected' ].\x0a\x0a\x09self theClass comment ifNotEmpty: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifNotEmpty:", "comment", "class:", "do:", "nodes", "renderOn:"]
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesListNode);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "theClass",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-return $self.theClass;
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: [],
|
|
args: [],
|
|
-source: "theClass\x0a\x09^ theClass",
|
|
|
|
-referencedClasses: [],
|
|
|
|
-//>>excludeEnd("ide");
|
|
|
|
-pragmas: [],
|
|
|
|
-messageSends: []
|
|
|
|
-}),
|
|
|
|
-$globals.ClassesListNode);
|
|
|
|
-
|
|
|
|
-$core.addMethod(
|
|
|
|
-$core.method({
|
|
|
|
-selector: "theClass:",
|
|
|
|
-protocol: "accessing",
|
|
|
|
-fn: function (aClass){
|
|
|
|
-var self=this,$self=this;
|
|
|
|
-$self.theClass=aClass;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-},
|
|
|
|
-//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
|
-args: ["aClass"],
|
|
|
|
-source: "theClass: aClass\x0a\x09theClass := aClass",
|
|
|
|
|
|
+source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderNodes: self nodes level: 0 on: html ]",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: []
|
|
|
|
|
|
+messageSends: ["contents:", "renderNodes:level:on:", "nodes"]
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode);
|
|
|
|
|
|
+$globals.ClassesList);
|
|
|
|
|
|
|
|
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
-selector: "on:browser:classes:level:",
|
|
|
|
|
|
+selector: "on:",
|
|
protocol: "instance creation",
|
|
protocol: "instance creation",
|
|
-fn: function (aClass,aBrowser,aCollection,anInteger){
|
|
|
|
|
|
+fn: function (aBrowser){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
var $1;
|
|
var $1;
|
|
$1=$self._new();
|
|
$1=$self._new();
|
|
-$recv($1)._theClass_(aClass);
|
|
|
|
$recv($1)._browser_(aBrowser);
|
|
$recv($1)._browser_(aBrowser);
|
|
-$recv($1)._level_(anInteger);
|
|
|
|
-$recv($1)._getNodesFrom_(aCollection);
|
|
|
|
return $recv($1)._yourself();
|
|
return $recv($1)._yourself();
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
-}, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger})});
|
|
|
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser})});
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
-args: ["aClass", "aBrowser", "aCollection", "anInteger"],
|
|
|
|
-source: "on: aClass browser: aBrowser classes: aCollection level: anInteger\x0a\x09^ self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09browser: aBrowser;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
|
|
|
|
|
|
+args: ["aBrowser"],
|
|
|
|
+source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
pragmas: [],
|
|
pragmas: [],
|
|
-messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"]
|
|
|
|
|
|
+messageSends: ["browser:", "new", "yourself"]
|
|
}),
|
|
}),
|
|
-$globals.ClassesListNode.a$cls);
|
|
|
|
|
|
+$globals.ClassesList.a$cls);
|
|
|
|
|
|
|
|
|
|
$core.addClass("DebugErrorHandler", $globals.Object, [], "IDE");
|
|
$core.addClass("DebugErrorHandler", $globals.Object, [], "IDE");
|