Class PositionBasedCompletionProposal
- java.lang.Object
-
- org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
- com.e1c.g5.v8.dt.lcore.ui.templates.contentassist.variable.proposals.PositionBasedCompletionProposal
-
- All Implemented Interfaces:
IPositionBasedCompletionProposal
,Comparable<org.eclipse.xtext.ui.editor.contentassist.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
public class PositionBasedCompletionProposal extends org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal implements IPositionBasedCompletionProposal
Default implementation ofIPositionBasedCompletionProposal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal.ExitPolicy, org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal.IReplacementTextApplier
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jface.text.link.ProposalPosition
position
The position to apply proposal
-
Constructor Summary
Constructors Constructor Description PositionBasedCompletionProposal(String replacementString, int replacementOffset, int cursorPosition, boolean useFuzzySearch)
Creates new instance of this with given text to replace onapply(IDocument)
and cursor position to set after
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(org.eclipse.jface.text.IDocument document)
void
apply(org.eclipse.jface.text.ITextViewer viewer, char trigger, int stateMask, int offset)
String
getAdditionalProposalInfo()
org.eclipse.jface.text.contentassist.IContextInformation
getContextInformation()
String
getDisplayString()
org.eclipse.swt.graphics.Image
getImage()
org.eclipse.swt.graphics.Point
getSelection(org.eclipse.jface.text.IDocument document)
StyledString
getStyledDisplayString()
void
selected(org.eclipse.jface.text.ITextViewer viewer, boolean smartToggle)
void
setPosition(org.eclipse.jface.text.link.ProposalPosition position)
Sets the position of proposal to the given onevoid
unselected(org.eclipse.jface.text.ITextViewer viewer)
boolean
validate(org.eclipse.jface.text.IDocument document, int offset, org.eclipse.jface.text.DocumentEvent event)
-
Methods inherited from class org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
apply, compareTo, equals, getAdditionalData, getAdditionalProposalInfo, getContextInformationPosition, getCursorPosition, getInformationControlCreator, getMatcher, getPrefixCompletionStart, getPrefixCompletionText, getPriority, getReplaceContextLength, getReplacementLength, getReplacementOffset, getReplacementString, getSelectionLength, getSelectionStart, getTextApplier, getTriggerCharacters, hashCode, isAutoInsertable, isLinkedMode, isValidFor, setAdditionalData, setAdditionalProposalInfo, setAutoInsertable, setContextInformation, setCursorPosition, setDisplayString, setDisplayString, setHover, setImage, setMatcher, setPriority, setProposalContextResource, setReplaceContextLength, setReplacementLength, setReplacementOffset, setReplacementString, setSelectionLength, setSelectionStart, setSimpleLinkedMode, setTextApplier, setTriggerCharacters, setUpLinkedMode, shiftOffset, toString
-
-
-
-
Constructor Detail
-
PositionBasedCompletionProposal
public PositionBasedCompletionProposal(String replacementString, int replacementOffset, int cursorPosition, boolean useFuzzySearch)
Creates new instance of this with given text to replace onapply(IDocument)
and cursor position to set after- Parameters:
replacementString
- The string to replace with, cannot benull
cursorPosition
- The position of the cursor afterapply(IDocument)
-
-
Method Detail
-
setPosition
public void setPosition(org.eclipse.jface.text.link.ProposalPosition position)
Description copied from interface:IPositionBasedCompletionProposal
Sets the position of proposal to the given one- Specified by:
setPosition
in interfaceIPositionBasedCompletionProposal
- Parameters:
position
- The position to set proposal on, can benull
-
apply
public void apply(org.eclipse.jface.text.IDocument document)
- Specified by:
apply
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
apply
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getSelection
public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
- Specified by:
getSelection
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
getSelection
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getAdditionalProposalInfo
public String getAdditionalProposalInfo()
- Specified by:
getAdditionalProposalInfo
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
getAdditionalProposalInfo
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getDisplayString
public String getDisplayString()
- Specified by:
getDisplayString
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
getDisplayString
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImage
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
getImage
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getContextInformation
public org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
- Specified by:
getContextInformation
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposal
- Overrides:
getContextInformation
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
apply
public void apply(org.eclipse.jface.text.ITextViewer viewer, char trigger, int stateMask, int offset)
- Specified by:
apply
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposalExtension2
- Overrides:
apply
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
selected
public void selected(org.eclipse.jface.text.ITextViewer viewer, boolean smartToggle)
- Specified by:
selected
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposalExtension2
- Overrides:
selected
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
unselected
public void unselected(org.eclipse.jface.text.ITextViewer viewer)
- Specified by:
unselected
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposalExtension2
- Overrides:
unselected
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
getStyledDisplayString
public StyledString getStyledDisplayString()
- Specified by:
getStyledDisplayString
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposalExtension6
- Overrides:
getStyledDisplayString
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
validate
public boolean validate(org.eclipse.jface.text.IDocument document, int offset, org.eclipse.jface.text.DocumentEvent event)
- Specified by:
validate
in interfaceorg.eclipse.jface.text.contentassist.ICompletionProposalExtension2
- Overrides:
validate
in classorg.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal
-
-