public class JavaScriptTextTools
extends java.lang.Object
This class may be instantiated; it is not intended to be subclassed.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.Constructor and Description |
---|
JavaScriptTextTools(IPreferenceStore store)
Creates a new JavaScript text tools collection.
|
JavaScriptTextTools(IPreferenceStore store,
boolean autoDisposeOnDisplayDispose)
Creates a new JavaScript text tools collection.
|
JavaScriptTextTools(IPreferenceStore store,
Preferences coreStore)
Creates a new JavaScript text tools collection.
|
JavaScriptTextTools(IPreferenceStore store,
Preferences coreStore,
boolean autoDisposeOnDisplayDispose)
Creates a new JavaScript text tools collection.
|
Modifier and Type | Method and Description |
---|---|
protected void |
adaptToPreferenceChange(PropertyChangeEvent event)
Deprecated.
As of 3.0, no replacement
|
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.
|
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.
|
IPartitionTokenScanner |
getPartitionScanner()
Returns a scanner which is configured to scan
Java-specific partitions, which are multi-line comments,
Javadoc comments, and regular JavaScript source code.
|
protected IPreferenceStore |
getPreferenceStore()
Returns this text tool's preference store.
|
void |
setupJavaDocumentPartitioner(IDocument document)
Sets up the JavaScript document partitioner for the given document for the default partitioning.
|
void |
setupJavaDocumentPartitioner(IDocument document,
java.lang.String partitioning)
Sets up the JavaScript document partitioner for the given document for the given partitioning.
|
public JavaScriptTextTools(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 JavaScriptTextTools(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 org.eclipse.jface.text.source.ISharedTextColors#dispose()
are ignored.PreferenceConstants.getPreferenceStore()
public JavaScriptTextTools(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 JavaScriptTextTools(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 org.eclipse.jface.text.source.ISharedTextColors#dispose()
are ignored.PreferenceConstants.getPreferenceStore()
public void dispose()
public IColorManager getColorManager()
Clients which are only interested in the color manager of the JavaScript UI
plug-in should use JavaScriptUI.getColorManager()
.
JavaScriptUI.getColorManager()
public IPartitionTokenScanner getPartitionScanner()
public IDocumentPartitioner createDocumentPartitioner()
protected 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, java.lang.String partitioning)
document
- the document to be set uppartitioning
- the document partitioningprotected IPreferenceStore getPreferenceStore()
protected Preferences getCorePreferenceStore()
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.