org.eclipse.m2m.atl.adt.ui.text
Class AtlSourceViewerConfiguration

java.lang.Object
  extended by org.eclipse.jface.text.source.SourceViewerConfiguration
      extended by org.eclipse.m2m.atl.adt.ui.text.AtlSourceViewerConfiguration

public class AtlSourceViewerConfiguration
extends 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.


Constructor Summary
AtlSourceViewerConfiguration(AtlTextTools tools, org.eclipse.ui.texteditor.ITextEditor editor)
          Creates a new instance of the configurator.
 
Method Summary
 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.
 org.eclipse.jface.text.source.IAnnotationHover getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 org.eclipse.jface.text.IAutoEditStrategy[] getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
           
 AtlColorManager getColorManager()
          Gets the color manager stored in the text tools.
 org.eclipse.jface.text.contentassist.IContentAssistant getContentAssistant(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
protected  org.eclipse.ui.texteditor.ITextEditor getEditor()
          Returns the editor in which the configured viewer(s) will reside.
 org.eclipse.jface.text.contentassist.IContentAssistProcessor getFProcessor()
           
 java.lang.String[] getIndentPrefixes(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
           
 org.eclipse.jface.preference.IPreferenceStore getPreferenceStore()
          Gets the preference fPreferenceeStore stored in the text tools.
 org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
           
 org.eclipse.jface.text.ITextHover getTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
           
 AtlTextTools getTextTools()
          Gets the text tools associated to this configurator.
 void handlePropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent event)
          Adapts the behavior of the contained components to the change encoded in the given event.
 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.
 
Methods inherited from class org.eclipse.jface.text.source.SourceViewerConfiguration
getAutoIndentStrategy, getConfiguredContentTypes, getConfiguredDocumentPartitioning, getConfiguredTextHoverStateMasks, getContentFormatter, getDefaultPrefixes, getDoubleClickStrategy, getHyperlinkDetectors, getHyperlinkPresenter, getHyperlinkStateMask, getIndentPrefixesForTab, getInformationControlCreator, getInformationPresenter, getOverviewRulerAnnotationHover, getQuickAssistAssistant, getReconciler, getTabWidth, getTextHover, getUndoManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
true if 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:
getAutoEditStrategies in class org.eclipse.jface.text.source.SourceViewerConfiguration

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:
getContentAssistant in class org.eclipse.jface.text.source.SourceViewerConfiguration

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:
getIndentPrefixes in class org.eclipse.jface.text.source.SourceViewerConfiguration

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:
getPresentationReconciler in class org.eclipse.jface.text.source.SourceViewerConfiguration

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:
getAnnotationHover in class org.eclipse.jface.text.source.SourceViewerConfiguration

getTextHover

public org.eclipse.jface.text.ITextHover getTextHover(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                                      java.lang.String contentType)
Overrides:
getTextHover in class org.eclipse.jface.text.source.SourceViewerConfiguration

getFProcessor

public org.eclipse.jface.text.contentassist.IContentAssistProcessor getFProcessor()

Copyright 2007 IBM Corporation and others.
All Rights Reserved.