Examples of RuleDRLContentInfo


Examples of org.drools.assistant.info.drl.RuleDRLContentInfo

  public static AssistantOption execute(RenameAssistantOption assistantOption, String newVariableName) {
    detectCurrentVariables(assistantOption.getContentInfo());
    if (existsVariableWithSameName(newVariableName))
      return null;
    RuleDRLContentInfo ruleDRLContentInfo = ((RuleLineContentInfo)assistantOption.getContentInfo()).getRule();
    String rule = getAllRuleLines(ruleDRLContentInfo);
    Integer offset = getOffsetFirstLine(ruleDRLContentInfo);
    String content = replaceAllVariables(rule, assistantOption.getContent(), newVariableName);
    assistantOption.setContent(content);
    assistantOption.setOffset(offset);
View Full Code Here

Examples of org.drools.assistant.info.drl.RuleDRLContentInfo

      return null;
    String right = line.substring(offsetStart);
    String variableName = detectVariableToReplace(right);
    if (variableName==null)
      return null;
    RuleDRLContentInfo ruleContentInfo = ((RuleLineContentInfo)contentInfo).getRule();
    String allRule = getAllRuleLines(ruleContentInfo);
    return hasMoreVariableToReplace(allRule, variableName)?variableName:null;
  }
View Full Code Here

Examples of org.drools.assistant.info.drl.RuleDRLContentInfo

  // detect all the Class Name and compare with the current imports
  // how detect the Classes loaded into the ClassLoader?
  public static void execute(RuleBasicContentInfo contentInfo, List<RuleBasicContentInfo> imports) {
    classloaderClasses.clear();
    classes.clear();
    RuleDRLContentInfo ruleInfo = ((RuleLineContentInfo)contentInfo).getRule();
    String rule = "";
    for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getLHSRuleLines())
      rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
    for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getRHSRuleLines())
      rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
    matcher = pattern.matcher(rule);
    String className;
    while (matcher.find()) {
      className = matcher.group().replaceAll(":", "").replaceAll("\\(", "").replaceAll("\\t", "").replaceAll("\\n", "").trim();
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

    public static AssistantOption execute(RenameAssistantOption assistantOption, String newVariableName) {
        detectCurrentVariables(assistantOption.getContentInfo());
        if (existsVariableWithSameName(newVariableName))
            return null;
        RuleDRLContentInfo ruleDRLContentInfo = ((RuleLineContentInfo)assistantOption.getContentInfo()).getRule();
        String rule = getAllRuleLines(ruleDRLContentInfo);
        Integer offset = getOffsetFirstLine(ruleDRLContentInfo);
        String content = replaceAllVariables(rule, assistantOption.getContent(), newVariableName);
        assistantOption.setContent(content);
        assistantOption.setOffset(offset);
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

            return null;
        String right = line.substring(offsetStart);
        String variableName = detectVariableToReplace(right);
        if (variableName==null)
            return null;
        RuleDRLContentInfo ruleContentInfo = ((RuleLineContentInfo)contentInfo).getRule();
        String allRule = getAllRuleLines(ruleContentInfo);
        return hasMoreVariableToReplace(allRule, variableName)?variableName:null;
    }
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

    // detect all the Class Name and compare with the current imports
    // how detect the Classes loaded into the ClassLoader?
    public static void execute(RuleBasicContentInfo contentInfo, List<RuleBasicContentInfo> imports) {
        classloaderClasses.clear();
        classes.clear();
        RuleDRLContentInfo ruleInfo = ((RuleLineContentInfo)contentInfo).getRule();
        String rule = "";
        for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getLHSRuleLines())
            rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
        for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getRHSRuleLines())
            rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
        matcher = pattern.matcher(rule);
        String className;
        while (matcher.find()) {
            className = matcher.group().replaceAll(":", "").replaceAll("\\(", "").replaceAll("\\t", "").replaceAll("\\n", "").trim();
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

  public static AssistantOption execute(RenameAssistantOption assistantOption, String newVariableName) {
    detectCurrentVariables(assistantOption.getContentInfo());
    if (existsVariableWithSameName(newVariableName))
      return null;
    RuleDRLContentInfo ruleDRLContentInfo = ((RuleLineContentInfo)assistantOption.getContentInfo()).getRule();
    String rule = getAllRuleLines(ruleDRLContentInfo);
    Integer offset = getOffsetFirstLine(ruleDRLContentInfo);
    String content = replaceAllVariables(rule, assistantOption.getContent(), newVariableName);
    assistantOption.setContent(content);
    assistantOption.setOffset(offset);
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

      return null;
    String right = line.substring(offsetStart);
    String variableName = detectVariableToReplace(right);
    if (variableName==null)
      return null;
    RuleDRLContentInfo ruleContentInfo = ((RuleLineContentInfo)contentInfo).getRule();
    String allRule = getAllRuleLines(ruleContentInfo);
    return hasMoreVariableToReplace(allRule, variableName)?variableName:null;
  }
View Full Code Here

Examples of org.drools.ide.common.assistant.info.drl.RuleDRLContentInfo

  // detect all the Class Name and compare with the current imports
  // how detect the Classes loaded into the ClassLoader?
  public static void execute(RuleBasicContentInfo contentInfo, List<RuleBasicContentInfo> imports) {
    classloaderClasses.clear();
    classes.clear();
    RuleDRLContentInfo ruleInfo = ((RuleLineContentInfo)contentInfo).getRule();
    String rule = "";
    for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getLHSRuleLines())
      rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
    for (RuleLineContentInfo ruleLineContentInfo : ruleInfo.getRHSRuleLines())
      rule = rule.concat(ruleLineContentInfo.getContent() + "\n");
    matcher = pattern.matcher(rule);
    String className;
    while (matcher.find()) {
      className = matcher.group().replaceAll(":", "").replaceAll("\\(", "").replaceAll("\\t", "").replaceAll("\\n", "").trim();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.