org.eclipse.xtext.ui.editor.syntaxcoloring
Class TextAttributeProvider
java.lang.Object
org.eclipse.xtext.ui.editor.syntaxcoloring.TextAttributeProvider
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.jface.util.IPropertyChangeListener, IHighlightingConfigurationAcceptor, ITextAttributeProvider
public class TextAttributeProvider
- extends java.lang.Object
- implements ITextAttributeProvider, IHighlightingConfigurationAcceptor, org.eclipse.jface.util.IPropertyChangeListener
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextAttributeProvider
@Inject
public TextAttributeProvider(IHighlightingConfiguration highlightingConfig,
IPreferenceStoreAccess preferenceStoreAccess,
PreferenceStoreAccessor prefStoreAccessor)
getAttribute
public org.eclipse.jface.text.TextAttribute getAttribute(java.lang.String id)
- Specified by:
getAttribute
in interface ITextAttributeProvider
getMergedAttributes
public org.eclipse.jface.text.TextAttribute getMergedAttributes(java.lang.String[] ids)
- Specified by:
getMergedAttributes
in interface ITextAttributeProvider
getMergedIds
public java.lang.String getMergedIds(java.lang.String[] ids)
propertyChange
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
- Specified by:
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
acceptDefaultHighlighting
public void acceptDefaultHighlighting(java.lang.String id,
java.lang.String name,
TextStyle style)
- Description copied from interface:
IHighlightingConfigurationAcceptor
- Call this method to announce a specific default style.
Implementors may throw an
IllegalStateException
when an id is used twice.
- Specified by:
acceptDefaultHighlighting
in interface IHighlightingConfigurationAcceptor
- Parameters:
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.- See Also:
IHighlightingConfiguration.configure(IHighlightingConfigurationAcceptor)
createTextAttribute
protected org.eclipse.jface.text.TextAttribute createTextAttribute(java.lang.String id,
TextStyle defaultTextStyle)