Helios-Inspector.js 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  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. category: 'accessing',
  8. fn: function () {
  9. var self = this;
  10. var $2, $3, $1;
  11. if (($receiver = self['@codeWidget']) == nil || $receiver == undefined) {
  12. $2 = smalltalk.send(smalltalk.HLCodeWidget || HLCodeWidget, "_new", []);
  13. smalltalk.send($2, "_model_", [smalltalk.send(self['@model'], "_code", [])]);
  14. smalltalk.send($2, "_receiver_", [smalltalk.send(self['@model'], "_inspectee", [])]);
  15. $3 = smalltalk.send($2, "_yourself", []);
  16. self['@codeWidget'] = $3;
  17. $1 = self['@codeWidget'];
  18. } else {
  19. $1 = self['@codeWidget'];
  20. }
  21. return $1;
  22. },
  23. args: [],
  24. source: "codeWidget\x0a\x09^ codeWidget ifNil: [\x0a\x09\x09codeWidget := HLCodeWidget new\x0a \x09\x09model: model code;\x0a \x09receiver: model inspectee;\x0a \x09yourself ]",
  25. messageSends: ["ifNil:", "model:", "code", "new", "receiver:", "inspectee", "yourself"],
  26. referencedClasses: ["HLCodeWidget"]
  27. }),
  28. smalltalk.HLInspector);
  29. smalltalk.addMethod(
  30. "_displayWidget",
  31. smalltalk.method({
  32. selector: "displayWidget",
  33. category: 'accessing',
  34. fn: function () {
  35. var self = this;
  36. var $2, $3, $1;
  37. if (($receiver = self['@displayWidget']) == nil ||
  38. $receiver == undefined) {
  39. $2 = smalltalk.send(smalltalk.HLInspectorDisplayWidget || HLInspectorDisplayWidget, "_new", []);
  40. smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
  41. $3 = smalltalk.send($2, "_yourself", []);
  42. self['@displayWidget'] = $3;
  43. $1 = self['@displayWidget'];
  44. } else {
  45. $1 = self['@displayWidget'];
  46. }
  47. return $1;
  48. },
  49. args: [],
  50. source: "displayWidget\x0a\x09^ displayWidget ifNil: [\x0a\x09\x09displayWidget := HLInspectorDisplayWidget new\x0a \x09\x09model: self model;\x0a \x09yourself ]",
  51. messageSends: ["ifNil:", "model:", "model", "new", "yourself"],
  52. referencedClasses: ["HLInspectorDisplayWidget"]
  53. }),
  54. smalltalk.HLInspector);
  55. smalltalk.addMethod(
  56. "_inspect_",
  57. smalltalk.method({
  58. selector: "inspect:",
  59. category: 'actions',
  60. fn: function (anObject) {
  61. var self = this;
  62. var $1;
  63. smalltalk.send(smalltalk.send(self, "_model", []), "_inspect_on_", [anObject, self]);
  64. smalltalk.send(self, "_refreshVariablesWidget", []);
  65. $1 = smalltalk.send(self, "_refreshDisplayWidget", []);
  66. return self;
  67. },
  68. args: ["anObject"],
  69. source: "inspect: anObject\x0a\x09self model inspect: anObject on: self.\x0a \x0a\x09self \x0a \x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
  70. messageSends: ["inspect:on:", "model", "refreshVariablesWidget", "refreshDisplayWidget"],
  71. referencedClasses: []
  72. }),
  73. smalltalk.HLInspector);
  74. smalltalk.addMethod(
  75. "_inspectee",
  76. smalltalk.method({
  77. selector: "inspectee",
  78. category: 'accessing',
  79. fn: function () {
  80. var self = this;
  81. var $1;
  82. $1 = smalltalk.send(smalltalk.send(self, "_model", []), "_inspectee", []);
  83. return $1;
  84. },
  85. args: [],
  86. source: "inspectee\x0a\x09^ self model inspectee",
  87. messageSends: ["inspectee", "model"],
  88. referencedClasses: []
  89. }),
  90. smalltalk.HLInspector);
  91. smalltalk.addMethod(
  92. "_inspectee_",
  93. smalltalk.method({
  94. selector: "inspectee:",
  95. category: 'accessing',
  96. fn: function (anObject) {
  97. var self = this;
  98. smalltalk.send(smalltalk.send(self, "_model", []), "_inspectee_", [anObject]);
  99. return self;
  100. },
  101. args: ["anObject"],
  102. source: "inspectee: anObject\x0a\x09self model inspectee: anObject",
  103. messageSends: ["inspectee:", "model"],
  104. referencedClasses: []
  105. }),
  106. smalltalk.HLInspector);
  107. smalltalk.addMethod(
  108. "_label",
  109. smalltalk.method({
  110. selector: "label",
  111. category: 'accessing',
  112. fn: function () {
  113. var self = this;
  114. var $1;
  115. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  116. $1 = smalltalk.send(smalltalk.send(self['@model'], "_inspectee", []), "_printString", []);
  117. } else {
  118. $1 = self['@label'];
  119. }
  120. return $1;
  121. },
  122. args: [],
  123. source: "label\x0a ^ label ifNil: [ model inspectee printString ]",
  124. messageSends: ["ifNil:", "printString", "inspectee"],
  125. referencedClasses: []
  126. }),
  127. smalltalk.HLInspector);
  128. smalltalk.addMethod(
  129. "_model",
  130. smalltalk.method({
  131. selector: "model",
  132. category: 'accessing',
  133. fn: function () {
  134. var self = this;
  135. var $1;
  136. if (($receiver = self['@model']) == nil || $receiver == undefined) {
  137. smalltalk.send(self, "_model_", [smalltalk.send(smalltalk.HLInspectorModel || HLInspectorModel, "_new", [])]);
  138. $1 = self['@model'];
  139. } else {
  140. $1 = self['@model'];
  141. }
  142. return $1;
  143. },
  144. args: [],
  145. source: "model\x0a\x09^ model ifNil: [ \x0a \x09self model: HLInspectorModel new.\x0a\x09\x09model ]",
  146. messageSends: ["ifNil:", "model:", "new"],
  147. referencedClasses: ["HLInspectorModel"]
  148. }),
  149. smalltalk.HLInspector);
  150. smalltalk.addMethod(
  151. "_model_",
  152. smalltalk.method({
  153. selector: "model:",
  154. category: 'accessing',
  155. fn: function (aModel) {
  156. var self = this;
  157. var $1;
  158. self['@model'] = aModel;
  159. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_model_", [smalltalk.send(aModel, "_code", [])]);
  160. smalltalk.send(self, "_observeCodeWidget", []);
  161. smalltalk.send(self, "_observeVariablesWidget", []);
  162. $1 = smalltalk.send(self, "_observeModel", []);
  163. return self;
  164. },
  165. args: ["aModel"],
  166. source: "model: aModel\x0a\x09model := aModel. \x0a self codeWidget model: aModel code.\x0a \x0a self \x0a observeCodeWidget;\x0a \x09observeVariablesWidget;\x0a observeModel",
  167. messageSends: ["model:", "code", "codeWidget", "observeCodeWidget", "observeVariablesWidget", "observeModel"],
  168. referencedClasses: []
  169. }),
  170. smalltalk.HLInspector);
  171. smalltalk.addMethod(
  172. "_observeCodeWidget",
  173. smalltalk.method({
  174. selector: "observeCodeWidget",
  175. category: 'actions',
  176. fn: function () {
  177. var self = this;
  178. smalltalk.send(smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_announcer", []), "_on_do_", [smalltalk.HLDoItExecuted || HLDoItExecuted, function () {return smalltalk.send(self, "_onDoneIt", []);}]);
  179. return self;
  180. },
  181. args: [],
  182. source: "observeCodeWidget\x0a\x09self codeWidget announcer \x0a \x09on: HLDoItExecuted \x0a do: [ self onDoneIt ]\x0a",
  183. messageSends: ["on:do:", "onDoneIt", "announcer", "codeWidget"],
  184. referencedClasses: ["HLDoItExecuted"]
  185. }),
  186. smalltalk.HLInspector);
  187. smalltalk.addMethod(
  188. "_observeModel",
  189. smalltalk.method({
  190. selector: "observeModel",
  191. category: 'actions',
  192. fn: function () {
  193. var self = this;
  194. smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_announcer", []), "_on_do_", [smalltalk.HLInstanceVariableSelected || HLInstanceVariableSelected, function (ann) {return smalltalk.send(self, "_onInstanceVariableSelected", []);}]);
  195. return self;
  196. },
  197. args: [],
  198. source: "observeModel\x0a\x09self model announcer\x0a on: HLInstanceVariableSelected do: [ :ann | self onInstanceVariableSelected ]",
  199. messageSends: ["on:do:", "onInstanceVariableSelected", "announcer", "model"],
  200. referencedClasses: ["HLInstanceVariableSelected"]
  201. }),
  202. smalltalk.HLInspector);
  203. smalltalk.addMethod(
  204. "_observeVariablesWidget",
  205. smalltalk.method({
  206. selector: "observeVariablesWidget",
  207. category: 'actions',
  208. fn: function () {
  209. var self = this;
  210. var $1, $2;
  211. $1 = smalltalk.send(smalltalk.send(self, "_variablesWidget", []), "_announcer", []);
  212. smalltalk.send($1, "_on_do_", [smalltalk.HLRefreshRequested || HLRefreshRequested, function (ann) {return smalltalk.send(self, "_onRefresh", []);}]);
  213. $2 = smalltalk.send($1, "_on_do_", [smalltalk.HLDiveRequested || HLDiveRequested, function () {return smalltalk.send(self, "_onDive", []);}]);
  214. return self;
  215. },
  216. args: [],
  217. source: "observeVariablesWidget\x0a\x09self variablesWidget announcer \x0a \x09on: HLRefreshRequested do: [ :ann | self onRefresh ];\x0a on: HLDiveRequested do:[ self onDive ]\x0a ",
  218. messageSends: ["on:do:", "onRefresh", "announcer", "variablesWidget", "onDive"],
  219. referencedClasses: ["HLRefreshRequested", "HLDiveRequested"]
  220. }),
  221. smalltalk.HLInspector);
  222. smalltalk.addMethod(
  223. "_onDive",
  224. smalltalk.method({
  225. selector: "onDive",
  226. category: 'reactions',
  227. fn: function () {
  228. var self = this;
  229. smalltalk.send(self, "_inspect_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
  230. return self;
  231. },
  232. args: [],
  233. source: "onDive\x0a\x0a\x09self inspect: self model selectedInstVarObject",
  234. messageSends: ["inspect:", "selectedInstVarObject", "model"],
  235. referencedClasses: []
  236. }),
  237. smalltalk.HLInspector);
  238. smalltalk.addMethod(
  239. "_onDoneIt",
  240. smalltalk.method({
  241. selector: "onDoneIt",
  242. category: 'reactions',
  243. fn: function () {
  244. var self = this;
  245. smalltalk.send(self, "_refresh", []);
  246. return self;
  247. },
  248. args: [],
  249. source: "onDoneIt\x0a\x0a\x09self refresh",
  250. messageSends: ["refresh"],
  251. referencedClasses: []
  252. }),
  253. smalltalk.HLInspector);
  254. smalltalk.addMethod(
  255. "_onInspectIt",
  256. smalltalk.method({
  257. selector: "onInspectIt",
  258. category: 'reactions',
  259. fn: function () {
  260. var self = this;
  261. return self;
  262. },
  263. args: [],
  264. source: "onInspectIt",
  265. messageSends: [],
  266. referencedClasses: []
  267. }),
  268. smalltalk.HLInspector);
  269. smalltalk.addMethod(
  270. "_onInstanceVariableSelected",
  271. smalltalk.method({
  272. selector: "onInstanceVariableSelected",
  273. category: 'reactions',
  274. fn: function () {
  275. var self = this;
  276. smalltalk.send(smalltalk.send(self, "_codeWidget", []), "_receiver_", [smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVarObject", [])]);
  277. smalltalk.send(self, "_refreshDisplayWidget", []);
  278. return self;
  279. },
  280. args: [],
  281. source: "onInstanceVariableSelected\x0a\x09self codeWidget receiver: self model selectedInstVarObject.\x0a\x09self refreshDisplayWidget",
  282. messageSends: ["receiver:", "selectedInstVarObject", "model", "codeWidget", "refreshDisplayWidget"],
  283. referencedClasses: []
  284. }),
  285. smalltalk.HLInspector);
  286. smalltalk.addMethod(
  287. "_onPrintIt",
  288. smalltalk.method({
  289. selector: "onPrintIt",
  290. category: 'reactions',
  291. fn: function () {
  292. var self = this;
  293. return self;
  294. },
  295. args: [],
  296. source: "onPrintIt",
  297. messageSends: [],
  298. referencedClasses: []
  299. }),
  300. smalltalk.HLInspector);
  301. smalltalk.addMethod(
  302. "_onRefresh",
  303. smalltalk.method({
  304. selector: "onRefresh",
  305. category: 'reactions',
  306. fn: function () {
  307. var self = this;
  308. smalltalk.send(self, "_refresh", []);
  309. return self;
  310. },
  311. args: [],
  312. source: "onRefresh\x0a\x0a\x09self refresh",
  313. messageSends: ["refresh"],
  314. referencedClasses: []
  315. }),
  316. smalltalk.HLInspector);
  317. smalltalk.addMethod(
  318. "_open",
  319. smalltalk.method({
  320. selector: "open",
  321. category: 'actions',
  322. fn: function () {
  323. var self = this;
  324. smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_addTab_", [smalltalk.send(smalltalk.HLTab || HLTab, "_on_labelled_", [self, smalltalk.send(self, "_tabLabel", [])])]);
  325. return self;
  326. },
  327. args: [],
  328. source: "open\x0a\x09HLManager current addTab: (HLTab on: self labelled: self tabLabel)\x0a",
  329. messageSends: ["addTab:", "on:labelled:", "tabLabel", "current"],
  330. referencedClasses: ["HLTab", "HLManager"]
  331. }),
  332. smalltalk.HLInspector);
  333. smalltalk.addMethod(
  334. "_refresh",
  335. smalltalk.method({
  336. selector: "refresh",
  337. category: 'actions',
  338. fn: function () {
  339. var self = this;
  340. smalltalk.send(self, "_inspect_", [smalltalk.send(self, "_inspectee", [])]);
  341. return self;
  342. },
  343. args: [],
  344. source: "refresh\x0a\x09self inspect: self inspectee",
  345. messageSends: ["inspect:", "inspectee"],
  346. referencedClasses: []
  347. }),
  348. smalltalk.HLInspector);
  349. smalltalk.addMethod(
  350. "_refreshDisplayWidget",
  351. smalltalk.method({
  352. selector: "refreshDisplayWidget",
  353. category: 'actions',
  354. fn: function () {
  355. var self = this;
  356. smalltalk.send(smalltalk.send(self, "_displayWidget", []), "_refresh", []);
  357. return self;
  358. },
  359. args: [],
  360. source: "refreshDisplayWidget\x0a\x09self displayWidget refresh",
  361. messageSends: ["refresh", "displayWidget"],
  362. referencedClasses: []
  363. }),
  364. smalltalk.HLInspector);
  365. smalltalk.addMethod(
  366. "_refreshVariablesWidget",
  367. smalltalk.method({
  368. selector: "refreshVariablesWidget",
  369. category: 'actions',
  370. fn: function () {
  371. var self = this;
  372. smalltalk.send(smalltalk.send(self, "_variablesWidget", []), "_refresh", []);
  373. return self;
  374. },
  375. args: [],
  376. source: "refreshVariablesWidget\x0a\x09self variablesWidget refresh",
  377. messageSends: ["refresh", "variablesWidget"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.HLInspector);
  381. smalltalk.addMethod(
  382. "_renderContentOn_",
  383. smalltalk.method({
  384. selector: "renderContentOn:",
  385. category: 'rendering',
  386. fn: function (html) {
  387. var self = this;
  388. smalltalk.send(html, "_with_", [smalltalk.send(smalltalk.HLContainer || HLContainer, "_with_", [smalltalk.send(smalltalk.HLHorizontalSplitter || HLHorizontalSplitter, "_with_with_", [smalltalk.send(smalltalk.HLVerticalSplitter || HLVerticalSplitter, "_with_with_", [smalltalk.send(self, "_variablesWidget", []), smalltalk.send(self, "_displayWidget", [])]), smalltalk.send(self, "_codeWidget", [])])])]);
  389. return self;
  390. },
  391. args: ["html"],
  392. source: "renderContentOn: html\x0a \x09html with: (HLContainer with: (HLHorizontalSplitter\x0a \x09with: (HLVerticalSplitter \x0a \x09\x09with: self variablesWidget\x0a \x09 with: self displayWidget)\x0a with: self codeWidget))\x0a ",
  393. messageSends: ["with:", "with:with:", "variablesWidget", "displayWidget", "codeWidget"],
  394. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  395. }),
  396. smalltalk.HLInspector);
  397. smalltalk.addMethod(
  398. "_setLabel_",
  399. smalltalk.method({
  400. selector: "setLabel:",
  401. category: 'actions',
  402. fn: function (aString) {
  403. var self = this;
  404. self['@label'] = aString;
  405. return self;
  406. },
  407. args: ["aString"],
  408. source: "setLabel: aString\x0a\x09label := aString",
  409. messageSends: [],
  410. referencedClasses: []
  411. }),
  412. smalltalk.HLInspector);
  413. smalltalk.addMethod(
  414. "_setVariables_",
  415. smalltalk.method({
  416. selector: "setVariables:",
  417. category: 'actions',
  418. fn: function (aDictionary) {
  419. var self = this;
  420. smalltalk.send(smalltalk.send(self, "_model", []), "_variables_", [aDictionary]);
  421. return self;
  422. },
  423. args: ["aDictionary"],
  424. source: "setVariables: aDictionary\x0a\x09self model variables: aDictionary",
  425. messageSends: ["variables:", "model"],
  426. referencedClasses: []
  427. }),
  428. smalltalk.HLInspector);
  429. smalltalk.addMethod(
  430. "_tabLabel",
  431. smalltalk.method({
  432. selector: "tabLabel",
  433. category: 'accessing',
  434. fn: function () {
  435. var self = this;
  436. var $1;
  437. $1 = smalltalk.send(self, "_label", []);
  438. return $1;
  439. },
  440. args: [],
  441. source: "tabLabel\x0a ^ self label",
  442. messageSends: ["label"],
  443. referencedClasses: []
  444. }),
  445. smalltalk.HLInspector);
  446. smalltalk.addMethod(
  447. "_variablesWidget",
  448. smalltalk.method({
  449. selector: "variablesWidget",
  450. category: 'accessing',
  451. fn: function () {
  452. var self = this;
  453. var $2, $3, $1;
  454. if (($receiver = self['@variablesWidget']) == nil ||
  455. $receiver == undefined) {
  456. $2 = smalltalk.send(smalltalk.HLInspectorVariablesWidget ||
  457. HLInspectorVariablesWidget, "_new", []);
  458. smalltalk.send($2, "_model_", [smalltalk.send(self, "_model", [])]);
  459. $3 = smalltalk.send($2, "_yourself", []);
  460. self['@variablesWidget'] = $3;
  461. $1 = self['@variablesWidget'];
  462. } else {
  463. $1 = self['@variablesWidget'];
  464. }
  465. return $1;
  466. },
  467. args: [],
  468. source: "variablesWidget\x0a\x09^ variablesWidget ifNil: [\x0a\x09\x09variablesWidget := HLInspectorVariablesWidget new\x0a \x09\x09model: self model;\x0a \x09yourself ]",
  469. messageSends: ["ifNil:", "model:", "model", "new", "yourself"],
  470. referencedClasses: ["HLInspectorVariablesWidget"]
  471. }),
  472. smalltalk.HLInspector);
  473. smalltalk.addMethod(
  474. "_canBeOpenAsTab",
  475. smalltalk.method({
  476. selector: "canBeOpenAsTab",
  477. category: 'testing',
  478. fn: function () {
  479. var self = this;
  480. return false;
  481. },
  482. args: [],
  483. source: "canBeOpenAsTab\x0a\x09^ false",
  484. messageSends: [],
  485. referencedClasses: []
  486. }),
  487. smalltalk.HLInspector.klass);
  488. smalltalk.addMethod(
  489. "_tabLabel",
  490. smalltalk.method({
  491. selector: "tabLabel",
  492. category: 'accessing',
  493. fn: function () {
  494. var self = this;
  495. return "Inspector";
  496. },
  497. args: [],
  498. source: "tabLabel\x0a\x09^ 'Inspector'",
  499. messageSends: [],
  500. referencedClasses: []
  501. }),
  502. smalltalk.HLInspector.klass);
  503. smalltalk.addMethod(
  504. "_tabPriority",
  505. smalltalk.method({
  506. selector: "tabPriority",
  507. category: 'accessing',
  508. fn: function () {
  509. var self = this;
  510. return 10;
  511. },
  512. args: [],
  513. source: "tabPriority\x0a\x09^ 10",
  514. messageSends: [],
  515. referencedClasses: []
  516. }),
  517. smalltalk.HLInspector.klass);
  518. smalltalk.addClass('HLInspectorDisplayWidget', smalltalk.HLNavigationListWidget, ['model'], 'Helios-Inspector');
  519. smalltalk.addMethod(
  520. "_model",
  521. smalltalk.method({
  522. selector: "model",
  523. category: 'accessing',
  524. fn: function () {
  525. var self = this;
  526. return self['@model'];
  527. },
  528. args: [],
  529. source: "model\x0a\x0a\x09^ model",
  530. messageSends: [],
  531. referencedClasses: []
  532. }),
  533. smalltalk.HLInspectorDisplayWidget);
  534. smalltalk.addMethod(
  535. "_model_",
  536. smalltalk.method({
  537. selector: "model:",
  538. category: 'accessing',
  539. fn: function (aModel) {
  540. var self = this;
  541. self['@model'] = aModel;
  542. return self;
  543. },
  544. args: ["aModel"],
  545. source: "model: aModel\x0a\x0a\x09model := aModel",
  546. messageSends: [],
  547. referencedClasses: []
  548. }),
  549. smalltalk.HLInspectorDisplayWidget);
  550. smalltalk.addMethod(
  551. "_renderContentOn_",
  552. smalltalk.method({
  553. selector: "renderContentOn:",
  554. category: 'rendering',
  555. fn: function (html) {
  556. var self = this;
  557. smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [smalltalk.send(self, "_selectionDisplayString", [])]);
  558. return self;
  559. },
  560. args: ["html"],
  561. source: "renderContentOn: html\x0a\x09\x0a html div with: self selectionDisplayString\x0a ",
  562. messageSends: ["with:", "selectionDisplayString", "div"],
  563. referencedClasses: []
  564. }),
  565. smalltalk.HLInspectorDisplayWidget);
  566. smalltalk.addMethod(
  567. "_selectionDisplayString",
  568. smalltalk.method({
  569. selector: "selectionDisplayString",
  570. category: 'rendering',
  571. fn: function () {
  572. var self = this;
  573. var $2, $1;
  574. var selection;
  575. selection = smalltalk.send(self['@model'], "_selection", []);
  576. $2 = smalltalk.send(smalltalk.send(smalltalk.send(self['@model'], "_variables", []), "_keys", []), "_includes_", [selection]);
  577. if (smalltalk.assert($2)) {
  578. $1 = smalltalk.send(smalltalk.send(self['@model'], "_instVarObjectAt_", [selection]), "_printString", []);
  579. } else {
  580. $1 = "";
  581. }
  582. return $1;
  583. },
  584. args: [],
  585. source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a ^ (model variables keys includes: selection)\x0a \x09ifTrue:[(model instVarObjectAt: selection) printString]\x0a \x09ifFalse:['']",
  586. messageSends: ["selection", "ifTrue:ifFalse:", "printString", "instVarObjectAt:", "includes:", "keys", "variables"],
  587. referencedClasses: []
  588. }),
  589. smalltalk.HLInspectorDisplayWidget);
  590. smalltalk.addClass('HLInspectorModel', smalltalk.Object, ['announcer', 'environment', 'inspectee', 'code', 'variables', 'selection'], 'Helios-Inspector');
  591. smalltalk.addMethod(
  592. "_announcer",
  593. smalltalk.method({
  594. selector: "announcer",
  595. category: 'accessing',
  596. fn: function () {
  597. var self = this;
  598. var $1;
  599. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  600. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  601. $1 = self['@announcer'];
  602. } else {
  603. $1 = self['@announcer'];
  604. }
  605. return $1;
  606. },
  607. args: [],
  608. source: "announcer\x0a\x09^ announcer ifNil: [announcer := Announcer new ]",
  609. messageSends: ["ifNil:", "new"],
  610. referencedClasses: ["Announcer"]
  611. }),
  612. smalltalk.HLInspectorModel);
  613. smalltalk.addMethod(
  614. "_code",
  615. smalltalk.method({
  616. selector: "code",
  617. category: 'accessing',
  618. fn: function () {
  619. var self = this;
  620. var $1;
  621. if (($receiver = self['@code']) == nil || $receiver == undefined) {
  622. self['@code'] = smalltalk.send(smalltalk.HLCodeModel || HLCodeModel, "_on_", [smalltalk.send(self, "_environment", [])]);
  623. $1 = self['@code'];
  624. } else {
  625. $1 = self['@code'];
  626. }
  627. return $1;
  628. },
  629. args: [],
  630. source: "code\x0a\x09\x22Answers the code model working for this workspace model\x22\x0a\x09^ code ifNil:[ code := HLCodeModel on: self environment ]",
  631. messageSends: ["ifNil:", "on:", "environment"],
  632. referencedClasses: ["HLCodeModel"]
  633. }),
  634. smalltalk.HLInspectorModel);
  635. smalltalk.addMethod(
  636. "_environment",
  637. smalltalk.method({
  638. selector: "environment",
  639. category: 'accessing',
  640. fn: function () {
  641. var self = this;
  642. var $1;
  643. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  644. $1 = smalltalk.send(smalltalk.send(smalltalk.HLManager || HLManager, "_current", []), "_environment", []);
  645. } else {
  646. $1 = self['@environment'];
  647. }
  648. return $1;
  649. },
  650. args: [],
  651. source: "environment\x0a\x09^ environment ifNil: [ HLManager current environment ]",
  652. messageSends: ["ifNil:", "environment", "current"],
  653. referencedClasses: ["HLManager"]
  654. }),
  655. smalltalk.HLInspectorModel);
  656. smalltalk.addMethod(
  657. "_environment_",
  658. smalltalk.method({
  659. selector: "environment:",
  660. category: 'accessing',
  661. fn: function (anEnvironment) {
  662. var self = this;
  663. self['@environment'] = anEnvironment;
  664. return self;
  665. },
  666. args: ["anEnvironment"],
  667. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  668. messageSends: [],
  669. referencedClasses: []
  670. }),
  671. smalltalk.HLInspectorModel);
  672. smalltalk.addMethod(
  673. "_inspect_on_",
  674. smalltalk.method({
  675. selector: "inspect:on:",
  676. category: 'actions',
  677. fn: function (anObject, anInspector) {
  678. var self = this;
  679. self['@inspectee'] = anObject;
  680. self['@variables'] = [];
  681. smalltalk.send(self['@inspectee'], "_inspectOn_", [anInspector]);
  682. return self;
  683. },
  684. args: ["anObject", "anInspector"],
  685. source: "inspect: anObject on: anInspector\x0a\x09inspectee := anObject.\x0a\x09variables := #().\x0a\x09inspectee inspectOn: anInspector \x0a",
  686. messageSends: ["inspectOn:"],
  687. referencedClasses: []
  688. }),
  689. smalltalk.HLInspectorModel);
  690. smalltalk.addMethod(
  691. "_inspectee",
  692. smalltalk.method({
  693. selector: "inspectee",
  694. category: 'accessing',
  695. fn: function () {
  696. var self = this;
  697. return self['@inspectee'];
  698. },
  699. args: [],
  700. source: "inspectee \x0a\x09^ inspectee ",
  701. messageSends: [],
  702. referencedClasses: []
  703. }),
  704. smalltalk.HLInspectorModel);
  705. smalltalk.addMethod(
  706. "_inspectee_",
  707. smalltalk.method({
  708. selector: "inspectee:",
  709. category: 'accessing',
  710. fn: function (anObject) {
  711. var self = this;
  712. self['@inspectee'] = anObject;
  713. return self;
  714. },
  715. args: ["anObject"],
  716. source: "inspectee: anObject \x0a\x09inspectee := anObject\x0a ",
  717. messageSends: [],
  718. referencedClasses: []
  719. }),
  720. smalltalk.HLInspectorModel);
  721. smalltalk.addMethod(
  722. "_instVarObjectAt_",
  723. smalltalk.method({
  724. selector: "instVarObjectAt:",
  725. category: 'actions',
  726. fn: function (anInstVarName) {
  727. var self = this;
  728. var $1;
  729. $1 = smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [anInstVarName]);
  730. return $1;
  731. },
  732. args: ["anInstVarName"],
  733. source: "instVarObjectAt: anInstVarName\x0a\x09^ self variables at: anInstVarName",
  734. messageSends: ["at:", "variables"],
  735. referencedClasses: []
  736. }),
  737. smalltalk.HLInspectorModel);
  738. smalltalk.addMethod(
  739. "_onKeyDown_",
  740. smalltalk.method({
  741. selector: "onKeyDown:",
  742. category: 'reactions',
  743. fn: function (anEvent) {
  744. var self = this;
  745. if (anEvent.ctrlKey) {
  746. if (anEvent.keyCode === 80) {
  747. self._printIt();
  748. anEvent.preventDefault();
  749. return false;
  750. }
  751. if (anEvent.keyCode === 68) {
  752. self._doIt();
  753. anEvent.preventDefault();
  754. return false;
  755. }
  756. if (anEvent.keyCode === 73) {
  757. self._inspectIt();
  758. anEvent.preventDefault();
  759. return false;
  760. }
  761. }
  762. return self;
  763. },
  764. args: ["anEvent"],
  765. 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}>",
  766. messageSends: [],
  767. referencedClasses: []
  768. }),
  769. smalltalk.HLInspectorModel);
  770. smalltalk.addMethod(
  771. "_selectedInstVar_",
  772. smalltalk.method({
  773. selector: "selectedInstVar:",
  774. category: 'actions',
  775. fn: function (anInstVarName) {
  776. var self = this;
  777. smalltalk.send(self, "_selection_", [anInstVarName]);
  778. return self;
  779. },
  780. args: ["anInstVarName"],
  781. source: "selectedInstVar: anInstVarName\x0a self selection: anInstVarName",
  782. messageSends: ["selection:"],
  783. referencedClasses: []
  784. }),
  785. smalltalk.HLInspectorModel);
  786. smalltalk.addMethod(
  787. "_selectedInstVarObject",
  788. smalltalk.method({
  789. selector: "selectedInstVarObject",
  790. category: 'accessing',
  791. fn: function () {
  792. var self = this;
  793. var $1;
  794. $1 = smalltalk.send(self, "_instVarObjectAt_", [smalltalk.send(self, "_selection", [])]);
  795. return $1;
  796. },
  797. args: [],
  798. source: "selectedInstVarObject\x0a\x09^ self instVarObjectAt: self selection\x0a ",
  799. messageSends: ["instVarObjectAt:", "selection"],
  800. referencedClasses: []
  801. }),
  802. smalltalk.HLInspectorModel);
  803. smalltalk.addMethod(
  804. "_selection",
  805. smalltalk.method({
  806. selector: "selection",
  807. category: 'accessing',
  808. fn: function () {
  809. var self = this;
  810. var $1;
  811. if (($receiver = self['@selection']) == nil || $receiver == undefined) {
  812. $1 = "";
  813. } else {
  814. $1 = self['@selection'];
  815. }
  816. return $1;
  817. },
  818. args: [],
  819. source: "selection\x0a\x09^ selection ifNil:[ '' ] ",
  820. messageSends: ["ifNil:"],
  821. referencedClasses: []
  822. }),
  823. smalltalk.HLInspectorModel);
  824. smalltalk.addMethod(
  825. "_selection_",
  826. smalltalk.method({
  827. selector: "selection:",
  828. category: 'accessing',
  829. fn: function (anObject) {
  830. var self = this;
  831. self['@selection'] = anObject;
  832. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLInstanceVariableSelected || HLInstanceVariableSelected, "_on_", [self['@selection']])]);
  833. return self;
  834. },
  835. args: ["anObject"],
  836. source: "selection: anObject\x0a\x09selection := anObject.\x0a\x0a\x09self announcer announce: (HLInstanceVariableSelected on: selection)\x0a ",
  837. messageSends: ["announce:", "on:", "announcer"],
  838. referencedClasses: ["HLInstanceVariableSelected"]
  839. }),
  840. smalltalk.HLInspectorModel);
  841. smalltalk.addMethod(
  842. "_subscribe_",
  843. smalltalk.method({
  844. selector: "subscribe:",
  845. category: 'actions',
  846. fn: function (aWidget) {
  847. var self = this;
  848. smalltalk.send(aWidget, "_subscribeTo_", [smalltalk.send(self, "_announcer", [])]);
  849. return self;
  850. },
  851. args: ["aWidget"],
  852. source: "subscribe: aWidget\x0a\x09aWidget subscribeTo: self announcer",
  853. messageSends: ["subscribeTo:", "announcer"],
  854. referencedClasses: []
  855. }),
  856. smalltalk.HLInspectorModel);
  857. smalltalk.addMethod(
  858. "_variables",
  859. smalltalk.method({
  860. selector: "variables",
  861. category: 'accessing',
  862. fn: function () {
  863. var self = this;
  864. return self['@variables'];
  865. },
  866. args: [],
  867. source: "variables\x0a\x09^ variables",
  868. messageSends: [],
  869. referencedClasses: []
  870. }),
  871. smalltalk.HLInspectorModel);
  872. smalltalk.addMethod(
  873. "_variables_",
  874. smalltalk.method({
  875. selector: "variables:",
  876. category: 'accessing',
  877. fn: function (aCollection) {
  878. var self = this;
  879. self['@variables'] = aCollection;
  880. return self;
  881. },
  882. args: ["aCollection"],
  883. source: "variables: aCollection\x0a\x09variables := aCollection\x0a ",
  884. messageSends: [],
  885. referencedClasses: []
  886. }),
  887. smalltalk.HLInspectorModel);
  888. smalltalk.addMethod(
  889. "_on_",
  890. smalltalk.method({
  891. selector: "on:",
  892. category: 'actions',
  893. fn: function (anEnvironment) {
  894. var self = this;
  895. var $2, $3, $1;
  896. $2 = smalltalk.send(self, "_new", []);
  897. smalltalk.send($2, "_environment_", [anEnvironment]);
  898. $3 = smalltalk.send($2, "_yourself", []);
  899. $1 = $3;
  900. return $1;
  901. },
  902. args: ["anEnvironment"],
  903. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  904. messageSends: ["environment:", "new", "yourself"],
  905. referencedClasses: []
  906. }),
  907. smalltalk.HLInspectorModel.klass);
  908. smalltalk.addClass('HLInspectorVariablesWidget', smalltalk.HLNavigationListWidget, ['announcer', 'model', 'list', 'diveButton'], 'Helios-Inspector');
  909. smalltalk.addMethod(
  910. "_announcer",
  911. smalltalk.method({
  912. selector: "announcer",
  913. category: 'accessing',
  914. fn: function () {
  915. var self = this;
  916. var $1;
  917. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  918. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  919. $1 = self['@announcer'];
  920. } else {
  921. $1 = self['@announcer'];
  922. }
  923. return $1;
  924. },
  925. args: [],
  926. source: "announcer\x0a\x09^ announcer ifNil:[ announcer := Announcer new ]",
  927. messageSends: ["ifNil:", "new"],
  928. referencedClasses: ["Announcer"]
  929. }),
  930. smalltalk.HLInspectorVariablesWidget);
  931. smalltalk.addMethod(
  932. "_defaultItems",
  933. smalltalk.method({
  934. selector: "defaultItems",
  935. category: 'defaults',
  936. fn: function () {
  937. var self = this;
  938. var $1;
  939. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_model", []), "_variables", []), "_keys", []);
  940. return $1;
  941. },
  942. args: [],
  943. source: "defaultItems\x0a\x09^ self model variables keys",
  944. messageSends: ["keys", "variables", "model"],
  945. referencedClasses: []
  946. }),
  947. smalltalk.HLInspectorVariablesWidget);
  948. smalltalk.addMethod(
  949. "_model",
  950. smalltalk.method({
  951. selector: "model",
  952. category: 'accessing',
  953. fn: function () {
  954. var self = this;
  955. return self['@model'];
  956. },
  957. args: [],
  958. source: "model\x0a ^ model\x0a ",
  959. messageSends: [],
  960. referencedClasses: []
  961. }),
  962. smalltalk.HLInspectorVariablesWidget);
  963. smalltalk.addMethod(
  964. "_model_",
  965. smalltalk.method({
  966. selector: "model:",
  967. category: 'accessing',
  968. fn: function (aModel) {
  969. var self = this;
  970. self['@model'] = aModel;
  971. return self;
  972. },
  973. args: ["aModel"],
  974. source: "model: aModel\x0a model := aModel\x0a ",
  975. messageSends: [],
  976. referencedClasses: []
  977. }),
  978. smalltalk.HLInspectorVariablesWidget);
  979. smalltalk.addMethod(
  980. "_refresh",
  981. smalltalk.method({
  982. selector: "refresh",
  983. category: 'actions',
  984. fn: function () {
  985. var self = this;
  986. smalltalk.send(self, "_resetItems", []);
  987. smalltalk.send(self, "_refresh", [], smalltalk.HLNavigationListWidget);
  988. return self;
  989. },
  990. args: [],
  991. source: "refresh\x0a\x09self resetItems.\x0a super refresh\x0a ",
  992. messageSends: ["resetItems", "refresh"],
  993. referencedClasses: []
  994. }),
  995. smalltalk.HLInspectorVariablesWidget);
  996. smalltalk.addMethod(
  997. "_renderButtonsOn_",
  998. smalltalk.method({
  999. selector: "renderButtonsOn:",
  1000. category: 'rendering',
  1001. fn: function (html) {
  1002. var self = this;
  1003. var $1, $2, $3, $4;
  1004. $1 = smalltalk.send(html, "_button", []);
  1005. smalltalk.send($1, "_class_", ["btn"]);
  1006. smalltalk.send($1, "_with_", ["Refresh"]);
  1007. $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLRefreshRequested || HLRefreshRequested, "_new", [])]);}]);
  1008. $3 = smalltalk.send(html, "_button", []);
  1009. smalltalk.send($3, "_class_", ["btn"]);
  1010. smalltalk.send($3, "_with_", ["Dive"]);
  1011. $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [smalltalk.send(smalltalk.HLDiveRequested || HLDiveRequested, "_new", [])]);}]);
  1012. self['@diveButton'] = $4;
  1013. return self;
  1014. },
  1015. args: ["html"],
  1016. source: "renderButtonsOn: html\x0a\x0a\x09html button\x0a\x09\x09\x09class: 'btn';\x0a\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09onClick: [self announcer announce: HLRefreshRequested new].\x0a\x0a\x09diveButton := html button \x0a\x09\x09\x09\x09class: 'btn';\x0a\x09\x09\x09\x09with: 'Dive'; \x0a\x09\x09\x09\x09onClick: [self announcer announce: HLDiveRequested new]",
  1017. messageSends: ["class:", "button", "with:", "onClick:", "announce:", "new", "announcer"],
  1018. referencedClasses: ["HLRefreshRequested", "HLDiveRequested"]
  1019. }),
  1020. smalltalk.HLInspectorVariablesWidget);
  1021. smalltalk.addMethod(
  1022. "_resetItems",
  1023. smalltalk.method({
  1024. selector: "resetItems",
  1025. category: 'actions',
  1026. fn: function () {
  1027. var self = this;
  1028. self['@items'] = nil;
  1029. return self;
  1030. },
  1031. args: [],
  1032. source: "resetItems\x0a\x09items := nil",
  1033. messageSends: [],
  1034. referencedClasses: []
  1035. }),
  1036. smalltalk.HLInspectorVariablesWidget);
  1037. smalltalk.addMethod(
  1038. "_selectItem_",
  1039. smalltalk.method({
  1040. selector: "selectItem:",
  1041. category: 'reactions',
  1042. fn: function (anObject) {
  1043. var self = this;
  1044. smalltalk.send(self, "_selectItem_", [anObject], smalltalk.HLNavigationListWidget);
  1045. smalltalk.send(smalltalk.send(self, "_model", []), "_selectedInstVar_", [anObject]);
  1046. return self;
  1047. },
  1048. args: ["anObject"],
  1049. source: "selectItem: anObject\x0a\x09super selectItem: anObject.\x0a self model selectedInstVar: anObject",
  1050. messageSends: ["selectItem:", "selectedInstVar:", "model"],
  1051. referencedClasses: []
  1052. }),
  1053. smalltalk.HLInspectorVariablesWidget);
  1054. smalltalk.addMethod(
  1055. "_selection",
  1056. smalltalk.method({
  1057. selector: "selection",
  1058. category: 'accessing',
  1059. fn: function () {
  1060. var self = this;
  1061. var $1;
  1062. $1 = smalltalk.send(self['@model'], "_selection", []);
  1063. return $1;
  1064. },
  1065. args: [],
  1066. source: "selection\x0a\x09^ model selection",
  1067. messageSends: ["selection"],
  1068. referencedClasses: []
  1069. }),
  1070. smalltalk.HLInspectorVariablesWidget);
  1071. smalltalk.addMethod(
  1072. "_variables",
  1073. smalltalk.method({
  1074. selector: "variables",
  1075. category: 'accessing',
  1076. fn: function () {
  1077. var self = this;
  1078. var $1;
  1079. $1 = smalltalk.send(self['@model'], "_variables", []);
  1080. return $1;
  1081. },
  1082. args: [],
  1083. source: "variables\x0a\x09^ model variables",
  1084. messageSends: ["variables"],
  1085. referencedClasses: []
  1086. }),
  1087. smalltalk.HLInspectorVariablesWidget);