org.drools.eclipse.editors.completion
Class RuleCompletionProposal

java.lang.Object
  extended by org.drools.eclipse.editors.completion.RuleCompletionProposal
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.ICompletionProposal

public class RuleCompletionProposal
extends Object
implements org.eclipse.jface.text.contentassist.ICompletionProposal

Holds a completion proposal to be popped up.


Nested Class Summary
static class RuleCompletionProposal.RuleCompletionProposalComparator
           
 
Constructor Summary
RuleCompletionProposal(int replacementOffset, int replacementLength, String content)
          This is used when the stuff that is displayed, is the stuff that is used.
RuleCompletionProposal(int replacementOffset, int replacementLength, String display, String content)
          This is used when a different display value is shown to what is put in when selected.
RuleCompletionProposal(int replacementOffset, int replacementLength, String display, String content, org.eclipse.swt.graphics.Image image)
          Also allows an icon to be used
RuleCompletionProposal(int replacementOffset, int replacementLength, String display, String content, int cursorPosition)
           
RuleCompletionProposal(int replacementOffset, int replacementLength, String display, String content, int cursorPosition, org.eclipse.swt.graphics.Image image)
          This is used when a different display value is shown to what is put in when selected.
 
Method Summary
 void apply(org.eclipse.jface.text.IDocument document)
           
 boolean equals(Object obj)
           
 String getAdditionalProposalInfo()
           
 String getContent()
           
 org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
           
 int getCursorPosition()
           
 String getDisplay()
           
 String getDisplayString()
           
 org.eclipse.swt.graphics.Image getImage()
           
 int getPriority()
           
 int getReplacementLength()
           
 org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
           
 int hashCode()
           
 void setImage(org.eclipse.swt.graphics.Image image)
           
 void setPriority(int priority)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleCompletionProposal

public RuleCompletionProposal(int replacementOffset,
                              int replacementLength,
                              String content)
This is used when the stuff that is displayed, is the stuff that is used.


RuleCompletionProposal

public RuleCompletionProposal(int replacementOffset,
                              int replacementLength,
                              String display,
                              String content)
This is used when a different display value is shown to what is put in when selected.


RuleCompletionProposal

public RuleCompletionProposal(int replacementOffset,
                              int replacementLength,
                              String display,
                              String content,
                              org.eclipse.swt.graphics.Image image)
Also allows an icon to be used


RuleCompletionProposal

public RuleCompletionProposal(int replacementOffset,
                              int replacementLength,
                              String display,
                              String content,
                              int cursorPosition)

RuleCompletionProposal

public RuleCompletionProposal(int replacementOffset,
                              int replacementLength,
                              String display,
                              String content,
                              int cursorPosition,
                              org.eclipse.swt.graphics.Image image)
This is used when a different display value is shown to what is put in when selected.

Method Detail

getDisplay

public String getDisplay()

getReplacementLength

public int getReplacementLength()

getCursorPosition

public int getCursorPosition()

getImage

public org.eclipse.swt.graphics.Image getImage()
Specified by:
getImage in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getContent

public String getContent()

setImage

public void setImage(org.eclipse.swt.graphics.Image image)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

toString

public String toString()
Overrides:
toString in class Object

apply

public void apply(org.eclipse.jface.text.IDocument document)
Specified by:
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getAdditionalProposalInfo

public String getAdditionalProposalInfo()
Specified by:
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getContextInformation

public org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
Specified by:
getContextInformation in interface org.eclipse.jface.text.contentassist.ICompletionProposal

getDisplayString

public String getDisplayString()
Specified by:
getDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposal

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getSelection

public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
Specified by:
getSelection in interface org.eclipse.jface.text.contentassist.ICompletionProposal


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