org.drools.eclipse.editors.completion
Class RuleCompletionProcessor

java.lang.Object
  extended by org.drools.eclipse.editors.completion.AbstractCompletionProcessor
      extended by org.drools.eclipse.editors.completion.DefaultCompletionProcessor
          extended by org.drools.eclipse.editors.completion.RuleCompletionProcessor
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.IContentAssistProcessor
Direct Known Subclasses:
ActionCompletionProcessor, ConstraintCompletionProcessor, DSLRuleCompletionProcessor

public class RuleCompletionProcessor
extends DefaultCompletionProcessor

For handling within rules.


Field Summary
 
Fields inherited from class org.drools.eclipse.editors.completion.DefaultCompletionProcessor
IMPORT_PATTERN, METHOD_ICON, VARIABLE_ICON
 
Constructor Summary
RuleCompletionProcessor(AbstractRuleEditor editor)
           
 
Method Summary
static void addAllNewProposals(Collection proposals, Collection newProposals)
           
protected  void addLHSCompletionProposals(List<RuleCompletionProposal> list, int documentOffset, org.drools.lang.Location location, String prefix, String backText)
           
protected  void addRHSCompletionProposals(List list, int documentOffset, String prefix, String backText, String conditions, String consequence)
           
static boolean containsProposal(Collection proposals, String newProposal)
          Attempt to compare proposals of different types based on the tokenized display string
protected  List getCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int documentOffset)
          Returns a list of RuleCompletionProposals.
static Collection mvelifyProposals(List list, boolean settersOnly)
           
static String processMacros(String mvel)
           
 
Methods inherited from class org.drools.eclipse.editors.completion.DefaultCompletionProcessor
doesNotContainFieldCompletion, getAllClassProposals, getAttributes, getClassesInPackage, getFunctions, getGlobals, getImports, getJavaCompletionProposals, getJavaCompletionProposals, getPackage, getPossibleProposals, getUniqueImports, requestJavaCompletionProposals, requestJavaCompletionProposals
 
Methods inherited from class org.drools.eclipse.editors.completion.AbstractCompletionProcessor
computeCompletionProposals, computeContextInformation, filterProposalsOnPrefix, getCompletionProposalAutoActivationCharacters, getContextInformationAutoActivationCharacters, getContextInformationValidator, getEditor, getErrorMessage, readBackwards
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleCompletionProcessor

public RuleCompletionProcessor(AbstractRuleEditor editor)
Method Detail

getCompletionProposals

protected List getCompletionProposals(org.eclipse.jface.text.ITextViewer viewer,
                                      int documentOffset)
Description copied from class: AbstractCompletionProcessor
Returns a list of RuleCompletionProposals.

Overrides:
getCompletionProposals in class DefaultCompletionProcessor
Returns:

addRHSCompletionProposals

protected void addRHSCompletionProposals(List list,
                                         int documentOffset,
                                         String prefix,
                                         String backText,
                                         String conditions,
                                         String consequence)

addLHSCompletionProposals

protected void addLHSCompletionProposals(List<RuleCompletionProposal> list,
                                         int documentOffset,
                                         org.drools.lang.Location location,
                                         String prefix,
                                         String backText)

processMacros

public static String processMacros(String mvel)

addAllNewProposals

public static void addAllNewProposals(Collection proposals,
                                      Collection newProposals)

containsProposal

public static boolean containsProposal(Collection proposals,
                                       String newProposal)
Attempt to compare proposals of different types based on the tokenized display string

Parameters:
proposals -
newProposal -
Returns:
true if the collection contains a proposal which matches the new Proposal. The match is based on the first token based on a space split

mvelifyProposals

public static Collection mvelifyProposals(List list,
                                          boolean settersOnly)


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.