public class JavaSourceViewerConfiguration extends TextSourceViewerConfiguration
This class may be instantiated; it is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFERENCE_TAB_WIDTH
Deprecated.
As of 3.0, replaced by
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH |
static String |
SPACES_FOR_TABS
Deprecated.
as of 3.1 use
DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR |
fPreferenceStore| Constructor and Description |
|---|
JavaSourceViewerConfiguration(IColorManager colorManager,
IPreferenceStore preferenceStore,
ITextEditor editor,
String partitioning)
Creates a new Java source viewer configuration for viewers in the given editor
using the given preference store, the color manager and the specified document partitioning.
|
JavaSourceViewerConfiguration(JavaTextTools tools,
ITextEditor editor)
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration(IColorManager, IPreferenceStore, ITextEditor, String) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
affectsTextPresentation(PropertyChangeEvent event)
Determines whether the preference change encoded by the given event
changes the behavior of one of its contained components.
|
IAnnotationHover |
getAnnotationHover(ISourceViewer sourceViewer) |
IAutoEditStrategy[] |
getAutoEditStrategies(ISourceViewer sourceViewer,
String contentType) |
protected RuleBasedScanner |
getCodeScanner()
Returns the Java source code scanner for this configuration.
|
protected IColorManager |
getColorManager()
Returns the color manager for this configuration.
|
String[] |
getConfiguredContentTypes(ISourceViewer sourceViewer) |
String |
getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) |
int[] |
getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer,
String contentType) |
IContentAssistant |
getContentAssistant(ISourceViewer sourceViewer) |
IContentFormatter |
getContentFormatter(ISourceViewer sourceViewer) |
String[] |
getDefaultPrefixes(ISourceViewer sourceViewer,
String contentType) |
ITextDoubleClickStrategy |
getDoubleClickStrategy(ISourceViewer sourceViewer,
String contentType) |
protected ITextEditor |
getEditor()
Returns the editor in which the configured viewer(s) will reside.
|
IInformationPresenter |
getHierarchyPresenter(ISourceViewer sourceViewer,
boolean doCodeResolve)
Returns the hierarchy presenter which will determine and shown type hierarchy
information requested for the current cursor position.
|
IHyperlinkDetector[] |
getHyperlinkDetectors(ISourceViewer sourceViewer) |
String[] |
getIndentPrefixes(ISourceViewer sourceViewer,
String contentType) |
IInformationControlCreator |
getInformationControlCreator(ISourceViewer sourceViewer) |
IInformationPresenter |
getInformationPresenter(ISourceViewer sourceViewer) |
protected RuleBasedScanner |
getJavaDocScanner()
Returns the JavaDoc scanner for this configuration.
|
protected RuleBasedScanner |
getMultilineCommentScanner()
Returns the Java multi-line comment scanner for this configuration.
|
IInformationPresenter |
getOutlinePresenter(ISourceViewer sourceViewer,
boolean doCodeResolve)
Returns the outline presenter which will determine and shown
information requested for the current cursor position.
|
IAnnotationHover |
getOverviewRulerAnnotationHover(ISourceViewer sourceViewer) |
protected IPreferenceStore |
getPreferenceStore()
Deprecated.
As of 3.0
|
IPresentationReconciler |
getPresentationReconciler(ISourceViewer sourceViewer) |
IQuickAssistAssistant |
getQuickAssistAssistant(ISourceViewer sourceViewer) |
IReconciler |
getReconciler(ISourceViewer sourceViewer) |
protected RuleBasedScanner |
getSinglelineCommentScanner()
Returns the Java single-line comment scanner for this configuration.
|
protected RuleBasedScanner |
getStringScanner()
Returns the Java string scanner for this configuration.
|
int |
getTabWidth(ISourceViewer sourceViewer) |
ITextHover |
getTextHover(ISourceViewer sourceViewer,
String contentType) |
ITextHover |
getTextHover(ISourceViewer sourceViewer,
String contentType,
int stateMask) |
void |
handlePropertyChangeEvent(PropertyChangeEvent event)
Adapts the behavior of the contained components to the change
encoded in the given event.
|
computeStateMask, findLocalizedModifier, getHyperlinkPresenter, getHyperlinkStateMask, getUndoManager, isShowInOverviewRuler, isShowInVerticalRuler, isShownInTextgetAutoIndentStrategypublic static final String PREFERENCE_TAB_WIDTH
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTHpublic static final String SPACES_FOR_TABS
DefaultCodeFormatterConstants.FORMATTER_TAB_CHARpublic JavaSourceViewerConfiguration(IColorManager colorManager, IPreferenceStore preferenceStore, ITextEditor editor, String partitioning)
Creates a Java source viewer configuration in the new setup without text tools. Clients are
allowed to call handlePropertyChangeEvent(PropertyChangeEvent)
and disallowed to call getPreferenceStore() on the resulting
Java source viewer configuration.
colorManager - the color managerpreferenceStore - the preference store, can be read-onlyeditor - the editor in which the configured viewer(s) will reside, or null if nonepartitioning - the document partitioning for this configuration, or null for the default partitioningpublic JavaSourceViewerConfiguration(JavaTextTools tools, ITextEditor editor)
JavaSourceViewerConfiguration(IColorManager, IPreferenceStore, ITextEditor, String)tools - the Java text tools to be usededitor - the editor in which the configured viewer(s) will reside, or null if noneJavaTextToolsprotected RuleBasedScanner getCodeScanner()
protected RuleBasedScanner getMultilineCommentScanner()
protected RuleBasedScanner getSinglelineCommentScanner()
protected RuleBasedScanner getStringScanner()
protected RuleBasedScanner getJavaDocScanner()
protected IColorManager getColorManager()
protected ITextEditor getEditor()
protected IPreferenceStore getPreferenceStore()
Clients are not allowed to call this method if the new setup without text tools is in use.
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
getPresentationReconciler in class SourceViewerConfigurationpublic IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
getContentAssistant in class SourceViewerConfigurationpublic IQuickAssistAssistant getQuickAssistAssistant(ISourceViewer sourceViewer)
getQuickAssistAssistant in class SourceViewerConfigurationpublic IReconciler getReconciler(ISourceViewer sourceViewer)
getReconciler in class SourceViewerConfigurationpublic IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType)
getAutoEditStrategies in class SourceViewerConfigurationpublic ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType)
getDoubleClickStrategy in class SourceViewerConfigurationpublic String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType)
getDefaultPrefixes in class SourceViewerConfigurationpublic String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType)
getIndentPrefixes in class SourceViewerConfigurationpublic int getTabWidth(ISourceViewer sourceViewer)
getTabWidth in class TextSourceViewerConfigurationpublic IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer)
getAnnotationHover in class TextSourceViewerConfigurationpublic IAnnotationHover getOverviewRulerAnnotationHover(ISourceViewer sourceViewer)
getOverviewRulerAnnotationHover in class TextSourceViewerConfigurationpublic int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType)
getConfiguredTextHoverStateMasks in class TextSourceViewerConfigurationpublic ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask)
getTextHover in class SourceViewerConfigurationpublic ITextHover getTextHover(ISourceViewer sourceViewer, String contentType)
getTextHover in class TextSourceViewerConfigurationpublic String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
getConfiguredContentTypes in class SourceViewerConfigurationpublic String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer)
getConfiguredDocumentPartitioning in class SourceViewerConfigurationpublic IContentFormatter getContentFormatter(ISourceViewer sourceViewer)
getContentFormatter in class SourceViewerConfigurationpublic IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer)
getInformationControlCreator in class SourceViewerConfigurationpublic IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer)
getInformationPresenter in class SourceViewerConfigurationpublic IInformationPresenter getOutlinePresenter(ISourceViewer sourceViewer, boolean doCodeResolve)
sourceViewer - the source viewer to be configured by this configurationdoCodeResolve - a boolean which specifies whether code resolve should be used to compute the Java elementpublic IInformationPresenter getHierarchyPresenter(ISourceViewer sourceViewer, boolean doCodeResolve)
sourceViewer - the source viewer to be configured by this configurationdoCodeResolve - a boolean which specifies whether code resolve should be used to compute the Java elementpublic boolean affectsTextPresentation(PropertyChangeEvent event)
event - the event to be investigatedtrue if event causes a behavioral changepublic void handlePropertyChangeEvent(PropertyChangeEvent event)
Clients are not allowed to call this method if the old setup with text tools is in use.
event - the event to which to adaptJavaSourceViewerConfiguration(IColorManager, IPreferenceStore, ITextEditor, String)public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer)
getHyperlinkDetectors in class TextSourceViewerConfigurationCopyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.