[sikuli] 296/385: revised the IDE startup so it works with only JRuby too
Gilles Filippini
pini at moszumanska.debian.org
Sun Jun 29 19:26:25 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 5a3ebeb20507c1cf5aa536f74e1c594836683c66
Author: Raimund Hocke <info at its-me-raiman.de>
Date: Mon Feb 24 17:54:27 2014 +0100
revised the IDE startup so it works with only JRuby too
---
IDE/src/main/java/org/sikuli/ide/SikuliIDE.java | 48 ++++++++++++++++---------
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java b/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
index b676264..29cbe24 100755
--- a/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
+++ b/IDE/src/main/java/org/sikuli/ide/SikuliIDE.java
@@ -115,20 +115,36 @@ public class SikuliIDE extends JFrame {
private boolean firstRun = true;
private static long start;
private static Map<String, IDESupport> ideSupporter = new HashMap<String, IDESupport>();
-
- static {
- ServiceLoader<IDESupport> sloader = ServiceLoader.load(IDESupport.class);
- Iterator<IDESupport> supIterator = sloader.iterator();
- while (supIterator.hasNext()) {
- IDESupport current = supIterator.next();
- try {
- for (String ending : current.getEndings()) {
- ideSupporter.put(ending, current);
- }
- } catch (Exception ex) {
- }
- }
- }
+ public static Map<String, IScriptRunner> scriptRunner = new HashMap<String, IScriptRunner>();
+
+ static {
+ ServiceLoader<IDESupport> sloader = ServiceLoader.load(IDESupport.class);
+ Iterator<IDESupport> supIterator = sloader.iterator();
+ while (supIterator.hasNext()) {
+ IDESupport current = supIterator.next();
+ try {
+ for (String ending : current.getEndings()) {
+ ideSupporter.put(ending, current);
+ }
+ } catch (Exception ex) {
+ }
+ }
+ ServiceLoader<IScriptRunner> rloader = ServiceLoader.load(IScriptRunner.class);
+ Iterator<IScriptRunner> rIterator = rloader.iterator();
+ IScriptRunner current;
+ while (rIterator.hasNext()) {
+ current = rIterator.next();
+ String name = current.getName();
+ if (!name.startsWith("Not")) {
+ scriptRunner.put(name, current);
+ }
+ }
+ if (scriptRunner.size() == 0) {
+ Debug.error("SikuliIDE: No scripting support available. Rerun Setup!");
+ }
+ current = (IScriptRunner) scriptRunner.values().toArray()[0];
+ Settings.EDEFAULT = current.getFileEndings()[0];
+ }
public static IDESupport getIDESupport(String ending) {
return ideSupporter.get(ending);
@@ -1571,7 +1587,7 @@ public class SikuliIDE extends JFrame {
}
public void openQuickStart(ActionEvent ae) {
- FileManager.openURL("https://github.com/RaiMan/SikuliX-IDE/wiki/Release-Notes-IDE");
+ FileManager.openURL("http://sikulix.com");
}
public void openDoc(ActionEvent ae) {
@@ -1599,7 +1615,7 @@ public class SikuliIDE extends JFrame {
}
public void openHomepage(ActionEvent ae) {
- FileManager.openURL("http://sikuli.org");
+ FileManager.openURL("http://sikulix.com");
}
public void doCheckUpdate(ActionEvent ae) {
--
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