public class TextAttributeProvider extends java.lang.Object implements ITextAttributeProvider, IHighlightingConfigurationAcceptor, org.eclipse.jface.util.IPropertyChangeListener
Constructor and Description |
---|
TextAttributeProvider(IHighlightingConfiguration highlightingConfig,
IPreferenceStoreAccess preferenceStoreAccess,
PreferenceStoreAccessor prefStoreAccessor) |
Modifier and Type | Method and Description |
---|---|
void |
acceptDefaultHighlighting(java.lang.String id,
java.lang.String name,
TextStyle style)
Call this method to announce a specific default style.
|
protected org.eclipse.jface.text.TextAttribute |
createTextAttribute(java.lang.String id,
TextStyle defaultTextStyle) |
org.eclipse.jface.text.TextAttribute |
getAttribute(java.lang.String id) |
org.eclipse.jface.text.TextAttribute |
getMergedAttributes(java.lang.String[] ids) |
java.lang.String |
getMergedIds(java.lang.String[] ids) |
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) |
@Inject public TextAttributeProvider(IHighlightingConfiguration highlightingConfig, IPreferenceStoreAccess preferenceStoreAccess, PreferenceStoreAccessor prefStoreAccessor)
public org.eclipse.jface.text.TextAttribute getAttribute(java.lang.String id)
getAttribute
in interface ITextAttributeProvider
public org.eclipse.jface.text.TextAttribute getMergedAttributes(java.lang.String[] ids)
getMergedAttributes
in interface ITextAttributeProvider
public java.lang.String getMergedIds(java.lang.String[] ids)
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
public void acceptDefaultHighlighting(java.lang.String id, java.lang.String name, TextStyle style)
IHighlightingConfigurationAcceptor
IllegalStateException
when an id is used twice.acceptDefaultHighlighting
in interface IHighlightingConfigurationAcceptor
id
- the unique id that should be associated with the given style.name
- the human readable name of the style.style
- the default style with the given id and name.IHighlightingConfiguration.configure(IHighlightingConfigurationAcceptor)
protected org.eclipse.jface.text.TextAttribute createTextAttribute(java.lang.String id, TextStyle defaultTextStyle)