Helios-Inspector.js 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425
  1. define("amber_core/Helios-Inspector", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Helios-Core", "amber_core/Kernel-Objects"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('Helios-Inspector');
  3. smalltalk.packages["Helios-Inspector"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('HLInspectorDisplayWidget', globals.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "model",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. var $1;
  12. $1=self["@model"];
  13. return $1;
  14. },
  15. args: [],
  16. source: "model\x0a\x0a\x09^ model",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.HLInspectorDisplayWidget);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "model:",
  24. protocol: 'accessing',
  25. fn: function (aModel){
  26. var self=this;
  27. self["@model"]=aModel;
  28. return self},
  29. args: ["aModel"],
  30. source: "model: aModel\x0a\x0a\x09model := aModel",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. globals.HLInspectorDisplayWidget);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "renderContentOn:",
  38. protocol: 'rendering',
  39. fn: function (html){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. _st(_st(html)._div())._with_(self._selectionDisplayString());
  43. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorDisplayWidget)})},
  44. args: ["html"],
  45. source: "renderContentOn: html\x0a\x09\x0a html div with: self selectionDisplayString",
  46. messageSends: ["with:", "div", "selectionDisplayString"],
  47. referencedClasses: []
  48. }),
  49. globals.HLInspectorDisplayWidget);
  50. smalltalk.addMethod(
  51. smalltalk.method({
  52. selector: "selectionDisplayString",
  53. protocol: 'rendering',
  54. fn: function (){
  55. var self=this;
  56. var selection;
  57. return smalltalk.withContext(function($ctx1) {
  58. var $2,$1;
  59. selection=_st(self["@model"])._selection();
  60. $2=_st(_st(self["@model"])._variables())._includesKey_(selection);
  61. if(smalltalk.assert($2)){
  62. $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
  63. } else {
  64. $1="";
  65. };
  66. return $1;
  67. }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},globals.HLInspectorDisplayWidget)})},
  68. args: [],
  69. source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a ^ (model variables includesKey: selection)\x0a \x09ifTrue:[ (model instVarObjectAt: selection) printString ]\x0a \x09ifFalse:[ '' ]",
  70. messageSends: ["selection", "ifTrue:ifFalse:", "includesKey:", "variables", "printString", "instVarObjectAt:"],
  71. referencedClasses: []
  72. }),
  73. globals.HLInspectorDisplayWidget);
  74. smalltalk.addClass('HLInspectorModel', globals.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'label', 'selection'], 'Helios-Inspector');
  75. smalltalk.addMethod(
  76. smalltalk.method({
  77. selector: "announcer",
  78. protocol: 'accessing',
  79. fn: function (){
  80. var self=this;
  81. function $Announcer(){return globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  82. return smalltalk.withContext(function($ctx1) {
  83. var $2,$1;
  84. $2=self["@announcer"];
  85. if(($receiver = $2) == nil || $receiver == null){
  86. self["@announcer"]=_st($Announcer())._new();
  87. $1=self["@announcer"];
  88. } else {
  89. $1=$2;
  90. };
  91. return $1;
  92. }, function($ctx1) {$ctx1.fill(self,"announcer",{},globals.HLInspectorModel)})},
  93. args: [],
  94. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  95. messageSends: ["ifNil:", "new"],
  96. referencedClasses: ["Announcer"]
  97. }),
  98. globals.HLInspectorModel);
  99. smalltalk.addMethod(
  100. smalltalk.method({
  101. selector: "code",
  102. protocol: 'accessing',
  103. fn: function (){
  104. var self=this;
  105. function $HLCodeModel(){return globals.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
  106. return smalltalk.withContext(function($ctx1) {
  107. var $2,$1;
  108. $2=self["@code"];
  109. if(($receiver = $2) == nil || $receiver == null){
  110. self["@code"]=_st($HLCodeModel())._on_(self._environment());
  111. $1=self["@code"];
  112. } else {
  113. $1=$2;
  114. };
  115. return $1;
  116. }, function($ctx1) {$ctx1.fill(self,"code",{},globals.HLInspectorModel)})},
  117. args: [],
  118. source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ code := HLCodeModel on: self environment ]",
  119. messageSends: ["ifNil:", "on:", "environment"],
  120. referencedClasses: ["HLCodeModel"]
  121. }),
  122. globals.HLInspectorModel);
  123. smalltalk.addMethod(
  124. smalltalk.method({
  125. selector: "environment",
  126. protocol: 'accessing',
  127. fn: function (){
  128. var self=this;
  129. function $HLManager(){return globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  130. return smalltalk.withContext(function($ctx1) {
  131. var $2,$1;
  132. $2=self["@environment"];
  133. if(($receiver = $2) == nil || $receiver == null){
  134. $1=_st(_st($HLManager())._current())._environment();
  135. } else {
  136. $1=$2;
  137. };
  138. return $1;
  139. }, function($ctx1) {$ctx1.fill(self,"environment",{},globals.HLInspectorModel)})},
  140. args: [],
  141. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  142. messageSends: ["ifNil:", "environment", "current"],
  143. referencedClasses: ["HLManager"]
  144. }),
  145. globals.HLInspectorModel);
  146. smalltalk.addMethod(
  147. smalltalk.method({
  148. selector: "environment:",
  149. protocol: 'accessing',
  150. fn: function (anEnvironment){
  151. var self=this;
  152. self["@environment"]=anEnvironment;
  153. return self},
  154. args: ["anEnvironment"],
  155. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  156. messageSends: [],
  157. referencedClasses: []
  158. }),
  159. globals.HLInspectorModel);
  160. smalltalk.addMethod(
  161. smalltalk.method({
  162. selector: "inspect:on:",
  163. protocol: 'actions',
  164. fn: function (anObject,anInspector){
  165. var self=this;
  166. return smalltalk.withContext(function($ctx1) {
  167. self["@inspectee"]=anObject;
  168. self["@variables"]=[];
  169. _st(self["@inspectee"])._inspectOn_(anInspector);
  170. return self}, function($ctx1) {$ctx1.fill(self,"inspect:on:",{anObject:anObject,anInspector:anInspector},globals.HLInspectorModel)})},
  171. args: ["anObject", "anInspector"],
  172. source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector",
  173. messageSends: ["inspectOn:"],
  174. referencedClasses: []
  175. }),
  176. globals.HLInspectorModel);
  177. smalltalk.addMethod(
  178. smalltalk.method({
  179. selector: "inspectee",
  180. protocol: 'accessing',
  181. fn: function (){
  182. var self=this;
  183. var $1;
  184. $1=self["@inspectee"];
  185. return $1;
  186. },
  187. args: [],
  188. source: "inspectee \x0a\x09^ inspectee",
  189. messageSends: [],
  190. referencedClasses: []
  191. }),
  192. globals.HLInspectorModel);
  193. smalltalk.addMethod(
  194. smalltalk.method({
  195. selector: "inspectee:",
  196. protocol: 'accessing',
  197. fn: function (anObject){
  198. var self=this;
  199. self["@inspectee"]=anObject;
  200. return self},
  201. args: ["anObject"],
  202. source: "inspectee: anObject \x0a\x09inspectee := anObject",
  203. messageSends: [],
  204. referencedClasses: []
  205. }),
  206. globals.HLInspectorModel);
  207. smalltalk.addMethod(
  208. smalltalk.method({
  209. selector: "instVarObjectAt:",
  210. protocol: 'actions',
  211. fn: function (anInstVarName){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) {
  214. var $1;
  215. $1=_st(self._variables())._at_(anInstVarName);
  216. return $1;
  217. }, function($ctx1) {$ctx1.fill(self,"instVarObjectAt:",{anInstVarName:anInstVarName},globals.HLInspectorModel)})},
  218. args: ["anInstVarName"],
  219. source: "instVarObjectAt: anInstVarName\x0a\x09^ self variables at: anInstVarName",
  220. messageSends: ["at:", "variables"],
  221. referencedClasses: []
  222. }),
  223. globals.HLInspectorModel);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "label",
  227. protocol: 'accessing',
  228. fn: function (){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) {
  231. var $2,$1;
  232. $2=self["@label"];
  233. if(($receiver = $2) == nil || $receiver == null){
  234. $1=_st(self._inspectee())._printString();
  235. } else {
  236. $1=$2;
  237. };
  238. return $1;
  239. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorModel)})},
  240. args: [],
  241. source: "label\x0a ^ label ifNil: [ self inspectee printString ]",
  242. messageSends: ["ifNil:", "printString", "inspectee"],
  243. referencedClasses: []
  244. }),
  245. globals.HLInspectorModel);
  246. smalltalk.addMethod(
  247. smalltalk.method({
  248. selector: "label:",
  249. protocol: 'accessing',
  250. fn: function (aString){
  251. var self=this;
  252. self["@label"]=aString;
  253. return self},
  254. args: ["aString"],
  255. source: "label: aString\x0a label := aString",
  256. messageSends: [],
  257. referencedClasses: []
  258. }),
  259. globals.HLInspectorModel);
  260. smalltalk.addMethod(
  261. smalltalk.method({
  262. selector: "onKeyDown:",
  263. protocol: 'reactions',
  264. fn: function (anEvent){
  265. var self=this;
  266. return smalltalk.withContext(function($ctx1) {
  267. if(anEvent.ctrlKey) {
  268. if(anEvent.keyCode === 80) { //ctrl+p
  269. self._printIt();
  270. anEvent.preventDefault();
  271. return false;
  272. }
  273. if(anEvent.keyCode === 68) { //ctrl+d
  274. self._doIt();
  275. anEvent.preventDefault();
  276. return false;
  277. }
  278. if(anEvent.keyCode === 73) { //ctrl+i
  279. self._inspectIt();
  280. anEvent.preventDefault();
  281. return false;
  282. }
  283. };
  284. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{anEvent:anEvent},globals.HLInspectorModel)})},
  285. args: ["anEvent"],
  286. source: "onKeyDown: anEvent\x0a\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  287. messageSends: [],
  288. referencedClasses: []
  289. }),
  290. globals.HLInspectorModel);
  291. smalltalk.addMethod(
  292. smalltalk.method({
  293. selector: "selectedInstVar:",
  294. protocol: 'actions',
  295. fn: function (anInstVarName){
  296. var self=this;
  297. return smalltalk.withContext(function($ctx1) {
  298. self._selection_(anInstVarName);
  299. return self}, function($ctx1) {$ctx1.fill(self,"selectedInstVar:",{anInstVarName:anInstVarName},globals.HLInspectorModel)})},
  300. args: ["anInstVarName"],
  301. source: "selectedInstVar: anInstVarName\x0a self selection: anInstVarName",
  302. messageSends: ["selection:"],
  303. referencedClasses: []
  304. }),
  305. globals.HLInspectorModel);
  306. smalltalk.addMethod(
  307. smalltalk.method({
  308. selector: "selectedInstVarObject",
  309. protocol: 'accessing',
  310. fn: function (){
  311. var self=this;
  312. return smalltalk.withContext(function($ctx1) {
  313. var $1;
  314. $1=self._instVarObjectAt_(self._selection());
  315. return $1;
  316. }, function($ctx1) {$ctx1.fill(self,"selectedInstVarObject",{},globals.HLInspectorModel)})},
  317. args: [],
  318. source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection",
  319. messageSends: ["instVarObjectAt:", "selection"],
  320. referencedClasses: []
  321. }),
  322. globals.HLInspectorModel);
  323. smalltalk.addMethod(
  324. smalltalk.method({
  325. selector: "selection",
  326. protocol: 'accessing',
  327. fn: function (){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) {
  330. var $2,$1;
  331. $2=self["@selection"];
  332. if(($receiver = $2) == nil || $receiver == null){
  333. $1="";
  334. } else {
  335. $1=$2;
  336. };
  337. return $1;
  338. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.HLInspectorModel)})},
  339. args: [],
  340. source: "selection\x0a\x09^ selection ifNil:[ '' ]",
  341. messageSends: ["ifNil:"],
  342. referencedClasses: []
  343. }),
  344. globals.HLInspectorModel);
  345. smalltalk.addMethod(
  346. smalltalk.method({
  347. selector: "selection:",
  348. protocol: 'accessing',
  349. fn: function (anObject){
  350. var self=this;
  351. function $HLInstanceVariableSelected(){return globals.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  352. return smalltalk.withContext(function($ctx1) {
  353. self["@selection"]=anObject;
  354. _st(self._announcer())._announce_(_st($HLInstanceVariableSelected())._on_(self["@selection"]));
  355. return self}, function($ctx1) {$ctx1.fill(self,"selection:",{anObject:anObject},globals.HLInspectorModel)})},
  356. args: ["anObject"],
  357. source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)",
  358. messageSends: ["announce:", "announcer", "on:"],
  359. referencedClasses: ["HLInstanceVariableSelected"]
  360. }),
  361. globals.HLInspectorModel);
  362. smalltalk.addMethod(
  363. smalltalk.method({
  364. selector: "subscribe:",
  365. protocol: 'actions',
  366. fn: function (aWidget){
  367. var self=this;
  368. return smalltalk.withContext(function($ctx1) {
  369. _st(aWidget)._subscribeTo_(self._announcer());
  370. return self}, function($ctx1) {$ctx1.fill(self,"subscribe:",{aWidget:aWidget},globals.HLInspectorModel)})},
  371. args: ["aWidget"],
  372. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  373. messageSends: ["subscribeTo:", "announcer"],
  374. referencedClasses: []
  375. }),
  376. globals.HLInspectorModel);
  377. smalltalk.addMethod(
  378. smalltalk.method({
  379. selector: "variables",
  380. protocol: 'accessing',
  381. fn: function (){
  382. var self=this;
  383. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  384. return smalltalk.withContext(function($ctx1) {
  385. var $2,$1;
  386. $2=self["@variables"];
  387. if(($receiver = $2) == nil || $receiver == null){
  388. $1=_st($Dictionary())._new();
  389. } else {
  390. $1=$2;
  391. };
  392. return $1;
  393. }, function($ctx1) {$ctx1.fill(self,"variables",{},globals.HLInspectorModel)})},
  394. args: [],
  395. source: "variables\x0a\x09^ variables ifNil: [ Dictionary new ]",
  396. messageSends: ["ifNil:", "new"],
  397. referencedClasses: ["Dictionary"]
  398. }),
  399. globals.HLInspectorModel);
  400. smalltalk.addMethod(
  401. smalltalk.method({
  402. selector: "variables:",
  403. protocol: 'accessing',
  404. fn: function (aCollection){
  405. var self=this;
  406. self["@variables"]=aCollection;
  407. return self},
  408. args: ["aCollection"],
  409. source: "variables: aCollection\x0a\x09variables := aCollection",
  410. messageSends: [],
  411. referencedClasses: []
  412. }),
  413. globals.HLInspectorModel);
  414. smalltalk.addMethod(
  415. smalltalk.method({
  416. selector: "on:",
  417. protocol: 'actions',
  418. fn: function (anEnvironment){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) {
  421. var $2,$3,$1;
  422. $2=self._new();
  423. _st($2)._environment_(anEnvironment);
  424. $3=_st($2)._yourself();
  425. $1=$3;
  426. return $1;
  427. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},globals.HLInspectorModel.klass)})},
  428. args: ["anEnvironment"],
  429. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  430. messageSends: ["environment:", "new", "yourself"],
  431. referencedClasses: []
  432. }),
  433. globals.HLInspectorModel.klass);
  434. smalltalk.addClass('HLInspectorVariablesWidget', globals.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  435. smalltalk.addMethod(
  436. smalltalk.method({
  437. selector: "announcer",
  438. protocol: 'accessing',
  439. fn: function (){
  440. var self=this;
  441. function $Announcer(){return globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  442. return smalltalk.withContext(function($ctx1) {
  443. var $2,$1;
  444. $2=self["@announcer"];
  445. if(($receiver = $2) == nil || $receiver == null){
  446. self["@announcer"]=_st($Announcer())._new();
  447. $1=self["@announcer"];
  448. } else {
  449. $1=$2;
  450. };
  451. return $1;
  452. }, function($ctx1) {$ctx1.fill(self,"announcer",{},globals.HLInspectorVariablesWidget)})},
  453. args: [],
  454. source: "announcer\x0a\x09^ announcer ifNil:[ announcer := Announcer new ]",
  455. messageSends: ["ifNil:", "new"],
  456. referencedClasses: ["Announcer"]
  457. }),
  458. globals.HLInspectorVariablesWidget);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "defaultItems",
  462. protocol: 'defaults',
  463. fn: function (){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. var $1;
  467. $1=self._variables();
  468. return $1;
  469. }, function($ctx1) {$ctx1.fill(self,"defaultItems",{},globals.HLInspectorVariablesWidget)})},
  470. args: [],
  471. source: "defaultItems\x0a\x09^ self variables",
  472. messageSends: ["variables"],
  473. referencedClasses: []
  474. }),
  475. globals.HLInspectorVariablesWidget);
  476. smalltalk.addMethod(
  477. smalltalk.method({
  478. selector: "label",
  479. protocol: 'accessing',
  480. fn: function (){
  481. var self=this;
  482. return smalltalk.withContext(function($ctx1) {
  483. var $1;
  484. $1=_st(self._model())._label();
  485. return $1;
  486. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorVariablesWidget)})},
  487. args: [],
  488. source: "label\x0a\x09^ self model label",
  489. messageSends: ["label", "model"],
  490. referencedClasses: []
  491. }),
  492. globals.HLInspectorVariablesWidget);
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "model",
  496. protocol: 'accessing',
  497. fn: function (){
  498. var self=this;
  499. var $1;
  500. $1=self["@model"];
  501. return $1;
  502. },
  503. args: [],
  504. source: "model\x0a ^ model",
  505. messageSends: [],
  506. referencedClasses: []
  507. }),
  508. globals.HLInspectorVariablesWidget);
  509. smalltalk.addMethod(
  510. smalltalk.method({
  511. selector: "model:",
  512. protocol: 'accessing',
  513. fn: function (aModel){
  514. var self=this;
  515. self["@model"]=aModel;
  516. return self},
  517. args: ["aModel"],
  518. source: "model: aModel\x0a model := aModel",
  519. messageSends: [],
  520. referencedClasses: []
  521. }),
  522. globals.HLInspectorVariablesWidget);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "refresh",
  526. protocol: 'actions',
  527. fn: function (){
  528. var self=this;
  529. return smalltalk.withContext(function($ctx1) {
  530. var $1;
  531. $1=_st(self._variables()).__eq(self._items());
  532. if(! smalltalk.assert($1)){
  533. self._resetItems();
  534. globals.HLInspectorVariablesWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
  535. };
  536. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.HLInspectorVariablesWidget)})},
  537. args: [],
  538. source: "refresh\x0a\x09self variables = self items ifFalse: [\x0a\x09\x09self resetItems.\x0a \x09super refresh ]",
  539. messageSends: ["ifFalse:", "=", "variables", "items", "resetItems", "refresh"],
  540. referencedClasses: []
  541. }),
  542. globals.HLInspectorVariablesWidget);
  543. smalltalk.addMethod(
  544. smalltalk.method({
  545. selector: "renderButtonsOn:",
  546. protocol: 'rendering',
  547. fn: function (html){
  548. var self=this;
  549. function $HLDiveRequested(){return globals.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  550. return smalltalk.withContext(function($ctx1) {
  551. var $1,$2;
  552. $1=_st(html)._button();
  553. _st($1)._class_("btn");
  554. _st($1)._with_("Dive");
  555. $2=_st($1)._onClick_((function(){
  556. return smalltalk.withContext(function($ctx2) {
  557. return _st(self._announcer())._announce_(_st($HLDiveRequested())._new());
  558. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  559. self["@diveButton"]=$2;
  560. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  561. args: ["html"],
  562. source: "renderButtonsOn: html\x0a\x09diveButton := html button \x0a\x09\x09class: 'btn';\x0a\x09\x09with: 'Dive'; \x0a\x09\x09onClick: [ self announcer announce: HLDiveRequested new ]",
  563. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "announcer", "new"],
  564. referencedClasses: ["HLDiveRequested"]
  565. }),
  566. globals.HLInspectorVariablesWidget);
  567. smalltalk.addMethod(
  568. smalltalk.method({
  569. selector: "renderContentOn:",
  570. protocol: 'rendering',
  571. fn: function (html){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) {
  574. self._renderHeadOn_(html);
  575. globals.HLInspectorVariablesWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
  576. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  577. args: ["html"],
  578. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09super renderContentOn: html",
  579. messageSends: ["renderHeadOn:", "renderContentOn:"],
  580. referencedClasses: []
  581. }),
  582. globals.HLInspectorVariablesWidget);
  583. smalltalk.addMethod(
  584. smalltalk.method({
  585. selector: "renderHeadOn:",
  586. protocol: 'rendering',
  587. fn: function (html){
  588. var self=this;
  589. return smalltalk.withContext(function($ctx1) {
  590. var $1,$2;
  591. $1=_st(html)._div();
  592. _st($1)._class_("list-label");
  593. $2=_st($1)._with_(self._label());
  594. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},globals.HLInspectorVariablesWidget)})},
  595. args: ["html"],
  596. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: self label",
  597. messageSends: ["class:", "div", "with:", "label"],
  598. referencedClasses: []
  599. }),
  600. globals.HLInspectorVariablesWidget);
  601. smalltalk.addMethod(
  602. smalltalk.method({
  603. selector: "resetItems",
  604. protocol: 'actions',
  605. fn: function (){
  606. var self=this;
  607. self["@items"]=nil;
  608. return self},
  609. args: [],
  610. source: "resetItems\x0a\x09items := nil",
  611. messageSends: [],
  612. referencedClasses: []
  613. }),
  614. globals.HLInspectorVariablesWidget);
  615. smalltalk.addMethod(
  616. smalltalk.method({
  617. selector: "selectItem:",
  618. protocol: 'reactions',
  619. fn: function (anObject){
  620. var self=this;
  621. return smalltalk.withContext(function($ctx1) {
  622. globals.HLInspectorVariablesWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [anObject]);
  623. _st(self._model())._selectedInstVar_(anObject);
  624. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},globals.HLInspectorVariablesWidget)})},
  625. args: ["anObject"],
  626. source: "selectItem: anObject\x0a\x09super selectItem: anObject.\x0a self model selectedInstVar: anObject",
  627. messageSends: ["selectItem:", "selectedInstVar:", "model"],
  628. referencedClasses: []
  629. }),
  630. globals.HLInspectorVariablesWidget);
  631. smalltalk.addMethod(
  632. smalltalk.method({
  633. selector: "selection",
  634. protocol: 'accessing',
  635. fn: function (){
  636. var self=this;
  637. return smalltalk.withContext(function($ctx1) {
  638. var $1;
  639. $1=_st(self["@model"])._selection();
  640. return $1;
  641. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.HLInspectorVariablesWidget)})},
  642. args: [],
  643. source: "selection\x0a\x09^ model selection",
  644. messageSends: ["selection"],
  645. referencedClasses: []
  646. }),
  647. globals.HLInspectorVariablesWidget);
  648. smalltalk.addMethod(
  649. smalltalk.method({
  650. selector: "variables",
  651. protocol: 'accessing',
  652. fn: function (){
  653. var self=this;
  654. return smalltalk.withContext(function($ctx1) {
  655. var $1;
  656. $1=_st(_st(self._model())._variables())._keys();
  657. return $1;
  658. }, function($ctx1) {$ctx1.fill(self,"variables",{},globals.HLInspectorVariablesWidget)})},
  659. args: [],
  660. source: "variables\x0a\x09^ self model variables keys",
  661. messageSends: ["keys", "variables", "model"],
  662. referencedClasses: []
  663. }),
  664. globals.HLInspectorVariablesWidget);
  665. smalltalk.addClass('HLInspectorWidget', globals.HLWidget, ['model', 'variablesWidget', 'displayWidget', 'codeWidget'], 'Helios-Inspector');
  666. smalltalk.addMethod(
  667. smalltalk.method({
  668. selector: "codeWidget",
  669. protocol: 'accessing',
  670. fn: function (){
  671. var self=this;
  672. function $HLCodeWidget(){return globals.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
  673. return smalltalk.withContext(function($ctx1) {
  674. var $2,$3,$4,$1;
  675. $2=self["@codeWidget"];
  676. if(($receiver = $2) == nil || $receiver == null){
  677. $3=_st($HLCodeWidget())._new();
  678. _st($3)._model_(_st(self["@model"])._code());
  679. _st($3)._receiver_(_st(self["@model"])._inspectee());
  680. $4=_st($3)._yourself();
  681. self["@codeWidget"]=$4;
  682. $1=self["@codeWidget"];
  683. } else {
  684. $1=$2;
  685. };
  686. return $1;
  687. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},globals.HLInspectorWidget)})},
  688. args: [],
  689. source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := HLCodeWidget new\x0a \x09\x09model: model code;\x0a \x09receiver: model inspectee;\x0a \x09yourself ]",
  690. messageSends: ["ifNil:", "model:", "new", "code", "receiver:", "inspectee", "yourself"],
  691. referencedClasses: ["HLCodeWidget"]
  692. }),
  693. globals.HLInspectorWidget);
  694. smalltalk.addMethod(
  695. smalltalk.method({
  696. selector: "displayWidget",
  697. protocol: 'accessing',
  698. fn: function (){
  699. var self=this;
  700. function $HLInspectorDisplayWidget(){return globals.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
  701. return smalltalk.withContext(function($ctx1) {
  702. var $2,$3,$4,$1;
  703. $2=self["@displayWidget"];
  704. if(($receiver = $2) == nil || $receiver == null){
  705. $3=_st($HLInspectorDisplayWidget())._new();
  706. _st($3)._model_(self._model());
  707. $4=_st($3)._yourself();
  708. self["@displayWidget"]=$4;
  709. $1=self["@displayWidget"];
  710. } else {
  711. $1=$2;
  712. };
  713. return $1;
  714. }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},globals.HLInspectorWidget)})},
  715. args: [],
  716. source: "displayWidget\x0a\x09^ displayWidget ifNil: [\x0a\x09\x09displayWidget := HLInspectorDisplayWidget new\x0a \x09\x09model: self model;\x0a \x09yourself ]",
  717. messageSends: ["ifNil:", "model:", "new", "model", "yourself"],
  718. referencedClasses: ["HLInspectorDisplayWidget"]
  719. }),
  720. globals.HLInspectorWidget);
  721. smalltalk.addMethod(
  722. smalltalk.method({
  723. selector: "initialize",
  724. protocol: 'accessing',
  725. fn: function (){
  726. var self=this;
  727. return smalltalk.withContext(function($ctx1) {
  728. globals.HLInspectorWidget.superclass.fn.prototype._initialize.apply(_st(self), []);
  729. self._register();
  730. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspectorWidget)})},
  731. args: [],
  732. source: "initialize\x0a\x09super initialize.\x0a\x09self register",
  733. messageSends: ["initialize", "register"],
  734. referencedClasses: []
  735. }),
  736. globals.HLInspectorWidget);
  737. smalltalk.addMethod(
  738. smalltalk.method({
  739. selector: "inspect:",
  740. protocol: 'actions',
  741. fn: function (anObject){
  742. var self=this;
  743. return smalltalk.withContext(function($ctx1) {
  744. var $1;
  745. _st(self._model())._inspect_on_(anObject,self);
  746. self._refreshVariablesWidget();
  747. $1=self._refreshDisplayWidget();
  748. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspectorWidget)})},
  749. args: ["anObject"],
  750. source: "inspect: anObject\x0a\x09self model inspect: anObject on: self.\x0a \x0a\x09self \x0a \x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
  751. messageSends: ["inspect:on:", "model", "refreshVariablesWidget", "refreshDisplayWidget"],
  752. referencedClasses: []
  753. }),
  754. globals.HLInspectorWidget);
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "inspectee",
  758. protocol: 'accessing',
  759. fn: function (){
  760. var self=this;
  761. return smalltalk.withContext(function($ctx1) {
  762. var $1;
  763. $1=_st(self._model())._inspectee();
  764. return $1;
  765. }, function($ctx1) {$ctx1.fill(self,"inspectee",{},globals.HLInspectorWidget)})},
  766. args: [],
  767. source: "inspectee\x0a\x09^ self model inspectee",
  768. messageSends: ["inspectee", "model"],
  769. referencedClasses: []
  770. }),
  771. globals.HLInspectorWidget);
  772. smalltalk.addMethod(
  773. smalltalk.method({
  774. selector: "inspectee:",
  775. protocol: 'accessing',
  776. fn: function (anObject){
  777. var self=this;
  778. return smalltalk.withContext(function($ctx1) {
  779. _st(self._model())._inspectee_(anObject);
  780. return self}, function($ctx1) {$ctx1.fill(self,"inspectee:",{anObject:anObject},globals.HLInspectorWidget)})},
  781. args: ["anObject"],
  782. source: "inspectee: anObject\x0a\x09self model inspectee: anObject",
  783. messageSends: ["inspectee:", "model"],
  784. referencedClasses: []
  785. }),
  786. globals.HLInspectorWidget);
  787. smalltalk.addMethod(
  788. smalltalk.method({
  789. selector: "label",
  790. protocol: 'accessing',
  791. fn: function (){
  792. var self=this;
  793. return smalltalk.withContext(function($ctx1) {
  794. var $1;
  795. $1=_st(self._model())._label();
  796. return $1;
  797. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.HLInspectorWidget)})},
  798. args: [],
  799. source: "label\x0a ^ self model label",
  800. messageSends: ["label", "model"],
  801. referencedClasses: []
  802. }),
  803. globals.HLInspectorWidget);
  804. smalltalk.addMethod(
  805. smalltalk.method({
  806. selector: "model",
  807. protocol: 'accessing',
  808. fn: function (){
  809. var self=this;
  810. function $HLInspectorModel(){return globals.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
  811. return smalltalk.withContext(function($ctx1) {
  812. var $2,$1;
  813. $2=self["@model"];
  814. if(($receiver = $2) == nil || $receiver == null){
  815. self._model_(_st($HLInspectorModel())._new());
  816. $1=self["@model"];
  817. } else {
  818. $1=$2;
  819. };
  820. return $1;
  821. }, function($ctx1) {$ctx1.fill(self,"model",{},globals.HLInspectorWidget)})},
  822. args: [],
  823. source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLInspectorModel new.\x0a\x09\x09model ]",
  824. messageSends: ["ifNil:", "model:", "new"],
  825. referencedClasses: ["HLInspectorModel"]
  826. }),
  827. globals.HLInspectorWidget);
  828. smalltalk.addMethod(
  829. smalltalk.method({
  830. selector: "model:",
  831. protocol: 'accessing',
  832. fn: function (aModel){
  833. var self=this;
  834. return smalltalk.withContext(function($ctx1) {
  835. var $1;
  836. self["@model"]=aModel;
  837. _st(self._codeWidget())._model_(_st(aModel)._code());
  838. self._observeCodeWidget();
  839. self._observeVariablesWidget();
  840. $1=self._observeModel();
  841. return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},globals.HLInspectorWidget)})},
  842. args: ["aModel"],
  843. source: "model: aModel\x0a\x09model := aModel. \x0a self codeWidget model: aModel code.\x0a \x0a self \x0a observeCodeWidget;\x0a \x09observeVariablesWidget;\x0a observeModel",
  844. messageSends: ["model:", "codeWidget", "code", "observeCodeWidget", "observeVariablesWidget", "observeModel"],
  845. referencedClasses: []
  846. }),
  847. globals.HLInspectorWidget);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "observeCodeWidget",
  851. protocol: 'actions',
  852. fn: function (){
  853. var self=this;
  854. function $HLDoItExecuted(){return globals.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
  855. return smalltalk.withContext(function($ctx1) {
  856. _st(_st(self._codeWidget())._announcer())._on_do_($HLDoItExecuted(),(function(){
  857. return smalltalk.withContext(function($ctx2) {
  858. return self._onDoneIt();
  859. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  860. return self}, function($ctx1) {$ctx1.fill(self,"observeCodeWidget",{},globals.HLInspectorWidget)})},
  861. args: [],
  862. source: "observeCodeWidget\x0a\x09self codeWidget announcer \x0a \x09on: HLDoItExecuted \x0a do: [ self onDoneIt ]",
  863. messageSends: ["on:do:", "announcer", "codeWidget", "onDoneIt"],
  864. referencedClasses: ["HLDoItExecuted"]
  865. }),
  866. globals.HLInspectorWidget);
  867. smalltalk.addMethod(
  868. smalltalk.method({
  869. selector: "observeModel",
  870. protocol: 'actions',
  871. fn: function (){
  872. var self=this;
  873. function $HLInstanceVariableSelected(){return globals.HLInstanceVariableSelected||(typeof HLInstanceVariableSelected=="undefined"?nil:HLInstanceVariableSelected)}
  874. return smalltalk.withContext(function($ctx1) {
  875. _st(_st(self._model())._announcer())._on_send_to_($HLInstanceVariableSelected(),"onInstanceVariableSelected",self);
  876. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLInspectorWidget)})},
  877. args: [],
  878. source: "observeModel\x0a\x09self model announcer\x0a on: HLInstanceVariableSelected\x0a\x09\x09send: #onInstanceVariableSelected\x0a\x09\x09to: self",
  879. messageSends: ["on:send:to:", "announcer", "model"],
  880. referencedClasses: ["HLInstanceVariableSelected"]
  881. }),
  882. globals.HLInspectorWidget);
  883. smalltalk.addMethod(
  884. smalltalk.method({
  885. selector: "observeVariablesWidget",
  886. protocol: 'actions',
  887. fn: function (){
  888. var self=this;
  889. function $HLDiveRequested(){return globals.HLDiveRequested||(typeof HLDiveRequested=="undefined"?nil:HLDiveRequested)}
  890. return smalltalk.withContext(function($ctx1) {
  891. _st(_st(self._variablesWidget())._announcer())._on_do_($HLDiveRequested(),(function(){
  892. return smalltalk.withContext(function($ctx2) {
  893. return self._onDive();
  894. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  895. return self}, function($ctx1) {$ctx1.fill(self,"observeVariablesWidget",{},globals.HLInspectorWidget)})},
  896. args: [],
  897. source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a on: HLDiveRequested do:[ self onDive ]",
  898. messageSends: ["on:do:", "announcer", "variablesWidget", "onDive"],
  899. referencedClasses: ["HLDiveRequested"]
  900. }),
  901. globals.HLInspectorWidget);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "onDive",
  905. protocol: 'reactions',
  906. fn: function (){
  907. var self=this;
  908. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  909. return smalltalk.withContext(function($ctx1) {
  910. var $1,$2;
  911. $1=_st($HLInspector())._new();
  912. _st($1)._inspect_(_st(self._model())._selectedInstVarObject());
  913. $2=_st($1)._openAsTab();
  914. return self}, function($ctx1) {$ctx1.fill(self,"onDive",{},globals.HLInspectorWidget)})},
  915. args: [],
  916. source: "onDive\x0a\x0a\x09HLInspector new \x0a\x09\x09inspect: self model selectedInstVarObject;\x0a\x09\x09openAsTab",
  917. messageSends: ["inspect:", "new", "selectedInstVarObject", "model", "openAsTab"],
  918. referencedClasses: ["HLInspector"]
  919. }),
  920. globals.HLInspectorWidget);
  921. smalltalk.addMethod(
  922. smalltalk.method({
  923. selector: "onDoneIt",
  924. protocol: 'reactions',
  925. fn: function (){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. self._refresh();
  929. return self}, function($ctx1) {$ctx1.fill(self,"onDoneIt",{},globals.HLInspectorWidget)})},
  930. args: [],
  931. source: "onDoneIt\x0a\x0a\x09self refresh",
  932. messageSends: ["refresh"],
  933. referencedClasses: []
  934. }),
  935. globals.HLInspectorWidget);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "onInspectIt",
  939. protocol: 'reactions',
  940. fn: function (){
  941. var self=this;
  942. return self},
  943. args: [],
  944. source: "onInspectIt",
  945. messageSends: [],
  946. referencedClasses: []
  947. }),
  948. globals.HLInspectorWidget);
  949. smalltalk.addMethod(
  950. smalltalk.method({
  951. selector: "onInstanceVariableSelected",
  952. protocol: 'reactions',
  953. fn: function (){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) {
  956. _st(self._codeWidget())._receiver_(_st(self._model())._selectedInstVarObject());
  957. self._refreshDisplayWidget();
  958. return self}, function($ctx1) {$ctx1.fill(self,"onInstanceVariableSelected",{},globals.HLInspectorWidget)})},
  959. args: [],
  960. source: "onInstanceVariableSelected\x0a\x09self codeWidget receiver: self model selectedInstVarObject.\x0a\x09self refreshDisplayWidget",
  961. messageSends: ["receiver:", "codeWidget", "selectedInstVarObject", "model", "refreshDisplayWidget"],
  962. referencedClasses: []
  963. }),
  964. globals.HLInspectorWidget);
  965. smalltalk.addMethod(
  966. smalltalk.method({
  967. selector: "onPrintIt",
  968. protocol: 'reactions',
  969. fn: function (){
  970. var self=this;
  971. return self},
  972. args: [],
  973. source: "onPrintIt",
  974. messageSends: [],
  975. referencedClasses: []
  976. }),
  977. globals.HLInspectorWidget);
  978. smalltalk.addMethod(
  979. smalltalk.method({
  980. selector: "refresh",
  981. protocol: 'actions',
  982. fn: function (){
  983. var self=this;
  984. return smalltalk.withContext(function($ctx1) {
  985. self._inspect_(self._inspectee());
  986. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.HLInspectorWidget)})},
  987. args: [],
  988. source: "refresh\x0a\x09self inspect: self inspectee",
  989. messageSends: ["inspect:", "inspectee"],
  990. referencedClasses: []
  991. }),
  992. globals.HLInspectorWidget);
  993. smalltalk.addMethod(
  994. smalltalk.method({
  995. selector: "refreshDisplayWidget",
  996. protocol: 'actions',
  997. fn: function (){
  998. var self=this;
  999. return smalltalk.withContext(function($ctx1) {
  1000. _st(self._displayWidget())._refresh();
  1001. return self}, function($ctx1) {$ctx1.fill(self,"refreshDisplayWidget",{},globals.HLInspectorWidget)})},
  1002. args: [],
  1003. source: "refreshDisplayWidget\x0a\x09self displayWidget refresh",
  1004. messageSends: ["refresh", "displayWidget"],
  1005. referencedClasses: []
  1006. }),
  1007. globals.HLInspectorWidget);
  1008. smalltalk.addMethod(
  1009. smalltalk.method({
  1010. selector: "refreshVariablesWidget",
  1011. protocol: 'actions',
  1012. fn: function (){
  1013. var self=this;
  1014. return smalltalk.withContext(function($ctx1) {
  1015. _st(self._variablesWidget())._refresh();
  1016. return self}, function($ctx1) {$ctx1.fill(self,"refreshVariablesWidget",{},globals.HLInspectorWidget)})},
  1017. args: [],
  1018. source: "refreshVariablesWidget\x0a\x09self variablesWidget refresh",
  1019. messageSends: ["refresh", "variablesWidget"],
  1020. referencedClasses: []
  1021. }),
  1022. globals.HLInspectorWidget);
  1023. smalltalk.addMethod(
  1024. smalltalk.method({
  1025. selector: "register",
  1026. protocol: 'registration',
  1027. fn: function (){
  1028. var self=this;
  1029. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1030. return smalltalk.withContext(function($ctx1) {
  1031. _st($HLInspector())._register_(self);
  1032. return self}, function($ctx1) {$ctx1.fill(self,"register",{},globals.HLInspectorWidget)})},
  1033. args: [],
  1034. source: "register\x0a\x09HLInspector register: self",
  1035. messageSends: ["register:"],
  1036. referencedClasses: ["HLInspector"]
  1037. }),
  1038. globals.HLInspectorWidget);
  1039. smalltalk.addMethod(
  1040. smalltalk.method({
  1041. selector: "renderContentOn:",
  1042. protocol: 'rendering',
  1043. fn: function (html){
  1044. var self=this;
  1045. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1046. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1047. return smalltalk.withContext(function($ctx1) {
  1048. var $1;
  1049. $1=_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget());
  1050. $ctx1.sendIdx["with:with:"]=1;
  1051. _st(html)._with_($1);
  1052. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspectorWidget)})},
  1053. args: ["html"],
  1054. source: "renderContentOn: html\x0a \x09html with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)",
  1055. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  1056. referencedClasses: ["HLHorizontalSplitter", "HLVerticalSplitter"]
  1057. }),
  1058. globals.HLInspectorWidget);
  1059. smalltalk.addMethod(
  1060. smalltalk.method({
  1061. selector: "setLabel:",
  1062. protocol: 'actions',
  1063. fn: function (aString){
  1064. var self=this;
  1065. return smalltalk.withContext(function($ctx1) {
  1066. _st(self._model())._label_(aString);
  1067. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},globals.HLInspectorWidget)})},
  1068. args: ["aString"],
  1069. source: "setLabel: aString\x0a\x09self model label: aString",
  1070. messageSends: ["label:", "model"],
  1071. referencedClasses: []
  1072. }),
  1073. globals.HLInspectorWidget);
  1074. smalltalk.addMethod(
  1075. smalltalk.method({
  1076. selector: "setVariables:",
  1077. protocol: 'actions',
  1078. fn: function (aDictionary){
  1079. var self=this;
  1080. return smalltalk.withContext(function($ctx1) {
  1081. _st(self._model())._variables_(aDictionary);
  1082. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aDictionary:aDictionary},globals.HLInspectorWidget)})},
  1083. args: ["aDictionary"],
  1084. source: "setVariables: aDictionary\x0a\x09self model variables: aDictionary",
  1085. messageSends: ["variables:", "model"],
  1086. referencedClasses: []
  1087. }),
  1088. globals.HLInspectorWidget);
  1089. smalltalk.addMethod(
  1090. smalltalk.method({
  1091. selector: "tabLabel",
  1092. protocol: 'accessing',
  1093. fn: function (){
  1094. var self=this;
  1095. return "Inspector";
  1096. },
  1097. args: [],
  1098. source: "tabLabel\x0a ^ 'Inspector'",
  1099. messageSends: [],
  1100. referencedClasses: []
  1101. }),
  1102. globals.HLInspectorWidget);
  1103. smalltalk.addMethod(
  1104. smalltalk.method({
  1105. selector: "unregister",
  1106. protocol: 'registration',
  1107. fn: function (){
  1108. var self=this;
  1109. function $HLInspector(){return globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  1110. return smalltalk.withContext(function($ctx1) {
  1111. globals.HLInspectorWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
  1112. _st($HLInspector())._unregister_(self);
  1113. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLInspectorWidget)})},
  1114. args: [],
  1115. source: "unregister\x0a\x09super unregister.\x0a\x09HLInspector unregister: self",
  1116. messageSends: ["unregister", "unregister:"],
  1117. referencedClasses: ["HLInspector"]
  1118. }),
  1119. globals.HLInspectorWidget);
  1120. smalltalk.addMethod(
  1121. smalltalk.method({
  1122. selector: "variablesWidget",
  1123. protocol: 'accessing',
  1124. fn: function (){
  1125. var self=this;
  1126. function $HLInspectorVariablesWidget(){return globals.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
  1127. return smalltalk.withContext(function($ctx1) {
  1128. var $2,$3,$4,$1;
  1129. $2=self["@variablesWidget"];
  1130. if(($receiver = $2) == nil || $receiver == null){
  1131. $3=_st($HLInspectorVariablesWidget())._new();
  1132. _st($3)._model_(self._model());
  1133. $4=_st($3)._yourself();
  1134. self["@variablesWidget"]=$4;
  1135. $1=self["@variablesWidget"];
  1136. } else {
  1137. $1=$2;
  1138. };
  1139. return $1;
  1140. }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},globals.HLInspectorWidget)})},
  1141. args: [],
  1142. source: "variablesWidget\x0a\x09^ variablesWidget ifNil: [\x0a\x09\x09variablesWidget := HLInspectorVariablesWidget new\x0a \x09\x09model: self model;\x0a \x09yourself ]",
  1143. messageSends: ["ifNil:", "model:", "new", "model", "yourself"],
  1144. referencedClasses: ["HLInspectorVariablesWidget"]
  1145. }),
  1146. globals.HLInspectorWidget);
  1147. smalltalk.addClass('HLInspector', globals.HLInspectorWidget, [], 'Helios-Inspector');
  1148. smalltalk.addMethod(
  1149. smalltalk.method({
  1150. selector: "renderContentOn:",
  1151. protocol: 'rendering',
  1152. fn: function (html){
  1153. var self=this;
  1154. function $HLContainer(){return globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  1155. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  1156. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  1157. return smalltalk.withContext(function($ctx1) {
  1158. var $4,$3,$2,$1;
  1159. $4=self._variablesWidget();
  1160. $ctx1.sendIdx["variablesWidget"]=1;
  1161. $3=_st($HLVerticalSplitter())._with_with_($4,self._displayWidget());
  1162. $2=_st($HLHorizontalSplitter())._with_with_($3,self._codeWidget());
  1163. $ctx1.sendIdx["with:with:"]=1;
  1164. $1=_st($HLContainer())._with_($2);
  1165. _st(html)._with_($1);
  1166. $ctx1.sendIdx["with:"]=1;
  1167. _st(self._variablesWidget())._focus();
  1168. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLInspector)})},
  1169. args: ["html"],
  1170. source: "renderContentOn: html\x0a \x09html with: (HLContainer with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a with: self variablesWidget\x0a with: self displayWidget)\x0a with: self codeWidget)).\x0a\x09\x0a\x09self variablesWidget focus",
  1171. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget", "focus"],
  1172. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  1173. }),
  1174. globals.HLInspector);
  1175. globals.HLInspector.klass.iVarNames = ['inspectors'];
  1176. smalltalk.addMethod(
  1177. smalltalk.method({
  1178. selector: "canBeOpenAsTab",
  1179. protocol: 'testing',
  1180. fn: function (){
  1181. var self=this;
  1182. return false;
  1183. },
  1184. args: [],
  1185. source: "canBeOpenAsTab\x0a\x09^ false",
  1186. messageSends: [],
  1187. referencedClasses: []
  1188. }),
  1189. globals.HLInspector.klass);
  1190. smalltalk.addMethod(
  1191. smalltalk.method({
  1192. selector: "initialize",
  1193. protocol: 'initialization',
  1194. fn: function (){
  1195. var self=this;
  1196. return smalltalk.withContext(function($ctx1) {
  1197. globals.HLInspector.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  1198. self._watchChanges();
  1199. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.HLInspector.klass)})},
  1200. args: [],
  1201. source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
  1202. messageSends: ["initialize", "watchChanges"],
  1203. referencedClasses: []
  1204. }),
  1205. globals.HLInspector.klass);
  1206. smalltalk.addMethod(
  1207. smalltalk.method({
  1208. selector: "inspect:",
  1209. protocol: 'actions',
  1210. fn: function (anObject){
  1211. var self=this;
  1212. return smalltalk.withContext(function($ctx1) {
  1213. var $1,$2;
  1214. $1=self._new();
  1215. _st($1)._openAsTab();
  1216. $2=_st($1)._inspect_(anObject);
  1217. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.HLInspector.klass)})},
  1218. args: ["anObject"],
  1219. source: "inspect: anObject\x0a\x09self new\x0a\x09\x09openAsTab;\x0a\x09\x09inspect: anObject",
  1220. messageSends: ["openAsTab", "new", "inspect:"],
  1221. referencedClasses: []
  1222. }),
  1223. globals.HLInspector.klass);
  1224. smalltalk.addMethod(
  1225. smalltalk.method({
  1226. selector: "inspectors",
  1227. protocol: 'accessing',
  1228. fn: function (){
  1229. var self=this;
  1230. function $OrderedCollection(){return globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  1231. return smalltalk.withContext(function($ctx1) {
  1232. var $2,$1;
  1233. $2=self["@inspectors"];
  1234. if(($receiver = $2) == nil || $receiver == null){
  1235. self["@inspectors"]=_st($OrderedCollection())._new();
  1236. $1=self["@inspectors"];
  1237. } else {
  1238. $1=$2;
  1239. };
  1240. return $1;
  1241. }, function($ctx1) {$ctx1.fill(self,"inspectors",{},globals.HLInspector.klass)})},
  1242. args: [],
  1243. source: "inspectors\x0a\x09^ inspectors ifNil: [ inspectors := OrderedCollection new ]",
  1244. messageSends: ["ifNil:", "new"],
  1245. referencedClasses: ["OrderedCollection"]
  1246. }),
  1247. globals.HLInspector.klass);
  1248. smalltalk.addMethod(
  1249. smalltalk.method({
  1250. selector: "register:",
  1251. protocol: 'registration',
  1252. fn: function (anInspector){
  1253. var self=this;
  1254. return smalltalk.withContext(function($ctx1) {
  1255. _st(self._inspectors())._add_(anInspector);
  1256. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1257. args: ["anInspector"],
  1258. source: "register: anInspector\x0a\x09self inspectors add: anInspector",
  1259. messageSends: ["add:", "inspectors"],
  1260. referencedClasses: []
  1261. }),
  1262. globals.HLInspector.klass);
  1263. smalltalk.addMethod(
  1264. smalltalk.method({
  1265. selector: "tabClass",
  1266. protocol: 'accessing',
  1267. fn: function (){
  1268. var self=this;
  1269. return "inspector";
  1270. },
  1271. args: [],
  1272. source: "tabClass\x0a\x09^ 'inspector'",
  1273. messageSends: [],
  1274. referencedClasses: []
  1275. }),
  1276. globals.HLInspector.klass);
  1277. smalltalk.addMethod(
  1278. smalltalk.method({
  1279. selector: "tabLabel",
  1280. protocol: 'accessing',
  1281. fn: function (){
  1282. var self=this;
  1283. return "Inspector";
  1284. },
  1285. args: [],
  1286. source: "tabLabel\x0a\x09^ 'Inspector'",
  1287. messageSends: [],
  1288. referencedClasses: []
  1289. }),
  1290. globals.HLInspector.klass);
  1291. smalltalk.addMethod(
  1292. smalltalk.method({
  1293. selector: "tabPriority",
  1294. protocol: 'accessing',
  1295. fn: function (){
  1296. var self=this;
  1297. return (10);
  1298. },
  1299. args: [],
  1300. source: "tabPriority\x0a\x09^ 10",
  1301. messageSends: [],
  1302. referencedClasses: []
  1303. }),
  1304. globals.HLInspector.klass);
  1305. smalltalk.addMethod(
  1306. smalltalk.method({
  1307. selector: "unregister:",
  1308. protocol: 'registration',
  1309. fn: function (anInspector){
  1310. var self=this;
  1311. return smalltalk.withContext(function($ctx1) {
  1312. _st(self._inspectors())._remove_(anInspector);
  1313. return self}, function($ctx1) {$ctx1.fill(self,"unregister:",{anInspector:anInspector},globals.HLInspector.klass)})},
  1314. args: ["anInspector"],
  1315. source: "unregister: anInspector\x0a\x09self inspectors remove: anInspector",
  1316. messageSends: ["remove:", "inspectors"],
  1317. referencedClasses: []
  1318. }),
  1319. globals.HLInspector.klass);
  1320. smalltalk.addMethod(
  1321. smalltalk.method({
  1322. selector: "watchChanges",
  1323. protocol: 'initialization',
  1324. fn: function (){
  1325. var self=this;
  1326. return smalltalk.withContext(function($ctx1) {
  1327. _st((function(){
  1328. return smalltalk.withContext(function($ctx2) {
  1329. return _st(self._inspectors())._do_((function(each){
  1330. return smalltalk.withContext(function($ctx3) {
  1331. return _st(each)._refresh();
  1332. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1333. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithInterval_((500));
  1334. return self}, function($ctx1) {$ctx1.fill(self,"watchChanges",{},globals.HLInspector.klass)})},
  1335. args: [],
  1336. source: "watchChanges\x0a\x09[ self inspectors do: [ :each | each refresh ] ]\x0a\x09\x09valueWithInterval: 500",
  1337. messageSends: ["valueWithInterval:", "do:", "inspectors", "refresh"],
  1338. referencedClasses: []
  1339. }),
  1340. globals.HLInspector.klass);
  1341. });