org.eclipse.datatools.sqltools.sqleditor.internal.sql
Class SQLCompletionProposal
java.lang.Object
org.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionProposal
- All Implemented Interfaces:
- ISQLCompletionProposal, org.eclipse.jface.text.contentassist.ICompletionProposal
public class SQLCompletionProposal
- extends java.lang.Object
- implements ISQLCompletionProposal
- Author:
- Li Huang
|
Constructor Summary |
SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
java.lang.String additionalProposalInfo,
int relevance)
Creates a new completion proposal. |
SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
java.lang.String additionalProposalInfo,
int relevance,
org.eclipse.jface.action.IAction postAction)
Creates a new completion proposal. |
SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
int relevance)
Creates a new completion proposal based on the provided information. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEMPLATE
public static final int TEMPLATE
- See Also:
- Constant Field Values
OPERATOR
public static final int OPERATOR
- See Also:
- Constant Field Values
OTHER
public static final int OTHER
- See Also:
- Constant Field Values
KEYWORD
public static final int KEYWORD
- See Also:
- Constant Field Values
UNRESERVEDKEYWORD
public static final int UNRESERVEDKEYWORD
- See Also:
- Constant Field Values
DATABASE
public static final int DATABASE
- See Also:
- Constant Field Values
TABLE
public static final int TABLE
- See Also:
- Constant Field Values
STORED_PROCEDURE
public static final int STORED_PROCEDURE
- See Also:
- Constant Field Values
FUNCTION
public static final int FUNCTION
- See Also:
- Constant Field Values
TRIGGER
public static final int TRIGGER
- See Also:
- Constant Field Values
EVENT
public static final int EVENT
- See Also:
- Constant Field Values
COLUMN
public static final int COLUMN
- See Also:
- Constant Field Values
VARIABLE
public static final int VARIABLE
- See Also:
- Constant Field Values
TEMPTABLE_TEMPLATE
public static final int TEMPTABLE_TEMPLATE
- See Also:
- Constant Field Values
SQLCompletionProposal
public SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
int relevance)
- Creates a new completion proposal based on the provided information. The replacement string is considered being
the display string too. All remaining fields are set to
null.
- Parameters:
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 replacementOffsetrelevance - the relevance for the proposal
SQLCompletionProposal
public SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
java.lang.String additionalProposalInfo,
int relevance)
- Creates a new completion proposal. All fields are initialized based on the provided information.
- Parameters:
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 proposalrelevance - the relevance for the proposal
SQLCompletionProposal
public SQLCompletionProposal(java.lang.String replacementString,
int replacementOffset,
int replacementLength,
int cursorPosition,
org.eclipse.swt.graphics.Image image,
java.lang.String displayString,
org.eclipse.jface.text.contentassist.IContextInformation contextInformation,
java.lang.String additionalProposalInfo,
int relevance,
org.eclipse.jface.action.IAction postAction)
- Creates a new completion proposal. All fields are initialized based on the provided information.
- Parameters:
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 proposalrelevance - the relevance for the proposalpostAction - the action to be performed after the completion proposal is applied
apply
public void apply(org.eclipse.jface.text.IDocument document)
- Specified by:
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getSelection
public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
- Specified by:
getSelection in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getContextInformation
public org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
- Specified by:
getContextInformation in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImage in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getDisplayString
public java.lang.String getDisplayString()
- Specified by:
getDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getAdditionalProposalInfo
public java.lang.String getAdditionalProposalInfo()
- Specified by:
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposal
getRelevance
public int getRelevance()
- Description copied from interface:
ISQLCompletionProposal
- Returns the relevance of this completion proposal.
The relevance is used to determine if this proposal is more
relevant than another proposal.
- Specified by:
getRelevance in interface ISQLCompletionProposal
- Returns:
- Returns the _relevance.
setRelevance
public void setRelevance(int relevance)
- Parameters:
_relevance - The Relevance to set.