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 9e20af724bb7ce4162dc75465833535dcbcc2af2
Author: Raimund Hocke <[email protected]>
Date:   Wed Feb 19 14:25:04 2014 +0100

    revised the creation and usage of the scripting language specific 
pattern-color-maps
---
 IDE/src/main/java/org/sikuli/ide/EditorViewFactory.java | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/IDE/src/main/java/org/sikuli/ide/EditorViewFactory.java 
b/IDE/src/main/java/org/sikuli/ide/EditorViewFactory.java
index 50d76cd..4dd3c90 100755
--- a/IDE/src/main/java/org/sikuli/ide/EditorViewFactory.java
+++ b/IDE/src/main/java/org/sikuli/ide/EditorViewFactory.java
@@ -145,7 +145,7 @@ class SyntaxHighlightLabelView extends LabelView {
     "break", "else", "global", "not", "try",
     "class", "except", "if", "or", "while",
     "continue", "exec", "import", "pass", "yield",
-    "def", "finally", "in", "print", "with"
+    "def", "finally", "in", "print", "with", "self"
   };
   private static String[] keywordsRuby = {
     "return", "break", "else", "class", "if", "nil", "begin", "end", "rescue",
@@ -153,7 +153,7 @@ class SyntaxHighlightLabelView extends LabelView {
                "case", "defined?", "do", "elsif", "ensure", "false", "for", 
"in", "module",
                "not", "or", "redo", "retry", "self", "super", "true", "undef", 
"unless",
                "until", "when", "while", "yield", "BEGIN", "END", 
"__ENCODING__", "__END__",
-               "__FILE__", "__LINE__"
+               "__FILE__", "__LINE__", "require"
   };
   private static String[] keywordsSikuliClass = {
     "Region", "Screen", "Match", "Pattern",
@@ -225,7 +225,7 @@ class SyntaxHighlightLabelView extends LabelView {
     fontParenthesis = new Font("Osaka-Mono", Font.PLAIN, 30);
 
     // NOTE: the order is important!
-    patternColors = new HashMap<Pattern, Color>();
+               patternColors = new HashMap<Pattern, Color>();
     patternColorsPython = new HashMap<Pattern, Color>();
     patternColorsRuby = new HashMap<Pattern, Color>();
     patternColorsSikuli = new HashMap<Pattern, Color>();
@@ -234,6 +234,8 @@ class SyntaxHighlightLabelView extends LabelView {
     patternColors.put(Pattern.compile("(\"[^\"]*\"?)"), new Color(128, 0, 0));
     patternColors.put(Pattern.compile("(\'[^\']*\'?)"), new Color(128, 0, 0));
     patternColors.put(Pattern.compile("\\b([0-9]+)\\b"), new Color(128, 64, 
0));
+               patternColorsPython.putAll(patternColors);
+               patternColorsRuby.putAll(patternColors);
     for (int i = 0; i < keywordsPython.length; i++) { 
patternColorsPython.put(Pattern.compile(
               "\\b(" + keywordsPython[i] + ")\\b"), Color.blue);
     }
@@ -249,17 +251,19 @@ class SyntaxHighlightLabelView extends LabelView {
     for (int i = 0; i < constantsSikuli.length; i++) { 
patternColorsSikuli.put(Pattern.compile(
               "\\b(" + constantsSikuli[i] + ")\\b"), new Color(128, 64, 0));
     }
+               patternColorsPython.putAll(patternColorsSikuli);
+               patternColorsRuby.putAll(patternColorsSikuli);
+               patternColorsSikuli = null;
   }
 
        public SyntaxHighlightLabelView(Element elm, String contentType) {
                super(elm);
                sikuliContentType = contentType;
                if (Settings.CPYTHON.equals(sikuliContentType)) {
-                       patternColors.putAll(patternColorsPython);
+                       patternColors = patternColorsPython;
                } else if (Settings.CRUBY.equals(sikuliContentType)) {
-                       patternColors.putAll(patternColorsRuby);
+                       patternColors = patternColorsRuby;
                }
-               patternColors.putAll(patternColorsSikuli);
        }
 
        private static String nSpaces(int n) {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/sikuli.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to