public class JavaTextTools extends Object
This class may be instantiated; it is not intended to be subclassed.
| Constructor and Description |
|---|
JavaTextTools(IPreferenceStore store)
Creates a new Java text tools collection.
|
JavaTextTools(IPreferenceStore store,
boolean autoDisposeOnDisplayDispose)
Creates a new Java text tools collection.
|
JavaTextTools(IPreferenceStore store,
Preferences coreStore)
Creates a new Java text tools collection.
|
JavaTextTools(IPreferenceStore store,
Preferences coreStore,
boolean autoDisposeOnDisplayDispose)
Creates a new Java text tools collection.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
adaptToPreferenceChange(PropertyChangeEvent event)
Deprecated.
As of 3.0, no replacement
|
boolean |
affectsBehavior(PropertyChangeEvent event)
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.affectsTextPresentation(PropertyChangeEvent) |
IDocumentPartitioner |
createDocumentPartitioner()
Factory method for creating a Java-specific document partitioner
using this object's partitions scanner.
|
void |
dispose()
Disposes all the individual tools of this tools collection.
|
RuleBasedScanner |
getCodeScanner()
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.getCodeScanner() |
IColorManager |
getColorManager()
Returns the color manager which is used to manage
any Java-specific colors needed for such things like syntax highlighting.
|
protected Preferences |
getCorePreferenceStore()
Returns this text tool's core preference store.
|
RuleBasedScanner |
getJavaDocScanner()
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.getJavaDocScanner() |
RuleBasedScanner |
getMultilineCommentScanner()
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.getMultilineCommentScanner() |
String[] |
getPartitionManagingPositionCategories()
Deprecated.
As of 3.0, replaced by
TextUtilities.computePartitionManagingCategories(IDocument) |
IPartitionTokenScanner |
getPartitionScanner()
Returns a scanner which is configured to scan
Java-specific partitions, which are multi-line comments,
Javadoc comments, and regular Java source code.
|
protected IPreferenceStore |
getPreferenceStore()
Returns this text tool's preference store.
|
RuleBasedScanner |
getSinglelineCommentScanner()
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.getSinglelineCommentScanner() |
RuleBasedScanner |
getStringScanner()
Deprecated.
As of 3.0, replaced by
JavaSourceViewerConfiguration.getStringScanner() |
void |
setupJavaDocumentPartitioner(IDocument document)
Sets up the Java document partitioner for the given document for the default partitioning.
|
void |
setupJavaDocumentPartitioner(IDocument document,
String partitioning)
Sets up the Java document partitioner for the given document for the given partitioning.
|
public JavaTextTools(IPreferenceStore store)
store - the preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store. In general PreferenceConstants.
getPreferenceStore() should be used to initialize the text tools.PreferenceConstants.getPreferenceStore()public JavaTextTools(IPreferenceStore store, boolean autoDisposeOnDisplayDispose)
store - the preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store. In general PreferenceConstants.
getPreferenceStore() should be used to initialize the text tools.autoDisposeOnDisplayDispose - if true the color manager
automatically disposes all managed colors when the current display gets disposed
and all calls to ISharedTextColors.dispose() are ignored.PreferenceConstants.getPreferenceStore()public JavaTextTools(IPreferenceStore store, Preferences coreStore)
store - the preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store. In general PreferenceConstants.
getPreferenceStore() should be used to initialize the text tools.coreStore - optional preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store.PreferenceConstants.getPreferenceStore()public JavaTextTools(IPreferenceStore store, Preferences coreStore, boolean autoDisposeOnDisplayDispose)
store - the preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store. In general PreferenceConstants.
getPreferenceStore() should be used to initialize the text tools.coreStore - optional preference store to initialize the text tools. The text tool
instance installs a listener on the passed preference store to adapt itself to
changes in the preference store.autoDisposeOnDisplayDispose - if true the color manager
automatically disposes all managed colors when the current display gets disposed
and all calls to ISharedTextColors.dispose() are ignored.PreferenceConstants.getPreferenceStore()public void dispose()
public IColorManager getColorManager()
Clients which are only interested in the color manager of the Java UI
plug-in should use JavaUI.getColorManager().
JavaUI.getColorManager()public RuleBasedScanner getCodeScanner()
JavaSourceViewerConfiguration.getCodeScanner()public RuleBasedScanner getMultilineCommentScanner()
JavaSourceViewerConfiguration.getMultilineCommentScanner()public RuleBasedScanner getSinglelineCommentScanner()
JavaSourceViewerConfiguration.getSinglelineCommentScanner()public RuleBasedScanner getStringScanner()
JavaSourceViewerConfiguration.getStringScanner()public RuleBasedScanner getJavaDocScanner()
JavaSourceViewerConfiguration.getJavaDocScanner()Note that the start sequence "/**" and the corresponding end sequence are part of the Javadoc comment.
public IPartitionTokenScanner getPartitionScanner()
public IDocumentPartitioner createDocumentPartitioner()
public String[] getPartitionManagingPositionCategories()
TextUtilities.computePartitionManagingCategories(IDocument)
If the partitioners don't use document position categories, the returned
result is null.
null if there is nonepublic boolean affectsBehavior(PropertyChangeEvent event)
JavaSourceViewerConfiguration.affectsTextPresentation(PropertyChangeEvent)event - the event to be investigatedtrue if event causes a behavioral changeprotected void adaptToPreferenceChange(PropertyChangeEvent event)
event - the event to which to adaptpublic void setupJavaDocumentPartitioner(IDocument document)
document - the document to be set uppublic void setupJavaDocumentPartitioner(IDocument document, String partitioning)
document - the document to be set uppartitioning - the document partitioningprotected IPreferenceStore getPreferenceStore()
protected Preferences getCorePreferenceStore()
Copyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.