cheri 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README +98 -0
- data/Rakefile +121 -0
- data/examples/hello_world_1.rb +28 -0
- data/examples/table_1.rb +44 -0
- data/lib/cheri/awt.rb +41 -0
- data/lib/cheri/builder.rb +31 -0
- data/lib/cheri/builder/awt/connecter.rb +63 -0
- data/lib/cheri/builder/awt/constants.rb +1003 -0
- data/lib/cheri/builder/awt/main.rb +191 -0
- data/lib/cheri/builder/awt/types.rb +220 -0
- data/lib/cheri/builder/base.rb +533 -0
- data/lib/cheri/builder/config.rb +187 -0
- data/lib/cheri/builder/connecter.rb +386 -0
- data/lib/cheri/builder/context.rb +655 -0
- data/lib/cheri/builder/generator.rb +425 -0
- data/lib/cheri/builder/html/charsets.rb +154 -0
- data/lib/cheri/builder/html/common.rb +32 -0
- data/lib/cheri/builder/html/connecter.rb +57 -0
- data/lib/cheri/builder/html/element.rb +156 -0
- data/lib/cheri/builder/html/main.rb +116 -0
- data/lib/cheri/builder/html/types.rb +123 -0
- data/lib/cheri/builder/main.rb +483 -0
- data/lib/cheri/builder/swing/connecter.rb +141 -0
- data/lib/cheri/builder/swing/constants.rb +420 -0
- data/lib/cheri/builder/swing/main.rb +446 -0
- data/lib/cheri/builder/swing/types.rb +270 -0
- data/lib/cheri/builder/xml/charsets.rb +154 -0
- data/lib/cheri/builder/xml/common.rb +32 -0
- data/lib/cheri/builder/xml/connecter.rb +42 -0
- data/lib/cheri/builder/xml/element.rb +189 -0
- data/lib/cheri/builder/xml/main.rb +130 -0
- data/lib/cheri/builder/xml/types.rb +36 -0
- data/lib/cheri/cheri.rb +70 -0
- data/lib/cheri/cjx.rb +3 -0
- data/lib/cheri/explorer.rb +32 -0
- data/lib/cheri/explorer/explorer.rb +560 -0
- data/lib/cheri/html.rb +31 -0
- data/lib/cheri/image/Delete24.gif +0 -0
- data/lib/cheri/image/Find24.gif +0 -0
- data/lib/cheri/image/FindAgain24.gif +0 -0
- data/lib/cheri/image/Refresh24.gif +0 -0
- data/lib/cheri/image/Search24.gif +0 -0
- data/lib/cheri/image/Thumbs.db +0 -0
- data/lib/cheri/image/cheri_icon_16x16.png +0 -0
- data/lib/cheri/image/cheri_icon_24x24.png +0 -0
- data/lib/cheri/image/cheri_logo_medium.png +0 -0
- data/lib/cheri/image/close_10x10.png +0 -0
- data/lib/cheri/image/close_10x10s.png +0 -0
- data/lib/cheri/image/close_12x12.png +0 -0
- data/lib/cheri/image/close_14x14.png +0 -0
- data/lib/cheri/image/close_24x24.png +0 -0
- data/lib/cheri/image/close_dim2_12x12.png +0 -0
- data/lib/cheri/image/close_dim_12x12.png +0 -0
- data/lib/cheri/image/cls_tree.png +0 -0
- data/lib/cheri/image/con_tree.png +0 -0
- data/lib/cheri/image/jruby_14x16.png +0 -0
- data/lib/cheri/image/jruby_logo.png +0 -0
- data/lib/cheri/image/mod_tree.png +0 -0
- data/lib/cheri/image/obj_tree.png +0 -0
- data/lib/cheri/image/ruby_16x16.png +0 -0
- data/lib/cheri/image/vars_tree.png +0 -0
- data/lib/cheri/java.rb +26 -0
- data/lib/cheri/java/builder.rb +28 -0
- data/lib/cheri/java/builder/main.rb +407 -0
- data/lib/cheri/java/builder/util.rb +480 -0
- data/lib/cheri/java/java.rb +56 -0
- data/lib/cheri/jruby.rb +32 -0
- data/lib/cheri/jruby/explorer.rb +43 -0
- data/lib/cheri/jruby/explorer/common.rb +38 -0
- data/lib/cheri/jruby/explorer/dialogs.rb +383 -0
- data/lib/cheri/jruby/explorer/explorer.rb +904 -0
- data/lib/cheri/jruby/explorer/splash.rb +80 -0
- data/lib/cheri/jruby/explorer/viewer.rb +619 -0
- data/lib/cheri/jruby/explorer/viewers.rb +1057 -0
- data/lib/cheri/jruby/jruby.rb +59 -0
- data/lib/cheri/swing.rb +41 -0
- data/lib/cheri/xml.rb +31 -0
- metadata +135 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2007 William N Dortch <bill.dortch@gmail.com>
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
module Cheri
|
26
|
+
module JRuby
|
27
|
+
#:stopdoc:
|
28
|
+
JU = JavaUtilities
|
29
|
+
JC = ::Java::JavaClass
|
30
|
+
RObj = 'org.jruby.RubyObject'
|
31
|
+
#:startdoc:
|
32
|
+
@unproxied = java.util.Collections.synchronized_map java.util.HashMap.new
|
33
|
+
class << self
|
34
|
+
# call-seq:
|
35
|
+
# get_class(class_name [,proxy=true]) -> class/interface proxy or JavaClass
|
36
|
+
#
|
37
|
+
# Returns the proxy for the specified class or interface if proxy=true (the default);
|
38
|
+
# otherwise, returns the corresponding JavaClass. Getting a proxy class can be expensive
|
39
|
+
# (the _first_ time it is referenced; subsequent calls retrieve it from cache). The
|
40
|
+
# proxy=false option is therefore provided so we can get the JavaClass, a much less
|
41
|
+
# expensive operation. The JavaClass cannot be instantiated, but is used in Cheri
|
42
|
+
# (Cheri::Swing and Cheri::AWT) for assignable_from? tests.
|
43
|
+
def get_class(name,proxy=true)
|
44
|
+
proxy ? JU.get_proxy_class(name) : @unproxied[name] ||= JC.for_name(name)
|
45
|
+
end
|
46
|
+
def runtime #:nodoc:
|
47
|
+
@runtime ||= ::Java.java_to_ruby(get_class(RObj,false).java_method('getRuntime').invoke(::Java.ruby_to_java(self)))
|
48
|
+
end
|
49
|
+
def start_time #:nodoc:
|
50
|
+
runtime.start_time
|
51
|
+
end
|
52
|
+
# Returns +true+ if ObjectSpace is enabled.
|
53
|
+
def object_space?
|
54
|
+
runtime.object_space_enabled?
|
55
|
+
end
|
56
|
+
end #self
|
57
|
+
|
58
|
+
end #JRuby
|
59
|
+
end #Cheri
|
data/lib/cheri/swing.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2007 William N Dortch <bill.dortch@gmail.com>
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
if (defined?JRUBY_VERSION) && 0 == (JRUBY_VERSION =~ /(\d+\.\d+\.\d+)([-\.A-Z0-9]*)/) &&
|
26
|
+
(($1 == '1.0.0' && ($2.empty? || $2 >= 'RC3')) || $1 > '1.0.0')
|
27
|
+
|
28
|
+
require 'cheri/awt'
|
29
|
+
require 'cheri/builder/swing/types'
|
30
|
+
require 'cheri/builder/swing/connecter'
|
31
|
+
require 'cheri/builder/swing/constants'
|
32
|
+
require 'cheri/builder/swing/main'
|
33
|
+
|
34
|
+
else
|
35
|
+
STDERR.puts %{
|
36
|
+
Cheri::Swing requires JRuby (1.0.0RC3 or later)
|
37
|
+
Download the latest version of JRuby at:
|
38
|
+
http://www.jruby.org/
|
39
|
+
}
|
40
|
+
|
41
|
+
end
|
data/lib/cheri/xml.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (C) 2007 William N Dortch <bill.dortch@gmail.com>
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
|
25
|
+
require 'cheri/builder'
|
26
|
+
require 'cheri/builder/xml/common'
|
27
|
+
require 'cheri/builder/xml/charsets'
|
28
|
+
require 'cheri/builder/xml/element'
|
29
|
+
require 'cheri/builder/xml/connecter'
|
30
|
+
require 'cheri/builder/xml/types'
|
31
|
+
require 'cheri/builder/xml/main'
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.2
|
3
|
+
specification_version: 1
|
4
|
+
name: cheri
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.0.2
|
7
|
+
date: 2007-06-08 00:00:00 -07:00
|
8
|
+
summary: Cheri Builder Platform
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: cheri.project@gmail.com
|
12
|
+
homepage: http://cheri.rubyforge.org
|
13
|
+
rubyforge_project: cheri
|
14
|
+
description: The Cheri Builder Platform.
|
15
|
+
autorequire:
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Bill Dortch
|
31
|
+
files:
|
32
|
+
- Rakefile
|
33
|
+
- README
|
34
|
+
- MIT-LICENSE
|
35
|
+
- examples/hello_world_1.rb
|
36
|
+
- examples/table_1.rb
|
37
|
+
- lib/cheri
|
38
|
+
- lib/cheri/awt.rb
|
39
|
+
- lib/cheri/builder
|
40
|
+
- lib/cheri/builder/awt
|
41
|
+
- lib/cheri/builder/awt/connecter.rb
|
42
|
+
- lib/cheri/builder/awt/constants.rb
|
43
|
+
- lib/cheri/builder/awt/main.rb
|
44
|
+
- lib/cheri/builder/awt/types.rb
|
45
|
+
- lib/cheri/builder/base.rb
|
46
|
+
- lib/cheri/builder/config.rb
|
47
|
+
- lib/cheri/builder/connecter.rb
|
48
|
+
- lib/cheri/builder/context.rb
|
49
|
+
- lib/cheri/builder/generator.rb
|
50
|
+
- lib/cheri/builder/html
|
51
|
+
- lib/cheri/builder/html/charsets.rb
|
52
|
+
- lib/cheri/builder/html/common.rb
|
53
|
+
- lib/cheri/builder/html/connecter.rb
|
54
|
+
- lib/cheri/builder/html/element.rb
|
55
|
+
- lib/cheri/builder/html/main.rb
|
56
|
+
- lib/cheri/builder/html/types.rb
|
57
|
+
- lib/cheri/builder/main.rb
|
58
|
+
- lib/cheri/builder/swing
|
59
|
+
- lib/cheri/builder/swing/connecter.rb
|
60
|
+
- lib/cheri/builder/swing/constants.rb
|
61
|
+
- lib/cheri/builder/swing/main.rb
|
62
|
+
- lib/cheri/builder/swing/types.rb
|
63
|
+
- lib/cheri/builder/xml
|
64
|
+
- lib/cheri/builder/xml/charsets.rb
|
65
|
+
- lib/cheri/builder/xml/common.rb
|
66
|
+
- lib/cheri/builder/xml/connecter.rb
|
67
|
+
- lib/cheri/builder/xml/element.rb
|
68
|
+
- lib/cheri/builder/xml/main.rb
|
69
|
+
- lib/cheri/builder/xml/types.rb
|
70
|
+
- lib/cheri/builder.rb
|
71
|
+
- lib/cheri/cheri.rb
|
72
|
+
- lib/cheri/cjx.rb
|
73
|
+
- lib/cheri/explorer
|
74
|
+
- lib/cheri/explorer/explorer.rb
|
75
|
+
- lib/cheri/explorer.rb
|
76
|
+
- lib/cheri/html.rb
|
77
|
+
- lib/cheri/image
|
78
|
+
- lib/cheri/image/cheri_icon_16x16.png
|
79
|
+
- lib/cheri/image/cheri_icon_24x24.png
|
80
|
+
- lib/cheri/image/cheri_logo_medium.png
|
81
|
+
- lib/cheri/image/close_10x10.png
|
82
|
+
- lib/cheri/image/close_10x10s.png
|
83
|
+
- lib/cheri/image/close_12x12.png
|
84
|
+
- lib/cheri/image/close_14x14.png
|
85
|
+
- lib/cheri/image/close_24x24.png
|
86
|
+
- lib/cheri/image/close_dim2_12x12.png
|
87
|
+
- lib/cheri/image/close_dim_12x12.png
|
88
|
+
- lib/cheri/image/cls_tree.png
|
89
|
+
- lib/cheri/image/con_tree.png
|
90
|
+
- lib/cheri/image/Delete24.gif
|
91
|
+
- lib/cheri/image/Find24.gif
|
92
|
+
- lib/cheri/image/FindAgain24.gif
|
93
|
+
- lib/cheri/image/jruby_14x16.png
|
94
|
+
- lib/cheri/image/jruby_logo.png
|
95
|
+
- lib/cheri/image/mod_tree.png
|
96
|
+
- lib/cheri/image/obj_tree.png
|
97
|
+
- lib/cheri/image/Refresh24.gif
|
98
|
+
- lib/cheri/image/ruby_16x16.png
|
99
|
+
- lib/cheri/image/Search24.gif
|
100
|
+
- lib/cheri/image/Thumbs.db
|
101
|
+
- lib/cheri/image/vars_tree.png
|
102
|
+
- lib/cheri/java
|
103
|
+
- lib/cheri/java/builder
|
104
|
+
- lib/cheri/java/builder/main.rb
|
105
|
+
- lib/cheri/java/builder/util.rb
|
106
|
+
- lib/cheri/java/builder.rb
|
107
|
+
- lib/cheri/java/java.rb
|
108
|
+
- lib/cheri/java.rb
|
109
|
+
- lib/cheri/jruby
|
110
|
+
- lib/cheri/jruby/explorer
|
111
|
+
- lib/cheri/jruby/explorer/common.rb
|
112
|
+
- lib/cheri/jruby/explorer/dialogs.rb
|
113
|
+
- lib/cheri/jruby/explorer/explorer.rb
|
114
|
+
- lib/cheri/jruby/explorer/splash.rb
|
115
|
+
- lib/cheri/jruby/explorer/viewer.rb
|
116
|
+
- lib/cheri/jruby/explorer/viewers.rb
|
117
|
+
- lib/cheri/jruby/explorer.rb
|
118
|
+
- lib/cheri/jruby/jruby.rb
|
119
|
+
- lib/cheri/jruby.rb
|
120
|
+
- lib/cheri/swing.rb
|
121
|
+
- lib/cheri/xml.rb
|
122
|
+
test_files: []
|
123
|
+
|
124
|
+
rdoc_options: []
|
125
|
+
|
126
|
+
extra_rdoc_files: []
|
127
|
+
|
128
|
+
executables: []
|
129
|
+
|
130
|
+
extensions: []
|
131
|
+
|
132
|
+
requirements:
|
133
|
+
- none
|
134
|
+
dependencies: []
|
135
|
+
|