Package org.eclipse.m2m.atl.adt.ui.text
Class AtlSourceViewerConfiguration
- java.lang.Object
-
- org.eclipse.jface.text.source.SourceViewerConfiguration
-
- org.eclipse.ui.editors.text.TextSourceViewerConfiguration
-
- org.eclipse.m2m.atl.adt.ui.text.AtlSourceViewerConfiguration
-
public class AtlSourceViewerConfiguration extends org.eclipse.ui.editors.text.TextSourceViewerConfigurationThis class bundles the whole configuration space of a source viewer. Instances of this class are passed to the configure method of ISourceViewer.
-
-
Constructor Summary
Constructors Constructor Description AtlSourceViewerConfiguration(AtlTextTools tools, org.eclipse.ui.texteditor.ITextEditor editor)Creates a new instance of the configurator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaffectsTextPresentation(org.eclipse.jface.util.PropertyChangeEvent event)Determines whether the preference change encoded by the given event changes the behavior of one of its contained components.org.eclipse.jface.text.source.IAnnotationHovergetAnnotationHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer)org.eclipse.jface.text.IAutoEditStrategy[]getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)AtlColorManagergetColorManager()Gets the color manager stored in the text tools.org.eclipse.jface.text.contentassist.IContentAssistProcessorgetCompletionProcessor()org.eclipse.jface.text.contentassist.IContentAssistantgetContentAssistant(org.eclipse.jface.text.source.ISourceViewer sourceViewer)java.lang.String[]getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)org.eclipse.jface.text.ITextDoubleClickStrategygetDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)protected org.eclipse.ui.texteditor.ITextEditorgetEditor()Returns the editor in which the configured viewer(s) will reside.protected java.util.MapgetHyperlinkDetectorTargets(org.eclipse.jface.text.source.ISourceViewer sourceViewer)java.lang.String[]getIndentPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)org.eclipse.jface.preference.IPreferenceStoregetPreferenceStore()Gets the preference fPreferenceeStore stored in the text tools.org.eclipse.jface.text.presentation.IPresentationReconcilergetPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)org.eclipse.jface.text.reconciler.IReconcilergetReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)org.eclipse.jface.text.ITextHovergetTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)AtlTextToolsgetTextTools()Gets the text tools associated to this configurator.voidhandlePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent event)Adapts the behavior of the contained components to the change encoded in the given event.voidsetNewPreferenceStore(org.eclipse.jface.preference.IPreferenceStore preferenceStore)Sets the preference fPreferenceeStore used by this configuration to initialize the individual bits and pieces to the given preference fPreferenceeStore.-
Methods inherited from class org.eclipse.ui.editors.text.TextSourceViewerConfiguration
computeStateMask, findLocalizedModifier, getConfiguredTextHoverStateMasks, getHyperlinkDetectors, getHyperlinkPresenter, getHyperlinkStateMask, getOverviewRulerAnnotationHover, getQuickAssistAssistant, getRegisteredHyperlinkDetectors, getTabWidth, getUndoManager, isShowInOverviewRuler, isShowInVerticalRuler, isShownInText
-
Methods inherited from class org.eclipse.jface.text.source.SourceViewerConfiguration
getAutoIndentStrategy, getCodeMiningProviders, getConfiguredContentTypes, getConfiguredDocumentPartitioning, getContentFormatter, getIndentPrefixesForTab, getInformationControlCreator, getInformationPresenter, getTextHover
-
-
-
-
Constructor Detail
-
AtlSourceViewerConfiguration
public AtlSourceViewerConfiguration(AtlTextTools tools, org.eclipse.ui.texteditor.ITextEditor editor)
Creates a new instance of the configurator.- Parameters:
editor- the editor in which the configured viewer(s) will reside
-
-
Method Detail
-
affectsTextPresentation
public boolean affectsTextPresentation(org.eclipse.jface.util.PropertyChangeEvent event)
Determines whether the preference change encoded by the given event changes the behavior of one of its contained components.- Parameters:
event- the event to be investigated- Returns:
trueif event causes a behavioral change
-
getAutoEditStrategies
public org.eclipse.jface.text.IAutoEditStrategy[] getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)- Overrides:
getAutoEditStrategiesin classorg.eclipse.jface.text.source.SourceViewerConfiguration- See Also:
SourceViewerConfiguration.getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-
getColorManager
public AtlColorManager getColorManager()
Gets the color manager stored in the text tools.- Returns:
- the color manager
-
getContentAssistant
public org.eclipse.jface.text.contentassist.IContentAssistant getContentAssistant(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Overrides:
getContentAssistantin classorg.eclipse.jface.text.source.SourceViewerConfiguration- See Also:
SourceViewerConfiguration.getContentAssistant(org.eclipse.jface.text.source.ISourceViewer)
-
getCompletionProcessor
public org.eclipse.jface.text.contentassist.IContentAssistProcessor getCompletionProcessor()
-
getEditor
protected org.eclipse.ui.texteditor.ITextEditor getEditor()
Returns the editor in which the configured viewer(s) will reside.- Returns:
- the enclosing editor
-
getIndentPrefixes
public java.lang.String[] getIndentPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)- Overrides:
getIndentPrefixesin classorg.eclipse.ui.editors.text.TextSourceViewerConfiguration- See Also:
TextSourceViewerConfiguration.getIndentPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-
getPreferenceStore
public org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()
Gets the preference fPreferenceeStore stored in the text tools.- Returns:
- the preference fPreferenceeStore
-
getPresentationReconciler
public org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Overrides:
getPresentationReconcilerin classorg.eclipse.jface.text.source.SourceViewerConfiguration- See Also:
SourceViewerConfiguration.getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
-
getTextTools
public AtlTextTools getTextTools()
Gets the text tools associated to this configurator.- Returns:
- the text tools
-
handlePropertyChangeEvent
public void handlePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent event)
Adapts the behavior of the contained components to the change encoded in the given event.- Parameters:
event- the event to which to adapt
-
setNewPreferenceStore
public void setNewPreferenceStore(org.eclipse.jface.preference.IPreferenceStore preferenceStore)
Sets the preference fPreferenceeStore used by this configuration to initialize the individual bits and pieces to the given preference fPreferenceeStore.- Parameters:
preferenceStore- the preference fPreferenceeStore to initialize this configuration
-
getAnnotationHover
public org.eclipse.jface.text.source.IAnnotationHover getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Overrides:
getAnnotationHoverin classorg.eclipse.ui.editors.text.TextSourceViewerConfiguration- See Also:
TextSourceViewerConfiguration.getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
-
getReconciler
public org.eclipse.jface.text.reconciler.IReconciler getReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Overrides:
getReconcilerin classorg.eclipse.ui.editors.text.TextSourceViewerConfiguration- See Also:
SourceViewerConfiguration.getReconciler(org.eclipse.jface.text.source.ISourceViewer)
-
getHyperlinkDetectorTargets
protected java.util.Map getHyperlinkDetectorTargets(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
- Overrides:
getHyperlinkDetectorTargetsin classorg.eclipse.ui.editors.text.TextSourceViewerConfiguration- See Also:
TextSourceViewerConfiguration.getHyperlinkDetectorTargets(org.eclipse.jface.text.source.ISourceViewer)
-
getDefaultPrefixes
public java.lang.String[] getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)- Overrides:
getDefaultPrefixesin classorg.eclipse.jface.text.source.SourceViewerConfiguration- See Also:
SourceViewerConfiguration.getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-
getTextHover
public org.eclipse.jface.text.ITextHover getTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)- Overrides:
getTextHoverin classorg.eclipse.ui.editors.text.TextSourceViewerConfiguration- See Also:
TextSourceViewerConfiguration.getTextHover(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-
getDoubleClickStrategy
public org.eclipse.jface.text.ITextDoubleClickStrategy getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)- Overrides:
getDoubleClickStrategyin classorg.eclipse.jface.text.source.SourceViewerConfiguration- See Also:
org.eclipse.ui.editors.text.SourceViewerConfiguration#getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
-
-