org.eclipse.xtend.shared.ui.expression.editor.codeassist
Class TextSelectingProposal

java.lang.Object
  extended by org.eclipse.xtend.shared.ui.expression.editor.codeassist.TextSelectingProposal
All Implemented Interfaces:
org.eclipse.jface.text.contentassist.ICompletionProposal

public class TextSelectingProposal
extends java.lang.Object
implements org.eclipse.jface.text.contentassist.ICompletionProposal


Constructor Summary
TextSelectingProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, int cursorPosition, int selectionLength)
          Creates a new completion proposal based on the provided information.
TextSelectingProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, int cursorPosition, int selectionLength, org.eclipse.swt.graphics.Image image, java.lang.String displayString, org.eclipse.jface.text.contentassist.IContextInformation contextInformation, java.lang.String additionalProposalInfo)
          Creates a new completion proposal.
 
Method Summary
 void apply(org.eclipse.jface.text.IDocument document)
           
 java.lang.String getAdditionalProposalInfo()
           
 org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
           
 java.lang.String getDisplayString()
           
 org.eclipse.swt.graphics.Image getImage()
           
 org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSelectingProposal

public TextSelectingProposal(java.lang.String replacementString,
                             int replacementOffset,
                             int replacementLength,
                             int cursorPosition,
                             int selectionLength)
Creates a new completion proposal based on the provided information. The replacement string is considered being the display string too. All remaining fields are set to null.

Parameters:
replacementString - the actual string to be inserted into the document
replacementOffset - the offset of the text to be replaced
replacementLength - the length of the text to be replaced
cursorPosition - the position of the cursor following the insert relative to replacementOffset

TextSelectingProposal

public TextSelectingProposal(java.lang.String replacementString,
                             int replacementOffset,
                             int replacementLength,
                             int cursorPosition,
                             int selectionLength,
                             org.eclipse.swt.graphics.Image image,
                             java.lang.String displayString,
                             org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
                             java.lang.String additionalProposalInfo)
Creates a new completion proposal. All fields are initialized based on the provided information.

Parameters:
replacementString - the actual string to be inserted into the document
replacementOffset - the offset of the text to be replaced
replacementLength - the length of the text to be replaced
cursorPosition - the position of the cursor following the insert relative to replacementOffset
image - the image to display for this proposal
displayString - the string to be displayed for the proposal
contextInformation - the context information associated with this proposal
additionalProposalInfo - the additional information associated with this proposal
Method Detail

apply

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

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

getContextInformation

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

getImage

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

getDisplayString

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

getAdditionalProposalInfo

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