[jboss-svn-commits] JBL Code SVN: r11679 - in labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse: editors/completion and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri May 4 10:22:11 EDT 2007
Author: KrisVerlaenen
Date: 2007-05-04 10:22:11 -0400 (Fri, 04 May 2007)
New Revision: 11679
Modified:
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/dsl/editor/DSLAdapter.java
labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/completion/DSLTree.java
Log:
minor updates to DSL editor
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/dsl/editor/DSLAdapter.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/dsl/editor/DSLAdapter.java 2007-05-04 14:16:15 UTC (rev 11678)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/dsl/editor/DSLAdapter.java 2007-05-04 14:22:11 UTC (rev 11679)
@@ -40,7 +40,7 @@
private DSLTree dslTree = new DSLTree();
//to dig out the expander, without using the parser.
- private static final Pattern expander = Pattern.compile( "\\n?\\s*expander\\s*(.*)\\.dsl\\s",
+ private static final Pattern EXPANDER_PATTERN = Pattern.compile( "\\n\\s*expander\\s*(.*)\\.dsl\\s",
Pattern.DOTALL | Pattern.MULTILINE );
/**
* This will sniff out the DSL config file name from the content.
@@ -138,7 +138,7 @@
/** Sniffs out the expander/DSL config name as best it can. */
static String findDSLConfigName(String content) {
String name = null;
- Matcher matches = expander.matcher( content );
+ Matcher matches = EXPANDER_PATTERN.matcher( content );
if (matches.find()) {
name = matches.group(1) + ".dsl";
}
Modified: labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/completion/DSLTree.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/completion/DSLTree.java 2007-05-04 14:16:15 UTC (rev 11678)
+++ labs/jbossrules/trunk/drools-eclipse/drools-eclipse-plugin/src/main/java/org/drools/eclipse/editors/completion/DSLTree.java 2007-05-04 14:22:11 UTC (rev 11679)
@@ -131,7 +131,9 @@
private void addEntry(Section section, String nl, String objname) {
if (!nl.startsWith("-")) {
- this.addObjToNLMap(objname, nl);
+ if (objname != null) {
+ this.addObjToNLMap(objname, nl);
+ }
String[] tokenz = nl.split("\\s");
if (section == DSLMappingEntry.CONDITION || section == DSLMappingEntry.ANY) {
addTokens(tokenz, rootCond);
More information about the jboss-svn-commits
mailing list