|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.datatools.sqltools.sqleditor.internal.sql.SQLCompletionEngine
public class SQLCompletionEngine
This class computes proposals for text completion.
Constructor Summary | |
---|---|
SQLCompletionEngine()
Constructs an instance of this class. |
Method Summary | |
---|---|
org.eclipse.jface.text.contentassist.IContextInformation[] |
computeContextInformation(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.ITypedRegion partition,
int documentOffset,
org.eclipse.swt.graphics.Point selection)
Compute ContextInformation |
org.eclipse.jface.text.contentassist.ICompletionProposal[] |
computeProposals(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.ITypedRegion partition,
int documentOffset,
org.eclipse.swt.graphics.Point selection)
Computes and returns an array of text completion proposals based on the given document, document region, and location in the document. |
ISQLDBProposalsService |
getDBProposalsService()
Gets the current DBProposalsService . |
int |
getPartitionOffset(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.ITypedRegion partition,
int documentOffset,
int offset)
Returns the document offset to the start of the "word" where content assist is requested. |
int |
getPartitionOffset(org.eclipse.jface.text.IDocument doc,
org.eclipse.jface.text.ITypedRegion partition,
int documentOffset,
java.lang.String leadingString,
int position)
Returns the document offset to the start of the "word" where content assist is requested. |
void |
setDBProposalsService(ISQLDBProposalsService dbProposalsService)
Sets the DBProposalsService to use. |
java.util.Vector |
sortProposals(java.util.List proposals,
java.lang.String sortingString,
boolean showAll)
Sorts the given list of proposals. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SQLCompletionEngine()
Method Detail |
---|
public org.eclipse.jface.text.contentassist.ICompletionProposal[] computeProposals(org.eclipse.jface.text.IDocument doc, org.eclipse.jface.text.ITypedRegion partition, int documentOffset, org.eclipse.swt.graphics.Point selection)
computeProposals
in interface ISQLCompletionEngine
doc
- the current documentpartition
- a document partion region. A region consists of offset,
length, and type.documentOffset
- the current offset in the documentselection
- the range of the current selection in coordinates of this viewer's documentISQLCompletionEngine#computeProposals(IDocument, ITypedRegion, int,
IDBProposalsService)
public int getPartitionOffset(org.eclipse.jface.text.IDocument doc, org.eclipse.jface.text.ITypedRegion partition, int documentOffset, int offset)
doc
- the current documentpartition
- document partition region. A region consists of offset,
length, and type.documentOffset
- offset into the documentoffset
- offset in the document to start of the name preceeding the
activation characterpublic int getPartitionOffset(org.eclipse.jface.text.IDocument doc, org.eclipse.jface.text.ITypedRegion partition, int documentOffset, java.lang.String leadingString, int position)
doc
- the current documentpartition
- document partition region. A region consists of offset,
length, and type.documentOffset
- offset into the documentleadingString
- position
- 1
from current position 0
after leadingString
public java.util.Vector sortProposals(java.util.List proposals, java.lang.String sortingString, boolean showAll)
proposals
- list of proposals to be sortedsortingString
- string to be used as sorting "seed"showAll
-
public void setDBProposalsService(ISQLDBProposalsService dbProposalsService)
DBProposalsService
to use.
dbProposalsService
- the DBProposalsService
to usepublic ISQLDBProposalsService getDBProposalsService()
DBProposalsService
.
dbProposalsService
- the current DBProposalsService
.public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.IDocument doc, org.eclipse.jface.text.ITypedRegion partition, int documentOffset, org.eclipse.swt.graphics.Point selection)
ISQLCompletionEngine
computeContextInformation
in interface ISQLCompletionEngine
doc
- The documentpartition
- document partitiondocumentOffset
- current offset in the documentselection
- the range of the current selection in coordinates of this viewer's document
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |