|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.m2m.atl.adt.ui.text.atl.AtlCompletionProposal
public class AtlCompletionProposal
The ATL completion proposal definition.
Nested Class Summary | |
---|---|
protected static class |
AtlCompletionProposal.ExitPolicy
|
Field Summary | |
---|---|
protected org.eclipse.jface.text.ITextViewer |
fTextViewer
|
protected boolean |
fToggleEating
|
Constructor Summary | |
---|---|
AtlCompletionProposal(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,
java.lang.String additionalProposalInfo)
Creates a new completion proposal. |
|
AtlCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
int relevance,
java.lang.String additionalProposalInfo)
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)
|
int |
compareTo(AtlCompletionProposal arg0)
|
java.lang.String |
getAdditionalProposalInfo()
|
org.eclipse.jface.text.contentassist.IContextInformation |
getContextInformation()
|
int |
getContextInformationPosition()
|
java.lang.String |
getDisplayString()
|
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()
|
boolean |
isValidFor(org.eclipse.jface.text.IDocument document,
int offset)
|
void |
selected(org.eclipse.jface.text.ITextViewer viewer,
boolean smartToggle)
|
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. |
protected boolean |
startsWith(org.eclipse.jface.text.IDocument document,
int offset,
java.lang.String word)
Returns true if a words starts with the code completion prefix in the document,
false otherwise. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.eclipse.jface.text.ITextViewer fTextViewer
protected boolean fToggleEating
Constructor Detail |
---|
public AtlCompletionProposal(java.lang.String replacementString, int replacementOffset, int replacementLength, org.eclipse.swt.graphics.Image image, java.lang.String displayString, int relevance, java.lang.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 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.relevance
- the relevance of the proposaladditionalProposalInfo
- the additional informationspublic AtlCompletionProposal(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, java.lang.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 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.relevance
- the relevance of the proposaladditionalProposalInfo
- the additional informationsMethod Detail |
---|
public void apply(org.eclipse.jface.text.IDocument document)
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public 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.ITextViewer viewer, char trigger, int stateMask, int offset)
apply
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public int compareTo(AtlCompletionProposal arg0)
compareTo
in interface java.lang.Comparable<AtlCompletionProposal>
public java.lang.String getAdditionalProposalInfo()
getAdditionalProposalInfo
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 int getContextInformationPosition()
getContextInformationPosition
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public java.lang.String getDisplayString()
getDisplayString
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 org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
getInformationControlCreator
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public int getPrefixCompletionStart(org.eclipse.jface.text.IDocument document, int completionOffset)
getPrefixCompletionStart
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public java.lang.CharSequence getPrefixCompletionText(org.eclipse.jface.text.IDocument document, int completionOffset)
getPrefixCompletionText
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public int getRelevance()
public int getReplacementLength()
public int getReplacementOffset()
public java.lang.String getReplacementString()
public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
getSelection
in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public char[] getTriggerCharacters()
getTriggerCharacters
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public boolean isValidFor(org.eclipse.jface.text.IDocument document, int offset)
isValidFor
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension
public void selected(org.eclipse.jface.text.ITextViewer viewer, boolean smartToggle)
selected
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
public void setContextInformation(org.eclipse.jface.text.contentassist.IContextInformation contextInformation)
contextInformation
- The context information associated with this proposalpublic void setCursorPosition(int cursorPosition)
cursorPosition
- The cursorPosition to setpublic void setImage(org.eclipse.swt.graphics.Image image)
image
- The image to setpublic void setRelevance(int relevance)
relevance
- The relevance to setpublic void setReplacementLength(int replacementLength)
replacementLength
- The replacementLength to setpublic void setReplacementOffset(int replacementOffset)
replacementOffset
- The replacement offset to setpublic void setReplacementString(java.lang.String replacementString)
replacementString
- The replacement string to setpublic void setTriggerCharacters(char[] triggerCharacters)
triggerCharacters
- The set of characters which can trigger the application of this completion proposalprotected boolean startsWith(org.eclipse.jface.text.IDocument document, int offset, java.lang.String word)
true
if a words starts with the code completion prefix in the document,
false
otherwise.
public void unselected(org.eclipse.jface.text.ITextViewer viewer)
unselected
in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
ICompletionProposalExtension2.unselected(org.eclipse.jface.text.ITextViewer)
public void updateReplacementLength(int length)
length
- public void updateReplacementOffset(int newOffset)
newOffset
- 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
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |