|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.ui.text.contentassist.CCompletionProposal
public class CCompletionProposal
Constructor Summary | |
---|---|
CCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
int relevance)
Creates a new completion proposal. |
|
CCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
int relevance,
org.eclipse.jface.text.ITextViewer viewer)
Creates a new completion proposal. |
|
CCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
java.lang.String idString,
int relevance,
org.eclipse.jface.text.ITextViewer viewer)
Creates a new completion proposal. |
Method Summary | |
---|---|
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)
|
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getAdditionalProposalInfo()
|
org.eclipse.jface.text.contentassist.IContextInformation |
getContextInformation()
|
int |
getContextInformationPosition()
|
java.lang.String |
getDisplayString()
|
java.lang.String |
getIdString()
This method is used by the comparator to compare proposals. |
org.eclipse.swt.graphics.Image |
getImage()
|
org.eclipse.jface.text.IInformationControlCreator |
getInformationControlCreator()
|
int |
getPrefixCompletionStart(org.eclipse.jface.text.IDocument document,
int completionOffset)
|
java.lang.CharSequence |
getPrefixCompletionText(org.eclipse.jface.text.IDocument document,
int completionOffset)
|
int |
getRelevance()
Gets the proposal's relevance. |
int |
getReplacementLength()
Gets the replacement length. |
int |
getReplacementOffset()
Gets the replacement offset. |
java.lang.String |
getReplacementString()
Gets the replacement string. |
org.eclipse.swt.graphics.Point |
getSelection(org.eclipse.jface.text.IDocument document)
|
char[] |
getTriggerCharacters()
|
int |
hashCode()
|
boolean |
isValidFor(org.eclipse.jface.text.IDocument document,
int offset)
|
void |
selected(org.eclipse.jface.text.ITextViewer viewer,
boolean smartToggle)
|
void |
setAdditionalProposalInfo(java.lang.String proposalInfo)
Sets the proposal info. |
void |
setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation contextInformation)
Sets the context information. |
void |
setCursorPosition(int cursorPosition)
Sets the cursor position relative to the insertion offset. |
void |
setImage(org.eclipse.swt.graphics.Image image)
Sets the image. |
void |
setRelevance(int relevance)
Sets the proposal's relevance. |
void |
setReplacementLength(int replacementLength)
Sets the replacement length. |
void |
setReplacementOffset(int replacementOffset)
Sets the replacement offset. |
void |
setReplacementString(java.lang.String replacementString)
Sets the replacement string. |
void |
setTriggerCharacters(char[] triggerCharacters)
Sets the trigger characters. |
void |
unselected(org.eclipse.jface.text.ITextViewer viewer)
|
void |
updateReplacementLength(int length)
|
void |
updateReplacementOffset(int newOffset)
|
boolean |
validate(org.eclipse.jface.text.IDocument document,
int offset,
org.eclipse.jface.text.DocumentEvent event)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CCompletionProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, org.eclipse.swt.graphics.Image image, java.lang.String displayString, int relevance)
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 replacedimage
- the image to display for this proposaldisplayString
- the string to be displayed for the proposal
If set to null
, the replacement string will be taken as display string.public CCompletionProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, org.eclipse.swt.graphics.Image image, java.lang.String displayString, int relevance, org.eclipse.jface.text.ITextViewer viewer)
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 replacedimage
- the image to display for this proposaldisplayString
- the string to be displayed for the proposalviewer
- the text viewer for which this proposal is computed, may be null
If set to null
, the replacement string will be taken as display string.public CCompletionProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, org.eclipse.swt.graphics.Image image, java.lang.String displayString, java.lang.String idString, int relevance, org.eclipse.jface.text.ITextViewer viewer)
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 replacedimage
- the image to display for this proposaldisplayString
- the string to be displayed for the proposalidString
- the string to be uniquely identify this proposalviewer
- the text viewer for which this proposal is computed, may be null
If set to null
, the replacement string will be taken as display string.Method Detail |
---|
public void setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation contextInformation)
contextInformation
- The context information associated with this proposalpublic void setTriggerCharacters(char[] triggerCharacters)
triggerCharacters
- The set of characters which can trigger the application of this completion proposalpublic void setAdditionalProposalInfo(java.lang.String proposalInfo)
proposalInfo
- The additional information associated with this proposal or null
public void setCursorPosition(int cursorPosition)
cursorPosition
- The cursorPosition to setpublic void apply(org.eclipse.jface.text.IDocument document, char trigger, int offset)
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public void apply(org.eclipse.jface.text.IDocument document)
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
getSelection
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
getContextInformation
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public org.eclipse.swt.graphics.Image getImage()
getImage
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public java.lang.String getDisplayString()
getDisplayString
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public java.lang.String getIdString()
getIdString
in interface ICCompletionProposal
public java.lang.String getAdditionalProposalInfo()
getAdditionalProposalInfo
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public char[] getTriggerCharacters()
getTriggerCharacters
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public int getContextInformationPosition()
getContextInformationPosition
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public int getReplacementOffset()
public int getPrefixCompletionStart(org.eclipse.jface.text.IDocument document, int completionOffset)
getPrefixCompletionStart
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public void setReplacementOffset(int replacementOffset)
replacementOffset
- The replacement offset to setpublic int getReplacementLength()
public void setReplacementLength(int replacementLength)
replacementLength
- The replacementLength to setpublic java.lang.String getReplacementString()
public java.lang.CharSequence getPrefixCompletionText(org.eclipse.jface.text.IDocument document, int completionOffset)
getPrefixCompletionText
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public void setReplacementString(java.lang.String replacementString)
replacementString
- The replacement string to setpublic void setImage(org.eclipse.swt.graphics.Image image)
image
- The image to setpublic boolean isValidFor(org.eclipse.jface.text.IDocument document, int offset)
isValidFor
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public boolean validate(org.eclipse.jface.text.IDocument document, int offset, org.eclipse.jface.text.DocumentEvent event)
validate
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public int getRelevance()
getRelevance
in interface ICCompletionProposal
public void setRelevance(int relevance)
relevance
- The relevance to setpublic void apply(org.eclipse.jface.text.ITextViewer viewer, char trigger, int stateMask, int offset)
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public void selected(org.eclipse.jface.text.ITextViewer viewer, boolean smartToggle)
selected
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public void unselected(org.eclipse.jface.text.ITextViewer viewer)
unselected
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
getInformationControlCreator
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public void updateReplacementOffset(int newOffset)
public void updateReplacementLength(int length)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |