[jboss-svn-commits] JBL Code SVN: r13582 - labs/jbossrules/branches/mvel-tooling-2007-06-30/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jul 17 15:38:12 EDT 2007
Author: pombredanne
Date: 2007-07-17 15:38:12 -0400 (Tue, 17 Jul 2007)
New Revision: 13582
Modified:
labs/jbossrules/branches/mvel-tooling-2007-06-30/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/Keywords.java
Log:
added mvel keywords for syntax highlighting
Modified: labs/jbossrules/branches/mvel-tooling-2007-06-30/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/Keywords.java
===================================================================
--- labs/jbossrules/branches/mvel-tooling-2007-06-30/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/Keywords.java 2007-07-17 18:15:59 UTC (rev 13581)
+++ labs/jbossrules/branches/mvel-tooling-2007-06-30/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/Keywords.java 2007-07-17 19:38:12 UTC (rev 13582)
@@ -16,42 +16,48 @@
private String[] allDrools;
private String[] allJava;
+ private String[] allMvel;
private static Keywords instance;
-
+
public static Keywords getInstance() {
if (instance == null) {
instance = new Keywords();
}
return instance;
}
-
-
+
+
public String[] getAllDroolsKeywords() {
return allDrools;
}
-
+
public String[] getAllJavaKeywords() {
return allJava;
}
-
-
+
+ public String[] getAllMvelKeywords() {
+ return allMvel;
+ }
+
+
private Keywords() {
allDrools = readKeywords("keywords.properties");
- allJava = readKeywords("java_keywords.properties");
+ allJava = readKeywords("java_keywords.properties");
+ allMvel = readKeywords("mvel_keywords.properties");
}
-
+
private String[] readKeywords(String fileName) {
InputStream stream = this.getClass().getResourceAsStream(fileName);
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
-
+
List list = new ArrayList();
-
+
String line = null;
while ((line = reader.readLine()) != null) {
- if (!line.startsWith( "#" )) list.add( line );
+ if (!line.startsWith( "#" )) list.add( line );
}
-
+
return (String[]) list.toArray( new String[list.size()] );
}
catch ( IOException e ) {
@@ -66,6 +72,6 @@
}
}
}
-
-
+
+
}
More information about the jboss-svn-commits
mailing list