Helios-Widgets.js 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613
  1. smalltalk.addPackage('Helios-Widgets', {});
  2. smalltalk.addClass('HLTab', smalltalk.Object, ['widget', 'label'], 'Helios-Widgets');
  3. smalltalk.addMethod(
  4. "_activate",
  5. smalltalk.method({
  6. selector: "activate",
  7. category: 'accessing',
  8. fn: function () {
  9. var self = this;
  10. smalltalk.send(smalltalk.send(self, "_manager", []), "_activate_", [self]);
  11. return self;
  12. },
  13. args: [],
  14. source: "activate\x0a\x09self manager activate: self",
  15. messageSends: ["activate:", "manager"],
  16. referencedClasses: []
  17. }),
  18. smalltalk.HLTab);
  19. smalltalk.addMethod(
  20. "_add",
  21. smalltalk.method({
  22. selector: "add",
  23. category: 'accessing',
  24. fn: function () {
  25. var self = this;
  26. smalltalk.send(smalltalk.send(self, "_manager", []), "_addTab_", [self]);
  27. return self;
  28. },
  29. args: [],
  30. source: "add\x0a\x09self manager addTab: self",
  31. messageSends: ["addTab:", "manager"],
  32. referencedClasses: []
  33. }),
  34. smalltalk.HLTab);
  35. smalltalk.addMethod(
  36. "_isActive",
  37. smalltalk.method({
  38. selector: "isActive",
  39. category: 'testing',
  40. fn: function () {
  41. var self = this;
  42. var $1;
  43. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_manager", []), "_activeTab", []), "__eq", [self]);
  44. return $1;
  45. },
  46. args: [],
  47. source: "isActive\x0a\x09^ self manager activeTab = self",
  48. messageSends: ["=", "activeTab", "manager"],
  49. referencedClasses: []
  50. }),
  51. smalltalk.HLTab);
  52. smalltalk.addMethod(
  53. "_label",
  54. smalltalk.method({
  55. selector: "label",
  56. category: 'accessing',
  57. fn: function () {
  58. var self = this;
  59. var $1;
  60. if (($receiver = self['@label']) == nil || $receiver == undefined) {
  61. $1 = "";
  62. } else {
  63. $1 = self['@label'];
  64. }
  65. return $1;
  66. },
  67. args: [],
  68. source: "label\x0a\x09^ label ifNil: [ '' ]",
  69. messageSends: ["ifNil:"],
  70. referencedClasses: []
  71. }),
  72. smalltalk.HLTab);
  73. smalltalk.addMethod(
  74. "_label_",
  75. smalltalk.method({
  76. selector: "label:",
  77. category: 'accessing',
  78. fn: function (aString) {
  79. var self = this;
  80. self['@label'] = aString;
  81. return self;
  82. },
  83. args: ["aString"],
  84. source: "label: aString\x0a\x09label := aString",
  85. messageSends: [],
  86. referencedClasses: []
  87. }),
  88. smalltalk.HLTab);
  89. smalltalk.addMethod(
  90. "_manager",
  91. smalltalk.method({
  92. selector: "manager",
  93. category: 'accessing',
  94. fn: function () {
  95. var self = this;
  96. var $1;
  97. $1 = smalltalk.send(smalltalk.HLTabManager || HLTabManager, "_current", []);
  98. return $1;
  99. },
  100. args: [],
  101. source: "manager\x0a\x09^ HLTabManager current",
  102. messageSends: ["current"],
  103. referencedClasses: ["HLTabManager"]
  104. }),
  105. smalltalk.HLTab);
  106. smalltalk.addMethod(
  107. "_widget",
  108. smalltalk.method({
  109. selector: "widget",
  110. category: 'accessing',
  111. fn: function () {
  112. var self = this;
  113. return self['@widget'];
  114. },
  115. args: [],
  116. source: "widget\x0a\x09^ widget",
  117. messageSends: [],
  118. referencedClasses: []
  119. }),
  120. smalltalk.HLTab);
  121. smalltalk.addMethod(
  122. "_widget_",
  123. smalltalk.method({
  124. selector: "widget:",
  125. category: 'accessing',
  126. fn: function (aWidget) {
  127. var self = this;
  128. self['@widget'] = aWidget;
  129. return self;
  130. },
  131. args: ["aWidget"],
  132. source: "widget: aWidget\x0a\x09widget := aWidget",
  133. messageSends: [],
  134. referencedClasses: []
  135. }),
  136. smalltalk.HLTab);
  137. smalltalk.addMethod(
  138. "_on_labelled_",
  139. smalltalk.method({
  140. selector: "on:labelled:",
  141. category: 'instance creation',
  142. fn: function (aWidget, aString) {
  143. var self = this;
  144. var $2, $3, $1;
  145. $2 = smalltalk.send(self, "_new", []);
  146. smalltalk.send($2, "_widget_", [aWidget]);
  147. smalltalk.send($2, "_label_", [aString]);
  148. $3 = smalltalk.send($2, "_yourself", []);
  149. $1 = $3;
  150. return $1;
  151. },
  152. args: ["aWidget", "aString"],
  153. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  154. messageSends: ["widget:", "new", "label:", "yourself"],
  155. referencedClasses: []
  156. }),
  157. smalltalk.HLTab.klass);
  158. smalltalk.addClass('HLWidget', smalltalk.Widget, ['rootDiv'], 'Helios-Widgets');
  159. smalltalk.addMethod(
  160. "_announce_",
  161. smalltalk.method({
  162. selector: "announce:",
  163. category: 'announces',
  164. fn: function (anObject) {
  165. var self = this;
  166. smalltalk.send(smalltalk.send(self, "_announcer", []), "_announce_", [anObject]);
  167. return self;
  168. },
  169. args: ["anObject"],
  170. source: "announce: anObject\x0a\x09self announcer announce: anObject",
  171. messageSends: ["announce:", "announcer"],
  172. referencedClasses: []
  173. }),
  174. smalltalk.HLWidget);
  175. smalltalk.addMethod(
  176. "_announcer",
  177. smalltalk.method({
  178. selector: "announcer",
  179. category: 'accessing',
  180. fn: function () {
  181. var self = this;
  182. var $1;
  183. $1 = smalltalk.send(smalltalk.send(self, "_manager", []), "_announcer", []);
  184. return $1;
  185. },
  186. args: [],
  187. source: "announcer\x0a\x09^ self manager announcer",
  188. messageSends: ["announcer", "manager"],
  189. referencedClasses: []
  190. }),
  191. smalltalk.HLWidget);
  192. smalltalk.addMethod(
  193. "_initialize",
  194. smalltalk.method({
  195. selector: "initialize",
  196. category: 'initialization',
  197. fn: function () {
  198. var self = this;
  199. smalltalk.send(self, "_initialize", [], smalltalk.Widget);
  200. smalltalk.send(self, "_subscribe", []);
  201. return self;
  202. },
  203. args: [],
  204. source: "initialize\x0a\x09super initialize.\x0a self subscribe",
  205. messageSends: ["initialize", "subscribe"],
  206. referencedClasses: []
  207. }),
  208. smalltalk.HLWidget);
  209. smalltalk.addMethod(
  210. "_manager",
  211. smalltalk.method({
  212. selector: "manager",
  213. category: 'accessing',
  214. fn: function () {
  215. var self = this;
  216. var $1;
  217. $1 = smalltalk.send(smalltalk.HLTabManager || HLTabManager, "_current", []);
  218. return $1;
  219. },
  220. args: [],
  221. source: "manager\x0a\x09^ HLTabManager current",
  222. messageSends: ["current"],
  223. referencedClasses: ["HLTabManager"]
  224. }),
  225. smalltalk.HLWidget);
  226. smalltalk.addMethod(
  227. "_on_do_",
  228. smalltalk.method({
  229. selector: "on:do:",
  230. category: 'announces',
  231. fn: function (anAnnouncement, aBlock) {
  232. var self = this;
  233. smalltalk.send(smalltalk.send(self, "_announcer", []), "_on_do_", [anAnnouncement, aBlock]);
  234. return self;
  235. },
  236. args: ["anAnnouncement", "aBlock"],
  237. source: "on: anAnnouncement do: aBlock\x0a\x09self announcer on: anAnnouncement do: aBlock",
  238. messageSends: ["on:do:", "announcer"],
  239. referencedClasses: []
  240. }),
  241. smalltalk.HLWidget);
  242. smalltalk.addMethod(
  243. "_refresh",
  244. smalltalk.method({
  245. selector: "refresh",
  246. category: 'updating',
  247. fn: function () {
  248. var self = this;
  249. if (($receiver = self['@rootDiv']) == nil || $receiver == undefined) {
  250. return self;
  251. } else {
  252. self['@rootDiv'];
  253. }
  254. smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_empty", []);
  255. smalltalk.send(function (html) {return smalltalk.send(self, "_renderContentOn_", [html]);}, "_appendToJQuery_", [smalltalk.send(self['@rootDiv'], "_asJQuery", [])]);
  256. return self;
  257. },
  258. args: [],
  259. source: "refresh\x0a\x09rootDiv ifNil: [ ^ self ].\x0a \x0a\x09rootDiv asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: rootDiv asJQuery",
  260. messageSends: ["ifNil:", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"],
  261. referencedClasses: []
  262. }),
  263. smalltalk.HLWidget);
  264. smalltalk.addMethod(
  265. "_renderContentOn_",
  266. smalltalk.method({
  267. selector: "renderContentOn:",
  268. category: 'rendering',
  269. fn: function (html) {
  270. var self = this;
  271. return self;
  272. },
  273. args: ["html"],
  274. source: "renderContentOn: html\x0a",
  275. messageSends: [],
  276. referencedClasses: []
  277. }),
  278. smalltalk.HLWidget);
  279. smalltalk.addMethod(
  280. "_renderOn_",
  281. smalltalk.method({
  282. selector: "renderOn:",
  283. category: 'rendering',
  284. fn: function (html) {
  285. var self = this;
  286. self['@rootDiv'] = smalltalk.send(smalltalk.send(html, "_div", []), "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
  287. return self;
  288. },
  289. args: ["html"],
  290. source: "renderOn: html\x0a\x09rootDiv := html div with: [\x0a \x09self renderContentOn: html ]",
  291. messageSends: ["with:", "renderContentOn:", "div"],
  292. referencedClasses: []
  293. }),
  294. smalltalk.HLWidget);
  295. smalltalk.addMethod(
  296. "_subscribe",
  297. smalltalk.method({
  298. selector: "subscribe",
  299. category: 'initialization',
  300. fn: function () {
  301. var self = this;
  302. return self;
  303. },
  304. args: [],
  305. source: "subscribe",
  306. messageSends: [],
  307. referencedClasses: []
  308. }),
  309. smalltalk.HLWidget);
  310. smalltalk.addMethod(
  311. "_canBeOpenAsTab",
  312. smalltalk.method({
  313. selector: "canBeOpenAsTab",
  314. category: 'testing',
  315. fn: function () {
  316. var self = this;
  317. return false;
  318. },
  319. args: [],
  320. source: "canBeOpenAsTab\x0a\x09^ false",
  321. messageSends: [],
  322. referencedClasses: []
  323. }),
  324. smalltalk.HLWidget.klass);
  325. smalltalk.addMethod(
  326. "_openAsTab",
  327. smalltalk.method({
  328. selector: "openAsTab",
  329. category: 'accessing',
  330. fn: function () {
  331. var self = this;
  332. smalltalk.send(smalltalk.send(smalltalk.HLTabManager || HLTabManager, "_current", []), "_addTab_", [smalltalk.send(smalltalk.HLTab || HLTab, "_on_labelled_", [smalltalk.send(self, "_new", []), smalltalk.send(self, "_tabLabel", [])])]);
  333. return self;
  334. },
  335. args: [],
  336. source: "openAsTab\x0a\x09HLTabManager current addTab: (HLTab on: self new labelled: self tabLabel)",
  337. messageSends: ["addTab:", "on:labelled:", "new", "tabLabel", "current"],
  338. referencedClasses: ["HLTab", "HLTabManager"]
  339. }),
  340. smalltalk.HLWidget.klass);
  341. smalltalk.addMethod(
  342. "_tabLabel",
  343. smalltalk.method({
  344. selector: "tabLabel",
  345. category: 'accessing',
  346. fn: function () {
  347. var self = this;
  348. return "Tab";
  349. },
  350. args: [],
  351. source: "tabLabel\x0a\x09^ 'Tab'",
  352. messageSends: [],
  353. referencedClasses: []
  354. }),
  355. smalltalk.HLWidget.klass);
  356. smalltalk.addMethod(
  357. "_tabPriority",
  358. smalltalk.method({
  359. selector: "tabPriority",
  360. category: 'accessing',
  361. fn: function () {
  362. var self = this;
  363. return 500;
  364. },
  365. args: [],
  366. source: "tabPriority\x0a\x09^ 500",
  367. messageSends: [],
  368. referencedClasses: []
  369. }),
  370. smalltalk.HLWidget.klass);
  371. smalltalk.addClass('HLBrowser', smalltalk.HLWidget, ['environment', 'selectedPackage', 'selectedClass', 'packagesListWidget', 'classesListWidget'], 'Helios-Widgets');
  372. smalltalk.addMethod(
  373. "_classesListWidget",
  374. smalltalk.method({
  375. selector: "classesListWidget",
  376. category: 'accessing',
  377. fn: function () {
  378. var self = this;
  379. var $1;
  380. if (($receiver = self['@classesListWidget']) == nil ||
  381. $receiver == undefined) {
  382. self['@classesListWidget'] = smalltalk.send(smalltalk.HLClassesListWidget || HLClassesListWidget, "_on_", [self]);
  383. $1 = self['@classesListWidget'];
  384. } else {
  385. $1 = self['@classesListWidget'];
  386. }
  387. return $1;
  388. },
  389. args: [],
  390. source: "classesListWidget\x0a\x09^ classesListWidget ifNil: [\x0a \x09classesListWidget := HLClassesListWidget on: self ]",
  391. messageSends: ["ifNil:", "on:"],
  392. referencedClasses: ["HLClassesListWidget"]
  393. }),
  394. smalltalk.HLBrowser);
  395. smalltalk.addMethod(
  396. "_environment",
  397. smalltalk.method({
  398. selector: "environment",
  399. category: 'accessing',
  400. fn: function () {
  401. var self = this;
  402. var $1;
  403. if (($receiver = self['@environment']) == nil || $receiver == undefined) {
  404. self['@environment'] = smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []);
  405. $1 = self['@environment'];
  406. } else {
  407. $1 = self['@environment'];
  408. }
  409. return $1;
  410. },
  411. args: [],
  412. source: "environment\x0a\x09^ environment ifNil: [ environment := Smalltalk current ]",
  413. messageSends: ["ifNil:", "current"],
  414. referencedClasses: ["Smalltalk"]
  415. }),
  416. smalltalk.HLBrowser);
  417. smalltalk.addMethod(
  418. "_environment_",
  419. smalltalk.method({
  420. selector: "environment:",
  421. category: 'accessing',
  422. fn: function (anEnvironment) {
  423. var self = this;
  424. self['@environment'] = anEnvironment;
  425. return self;
  426. },
  427. args: ["anEnvironment"],
  428. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  429. messageSends: [],
  430. referencedClasses: []
  431. }),
  432. smalltalk.HLBrowser);
  433. smalltalk.addMethod(
  434. "_packagesListWidget",
  435. smalltalk.method({
  436. selector: "packagesListWidget",
  437. category: 'accessing',
  438. fn: function () {
  439. var self = this;
  440. var $1;
  441. if (($receiver = self['@packagesListWidget']) == nil ||
  442. $receiver == undefined) {
  443. self['@packagesListWidget'] = smalltalk.send(smalltalk.HLPackagesListWidget || HLPackagesListWidget, "_on_", [self]);
  444. $1 = self['@packagesListWidget'];
  445. } else {
  446. $1 = self['@packagesListWidget'];
  447. }
  448. return $1;
  449. },
  450. args: [],
  451. source: "packagesListWidget\x0a\x09^ packagesListWidget ifNil: [\x0a \x09packagesListWidget := HLPackagesListWidget on: self ]",
  452. messageSends: ["ifNil:", "on:"],
  453. referencedClasses: ["HLPackagesListWidget"]
  454. }),
  455. smalltalk.HLBrowser);
  456. smalltalk.addMethod(
  457. "_renderContentOn_",
  458. smalltalk.method({
  459. selector: "renderContentOn:",
  460. category: 'rendering',
  461. fn: function (html){
  462. var self=this;
  463. 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((smalltalk.HLVerticalSplitter || HLVerticalSplitter),"_with_with_",[smalltalk.send(self,"_packagesListWidget",[]),smalltalk.send(self,"_classesListWidget",[])]),smalltalk.send((smalltalk.HLVerticalSplitter || HLVerticalSplitter),"_with_with_",["Protocols","Methods"])]),"Source Code"])])]);
  464. return self},
  465. args: ["html"],
  466. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a \x09with: (HLVerticalSplitter\x0a \x09with: (HLVerticalSplitter\x0a \x09with: self packagesListWidget\x0a with: self classesListWidget)\x0a with: (HLVerticalSplitter\x0a \x09with: 'Protocols'\x0a with: 'Methods')) \x0a with: 'Source Code'))",
  467. messageSends: ["with:", "with:with:", "packagesListWidget", "classesListWidget"],
  468. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  469. }),
  470. smalltalk.HLBrowser);
  471. smalltalk.addMethod(
  472. "_renderTopPanesOn_",
  473. smalltalk.method({
  474. selector: "renderTopPanesOn:",
  475. category: 'rendering',
  476. fn: function (html) {
  477. var self = this;
  478. var $1, $2, $3, $4, $5, $6, $7, $8;
  479. $1 = smalltalk.send(html, "_div", []);
  480. smalltalk.send($1, "_class_", ["pane"]);
  481. $2 = smalltalk.send($1, "_with_", [smalltalk.send(self, "_packagesListWidget", [])]);
  482. $3 = smalltalk.send(html, "_div", []);
  483. smalltalk.send($3, "_class_", ["pane"]);
  484. $4 = smalltalk.send($3, "_with_", [smalltalk.send(self, "_classesListWidget", [])]);
  485. $5 = smalltalk.send(html, "_div", []);
  486. smalltalk.send($5, "_class_", ["pane"]);
  487. $6 = smalltalk.send($5, "_with_", ["hello"]);
  488. $7 = smalltalk.send(html, "_div", []);
  489. smalltalk.send($7, "_class_", ["pane"]);
  490. $8 = smalltalk.send($7, "_with_", ["world"]);
  491. return self;
  492. },
  493. args: ["html"],
  494. source: "renderTopPanesOn: html\x0a\x09html div class: 'pane'; with: self packagesListWidget.\x0a\x09html div class: 'pane'; with: self classesListWidget.\x0a html div class: 'pane'; with: 'hello'.\x0a\x09html div class: 'pane'; with: 'world'",
  495. messageSends: ["class:", "div", "with:", "packagesListWidget", "classesListWidget"],
  496. referencedClasses: []
  497. }),
  498. smalltalk.HLBrowser);
  499. smalltalk.addMethod(
  500. "_selectPackage_",
  501. smalltalk.method({
  502. selector: "selectPackage:",
  503. category: 'accessing',
  504. fn: function (aPackage) {
  505. var self = this;
  506. self['@selectedPackage'] = aPackage;
  507. self['@selectedClass'] = nil;
  508. smalltalk.send(smalltalk.send(self, "_classesListWidget", []), "_package_", [aPackage]);
  509. return self;
  510. },
  511. args: ["aPackage"],
  512. source: "selectPackage: aPackage\x0a\x09selectedPackage := aPackage.\x0a selectedClass := nil.\x0a \x0a self classesListWidget package: aPackage.",
  513. messageSends: ["package:", "classesListWidget"],
  514. referencedClasses: []
  515. }),
  516. smalltalk.HLBrowser);
  517. smalltalk.addMethod(
  518. "_selectedPackage",
  519. smalltalk.method({
  520. selector: "selectedPackage",
  521. category: 'accessing',
  522. fn: function () {
  523. var self = this;
  524. return self['@selectedPackage'];
  525. },
  526. args: [],
  527. source: "selectedPackage\x0a\x09^ selectedPackage",
  528. messageSends: [],
  529. referencedClasses: []
  530. }),
  531. smalltalk.HLBrowser);
  532. smalltalk.HLBrowser.klass.iVarNames = ['nextId'];
  533. smalltalk.addMethod(
  534. "_canBeOpenAsTab",
  535. smalltalk.method({
  536. selector: "canBeOpenAsTab",
  537. category: 'testing',
  538. fn: function () {
  539. var self = this;
  540. return true;
  541. },
  542. args: [],
  543. source: "canBeOpenAsTab\x0a\x09^ true",
  544. messageSends: [],
  545. referencedClasses: []
  546. }),
  547. smalltalk.HLBrowser.klass);
  548. smalltalk.addMethod(
  549. "_nextId",
  550. smalltalk.method({
  551. selector: "nextId",
  552. category: 'accessing',
  553. fn: function () {
  554. var self = this;
  555. var $1;
  556. if (($receiver = self['@nextId']) == nil || $receiver == undefined) {
  557. self['@nextId'] = 0;
  558. self['@nextId'];
  559. } else {
  560. self['@nextId'];
  561. }
  562. $1 = smalltalk.send("browser_", "__comma", [smalltalk.send(smalltalk.send(self['@nextId'], "__plus", [1]), "_asString", [])]);
  563. return $1;
  564. },
  565. args: [],
  566. source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a ^ 'browser_', (nextId + 1) asString",
  567. messageSends: ["ifNil:", ",", "asString", "+"],
  568. referencedClasses: []
  569. }),
  570. smalltalk.HLBrowser.klass);
  571. smalltalk.addMethod(
  572. "_tabLabel",
  573. smalltalk.method({
  574. selector: "tabLabel",
  575. category: 'accessing',
  576. fn: function () {
  577. var self = this;
  578. return "Browser";
  579. },
  580. args: [],
  581. source: "tabLabel\x0a\x09^ 'Browser'",
  582. messageSends: [],
  583. referencedClasses: []
  584. }),
  585. smalltalk.HLBrowser.klass);
  586. smalltalk.addMethod(
  587. "_tabPriority",
  588. smalltalk.method({
  589. selector: "tabPriority",
  590. category: 'accessing',
  591. fn: function () {
  592. var self = this;
  593. return 0;
  594. },
  595. args: [],
  596. source: "tabPriority\x0a\x09^ 0",
  597. messageSends: [],
  598. referencedClasses: []
  599. }),
  600. smalltalk.HLBrowser.klass);
  601. smalltalk.addClass('HLDebugger', smalltalk.HLWidget, [], 'Helios-Widgets');
  602. smalltalk.addClass('HLFocusableWidget', smalltalk.HLWidget, ['hiddenInput'], 'Helios-Widgets');
  603. smalltalk.addMethod(
  604. "_blur",
  605. smalltalk.method({
  606. selector: "blur",
  607. category: 'events',
  608. fn: function () {
  609. var self = this;
  610. smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_removeClass_", [smalltalk.send(self, "_focusClass", [])]);
  611. return self;
  612. },
  613. args: [],
  614. source: "blur\x0a\x09rootDiv asJQuery removeClass: self focusClass.",
  615. messageSends: ["removeClass:", "focusClass", "asJQuery"],
  616. referencedClasses: []
  617. }),
  618. smalltalk.HLFocusableWidget);
  619. smalltalk.addMethod(
  620. "_focus",
  621. smalltalk.method({
  622. selector: "focus",
  623. category: 'events',
  624. fn: function () {
  625. var self = this;
  626. smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_addClass_", [smalltalk.send(self, "_focusClass", [])]);
  627. return self;
  628. },
  629. args: [],
  630. source: "focus\x0a\x09rootDiv asJQuery addClass: self focusClass",
  631. messageSends: ["addClass:", "focusClass", "asJQuery"],
  632. referencedClasses: []
  633. }),
  634. smalltalk.HLFocusableWidget);
  635. smalltalk.addMethod(
  636. "_focusClass",
  637. smalltalk.method({
  638. selector: "focusClass",
  639. category: 'accessing',
  640. fn: function () {
  641. var self = this;
  642. return "focused";
  643. },
  644. args: [],
  645. source: "focusClass\x0a\x09^ 'focused'",
  646. messageSends: [],
  647. referencedClasses: []
  648. }),
  649. smalltalk.HLFocusableWidget);
  650. smalltalk.addMethod(
  651. "_hasFocus",
  652. smalltalk.method({
  653. selector: "hasFocus",
  654. category: 'events',
  655. fn: function () {
  656. var self = this;
  657. var $1;
  658. $1 = smalltalk.send(smalltalk.send(self['@rootDiv'], "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(self['@rootDiv'], "_asJQuery", []), "_hasClass_", [smalltalk.send(self, "_focusClass", [])]);}]);
  659. return $1;
  660. },
  661. args: [],
  662. source: "hasFocus\x0a\x09^ rootDiv notNil and: [ rootDiv asJQuery hasClass: self focusClass ]",
  663. messageSends: ["and:", "hasClass:", "focusClass", "asJQuery", "notNil"],
  664. referencedClasses: []
  665. }),
  666. smalltalk.HLFocusableWidget);
  667. smalltalk.addMethod(
  668. "_renderContentOn_",
  669. smalltalk.method({
  670. selector: "renderContentOn:",
  671. category: 'rendering',
  672. fn: function (html) {
  673. var self = this;
  674. return self;
  675. },
  676. args: ["html"],
  677. source: "renderContentOn: html",
  678. messageSends: [],
  679. referencedClasses: []
  680. }),
  681. smalltalk.HLFocusableWidget);
  682. smalltalk.addMethod(
  683. "_renderHiddenInputOn_",
  684. smalltalk.method({
  685. selector: "renderHiddenInputOn:",
  686. category: 'rendering',
  687. fn: function (html) {
  688. var self = this;
  689. var $1, $2;
  690. $1 = smalltalk.send(html, "_input", []);
  691. smalltalk.send($1, "_style_", ["position: absolute; left: -100000px;"]);
  692. smalltalk.send($1, "_onBlur_", [function () {return smalltalk.send(self, "_blur", []);}]);
  693. $2 = smalltalk.send($1, "_onFocus_", [function () {return smalltalk.send(self, "_focus", []);}]);
  694. self['@hiddenInput'] = $2;
  695. return self;
  696. },
  697. args: ["html"],
  698. source: "renderHiddenInputOn: html\x0a\x09hiddenInput := html input\x0a \x09style: 'position: absolute; left: -100000px;';\x0a \x09onBlur: [ self blur ];\x0a onFocus: [ self focus ]",
  699. messageSends: ["style:", "input", "onBlur:", "blur", "onFocus:", "focus"],
  700. referencedClasses: []
  701. }),
  702. smalltalk.HLFocusableWidget);
  703. smalltalk.addMethod(
  704. "_renderOn_",
  705. smalltalk.method({
  706. selector: "renderOn:",
  707. category: 'rendering',
  708. fn: function (html) {
  709. var self = this;
  710. var $1, $2;
  711. smalltalk.send(self, "_renderHiddenInputOn_", [html]);
  712. $1 = smalltalk.send(html, "_div", []);
  713. smalltalk.send($1, "_class_", ["hl_widget"]);
  714. smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self['@hiddenInput'], "_asJQuery", []), "_focus", []);}]);
  715. $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderContentOn_", [html]);}]);
  716. self['@rootDiv'] = $2;
  717. return self;
  718. },
  719. args: ["html"],
  720. source: "renderOn: html\x0a\x09self renderHiddenInputOn: html.\x0a \x0a rootDiv := html div \x0a \x09class: 'hl_widget'; \x0a onClick: [ hiddenInput asJQuery focus ];\x0a with: [\x0a\x09\x09\x09self renderContentOn: html ]",
  721. messageSends: ["renderHiddenInputOn:", "class:", "div", "onClick:", "focus", "asJQuery", "with:", "renderContentOn:"],
  722. referencedClasses: []
  723. }),
  724. smalltalk.HLFocusableWidget);
  725. smalltalk.addClass('HLListWidget', smalltalk.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Widgets');
  726. smalltalk.addMethod(
  727. "_activateListItem_",
  728. smalltalk.method({
  729. selector: "activateListItem:",
  730. category: 'actions',
  731. fn: function (aListItem) {
  732. var self = this;
  733. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aListItem, "_asJQuery", []), "_parent", []), "_children", []), "_removeClass_", ["active"]);
  734. smalltalk.send(smalltalk.send(aListItem, "_asJQuery", []), "_addClass_", ["active"]);
  735. return self;
  736. },
  737. args: ["aListItem"],
  738. source: "activateListItem: aListItem\x0a\x09aListItem asJQuery parent children removeClass: 'active'.\x0a\x09aListItem asJQuery addClass: 'active'",
  739. messageSends: ["removeClass:", "children", "parent", "asJQuery", "addClass:"],
  740. referencedClasses: []
  741. }),
  742. smalltalk.HLListWidget);
  743. smalltalk.addMethod(
  744. "_cssClassForItem_",
  745. smalltalk.method({
  746. selector: "cssClassForItem:",
  747. category: 'accessing',
  748. fn: function (anObject) {
  749. var self = this;
  750. var $2, $1;
  751. $2 = smalltalk.send(smalltalk.send(self, "_selectedItem", []), "__eq", [anObject]);
  752. if (smalltalk.assert($2)) {
  753. $1 = "active";
  754. } else {
  755. $1 = "inactive";
  756. }
  757. return $1;
  758. },
  759. args: ["anObject"],
  760. source: "cssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09\x09ifTrue: [ 'active' ]\x0a\x09\x09\x09ifFalse: [ 'inactive' ]",
  761. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem"],
  762. referencedClasses: []
  763. }),
  764. smalltalk.HLListWidget);
  765. smalltalk.addMethod(
  766. "_items",
  767. smalltalk.method({
  768. selector: "items",
  769. category: 'accessing',
  770. fn: function () {
  771. var self = this;
  772. var $1;
  773. $1 = smalltalk.send(self, "_subclassResponsibility", []);
  774. return $1;
  775. },
  776. args: [],
  777. source: "items\x0a\x09^ self subclassResponsibility",
  778. messageSends: ["subclassResponsibility"],
  779. referencedClasses: []
  780. }),
  781. smalltalk.HLListWidget);
  782. smalltalk.addMethod(
  783. "_renderContentOn_",
  784. smalltalk.method({
  785. selector: "renderContentOn:",
  786. category: 'rendering',
  787. fn: function (html) {
  788. var self = this;
  789. var $1, $2;
  790. $1 = smalltalk.send(html, "_ul", []);
  791. smalltalk.send($1, "_class_", ["nav nav-pills nav-stacked"]);
  792. $2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(smalltalk.send(self, "_items", []), "_do_", [function (each) {return smalltalk.send(self, "_renderItem_on_", [each, html]);}]);}]);
  793. return self;
  794. },
  795. args: ["html"],
  796. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: 'nav nav-pills nav-stacked';\x0a with: [ \x0a \x09self items do: [ :each | \x0a \x09self renderItem: each on: html ] ]",
  797. messageSends: ["class:", "ul", "with:", "do:", "renderItem:on:", "items"],
  798. referencedClasses: []
  799. }),
  800. smalltalk.HLListWidget);
  801. smalltalk.addMethod(
  802. "_renderItem_on_",
  803. smalltalk.method({
  804. selector: "renderItem:on:",
  805. category: 'rendering',
  806. fn: function (anObject, html) {
  807. var self = this;
  808. var $2, $3, $1;
  809. var li;
  810. li = smalltalk.send(html, "_li", []);
  811. smalltalk.send(li, "_class_", [smalltalk.send(self, "_cssClassForItem_", [anObject])]);
  812. $1 = smalltalk.send(li, "_with_", [function () {$2 = smalltalk.send(html, "_a", []);smalltalk.send($2, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", [smalltalk.send(anObject, "_heliosListIcon", [])]);return smalltalk.send(self, "_renderItemLabel_on_", [anObject, html]);}]);$3 = smalltalk.send($2, "_onClick_", [function () {smalltalk.send(self, "_activateListItem_", [li]);return smalltalk.send(self, "_selectItem_", [anObject]);}]);return $3;}]);
  813. return self;
  814. },
  815. args: ["anObject", "html"],
  816. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a li\x0a \x09class: (self cssClassForItem: anObject);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: anObject heliosListIcon.\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self activateListItem: li.\x0a \x09self selectItem: anObject ] ]",
  817. messageSends: ["li", "class:", "cssClassForItem:", "with:", "heliosListIcon", "tag:", "renderItemLabel:on:", "a", "onClick:", "activateListItem:", "selectItem:"],
  818. referencedClasses: []
  819. }),
  820. smalltalk.HLListWidget);
  821. smalltalk.addMethod(
  822. "_renderItemLabel_on_",
  823. smalltalk.method({
  824. selector: "renderItemLabel:on:",
  825. category: 'rendering',
  826. fn: function (anObject, html) {
  827. var self = this;
  828. smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_asString", [])]);
  829. return self;
  830. },
  831. args: ["anObject", "html"],
  832. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  833. messageSends: ["with:", "asString"],
  834. referencedClasses: []
  835. }),
  836. smalltalk.HLListWidget);
  837. smalltalk.addMethod(
  838. "_selectItem_",
  839. smalltalk.method({
  840. selector: "selectItem:",
  841. category: 'actions',
  842. fn: function (anObject) {
  843. var self = this;
  844. smalltalk.send(self, "_selectedItem_", [anObject]);
  845. return self;
  846. },
  847. args: ["anObject"],
  848. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  849. messageSends: ["selectedItem:"],
  850. referencedClasses: []
  851. }),
  852. smalltalk.HLListWidget);
  853. smalltalk.addMethod(
  854. "_selectedItem",
  855. smalltalk.method({
  856. selector: "selectedItem",
  857. category: 'accessing',
  858. fn: function () {
  859. var self = this;
  860. var $1;
  861. if (($receiver = self['@selectedItem']) == nil ||
  862. $receiver == undefined) {
  863. $1 = smalltalk.send(smalltalk.send(self, "_items", []), "_ifNotEmpty_", [function () {return smalltalk.send(smalltalk.send(self, "_items", []), "_first", []);}]);
  864. } else {
  865. $1 = self['@selectedItem'];
  866. }
  867. return $1;
  868. },
  869. args: [],
  870. source: "selectedItem\x0a\x09^ selectedItem ifNil: [ \x0a \x09self items ifNotEmpty: [ self items first ] ]",
  871. messageSends: ["ifNil:", "ifNotEmpty:", "first", "items"],
  872. referencedClasses: []
  873. }),
  874. smalltalk.HLListWidget);
  875. smalltalk.addMethod(
  876. "_selectedItem_",
  877. smalltalk.method({
  878. selector: "selectedItem:",
  879. category: 'accessing',
  880. fn: function (anObject) {
  881. var self = this;
  882. self['@selectedItem'] = anObject;
  883. return self;
  884. },
  885. args: ["anObject"],
  886. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  887. messageSends: [],
  888. referencedClasses: []
  889. }),
  890. smalltalk.HLListWidget);
  891. smalltalk.addClass('HLBrowserListWidget', smalltalk.HLListWidget, ['browser'], 'Helios-Widgets');
  892. smalltalk.addMethod(
  893. "_browser",
  894. smalltalk.method({
  895. selector: "browser",
  896. category: 'accessing',
  897. fn: function () {
  898. var self = this;
  899. return self['@browser'];
  900. },
  901. args: [],
  902. source: "browser\x0a\x09^ browser",
  903. messageSends: [],
  904. referencedClasses: []
  905. }),
  906. smalltalk.HLBrowserListWidget);
  907. smalltalk.addMethod(
  908. "_browser_",
  909. smalltalk.method({
  910. selector: "browser:",
  911. category: 'accessing',
  912. fn: function (aBrowser) {
  913. var self = this;
  914. self['@browser'] = aBrowser;
  915. return self;
  916. },
  917. args: ["aBrowser"],
  918. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  919. messageSends: [],
  920. referencedClasses: []
  921. }),
  922. smalltalk.HLBrowserListWidget);
  923. smalltalk.addMethod(
  924. "_on_",
  925. smalltalk.method({
  926. selector: "on:",
  927. category: 'instance creation',
  928. fn: function (aBrowser) {
  929. var self = this;
  930. var $2, $3, $1;
  931. $2 = smalltalk.send(self, "_new", []);
  932. smalltalk.send($2, "_browser_", [aBrowser]);
  933. $3 = smalltalk.send($2, "_yourself", []);
  934. $1 = $3;
  935. return $1;
  936. },
  937. args: ["aBrowser"],
  938. source: "on: aBrowser\x0a\x09^ self new\x0a \x09browser: aBrowser;\x0a yourself",
  939. messageSends: ["browser:", "new", "yourself"],
  940. referencedClasses: []
  941. }),
  942. smalltalk.HLBrowserListWidget.klass);
  943. smalltalk.addClass('HLClassesListWidget', smalltalk.HLBrowserListWidget, ['package'], 'Helios-Widgets');
  944. smalltalk.addMethod(
  945. "_items",
  946. smalltalk.method({
  947. selector: "items",
  948. category: 'accessing',
  949. fn: function () {
  950. var self = this;
  951. var $2, $1;
  952. $2 = smalltalk.send(self, "_package", []);
  953. if (($receiver = $2) == nil || $receiver == undefined) {
  954. $1 = [];
  955. } else {
  956. $1 = smalltalk.send(smalltalk.send(self, "_package", []), "_classes", []);
  957. }
  958. return $1;
  959. },
  960. args: [],
  961. source: "items\x0a\x09^ self package \x0a \x09ifNil: [ #() ]\x0a \x09\x09ifNotNil: [ self package classes ]",
  962. messageSends: ["ifNil:ifNotNil:", "classes", "package"],
  963. referencedClasses: []
  964. }),
  965. smalltalk.HLClassesListWidget);
  966. smalltalk.addMethod(
  967. "_package",
  968. smalltalk.method({
  969. selector: "package",
  970. category: 'accessing',
  971. fn: function () {
  972. var self = this;
  973. return self['@package'];
  974. },
  975. args: [],
  976. source: "package\x0a\x09^ package",
  977. messageSends: [],
  978. referencedClasses: []
  979. }),
  980. smalltalk.HLClassesListWidget);
  981. smalltalk.addMethod(
  982. "_package_",
  983. smalltalk.method({
  984. selector: "package:",
  985. category: 'accessing',
  986. fn: function (aPackage) {
  987. var self = this;
  988. self['@package'] = aPackage;
  989. smalltalk.send(self, "_refresh", []);
  990. return self;
  991. },
  992. args: ["aPackage"],
  993. source: "package: aPackage\x0a\x09package := aPackage.\x0a self refresh",
  994. messageSends: ["refresh"],
  995. referencedClasses: []
  996. }),
  997. smalltalk.HLClassesListWidget);
  998. smalltalk.addClass('HLPackagesListWidget', smalltalk.HLBrowserListWidget, [], 'Helios-Widgets');
  999. smalltalk.addMethod(
  1000. "_browser",
  1001. smalltalk.method({
  1002. selector: "browser",
  1003. category: 'accessing',
  1004. fn: function () {
  1005. var self = this;
  1006. return self['@browser'];
  1007. },
  1008. args: [],
  1009. source: "browser\x0a\x09^ browser",
  1010. messageSends: [],
  1011. referencedClasses: []
  1012. }),
  1013. smalltalk.HLPackagesListWidget);
  1014. smalltalk.addMethod(
  1015. "_browser_",
  1016. smalltalk.method({
  1017. selector: "browser:",
  1018. category: 'accessing',
  1019. fn: function (aBrowser) {
  1020. var self = this;
  1021. self['@browser'] = aBrowser;
  1022. return self;
  1023. },
  1024. args: ["aBrowser"],
  1025. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  1026. messageSends: [],
  1027. referencedClasses: []
  1028. }),
  1029. smalltalk.HLPackagesListWidget);
  1030. smalltalk.addMethod(
  1031. "_environment",
  1032. smalltalk.method({
  1033. selector: "environment",
  1034. category: 'accessing',
  1035. fn: function () {
  1036. var self = this;
  1037. var $1;
  1038. $1 = smalltalk.send(smalltalk.send(self, "_browser", []), "_environment", []);
  1039. return $1;
  1040. },
  1041. args: [],
  1042. source: "environment\x0a\x09^ self browser environment",
  1043. messageSends: ["environment", "browser"],
  1044. referencedClasses: []
  1045. }),
  1046. smalltalk.HLPackagesListWidget);
  1047. smalltalk.addMethod(
  1048. "_items",
  1049. smalltalk.method({
  1050. selector: "items",
  1051. category: 'accessing',
  1052. fn: function () {
  1053. var self = this;
  1054. var $1;
  1055. $1 = smalltalk.send(smalltalk.send(self, "_environment", []), "_packages", []);
  1056. return $1;
  1057. },
  1058. args: [],
  1059. source: "items\x0a\x09^ self environment packages",
  1060. messageSends: ["packages", "environment"],
  1061. referencedClasses: []
  1062. }),
  1063. smalltalk.HLPackagesListWidget);
  1064. smalltalk.addMethod(
  1065. "_selectItem_",
  1066. smalltalk.method({
  1067. selector: "selectItem:",
  1068. category: 'actions',
  1069. fn: function (aPackage) {
  1070. var self = this;
  1071. smalltalk.send(self, "_selectItem_", [aPackage], smalltalk.HLBrowserListWidget);
  1072. smalltalk.send(smalltalk.send(self, "_browser", []), "_selectPackage_", [aPackage]);
  1073. return self;
  1074. },
  1075. args: ["aPackage"],
  1076. source: "selectItem: aPackage\x0a\x09super selectItem: aPackage.\x0a self browser selectPackage: aPackage",
  1077. messageSends: ["selectItem:", "selectPackage:", "browser"],
  1078. referencedClasses: []
  1079. }),
  1080. smalltalk.HLPackagesListWidget);
  1081. smalltalk.addClass('HLInspector', smalltalk.HLWidget, [], 'Helios-Widgets');
  1082. smalltalk.addClass('HLSUnit', smalltalk.HLWidget, [], 'Helios-Widgets');
  1083. smalltalk.addMethod(
  1084. "_canBeOpenAsTab",
  1085. smalltalk.method({
  1086. selector: "canBeOpenAsTab",
  1087. category: 'testing',
  1088. fn: function () {
  1089. var self = this;
  1090. return true;
  1091. },
  1092. args: [],
  1093. source: "canBeOpenAsTab\x0a\x09^ true",
  1094. messageSends: [],
  1095. referencedClasses: []
  1096. }),
  1097. smalltalk.HLSUnit.klass);
  1098. smalltalk.addMethod(
  1099. "_tabLabel",
  1100. smalltalk.method({
  1101. selector: "tabLabel",
  1102. category: 'accessing',
  1103. fn: function () {
  1104. var self = this;
  1105. return "SUnit";
  1106. },
  1107. args: [],
  1108. source: "tabLabel\x0a\x09^ 'SUnit'",
  1109. messageSends: [],
  1110. referencedClasses: []
  1111. }),
  1112. smalltalk.HLSUnit.klass);
  1113. smalltalk.addMethod(
  1114. "_tabPriority",
  1115. smalltalk.method({
  1116. selector: "tabPriority",
  1117. category: 'accessing',
  1118. fn: function () {
  1119. var self = this;
  1120. return 1000;
  1121. },
  1122. args: [],
  1123. source: "tabPriority\x0a\x09^ 1000",
  1124. messageSends: [],
  1125. referencedClasses: []
  1126. }),
  1127. smalltalk.HLSUnit.klass);
  1128. smalltalk.addClass('HLTabManager', smalltalk.HLWidget, ['tabs', 'activeTab', 'announcer'], 'Helios-Widgets');
  1129. smalltalk.addMethod(
  1130. "_activate_",
  1131. smalltalk.method({
  1132. selector: "activate:",
  1133. category: 'accessing',
  1134. fn: function (aTab) {
  1135. var self = this;
  1136. var $1;
  1137. self['@activeTab'] = aTab;
  1138. smalltalk.send(self, "_refresh", []);
  1139. $1 = smalltalk.send(self, "_show_", [aTab]);
  1140. return self;
  1141. },
  1142. args: ["aTab"],
  1143. source: "activate: aTab\x0a\x09activeTab := aTab.\x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09show: aTab",
  1144. messageSends: ["refresh", "show:"],
  1145. referencedClasses: []
  1146. }),
  1147. smalltalk.HLTabManager);
  1148. smalltalk.addMethod(
  1149. "_activeTab",
  1150. smalltalk.method({
  1151. selector: "activeTab",
  1152. category: 'accessing',
  1153. fn: function () {
  1154. var self = this;
  1155. return self['@activeTab'];
  1156. },
  1157. args: [],
  1158. source: "activeTab\x0a\x09^ activeTab",
  1159. messageSends: [],
  1160. referencedClasses: []
  1161. }),
  1162. smalltalk.HLTabManager);
  1163. smalltalk.addMethod(
  1164. "_addTab_",
  1165. smalltalk.method({
  1166. selector: "addTab:",
  1167. category: 'accessing',
  1168. fn: function (aTab) {
  1169. var self = this;
  1170. smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aTab]);
  1171. smalltalk.send(self, "_activate_", [aTab]);
  1172. return self;
  1173. },
  1174. args: ["aTab"],
  1175. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  1176. messageSends: ["add:", "tabs", "activate:"],
  1177. referencedClasses: []
  1178. }),
  1179. smalltalk.HLTabManager);
  1180. smalltalk.addMethod(
  1181. "_announcer",
  1182. smalltalk.method({
  1183. selector: "announcer",
  1184. category: 'accessing',
  1185. fn: function () {
  1186. var self = this;
  1187. var $1;
  1188. if (($receiver = self['@announcer']) == nil || $receiver == undefined) {
  1189. self['@announcer'] = smalltalk.send(smalltalk.Announcer || Announcer, "_new", []);
  1190. $1 = self['@announcer'];
  1191. } else {
  1192. $1 = self['@announcer'];
  1193. }
  1194. return $1;
  1195. },
  1196. args: [],
  1197. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  1198. messageSends: ["ifNil:", "new"],
  1199. referencedClasses: ["Announcer"]
  1200. }),
  1201. smalltalk.HLTabManager);
  1202. smalltalk.addMethod(
  1203. "_refresh",
  1204. smalltalk.method({
  1205. selector: "refresh",
  1206. category: 'rendering',
  1207. fn: function () {
  1208. var self = this;
  1209. smalltalk.send(smalltalk.send(window, "_jQuery_", [".navbar"]), "_remove", []);
  1210. smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_remove", []);
  1211. smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  1212. return self;
  1213. },
  1214. args: [],
  1215. source: "refresh\x0a\x09(window jQuery: '.navbar') remove.\x0a\x09(window jQuery: '#container') remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
  1216. messageSends: ["remove", "jQuery:", "appendToJQuery:", "asJQuery"],
  1217. referencedClasses: []
  1218. }),
  1219. smalltalk.HLTabManager);
  1220. smalltalk.addMethod(
  1221. "_removeTab_",
  1222. smalltalk.method({
  1223. selector: "removeTab:",
  1224. category: 'accessing',
  1225. fn: function (aTab) {
  1226. var self = this;
  1227. var $1;
  1228. $1 = smalltalk.send(smalltalk.send(self, "_tabs", []), "_includes_", [aTab]);
  1229. if (!smalltalk.assert($1)) {
  1230. return self;
  1231. }
  1232. smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aTab]);
  1233. smalltalk.send(self, "_refresh", []);
  1234. return self;
  1235. },
  1236. args: ["aTab"],
  1237. source: "removeTab: aTab\x0a\x09\x22Todo: activate the previously activated tab. Keep a history of tabs selection\x22\x0a\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self tabs remove: aTab.\x0a\x09self refresh",
  1238. messageSends: ["ifFalse:", "includes:", "tabs", "remove:", "refresh"],
  1239. referencedClasses: []
  1240. }),
  1241. smalltalk.HLTabManager);
  1242. smalltalk.addMethod(
  1243. "_renderAddOn_",
  1244. smalltalk.method({
  1245. selector: "renderAddOn:",
  1246. category: 'rendering',
  1247. fn: function (html) {
  1248. var self = this;
  1249. var $1, $3, $4, $5, $7, $8, $6, $2;
  1250. $1 = smalltalk.send(html, "_li", []);
  1251. smalltalk.send($1, "_class_", ["dropdown"]);
  1252. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_a", []);smalltalk.send($3, "_class_", ["dropdown-toggle"]);smalltalk.send($3, "_at_put_", ["data-toggle", "dropdown"]);$4 = smalltalk.send($3, "_with_", [function () {smalltalk.send(html, "_with_", ["Open..."]);return smalltalk.send(smalltalk.send(html, "_tag_", ["b"]), "_class_", ["caret"]);}]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["dropdown-menu"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.HLWidget || HLWidget, "_withAllSubclasses", []), "_select_", [function (each) {return smalltalk.send(each, "_canBeOpenAsTab", []);}]), "_sorted_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_tabPriority", []), "__lt", [smalltalk.send(b, "_tabPriority", [])]);}]), "_do_", [function (each) {return smalltalk.send(smalltalk.send(html, "_li", []), "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [smalltalk.send(each, "_tabLabel", [])]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_openAsTab", []);}]);return $8;}]);}]);}]);return $6;}]);
  1253. return self;
  1254. },
  1255. args: ["html"],
  1256. source: "renderAddOn: html\x0a html li \x0a \x09class: 'dropdown';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [ \x0a \x09\x09html with: 'Open...'.\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  1257. messageSends: ["class:", "li", "with:", "a", "at:put:", "tag:", "ul", "do:", "tabLabel", "onClick:", "openAsTab", "sorted:", "<", "tabPriority", "select:", "canBeOpenAsTab", "withAllSubclasses"],
  1258. referencedClasses: ["HLWidget"]
  1259. }),
  1260. smalltalk.HLTabManager);
  1261. smalltalk.addMethod(
  1262. "_renderContentOn_",
  1263. smalltalk.method({
  1264. selector: "renderContentOn:",
  1265. category: 'rendering',
  1266. fn: function (html) {
  1267. var self = this;
  1268. var $1, $3, $4, $2;
  1269. $1 = smalltalk.send(html, "_div", []);
  1270. smalltalk.send($1, "_class_", ["navbar navbar-fixed-top"]);
  1271. $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["navbar-inner"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderTabsOn_", [html]);}]);return $4;}]);
  1272. smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["container"]);
  1273. return self;
  1274. },
  1275. args: ["html"],
  1276. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09html div id: 'container'",
  1277. messageSends: ["class:", "div", "with:", "renderTabsOn:", "id:"],
  1278. referencedClasses: []
  1279. }),
  1280. smalltalk.HLTabManager);
  1281. smalltalk.addMethod(
  1282. "_renderTabsOn_",
  1283. smalltalk.method({
  1284. selector: "renderTabsOn:",
  1285. category: 'rendering',
  1286. fn: function (html) {
  1287. var self = this;
  1288. var $1, $3, $5, $4, $7, $8, $6, $2;
  1289. $1 = smalltalk.send(html, "_ul", []);
  1290. smalltalk.send($1, "_class_", ["nav"]);
  1291. $2 = smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);$5 = smalltalk.send(each, "_isActive", []);if (smalltalk.assert($5)) {$4 = "active";} else {$4 = "inactive";}smalltalk.send($3, "_class_", [$4]);$6 = smalltalk.send($3, "_with_", [function () {$7 = smalltalk.send(html, "_a", []);smalltalk.send($7, "_with_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(html, "_tag_", ["i"]), "_class_", ["icon-remove-circle"]), "_onClick_", [function () {return smalltalk.send(self, "_removeTab_", [each]);}]);return smalltalk.send(html, "_with_", [smalltalk.send(each, "_label", [])]);}]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(each, "_activate", []);}]);return $8;}]);return $6;}]);return smalltalk.send(self, "_renderAddOn_", [html]);}]);
  1292. return self;
  1293. },
  1294. args: ["html"],
  1295. source: "renderTabsOn: html\x0a\x09html ul \x0a\x09\x09class: 'nav';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09html li \x0a\x09\x09\x09\x09\x09class: (each isActive ifTrue: [ 'active' ] ifFalse: [ 'inactive' ]);\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09\x09with: [\x0a \x09\x09\x09\x09\x09\x09\x09((html tag: 'i') class: 'icon-remove-circle')\x0a \x09\x09\x09\x09\x09\x09\x09\x09\x09onClick: [ self removeTab: each ].\x0a \x09html with: each label ];\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ each activate ] ] ].\x0a\x09\x09\x09self renderAddOn: html ]",
  1296. messageSends: ["class:", "ul", "with:", "do:", "ifTrue:ifFalse:", "isActive", "li", "onClick:", "removeTab:", "tag:", "label", "a", "activate", "tabs", "renderAddOn:"],
  1297. referencedClasses: []
  1298. }),
  1299. smalltalk.HLTabManager);
  1300. smalltalk.addMethod(
  1301. "_show_",
  1302. smalltalk.method({
  1303. selector: "show:",
  1304. category: 'rendering',
  1305. fn: function (aTab) {
  1306. var self = this;
  1307. smalltalk.send(smalltalk.send(window, "_jQuery_", ["#container"]), "_empty", []);
  1308. smalltalk.send(smalltalk.send(aTab, "_widget", []), "_appendToJQuery_", [smalltalk.send("#container", "_asJQuery", [])]);
  1309. return self;
  1310. },
  1311. args: ["aTab"],
  1312. source: "show: aTab\x0a\x09(window jQuery: '#container') empty.\x0a\x09aTab widget appendToJQuery: '#container' asJQuery",
  1313. messageSends: ["empty", "jQuery:", "appendToJQuery:", "asJQuery", "widget"],
  1314. referencedClasses: []
  1315. }),
  1316. smalltalk.HLTabManager);
  1317. smalltalk.addMethod(
  1318. "_tabs",
  1319. smalltalk.method({
  1320. selector: "tabs",
  1321. category: 'accessing',
  1322. fn: function () {
  1323. var self = this;
  1324. var $1;
  1325. if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
  1326. self['@tabs'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
  1327. $1 = self['@tabs'];
  1328. } else {
  1329. $1 = self['@tabs'];
  1330. }
  1331. return $1;
  1332. },
  1333. args: [],
  1334. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  1335. messageSends: ["ifNil:", "new"],
  1336. referencedClasses: ["OrderedCollection"]
  1337. }),
  1338. smalltalk.HLTabManager);
  1339. smalltalk.HLTabManager.klass.iVarNames = ['current'];
  1340. smalltalk.addMethod(
  1341. "_current",
  1342. smalltalk.method({
  1343. selector: "current",
  1344. category: 'accessing',
  1345. fn: function () {
  1346. var self = this;
  1347. var $1;
  1348. if (($receiver = self['@current']) == nil || $receiver == undefined) {
  1349. self['@current'] = smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  1350. $1 = self['@current'];
  1351. } else {
  1352. $1 = self['@current'];
  1353. }
  1354. return $1;
  1355. },
  1356. args: [],
  1357. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  1358. messageSends: ["ifNil:", "initialize", "basicNew"],
  1359. referencedClasses: []
  1360. }),
  1361. smalltalk.HLTabManager.klass);
  1362. smalltalk.addMethod(
  1363. "_initialize",
  1364. smalltalk.method({
  1365. selector: "initialize",
  1366. category: 'initialization',
  1367. fn: function () {
  1368. var self = this;
  1369. smalltalk.send(smalltalk.send(self, "_current", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
  1370. return self;
  1371. },
  1372. args: [],
  1373. source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
  1374. messageSends: ["appendToJQuery:", "asJQuery", "current"],
  1375. referencedClasses: []
  1376. }),
  1377. smalltalk.HLTabManager.klass);
  1378. smalltalk.addMethod(
  1379. "_new",
  1380. smalltalk.method({
  1381. selector: "new",
  1382. category: 'instance creation',
  1383. fn: function () {
  1384. var self = this;
  1385. smalltalk.send(self, "_shouldNotImplement", []);
  1386. return self;
  1387. },
  1388. args: [],
  1389. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  1390. messageSends: ["shouldNotImplement"],
  1391. referencedClasses: []
  1392. }),
  1393. smalltalk.HLTabManager.klass);
  1394. smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Widgets');
  1395. smalltalk.addMethod(
  1396. "_canBeOpenAsTab",
  1397. smalltalk.method({
  1398. selector: "canBeOpenAsTab",
  1399. category: 'testing',
  1400. fn: function () {
  1401. var self = this;
  1402. return true;
  1403. },
  1404. args: [],
  1405. source: "canBeOpenAsTab\x0a\x09^ true",
  1406. messageSends: [],
  1407. referencedClasses: []
  1408. }),
  1409. smalltalk.HLTranscript.klass);
  1410. smalltalk.addMethod(
  1411. "_tabLabel",
  1412. smalltalk.method({
  1413. selector: "tabLabel",
  1414. category: 'accessing',
  1415. fn: function () {
  1416. var self = this;
  1417. return "Transcript";
  1418. },
  1419. args: [],
  1420. source: "tabLabel\x0a\x09^ 'Transcript'",
  1421. messageSends: [],
  1422. referencedClasses: []
  1423. }),
  1424. smalltalk.HLTranscript.klass);
  1425. smalltalk.addMethod(
  1426. "_tabPriority",
  1427. smalltalk.method({
  1428. selector: "tabPriority",
  1429. category: 'accessing',
  1430. fn: function () {
  1431. var self = this;
  1432. return 600;
  1433. },
  1434. args: [],
  1435. source: "tabPriority\x0a\x09^ 600",
  1436. messageSends: [],
  1437. referencedClasses: []
  1438. }),
  1439. smalltalk.HLTranscript.klass);
  1440. smalltalk.addClass('HLWorkspace', smalltalk.HLWidget, [], 'Helios-Widgets');
  1441. smalltalk.addMethod(
  1442. "_canBeOpenAsTab",
  1443. smalltalk.method({
  1444. selector: "canBeOpenAsTab",
  1445. category: 'testing',
  1446. fn: function () {
  1447. var self = this;
  1448. return true;
  1449. },
  1450. args: [],
  1451. source: "canBeOpenAsTab\x0a\x09^ true",
  1452. messageSends: [],
  1453. referencedClasses: []
  1454. }),
  1455. smalltalk.HLWorkspace.klass);
  1456. smalltalk.addMethod(
  1457. "_tabLabel",
  1458. smalltalk.method({
  1459. selector: "tabLabel",
  1460. category: 'accessing',
  1461. fn: function () {
  1462. var self = this;
  1463. return "Workspace";
  1464. },
  1465. args: [],
  1466. source: "tabLabel\x0a\x09^ 'Workspace'",
  1467. messageSends: [],
  1468. referencedClasses: []
  1469. }),
  1470. smalltalk.HLWorkspace.klass);
  1471. smalltalk.addMethod(
  1472. "_tabPriority",
  1473. smalltalk.method({
  1474. selector: "tabPriority",
  1475. category: 'accessing',
  1476. fn: function () {
  1477. var self = this;
  1478. return 10;
  1479. },
  1480. args: [],
  1481. source: "tabPriority\x0a\x09^ 10",
  1482. messageSends: [],
  1483. referencedClasses: []
  1484. }),
  1485. smalltalk.HLWorkspace.klass);
  1486. smalltalk.addMethod(
  1487. "_heliosListIcon",
  1488. smalltalk.method({
  1489. selector: "heliosListIcon",
  1490. category: '*Helios-Widgets',
  1491. fn: function () {
  1492. var self = this;
  1493. return "";
  1494. },
  1495. args: [],
  1496. source: "heliosListIcon\x0a\x09^ ''",
  1497. messageSends: [],
  1498. referencedClasses: []
  1499. }),
  1500. smalltalk.Object);