cheri 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -11
- data/lib/cheri/builder/connecter.rb +14 -5
- data/lib/cheri/builder/generator.rb +4 -4
- data/lib/cheri/cheri.rb +1 -1
- data/lib/cheri/cjx.rb +0 -1
- data/lib/cheri/explorer/explorer.rb +3 -3
- data/lib/cheri/jruby/explorer/dialogs.rb +6 -2
- data/lib/cheri/jruby/explorer/viewers.rb +2 -2
- metadata +1 -1
data/README
CHANGED
@@ -6,7 +6,7 @@ based on the framework, as well as a builder-builder tool for easily creating
|
|
6
6
|
simple builders. Cheri also comes with a demo application, Cheri::JRuby::Explorer,
|
7
7
|
that is built using two of the supplied builders (Cheri::Swing and Cheri::Html).
|
8
8
|
|
9
|
-
This version (0.0.
|
9
|
+
This version (0.0.4) is an early beta release. Some features are not yet fully
|
10
10
|
developed, in particular the HTML/XML components. On the other hand, Cheri::Swing,
|
11
11
|
which is the successor to JRBuilder (http://www2.webng.com/bdortch/jrbuilder), is
|
12
12
|
relatively mature, in an adolescent sort of way, though many features could be added.
|
@@ -41,7 +41,7 @@ Cheri gem):
|
|
41
41
|
Cheri::JRuby::Explorer.run
|
42
42
|
|
43
43
|
This will take several seconds to load and start -- performance will be one area
|
44
|
-
of improvement for versions 0.0.
|
44
|
+
of improvement for versions 0.0.5 and beyond. Once it loads, it should be fairly
|
45
45
|
clear what to do.
|
46
46
|
|
47
47
|
Some known issues:
|
@@ -54,21 +54,17 @@ Some known issues:
|
|
54
54
|
NullPointerException (JList seems to get overwhelmed), requiring a restart of
|
55
55
|
CJX. I had a fix in that did a GC on the target instance before each search,
|
56
56
|
which seemed to help, but also seemed a little extreme. This will be a search
|
57
|
-
option in 0.0.
|
57
|
+
option in 0.0.5.
|
58
58
|
|
59
59
|
* There are lots of layout issues; neither HTML (JEditorPane) nor BoxLayout provide
|
60
60
|
exactly what I'm looking for. Will probably have to bite the bullet and go to
|
61
61
|
GridBagLayout. Ugh.
|
62
62
|
|
63
|
-
*
|
64
|
-
|
65
|
-
in 0.0.4.
|
66
|
-
|
67
|
-
* Speaking of tabs, tab management (and navigation in general) is not yet quite right.
|
68
|
-
Will have history/back buttons and better tab management in 0.0.4.
|
63
|
+
* Tab management (and navigation in general) is not yet quite right.
|
64
|
+
Will have history/back buttons and better tab management in 0.0.5.
|
69
65
|
|
70
66
|
* Global variables are currently shown, um, globally, when many of them should be shown
|
71
|
-
per thread. This will be fixed in 0.0.
|
67
|
+
per thread. This will be fixed in 0.0.5, which will include a Thread section with
|
72
68
|
other goodies as well (thread-local vars, status, etc.).
|
73
69
|
|
74
70
|
To install the CJX DRb server component in an instance (assuming the Cheri gem is
|
@@ -95,4 +91,4 @@ Please visit the Cheri site for more documentation, I'll be continually adding t
|
|
95
91
|
in the coming days.
|
96
92
|
|
97
93
|
Bill Dortch <cheri.project@gmail.com>
|
98
|
-
|
94
|
+
10 June 2007
|
@@ -26,12 +26,11 @@ module Cheri
|
|
26
26
|
module Builder
|
27
27
|
|
28
28
|
class TypeConnecter
|
29
|
-
# TODO: cache based on parent/child ancestors
|
30
|
-
#@cache = {}
|
31
29
|
|
32
30
|
def initialize(*parents,&k)
|
33
31
|
@t = {}
|
34
32
|
@s = {}
|
33
|
+
@c = {}
|
35
34
|
unless parents.empty?
|
36
35
|
t = @t
|
37
36
|
s = @s
|
@@ -80,14 +79,21 @@ class TypeConnecter
|
|
80
79
|
end
|
81
80
|
# then try parent type matches
|
82
81
|
t = @t
|
83
|
-
(class<<builder.object;self;end).ancestors
|
82
|
+
bld_anc = (class<<builder.object;self;end).ancestors
|
83
|
+
anc ||= (class<<obj;self;end).ancestors
|
84
|
+
key = [bld_anc,anc,sym]
|
85
|
+
if (ctr = @c[key])
|
86
|
+
return ctr.prepare(ctx,builder,obj,sym,props)
|
87
|
+
end
|
88
|
+
bld_anc.each do |a|
|
84
89
|
if (type = t[a])
|
85
90
|
# child symbol match?
|
86
91
|
if (sctr = type.sctrs[sym])
|
92
|
+
@c[key] = sctr
|
87
93
|
return sctr.prepare(ctx,builder,obj,sym,props)
|
88
94
|
end
|
89
95
|
# child type match?
|
90
|
-
anc ||= (class<<obj;self;end).ancestors
|
96
|
+
#anc ||= (class<<obj;self;end).ancestors
|
91
97
|
ix ||= anc.length
|
92
98
|
match = nil
|
93
99
|
# match on nearest ancestor
|
@@ -97,7 +103,10 @@ class TypeConnecter
|
|
97
103
|
match = tctr
|
98
104
|
end
|
99
105
|
end
|
100
|
-
|
106
|
+
if match
|
107
|
+
@c[key] = match
|
108
|
+
return match.prepare(ctx,builder,obj,sym,props)
|
109
|
+
end
|
101
110
|
end
|
102
111
|
end
|
103
112
|
false
|
@@ -332,10 +332,10 @@ class Generator
|
|
332
332
|
private :create_mod
|
333
333
|
|
334
334
|
class EvalBuilder
|
335
|
-
keep = /^(__|=|<|>|class|to_s|eql\?|equal\?|inspect|instance_|respond_to\?)/
|
336
|
-
instance_methods.each do |m|
|
337
|
-
undef_method m unless m =~ keep
|
338
|
-
end
|
335
|
+
# keep = /^(__|=|<|>|class|to_s|eql\?|equal\?|inspect|require|warn|instance_|respond_to\?)/
|
336
|
+
# instance_methods.each do |m|
|
337
|
+
# undef_method m unless m =~ keep
|
338
|
+
# end
|
339
339
|
|
340
340
|
def initialize(*r,&k)
|
341
341
|
@__mapped = {}
|
data/lib/cheri/cheri.rb
CHANGED
data/lib/cheri/cjx.rb
CHANGED
@@ -61,10 +61,10 @@ module Explorer
|
|
61
61
|
If you have not taken adequate precautions to secure this installation, such as,
|
62
62
|
but not limited to, firewalls, secure network access, and access control lists,
|
63
63
|
you should terminate this application now by entering the following command:
|
64
|
-
|
64
|
+
|
65
65
|
Cheri::Explorer.thread.kill
|
66
|
-
|
67
|
-
|
66
|
+
|
67
|
+
}
|
68
68
|
end
|
69
69
|
def self.stop
|
70
70
|
if (server = @server)
|
@@ -319,9 +319,13 @@ end
|
|
319
319
|
class AboutDialog
|
320
320
|
include Cheri::Swing
|
321
321
|
include Cheri::Html
|
322
|
+
|
323
|
+
# Undefining this so I can use it in Cheri::Html. Could always
|
324
|
+
# just use html.p instead.
|
325
|
+
undef_method :p
|
326
|
+
|
322
327
|
def initialize(main)
|
323
328
|
swing[:auto]
|
324
|
-
undef p
|
325
329
|
@main = main
|
326
330
|
@main_frame = main.main_frame
|
327
331
|
@dialog = dialog @main_frame, 'About Cheri::JRuby::Explorer', true do |d|
|
@@ -334,7 +338,7 @@ class AboutDialog
|
|
334
338
|
content_type 'text/html'
|
335
339
|
html { head { style 'body { font-family: sans-serif; }' }
|
336
340
|
body(:bgolor=>:white) { div(:align=>:center) {
|
337
|
-
h3 font(:color=>:blue) {
|
341
|
+
h3 font(:color=>:blue) {"Cheri::JRuby::Explorer version #{Cheri::VERSION::STRING}"}
|
338
342
|
p 'Written by Bill Dortch ', esc('<cheri.project@gmail.com>'), br,
|
339
343
|
'Copyright © 2007 William N Dortch'
|
340
344
|
p
|
@@ -587,11 +587,11 @@ class ResultListViewer < Viewer
|
|
587
587
|
id = res[i]
|
588
588
|
val = nil
|
589
589
|
begin
|
590
|
-
val = proxy.simple_value
|
590
|
+
val = proxy.simple_value(id)
|
591
591
|
rescue
|
592
592
|
val = 'Unavailable'
|
593
593
|
end
|
594
|
-
list[i] = ResultListItem.new(id,
|
594
|
+
list[i] = ResultListItem.new(id,val)
|
595
595
|
end
|
596
596
|
list
|
597
597
|
end
|