|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.source.SourceViewerConfiguration
This class bundles the whole configuration space of a source viewer.
Instances of this class are passed to the configure
method of
ISourceViewer
.
Each method in this class get as argument the source viewer for which it should provide a particular configurational setting such as a presentation reconciler. Based on its specific knowlegde about the returned object, the configuration might share such objects or compute them according to some rules.
Clients should subclass and override just those methods which must be specific to their needs.
ISourceViewer
Constructor Summary | |
SourceViewerConfiguration()
Creates a new source viewer configuration that behaves according to specification of this class' methods. |
Method Summary | |
IAnnotationHover |
getAnnotationHover(ISourceViewer sourceViewer)
Returns the annotation hover which will provide the information to be shown in a hover popup window when requested for the given source viewer.This implementation always returns null . |
IAutoIndentStrategy |
getAutoIndentStrategy(ISourceViewer sourceViewer,
String contentType)
Returns the auto indentation strategy ready to be used with the given source viewer when manipulating text of the given content type. |
String[] |
getConfiguredContentTypes(ISourceViewer sourceViewer)
Returns all configured content types for the given source viewer. |
IContentAssistant |
getContentAssistant(ISourceViewer sourceViewer)
Returns the content assistant ready to be used with the given source viewer. |
IContentFormatter |
getContentFormatter(ISourceViewer sourceViewer)
Returns the content formatter ready to be used with the given source viewer. |
String[] |
getDefaultPrefixes(ISourceViewer sourceViewer,
String contentType)
Returns the default prefixes to be used by the line-prefix operation in the given source viewer for text of the given content type. |
ITextDoubleClickStrategy |
getDoubleClickStrategy(ISourceViewer sourceViewer,
String contentType)
Returns the double-click strategy ready to be used in this viewer when double clicking onto text of the given content type. |
String[] |
getIndentPrefixes(ISourceViewer sourceViewer,
String contentType)
Returns the prefixes to be used by the line-shift operation. |
IInformationControlCreator |
getInformationControlCreator(ISourceViewer sourceViewer)
Returns the information control creator. |
IInformationPresenter |
getInformationPresenter(ISourceViewer sourceViewer)
Returns the information presenter which will determine and shown information requested for the current cursor position. |
IPresentationReconciler |
getPresentationReconciler(ISourceViewer sourceViewer)
Returns the presentation reconciler ready to be used with the given source viewer. |
IReconciler |
getReconciler(ISourceViewer sourceViewer)
Returns the reconciler ready to be used with the given source viewer. |
int |
getTabWidth(ISourceViewer sourceViewer)
Returns the visual width of the tab character. |
ITextHover |
getTextHover(ISourceViewer sourceViewer,
String contentType)
Returns the text hover which will provide the information to be shown in a text hover popup window when requested for the given source viewer and the given content type. |
IUndoManager |
getUndoManager(ISourceViewer sourceViewer)
Returns the undo manager for the given source viewer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SourceViewerConfiguration()
Method Detail |
public int getTabWidth(ISourceViewer sourceViewer)
sourceViewer
- the source viewer to be configured by this configuration
public IUndoManager getUndoManager(ISourceViewer sourceViewer)
DefaultUndoManager
whose
history length is set to 25.
sourceViewer
- the source viewer to be configured by this configuration
null
public IReconciler getReconciler(ISourceViewer sourceViewer)
null
.
sourceViewer
- the source viewer to be configured by this configuration
null
if reconciling should not be supportedpublic IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
null
.
null
if presentation reconciling should not be supportedpublic IContentFormatter getContentFormatter(ISourceViewer sourceViewer)
null
.
sourceViewer
- the source viewer to be configured by this configuration
null
if formatting should not be supportedpublic IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
null
.
sourceViewer
- the source viewer to be configured by this configuration
null
if content assist should not be supportedpublic IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer, String contentType)
DefaultAutoIndentStrategy
.
sourceViewer
- the source viewer to be configured by this configurationcontentType
- the content type for which the strategy is applicable
null
if automatic indentation is not to be enabledpublic String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType)
null
.
sourceViewer
- the source viewer to be configured by this configurationcontentType
- the content type for which the prefix is applicable
null
if the prefix operation should not be supportedpublic ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType)
DefaultTextDoubleClickStrategy
.
sourceViewer
- the source viewer to be configured by this configurationcontentType
- the content type for which the strategy is applicable
null
if double clicking should not be supportedpublic String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType)
new String[] { "\t", " " }
.
sourceViewer
- the source viewer to be configured by this configurationcontentType
- the content type for which the prefix is applicable
null
if the prefix operation should not be supportedpublic IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer)
null
.
sourceViewer
- the source viewer to be configured by this configuration
null
if no hover support should be installedpublic ITextHover getTextHover(ISourceViewer sourceViewer, String contentType)
null
.
sourceViewer
- the source viewer to be configured by this configurationcontentType
- the content type
null
if no hover support should be installedpublic IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer)
DefaultInformationControl
instances.
sourceViewer
- the source viewer to be configured by this configuration
null
if no information support should be installedpublic IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer)
null
.
sourceViewer
- the source viewer to be configured by this configuration
null
if no information presenter should be installedpublic String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
new String[] { IDocument.DEFAULT_CONTENT_TYPE }
.
sourceViewer
- the source viewer to be configured by this configuration
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |