Eclipse Platform
2.1

org.eclipse.ui.texteditor
Class SourceViewerDecorationSupport

java.lang.Object
  |
  +--org.eclipse.ui.texteditor.SourceViewerDecorationSupport

public class SourceViewerDecorationSupport
extends Object

Support for source viewer decoration.

Since:
2.1

Constructor Summary
SourceViewerDecorationSupport(ISourceViewer sourceViewer, IOverviewRuler overviewRuler, IAnnotationAccess annotationAccess, ISharedTextColors sharedTextColors)
          Creates a new decoration support for the given viewer.
 
Method Summary
 void dispose()
          Disposes this decoration support.
protected  void handlePreferenceStoreChanged(PropertyChangeEvent event)
           
 void hideAnnotationOverview()
          Hides the annotation overview.
 void install(IPreferenceStore store)
          Installs this decoration support on th given preference store.
 void setAnnotationPainterPreferenceKeys(Object type, String colorKey, String editorKey, String overviewRulerKey, int layer)
          Sets the preference keys for the annotation painter.
 void setAnnotationPreference(AnnotationPreference info)
          Sets the preference info for the annotation painter.
 void setCharacterPairMatcher(ICharacterPairMatcher pairMatcher)
          Sets the character pair matcher for the matching character painter.
 void setCursorLinePainterPreferenceKeys(String enableKey, String colorKey)
          Sets the preference keys for the cursor line painter.
 void setMarginPainterPreferenceKeys(String enableKey, String colorKey, String columnKey)
          Sets the preference keys for the margin painter.
 void setMatchingCharacterPainterPreferenceKeys(String enableKey, String colorKey)
          Sets the preference keys for the matching character painter.
 void setSymbolicFontName(String symbolicFontName)
          Sets the symbolic font name that is used for computing the margin width.
 void uninstall()
          Uninstalls this support from the preference store it has previously been installed on.
 void updateOverviewDecorations()
          Updates the annotation overview for all configured annotation types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceViewerDecorationSupport

public SourceViewerDecorationSupport(ISourceViewer sourceViewer,
                                     IOverviewRuler overviewRuler,
                                     IAnnotationAccess annotationAccess,
                                     ISharedTextColors sharedTextColors)
Creates a new decoration support for the given viewer.
Parameters:
sourceViewer - the source viewer
overviewRuler - the viewer's overview ruler
annotationAccess - the annotation access
sharedTextColors - the shared text color manager
Method Detail

install

public void install(IPreferenceStore store)
Installs this decoration support on th given preference store. It assumes that this support has completely been configured.
Parameters:
store - the preference store

updateOverviewDecorations

public void updateOverviewDecorations()
Updates the annotation overview for all configured annotation types.

uninstall

public void uninstall()
Uninstalls this support from the preference store it has previously been installed on. If there is no such preference store, this call is without effect.

dispose

public void dispose()
Disposes this decoration support. Internally calls uninstall.

setCharacterPairMatcher

public void setCharacterPairMatcher(ICharacterPairMatcher pairMatcher)
Sets the character pair matcher for the matching character painter.
Parameters:
pairMatcher -  

setAnnotationPainterPreferenceKeys

public void setAnnotationPainterPreferenceKeys(Object type,
                                               String colorKey,
                                               String editorKey,
                                               String overviewRulerKey,
                                               int layer)
Sets the preference keys for the annotation painter.
Parameters:
type - the annotation type
colorKey - the preference key for the color
editorKey - the preference key for the presentation in the text area
overviewRulerKey - the preference key for the presentation in the overview ruler
layer - the layer

setAnnotationPreference

public void setAnnotationPreference(AnnotationPreference info)
Sets the preference info for the annotation painter.
Parameters:
info - the preference info to be set

setCursorLinePainterPreferenceKeys

public void setCursorLinePainterPreferenceKeys(String enableKey,
                                               String colorKey)
Sets the preference keys for the cursor line painter.
Parameters:
enableKey - the preference key for the cursor line painter
colorKey - the preference key for the color used by the cursor line painter

setMarginPainterPreferenceKeys

public void setMarginPainterPreferenceKeys(String enableKey,
                                           String colorKey,
                                           String columnKey)
Sets the preference keys for the margin painter.
Parameters:
enableKey - the preference key for the margin painter
colorKey - the preference key for the color used by the margin painter
columnKey - the preference key for the margin column

setMatchingCharacterPainterPreferenceKeys

public void setMatchingCharacterPainterPreferenceKeys(String enableKey,
                                                      String colorKey)
Sets the preference keys for the matching character painter.
Parameters:
enableKey - the preference key for the matching character painter
colorKey - the preference key for the color used by the matching character painter

setSymbolicFontName

public void setSymbolicFontName(String symbolicFontName)
Sets the symbolic font name that is used for computing the margin width.
Parameters:
symbolicFontName -  

handlePreferenceStoreChanged

protected void handlePreferenceStoreChanged(PropertyChangeEvent event)

hideAnnotationOverview

public void hideAnnotationOverview()
Hides the annotation overview.
Parameters:
annotationType - the annotation type

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.