Helios-Inspector.deploy.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  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. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLInspector)})},
  281. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"]}),
  282. smalltalk.HLInspector);
  283. smalltalk.addMethod(
  284. "_setLabel_",
  285. smalltalk.method({
  286. selector: "setLabel:",
  287. fn: function (aString){
  288. var self=this;
  289. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  290. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString}, smalltalk.HLInspector)})},
  291. messageSends: []}),
  292. smalltalk.HLInspector);
  293. smalltalk.addMethod(
  294. "_setVariables_",
  295. smalltalk.method({
  296. selector: "setVariables:",
  297. fn: function (aDictionary){
  298. var self=this;
  299. return smalltalk.withContext(function($ctx1) { _st(_st(self)._model())._variables_(aDictionary);
  300. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary}, smalltalk.HLInspector)})},
  301. messageSends: ["variables:", "model"]}),
  302. smalltalk.HLInspector);
  303. smalltalk.addMethod(
  304. "_tabLabel",
  305. smalltalk.method({
  306. selector: "tabLabel",
  307. fn: function (){
  308. var self=this;
  309. return smalltalk.withContext(function($ctx1) { var $1;
  310. $1=_st(self)._label();
  311. return $1;
  312. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLInspector)})},
  313. messageSends: ["label"]}),
  314. smalltalk.HLInspector);
  315. smalltalk.addMethod(
  316. "_variablesWidget",
  317. smalltalk.method({
  318. selector: "variablesWidget",
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) { var $2,$3,$4,$1;
  322. $2=self["@variablesWidget"];
  323. if(($receiver = $2) == nil || $receiver == undefined){
  324. $3=_st((smalltalk.HLInspectorVariablesWidget || HLInspectorVariablesWidget))._new();
  325. _st($3)._model_(_st(self)._model());
  326. $4=_st($3)._yourself();
  327. self["@variablesWidget"]=$4;
  328. $1=self["@variablesWidget"];
  329. } else {
  330. $1=$2;
  331. };
  332. return $1;
  333. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{}, smalltalk.HLInspector)})},
  334. messageSends: ["ifNil:", "model:", "model", "new", "yourself"]}),
  335. smalltalk.HLInspector);
  336. smalltalk.addMethod(
  337. "_canBeOpenAsTab",
  338. smalltalk.method({
  339. selector: "canBeOpenAsTab",
  340. fn: function (){
  341. var self=this;
  342. return smalltalk.withContext(function($ctx1) { return false;
  343. }, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{}, smalltalk.HLInspector.klass)})},
  344. messageSends: []}),
  345. smalltalk.HLInspector.klass);
  346. smalltalk.addMethod(
  347. "_tabLabel",
  348. smalltalk.method({
  349. selector: "tabLabel",
  350. fn: function (){
  351. var self=this;
  352. return smalltalk.withContext(function($ctx1) { return "Inspector";
  353. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{}, smalltalk.HLInspector.klass)})},
  354. messageSends: []}),
  355. smalltalk.HLInspector.klass);
  356. smalltalk.addMethod(
  357. "_tabPriority",
  358. smalltalk.method({
  359. selector: "tabPriority",
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { return (10);
  363. }, function($ctx1) {$ctx1.fill(self,"tabPriority",{}, smalltalk.HLInspector.klass)})},
  364. messageSends: []}),
  365. smalltalk.HLInspector.klass);
  366. smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  367. smalltalk.addMethod(
  368. "_model",
  369. smalltalk.method({
  370. selector: "model",
  371. fn: function (){
  372. var self=this;
  373. return smalltalk.withContext(function($ctx1) { var $1;
  374. $1=self["@model"];
  375. return $1;
  376. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLInspectorDisplayWidget)})},
  377. messageSends: []}),
  378. smalltalk.HLInspectorDisplayWidget);
  379. smalltalk.addMethod(
  380. "_model_",
  381. smalltalk.method({
  382. selector: "model:",
  383. fn: function (aModel){
  384. var self=this;
  385. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  386. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel}, smalltalk.HLInspectorDisplayWidget)})},
  387. messageSends: []}),
  388. smalltalk.HLInspectorDisplayWidget);
  389. smalltalk.addMethod(
  390. "_renderContentOn_",
  391. smalltalk.method({
  392. selector: "renderContentOn:",
  393. fn: function (html){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) { _st(_st(html)._div())._with_(_st(self)._selectionDisplayString());
  396. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html}, smalltalk.HLInspectorDisplayWidget)})},
  397. messageSends: ["with:", "selectionDisplayString", "div"]}),
  398. smalltalk.HLInspectorDisplayWidget);
  399. smalltalk.addMethod(
  400. "_selectionDisplayString",
  401. smalltalk.method({
  402. selector: "selectionDisplayString",
  403. fn: function (){
  404. var self=this;
  405. var selection;
  406. return smalltalk.withContext(function($ctx1) { var $2,$1;
  407. selection=_st(self["@model"])._selection();
  408. $2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
  409. if(smalltalk.assert($2)){
  410. $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
  411. } else {
  412. $1="";
  413. };
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection}, smalltalk.HLInspectorDisplayWidget)})},
  416. messageSends: ["selection", "ifTrue:ifFalse:", "printString", "instVarObjectAt:", "includes:", "keys", "variables"]}),
  417. smalltalk.HLInspectorDisplayWidget);
  418. smalltalk.addClass('HLInspectorModel', smalltalk.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'selection'], 'Helios-Inspector');
  419. smalltalk.addMethod(
  420. "_announcer",
  421. smalltalk.method({
  422. selector: "announcer",
  423. fn: function (){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) { var $2,$1;
  426. $2=self["@announcer"];
  427. if(($receiver = $2) == nil || $receiver == undefined){
  428. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  429. $1=self["@announcer"];
  430. } else {
  431. $1=$2;
  432. };
  433. return $1;
  434. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLInspectorModel)})},
  435. messageSends: ["ifNil:", "new"]}),
  436. smalltalk.HLInspectorModel);
  437. smalltalk.addMethod(
  438. "_code",
  439. smalltalk.method({
  440. selector: "code",
  441. fn: function (){
  442. var self=this;
  443. return smalltalk.withContext(function($ctx1) { var $2,$1;
  444. $2=self["@code"];
  445. if(($receiver = $2) == nil || $receiver == undefined){
  446. self["@code"]=_st((smalltalk.HLCodeModel || HLCodeModel))._on_(_st(self)._environment());
  447. $1=self["@code"];
  448. } else {
  449. $1=$2;
  450. };
  451. return $1;
  452. }, function($ctx1) {$ctx1.fill(self,"code",{}, smalltalk.HLInspectorModel)})},
  453. messageSends: ["ifNil:", "on:", "environment"]}),
  454. smalltalk.HLInspectorModel);
  455. smalltalk.addMethod(
  456. "_environment",
  457. smalltalk.method({
  458. selector: "environment",
  459. fn: function (){
  460. var self=this;
  461. return smalltalk.withContext(function($ctx1) { var $2,$1;
  462. $2=self["@environment"];
  463. if(($receiver = $2) == nil || $receiver == undefined){
  464. $1=_st(_st((smalltalk.HLManager || HLManager))._current())._environment();
  465. } else {
  466. $1=$2;
  467. };
  468. return $1;
  469. }, function($ctx1) {$ctx1.fill(self,"environment",{}, smalltalk.HLInspectorModel)})},
  470. messageSends: ["ifNil:", "environment", "current"]}),
  471. smalltalk.HLInspectorModel);
  472. smalltalk.addMethod(
  473. "_environment_",
  474. smalltalk.method({
  475. selector: "environment:",
  476. fn: function (anEnvironment){
  477. var self=this;
  478. return smalltalk.withContext(function($ctx1) { self["@environment"]=anEnvironment;
  479. return self}, function($ctx1) {$ctx1.fill(self,"environment:",{anEnvironment:anEnvironment}, smalltalk.HLInspectorModel)})},
  480. messageSends: []}),
  481. smalltalk.HLInspectorModel);
  482. smalltalk.addMethod(
  483. "_inspect_on_",
  484. smalltalk.method({
  485. selector: "inspect:on:",
  486. fn: function (anObject,anInspector){
  487. var self=this;
  488. return smalltalk.withContext(function($ctx1) { self["@inspectee"]=anObject;
  489. self["@variables"]=[];
  490. _st(self["@inspectee"])._inspectOn_(anInspector);
  491. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector}, smalltalk.HLInspectorModel)})},
  492. messageSends: ["inspectOn:"]}),
  493. smalltalk.HLInspectorModel);
  494. smalltalk.addMethod(
  495. "_inspectee",
  496. smalltalk.method({
  497. selector: "inspectee",
  498. fn: function (){
  499. var self=this;
  500. return smalltalk.withContext(function($ctx1) { var $1;
  501. $1=self["@inspectee"];
  502. return $1;
  503. }, function($ctx1) {$ctx1.fill(self,"inspectee",{}, smalltalk.HLInspectorModel)})},
  504. messageSends: []}),
  505. smalltalk.HLInspectorModel);
  506. smalltalk.addMethod(
  507. "_inspectee_",
  508. smalltalk.method({
  509. selector: "inspectee:",
  510. fn: function (anObject){
  511. var self=this;
  512. return smalltalk.withContext(function($ctx1) { self["@inspectee"]=anObject;
  513. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject}, smalltalk.HLInspectorModel)})},
  514. messageSends: []}),
  515. smalltalk.HLInspectorModel);
  516. smalltalk.addMethod(
  517. "_instVarObjectAt_",
  518. smalltalk.method({
  519. selector: "instVarObjectAt:",
  520. fn: function (anInstVarName){
  521. var self=this;
  522. return smalltalk.withContext(function($ctx1) { var $1;
  523. $1=_st(_st(self)._variables())._at_(anInstVarName);
  524. return $1;
  525. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName}, smalltalk.HLInspectorModel)})},
  526. messageSends: ["at:", "variables"]}),
  527. smalltalk.HLInspectorModel);
  528. smalltalk.addMethod(
  529. "_onKeyDown_",
  530. smalltalk.method({
  531. selector: "onKeyDown:",
  532. fn: function (anEvent){
  533. var self=this;
  534. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  535. if(anEvent.keyCode === 80) { //ctrl+p
  536. self._printIt();
  537. anEvent.preventDefault();
  538. return false;
  539. }
  540. if(anEvent.keyCode === 68) { //ctrl+d
  541. self._doIt();
  542. anEvent.preventDefault();
  543. return false;
  544. }
  545. if(anEvent.keyCode === 73) { //ctrl+i
  546. self._inspectIt();
  547. anEvent.preventDefault();
  548. return false;
  549. }
  550. };
  551. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent}, smalltalk.HLInspectorModel)})},
  552. messageSends: []}),
  553. smalltalk.HLInspectorModel);
  554. smalltalk.addMethod(
  555. "_selectedInstVar_",
  556. smalltalk.method({
  557. selector: "selectedInstVar:",
  558. fn: function (anInstVarName){
  559. var self=this;
  560. return smalltalk.withContext(function($ctx1) { _st(self)._selection_(anInstVarName);
  561. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName}, smalltalk.HLInspectorModel)})},
  562. messageSends: ["selection:"]}),
  563. smalltalk.HLInspectorModel);
  564. smalltalk.addMethod(
  565. "_selectedInstVarObject",
  566. smalltalk.method({
  567. selector: "selectedInstVarObject",
  568. fn: function (){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) { var $1;
  571. $1=_st(self)._instVarObjectAt_(_st(self)._selection());
  572. return $1;
  573. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{}, smalltalk.HLInspectorModel)})},
  574. messageSends: ["instVarObjectAt:", "selection"]}),
  575. smalltalk.HLInspectorModel);
  576. smalltalk.addMethod(
  577. "_selection",
  578. smalltalk.method({
  579. selector: "selection",
  580. fn: function (){
  581. var self=this;
  582. return smalltalk.withContext(function($ctx1) { var $2,$1;
  583. $2=self["@selection"];
  584. if(($receiver = $2) == nil || $receiver == undefined){
  585. $1="";
  586. } else {
  587. $1=$2;
  588. };
  589. return $1;
  590. }, function($ctx1) {$ctx1.fill(self,"selection",{}, smalltalk.HLInspectorModel)})},
  591. messageSends: ["ifNil:"]}),
  592. smalltalk.HLInspectorModel);
  593. smalltalk.addMethod(
  594. "_selection_",
  595. smalltalk.method({
  596. selector: "selection:",
  597. fn: function (anObject){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) { self["@selection"]=anObject;
  600. _st(_st(self)._announcer())._announce_(_st((smalltalk.HLInstanceVariableSelected || HLInstanceVariableSelected))._on_(self["@selection"]));
  601. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject}, smalltalk.HLInspectorModel)})},
  602. messageSends: ["announce:", "on:", "announcer"]}),
  603. smalltalk.HLInspectorModel);
  604. smalltalk.addMethod(
  605. "_subscribe_",
  606. smalltalk.method({
  607. selector: "subscribe:",
  608. fn: function (aWidget){
  609. var self=this;
  610. return smalltalk.withContext(function($ctx1) { _st(aWidget)._subscribeTo_(_st(self)._announcer());
  611. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget}, smalltalk.HLInspectorModel)})},
  612. messageSends: ["subscribeTo:", "announcer"]}),
  613. smalltalk.HLInspectorModel);
  614. smalltalk.addMethod(
  615. "_variables",
  616. smalltalk.method({
  617. selector: "variables",
  618. fn: function (){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) { var $1;
  621. $1=self["@variables"];
  622. return $1;
  623. }, function($ctx1) {$ctx1.fill(self,"variables",{}, smalltalk.HLInspectorModel)})},
  624. messageSends: []}),
  625. smalltalk.HLInspectorModel);
  626. smalltalk.addMethod(
  627. "_variables_",
  628. smalltalk.method({
  629. selector: "variables:",
  630. fn: function (aCollection){
  631. var self=this;
  632. return smalltalk.withContext(function($ctx1) { self["@variables"]=aCollection;
  633. return self}, function($ctx1) {$ctx1.fill(self,"variables:",{aCollection:aCollection}, smalltalk.HLInspectorModel)})},
  634. messageSends: []}),
  635. smalltalk.HLInspectorModel);
  636. smalltalk.addMethod(
  637. "_on_",
  638. smalltalk.method({
  639. selector: "on:",
  640. fn: function (anEnvironment){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  643. $2=_st(self)._new();
  644. _st($2)._environment_(anEnvironment);
  645. $3=_st($2)._yourself();
  646. $1=$3;
  647. return $1;
  648. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment}, smalltalk.HLInspectorModel.klass)})},
  649. messageSends: ["environment:", "new", "yourself"]}),
  650. smalltalk.HLInspectorModel.klass);
  651. smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  652. smalltalk.addMethod(
  653. "_announcer",
  654. smalltalk.method({
  655. selector: "announcer",
  656. fn: function (){
  657. var self=this;
  658. return smalltalk.withContext(function($ctx1) { var $2,$1;
  659. $2=self["@announcer"];
  660. if(($receiver = $2) == nil || $receiver == undefined){
  661. self["@announcer"]=_st((smalltalk.Announcer || Announcer))._new();
  662. $1=self["@announcer"];
  663. } else {
  664. $1=$2;
  665. };
  666. return $1;
  667. }, function($ctx1) {$ctx1.fill(self,"announcer",{}, smalltalk.HLInspectorVariablesWidget)})},
  668. messageSends: ["ifNil:", "new"]}),
  669. smalltalk.HLInspectorVariablesWidget);
  670. smalltalk.addMethod(
  671. "_defaultItems",
  672. smalltalk.method({
  673. selector: "defaultItems",
  674. fn: function (){
  675. var self=this;
  676. return smalltalk.withContext(function($ctx1) { var $1;
  677. $1=_st(_st(_st(self)._model())._variables())._keys();
  678. return $1;
  679. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{}, smalltalk.HLInspectorVariablesWidget)})},
  680. messageSends: ["keys", "variables", "model"]}),
  681. smalltalk.HLInspectorVariablesWidget);
  682. smalltalk.addMethod(
  683. "_model",
  684. smalltalk.method({
  685. selector: "model",
  686. fn: function (){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) { var $1;
  689. $1=self["@model"];
  690. return $1;
  691. }, function($ctx1) {$ctx1.fill(self,"model",{}, smalltalk.HLInspectorVariablesWidget)})},
  692. messageSends: []}),
  693. smalltalk.HLInspectorVariablesWidget);
  694. smalltalk.addMethod(
  695. "_model_",
  696. smalltalk.method({
  697. selector: "model:",
  698. fn: function (aModel){
  699. var self=this;
  700. return smalltalk.withContext(function($ctx1) { self["@model"]=aModel;
  701. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel}, smalltalk.HLInspectorVariablesWidget)})},
  702. messageSends: []}),
  703. smalltalk.HLInspectorVariablesWidget);
  704. smalltalk.addMethod(
  705. "_refresh",
  706. smalltalk.method({
  707. selector: "refresh",
  708. fn: function (){
  709. var self=this;
  710. return smalltalk.withContext(function($ctx1) { _st(self)._resetItems();
  711. smalltalk.HLNavigationListWidget.fn.prototype._refresh.apply(_st(self), []);
  712. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{}, smalltalk.HLInspectorVariablesWidget)})},
  713. messageSends: ["resetItems", "refresh"]}),
  714. smalltalk.HLInspectorVariablesWidget);
  715. smalltalk.addMethod(
  716. "_renderButtonsOn_",
  717. smalltalk.method({
  718. selector: "renderButtonsOn:",
  719. fn: function (html){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  722. $1=_st(html)._button();
  723. _st($1)._class_("btn");
  724. _st($1)._with_("Refresh");
  725. $2=_st($1)._onClick_((function(){
  726. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._announcer())._announce_(_st((smalltalk.HLRefreshRequested || HLRefreshRequested))._new());
  727. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  728. $3=_st(html)._button();
  729. _st($3)._class_("btn");
  730. _st($3)._with_("Dive");
  731. $4=_st($3)._onClick_((function(){
  732. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._announcer())._announce_(_st((smalltalk.HLDiveRequested || HLDiveRequested))._new());
  733. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  734. self["@diveButton"]=$4;
  735. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html}, smalltalk.HLInspectorVariablesWidget)})},
  736. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"]}),
  737. smalltalk.HLInspectorVariablesWidget);
  738. smalltalk.addMethod(
  739. "_resetItems",
  740. smalltalk.method({
  741. selector: "resetItems",
  742. fn: function (){
  743. var self=this;
  744. return smalltalk.withContext(function($ctx1) { self["@items"]=nil;
  745. return self}, function($ctx1) {$ctx1.fill(self,"resetItems",{}, smalltalk.HLInspectorVariablesWidget)})},
  746. messageSends: []}),
  747. smalltalk.HLInspectorVariablesWidget);
  748. smalltalk.addMethod(
  749. "_selectItem_",
  750. smalltalk.method({
  751. selector: "selectItem:",
  752. fn: function (anObject){
  753. var self=this;
  754. return smalltalk.withContext(function($ctx1) { smalltalk.HLNavigationListWidget.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  755. _st(_st(self)._model())._selectedInstVar_(anObject);
  756. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject}, smalltalk.HLInspectorVariablesWidget)})},
  757. messageSends: ["selectItem:", "selectedInstVar:", "model"]}),
  758. smalltalk.HLInspectorVariablesWidget);
  759. smalltalk.addMethod(
  760. "_selection",
  761. smalltalk.method({
  762. selector: "selection",
  763. fn: function (){
  764. var self=this;
  765. return smalltalk.withContext(function($ctx1) { var $1;
  766. $1=_st(self["@model"])._selection();
  767. return $1;
  768. }, function($ctx1) {$ctx1.fill(self,"selection",{}, smalltalk.HLInspectorVariablesWidget)})},
  769. messageSends: ["selection"]}),
  770. smalltalk.HLInspectorVariablesWidget);
  771. smalltalk.addMethod(
  772. "_variables",
  773. smalltalk.method({
  774. selector: "variables",
  775. fn: function (){
  776. var self=this;
  777. return smalltalk.withContext(function($ctx1) { var $1;
  778. $1=_st(self["@model"])._variables();
  779. return $1;
  780. }, function($ctx1) {$ctx1.fill(self,"variables",{}, smalltalk.HLInspectorVariablesWidget)})},
  781. messageSends: ["variables"]}),
  782. smalltalk.HLInspectorVariablesWidget);