|
Eclipse Platform Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.texteditor.AnnotationPreference
public class AnnotationPreference
An annotation preference provides all the information required for handing
the preferences for the presentation of annotations of a specified type. The
type can be changed and retrieved using the getAnnotationType
and setAnnotationType
methods. For each preference, getter and
setter methods are provided.
Preferences that may be changed by the user also have a corresponding key
that can be used to obtain the currently set value from an
IPreferenceStore
.
Field Summary | |
---|---|
protected static java.lang.Object[] |
ATTRIBUTES
Array of all supported attributes. |
protected static java.lang.Object |
COLOR_PREFERENCE_KEY
The preference key for the presentation color. |
protected static java.lang.Object |
COLOR_PREFERENCE_VALUE
The presentation color. |
IAnnotationImageProvider |
fAnnotationImageProvider
The annotation image provider. |
java.lang.String |
fAnnotationImageProviderAttribute
The name of the attribute used to load the annotation image provider from the configuration element. |
IConfigurationElement |
fConfigurationElement
The configuration element from which to create the annotation image provider. |
protected static java.lang.Object |
HEADER_VALUE
Indicates whether the annotation type contributed to the overview ruler's header. |
protected static java.lang.Object |
HIGHLIGHT_PREFERENCE_KEY
The preference key for highlighting inside text. |
protected static java.lang.Object |
HIGHLIGHT_PREFERENCE_VALUE
The value for highlighting inside text. |
protected static java.lang.Object |
IMAGE_DESCRIPTOR
The image to be used for drawing in the vertical ruler. |
protected static java.lang.Object |
IMAGE_PROVIDER
The annotation image provider. |
protected static java.lang.Object |
INCLUDE_ON_PREFERENCE_PAGE
The value for the includeOnPreferencePage property. |
protected static java.lang.Object |
IS_GO_TO_NEXT_TARGET_KEY
The preference key for go to next navigation enablement. |
protected static java.lang.Object |
IS_GO_TO_NEXT_TARGET_VALUE
The value for go to next navigation enablement. |
protected static java.lang.Object |
IS_GO_TO_PREVIOUS_TARGET_KEY
The preference key for go to previous navigation enablement. |
protected static java.lang.Object |
IS_GO_TO_PREVIOUS_TARGET_VALUE
The value for go to previous navigation enablement. |
protected static java.lang.Object |
OVERVIEW_RULER_PREFERENCE_KEY
The preference key for the visibility in the overview ruler. |
protected static java.lang.Object |
OVERVIEW_RULER_PREFERENCE_VALUE
The visibility in the overview ruler. |
protected static java.lang.Object |
PREFERENCE_LABEL
The preference label. |
protected static java.lang.Object |
PRESENTATION_LAYER
The presentation layer. |
protected static java.lang.Object |
QUICK_FIX_IMAGE_DESCRIPTOR
The Quick Fix image to be used for drawing in the vertical ruler. |
protected static java.lang.Object |
SHOW_IN_NAVIGATION_DROPDOWN_KEY
The preference key for the visibility in the next/previous drop down toolbar action. |
protected static java.lang.Object |
SHOW_IN_NAVIGATION_DROPDOWN_VALUE
The value for the visibility in the next/previous drop down toolbar action. |
static java.lang.String |
STYLE_BOX
Constant defining box decoration for the show in text style preference. |
static java.lang.String |
STYLE_IBEAM
Constant defining i-beam decoration for the show in text style preference. |
static java.lang.String |
STYLE_NONE
Constant defining no decoration for the show in text style preference. |
static java.lang.String |
STYLE_SQUIGGLES
Constant defining squiggly decoration for the show in text style preference. |
static java.lang.String |
STYLE_UNDERLINE
Constant defining underline decoration for the show in text style preference. |
protected static java.lang.Object |
SYMBOLIC_IMAGE_NAME
The symbolic name of the image to be drawn in the vertical ruler. |
protected static java.lang.Object |
TEXT_PREFERENCE_KEY
The preference key for the visibility inside text. |
protected static java.lang.Object |
TEXT_PREFERENCE_VALUE
The visibility inside text. |
protected static java.lang.Object |
TEXT_STYLE_PREFERENCE_KEY
The preference key for the decoration style. |
protected static java.lang.Object |
TEXT_STYLE_PREFERENCE_VALUE
The value for the text decoration style. |
protected static java.lang.Object |
VERTICAL_RULER_PREFERENCE_KEY
The preference key for the visibility in the vertical ruler. |
protected static java.lang.Object |
VERTICAL_RULER_PREFERENCE_VALUE
The visibility in the vertical ruler. |
Constructor Summary | |
---|---|
AnnotationPreference()
Creates a new un-initialized annotation preference. |
|
AnnotationPreference(java.lang.Object annotationType,
java.lang.String colorKey,
java.lang.String textKey,
java.lang.String overviewRulerKey,
int presentationLayer)
Creates a new annotation preference for the given annotation type. |
Method Summary | |
---|---|
boolean |
contributesToHeader()
Returns whether the annotation type contributes to the header of the overview ruler. |
IAnnotationImageProvider |
getAnnotationImageProvider()
Returns the annotation image provider. |
java.lang.Object |
getAnnotationType()
Returns the annotation type. |
protected boolean |
getBooleanValue(java.lang.Object attribute)
Returns the value of the given attribute as boolean. |
java.lang.String |
getColorPreferenceKey()
Returns the preference key for the presentation color. |
RGB |
getColorPreferenceValue()
Returns the default presentation color. |
java.lang.String |
getHighlightPreferenceKey()
Returns the preference key for highlighting inside text. |
boolean |
getHighlightPreferenceValue()
Returns the default value for highlighting inside text. |
ImageDescriptor |
getImageDescriptor()
Returns the image descriptor for the image to be drawn in the vertical ruler. |
protected int |
getIntegerValue(java.lang.Object attribute)
Returns the value of the given attribute as integer. |
java.lang.String |
getIsGoToNextNavigationTargetKey()
Returns the preference key for go to next navigation enablement. |
java.lang.String |
getIsGoToPreviousNavigationTargetKey()
Returns the preference key for go to previous navigation enablement. |
java.lang.String |
getMarkerType()
Deprecated. since 3.0 |
java.lang.String |
getOverviewRulerPreferenceKey()
Returns the preference key for the visibility in the overview ruler. |
boolean |
getOverviewRulerPreferenceValue()
Returns the default visibility in the overview ruler. |
java.lang.String |
getPreferenceLabel()
Returns the presentation string for this annotation type. |
int |
getPresentationLayer()
Returns the presentation layer. |
ImageDescriptor |
getQuickFixImageDescriptor()
Returns the Quick Fix image descriptor for the image to be drawn in the vertical ruler. |
int |
getSeverity()
Deprecated. since 3.0 |
java.lang.String |
getShowInNextPrevDropdownToolbarActionKey()
Returns the preference key for the visibility in the next/previous drop down toolbar action. |
protected java.lang.String |
getStringValue(java.lang.Object attribute)
Returns the value of the given attribute as string. |
java.lang.String |
getSymbolicImageName()
Returns the symbolic name of the image to be drawn in the vertical ruler. |
java.lang.String |
getTextPreferenceKey()
Returns the preference key for the visibility inside text. |
boolean |
getTextPreferenceValue()
Returns the default visibility inside text. |
java.lang.String |
getTextStylePreferenceKey()
Returns the preference key for the decoration style used when the annotation is shown in text. |
java.lang.String |
getTextStyleValue()
Returns the value for the decoration style used when the annotation is shown in text. |
java.lang.Object |
getValue(java.lang.Object attribute)
Returns the value of the given attribute. |
java.lang.String |
getVerticalRulerPreferenceKey()
Returns the preference key for the visibility in the vertical ruler. |
boolean |
getVerticalRulerPreferenceValue()
Returns the default visibility in the vertical ruler. |
boolean |
hasValue(java.lang.Object attribute)
Returns whether the given attribute is defined. |
boolean |
isGoToNextNavigationTarget()
Returns the default value for go to next navigation enablement. |
boolean |
isGoToPreviousNavigationTarget()
Returns the default value for go to previous navigation enablement. |
boolean |
isIncludeOnPreferencePage()
Returns the property of the receiver of whether it should be included on the default annotation preference page. |
boolean |
isPreferenceKey(java.lang.String key)
Returns whether the given string is a preference key. |
boolean |
isShowInNextPrevDropdownToolbarAction()
Returns the default value for the visibility in the next/previous drop down toolbar action. |
void |
merge(AnnotationPreference preference)
Merges the values of the given preference into this preference. |
void |
setAnnotationImageProvider(IAnnotationImageProvider provider)
Sets the annotation image provider who provides images for annotations of the specified annotation type. |
void |
setAnnotationImageProviderData(IConfigurationElement configurationElement,
java.lang.String annotationImageProviderAttribute)
Sets the data needed to create the annotation image provider. |
void |
setAnnotationType(java.lang.Object annotationType)
Sets the annotation type. |
void |
setColorPreferenceKey(java.lang.String colorKey)
Sets the preference key for the presentation color. |
void |
setColorPreferenceValue(RGB colorValue)
Sets the default presentation color. |
void |
setContributesToHeader(boolean contributesToHeader)
Sets whether the annotation type contributes to the overview ruler's header. |
void |
setHighlightPreferenceKey(java.lang.String highlightKey)
Sets the preference key for highlighting inside text. |
void |
setHighlightPreferenceValue(boolean highlightValue)
Sets the default value for highlighting inside text. |
void |
setImageDescriptor(ImageDescriptor descriptor)
Sets the image descriptor for the image to be drawn in the vertical ruler. |
void |
setIncludeOnPreferencePage(boolean includeOnPreferencePage)
Sets the property of this annotation preference whether it should be included on the default annotation preference page. |
void |
setIsGoToNextNavigationTarget(boolean isGoToNextNavigationTarget)
Sets the default value for go to next navigation enablement. |
void |
setIsGoToNextNavigationTargetKey(java.lang.String isGoToNextNavigationTargetKey)
Sets the preference key for go to next navigation enablement. |
void |
setIsGoToPreviousNavigationTarget(boolean isGoToPreviousNavigationTarget)
Sets the default value for go to previous navigation enablement. |
void |
setIsGoToPreviousNavigationTargetKey(java.lang.String isGoToPreviousNavigationTargetKey)
Sets the preference key for go to previous navigation enablement. |
void |
setMarkerType(java.lang.String markerType)
Sets the marker type. |
void |
setOverviewRulerPreferenceKey(java.lang.String overviewRulerKey)
Sets the preference key for the visibility in the overview ruler. |
void |
setOverviewRulerPreferenceValue(boolean overviewRulerValue)
Sets the default visibility in the overview ruler. |
void |
setPreferenceLabel(java.lang.String label)
Sets the presentation label of this annotation type. |
void |
setPresentationLayer(int presentationLayer)
Sets the presentation layer. |
void |
setQuickFixImageDescriptor(ImageDescriptor descriptor)
Sets the Quick Fix image descriptor for the image to be drawn in the vertical ruler. |
void |
setSeverity(int severity)
Sets the marker severity. |
void |
setShowInNextPrevDropdownToolbarAction(boolean showInNextPrevDropdownToolbarAction)
Sets the default value for the visibility in the next/previous drop down toolbar action. |
void |
setShowInNextPrevDropdownToolbarActionKey(java.lang.String showInNextPrevDropdownToolbarActionKey)
Sets the preference key for the visibility in the next/previous drop down toolbar action. |
void |
setSymbolicImageName(java.lang.String symbolicImageName)
Sets the symbolic name of the image to be drawn in the vertical ruler. |
void |
setTextPreferenceKey(java.lang.String textKey)
Sets the preference key for the visibility of squiggles inside text. |
void |
setTextPreferenceValue(boolean textValue)
Sets the default visibility inside text. |
void |
setTextStylePreferenceKey(java.lang.String key)
Sets the preference key for the text style property. |
void |
setTextStyleValue(java.lang.String value)
Sets the value for the text style property. |
protected void |
setValue(java.lang.Object attribute,
boolean value)
Sets the given value for the given attribute. |
protected void |
setValue(java.lang.Object attribute,
int value)
Sets the given value for the given attribute. |
protected void |
setValue(java.lang.Object attribute,
java.lang.Object value)
Sets the given value for the given attribute. |
void |
setVerticalRulerPreferenceKey(java.lang.String verticalRulerKey)
Sets the preference key for the visibility in the vertical ruler. |
void |
setVerticalRulerPreferenceValue(boolean verticalRulerValue)
Sets the default visibility in the vertical ruler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STYLE_NONE
public static final java.lang.String STYLE_SQUIGGLES
public static final java.lang.String STYLE_BOX
public static final java.lang.String STYLE_UNDERLINE
public static final java.lang.String STYLE_IBEAM
protected static final java.lang.Object IMAGE_DESCRIPTOR
protected static final java.lang.Object QUICK_FIX_IMAGE_DESCRIPTOR
protected static final java.lang.Object PREFERENCE_LABEL
protected static final java.lang.Object PRESENTATION_LAYER
protected static final java.lang.Object SYMBOLIC_IMAGE_NAME
protected static final java.lang.Object HEADER_VALUE
protected static final java.lang.Object IMAGE_PROVIDER
protected static final java.lang.Object INCLUDE_ON_PREFERENCE_PAGE
protected static final java.lang.Object TEXT_PREFERENCE_KEY
protected static final java.lang.Object TEXT_PREFERENCE_VALUE
protected static final java.lang.Object COLOR_PREFERENCE_KEY
protected static final java.lang.Object COLOR_PREFERENCE_VALUE
protected static final java.lang.Object HIGHLIGHT_PREFERENCE_KEY
protected static final java.lang.Object HIGHLIGHT_PREFERENCE_VALUE
protected static final java.lang.Object IS_GO_TO_NEXT_TARGET_KEY
protected static final java.lang.Object IS_GO_TO_NEXT_TARGET_VALUE
protected static final java.lang.Object IS_GO_TO_PREVIOUS_TARGET_KEY
protected static final java.lang.Object IS_GO_TO_PREVIOUS_TARGET_VALUE
protected static final java.lang.Object VERTICAL_RULER_PREFERENCE_KEY
protected static final java.lang.Object VERTICAL_RULER_PREFERENCE_VALUE
protected static final java.lang.Object OVERVIEW_RULER_PREFERENCE_KEY
protected static final java.lang.Object OVERVIEW_RULER_PREFERENCE_VALUE
protected static final java.lang.Object SHOW_IN_NAVIGATION_DROPDOWN_KEY
protected static final java.lang.Object SHOW_IN_NAVIGATION_DROPDOWN_VALUE
protected static final java.lang.Object TEXT_STYLE_PREFERENCE_KEY
protected static final java.lang.Object TEXT_STYLE_PREFERENCE_VALUE
protected static final java.lang.Object[] ATTRIBUTES
public IAnnotationImageProvider fAnnotationImageProvider
public IConfigurationElement fConfigurationElement
public java.lang.String fAnnotationImageProviderAttribute
Constructor Detail |
---|
public AnnotationPreference()
null
annotation type are invalid and should not be
used.
public AnnotationPreference(java.lang.Object annotationType, java.lang.String colorKey, java.lang.String textKey, java.lang.String overviewRulerKey, int presentationLayer)
annotationType
- the annotation typecolorKey
- the preference key for the presentation colortextKey
- the preference key for the visibility inside textoverviewRulerKey
- the preference key for the visibility in the
overview rulerpresentationLayer
- the presentation layerMethod Detail |
---|
protected void setValue(java.lang.Object attribute, java.lang.Object value)
attribute
- the attributevalue
- the attribute valueprotected void setValue(java.lang.Object attribute, int value)
attribute
- the attributevalue
- the attribute valueprotected void setValue(java.lang.Object attribute, boolean value)
attribute
- the attributevalue
- the attribute valueprotected java.lang.String getStringValue(java.lang.Object attribute)
attribute
- the attribute
protected boolean getBooleanValue(java.lang.Object attribute)
attribute
- the attribute
protected int getIntegerValue(java.lang.Object attribute)
attribute
- the attribute
public java.lang.Object getValue(java.lang.Object attribute)
attribute
- the attribute
public boolean hasValue(java.lang.Object attribute)
attribute
- the attribute
true
if the attribute has a value false
otherwisepublic boolean isPreferenceKey(java.lang.String key)
key
- the string to test
true
if the string is a preference keypublic java.lang.Object getAnnotationType()
null
if the receiver has not
been initialized yetpublic java.lang.String getMarkerType()
null
if none is setpublic int getSeverity()
public void setAnnotationType(java.lang.Object annotationType)
null
annotation type are considered invalid and should not be used with the
framework.
annotationType
- the annotation typepublic void setMarkerType(java.lang.String markerType)
markerType
- the marker typepublic void setSeverity(int severity)
severity
- the marker severitypublic java.lang.String getColorPreferenceKey()
null
if none is setpublic RGB getColorPreferenceValue()
null
if none is
setpublic java.lang.String getPreferenceLabel()
null
if none is setpublic java.lang.String getOverviewRulerPreferenceKey()
null
if none is setpublic boolean getOverviewRulerPreferenceValue()
public java.lang.String getVerticalRulerPreferenceKey()
null
if none is setpublic boolean getVerticalRulerPreferenceValue()
public int getPresentationLayer()
public java.lang.String getTextPreferenceKey()
null
if none is setpublic boolean getTextPreferenceValue()
public java.lang.String getHighlightPreferenceKey()
null
if none is setpublic boolean getHighlightPreferenceValue()
public boolean contributesToHeader()
true
if the annotation type contributes to the header of the overview rulerpublic void setColorPreferenceKey(java.lang.String colorKey)
colorKey
- the preference keypublic void setColorPreferenceValue(RGB colorValue)
colorValue
- the default colorpublic void setPreferenceLabel(java.lang.String label)
label
- the presentation labelpublic void setOverviewRulerPreferenceKey(java.lang.String overviewRulerKey)
overviewRulerKey
- the preference keypublic void setOverviewRulerPreferenceValue(boolean overviewRulerValue)
overviewRulerValue
- true
if visible by default, false
otherwisepublic void setVerticalRulerPreferenceKey(java.lang.String verticalRulerKey)
verticalRulerKey
- the preference keypublic void setVerticalRulerPreferenceValue(boolean verticalRulerValue)
verticalRulerValue
- true
if visible by default, false
otherwisepublic void setPresentationLayer(int presentationLayer)
presentationLayer
- the presentation layerpublic void setTextPreferenceKey(java.lang.String textKey)
textKey
- the preference keypublic void setTextPreferenceValue(boolean textValue)
textValue
- true
if visible by default, false
otherwisepublic void setHighlightPreferenceKey(java.lang.String highlightKey)
highlightKey
- the preference keypublic void setHighlightPreferenceValue(boolean highlightValue)
highlightValue
- true
if highlighted in text by default, false
otherwisepublic void setContributesToHeader(boolean contributesToHeader)
contributesToHeader
- true
if in header, false
otherwisepublic boolean isGoToNextNavigationTarget()
true
if enabled by defaultpublic void setIsGoToNextNavigationTarget(boolean isGoToNextNavigationTarget)
isGoToNextNavigationTarget
- true
if enabled by defaultpublic java.lang.String getIsGoToNextNavigationTargetKey()
null
if the key is undefinedpublic void setIsGoToNextNavigationTargetKey(java.lang.String isGoToNextNavigationTargetKey)
isGoToNextNavigationTargetKey
- true
if enabled by defaultpublic boolean isGoToPreviousNavigationTarget()
true
if enabled by defaultpublic void setIsGoToPreviousNavigationTarget(boolean isGoToPreviousNavigationTarget)
isGoToPreviousNavigationTarget
- true
if enabled by defaultpublic java.lang.String getIsGoToPreviousNavigationTargetKey()
null
if the key is undefinedpublic void setIsGoToPreviousNavigationTargetKey(java.lang.String isGoToPreviousNavigationTargetKey)
isGoToPreviousNavigationTargetKey
- the preference keypublic java.lang.String getShowInNextPrevDropdownToolbarActionKey()
null
if the key is undefinedpublic void setShowInNextPrevDropdownToolbarActionKey(java.lang.String showInNextPrevDropdownToolbarActionKey)
showInNextPrevDropdownToolbarActionKey
- the preference keypublic boolean isShowInNextPrevDropdownToolbarAction()
true
if enabled by defaultpublic void setShowInNextPrevDropdownToolbarAction(boolean showInNextPrevDropdownToolbarAction)
showInNextPrevDropdownToolbarAction
- true
if enabled by defaultpublic void setTextStylePreferenceKey(java.lang.String key)
key
- the new keypublic java.lang.String getTextStylePreferenceKey()
null
if the key is undefinedpublic java.lang.String getTextStyleValue()
null
if the key is undefinedpublic void setTextStyleValue(java.lang.String value)
value
- the new text decoration stylepublic ImageDescriptor getImageDescriptor()
getAnnotationImageProvider
returns null
.
null
public void setImageDescriptor(ImageDescriptor descriptor)
descriptor
- the image descriptorpublic java.lang.String getSymbolicImageName()
getImageDescriptor
returns null
.
null
public void setSymbolicImageName(java.lang.String symbolicImageName)
symbolicImageName
- the symbolic image namepublic IAnnotationImageProvider getAnnotationImageProvider()
public void setAnnotationImageProvider(IAnnotationImageProvider provider)
provider
- the annotation image providerpublic void setAnnotationImageProviderData(IConfigurationElement configurationElement, java.lang.String annotationImageProviderAttribute)
configurationElement
- the configuration elementannotationImageProviderAttribute
- the attribute of the
configuration elementpublic void setIncludeOnPreferencePage(boolean includeOnPreferencePage)
includeOnPreferencePage
- the new valuepublic boolean isIncludeOnPreferencePage()
public void merge(AnnotationPreference preference)
preference
- the preference to merge into this preferencepublic void setQuickFixImageDescriptor(ImageDescriptor descriptor)
descriptor
- the image descriptorpublic ImageDescriptor getQuickFixImageDescriptor()
getAnnotationImageProvider
returns null
.
null
|
Eclipse Platform Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.