Package org.drools.ide.common.assistant.option

Examples of org.drools.ide.common.assistant.option.RenameAssistantOption


        engine = new DRLParserEngine(rule);
        info = (DRLRuleRefactorInfo) engine.parse();
        RuleBasicContentInfo content = info.getContentAt(87);

        RenameAssistantOption assistantOption = new RenameAssistantOption("rename variable", "message", content, 87);

        AssistantOption result = VariableRename.execute(assistantOption, "msg");

        assertTrue(result.getContent().contains("m : Message( $status : status == Message.HELLO, msg :message )"));
        assertTrue(result.getContent().contains("System.out.println( msg );"));
View Full Code Here


        engine = new DRLParserEngine(rule);
        info = (DRLRuleRefactorInfo) engine.parse();
        RuleBasicContentInfo content = info.getContentAt(87);

        RenameAssistantOption assistantOption = new RenameAssistantOption("rename variable", "message", content, 87);

        AssistantOption result = VariableRename.execute(assistantOption, "msg");

        assertTrue(result.getContent().contains("m : Message( $status : status == Message.HELLO, msg :message )"));
        assertTrue(result.getContent().contains("System.out.println( msg );"));
View Full Code Here

        if (!contentInfo.getType().equals(DRLContentTypeEnum.RULE_LHS_LINE) &&
                !contentInfo.getType().equals(DRLContentTypeEnum.RULE_RHS_LINE))
            return null;
        String variable;
        if ((variable = VariableRename.isPossible(contentInfo, offset-contentInfo.getOffset()))!=null)
            return new RenameAssistantOption("rename variable", variable, contentInfo, contentInfo.getOffset());
        return null;
    }
View Full Code Here

    if (!contentInfo.getType().equals(DRLContentTypeEnum.RULE_LHS_LINE) &&
        !contentInfo.getType().equals(DRLContentTypeEnum.RULE_RHS_LINE))
      return null;
    String variable;
    if ((variable = VariableRename.isPossible(contentInfo, offset-contentInfo.getOffset()))!=null)
      return new RenameAssistantOption("rename variable", variable, contentInfo, contentInfo.getOffset());
    return null;
  }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.assistant.option.RenameAssistantOption

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.