private void detectPackage(CharSequence rule) { pattern = Pattern.compile(PACKAGE_PATTERN); matcher = pattern.matcher(rule); if (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.PACKAGE, matcher.start(), matcher.group()); }
private void detectGlobals(CharSequence rule) { pattern = Pattern.compile(GLOBAL_PATTERN); matcher = pattern.matcher(rule); while (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.GLOBAL, matcher.start(), matcher.group()); }
private void detectImports(CharSequence rule) { pattern = Pattern.compile(IMPORT_PATTERN); matcher = pattern.matcher(rule); while (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.IMPORT, matcher.start(), matcher.group()); }
private void detectPackage(CharSequence rule) { pattern = Pattern.compile(PACKAGE_PATTERN); matcher = pattern.matcher(rule); if (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.PACKAGE, matcher.start(), matcher.group()); }
private void detectImports(CharSequence rule) { pattern = Pattern.compile(IMPORT_PATTERN); matcher = pattern.matcher(rule); while (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.IMPORT, matcher.start(), matcher.group()); }
private void detectGlobals(CharSequence rule) { pattern = Pattern.compile(GLOBAL_PATTERN); matcher = pattern.matcher(rule); while (matcher.find()) ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.GLOBAL, matcher.start(), matcher.group()); }
private void detectRules(CharSequence rule) { Matcher ruleMatcher = rulePattern.matcher(rule); while (ruleMatcher.find()) { for( int position = 0; position < ruleMatcher.groupCount()+1; position++ ){ String value = ruleMatcher.group(position); int offset = ruleMatcher.start(); String ruleName = detectRuleName(value); List<RuleLineContentInfo> lhs = detectLHS(value, offset); List<RuleLineContentInfo> rhs = detectRHS(value, offset); ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.RULE, offset, value, ruleName, lhs, rhs); } } }
private void detectRules(CharSequence rule) { Matcher ruleMatcher = rulePattern.matcher(rule); while (ruleMatcher.find()) { for( int position = 0; position < ruleMatcher.groupCount()+1; position++ ){ String value = ruleMatcher.group(position); int offset = ruleMatcher.start(); String ruleName = detectRuleName(value); List<RuleLineContentInfo> lhs = detectLHS(value, offset); List<RuleLineContentInfo> rhs = detectRHS(value, offset); ((DRLRuleRefactorInfo) ruleRefactorInfo).addContent(DRLContentTypeEnum.RULE, offset, value, ruleName, lhs, rhs); } } }