public class ConfigurableCompletionProposal extends Object implements Comparable<ConfigurableCompletionProposal>, org.eclipse.jface.text.contentassist.ICompletionProposal, org.eclipse.jface.text.contentassist.ICompletionProposalExtension, org.eclipse.jface.text.contentassist.ICompletionProposalExtension2, org.eclipse.jface.text.contentassist.ICompletionProposalExtension3, org.eclipse.jface.text.contentassist.ICompletionProposalExtension4, org.eclipse.jface.text.contentassist.ICompletionProposalExtension5, org.eclipse.jface.text.contentassist.ICompletionProposalExtension6
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ConfigurableCompletionProposal.ExitPolicy |
static interface |
ConfigurableCompletionProposal.IReplacementTextApplier |
| Constructor and Description |
|---|
ConfigurableCompletionProposal(String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition)
Creates a new completion proposal based on the provided information.
|
ConfigurableCompletionProposal(String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
org.eclipse.swt.graphics.Image image,
org.eclipse.jface.viewers.StyledString displayString,
org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
String additionalProposalInfo)
Creates a new completion proposal.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(org.eclipse.jface.text.IDocument document) |
void |
apply(org.eclipse.jface.text.IDocument document,
char trigger,
int offset) |
void |
apply(org.eclipse.jface.text.ITextViewer viewer,
char trigger,
int stateMask,
int offset) |
int |
compareTo(ConfigurableCompletionProposal other) |
boolean |
equals(Object obj) |
Object |
getAdditionalData(String key)
Used to store arbitrary data as a protocol between two or more clients unknown to this class.
|
String |
getAdditionalProposalInfo() |
Object |
getAdditionalProposalInfo(org.eclipse.core.runtime.IProgressMonitor monitor) |
org.eclipse.jface.text.contentassist.IContextInformation |
getContextInformation() |
int |
getContextInformationPosition() |
int |
getCursorPosition() |
String |
getDisplayString() |
org.eclipse.swt.graphics.Image |
getImage() |
org.eclipse.jface.text.IInformationControlCreator |
getInformationControlCreator() |
PrefixMatcher |
getMatcher() |
int |
getPrefixCompletionStart(org.eclipse.jface.text.IDocument document,
int completionOffset) |
CharSequence |
getPrefixCompletionText(org.eclipse.jface.text.IDocument document,
int completionOffset) |
int |
getPriority()
Returns the priority of the proposal.
|
int |
getReplaceContextLength() |
int |
getReplacementLength() |
int |
getReplacementOffset() |
String |
getReplacementString() |
org.eclipse.swt.graphics.Point |
getSelection(org.eclipse.jface.text.IDocument document) |
int |
getSelectionLength() |
int |
getSelectionStart() |
org.eclipse.jface.viewers.StyledString |
getStyledDisplayString() |
ConfigurableCompletionProposal.IReplacementTextApplier |
getTextApplier() |
char[] |
getTriggerCharacters() |
int |
hashCode() |
boolean |
isAutoInsertable() |
protected boolean |
isLinkedMode() |
boolean |
isValidFor(org.eclipse.jface.text.IDocument document,
int offset) |
void |
selected(org.eclipse.jface.text.ITextViewer viewer,
boolean smartToggle) |
void |
setAdditionalData(String key,
Object additionalData)
Used to store arbitrary data as a protocol between two or more clients unknown to this class.
|
void |
setAdditionalProposalInfo(Object additionalProposalInfo) |
void |
setAutoInsertable(boolean autoInsertable) |
void |
setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation contextInformation) |
void |
setCursorPosition(int cursorPosition) |
void |
setDisplayString(String displayString) |
void |
setDisplayString(org.eclipse.jface.viewers.StyledString displayString) |
void |
setHover(IEObjectHover hover) |
void |
setImage(org.eclipse.swt.graphics.Image image) |
void |
setMatcher(PrefixMatcher matcher) |
void |
setPriority(int priority) |
void |
setProposalContextResource(org.eclipse.emf.ecore.resource.Resource contextResource) |
void |
setReplaceContextLength(int replaceContextLength) |
void |
setReplacementLength(int replacementLength) |
void |
setReplacementOffset(int replacementOffset) |
void |
setReplacementString(String replacementString) |
void |
setSelectionLength(int selectionLength) |
void |
setSelectionStart(int selectionStart) |
void |
setSimpleLinkedMode(org.eclipse.jface.text.ITextViewer viewer,
char... exitChars) |
void |
setTextApplier(ConfigurableCompletionProposal.IReplacementTextApplier textApplier) |
void |
setTriggerCharacters(char[] triggerChars) |
protected void |
setUpLinkedMode(org.eclipse.jface.text.IDocument document)
Sets up a simple linked mode at
getCursorPosition() and an exit policy that will
exit the mode when closingCharacter is typed and an exit position at
getCursorPosition() + 1. |
String |
toString() |
void |
unselected(org.eclipse.jface.text.ITextViewer viewer) |
boolean |
validate(org.eclipse.jface.text.IDocument document,
int offset,
org.eclipse.jface.text.DocumentEvent event) |
public ConfigurableCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition)
null.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 replacementOffsetpublic ConfigurableCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, org.eclipse.swt.graphics.Image image, org.eclipse.jface.viewers.StyledString displayString, org.eclipse.jface.text.contentassist.IContextInformation contextInformation, String additionalProposalInfo)
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 proposalpublic void setAdditionalData(String key, Object additionalData)
public Object getAdditionalData(String key)
public void apply(org.eclipse.jface.text.IDocument document)
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
getSelection in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
getContextInformation in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.swt.graphics.Image getImage()
getImage in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic String getDisplayString()
getDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.jface.viewers.StyledString getStyledDisplayString()
getStyledDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension6public String getAdditionalProposalInfo()
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic boolean isAutoInsertable()
isAutoInsertable in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension4public void setAutoInsertable(boolean autoInsertable)
public String getReplacementString()
public int getReplacementOffset()
public int getReplacementLength()
public int getCursorPosition()
public void setDisplayString(String displayString)
public void setDisplayString(org.eclipse.jface.viewers.StyledString displayString)
public void setReplacementString(String replacementString)
public void setReplacementOffset(int replacementOffset)
public void setReplacementLength(int replacementLength)
public void setCursorPosition(int cursorPosition)
public void setImage(org.eclipse.swt.graphics.Image image)
public void setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation contextInformation)
public void setAdditionalProposalInfo(Object additionalProposalInfo)
public void setProposalContextResource(org.eclipse.emf.ecore.resource.Resource contextResource)
public int getSelectionStart()
public int getSelectionLength()
public void setSelectionLength(int selectionLength)
public void setSelectionStart(int selectionStart)
public void setSimpleLinkedMode(org.eclipse.jface.text.ITextViewer viewer,
char... exitChars)
protected boolean isLinkedMode()
public void apply(org.eclipse.jface.text.ITextViewer viewer,
char trigger,
int stateMask,
int offset)
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2public void apply(org.eclipse.jface.text.IDocument document,
char trigger,
int offset)
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtensionpublic boolean isValidFor(org.eclipse.jface.text.IDocument document,
int offset)
isValidFor in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtensionpublic int getContextInformationPosition()
getContextInformationPosition in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtensionpublic char[] getTriggerCharacters()
getTriggerCharacters in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtensionpublic void setTriggerCharacters(char[] triggerChars)
public void selected(org.eclipse.jface.text.ITextViewer viewer,
boolean smartToggle)
selected in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2public void unselected(org.eclipse.jface.text.ITextViewer viewer)
unselected in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2public boolean validate(org.eclipse.jface.text.IDocument document,
int offset,
org.eclipse.jface.text.DocumentEvent event)
validate in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2public void setMatcher(PrefixMatcher matcher)
public PrefixMatcher getMatcher()
public void setReplaceContextLength(int replaceContextLength)
public int getReplaceContextLength()
public void setPriority(int priority)
public int getPriority()
public int compareTo(ConfigurableCompletionProposal other)
compareTo in interface Comparable<ConfigurableCompletionProposal>protected void setUpLinkedMode(org.eclipse.jface.text.IDocument document)
getCursorPosition() and an exit policy that will
exit the mode when closingCharacter is typed and an exit position at
getCursorPosition() + 1.document - the documentpublic void setTextApplier(ConfigurableCompletionProposal.IReplacementTextApplier textApplier)
public ConfigurableCompletionProposal.IReplacementTextApplier getTextApplier()
public org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
getInformationControlCreator in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3public CharSequence getPrefixCompletionText(org.eclipse.jface.text.IDocument document, int completionOffset)
getPrefixCompletionText in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3public int getPrefixCompletionStart(org.eclipse.jface.text.IDocument document,
int completionOffset)
getPrefixCompletionStart in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3public void setHover(IEObjectHover hover)
public Object getAdditionalProposalInfo(org.eclipse.core.runtime.IProgressMonitor monitor)
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension5Copyright © 2016. All Rights Reserved.