cheri 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README +387 -15
- data/lib/cheri/awt.rb +4 -2
- data/lib/cheri/builder.rb +1 -0
- data/lib/cheri/builder/awt/main.rb +1 -1
- data/lib/cheri/builder/base.rb +1 -321
- data/lib/cheri/builder/config.rb +6 -2
- data/lib/cheri/builder/context.rb +103 -26
- data/lib/cheri/builder/generator.rb +38 -32
- data/lib/cheri/builder/html/element.rb +106 -16
- data/lib/cheri/builder/html/main.rb +125 -19
- data/lib/cheri/builder/html/types.rb +12 -2
- data/lib/cheri/builder/main.rb +200 -7
- data/lib/cheri/builder/markup.rb +608 -0
- data/lib/cheri/builder/swing/main.rb +2 -2
- data/lib/cheri/builder/xml/connecter.rb +11 -0
- data/lib/cheri/builder/xml/element.rb +141 -22
- data/lib/cheri/builder/xml/main.rb +188 -32
- data/lib/cheri/builder/xml/types.rb +5 -0
- data/lib/cheri/cheri.rb +1 -1
- data/lib/cheri/explorer.rb +4 -2
- data/lib/cheri/explorer/explorer.rb +4 -2
- data/lib/cheri/java/builder/main.rb +32 -11
- data/lib/cheri/jruby.rb +4 -2
- data/lib/cheri/jruby/explorer.rb +4 -2
- data/lib/cheri/swing.rb +4 -2
- metadata +3 -2
data/lib/cheri/cheri.rb
CHANGED
data/lib/cheri/explorer.rb
CHANGED
@@ -24,8 +24,10 @@
|
|
24
24
|
|
25
25
|
require 'cheri/cheri'
|
26
26
|
|
27
|
-
if (defined?JRUBY_VERSION) &&
|
28
|
-
((
|
27
|
+
if (defined?JRUBY_VERSION) &&
|
28
|
+
((JRUBY_VERSION =~ /^(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/ &&
|
29
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')) ||
|
30
|
+
(JRUBY_VERSION =~ /^(\d+\.\d+)([-\.A-Z0-9]*)/ && $1 >= '1.1'))
|
29
31
|
require 'cheri/jruby'
|
30
32
|
end
|
31
33
|
|
@@ -550,8 +550,10 @@ class RubyExplorer
|
|
550
550
|
Config::CONFIG
|
551
551
|
end
|
552
552
|
|
553
|
-
if (defined?JRUBY_VERSION) &&
|
554
|
-
((
|
553
|
+
if (defined?JRUBY_VERSION) &&
|
554
|
+
((JRUBY_VERSION =~ /^(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/ &&
|
555
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')) ||
|
556
|
+
(JRUBY_VERSION =~ /^(\d+\.\d+)([-\.A-Z0-9]*)/ && $1 >= '1.1'))
|
555
557
|
|
556
558
|
System = ::Java::JavaLang::System
|
557
559
|
Runtime = ::Java::JavaLang::Runtime
|
@@ -328,13 +328,24 @@ class ConstantResolver < Cheri::Builder::AbstractConstantResolver
|
|
328
328
|
end #ConstantResolver
|
329
329
|
|
330
330
|
class GenericClassBuilder < ClassBuilder
|
331
|
-
|
332
|
-
|
331
|
+
# TODO: eliminate ClassBuilder inheritance?
|
332
|
+
def initialize(mod,type,ctx,sym,*args,&block)
|
333
|
+
super(ctx,sym,type.clazz,*args,&block)
|
333
334
|
@mod = mod
|
335
|
+
@type = type
|
334
336
|
end
|
335
337
|
def mod
|
336
338
|
@mod
|
337
339
|
end
|
340
|
+
def parent?
|
341
|
+
@type.parent?
|
342
|
+
end
|
343
|
+
def child?
|
344
|
+
@type.child?
|
345
|
+
end
|
346
|
+
def any?
|
347
|
+
@type.any?
|
348
|
+
end
|
338
349
|
end #GenericClassBuilder
|
339
350
|
|
340
351
|
|
@@ -360,14 +371,14 @@ end #GenericCheriYieldBuilder
|
|
360
371
|
|
361
372
|
class GenericBuilderFactory
|
362
373
|
def initialize(mod,types)
|
363
|
-
raise Cheri.type_error(types,
|
374
|
+
raise Cheri.type_error(types,BuildType) unless BuildTypes === types
|
364
375
|
@mod = mod
|
365
376
|
@types = types
|
366
377
|
@inv = types.invert
|
367
378
|
end
|
368
379
|
def builder(ctx,sym,*r,&k)
|
369
|
-
if (
|
370
|
-
GenericClassBuilder.new(@mod,ctx,sym
|
380
|
+
if (type = @types[sym])
|
381
|
+
GenericClassBuilder.new(@mod,type,ctx,sym,*r,&k)
|
371
382
|
elsif @inv[r.first.class]
|
372
383
|
if sym == :cherify
|
373
384
|
GenericCherifyBuilder.new(@mod,ctx,sym,*r,&k)
|
@@ -383,22 +394,32 @@ class GenericBuilderFactory
|
|
383
394
|
end #GenericBuilderFactory
|
384
395
|
|
385
396
|
class PackageFactory
|
386
|
-
|
397
|
+
# :stopdoc:
|
387
398
|
Dot = '.'
|
388
399
|
CJ = Cheri::Java
|
400
|
+
BuildType = Cheri::Builder::BuildType
|
401
|
+
BuildTypes = Cheri::Builder::BuildTypes
|
389
402
|
#Util = Cheri::Java::Builder::Util
|
390
|
-
|
403
|
+
# :startdoc:
|
391
404
|
def initialize(pkg_str,mod)
|
392
405
|
raise Cheri.type_error(pkg_str,String) unless String === pkg_str
|
393
406
|
@pkg = pkg_str.empty? || pkg_str[-1] == ?. ? pkg_str.dup : pkg_str + Dot
|
394
407
|
@mod = mod
|
395
|
-
@
|
408
|
+
@types = BuildTypes.new
|
396
409
|
end
|
397
410
|
def builder(ctx,sym,*r,&k)
|
398
|
-
|
399
|
-
|
411
|
+
unless type = @types[sym]
|
412
|
+
if clazz = CJ.get_class(@pkg + Util.cc(sym)) rescue nil
|
413
|
+
type = @types[sym] = BuildType.new(clazz,sym)
|
414
|
+
else
|
415
|
+
type = @types[sym] = :none
|
416
|
+
end
|
417
|
+
end
|
418
|
+
unless type == :none
|
419
|
+
GenericClassBuilder.new(@mod,type,ctx,sym,*r,&k)
|
420
|
+
else
|
421
|
+
nil
|
400
422
|
end
|
401
|
-
nil
|
402
423
|
end
|
403
424
|
end #PackageFactory
|
404
425
|
|
data/lib/cheri/jruby.rb
CHANGED
@@ -22,8 +22,10 @@
|
|
22
22
|
#++
|
23
23
|
#
|
24
24
|
|
25
|
-
if (defined?JRUBY_VERSION) &&
|
26
|
-
((
|
25
|
+
if (defined?JRUBY_VERSION) &&
|
26
|
+
((JRUBY_VERSION =~ /^(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/ &&
|
27
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')) ||
|
28
|
+
(JRUBY_VERSION =~ /^(\d+\.\d+)([-\.A-Z0-9]*)/ && $1 >= '1.1'))
|
27
29
|
require 'java'
|
28
30
|
require 'cheri/cheri'
|
29
31
|
require 'cheri/jruby/jruby'
|
data/lib/cheri/jruby/explorer.rb
CHANGED
@@ -21,8 +21,10 @@
|
|
21
21
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
22
|
#++
|
23
23
|
#
|
24
|
-
if (defined?JRUBY_VERSION) &&
|
25
|
-
((
|
24
|
+
if (defined?JRUBY_VERSION) &&
|
25
|
+
((JRUBY_VERSION =~ /^(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/ &&
|
26
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')) ||
|
27
|
+
(JRUBY_VERSION =~ /^(\d+\.\d+)([-\.A-Z0-9]*)/ && $1 >= '1.1'))
|
26
28
|
|
27
29
|
require 'cheri/html'
|
28
30
|
require 'cheri/swing'
|
data/lib/cheri/swing.rb
CHANGED
@@ -22,8 +22,10 @@
|
|
22
22
|
#++
|
23
23
|
#
|
24
24
|
|
25
|
-
if (defined?JRUBY_VERSION) &&
|
26
|
-
((
|
25
|
+
if (defined?JRUBY_VERSION) &&
|
26
|
+
((JRUBY_VERSION =~ /^(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/ &&
|
27
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')) ||
|
28
|
+
(JRUBY_VERSION =~ /^(\d+\.\d+)([-\.A-Z0-9]*)/ && $1 >= '1.1'))
|
27
29
|
|
28
30
|
require 'cheri/awt'
|
29
31
|
require 'cheri/builder/swing/types'
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: cheri
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date: 2007-06-
|
6
|
+
version: 0.0.6
|
7
|
+
date: 2007-06-19 00:00:00 -07:00
|
8
8
|
summary: Cheri Builder Platform
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/cheri/builder/html/main.rb
|
56
56
|
- lib/cheri/builder/html/types.rb
|
57
57
|
- lib/cheri/builder/main.rb
|
58
|
+
- lib/cheri/builder/markup.rb
|
58
59
|
- lib/cheri/builder/swing
|
59
60
|
- lib/cheri/builder/swing/connecter.rb
|
60
61
|
- lib/cheri/builder/swing/constants.rb
|