[sikuli] 290/385: avoid crash if not all script languages are setup
Gilles Filippini
pini at moszumanska.debian.org
Sun Jun 29 19:26:24 UTC 2014
This is an automated email from the git hooks/post-receive script.
pini pushed a commit to tag upstream/1.1.0_beta1
in repository sikuli.
commit 102d9dda46e0a209c35590fe2f983b8468818f43
Author: Raimund Hocke <rmhdevelop at me.com>
Date: Mon Feb 24 15:04:10 2014 +0100
avoid crash if not all script languages are setup
---
IDE/src/main/java/org/sikuli/ide/SikuliIDE.java | 7 +-
.../org/sikuli/idesupport/JRubyIDESupport.java | 18 +++++
.../org/sikuli/scriptrunner/JRubyScriptRunner.java | 83 ++++++++++++++++++++++
3 files changed, 106 insertions(+), 2 deletions(-)
diff --git a/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java b/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
index 165f173..b676264 100755
--- a/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
+++ b/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
@@ -121,8 +121,11 @@ public class SikuliIDE extends JFrame {
Iterator<IDESupport> supIterator = sloader.iterator();
while (supIterator.hasNext()) {
IDESupport current = supIterator.next();
- for (String ending : current.getEndings()) {
- ideSupporter.put(ending, current);
+ try {
+ for (String ending : current.getEndings()) {
+ ideSupporter.put(ending, current);
+ }
+ } catch (Exception ex) {
}
}
}
diff --git a/JythonFat/src/main/org/sikuli/idesupport/JRubyIDESupport.java b/JythonFat/src/main/org/sikuli/idesupport/JRubyIDESupport.java
new file mode 100644
index 0000000..57cab58
--- /dev/null
+++ b/JythonFat/src/main/org/sikuli/idesupport/JRubyIDESupport.java
@@ -0,0 +1,18 @@
+package org.sikuli.idesupport;
+
+import org.sikuli.basics.IDESupport;
+import org.sikuli.basics.IndentationLogic;
+
+public class JRubyIDESupport implements IDESupport{
+
+ @Override
+ public String[] getEndings() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public IndentationLogic getIndentationLogic() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+}
diff --git a/JythonFat/src/main/org/sikuli/scriptrunner/JRubyScriptRunner.java b/JythonFat/src/main/org/sikuli/scriptrunner/JRubyScriptRunner.java
new file mode 100644
index 0000000..d453be0
--- /dev/null
+++ b/JythonFat/src/main/org/sikuli/scriptrunner/JRubyScriptRunner.java
@@ -0,0 +1,83 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.sikuli.scriptrunner;
+
+import java.io.File;
+import org.sikuli.basics.IScriptRunner;
+
+/**
+ *
+ * @author rhocke
+ */
+public class JRubyScriptRunner implements IScriptRunner{
+
+ @Override
+ public void init(String[] args) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public int runScript(File scriptfile, File imagedirectory, String[] scriptArgs, String[] forIDE) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public int runTest(File scriptfile, File imagedirectory, String[] scriptArgs, String[] forIDE) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public int runInteractive(String[] scriptArgs) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public String getCommandLineHelp() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public String getInteractiveHelp() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public String getName() {
+ return ("NotImplemented");
+ }
+
+ @Override
+ public String[] getFileEndings() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public String hasFileEnding(String ending) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public void close() {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public boolean doSomethingSpecial(String action, Object[] args) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public void execBefore(String[] stmts) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+ @Override
+ public void execAfter(String[] stmts) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git
More information about the pkg-java-commits
mailing list