Eclipse JDT
2.0

org.eclipse.jdt.ui.text
Class JavaSourceViewerConfiguration

java.lang.Object
  |
  +--org.eclipse.jface.text.source.SourceViewerConfiguration
        |
        +--org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration

public class JavaSourceViewerConfiguration
extends SourceViewerConfiguration

Configuration for a source viewer which shows Java code.

This class may be instantiated; it is not intended to be subclassed.


Field Summary
static String PREFERENCE_TAB_WIDTH
          Preference key used to look up display tab width.
static String SPACES_FOR_TABS
          Preference key for inserting spaces rather than tabs.
 
Constructor Summary
JavaSourceViewerConfiguration(JavaTextTools tools, ITextEditor editor)
          Creates a new Java source viewer configuration for viewers in the given editor using the given Java tools.
 
Method Summary
 IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer)
           
 IAutoIndentStrategy getAutoIndentStrategy(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)
           
 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.
 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 multiline comment scanner for this configuration.
protected  IPreferenceStore getPreferenceStore()
          Returns the preference store used by this configuration to initialize the individual bits and pieces.
 IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
           
 IReconciler getReconciler(ISourceViewer sourceViewer)
           
protected  RuleBasedScanner getSinglelineCommentScanner()
          Returns the Java singleline 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)
           
 
Methods inherited from class org.eclipse.jface.text.source.SourceViewerConfiguration
getUndoManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREFERENCE_TAB_WIDTH

public static final String PREFERENCE_TAB_WIDTH
Preference key used to look up display tab width.

Since:
2.0
See Also:
Constant Field Values

SPACES_FOR_TABS

public static final String SPACES_FOR_TABS
Preference key for inserting spaces rather than tabs.

Since:
2.0
See Also:
Constant Field Values
Constructor Detail

JavaSourceViewerConfiguration

public JavaSourceViewerConfiguration(JavaTextTools tools,
                                     ITextEditor editor)
Creates a new Java source viewer configuration for viewers in the given editor using the given Java tools.

Parameters:
tools - the Java tools to be used
editor - the editor in which the configured viewer(s) will reside
Method Detail

getCodeScanner

protected RuleBasedScanner getCodeScanner()
Returns the Java source code scanner for this configuration.

Returns:
the Java source code scanner

getMultilineCommentScanner

protected RuleBasedScanner getMultilineCommentScanner()
Returns the Java multiline comment scanner for this configuration.

Returns:
the Java multiline comment scanner
Since:
2.0

getSinglelineCommentScanner

protected RuleBasedScanner getSinglelineCommentScanner()
Returns the Java singleline comment scanner for this configuration.

Returns:
the Java singleline comment scanner
Since:
2.0

getStringScanner

protected RuleBasedScanner getStringScanner()
Returns the Java string scanner for this configuration.

Returns:
the Java string scanner
Since:
2.0

getJavaDocScanner

protected RuleBasedScanner getJavaDocScanner()
Returns the JavaDoc scanner for this configuration.

Returns:
the JavaDoc scanner

getColorManager

protected IColorManager getColorManager()
Returns the color manager for this configuration.

Returns:
the color manager

getEditor

protected ITextEditor getEditor()
Returns the editor in which the configured viewer(s) will reside.

Returns:
the enclosing editor

getPreferenceStore

protected IPreferenceStore getPreferenceStore()
Returns the preference store used by this configuration to initialize the individual bits and pieces.

Returns:
the preference store used to initialize this configuration
Since:
2.0

getPresentationReconciler

public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer)
Overrides:
getPresentationReconciler in class SourceViewerConfiguration

getContentAssistant

public IContentAssistant getContentAssistant(ISourceViewer sourceViewer)
Overrides:
getContentAssistant in class SourceViewerConfiguration

getReconciler

public IReconciler getReconciler(ISourceViewer sourceViewer)
Overrides:
getReconciler in class SourceViewerConfiguration

getAutoIndentStrategy

public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer,
                                                 String contentType)
Overrides:
getAutoIndentStrategy in class SourceViewerConfiguration

getDoubleClickStrategy

public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer,
                                                       String contentType)
Overrides:
getDoubleClickStrategy in class SourceViewerConfiguration

getDefaultPrefixes

public String[] getDefaultPrefixes(ISourceViewer sourceViewer,
                                   String contentType)
Overrides:
getDefaultPrefixes in class SourceViewerConfiguration

getIndentPrefixes

public String[] getIndentPrefixes(ISourceViewer sourceViewer,
                                  String contentType)
Overrides:
getIndentPrefixes in class SourceViewerConfiguration

getTabWidth

public int getTabWidth(ISourceViewer sourceViewer)
Overrides:
getTabWidth in class SourceViewerConfiguration

getAnnotationHover

public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer)
Overrides:
getAnnotationHover in class SourceViewerConfiguration

getTextHover

public ITextHover getTextHover(ISourceViewer sourceViewer,
                               String contentType)
Overrides:
getTextHover in class SourceViewerConfiguration

getConfiguredContentTypes

public String[] getConfiguredContentTypes(ISourceViewer sourceViewer)
Overrides:
getConfiguredContentTypes in class SourceViewerConfiguration

getContentFormatter

public IContentFormatter getContentFormatter(ISourceViewer sourceViewer)
Overrides:
getContentFormatter in class SourceViewerConfiguration

getInformationControlCreator

public IInformationControlCreator getInformationControlCreator(ISourceViewer sourceViewer)
Overrides:
getInformationControlCreator in class SourceViewerConfiguration

getInformationPresenter

public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer)
Overrides:
getInformationPresenter in class SourceViewerConfiguration

Eclipse JDT
2.0

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