org.eclipse.xtend.shared.ui.expression.editor.codeassist
Class TextSelectingProposal
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 documentreplacementOffset
- the offset of the text to be replacedreplacementLength
- the length of the text to be replacedcursorPosition
- 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 documentreplacementOffset
- the offset of the text to be replacedreplacementLength
- the length of the text to be replacedcursorPosition
- the position of the cursor following the insert relative to
replacementOffsetimage
- the image to display for this proposaldisplayString
- the string to be displayed for the proposalcontextInformation
- the context information associated with this proposaladditionalProposalInfo
- the additional information associated with this proposal
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