|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.ui.editor.quickfix.QuickAssistCompletionProposal
public class QuickAssistCompletionProposal
Constructor Summary | |
---|---|
QuickAssistCompletionProposal(org.eclipse.jface.text.Position pos,
IssueResolution resolution,
org.eclipse.swt.graphics.Image image)
|
Method Summary | |
---|---|
void |
apply(org.eclipse.jface.text.IDocument document)
Inserts the proposed completion into the given document. |
java.lang.String |
getAdditionalProposalInfo()
Returns optional additional information about the proposal. |
org.eclipse.jface.text.contentassist.IContextInformation |
getContextInformation()
Returns optional context information associated with this proposal. |
java.lang.String |
getDisplayString()
Returns the string to be displayed in the list of completion proposals. |
org.eclipse.swt.graphics.Image |
getImage()
Returns the image to be displayed in the list of completion proposals. |
org.eclipse.jface.text.IInformationControlCreator |
getInformationControlCreator()
Returns the information control creator of this completion proposal. |
int |
getPrefixCompletionStart(org.eclipse.jface.text.IDocument document,
int completionOffset)
Returns the document offset at which the receiver would insert its proposal. |
java.lang.CharSequence |
getPrefixCompletionText(org.eclipse.jface.text.IDocument document,
int completionOffset)
Returns the string that would be inserted at the position returned from ICompletionProposalExtension3.getPrefixCompletionStart(IDocument, int) if this proposal was
applied. |
org.eclipse.swt.graphics.Point |
getSelection(org.eclipse.jface.text.IDocument document)
Returns the new selection after the proposal has been applied to the given document in absolute document coordinates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuickAssistCompletionProposal(org.eclipse.jface.text.Position pos, IssueResolution resolution, org.eclipse.swt.graphics.Image image)
Method Detail |
---|
public void apply(org.eclipse.jface.text.IDocument document)
org.eclipse.jface.text.contentassist.ICompletionProposal
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
document
- the document into which to insert the proposed completionpublic org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
org.eclipse.jface.text.contentassist.ICompletionProposal
null
, no new selection is set.
A document change can trigger other document changes, which have
to be taken into account when calculating the new selection. Typically,
this would be done by installing a document listener or by using a
document position during ICompletionProposal.apply(IDocument)
.
getSelection
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
document
- the document into which the proposed completion has been inserted
public java.lang.String getAdditionalProposalInfo()
org.eclipse.jface.text.contentassist.ICompletionProposal
If ICompletionProposalExtension5
is implemented, this method should not be called any
longer. This method may be deprecated in a future release.
getAdditionalProposalInfo
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
null
public java.lang.String getDisplayString()
org.eclipse.jface.text.contentassist.ICompletionProposal
getDisplayString
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
ICompletionProposalExtension6.getStyledDisplayString()
public org.eclipse.swt.graphics.Image getImage()
org.eclipse.jface.text.contentassist.ICompletionProposal
getImage
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
null
if no image is desiredpublic org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
org.eclipse.jface.text.contentassist.ICompletionProposal
getContextInformation
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
null
public org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
getInformationControlCreator
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
null
if no custom control creator is availablepublic int getPrefixCompletionStart(org.eclipse.jface.text.IDocument document, int completionOffset)
org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
getPrefixCompletionStart
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
document
- the document that the receiver applies tocompletionOffset
- the offset into document
where the
completion takes place
public java.lang.CharSequence getPrefixCompletionText(org.eclipse.jface.text.IDocument document, int completionOffset)
org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
ICompletionProposalExtension3.getPrefixCompletionStart(IDocument, int)
if this proposal was
applied. If the replacement string cannot be determined,
null
may be returned.
getPrefixCompletionText
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
document
- the document that the receiver applies tocompletionOffset
- the offset into document
where the
completion takes place
null
if it cannot be
determined
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |