org.objectweb.jac.ide.swing
Class AccCompletionEngine

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.swing.CompletionEngine
        |
        +--org.objectweb.jac.aspects.gui.swing.DefaultCompletionEngine
              |
              +--org.objectweb.jac.ide.swing.AccCompletionEngine

public class AccCompletionEngine
extends DefaultCompletionEngine

This class implements a completion engine for method acc configuration code of the UMLAF IDE.


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.swing.CompletionEngine
BACKWARD, baseWords, FORWARD
 
Constructor Summary
AccCompletionEngine(ToolParserWrapper parser, Project project)
          Creates a new AccCompletionEngine using a given parser.
 
Method Summary
protected  void completeAttributeName(String start, Class cl, List result)
           
protected  List completeBlockParam(Terminal term)
          Gets completion for a block parameter
protected  void completeClassName(String start, List result)
           
protected  List completeConfMethodParam()
           
protected  void completeMethodName(String start, Class cl, List result)
           
protected  String getClassName(NonTerminal block)
          Gets the className for a member,method or attribute block
 List getContextualChoices(String text, int position, String writtenText)
          In the default completion engine, this method only returns base words (i.e. non-contextual words).
 SyntaxElement getCurrentSyntaxElement()
           
protected  String getMemberName(NonTerminal block)
           
 void setAspectInstance(AspectComponent instance)
          Sets the aspect instance associated with the completion engine
 
Methods inherited from class org.objectweb.jac.aspects.gui.swing.DefaultCompletionEngine
isAutomaticCompletionChar, runAutomaticCompletion
 
Methods inherited from class org.objectweb.jac.aspects.gui.swing.CompletionEngine
addBaseWord, addBaseWords, clearBaseWords, getBaseWords, getProposal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccCompletionEngine

public AccCompletionEngine(ToolParserWrapper parser,
                           Project project)
Creates a new AccCompletionEngine using a given parser.

Parameters:
parser - the parser to use
Method Detail

getCurrentSyntaxElement

public SyntaxElement getCurrentSyntaxElement()

setAspectInstance

public void setAspectInstance(AspectComponent instance)
Sets the aspect instance associated with the completion engine

Parameters:
instance - the AspectComponent instance

getContextualChoices

public List getContextualChoices(String text,
                                 int position,
                                 String writtenText)
Description copied from class: DefaultCompletionEngine
In the default completion engine, this method only returns base words (i.e. non-contextual words).

Overrides:
getContextualChoices in class DefaultCompletionEngine
Parameters:
text - the editor's full text
position - the cursor position
writtenText - the already written text

completeConfMethodParam

protected List completeConfMethodParam()

completeBlockParam

protected List completeBlockParam(Terminal term)
Gets completion for a block parameter

Parameters:
term - the Terminal syntax element to complete

getClassName

protected String getClassName(NonTerminal block)
Gets the className for a member,method or attribute block

Parameters:
block - Non terminal of the block keyword
Returns:
the class name, or null if it cannot be computed

getMemberName

protected String getMemberName(NonTerminal block)

completeAttributeName

protected void completeAttributeName(String start,
                                     Class cl,
                                     List result)

completeMethodName

protected void completeMethodName(String start,
                                  Class cl,
                                  List result)

completeClassName

protected void completeClassName(String start,
                                 List result)