Helios-Inspector.deploy.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  1. smalltalk.addPackage('Helios-Inspector');
  2. smalltalk.addClass('HLInspector', smalltalk.HLWidget, ['model', 'variablesWidget', 'displayWidget', 'codeWidget', 'label'], 'Helios-Inspector');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "codeWidget",
  6. fn: function (){
  7. var self=this;
  8. function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  9. return smalltalk.withContext(function($ctx1) {
  10. var $2,$3,$4,$1;
  11. $2=self["@codeWidget"];
  12. if(($receiver = $2) == nil || $receiver == undefined){
  13. $3=_st($HLCodeWidget())._new();
  14. _st($3)._model_(_st(self["@model"])._code());
  15. _st($3)._receiver_(_st(self["@model"])._inspectee());
  16. $4=_st($3)._yourself();
  17. self["@codeWidget"]=$4;
  18. $1=self["@codeWidget"];
  19. } else {
  20. $1=$2;
  21. };
  22. return $1;
  23. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLInspector)})},
  24. messageSends: ["ifNil:", "model:", "code", "new", "receiver:", "inspectee", "yourself"]}),
  25. smalltalk.HLInspector);
  26. smalltalk.addMethod(
  27. smalltalk.method({
  28. selector: "displayWidget",
  29. fn: function (){
  30. var self=this;
  31. function $HLInspectorDisplayWidget(){return smalltalk.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
  32. return smalltalk.withContext(function($ctx1) {
  33. var $2,$3,$4,$1;
  34. $2=self["@displayWidget"];
  35. if(($receiver = $2) == nil || $receiver == undefined){
  36. $3=_st($HLInspectorDisplayWidget())._new();
  37. _st($3)._model_(_st(self)._model());
  38. $4=_st($3)._yourself();
  39. self["@displayWidget"]=$4;
  40. $1=self["@displayWidget"];
  41. } else {
  42. $1=$2;
  43. };
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},smalltalk.HLInspector)})},
  46. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  47. smalltalk.HLInspector);
  48. smalltalk.addMethod(
  49. smalltalk.method({
  50. selector: "initialize",
  51. fn: function (){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) {
  54. smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
  55. _st(self)._register();
  56. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector)})},
  57. messageSends: ["initialize", "register"]}),
  58. smalltalk.HLInspector);
  59. smalltalk.addMethod(
  60. smalltalk.method({
  61. selector: "inspect:",
  62. fn: function (anObject){
  63. var self=this;
  64. return smalltalk.withContext(function($ctx1) {
  65. var $1,$2;
  66. _st(_st(self)._model())._inspect_on_(anObject,self);
  67. $1=self;
  68. _st($1)._refreshVariablesWidget();
  69. $2=_st($1)._refreshDisplayWidget();
  70. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector)})},
  71. messageSends: ["inspect:on:", "model", "refreshVariablesWidget", "refreshDisplayWidget"]}),
  72. smalltalk.HLInspector);
  73. smalltalk.addMethod(
  74. smalltalk.method({
  75. selector: "inspectee",
  76. fn: function (){
  77. var self=this;
  78. return smalltalk.withContext(function($ctx1) {
  79. var $1;
  80. $1=_st(_st(self)._model())._inspectee();
  81. return $1;
  82. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspector)})},
  83. messageSends: ["inspectee", "model"]}),
  84. smalltalk.HLInspector);
  85. smalltalk.addMethod(
  86. smalltalk.method({
  87. selector: "inspectee:",
  88. fn: function (anObject){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) {
  91. _st(_st(self)._model())._inspectee_(anObject);
  92. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspector)})},
  93. messageSends: ["inspectee:", "model"]}),
  94. smalltalk.HLInspector);
  95. smalltalk.addMethod(
  96. smalltalk.method({
  97. selector: "label",
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) {
  101. var $2,$1;
  102. $2=self["@label"];
  103. if(($receiver = $2) == nil || $receiver == undefined){
  104. $1=_st(_st(self["@model"])._inspectee())._printString();
  105. } else {
  106. $1=$2;
  107. };
  108. return $1;
  109. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspector)})},
  110. messageSends: ["ifNil:", "printString", "inspectee"]}),
  111. smalltalk.HLInspector);
  112. smalltalk.addMethod(
  113. smalltalk.method({
  114. selector: "model",
  115. fn: function (){
  116. var self=this;
  117. function $HLInspectorModel(){return smalltalk.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
  118. return smalltalk.withContext(function($ctx1) {
  119. var $2,$1;
  120. $2=self["@model"];
  121. if(($receiver = $2) == nil || $receiver == undefined){
  122. _st(self)._model_(_st($HLInspectorModel())._new());
  123. $1=self["@model"];
  124. } else {
  125. $1=$2;
  126. };
  127. return $1;
  128. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspector)})},
  129. messageSends: ["ifNil:", "model:", "new"]}),
  130. smalltalk.HLInspector);
  131. smalltalk.addMethod(
  132. smalltalk.method({
  133. selector: "model:",
  134. fn: function (aModel){
  135. var self=this;
  136. return smalltalk.withContext(function($ctx1) {
  137. var $1,$2;
  138. self["@model"]=aModel;
  139. _st(_st(self)._codeWidget())._model_(_st(aModel)._code());
  140. $1=self;
  141. _st($1)._observeCodeWidget();
  142. _st($1)._observeVariablesWidget();
  143. $2=_st($1)._observeModel();
  144. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspector)})},
  145. messageSends: ["model:", "code", "codeWidget", "observeCodeWidget", "observeVariablesWidget", "observeModel"]}),
  146. smalltalk.HLInspector);
  147. smalltalk.addMethod(
  148. smalltalk.method({
  149. selector: "observeCodeWidget",
  150. fn: function (){
  151. var self=this;
  152. function $HLDoItExecuted(){return smalltalk.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  153. return smalltalk.withContext(function($ctx1) {
  154. _st(_st(_st(self)._codeWidget())._announcer())._on_do_($HLDoItExecuted(),(function(){
  155. return smalltalk.withContext(function($ctx2) {
  156. return _st(self)._onDoneIt();
  157. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  158. return self}, function($ctx1) {$ctx1.fill(self,"observeCodeWidget",{},smalltalk.HLInspector)})},
  159. messageSends: ["on:do:", "onDoneIt", "announcer", "codeWidget"]}),
  160. smalltalk.HLInspector);
  161. smalltalk.addMethod(
  162. smalltalk.method({
  163. selector: "observeModel",
  164. fn: function (){
  165. var self=this;
  166. function $HLInstanceVariableSelected(){return smalltalk.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  167. return smalltalk.withContext(function($ctx1) {
  168. _st(_st(_st(self)._model())._announcer())._on_send_to_($HLInstanceVariableSelected(),"onInstanceVariableSelected",self);
  169. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLInspector)})},
  170. messageSends: ["on:send:to:", "announcer", "model"]}),
  171. smalltalk.HLInspector);
  172. smalltalk.addMethod(
  173. smalltalk.method({
  174. selector: "observeVariablesWidget",
  175. fn: function (){
  176. var self=this;
  177. function $HLDiveRequested(){return smalltalk.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  178. return smalltalk.withContext(function($ctx1) {
  179. _st(_st(_st(self)._variablesWidget())._announcer())._on_do_($HLDiveRequested(),(function(){
  180. return smalltalk.withContext(function($ctx2) {
  181. return _st(self)._onDive();
  182. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  183. return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},smalltalk.HLInspector)})},
  184. messageSends: ["on:do:", "onDive", "announcer", "variablesWidget"]}),
  185. smalltalk.HLInspector);
  186. smalltalk.addMethod(
  187. smalltalk.method({
  188. selector: "onDive",
  189. fn: function (){
  190. var self=this;
  191. return smalltalk.withContext(function($ctx1) {
  192. _st(self)._inspect_(_st(_st(self)._model())._selectedInstVarObject());
  193. return self}, function($ctx1) {$ctx1.fill(self,"onDive",{},smalltalk.HLInspector)})},
  194. messageSends: ["inspect:", "selectedInstVarObject", "model"]}),
  195. smalltalk.HLInspector);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "onDoneIt",
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) {
  202. _st(self)._refresh();
  203. return self}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{},smalltalk.HLInspector)})},
  204. messageSends: ["refresh"]}),
  205. smalltalk.HLInspector);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "onInspectIt",
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. return self}, function($ctx1) {$ctx1.fill(self,"onInspectIt",{},smalltalk.HLInspector)})},
  213. messageSends: []}),
  214. smalltalk.HLInspector);
  215. smalltalk.addMethod(
  216. smalltalk.method({
  217. selector: "onInstanceVariableSelected",
  218. fn: function (){
  219. var self=this;
  220. return smalltalk.withContext(function($ctx1) {
  221. _st(_st(self)._codeWidget())._receiver_(_st(_st(self)._model())._selectedInstVarObject());
  222. _st(self)._refreshDisplayWidget();
  223. return self}, function($ctx1) {$ctx1.fill(self,"onInstanceVariableSelected",{},smalltalk.HLInspector)})},
  224. messageSends: ["receiver:", "selectedInstVarObject", "model", "codeWidget", "refreshDisplayWidget"]}),
  225. smalltalk.HLInspector);
  226. smalltalk.addMethod(
  227. smalltalk.method({
  228. selector: "onPrintIt",
  229. fn: function (){
  230. var self=this;
  231. return smalltalk.withContext(function($ctx1) {
  232. return self}, function($ctx1) {$ctx1.fill(self,"onPrintIt",{},smalltalk.HLInspector)})},
  233. messageSends: []}),
  234. smalltalk.HLInspector);
  235. smalltalk.addMethod(
  236. smalltalk.method({
  237. selector: "open",
  238. fn: function (){
  239. var self=this;
  240. function $HLTab(){return smalltalk.HLTab||(typeof HLTab=="undefined"?nil:HLTab)}
  241. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  242. return smalltalk.withContext(function($ctx1) {
  243. _st(_st($HLManager())._current())._addTab_(_st($HLTab())._on_labelled_(self,_st(self)._tabLabel()));
  244. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.HLInspector)})},
  245. messageSends: ["addTab:", "on:labelled:", "tabLabel", "current"]}),
  246. smalltalk.HLInspector);
  247. smalltalk.addMethod(
  248. smalltalk.method({
  249. selector: "refresh",
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. _st(self)._inspect_(_st(self)._inspectee());
  254. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspector)})},
  255. messageSends: ["inspect:", "inspectee"]}),
  256. smalltalk.HLInspector);
  257. smalltalk.addMethod(
  258. smalltalk.method({
  259. selector: "refreshDisplayWidget",
  260. fn: function (){
  261. var self=this;
  262. return smalltalk.withContext(function($ctx1) {
  263. _st(_st(self)._displayWidget())._refresh();
  264. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},smalltalk.HLInspector)})},
  265. messageSends: ["refresh", "displayWidget"]}),
  266. smalltalk.HLInspector);
  267. smalltalk.addMethod(
  268. smalltalk.method({
  269. selector: "refreshVariablesWidget",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) {
  273. _st(_st(self)._variablesWidget())._refresh();
  274. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},smalltalk.HLInspector)})},
  275. messageSends: ["refresh", "variablesWidget"]}),
  276. smalltalk.HLInspector);
  277. smalltalk.addMethod(
  278. smalltalk.method({
  279. selector: "register",
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.withContext(function($ctx1) {
  283. _st(_st(self)._class())._register_(self);
  284. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLInspector)})},
  285. messageSends: ["register:", "class"]}),
  286. smalltalk.HLInspector);
  287. smalltalk.addMethod(
  288. smalltalk.method({
  289. selector: "renderContentOn:",
  290. fn: function (html){
  291. var self=this;
  292. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  293. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  294. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  295. return smalltalk.withContext(function($ctx1) {
  296. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st(self)._variablesWidget(),_st(self)._displayWidget()),_st(self)._codeWidget())));
  297. _st(_st(self)._variablesWidget())._focus();
  298. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
  299. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"]}),
  300. smalltalk.HLInspector);
  301. smalltalk.addMethod(
  302. smalltalk.method({
  303. selector: "setLabel:",
  304. fn: function (aString){
  305. var self=this;
  306. return smalltalk.withContext(function($ctx1) {
  307. self["@label"]=aString;
  308. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.HLInspector)})},
  309. messageSends: []}),
  310. smalltalk.HLInspector);
  311. smalltalk.addMethod(
  312. smalltalk.method({
  313. selector: "setVariables:",
  314. fn: function (aDictionary){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) {
  317. _st(_st(self)._model())._variables_(aDictionary);
  318. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},smalltalk.HLInspector)})},
  319. messageSends: ["variables:", "model"]}),
  320. smalltalk.HLInspector);
  321. smalltalk.addMethod(
  322. smalltalk.method({
  323. selector: "tabLabel",
  324. fn: function (){
  325. var self=this;
  326. return smalltalk.withContext(function($ctx1) {
  327. return "Inspector";
  328. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector)})},
  329. messageSends: []}),
  330. smalltalk.HLInspector);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "unregister",
  334. fn: function (){
  335. var self=this;
  336. return smalltalk.withContext(function($ctx1) {
  337. smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
  338. _st(_st(self)._class())._unregister_(self);
  339. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLInspector)})},
  340. messageSends: ["unregister", "unregister:", "class"]}),
  341. smalltalk.HLInspector);
  342. smalltalk.addMethod(
  343. smalltalk.method({
  344. selector: "variablesWidget",
  345. fn: function (){
  346. var self=this;
  347. function $HLInspectorVariablesWidget(){return smalltalk.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  348. return smalltalk.withContext(function($ctx1) {
  349. var $2,$3,$4,$1;
  350. $2=self["@variablesWidget"];
  351. if(($receiver = $2) == nil || $receiver == undefined){
  352. $3=_st($HLInspectorVariablesWidget())._new();
  353. _st($3)._model_(_st(self)._model());
  354. $4=_st($3)._yourself();
  355. self["@variablesWidget"]=$4;
  356. $1=self["@variablesWidget"];
  357. } else {
  358. $1=$2;
  359. };
  360. return $1;
  361. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},smalltalk.HLInspector)})},
  362. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  363. smalltalk.HLInspector);
  364. smalltalk.HLInspector.klass.iVarNames = ['inspectors'];
  365. smalltalk.addMethod(
  366. smalltalk.method({
  367. selector: "canBeOpenAsTab",
  368. fn: function (){
  369. var self=this;
  370. return smalltalk.withContext(function($ctx1) {
  371. return false;
  372. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLInspector.klass)})},
  373. messageSends: []}),
  374. smalltalk.HLInspector.klass);
  375. smalltalk.addMethod(
  376. smalltalk.method({
  377. selector: "initialize",
  378. fn: function (){
  379. var self=this;
  380. return smalltalk.withContext(function($ctx1) {
  381. smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
  382. _st(self)._watchChanges();
  383. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
  384. messageSends: ["initialize", "watchChanges"]}),
  385. smalltalk.HLInspector.klass);
  386. smalltalk.addMethod(
  387. smalltalk.method({
  388. selector: "inspectors",
  389. fn: function (){
  390. var self=this;
  391. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  392. return smalltalk.withContext(function($ctx1) {
  393. var $2,$1;
  394. $2=self["@inspectors"];
  395. if(($receiver = $2) == nil || $receiver == undefined){
  396. self["@inspectors"]=_st($OrderedCollection())._new();
  397. $1=self["@inspectors"];
  398. } else {
  399. $1=$2;
  400. };
  401. return $1;
  402. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},
  403. messageSends: ["ifNil:", "new"]}),
  404. smalltalk.HLInspector.klass);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "register:",
  408. fn: function (anInspector){
  409. var self=this;
  410. return smalltalk.withContext(function($ctx1) {
  411. _st(_st(self)._inspectors())._add_(anInspector);
  412. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  413. messageSends: ["add:", "inspectors"]}),
  414. smalltalk.HLInspector.klass);
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "tabLabel",
  418. fn: function (){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) {
  421. return "Inspector";
  422. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLInspector.klass)})},
  423. messageSends: []}),
  424. smalltalk.HLInspector.klass);
  425. smalltalk.addMethod(
  426. smalltalk.method({
  427. selector: "tabPriority",
  428. fn: function (){
  429. var self=this;
  430. return smalltalk.withContext(function($ctx1) {
  431. var $1;
  432. $1=(10);
  433. return $1;
  434. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLInspector.klass)})},
  435. messageSends: []}),
  436. smalltalk.HLInspector.klass);
  437. smalltalk.addMethod(
  438. smalltalk.method({
  439. selector: "unregister:",
  440. fn: function (anInspector){
  441. var self=this;
  442. return smalltalk.withContext(function($ctx1) {
  443. _st(_st(self)._inspectors())._remove_(anInspector);
  444. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},smalltalk.HLInspector.klass)})},
  445. messageSends: ["remove:", "inspectors"]}),
  446. smalltalk.HLInspector.klass);
  447. smalltalk.addMethod(
  448. smalltalk.method({
  449. selector: "watchChanges",
  450. fn: function (){
  451. var self=this;
  452. return smalltalk.withContext(function($ctx1) {
  453. _st((function(){
  454. return smalltalk.withContext(function($ctx2) {
  455. return _st(_st(self)._inspectors())._do_((function(each){
  456. return smalltalk.withContext(function($ctx3) {
  457. return _st(each)._refresh();
  458. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  459. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._valueWithInterval_((500));
  460. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},smalltalk.HLInspector.klass)})},
  461. messageSends: ["valueWithInterval:", "do:", "refresh", "inspectors"]}),
  462. smalltalk.HLInspector.klass);
  463. smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  464. smalltalk.addMethod(
  465. smalltalk.method({
  466. selector: "model",
  467. fn: function (){
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) {
  470. var $1;
  471. $1=self["@model"];
  472. return $1;
  473. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorDisplayWidget)})},
  474. messageSends: []}),
  475. smalltalk.HLInspectorDisplayWidget);
  476. smalltalk.addMethod(
  477. smalltalk.method({
  478. selector: "model:",
  479. fn: function (aModel){
  480. var self=this;
  481. return smalltalk.withContext(function($ctx1) {
  482. self["@model"]=aModel;
  483. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorDisplayWidget)})},
  484. messageSends: []}),
  485. smalltalk.HLInspectorDisplayWidget);
  486. smalltalk.addMethod(
  487. smalltalk.method({
  488. selector: "renderContentOn:",
  489. fn: function (html){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) {
  492. _st(_st(html)._div())._with_(_st(self)._selectionDisplayString());
  493. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorDisplayWidget)})},
  494. messageSends: ["with:", "selectionDisplayString", "div"]}),
  495. smalltalk.HLInspectorDisplayWidget);
  496. smalltalk.addMethod(
  497. smalltalk.method({
  498. selector: "selectionDisplayString",
  499. fn: function (){
  500. var self=this;
  501. var selection;
  502. return smalltalk.withContext(function($ctx1) {
  503. var $2,$1;
  504. selection=_st(self["@model"])._selection();
  505. $2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
  506. if(smalltalk.assert($2)){
  507. $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
  508. } else {
  509. $1="";
  510. };
  511. return $1;
  512. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},smalltalk.HLInspectorDisplayWidget)})},
  513. messageSends: ["selection", "ifTrue:ifFalse:", "printString", "instVarObjectAt:", "includes:", "keys", "variables"]}),
  514. smalltalk.HLInspectorDisplayWidget);
  515. smalltalk.addClass('HLInspectorModel', smalltalk.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'selection'], 'Helios-Inspector');
  516. smalltalk.addMethod(
  517. smalltalk.method({
  518. selector: "announcer",
  519. fn: function (){
  520. var self=this;
  521. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  522. return smalltalk.withContext(function($ctx1) {
  523. var $2,$1;
  524. $2=self["@announcer"];
  525. if(($receiver = $2) == nil || $receiver == undefined){
  526. self["@announcer"]=_st($Announcer())._new();
  527. $1=self["@announcer"];
  528. } else {
  529. $1=$2;
  530. };
  531. return $1;
  532. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorModel)})},
  533. messageSends: ["ifNil:", "new"]}),
  534. smalltalk.HLInspectorModel);
  535. smalltalk.addMethod(
  536. smalltalk.method({
  537. selector: "code",
  538. fn: function (){
  539. var self=this;
  540. function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  541. return smalltalk.withContext(function($ctx1) {
  542. var $2,$1;
  543. $2=self["@code"];
  544. if(($receiver = $2) == nil || $receiver == undefined){
  545. self["@code"]=_st($HLCodeModel())._on_(_st(self)._environment());
  546. $1=self["@code"];
  547. } else {
  548. $1=$2;
  549. };
  550. return $1;
  551. }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HLInspectorModel)})},
  552. messageSends: ["ifNil:", "on:", "environment"]}),
  553. smalltalk.HLInspectorModel);
  554. smalltalk.addMethod(
  555. smalltalk.method({
  556. selector: "environment",
  557. fn: function (){
  558. var self=this;
  559. function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  560. return smalltalk.withContext(function($ctx1) {
  561. var $2,$1;
  562. $2=self["@environment"];
  563. if(($receiver = $2) == nil || $receiver == undefined){
  564. $1=_st(_st($HLManager())._current())._environment();
  565. } else {
  566. $1=$2;
  567. };
  568. return $1;
  569. }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLInspectorModel)})},
  570. messageSends: ["ifNil:", "environment", "current"]}),
  571. smalltalk.HLInspectorModel);
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "environment:",
  575. fn: function (anEnvironment){
  576. var self=this;
  577. return smalltalk.withContext(function($ctx1) {
  578. self["@environment"]=anEnvironment;
  579. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel)})},
  580. messageSends: []}),
  581. smalltalk.HLInspectorModel);
  582. smalltalk.addMethod(
  583. smalltalk.method({
  584. selector: "inspect:on:",
  585. fn: function (anObject,anInspector){
  586. var self=this;
  587. return smalltalk.withContext(function($ctx1) {
  588. self["@inspectee"]=anObject;
  589. self["@variables"]=[];
  590. _st(self["@inspectee"])._inspectOn_(anInspector);
  591. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},smalltalk.HLInspectorModel)})},
  592. messageSends: ["inspectOn:"]}),
  593. smalltalk.HLInspectorModel);
  594. smalltalk.addMethod(
  595. smalltalk.method({
  596. selector: "inspectee",
  597. fn: function (){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. var $1;
  601. $1=self["@inspectee"];
  602. return $1;
  603. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},smalltalk.HLInspectorModel)})},
  604. messageSends: []}),
  605. smalltalk.HLInspectorModel);
  606. smalltalk.addMethod(
  607. smalltalk.method({
  608. selector: "inspectee:",
  609. fn: function (anObject){
  610. var self=this;
  611. return smalltalk.withContext(function($ctx1) {
  612. self["@inspectee"]=anObject;
  613. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  614. messageSends: []}),
  615. smalltalk.HLInspectorModel);
  616. smalltalk.addMethod(
  617. smalltalk.method({
  618. selector: "instVarObjectAt:",
  619. fn: function (anInstVarName){
  620. var self=this;
  621. return smalltalk.withContext(function($ctx1) {
  622. var $1;
  623. $1=_st(_st(self)._variables())._at_(anInstVarName);
  624. return $1;
  625. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  626. messageSends: ["at:", "variables"]}),
  627. smalltalk.HLInspectorModel);
  628. smalltalk.addMethod(
  629. smalltalk.method({
  630. selector: "onKeyDown:",
  631. fn: function (anEvent){
  632. var self=this;
  633. return smalltalk.withContext(function($ctx1) {
  634. if(anEvent.ctrlKey) {
  635. if(anEvent.keyCode === 80) { //ctrl+p
  636. self._printIt();
  637. anEvent.preventDefault();
  638. return false;
  639. }
  640. if(anEvent.keyCode === 68) { //ctrl+d
  641. self._doIt();
  642. anEvent.preventDefault();
  643. return false;
  644. }
  645. if(anEvent.keyCode === 73) { //ctrl+i
  646. self._inspectIt();
  647. anEvent.preventDefault();
  648. return false;
  649. }
  650. };
  651. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent},smalltalk.HLInspectorModel)})},
  652. messageSends: []}),
  653. smalltalk.HLInspectorModel);
  654. smalltalk.addMethod(
  655. smalltalk.method({
  656. selector: "selectedInstVar:",
  657. fn: function (anInstVarName){
  658. var self=this;
  659. return smalltalk.withContext(function($ctx1) {
  660. _st(self)._selection_(anInstVarName);
  661. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName},smalltalk.HLInspectorModel)})},
  662. messageSends: ["selection:"]}),
  663. smalltalk.HLInspectorModel);
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "selectedInstVarObject",
  667. fn: function (){
  668. var self=this;
  669. return smalltalk.withContext(function($ctx1) {
  670. var $1;
  671. $1=_st(self)._instVarObjectAt_(_st(self)._selection());
  672. return $1;
  673. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},smalltalk.HLInspectorModel)})},
  674. messageSends: ["instVarObjectAt:", "selection"]}),
  675. smalltalk.HLInspectorModel);
  676. smalltalk.addMethod(
  677. smalltalk.method({
  678. selector: "selection",
  679. fn: function (){
  680. var self=this;
  681. return smalltalk.withContext(function($ctx1) {
  682. var $2,$1;
  683. $2=self["@selection"];
  684. if(($receiver = $2) == nil || $receiver == undefined){
  685. $1="";
  686. } else {
  687. $1=$2;
  688. };
  689. return $1;
  690. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorModel)})},
  691. messageSends: ["ifNil:"]}),
  692. smalltalk.HLInspectorModel);
  693. smalltalk.addMethod(
  694. smalltalk.method({
  695. selector: "selection:",
  696. fn: function (anObject){
  697. var self=this;
  698. function $HLInstanceVariableSelected(){return smalltalk.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  699. return smalltalk.withContext(function($ctx1) {
  700. self["@selection"]=anObject;
  701. _st(_st(self)._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
  702. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},smalltalk.HLInspectorModel)})},
  703. messageSends: ["announce:", "on:", "announcer"]}),
  704. smalltalk.HLInspectorModel);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "subscribe:",
  708. fn: function (aWidget){
  709. var self=this;
  710. return smalltalk.withContext(function($ctx1) {
  711. _st(aWidget)._subscribeTo_(_st(self)._announcer());
  712. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget},smalltalk.HLInspectorModel)})},
  713. messageSends: ["subscribeTo:", "announcer"]}),
  714. smalltalk.HLInspectorModel);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "variables",
  718. fn: function (){
  719. var self=this;
  720. return smalltalk.withContext(function($ctx1) {
  721. var $1;
  722. $1=self["@variables"];
  723. return $1;
  724. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorModel)})},
  725. messageSends: []}),
  726. smalltalk.HLInspectorModel);
  727. smalltalk.addMethod(
  728. smalltalk.method({
  729. selector: "variables:",
  730. fn: function (aCollection){
  731. var self=this;
  732. return smalltalk.withContext(function($ctx1) {
  733. self["@variables"]=aCollection;
  734. return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection},smalltalk.HLInspectorModel)})},
  735. messageSends: []}),
  736. smalltalk.HLInspectorModel);
  737. smalltalk.addMethod(
  738. smalltalk.method({
  739. selector: "on:",
  740. fn: function (anEnvironment){
  741. var self=this;
  742. return smalltalk.withContext(function($ctx1) {
  743. var $2,$3,$1;
  744. $2=_st(self)._new();
  745. _st($2)._environment_(anEnvironment);
  746. $3=_st($2)._yourself();
  747. $1=$3;
  748. return $1;
  749. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},smalltalk.HLInspectorModel.klass)})},
  750. messageSends: ["environment:", "new", "yourself"]}),
  751. smalltalk.HLInspectorModel.klass);
  752. smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  753. smalltalk.addMethod(
  754. smalltalk.method({
  755. selector: "announcer",
  756. fn: function (){
  757. var self=this;
  758. function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  759. return smalltalk.withContext(function($ctx1) {
  760. var $2,$1;
  761. $2=self["@announcer"];
  762. if(($receiver = $2) == nil || $receiver == undefined){
  763. self["@announcer"]=_st($Announcer())._new();
  764. $1=self["@announcer"];
  765. } else {
  766. $1=$2;
  767. };
  768. return $1;
  769. }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorVariablesWidget)})},
  770. messageSends: ["ifNil:", "new"]}),
  771. smalltalk.HLInspectorVariablesWidget);
  772. smalltalk.addMethod(
  773. smalltalk.method({
  774. selector: "defaultItems",
  775. fn: function (){
  776. var self=this;
  777. return smalltalk.withContext(function($ctx1) {
  778. var $1;
  779. $1=_st(_st(_st(self)._model())._variables())._keys();
  780. return $1;
  781. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},smalltalk.HLInspectorVariablesWidget)})},
  782. messageSends: ["keys", "variables", "model"]}),
  783. smalltalk.HLInspectorVariablesWidget);
  784. smalltalk.addMethod(
  785. smalltalk.method({
  786. selector: "label",
  787. fn: function (){
  788. var self=this;
  789. return smalltalk.withContext(function($ctx1) {
  790. var $1;
  791. $1=_st(_st(_st(_st(self)._model())._inspectee())._class())._name();
  792. return $1;
  793. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspectorVariablesWidget)})},
  794. messageSends: ["name", "class", "inspectee", "model"]}),
  795. smalltalk.HLInspectorVariablesWidget);
  796. smalltalk.addMethod(
  797. smalltalk.method({
  798. selector: "model",
  799. fn: function (){
  800. var self=this;
  801. return smalltalk.withContext(function($ctx1) {
  802. var $1;
  803. $1=self["@model"];
  804. return $1;
  805. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorVariablesWidget)})},
  806. messageSends: []}),
  807. smalltalk.HLInspectorVariablesWidget);
  808. smalltalk.addMethod(
  809. smalltalk.method({
  810. selector: "model:",
  811. fn: function (aModel){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) {
  814. self["@model"]=aModel;
  815. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorVariablesWidget)})},
  816. messageSends: []}),
  817. smalltalk.HLInspectorVariablesWidget);
  818. smalltalk.addMethod(
  819. smalltalk.method({
  820. selector: "refresh",
  821. fn: function (){
  822. var self=this;
  823. return smalltalk.withContext(function($ctx1) {
  824. _st(self)._resetItems();
  825. smalltalk.HLNavigationListWidget.fn.prototype._refresh.apply(_st(self), []);
  826. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorVariablesWidget)})},
  827. messageSends: ["resetItems", "refresh"]}),
  828. smalltalk.HLInspectorVariablesWidget);
  829. smalltalk.addMethod(
  830. smalltalk.method({
  831. selector: "renderButtonsOn:",
  832. fn: function (html){
  833. var self=this;
  834. function $HLDiveRequested(){return smalltalk.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  835. return smalltalk.withContext(function($ctx1) {
  836. var $1,$2;
  837. $1=_st(html)._button();
  838. _st($1)._class_("btn");
  839. _st($1)._with_("Dive");
  840. $2=_st($1)._onClick_((function(){
  841. return smalltalk.withContext(function($ctx2) {
  842. return _st(_st(self)._announcer())._announce_(_st($HLDiveRequested())._new());
  843. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  844. self["@diveButton"]=$2;
  845. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  846. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"]}),
  847. smalltalk.HLInspectorVariablesWidget);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "renderContentOn:",
  851. fn: function (html){
  852. var self=this;
  853. return smalltalk.withContext(function($ctx1) {
  854. _st(self)._renderHeadOn_(html);
  855. smalltalk.HLNavigationListWidget.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  856. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  857. messageSends: ["renderHeadOn:", "renderContentOn:"]}),
  858. smalltalk.HLInspectorVariablesWidget);
  859. smalltalk.addMethod(
  860. smalltalk.method({
  861. selector: "renderHeadOn:",
  862. fn: function (html){
  863. var self=this;
  864. return smalltalk.withContext(function($ctx1) {
  865. var $1,$2;
  866. $1=_st(html)._div();
  867. _st($1)._class_("list-label");
  868. $2=_st($1)._with_(_st(self)._label());
  869. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},smalltalk.HLInspectorVariablesWidget)})},
  870. messageSends: ["class:", "div", "with:", "label"]}),
  871. smalltalk.HLInspectorVariablesWidget);
  872. smalltalk.addMethod(
  873. smalltalk.method({
  874. selector: "resetItems",
  875. fn: function (){
  876. var self=this;
  877. return smalltalk.withContext(function($ctx1) {
  878. self["@items"]=nil;
  879. return self}, function($ctx1) {$ctx1.fill(self,"resetItems",{},smalltalk.HLInspectorVariablesWidget)})},
  880. messageSends: []}),
  881. smalltalk.HLInspectorVariablesWidget);
  882. smalltalk.addMethod(
  883. smalltalk.method({
  884. selector: "selectItem:",
  885. fn: function (anObject){
  886. var self=this;
  887. return smalltalk.withContext(function($ctx1) {
  888. smalltalk.HLNavigationListWidget.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  889. _st(_st(self)._model())._selectedInstVar_(anObject);
  890. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},smalltalk.HLInspectorVariablesWidget)})},
  891. messageSends: ["selectItem:", "selectedInstVar:", "model"]}),
  892. smalltalk.HLInspectorVariablesWidget);
  893. smalltalk.addMethod(
  894. smalltalk.method({
  895. selector: "selection",
  896. fn: function (){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) {
  899. var $1;
  900. $1=_st(self["@model"])._selection();
  901. return $1;
  902. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorVariablesWidget)})},
  903. messageSends: ["selection"]}),
  904. smalltalk.HLInspectorVariablesWidget);
  905. smalltalk.addMethod(
  906. smalltalk.method({
  907. selector: "variables",
  908. fn: function (){
  909. var self=this;
  910. return smalltalk.withContext(function($ctx1) {
  911. var $1;
  912. $1=_st(self["@model"])._variables();
  913. return $1;
  914. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorVariablesWidget)})},
  915. messageSends: ["variables"]}),
  916. smalltalk.HLInspectorVariablesWidget);