Drools :: Eclipse :: Base 6.2.0.Beta2

org.drools.eclipse.editors.completion
Class DefaultCompletionProcessor

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

public class DefaultCompletionProcessor
extends AbstractCompletionProcessor

This is the basic completion processor that is used when the editor is outside of a rule block partition. The provides the content assistance for basic rule assembly stuff. This processor will also read behind the current editing position, to provide some context to help provide the pop up list.


Field Summary
protected static org.eclipse.swt.graphics.Image CLASS_ICON
           
protected static Pattern IMPORT_PATTERN
           
protected static org.eclipse.swt.graphics.Image METHOD_ICON
           
protected static org.eclipse.swt.graphics.Image VARIABLE_ICON
           
 
Constructor Summary
DefaultCompletionProcessor(AbstractRuleEditor editor)
           
 
Method Summary
protected static boolean doesNotContainFieldCompletion(String completion, List<org.eclipse.jface.text.contentassist.ICompletionProposal> completions)
           
protected  List<org.eclipse.jface.text.contentassist.ICompletionProposal> getAllClassProposals(String classNameStart, int documentOffset, String prefix)
           
protected  Map<String,String> getAttributes()
           
protected  List<String> getClassesInPackage()
           
protected  List<org.eclipse.jface.text.contentassist.ICompletionProposal> getCompletionProposals(org.eclipse.jface.text.ITextViewer viewer, int documentOffset)
          Returns a list of RuleCompletionProposals.
protected  List<String> getFunctions()
           
protected  List<org.drools.compiler.lang.descr.GlobalDescr> getGlobals()
           
protected  List<String> getImports()
           
protected  List<org.eclipse.jface.text.contentassist.ICompletionProposal> getJavaCompletionProposals(int documentOffset, String javaText, String prefix, Map<String,String> params)
           
protected  List<org.eclipse.jface.text.contentassist.ICompletionProposal> getJavaCompletionProposals(int documentOffset, String javaText, String prefix, Map<String,String> params, boolean useDrools, boolean useContext)
           
protected  String getPackage()
           
protected  List<org.eclipse.jface.text.contentassist.ICompletionProposal> getPossibleProposals(org.eclipse.jface.text.ITextViewer viewer, int documentOffset, String backText, String prefix)
           
protected  Set<String> getUniqueImports()
           
protected  void requestJavaCompletionProposals(String javaText, String prefix, int documentOffset, Map<String,String> params, Collection<org.eclipse.jface.text.contentassist.ICompletionProposal> results)
           
protected  void requestJavaCompletionProposals(String javaText, String prefix, int documentOffset, Map<String,String> params, Collection<org.eclipse.jface.text.contentassist.ICompletionProposal> results, boolean useDrools, boolean useContext)
           
 
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
 

Field Detail

IMPORT_PATTERN

protected static final Pattern IMPORT_PATTERN

VARIABLE_ICON

protected static final org.eclipse.swt.graphics.Image VARIABLE_ICON

METHOD_ICON

protected static final org.eclipse.swt.graphics.Image METHOD_ICON

CLASS_ICON

protected static final org.eclipse.swt.graphics.Image CLASS_ICON
Constructor Detail

DefaultCompletionProcessor

public DefaultCompletionProcessor(AbstractRuleEditor editor)
Method Detail

getCompletionProposals

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

Specified by:
getCompletionProposals in class AbstractCompletionProcessor
Returns:

getAllClassProposals

protected List<org.eclipse.jface.text.contentassist.ICompletionProposal> getAllClassProposals(String classNameStart,
                                                                                              int documentOffset,
                                                                                              String prefix)

getPossibleProposals

protected List<org.eclipse.jface.text.contentassist.ICompletionProposal> getPossibleProposals(org.eclipse.jface.text.ITextViewer viewer,
                                                                                              int documentOffset,
                                                                                              String backText,
                                                                                              String prefix)

getJavaCompletionProposals

protected List<org.eclipse.jface.text.contentassist.ICompletionProposal> getJavaCompletionProposals(int documentOffset,
                                                                                                    String javaText,
                                                                                                    String prefix,
                                                                                                    Map<String,String> params)

getJavaCompletionProposals

protected List<org.eclipse.jface.text.contentassist.ICompletionProposal> getJavaCompletionProposals(int documentOffset,
                                                                                                    String javaText,
                                                                                                    String prefix,
                                                                                                    Map<String,String> params,
                                                                                                    boolean useDrools,
                                                                                                    boolean useContext)

doesNotContainFieldCompletion

protected static boolean doesNotContainFieldCompletion(String completion,
                                                       List<org.eclipse.jface.text.contentassist.ICompletionProposal> completions)

requestJavaCompletionProposals

protected void requestJavaCompletionProposals(String javaText,
                                              String prefix,
                                              int documentOffset,
                                              Map<String,String> params,
                                              Collection<org.eclipse.jface.text.contentassist.ICompletionProposal> results)

requestJavaCompletionProposals

protected void requestJavaCompletionProposals(String javaText,
                                              String prefix,
                                              int documentOffset,
                                              Map<String,String> params,
                                              Collection<org.eclipse.jface.text.contentassist.ICompletionProposal> results,
                                              boolean useDrools,
                                              boolean useContext)

getPackage

protected String getPackage()

getImports

protected List<String> getImports()

getUniqueImports

protected Set<String> getUniqueImports()

getFunctions

protected List<String> getFunctions()

getAttributes

protected Map<String,String> getAttributes()

getGlobals

protected List<org.drools.compiler.lang.descr.GlobalDescr> getGlobals()

getClassesInPackage

protected List<String> getClassesInPackage()

Drools :: Eclipse :: Base 6.2.0.Beta2

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