| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.sqleditor.internal.templates.SQLTemplateProposal
public class SQLTemplateProposal
This class is refactored from TemplateProposal to support intelligence template.
| Field Summary | |
|---|---|
| static java.lang.String | KEY_SQLEDITOR | 
| Constructor Summary | |
|---|---|
| SQLTemplateProposal(SQLEditor editor,
                    org.eclipse.jface.text.templates.Template template,
                    org.eclipse.jface.text.templates.TemplateContext context,
                    org.eclipse.jface.text.IRegion region,
                    org.eclipse.swt.graphics.Image image)Creates a SQL template proposal with a template and its context. | |
| SQLTemplateProposal(SQLEditor editor,
                    org.eclipse.jface.text.templates.Template template,
                    org.eclipse.jface.text.templates.TemplateContext context,
                    org.eclipse.jface.text.IRegion region,
                    org.eclipse.swt.graphics.Image image,
                    int relevance)Creates a template proposal with a template and its context. | |
| 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)Inserts the template offered by this proposal into the viewer's document and sets up a LinkedModeUIon the viewer to edit any of the template's unresolved variables. | 
|  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()Returns the relevance. | 
|  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 | setInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator informationControlCreator)Sets the information control creator for this completion proposal. | 
|  void | unselected(org.eclipse.jface.text.ITextViewer viewer) | 
|  boolean | validate(org.eclipse.jface.text.IDocument document,
         int offset,
         org.eclipse.jface.text.DocumentEvent event) | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String KEY_SQLEDITOR
| Constructor Detail | 
|---|
public SQLTemplateProposal(SQLEditor editor,
                           org.eclipse.jface.text.templates.Template template,
                           org.eclipse.jface.text.templates.TemplateContext context,
                           org.eclipse.jface.text.IRegion region,
                           org.eclipse.swt.graphics.Image image)
template - the templatecontext - the context in which the template was requested.region - the region this proposal is applied toimage - the icon of the proposal.
public SQLTemplateProposal(SQLEditor editor,
                           org.eclipse.jface.text.templates.Template template,
                           org.eclipse.jface.text.templates.TemplateContext context,
                           org.eclipse.jface.text.IRegion region,
                           org.eclipse.swt.graphics.Image image,
                           int relevance)
template - the templatecontext - the context in which the template was requested.image - the icon of the proposal.region - the region this proposal is applied torelevance - the relevance of the proposal| Method Detail | 
|---|
public final void setInformationControlCreator(org.eclipse.jface.text.IInformationControlCreator informationControlCreator)
informationControlCreator - the information control creatorpublic final void apply(org.eclipse.jface.text.IDocument document)
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposal
public void apply(org.eclipse.jface.text.ITextViewer viewer,
                  char trigger,
                  int stateMask,
                  int offset)
LinkedModeUI
 on the viewer to edit any of the template's unresolved variables.
apply in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2viewer - trigger - stateMask - offset - public org.eclipse.swt.graphics.Point getSelection(org.eclipse.jface.text.IDocument document)
getSelection in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic java.lang.String getAdditionalProposalInfo()
getAdditionalProposalInfo in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic java.lang.String getDisplayString()
getDisplayString in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.swt.graphics.Image getImage()
getImage in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic org.eclipse.jface.text.contentassist.IContextInformation getContextInformation()
getContextInformation in interface org.eclipse.jface.text.contentassist.ICompletionProposalpublic int getRelevance()
getRelevance in interface ISQLCompletionProposalpublic org.eclipse.jface.text.IInformationControlCreator getInformationControlCreator()
getInformationControlCreator in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension3
public void selected(org.eclipse.jface.text.ITextViewer viewer,
                     boolean smartToggle)
selected in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2public void unselected(org.eclipse.jface.text.ITextViewer viewer)
unselected in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension2
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 java.lang.CharSequence getPrefixCompletionText(org.eclipse.jface.text.IDocument document,
                                                      int completionOffset)
getPrefixCompletionText 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 void apply(org.eclipse.jface.text.IDocument document,
                  char trigger,
                  int offset)
apply 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.ICompletionProposalExtensionpublic char[] getTriggerCharacters()
getTriggerCharacters in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtensionpublic int getContextInformationPosition()
getContextInformationPosition in interface org.eclipse.jface.text.contentassist.ICompletionProposalExtension| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||