This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// classpath retriever for all jars in project "lib" folder and compiled classes in project | |
def GRAILS_VERSION = '1.3.7' | |
def redcar_config = new File(getClass().protectionDomain.codeSource.location.path).parentFile | |
def project = redcar_config.parentFile | |
def classpath = [] | |
def home = System.getProperty("user.home") | |
def cache = new File(home+File.separator+".ivy2"+File.separator+"cache") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception in thread "Thread-10" java.lang.OutOfMemoryError: Java heap space | |
at org.jruby.util.ByteList.<init>(ByteList.java:91) | |
at org.jruby.util.io.ChannelStream.readall(ChannelStream.java:365) | |
at org.jruby.RubyIO.readAll(RubyIO.java:2825) | |
at org.jruby.RubyIO.read(RubyIO.java:2641) | |
at org.jruby.RubyIO.read(RubyIO.java:3327) | |
at org.jruby.RubyIO$s_method_multi$RUBYINVOKER$read.call(org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read.gen:65535) | |
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrTwoOrThreeBlock.call(JavaMethod.java:548) | |
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:160) | |
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:66) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.swt.custom.StyledText | |
import org.eclipse.swt.custom.StyleRange | |
class KeyListener | |
def initialize(shell) | |
@shell = shell | |
end | |
def key_pressed(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sporkmonger.rmud.swt.custom; | |
import java.util.ArrayList; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
import org.eclipse.swt.SWT; | |
import org.eclipse.swt.custom.LineStyleEvent; | |
import org.eclipse.swt.custom.LineStyleListener; | |
import org.eclipse.swt.custom.StyleRange; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Redcar | |
class REPL | |
class Tab < Redcar::EditTab | |
... | |
def update_cursor_size | |
if widget = edit_view.controller.mate_text.get_text_widget | |
caret = Swt::Widgets::Caret.new(widget, Swt::SWT::NONE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "java" | |
java_import javax.swing.JOptionPane | |
class Whazzup | |
def initialize(file = "#{ENV['HOME']}/snippets.txt") | |
@snippets ||= open(file, 'ab') | |
log('[Starting up (ruby)]') | |
thread_loop = Thread.current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* jQuery.support.cssProperty | |
* To verify that a CSS property is supported (or any of its browser-specific implementations) | |
* | |
* @param string p - css property name | |
* [@param] bool rp - optional, if set to true, the css property name will be returned, instead of a boolean support indicator | |
* | |
* @Author: Axel Jack Fuchs (Cologne, Germany) | |
* @Date: 08-29-2010 18:43 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#export GRAILS_VERSION="$(ls -lhr $HOME/.grails | egrep -i '1\.' | head -1 | gawk '{print $9 }')" | |
export GRAILS_VERSION=`cat $GRAILS_HOME/build.properties | grep "^grails.version=" | awk -F= '{ print $2 }' | tr -d '\r' | tr -d '\n'` | |
_get_domain_classes(){ | |
find ./grails-app/domain -iname *.groovy 2> /dev/null | tr \\n ' ' | sed 's/\.groovy//g' | sed 's/\.\/grails-app\/domain\///g' | tr '/' \. | |
} | |
_get_tests(){ | |
find ./test -iname *.groovy 2> /dev/null | sed 's/\.\/test\/integration\///g' | sed 's/\Tests.groovy//g' | tr '/' \. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"patterns" : [ | |
{ | |
"pattern" : "(.*)\\/my_project\\/grails-app\\/(services|controllers)\\/(.*)(Service|Controller)\\.groovy", | |
"1" : { | |
"link" : "$1 + '/my_project/grails-app/domain/' + $3 + '.groovy'", | |
"name" : "Model" | |
}, | |
"2" : { | |
"link" : "$1 + '/my_project/grails-app/views/' + (a = $3.split('/').last.split(//); a[0] = a[0].downcase; a.join) + '/CURRENT_WORD.gsp'", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Documentation on Event hooks: http://grails.org/doc/latest/guide/4.%20The%20Command%20Line.html#4.3%20Hooking%20into%20Events | |
// Inspiration: http://www.anyware.co.uk/2005/2007/05/02/grails-script-notifications-via-growl/ | |
Ant = new AntBuilder() | |
eventStatusFinal = { msg -> | |
notifySend(msg) | |
} | |
void notifySend(String message) { |