drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/CompletionContext.java
private void determineDialect(String backText) {
        dialect = null;
        boolean mvel = MVEL_DIALECT_PATTERN.matcher(backText).matches();
        boolean java = JAVA_DIALECT_PATTERN.matcher(backText).matches();
        if (mvel) {
            dialect = MVEL_DIALECT;
        } else if (java) {
            dialect = JAVA_DIALECT;
        }
    }
private void determineDialect(String backText) {
        dialect = null;
        boolean mvel = MVEL_DIALECT_PATTERN.matcher(backText).matches();
        boolean java = JAVA_DIALECT_PATTERN.matcher(backText).matches();
        if (mvel) {
            dialect = MVEL_DIALECT;
        } else if (java) {
            dialect = JAVA_DIALECT;
        }
    }
private void determineDialect ( String backText ) { dialect = null ; boolean mvel = MVEL_DIALECT_PATTERN . matcher ( backText ) . matches ( ) ; boolean java = JAVA_DIALECT_PATTERN . matcher ( backText ) . matches ( ) ; if ( mvel ) { dialect = MVEL_DIALECT ; } else if ( java ) { dialect = JAVA_DIALECT ; } }
especially when parsing incomplete rules
especially when parsing incomplete rules