maglev-webtools 0.2.1 → 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +38 -29
- data/bin/webtools +22 -1
- data/lib/web_tools/code_browser.rb +156 -0
- data/lib/web_tools/debugger.rb +96 -199
- data/lib/web_tools/info.rb +1 -3
- data/lib/web_tools/method_list.rb +67 -0
- data/lib/web_tools/middleware/debugger.rb +10 -16
- data/lib/web_tools/object_log.rb +24 -0
- data/lib/web_tools/session_list.rb +119 -0
- data/lib/web_tools/shared_page_cache.rb +30 -0
- data/lib/web_tools/stat_process.rb +24 -0
- data/lib/web_tools/statistics.rb +14 -0
- data/lib/web_tools/support/app_model.rb +66 -101
- data/lib/web_tools/support/code_browser.rb +88 -86
- data/lib/web_tools/support/debugger.rb +303 -0
- data/lib/web_tools/support/error_log.rb +33 -0
- data/lib/web_tools/support/ruby.rb +60 -121
- data/lib/web_tools/support/service_helper.rb +38 -10
- data/lib/web_tools/support/smalltalk_extensions.rb +12 -0
- data/lib/web_tools/tool.rb +48 -0
- data/lib/web_tools/ui.rb +14 -53
- data/lib/web_tools/version_report.rb +29 -0
- data/lib/web_tools/workspace.rb +77 -0
- data/lib/web_tools.rb +14 -4
- data/public/CodeBrowser.html +51 -0
- data/public/CodeMirror/LICENSE +19 -0
- data/public/CodeMirror/css/codemirror.css +67 -0
- data/public/CodeMirror/css/default.css +18 -0
- data/public/CodeMirror/js/codemirror.js +2131 -0
- data/public/CodeMirror/js/ruby.js +195 -0
- data/public/CodeMirror/js/smalltalk.js +139 -0
- data/public/Debugger.html +28 -0
- data/public/MethodList.html +20 -0
- data/public/ObjectLog.html +20 -0
- data/public/SessionList.html +31 -0
- data/public/SharedPageCache.html +78 -0
- data/public/Statistics.html +64 -0
- data/public/VersionReport.html +50 -0
- data/public/Workspace.html +39 -0
- data/public/css/CodeBrowser.css +24 -0
- data/public/css/Debugger.css +32 -0
- data/public/css/MethodList.css +8 -0
- data/public/css/ObjectLog.css +5 -0
- data/public/css/SessionList.css +9 -0
- data/public/css/Statistics.css +24 -0
- data/public/{stylesheets → css}/base/images/ui-anim_basic_16x16.gif +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_222222_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_454545_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_888888_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.accordion.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.all.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.autocomplete.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.base.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.button.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.core.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.datepicker.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.dialog.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.progressbar.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.resizable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.selectable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.slider.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.tabs.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.theme.css +0 -0
- data/public/css/editor.css +25 -0
- data/public/css/jjmenu.css +33 -0
- data/public/css/menuitem.gif +0 -0
- data/public/css/more.gif +0 -0
- data/public/{stylesheets → css}/reset.css +1 -1
- data/public/css/smoothness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/css/smoothness/jquery-ui.css +489 -0
- data/public/css/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/css/ui-lightness/jquery-ui.css +489 -0
- data/public/css/webtools.css +65 -0
- data/public/favicon.ico +0 -0
- data/public/flot/API.txt +1201 -0
- data/public/flot/FAQ.txt +76 -0
- data/public/flot/LICENSE.txt +22 -0
- data/public/flot/Makefile +9 -0
- data/public/flot/NEWS.txt +508 -0
- data/public/flot/PLUGINS.txt +137 -0
- data/public/flot/README.txt +90 -0
- data/public/flot/examples/ajax.html +143 -0
- data/public/flot/examples/annotating.html +75 -0
- data/public/flot/examples/arrow-down.gif +0 -0
- data/public/flot/examples/arrow-left.gif +0 -0
- data/public/flot/examples/arrow-right.gif +0 -0
- data/public/flot/examples/arrow-up.gif +0 -0
- data/public/flot/examples/basic.html +38 -0
- data/public/flot/examples/data-eu-gdp-growth-1.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-2.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-3.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-4.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-5.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth.json +4 -0
- data/public/flot/examples/data-japan-gdp-growth.json +4 -0
- data/public/flot/examples/data-usa-gdp-growth.json +4 -0
- data/public/flot/examples/graph-types.html +75 -0
- data/public/flot/examples/hs-2004-27-a-large_web.jpg +0 -0
- data/public/flot/examples/image.html +45 -0
- data/public/flot/examples/index.html +44 -0
- data/public/flot/examples/interacting-axes.html +97 -0
- data/public/flot/examples/interacting.html +93 -0
- data/public/flot/examples/layout.css +6 -0
- data/public/flot/examples/multiple-axes.html +60 -0
- data/public/flot/examples/navigate.html +118 -0
- data/public/flot/examples/percentiles.html +57 -0
- data/public/flot/examples/pie.html +756 -0
- data/public/flot/examples/realtime.html +83 -0
- data/public/flot/examples/resize.html +61 -0
- data/public/flot/examples/selection.html +114 -0
- data/public/flot/examples/setting-options.html +61 -0
- data/public/flot/examples/stacking.html +77 -0
- data/public/flot/examples/symbols.html +49 -0
- data/public/flot/examples/thresholding.html +54 -0
- data/public/flot/examples/time.html +71 -0
- data/public/flot/examples/tracking.html +95 -0
- data/public/flot/examples/turning-series.html +98 -0
- data/public/flot/examples/visitors.html +90 -0
- data/public/flot/examples/zooming.html +98 -0
- data/public/flot/excanvas.js +1427 -0
- data/public/flot/excanvas.min.js +1 -0
- data/public/flot/jquery.colorhelpers.js +179 -0
- data/public/flot/jquery.colorhelpers.min.js +1 -0
- data/public/flot/jquery.flot.crosshair.js +167 -0
- data/public/flot/jquery.flot.crosshair.min.js +1 -0
- data/public/flot/jquery.flot.fillbetween.js +183 -0
- data/public/flot/jquery.flot.fillbetween.min.js +1 -0
- data/public/flot/jquery.flot.image.js +238 -0
- data/public/flot/jquery.flot.image.min.js +1 -0
- data/public/flot/jquery.flot.js +2599 -0
- data/public/flot/jquery.flot.min.js +6 -0
- data/public/flot/jquery.flot.navigate.js +336 -0
- data/public/flot/jquery.flot.navigate.min.js +1 -0
- data/public/flot/jquery.flot.pie.js +750 -0
- data/public/flot/jquery.flot.pie.min.js +1 -0
- data/public/flot/jquery.flot.resize.js +60 -0
- data/public/flot/jquery.flot.resize.min.js +1 -0
- data/public/flot/jquery.flot.selection.js +344 -0
- data/public/flot/jquery.flot.selection.min.js +1 -0
- data/public/flot/jquery.flot.stack.js +184 -0
- data/public/flot/jquery.flot.stack.min.js +1 -0
- data/public/flot/jquery.flot.symbol.js +70 -0
- data/public/flot/jquery.flot.symbol.min.js +1 -0
- data/public/flot/jquery.flot.threshold.js +103 -0
- data/public/flot/jquery.flot.threshold.min.js +1 -0
- data/public/flot/jquery.js +8316 -0
- data/public/flot/jquery.min.js +23 -0
- data/public/genPacking.pl +30 -0
- data/public/index.html +28 -0
- data/public/install.tpz +66 -0
- data/public/installAndRun.tpz +5 -0
- data/public/jsTree/jquery.jstree.js +3510 -0
- data/public/jsTree/themes/default/d.gif +0 -0
- data/public/jsTree/themes/default/d.png +0 -0
- data/public/jsTree/themes/default/style.css +73 -0
- data/public/jsTree/themes/default/throbber.gif +0 -0
- data/public/readMe.txt +9 -0
- data/public/scripts/CodeBrowser.js +645 -0
- data/public/scripts/Debugger.js +134 -0
- data/public/scripts/MethodList.js +72 -0
- data/public/scripts/ObjectLog.js +59 -0
- data/public/scripts/SessionList.js +164 -0
- data/public/scripts/Statistics.js +266 -0
- data/public/scripts/editor.js +430 -0
- data/public/scripts/jjmenu.js +375 -0
- data/public/scripts/jquery-ui.js +1012 -0
- data/public/scripts/jquery.js +154 -0
- data/public/scripts/webtools.js +374 -0
- data/public/src/CodeBrowser.gs +416 -0
- data/public/src/Debugger.gs +132 -0
- data/public/src/MethodList.gs +130 -0
- data/public/src/ObjectLog.gs +73 -0
- data/public/src/Server.gs +544 -0
- data/public/src/SessionList.gs +172 -0
- data/public/src/SharedPageCache.gs +66 -0
- data/public/src/StatProcess.gs +280 -0
- data/public/src/StatProcessType.gs +242 -0
- data/public/src/StatStatistic.gs +381 -0
- data/public/src/Statistics.gs +222 -0
- data/public/src/Statmonitor.gs +490 -0
- data/public/src/Tool.gs +86 -0
- data/public/src/VersionReport.gs +52 -0
- data/public/src/Workspace.gs +163 -0
- data/views/debugger.rhtml +6 -9
- metadata +344 -243
- data/lib/web_tools/#debugger.rb# +0 -212
- data/lib/web_tools/browser.rb +0 -45
- data/public/images/favicon.ico +0 -0
- data/public/javascript/CodeMirror/LICENSE +0 -23
- data/public/javascript/CodeMirror/css/Smalltalk.css +0 -34
- data/public/javascript/CodeMirror/js/codemirror.js +0 -582
- data/public/javascript/CodeMirror/js/editor.js +0 -1671
- data/public/javascript/CodeMirror/js/highlight.js +0 -68
- data/public/javascript/CodeMirror/js/parseSmalltalk.js +0 -126
- data/public/javascript/CodeMirror/js/parsedummy.js +0 -32
- data/public/javascript/CodeMirror/js/select.js +0 -699
- data/public/javascript/CodeMirror/js/stringstream.js +0 -159
- data/public/javascript/CodeMirror/js/tokenize.js +0 -57
- data/public/javascript/CodeMirror/js/undo.js +0 -413
- data/public/javascript/CodeMirror/js/util.js +0 -133
- data/public/javascript/CodeMirror/testSmalltalkParser.html +0 -116
- data/public/javascript/ace/ace-uncompressed.js +0 -17299
- data/public/javascript/ace/ace.js +0 -1
- data/public/javascript/ace/keybinding-emacs.js +0 -1
- data/public/javascript/ace/keybinding-vim.js +0 -1
- data/public/javascript/ace/mode-c_cpp.js +0 -1
- data/public/javascript/ace/mode-clojure.js +0 -1
- data/public/javascript/ace/mode-coffee.js +0 -1
- data/public/javascript/ace/mode-csharp.js +0 -1
- data/public/javascript/ace/mode-css.js +0 -1
- data/public/javascript/ace/mode-groovy.js +0 -1
- data/public/javascript/ace/mode-html.js +0 -1
- data/public/javascript/ace/mode-java.js +0 -1
- data/public/javascript/ace/mode-javascript.js +0 -1
- data/public/javascript/ace/mode-json.js +0 -1
- data/public/javascript/ace/mode-lua.js +0 -1
- data/public/javascript/ace/mode-markdown.js +0 -1
- data/public/javascript/ace/mode-ocaml.js +0 -1
- data/public/javascript/ace/mode-perl.js +0 -1
- data/public/javascript/ace/mode-php.js +0 -1
- data/public/javascript/ace/mode-python.js +0 -1
- data/public/javascript/ace/mode-ruby.js +0 -1
- data/public/javascript/ace/mode-scad.js +0 -1
- data/public/javascript/ace/mode-scala.js +0 -1
- data/public/javascript/ace/mode-scss.js +0 -1
- data/public/javascript/ace/mode-svg.js +0 -1
- data/public/javascript/ace/mode-textile.js +0 -1
- data/public/javascript/ace/mode-xml.js +0 -1
- data/public/javascript/ace/theme-clouds.js +0 -1
- data/public/javascript/ace/theme-clouds_midnight.js +0 -1
- data/public/javascript/ace/theme-cobalt.js +0 -1
- data/public/javascript/ace/theme-crimson_editor.js +0 -1
- data/public/javascript/ace/theme-dawn.js +0 -1
- data/public/javascript/ace/theme-eclipse.js +0 -1
- data/public/javascript/ace/theme-idle_fingers.js +0 -1
- data/public/javascript/ace/theme-kr_theme.js +0 -1
- data/public/javascript/ace/theme-merbivore.js +0 -1
- data/public/javascript/ace/theme-merbivore_soft.js +0 -1
- data/public/javascript/ace/theme-mono_industrial.js +0 -1
- data/public/javascript/ace/theme-monokai.js +0 -1
- data/public/javascript/ace/theme-pastel_on_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_light.js +0 -1
- data/public/javascript/ace/theme-textmate.js +0 -1
- data/public/javascript/ace/theme-twilight.js +0 -1
- data/public/javascript/ace/theme-vibrant_ink.js +0 -1
- data/public/javascript/ace/worker-coffee.js +0 -1
- data/public/javascript/ace/worker-css.js +0 -1
- data/public/javascript/ace/worker-javascript.js +0 -1
- data/public/javascript/webtools/browser.js +0 -260
- data/public/javascript/webtools/debugger.coffee +0 -286
- data/public/javascript/webtools/debugger.js +0 -366
- data/public/javascript/webtools/sessions.coffee +0 -17
- data/public/javascript/webtools/sessions.js +0 -27
- data/public/javascript/webtools/version.coffee +0 -14
- data/public/javascript/webtools/version.js +0 -20
- data/public/stylesheets/jquery.contextMenu.css +0 -62
- data/public/stylesheets/webtools.css +0 -53
- data/public/test.html +0 -47
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* jsTree default theme 1.0
|
|
3
|
+
* Supported features: dots/no-dots, icons/no-icons, focused, loading
|
|
4
|
+
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.jstree-default li,
|
|
8
|
+
.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
|
|
9
|
+
.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
|
|
10
|
+
.jstree-default li.jstree-last { background:transparent; }
|
|
11
|
+
.jstree-default .jstree-open > ins { background-position:-72px 0; }
|
|
12
|
+
.jstree-default .jstree-closed > ins { background-position:-54px 0; }
|
|
13
|
+
.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
|
|
14
|
+
|
|
15
|
+
.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
|
|
16
|
+
.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
|
|
17
|
+
.jstree-default a .jstree-icon { background-position:-56px -19px; }
|
|
18
|
+
.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
|
|
19
|
+
|
|
20
|
+
.jstree-default.jstree-focused { background:#ffffee; }
|
|
21
|
+
|
|
22
|
+
.jstree-default .jstree-no-dots li,
|
|
23
|
+
.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
|
|
24
|
+
.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
|
|
25
|
+
.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
|
|
26
|
+
|
|
27
|
+
.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
|
|
28
|
+
|
|
29
|
+
.jstree-default .jstree-search { font-style:italic; }
|
|
30
|
+
|
|
31
|
+
.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
|
|
32
|
+
.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
|
|
33
|
+
.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
|
|
34
|
+
.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
|
|
35
|
+
.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
|
|
36
|
+
.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
|
|
37
|
+
.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
|
|
38
|
+
.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
|
|
39
|
+
|
|
40
|
+
#vakata-dragged.jstree-default ins { background:transparent !important; }
|
|
41
|
+
#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
|
|
42
|
+
#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
|
|
43
|
+
#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; }
|
|
44
|
+
|
|
45
|
+
.jstree-default a.jstree-search { color:aqua; }
|
|
46
|
+
|
|
47
|
+
#vakata-contextmenu.jstree-default-context,
|
|
48
|
+
#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
|
|
49
|
+
#vakata-contextmenu.jstree-default-context li { }
|
|
50
|
+
#vakata-contextmenu.jstree-default-context a { color:black; }
|
|
51
|
+
#vakata-contextmenu.jstree-default-context a:hover,
|
|
52
|
+
#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
|
|
53
|
+
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
|
|
54
|
+
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
|
|
55
|
+
#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
|
|
56
|
+
#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
|
|
57
|
+
|
|
58
|
+
/* IE6 BEGIN */
|
|
59
|
+
.jstree-default li,
|
|
60
|
+
.jstree-default ins,
|
|
61
|
+
#vakata-dragged.jstree-default .jstree-invalid,
|
|
62
|
+
#vakata-dragged.jstree-default .jstree-ok,
|
|
63
|
+
#jstree-marker.jstree-default { _background-image:url("d.gif"); }
|
|
64
|
+
.jstree-default .jstree-open ins { _background-position:-72px 0; }
|
|
65
|
+
.jstree-default .jstree-closed ins { _background-position:-54px 0; }
|
|
66
|
+
.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
|
|
67
|
+
.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
|
|
68
|
+
#vakata-contextmenu.jstree-default-context ins { _display:none; }
|
|
69
|
+
#vakata-contextmenu.jstree-default-context li { _zoom:1; }
|
|
70
|
+
.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
|
|
71
|
+
.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
|
|
72
|
+
.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
|
|
73
|
+
/* IE6 END */
|
|
Binary file
|
data/public/readMe.txt
ADDED
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
GemStone.saveScript('scripts/CodeBrowser.js', function() {
|
|
2
|
+
var $tabPanel
|
|
3
|
+
, editor
|
|
4
|
+
, classCategories = ['']
|
|
5
|
+
, isDictsTab = true
|
|
6
|
+
, dictionary
|
|
7
|
+
, mcPackage
|
|
8
|
+
, classCategory
|
|
9
|
+
, klass
|
|
10
|
+
, isMetaClass = false
|
|
11
|
+
, superClass
|
|
12
|
+
, methodFilterBy = 'category'
|
|
13
|
+
, methodFilter
|
|
14
|
+
, selector
|
|
15
|
+
, implementor
|
|
16
|
+
, isCtrlKeyDown = false
|
|
17
|
+
;
|
|
18
|
+
GemStone.loadCSS('css/CodeBrowser.css');
|
|
19
|
+
GemStone.runJsOnce('jsTree/jquery.jstree.js', function() {
|
|
20
|
+
$.jstree._themes = 'jsTree/themes/';
|
|
21
|
+
GemStone.addTab({
|
|
22
|
+
id: 'newTab'
|
|
23
|
+
, label: 'Code Browser'
|
|
24
|
+
, title: 'Browse Smalltalk classes'
|
|
25
|
+
, onAdd: onAdd
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
return;
|
|
29
|
+
|
|
30
|
+
function onAdd(tabPanel) {
|
|
31
|
+
$tabPanel = tabPanel;
|
|
32
|
+
$('.divList').keydown(keydown);
|
|
33
|
+
doLayout();
|
|
34
|
+
update();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// keypress does not capture arrow keys (and other browser overrides) so we use keydown event
|
|
38
|
+
function keydown(event) {
|
|
39
|
+
if (event.ctrlKey || event.shiftKey) { return; }
|
|
40
|
+
if (event.which === 38 || event.which === 40) { upDownKey(event); }
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function upDownKey(event) {
|
|
45
|
+
var element = $('.divList:focus')[0];
|
|
46
|
+
if (element) {
|
|
47
|
+
element = $('.selected', element);
|
|
48
|
+
element = event.which === 38 ? element.prev() : element.next();
|
|
49
|
+
if (element) {
|
|
50
|
+
element.click();
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function doLayout() {
|
|
58
|
+
createDictionaryPackageTabs();
|
|
59
|
+
createClassesTabs();
|
|
60
|
+
createCategoriesVariablesTabs();
|
|
61
|
+
createInstanceClassTabs();
|
|
62
|
+
fixupTabsCornerStyling();
|
|
63
|
+
setupEditor();
|
|
64
|
+
return;
|
|
65
|
+
|
|
66
|
+
function prepareTabs($div, onSelect) {
|
|
67
|
+
var $divList = $('div', $div);
|
|
68
|
+
$.each($('ul li', $div), function(index) {
|
|
69
|
+
var id = GemStone.nextId();
|
|
70
|
+
$('a', this).attr('href', '#' + id);
|
|
71
|
+
$($divList[index]).attr('id', id);
|
|
72
|
+
});
|
|
73
|
+
$div.tabs({ select: onSelect });
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function createDictionaryPackageTabs() {
|
|
77
|
+
prepareTabs(
|
|
78
|
+
$('.dictPckgTabs', $tabPanel),
|
|
79
|
+
function(event, ui) {
|
|
80
|
+
if (setIsDictsTab(0 === ui.index)) { update(); }
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function createClassesTabs() {
|
|
86
|
+
prepareTabs(
|
|
87
|
+
$('.classesTab', $tabPanel),
|
|
88
|
+
function(event, ui) { }
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function createCategoriesVariablesTabs() {
|
|
93
|
+
prepareTabs(
|
|
94
|
+
$('.catsVariablesTabs', $tabPanel),
|
|
95
|
+
function(event, ui) {
|
|
96
|
+
var filterBy = ['category', 'variable'][ui.index];
|
|
97
|
+
if (setMethodFilterBy(filterBy)) { update(); }
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function createInstanceClassTabs() {
|
|
103
|
+
prepareTabs(
|
|
104
|
+
$('.instanceClassTabs', $tabPanel),
|
|
105
|
+
function(event, ui) {
|
|
106
|
+
if (setIsMetaClass(1 === ui.index)) { update(); }
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function fixupTabsCornerStyling() {
|
|
112
|
+
$('.ui-tabs-nav, .ui-tabs-nav > *, .tabs-empty', $tabPanel)
|
|
113
|
+
.removeClass('ui-corner-all ui-corner-bottom')
|
|
114
|
+
.addClass('ui-corner-top');
|
|
115
|
+
$('.tabs-bottom, .tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *', $tabPanel)
|
|
116
|
+
.removeClass('ui-corner-all ui-corner-top')
|
|
117
|
+
.addClass('ui-corner-bottom');
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function setupEditor() {
|
|
121
|
+
GemStone.runJs(
|
|
122
|
+
'scripts/editor.js'
|
|
123
|
+
, {
|
|
124
|
+
editArea: $('.editArea', $tabPanel)
|
|
125
|
+
}
|
|
126
|
+
, function(object) { editor = object; }
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function update() {
|
|
132
|
+
var myRequest = {
|
|
133
|
+
isDictsTab : isDictsTab
|
|
134
|
+
, dict : dictionary
|
|
135
|
+
, mcPackage : mcPackage
|
|
136
|
+
, classCat : classCategory
|
|
137
|
+
, klass : klass
|
|
138
|
+
, isMeta : isMetaClass
|
|
139
|
+
, superClass : superClass
|
|
140
|
+
, methodFilterBy : methodFilterBy
|
|
141
|
+
, methodFilter : methodFilter
|
|
142
|
+
, selector : selector
|
|
143
|
+
, implementor : implementor
|
|
144
|
+
};
|
|
145
|
+
// console.trace();
|
|
146
|
+
// console.log(myRequest);
|
|
147
|
+
GemStone.ajax('GET','CodeBrowser', myRequest, gotData);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function gotData(data) {
|
|
151
|
+
// console.log(data);
|
|
152
|
+
setMethodFilterListPosition();
|
|
153
|
+
fillDictList();
|
|
154
|
+
fillPackageList();
|
|
155
|
+
fillClassCatTree();
|
|
156
|
+
fillClassList();
|
|
157
|
+
fillSuperList();
|
|
158
|
+
fillMethodFilterList();
|
|
159
|
+
fillMethodList();
|
|
160
|
+
fillImplementorList();
|
|
161
|
+
fillEditArea();
|
|
162
|
+
return;
|
|
163
|
+
|
|
164
|
+
function setMethodFilterListPosition() {
|
|
165
|
+
$('.methodFilterList', $tabPanel)
|
|
166
|
+
.css('top', $('.catsVariablesTabs', $tabPanel).outerHeight() - 1 + 'px')
|
|
167
|
+
.css('bottom', $('.instanceClassTabs', $tabPanel).height() + 1 + 'px')
|
|
168
|
+
;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function fillDictList() {
|
|
172
|
+
var items = []
|
|
173
|
+
, foundSelection = false;
|
|
174
|
+
$.each(data.dictList, function(index, value){
|
|
175
|
+
items.push('<div title="' + value + '"');
|
|
176
|
+
items.push(' class="clickable');
|
|
177
|
+
if (value === dictionary) { items.push(' selected'); foundSelection = true; }
|
|
178
|
+
items.push('">' + value + '</div>');
|
|
179
|
+
});
|
|
180
|
+
$('.dictList', $tabPanel).empty().append(items.join(''));
|
|
181
|
+
$('.dictList .clickable', $tabPanel).click(function(event){
|
|
182
|
+
if (setDictionary($(this).text())) { update(); }
|
|
183
|
+
});
|
|
184
|
+
GemStone.menu({
|
|
185
|
+
selector: $('.dictList .clickable', $tabPanel)
|
|
186
|
+
, menu: dictionaryListMenu
|
|
187
|
+
});
|
|
188
|
+
if (!foundSelection) { dictionary = null; }
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function dictionaryListMenu(element) {
|
|
192
|
+
return [
|
|
193
|
+
{ title: 'Menu 1'
|
|
194
|
+
, action: function() { console.log(['menu1', element]); }
|
|
195
|
+
}
|
|
196
|
+
, { title: 'Menu 2'
|
|
197
|
+
, action: function() { console.log(['menu2', element]); }
|
|
198
|
+
}
|
|
199
|
+
];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function fillPackageList() {
|
|
203
|
+
var items = []
|
|
204
|
+
, foundSelection = false;
|
|
205
|
+
$.each(data.packageList, function(index, value){
|
|
206
|
+
items.push('<div title="' + value + '"');
|
|
207
|
+
items.push(' class="clickable');
|
|
208
|
+
if (value === mcPackage) { items.push(' selected'); foundSelection = true; }
|
|
209
|
+
items.push('">' + value + '</div>');
|
|
210
|
+
});
|
|
211
|
+
$('.pckgList', $tabPanel).empty().append(items.join(''));
|
|
212
|
+
$('.pckgList .clickable', $tabPanel).click(function(event){
|
|
213
|
+
if (setPackage($(this).text())) { update(); }
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
if (!foundSelection) { mcPackage = null; }
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function fillClassCatTree() {
|
|
220
|
+
if (!dictionary) { return }
|
|
221
|
+
var openNodes = $('.classCats', $tabPanel)
|
|
222
|
+
.find('li')
|
|
223
|
+
.map(function(index, element) { return element.id; })
|
|
224
|
+
.filter(function() {
|
|
225
|
+
return $('.classCats', $tabPanel).jstree('is_open', '#' + this);
|
|
226
|
+
})
|
|
227
|
+
, root = {
|
|
228
|
+
data: 'Categories'
|
|
229
|
+
, attr: { id: idOfClassCat(null), title: '' }
|
|
230
|
+
, children: [ ]
|
|
231
|
+
}
|
|
232
|
+
;
|
|
233
|
+
$.each(data.classCatList, function(i, each) {
|
|
234
|
+
addCategoryToNode(each, root, null);
|
|
235
|
+
});
|
|
236
|
+
if (!idOfClassCat(classCategory)) { classCategory = null; }
|
|
237
|
+
if ( root.children.length ) { root.state = 'open'; }
|
|
238
|
+
$('.classCats', $tabPanel)
|
|
239
|
+
.jstree({
|
|
240
|
+
plugins: [ 'themes', 'json_data', 'ui' ]
|
|
241
|
+
, themes: { icons: false }
|
|
242
|
+
, json_data: { data: [ root ] }
|
|
243
|
+
, ui: {
|
|
244
|
+
select_limit: 1
|
|
245
|
+
, initially_select: [ idOfClassCat(classCategory) ]
|
|
246
|
+
}
|
|
247
|
+
})
|
|
248
|
+
.bind('select_node.jstree', function(event, data) {
|
|
249
|
+
var path = $('.classCats', $tabPanel).jstree('get_selected').attr('title');
|
|
250
|
+
if (setClassCat(path)) { update(); }
|
|
251
|
+
});
|
|
252
|
+
return;
|
|
253
|
+
|
|
254
|
+
function addCategoryToNode(category, node, parentPath) {
|
|
255
|
+
var index = category.indexOf('-')
|
|
256
|
+
, first = category.substring(0, 0 <= index ? index : category.length)
|
|
257
|
+
, rest = 0 <= index ? category.substring(index + 1) : null
|
|
258
|
+
, children = node.children
|
|
259
|
+
, myPath = (parentPath ? parentPath + '-' : '') + first
|
|
260
|
+
, child
|
|
261
|
+
;
|
|
262
|
+
$.each(children, function(index, each) {
|
|
263
|
+
if (first === each.data) { child = each; }
|
|
264
|
+
});
|
|
265
|
+
if ( !child ) {
|
|
266
|
+
var id = idOfClassCat(myPath)
|
|
267
|
+
, isOpen = false
|
|
268
|
+
;
|
|
269
|
+
$.each(openNodes, function(index, value) {
|
|
270
|
+
if (value === id) { isOpen = true; }
|
|
271
|
+
});
|
|
272
|
+
child = {
|
|
273
|
+
data: first
|
|
274
|
+
, attr: { id: id, title: myPath }
|
|
275
|
+
, state: (isOpen ? 'open' : null)
|
|
276
|
+
, children: [ ]
|
|
277
|
+
};
|
|
278
|
+
children.push(child);
|
|
279
|
+
}
|
|
280
|
+
if (rest) {
|
|
281
|
+
addCategoryToNode(rest, child, myPath);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
function fillClassList() {
|
|
287
|
+
var items = []
|
|
288
|
+
, foundSelection = false
|
|
289
|
+
;
|
|
290
|
+
$.each(data.classList, function(index, value){
|
|
291
|
+
items.push('<div title="' + value + '"');
|
|
292
|
+
items.push(' class="clickable');
|
|
293
|
+
if (klass === value) {
|
|
294
|
+
foundSelection = true;
|
|
295
|
+
items.push(' selected');
|
|
296
|
+
}
|
|
297
|
+
items.push('">' + value + '</div>');
|
|
298
|
+
});
|
|
299
|
+
if (!foundSelection) { klass = null; }
|
|
300
|
+
$('.classList', $tabPanel).empty().append(items.join(''));
|
|
301
|
+
$('.classList .clickable', $tabPanel).click(function(){
|
|
302
|
+
if (setKlass($(this).text())) { update(); }
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
GemStone.menu({
|
|
306
|
+
selector: $('.classList .clickable', $tabPanel)
|
|
307
|
+
, menu: classListMenu
|
|
308
|
+
});
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function classListMenu(element) {
|
|
313
|
+
var klass = $(element).text();
|
|
314
|
+
return [
|
|
315
|
+
{ title: 'Browse References'
|
|
316
|
+
, action: function() {
|
|
317
|
+
GemStone.browseReferencesTo(dictionary, klass);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
, { title: 'File Out Class'
|
|
321
|
+
, action: function() {
|
|
322
|
+
alert('Coming soon!');
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
, { title: 'Subclass Creation Template'
|
|
326
|
+
, action: function() {
|
|
327
|
+
alert('Coming soon!');
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
, { title: 'Add Missing Accessors'
|
|
331
|
+
, action: function() {
|
|
332
|
+
alert('Coming soon!');
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
, { title: 'Remove'
|
|
336
|
+
, action: function() {
|
|
337
|
+
if (confirm('Do you want to remove ' + klass + ' from ' + dictionary + '?')) {
|
|
338
|
+
removeClass(dictionary, klass);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
, { title: 'Remove Prior Versions'
|
|
343
|
+
, action: function() {
|
|
344
|
+
alert('Coming soon!');
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
function removeClass(aDictName, aKlassName) {
|
|
351
|
+
var myRequest = { dict: aDictName , klass: aKlassName };
|
|
352
|
+
GemStone.ajax('POST','CodeBrowser/removeClass', myRequest, onRemoveClass);
|
|
353
|
+
return;
|
|
354
|
+
|
|
355
|
+
function onRemoveClass(data) {
|
|
356
|
+
if (data.error) {
|
|
357
|
+
alert(data.error);
|
|
358
|
+
} else {
|
|
359
|
+
setKlass();
|
|
360
|
+
update();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function fillSuperList() {
|
|
366
|
+
var foundSelection = false;
|
|
367
|
+
$('.superList', $tabPanel).empty();
|
|
368
|
+
var items = [];
|
|
369
|
+
if (!superClass) {
|
|
370
|
+
superClass = isMetaClass ? klass + ' class' : klass;
|
|
371
|
+
}
|
|
372
|
+
$.each(data.superList, function(index, value){
|
|
373
|
+
items.push('<option value="' + value + '"');
|
|
374
|
+
items.push(' title="' + value + '"');
|
|
375
|
+
if (superClass === value) {
|
|
376
|
+
foundSelection = true;
|
|
377
|
+
items.push(' selected');
|
|
378
|
+
}
|
|
379
|
+
items.push('>' + value + '</div>');
|
|
380
|
+
});
|
|
381
|
+
if ( !foundSelection ) { superClass = null; }
|
|
382
|
+
$('.superList', $tabPanel).append(items.join(''));
|
|
383
|
+
$('.superList').change(function(){
|
|
384
|
+
if(setSuperClass($(this).val())) { update(); }
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
function fillMethodFilterList() {
|
|
389
|
+
var foundSelection = false;
|
|
390
|
+
$('.methodFilterList', $tabPanel).empty();
|
|
391
|
+
$.each(data.methodFilterList, function(index,value){
|
|
392
|
+
if (methodFilter === value) { foundSelection = true; }
|
|
393
|
+
});
|
|
394
|
+
if ( !foundSelection ) { methodFilter = null; }
|
|
395
|
+
if ( 0 === data.methodFilterList.length ) { return; }
|
|
396
|
+
var items = [];
|
|
397
|
+
items.push('<div title="" class="clickable');
|
|
398
|
+
if (!foundSelection) { items.push(' selected'); }
|
|
399
|
+
items.push('">* * ALL * *</div>');
|
|
400
|
+
$.each(data.methodFilterList, function(index,value){
|
|
401
|
+
items.push('<div title="' + value + '"');
|
|
402
|
+
items.push(' class="clickable');
|
|
403
|
+
if (value === methodFilter) { items.push(' selected'); }
|
|
404
|
+
items.push('">' + value + '</div>');
|
|
405
|
+
});
|
|
406
|
+
$('.methodFilterList', $tabPanel).append(items.join(''));
|
|
407
|
+
$('.methodFilterList .clickable', $tabPanel).click(function(){
|
|
408
|
+
if (setMethodFilter($(this).text())) { update(); }
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function fillMethodList() {
|
|
413
|
+
var foundSelection = false;
|
|
414
|
+
$('.methodList', $tabPanel).empty();
|
|
415
|
+
var items = [];
|
|
416
|
+
$.each(data.methodList, function(index, value){
|
|
417
|
+
items.push('<div');
|
|
418
|
+
items.push(' title="' + value + '"');
|
|
419
|
+
items.push(' class="clickable');
|
|
420
|
+
if (selector === value) {
|
|
421
|
+
foundSelection = true;
|
|
422
|
+
items.push(' selected');
|
|
423
|
+
}
|
|
424
|
+
items.push('">' + value + '</div>');
|
|
425
|
+
});
|
|
426
|
+
if (!foundSelection) { selector = null; }
|
|
427
|
+
$('.methodList', $tabPanel).append(items.join(''));
|
|
428
|
+
$('.methodList .clickable', $tabPanel).click(function(){
|
|
429
|
+
if (setSelector($(this).text())) { update(); }
|
|
430
|
+
});
|
|
431
|
+
GemStone.menu({
|
|
432
|
+
selector: $('.methodList .clickable', $tabPanel)
|
|
433
|
+
, menu: methodListMenu
|
|
434
|
+
});
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function methodListMenu(element) {
|
|
439
|
+
var name = $(element).text();
|
|
440
|
+
return [
|
|
441
|
+
{ title: 'Remove Method'
|
|
442
|
+
, action: function() {
|
|
443
|
+
if (confirm('Do you want to remove #\'' + name +
|
|
444
|
+
'\' from ' + klass +
|
|
445
|
+
(isMetaClass ? ' class' : '') +
|
|
446
|
+
' in ' + dictionary + '?')) {
|
|
447
|
+
removeMethod(dictionary, klass, isMetaClass, name);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
, { title: 'Browse Implementors'
|
|
452
|
+
, action: function() {
|
|
453
|
+
GemStone.browseImplementorsOf(name);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
, { title: 'Browse Implementors of ...'
|
|
457
|
+
, action: function() {
|
|
458
|
+
GemStone.browseImplementorsOf();
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
, { title: 'Browse Senders'
|
|
462
|
+
, action: function() {
|
|
463
|
+
GemStone.browseSendersOf(name);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
, { title: 'Browse Senders of ...'
|
|
467
|
+
, action: function() {
|
|
468
|
+
GemStone.browseSendersOf();
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
];
|
|
472
|
+
|
|
473
|
+
function removeMethod(dictName, klassName, isMetaBool, methodName) {
|
|
474
|
+
var myRequest = {
|
|
475
|
+
dict: dictName
|
|
476
|
+
, klass: klassName
|
|
477
|
+
, isMeta: isMetaBool
|
|
478
|
+
, name: methodName
|
|
479
|
+
};
|
|
480
|
+
GemStone.ajax('POST','CodeBrowser/removeMethod', myRequest, onRemoveMethod);
|
|
481
|
+
return;
|
|
482
|
+
|
|
483
|
+
function onRemoveMethod(data) {
|
|
484
|
+
if (data.error) {
|
|
485
|
+
alert(data.error);
|
|
486
|
+
} else {
|
|
487
|
+
setSelector();
|
|
488
|
+
update();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
console.log([dictName, klassName, isMetaBool, methodName]);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
function fillImplementorList() {
|
|
497
|
+
var foundSelection = false;
|
|
498
|
+
$.each(data.implList, function(index,value){
|
|
499
|
+
if (implementor === value) { foundSelection = true; }
|
|
500
|
+
});
|
|
501
|
+
if ( !foundSelection ) { implementor = data.implList[data.implList.length - 1]; }
|
|
502
|
+
$('.implList', $tabPanel).empty();
|
|
503
|
+
var items = [];
|
|
504
|
+
$.each(data.implList, function(index, value){
|
|
505
|
+
items.push('<option value="' + value + '"');
|
|
506
|
+
items.push(' title="' + value + '"');
|
|
507
|
+
if (implementor === value) { items.push(' selected'); }
|
|
508
|
+
items.push('>' + value + '</div>');
|
|
509
|
+
});
|
|
510
|
+
$('.implList', $tabPanel).append(items.join(''));
|
|
511
|
+
$('.implList').change(function(){
|
|
512
|
+
if(setImplementor($(this).val())) { update(); }
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
function fillEditArea() {
|
|
517
|
+
if (!editor) { return; }
|
|
518
|
+
if (data.method) {
|
|
519
|
+
editor.setMethod(data.method, onSaveMethod);
|
|
520
|
+
} else {
|
|
521
|
+
editor.setCode(data.classDef, onSaveClass);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
function onSaveClass(data) {
|
|
529
|
+
setIsDictsTab(true);
|
|
530
|
+
setDictionary(data.dict);
|
|
531
|
+
if (!classCategory && classCategory !== data.cat) { setClassCat(''); }
|
|
532
|
+
setKlass(data.name);
|
|
533
|
+
update();
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
function onSaveMethod(data) {
|
|
537
|
+
if (setSelector(data)) { update(); }
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
function isOkayToChange() {
|
|
541
|
+
return editor ? editor.isOkayToChange() : true;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
function idOfClassCat(aString) {
|
|
545
|
+
if (!aString) { return 'classCat-0'; }
|
|
546
|
+
var index = classCategories.indexOf(aString);
|
|
547
|
+
if (-1 === index) {
|
|
548
|
+
classCategories.push(aString);
|
|
549
|
+
index = classCategories.length - 1;
|
|
550
|
+
}
|
|
551
|
+
return 'classCat-' + index;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function setIsDictsTab(value) {
|
|
555
|
+
if (isDictsTab === value) { return false; }
|
|
556
|
+
isDictsTab = value;
|
|
557
|
+
setDictionary(null);
|
|
558
|
+
setPackage(null);
|
|
559
|
+
return true;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function setDictionary(value) {
|
|
563
|
+
if (dictionary === value) { return false; }
|
|
564
|
+
if (!isOkayToChange()) { return false; }
|
|
565
|
+
dictionary = value;
|
|
566
|
+
setPackage(null);
|
|
567
|
+
setClassCat(null);
|
|
568
|
+
return true;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
function setPackage(value) {
|
|
572
|
+
if (mcPackage === value) { return false; }
|
|
573
|
+
if (!isOkayToChange()) { return false; }
|
|
574
|
+
mcPackage = value;
|
|
575
|
+
setDictionary(null);
|
|
576
|
+
setClassCat(null);
|
|
577
|
+
return true;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function setClassCat(value) {
|
|
581
|
+
if (value === '') { return setClassCat(null); }
|
|
582
|
+
if (classCategory === value) { return false; }
|
|
583
|
+
if (!isOkayToChange()) { return false; }
|
|
584
|
+
classCategory = value;
|
|
585
|
+
setKlass(null);
|
|
586
|
+
return true;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
function setKlass(value) {
|
|
590
|
+
if (klass === value) { return false; }
|
|
591
|
+
if (!isOkayToChange()) { return false; }
|
|
592
|
+
klass = value;
|
|
593
|
+
setSuperClass(null);
|
|
594
|
+
setMethodFilter(null);
|
|
595
|
+
setSelector(null);
|
|
596
|
+
return true;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
function setIsMetaClass(value) {
|
|
600
|
+
if (isMetaClass === value) { return false; }
|
|
601
|
+
if (!isOkayToChange()) { return false; }
|
|
602
|
+
isMetaClass = value;
|
|
603
|
+
setSuperClass(null);
|
|
604
|
+
setMethodFilter(null);
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function setSuperClass(value) {
|
|
609
|
+
if (superClass === value) { return false; }
|
|
610
|
+
if (!isOkayToChange()) { return false; }
|
|
611
|
+
superClass = value;
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
function setMethodFilterBy(value) {
|
|
616
|
+
if (methodFilterBy === value) { return false; }
|
|
617
|
+
if (!isOkayToChange()) { return false; }
|
|
618
|
+
methodFilterBy = value;
|
|
619
|
+
setMethodFilter(null);
|
|
620
|
+
return true;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function setMethodFilter(value) {
|
|
624
|
+
if (methodFilter === value) { return false; }
|
|
625
|
+
if (!isOkayToChange()) { return false; }
|
|
626
|
+
methodFilter = value;
|
|
627
|
+
setSelector(null);
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
function setSelector(value) {
|
|
632
|
+
if (selector === value) { return false; }
|
|
633
|
+
if (!isOkayToChange()) { return false; }
|
|
634
|
+
selector = value;
|
|
635
|
+
return true;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
function setImplementor(value) {
|
|
639
|
+
if (implementor === value) { return false; }
|
|
640
|
+
if (!isOkayToChange()) { return false; }
|
|
641
|
+
implementor = value;
|
|
642
|
+
return true;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
});
|