@Override protected AssistantOption bindVariable(RuleBasicContentInfo contentInfo) { if (contentInfo==null) return null; if (!contentInfo.getType().equals(DRLContentTypeEnum.RULE_LHS_LINE)) return null; String response = VariableBinding.execute(contentInfo, offset-contentInfo.getOffset()); if (response.equals(contentInfo.getContent())) return null; return new ReplaceAssistantOption("assign to variable", response, contentInfo.getOffset(), contentInfo.getContentLength(), offset); }
@Override protected AssistantOption bindVariable(RuleBasicContentInfo contentInfo) { if (contentInfo==null) return null; if (!contentInfo.getType().equals(DRLContentTypeEnum.RULE_LHS_LINE)) return null; String response = VariableBinding.execute(contentInfo, offset-contentInfo.getOffset()); if (response.equals(contentInfo.getContent())) return null; return new ReplaceAssistantOption("assign to variable", response, contentInfo.getOffset(), contentInfo.getContentLength(), offset); }
@Override protected AssistantOption renameVariable(RuleBasicContentInfo contentInfo) { if (contentInfo==null) return null; 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; }
@Override protected AssistantOption renameVariable(RuleBasicContentInfo contentInfo) { if (contentInfo==null) return null; 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; }