Package org.drools.eclipse.DRLInfo

Examples of org.drools.eclipse.DRLInfo.RuleInfo


                                             "Cannot determine ruleClassName for " + resource + " " + lineNumber, null ) );
    }

    private int getRuleLineNumber(DRLInfo drlInfo, String resource, int lineNumber) throws CoreException {
        if ( drlInfo != null ) {
            RuleInfo ruleInfo = drlInfo.getRuleInfo( lineNumber );
            if ( ruleInfo != null ) {
                if ( ruleInfo.getConsequenceDrlLineNumber() < lineNumber ) {

                    int line = ruleInfo.getConsequenceJavaLineNumber()
                                            + (lineNumber - ruleInfo.getConsequenceDrlLineNumber());
                    if (ruleInfo.getDialectName() != null && ruleInfo.getDialectName().equals( "mvel" )) {
                        return line;
                    }
                    return line+1;
                }
            }
View Full Code Here


                                              String mvel) {

        String expr = processMacros( mvel );

        String name = context.getRuleName();
        RuleInfo currentRule = getCurrentRule( drlInfo,
                                               name );
        String qName = drlInfo.getPackageName() + "." + name;
        MVELDialect dialect = (MVELDialect) drlInfo.getDialectRegistry().getDialect("mvel");
        ParserContext initialContext = createInitialContext( params,
                                                             qName,
View Full Code Here

        return macrosProcessedCompilableConsequence;
    }

    private static RuleInfo getCurrentRule(DRLInfo drlInfo,
                                    String currentRulename) {
        RuleInfo currentRule = null;
        RuleInfo[] ruleInfos = drlInfo.getRuleInfos();
        for ( int i = 0; i < ruleInfos.length; i++ ) {
            if ( currentRulename.equals( ruleInfos[i].getRuleName() ) ) {
                currentRule = ruleInfos[i];
                break;
View Full Code Here

            ITextSelection textSelection = (ITextSelection) selection;
            int lineNumber = textSelection.getStartLine();
            try {
                DRLInfo drlInfo = DroolsEclipsePlugin.getDefault().parseResource(resource, false);
                if (drlInfo != null) {
                    RuleInfo ruleInfo = drlInfo.getRuleInfo(lineNumber);
                    if (ruleInfo != null) {
                        if (ruleInfo.getConsequenceDrlLineNumber() <= lineNumber) {
                            return true;
                        }
                    }
                    FunctionInfo functionInfo = drlInfo.getFunctionInfo(lineNumber);
                    if (functionInfo != null) {
View Full Code Here

                                              String mvel) {

        String expr = processMacros( mvel );

        String name = context.getRuleName();
        RuleInfo currentRule = getCurrentRule( drlInfo,
                                               name );
        String qName = drlInfo.getPackageName() + "." + name;
        MVELDialect dialect = (MVELDialect) drlInfo.getDialectRegistry().getDialect("mvel");
        ParserContext initialContext = createInitialContext( params,
                                                             qName,
View Full Code Here

        return macrosProcessedCompilableConsequence;
    }

    private static RuleInfo getCurrentRule(DRLInfo drlInfo,
                                    String currentRulename) {
        RuleInfo currentRule = null;
        RuleInfo[] ruleInfos = drlInfo.getRuleInfos();
        for ( int i = 0; i < ruleInfos.length; i++ ) {
            if ( currentRulename.equals( ruleInfos[i].getRuleName() ) ) {
                currentRule = ruleInfos[i];
                break;
View Full Code Here

TOP

Related Classes of org.drools.eclipse.DRLInfo.RuleInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.