2
0

Helios-Inspector.deploy.js 30 KB

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