it.uniroma3.plasm.editors
Class PlasmSourceViewerConfiguration

java.lang.Object
  extended byorg.eclipse.jface.text.source.SourceViewerConfiguration
      extended byit.uniroma3.plasm.editors.PlasmSourceViewerConfiguration

public class PlasmSourceViewerConfiguration
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.

Author:
EcT(o)PLaSM Group

Constructor Summary
PlasmSourceViewerConfiguration(PlasmColorProvider colorProvider)
          Default constructor: it only associate the internal color provider with a PLaSM color provider
 
Method Summary
 java.lang.String[] getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Default getter for the ConfiguredContentTypes from sourceViewer
 org.eclipse.jface.text.ITextDoubleClickStrategy getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer, java.lang.String contentType)
          Default getter for the doubleClickStyrategy associated with PLaSM environment
 org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
          Define the Presentation Reconciler.
 
Methods inherited from class org.eclipse.jface.text.source.SourceViewerConfiguration
getAnnotationHover, getAutoIndentStrategy, getConfiguredDocumentPartitioning, getConfiguredTextHoverStateMasks, getContentAssistant, getContentFormatter, getDefaultPrefixes, getIndentPrefixes, getInformationControlCreator, getInformationPresenter, getOverviewRulerAnnotationHover, getReconciler, getTabWidth, getTextHover, getTextHover, getUndoManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlasmSourceViewerConfiguration

public PlasmSourceViewerConfiguration(PlasmColorProvider colorProvider)
Default constructor: it only associate the internal color provider with a PLaSM color provider

Parameters:
colorProvider - a color provider with PLaSM colors
Method Detail

getConfiguredContentTypes

public java.lang.String[] getConfiguredContentTypes(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Default getter for the ConfiguredContentTypes from sourceViewer

Parameters:
sourceViewer - the SourceViewer associated with current editor
Returns:
the different PLaSM partition types (comments or code)

getDoubleClickStrategy

public org.eclipse.jface.text.ITextDoubleClickStrategy getDoubleClickStrategy(org.eclipse.jface.text.source.ISourceViewer sourceViewer,
                                                                              java.lang.String contentType)
Default getter for the doubleClickStyrategy associated with PLaSM environment

Returns:
the doubleClickStrategy object in use

getPresentationReconciler

public org.eclipse.jface.text.presentation.IPresentationReconciler getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer sourceViewer)
Define the Presentation Reconciler. A Reconceiler monitors the changes to the text through its associated viewer. It uses the document's regions to determine the content types affected by the change and notifies a damager that is appropriate for the affected content type. Once the damage is computed, it is passed to the appropriate repairer which will construct repair descriptions that are applied to the viewer to put it back in sync with the underlying content.