Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Gemified.

  * removed all the swt and jface jars that are now in the swt gem
  * rake build:prepare copies those jars into lib for the ant build
  * javamateview handles loading the joni, jdom and jcodings jars itself.
  * added LICENSE, gemspec
  • Loading branch information...
commit 0759843648898a139fd26723be56f3fd1f0911b3 1 parent c9ccc5e
@danlucraft danlucraft authored
Showing with 105 additions and 39 deletions.
  1. +8 −1 .gitignore
  2. +34 −0 LICENSE
  3. +1 −1  README
  4. +26 −2 Rakefile
  5. 0  {lib → bench}/test_big_ruby_file.rb
  6. +12 −6 build.xml
  7. +6 −0 lib/{java-mateview.rb → javamateview.rb}
  8. 0  lib/{ → javamateview}/example.rb
  9. BIN  lib/javamateview/jar/java-mateview.jar
  10. 0  lib/{ → javamateview}/jcodings.jar
  11. 0  lib/{ → javamateview}/jdom.jar
  12. 0  lib/{ → javamateview}/joni.jar
  13. BIN  lib/linux/swt.jar
  14. BIN  lib/linux64/swt.jar
  15. BIN  lib/org.eclipse.core.commands.jar
  16. BIN  lib/org.eclipse.core.jobs_3.4.100.v20090429-1800.jar
  17. BIN  lib/org.eclipse.core.resources.jar
  18. BIN  lib/org.eclipse.core.runtime.compatibility_3.2.0.v20090413.jar
  19. BIN  lib/org.eclipse.core.runtime_3.5.0.v20090525.jar
  20. BIN  lib/org.eclipse.equinox.common.jar
  21. BIN  lib/org.eclipse.jface.databinding_1.3.0.I20090525-2000.jar
  22. BIN  lib/org.eclipse.jface.jar
  23. BIN  lib/org.eclipse.jface.text_3.5.0.jar
  24. BIN  lib/org.eclipse.osgi.jar
  25. BIN  lib/org.eclipse.text_3.5.0.v20090513-2000.jar
  26. BIN  lib/osx/swt.jar
  27. BIN  lib/osx64/swt.jar
  28. +0 −29 lib/swt_wrapper.rb
  29. BIN  lib/windows/swt.jar
  30. +18 −0 redcar-javamateview.gemspec
View
9 .gitignore
@@ -1,6 +1,13 @@
-bin/
+bin/com
+bin/test
+bin/test-reports
+bin/PropertyList-1.0.dtd
release
.DS_Store
lib/jruby-complete-1.3.1.jar
release/
tmp/
+lib/swt_jars
+lib/jface_jars
+.redcar
+*.gem
View
34 LICENSE
@@ -0,0 +1,34 @@
+
+### Licenses for specific files
+
+jarjar-1.0.jar is distributed under the Apache License, version 2. For more details, see http://www.apache.org/licenses/LICENSE-2.0
+
+junit-4.7.jar is distributed under the Common Public License - v 1.0. For more details, see https://github.com/KentBeck/junit/blob/master/LICENSE
+
+### All other files
+
+Unless specified in the file itself, the contents of all other files in this
+repository are provided to you under the following license (MIT):
+
+Copyright (c) Daniel Lucraft 2011.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
View
2  README
@@ -5,7 +5,7 @@ JavaMateView
Requirements
------------
-* jruby-1.3.1 installed and set up on your path
+* > jruby-1.3.1 installed and set up on your path
* rspec gem installed via gem install rspec
* make sure that JAVA_HOME points to a 1.6 type JDK (this is especially true on OSX Leopard)
View
28 Rakefile
@@ -1,8 +1,6 @@
require 'rake/clean'
require 'net/http'
-JRUBY_VERSION = '1.3.1'
-
jruby_command = case Config::CONFIG["host_os"]
when /darwin/i
'jruby -J-XstartOnFirstThread '
@@ -48,6 +46,32 @@ end
namespace :build do
+ desc "Fetch the swt jars from the gem"
+ task :prepare do
+ require 'rubygems'
+ require 'java'
+ gem 'swt'
+ require 'swt/jar'
+ swt_jar_dir = File.dirname(Swt.jar_path)
+
+
+ mkdir_p File.expand_path("../lib/swt_jars", __FILE__)
+ %w(linux linux64 osx osx64 win32).each do |platform|
+ dir = File.expand_path("../lib/swt_jars/#{platform}", __FILE__)
+ mkdir_p dir
+ from = swt_jar_dir + "/swt_#{platform}.jar"
+ to = dir + "/swt.jar"
+ cp from, to
+ end
+
+ mkdir_p File.expand_path("../lib/jface_jars", __FILE__)
+
+ Dir[swt_jar_dir + "/jface/org.ecl*.jar"].each do |from, to|
+ to = File.expand_path("../lib/jface_jars/#{File.basename(from)}", __FILE__)
+ cp from, to
+ end
+ end
+
desc "Get jruby-complete to build release jar"
task :get_jruby do
jruby_complete = "jruby-complete-#{JRUBY_VERSION}.jar"
View
0  lib/test_big_ruby_file.rb → bench/test_big_ruby_file.rb
File renamed without changes
View
18 build.xml
@@ -40,7 +40,7 @@
</and>
</condition>
- <condition property="platform" value="windows">
+ <condition property="platform" value="win32">
<os family="windows" />
</condition>
@@ -48,11 +48,19 @@
<pathelement location="${build.prod.dir}" />
<pathelement location="${build.test.dir}" />
- <fileset dir="${lib.dir}">
+ <fileset dir="${lib.dir}/">
<include name="*.jar" />
</fileset>
- <fileset dir="${lib.dir}/${platform}">
+ <fileset dir="${lib.dir}/javamateview">
+ <include name="*.jar" />
+ </fileset>
+
+ <fileset dir="${lib.dir}/jface_jars">
+ <include name="*.jar" />
+ </fileset>
+
+ <fileset dir="${lib.dir}/swt_jars/${platform}">
<include name="*.jar" />
</fileset>
</path>
@@ -82,9 +90,7 @@
<target name="jar" depends="compile">
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="project.classpath" />
- <delete dir="release"/>
- <mkdir dir="release"/>
- <jarjar destfile="release/java-mateview.jar" basedir="${build.prod.dir}">
+ <jarjar destfile="lib/javamateview/jar/java-mateview.jar" basedir="${build.prod.dir}">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Class-Path" value=". lib vendor" />
View
6 lib/java-mateview.rb → lib/javamateview.rb
@@ -1,4 +1,10 @@
+require 'javamateview/joni'
+require 'javamateview/jcodings'
+require 'javamateview/jdom'
+
+require 'javamateview/jar/java-mateview'
+
module JavaMateView
import com.redcareditor.mate.Bundle
import com.redcareditor.mate.Grammar
View
0  lib/example.rb → lib/javamateview/example.rb
File renamed without changes
View
BIN  lib/javamateview/jar/java-mateview.jar
Binary file not shown
View
0  lib/jcodings.jar → lib/javamateview/jcodings.jar
File renamed without changes
View
0  lib/jdom.jar → lib/javamateview/jdom.jar
File renamed without changes
View
0  lib/joni.jar → lib/javamateview/joni.jar
File renamed without changes
View
BIN  lib/linux/swt.jar
Binary file not shown
View
BIN  lib/linux64/swt.jar
Binary file not shown
View
BIN  lib/org.eclipse.core.commands.jar
Binary file not shown
View
BIN  lib/org.eclipse.core.jobs_3.4.100.v20090429-1800.jar
Binary file not shown
View
BIN  lib/org.eclipse.core.resources.jar
Binary file not shown
View
BIN  lib/org.eclipse.core.runtime.compatibility_3.2.0.v20090413.jar
Binary file not shown
View
BIN  lib/org.eclipse.core.runtime_3.5.0.v20090525.jar
Binary file not shown
View
BIN  lib/org.eclipse.equinox.common.jar
Binary file not shown
View
BIN  lib/org.eclipse.jface.databinding_1.3.0.I20090525-2000.jar
Binary file not shown
View
BIN  lib/org.eclipse.jface.jar
Binary file not shown
View
BIN  lib/org.eclipse.jface.text_3.5.0.jar
Binary file not shown
View
BIN  lib/org.eclipse.osgi.jar
Binary file not shown
View
BIN  lib/org.eclipse.text_3.5.0.v20090513-2000.jar
Binary file not shown
View
BIN  lib/osx/swt.jar
Binary file not shown
View
BIN  lib/osx64/swt.jar
Binary file not shown
View
29 lib/swt_wrapper.rb
@@ -1,29 +0,0 @@
-
-
-module Swt
- import org.eclipse.swt.SWT
-
- module Widgets
- import org.eclipse.swt.widgets.Display
- import org.eclipse.swt.widgets.Shell
- import org.eclipse.swt.widgets.Composite
- import org.eclipse.swt.widgets.Menu
- import org.eclipse.swt.widgets.MenuItem
- end
-
- module Layout
- import org.eclipse.swt.layout.FillLayout
- end
-
- module Graphics
- import org.eclipse.swt.graphics.Font
- import org.eclipse.swt.graphics.Point
- import org.eclipse.swt.graphics.RGB
- end
-end
-
-module Jface
- import org.eclipse.jface.action.Action
- import org.eclipse.jface.action.MenuManager
- import org.eclipse.jface.window.ApplicationWindow
-end
View
BIN  lib/windows/swt.jar
Binary file not shown
View
18 redcar-javamateview.gemspec
@@ -0,0 +1,18 @@
+
+Gem::Specification.new do |s|
+ s.name = "redcar-javamateview"
+ s.version = "0.1"
+ s.platform = "java"
+ s.authors = ["Daniel Lucraft"]
+ s.email = ["dan@fluentradical.com"]
+ s.homepage = "http://github.com/danlucraft/redcar-javamateview"
+ s.summary = "A source editing widget for SWT that understands Textmate syntaxes and themes"
+ s.description = ""
+
+ s.files = Dir.glob("lib/javamateview/**/*") + %w(LICENSE README Rakefile lib/javamateview.rb) +
+ Dir.glob("test/**/*") + Dir.glob("spec/**/*") + Dir.glob("src/**/*")
+ s.executables = []
+ s.require_path = 'lib'
+
+ s.add_dependency("swt")
+end
Please sign in to comment.
Something went wrong with that request. Please try again.