Helios-Inspector.deploy.js 28 KB

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