cheri 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README +98 -0
  3. data/Rakefile +121 -0
  4. data/examples/hello_world_1.rb +28 -0
  5. data/examples/table_1.rb +44 -0
  6. data/lib/cheri/awt.rb +41 -0
  7. data/lib/cheri/builder.rb +31 -0
  8. data/lib/cheri/builder/awt/connecter.rb +63 -0
  9. data/lib/cheri/builder/awt/constants.rb +1003 -0
  10. data/lib/cheri/builder/awt/main.rb +191 -0
  11. data/lib/cheri/builder/awt/types.rb +220 -0
  12. data/lib/cheri/builder/base.rb +533 -0
  13. data/lib/cheri/builder/config.rb +187 -0
  14. data/lib/cheri/builder/connecter.rb +386 -0
  15. data/lib/cheri/builder/context.rb +655 -0
  16. data/lib/cheri/builder/generator.rb +425 -0
  17. data/lib/cheri/builder/html/charsets.rb +154 -0
  18. data/lib/cheri/builder/html/common.rb +32 -0
  19. data/lib/cheri/builder/html/connecter.rb +57 -0
  20. data/lib/cheri/builder/html/element.rb +156 -0
  21. data/lib/cheri/builder/html/main.rb +116 -0
  22. data/lib/cheri/builder/html/types.rb +123 -0
  23. data/lib/cheri/builder/main.rb +483 -0
  24. data/lib/cheri/builder/swing/connecter.rb +141 -0
  25. data/lib/cheri/builder/swing/constants.rb +420 -0
  26. data/lib/cheri/builder/swing/main.rb +446 -0
  27. data/lib/cheri/builder/swing/types.rb +270 -0
  28. data/lib/cheri/builder/xml/charsets.rb +154 -0
  29. data/lib/cheri/builder/xml/common.rb +32 -0
  30. data/lib/cheri/builder/xml/connecter.rb +42 -0
  31. data/lib/cheri/builder/xml/element.rb +189 -0
  32. data/lib/cheri/builder/xml/main.rb +130 -0
  33. data/lib/cheri/builder/xml/types.rb +36 -0
  34. data/lib/cheri/cheri.rb +70 -0
  35. data/lib/cheri/cjx.rb +3 -0
  36. data/lib/cheri/explorer.rb +32 -0
  37. data/lib/cheri/explorer/explorer.rb +560 -0
  38. data/lib/cheri/html.rb +31 -0
  39. data/lib/cheri/image/Delete24.gif +0 -0
  40. data/lib/cheri/image/Find24.gif +0 -0
  41. data/lib/cheri/image/FindAgain24.gif +0 -0
  42. data/lib/cheri/image/Refresh24.gif +0 -0
  43. data/lib/cheri/image/Search24.gif +0 -0
  44. data/lib/cheri/image/Thumbs.db +0 -0
  45. data/lib/cheri/image/cheri_icon_16x16.png +0 -0
  46. data/lib/cheri/image/cheri_icon_24x24.png +0 -0
  47. data/lib/cheri/image/cheri_logo_medium.png +0 -0
  48. data/lib/cheri/image/close_10x10.png +0 -0
  49. data/lib/cheri/image/close_10x10s.png +0 -0
  50. data/lib/cheri/image/close_12x12.png +0 -0
  51. data/lib/cheri/image/close_14x14.png +0 -0
  52. data/lib/cheri/image/close_24x24.png +0 -0
  53. data/lib/cheri/image/close_dim2_12x12.png +0 -0
  54. data/lib/cheri/image/close_dim_12x12.png +0 -0
  55. data/lib/cheri/image/cls_tree.png +0 -0
  56. data/lib/cheri/image/con_tree.png +0 -0
  57. data/lib/cheri/image/jruby_14x16.png +0 -0
  58. data/lib/cheri/image/jruby_logo.png +0 -0
  59. data/lib/cheri/image/mod_tree.png +0 -0
  60. data/lib/cheri/image/obj_tree.png +0 -0
  61. data/lib/cheri/image/ruby_16x16.png +0 -0
  62. data/lib/cheri/image/vars_tree.png +0 -0
  63. data/lib/cheri/java.rb +26 -0
  64. data/lib/cheri/java/builder.rb +28 -0
  65. data/lib/cheri/java/builder/main.rb +407 -0
  66. data/lib/cheri/java/builder/util.rb +480 -0
  67. data/lib/cheri/java/java.rb +56 -0
  68. data/lib/cheri/jruby.rb +32 -0
  69. data/lib/cheri/jruby/explorer.rb +43 -0
  70. data/lib/cheri/jruby/explorer/common.rb +38 -0
  71. data/lib/cheri/jruby/explorer/dialogs.rb +383 -0
  72. data/lib/cheri/jruby/explorer/explorer.rb +904 -0
  73. data/lib/cheri/jruby/explorer/splash.rb +80 -0
  74. data/lib/cheri/jruby/explorer/viewer.rb +619 -0
  75. data/lib/cheri/jruby/explorer/viewers.rb +1057 -0
  76. data/lib/cheri/jruby/jruby.rb +59 -0
  77. data/lib/cheri/swing.rb +41 -0
  78. data/lib/cheri/xml.rb +31 -0
  79. 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
@@ -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
+