|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.texteditor.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 Object[] |
ATTRIBUTES
Array of all supported attributes. |
protected static Object |
COLOR_PREFERENCE_KEY
The preference key for the presentation color. |
protected static Object |
COLOR_PREFERENCE_VALUE
The presentation color. |
IAnnotationImageProvider |
fAnnotationImageProvider
The annotation image provider. |
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 Object |
HEADER_VALUE
Indicates whether the annotation type contributed to the overview ruler's header. |
protected static Object |
HIGHLIGHT_PREFERENCE_KEY
The preference key for highlighting inside text. |
protected static Object |
HIGHLIGHT_PREFERENCE_VALUE
The value for highlighting inside text. |
protected static Object |
IMAGE_DESCRIPTOR
The image to be used for drawing in the vertical ruler. |
protected static Object |
IMAGE_PROVIDER
The annotation image provider. |
protected static Object |
INCLUDE_ON_PREFERENCE_PAGE
The value for the includeOnPreferencePage property. |
protected static Object |
IS_GO_TO_NEXT_TARGET_KEY
The preference key for go to next navigation enablement. |
protected static Object |
IS_GO_TO_NEXT_TARGET_VALUE
The value for go to next navigation enablement. |
protected static Object |
IS_GO_TO_PREVIOUS_TARGET_KEY
The preference key for go to previous navigation enablement. |
protected static Object |
IS_GO_TO_PREVIOUS_TARGET_VALUE
The value for go to previous navigation enablement. |
protected static Object |
OVERVIEW_RULER_PREFERENCE_KEY
The preference key for the visibility in the overview ruler. |
protected static Object |
OVERVIEW_RULER_PREFERENCE_VALUE
The visibility in the overview ruler. |
protected static Object |
PREFERENCE_LABEL
The preference label. |
protected static Object |
PRESENTATION_LAYER
The presentation layer. |
protected static Object |
SHOW_IN_NAVIGATION_DROPDOWN_KEY
The preference key for the visibility in the next/previous drop down toolbar action. |
protected static Object |
SHOW_IN_NAVIGATION_DROPDOWN_VALUE
The value for the visibility in the next/previous drop down toolbar action. |
static String |
STYLE_BOX
Constant defining box decoration for the show in text style preference. |
static String |
STYLE_IBEAM
Constant defining i-beam decoration for the show in text style preference. |
static String |
STYLE_NONE
Constant defining no decoration for the show in text style preference. |
static String |
STYLE_SQUIGGLES
Constant defining squiggly decoration for the show in text style preference. |
static String |
STYLE_UNDERLINE
Constant defining underline decoration for the show in text style preference. |
protected static Object |
SYMBOLIC_IMAGE_NAME
The symbolic name of the image to be drawn in the vertical ruler. |
protected static Object |
TEXT_PREFERENCE_KEY
The preference key for the visibility inside text. |
protected static Object |
TEXT_PREFERENCE_VALUE
The visibility inside text. |
protected static Object |
TEXT_STYLE_PREFERENCE_KEY
The preference key for the decoration style. |
protected static Object |
TEXT_STYLE_PREFERENCE_VALUE
The value for the text decoration style. |
protected static Object |
VERTICAL_RULER_PREFERENCE_KEY
The preference key for the visibility in the vertical ruler. |
protected static Object |
VERTICAL_RULER_PREFERENCE_VALUE
The visibility in the vertical ruler. |
Constructor Summary | |
---|---|
AnnotationPreference()
Creates a new un-initialized annotation preference. |
|
AnnotationPreference(Object annotationType,
String colorKey,
String textKey,
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. |
Object |
getAnnotationType()
Returns the annotation type. |
protected boolean |
getBooleanValue(Object attribute)
Returns the value of the given attribute as boolean. |
String |
getColorPreferenceKey()
Returns the preference key for the presentation color. |
RGB |
getColorPreferenceValue()
Returns the default presentation color. |
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(Object attribute)
Returns the value of the given attribute as integer. |
String |
getIsGoToNextNavigationTargetKey()
Returns the preference key for go to next navigation enablement. |
String |
getIsGoToPreviousNavigationTargetKey()
Returns the preference key for go to previous navigation enablement. |
String |
getMarkerType()
Deprecated. since 3.0 |
String |
getOverviewRulerPreferenceKey()
Returns the preference key for the visibility in the overview ruler. |
boolean |
getOverviewRulerPreferenceValue()
Returns the default visibility in the overview ruler. |
String |
getPreferenceLabel()
Returns the presentation string for this annotation type. |
int |
getPresentationLayer()
Returns the presentation layer. |
int |
getSeverity()
Deprecated. since 3.0 |
String |
getShowInNextPrevDropdownToolbarActionKey()
Returns the preference key for the visibility in the next/previous drop down toolbar action. |
protected String |
getStringValue(Object attribute)
Returns the value of the given attribute as string. |
String |
getSymbolicImageName()
Returns the symbolic name of the image to be drawn in the vertical ruler. |
String |
getTextPreferenceKey()
Returns the preference key for the visibility inside text. |
boolean |
getTextPreferenceValue()
Returns the default visibility inside text. |
String |
getTextStylePreferenceKey()
Returns the preference key for the decoration style used when the annotation is shown in text. |
String |
getTextStyleValue()
Returns the value for the decoration style used when the annotation is shown in text. |
Object |
getValue(Object attribute)
Returns the value of the given attribute. |
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(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(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,
String annotationImageProviderAttribute)
Sets the data needed to create the annotation image provider. |
void |
setAnnotationType(Object annotationType)
Sets the annotation type. |
void |
setColorPreferenceKey(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(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(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(String isGoToPreviousNavigationTargetKey)
Sets the preference key for go to previous navigation enablement. |
void |
setMarkerType(String markerType)
Sets the marker type. |
void |
setOverviewRulerPreferenceKey(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(String label)
Sets the presentation label of this annotation type. |
void |
setPresentationLayer(int presentationLayer)
Sets the presentation layer. |
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(String showInNextPrevDropdownToolbarActionKey)
Sets the preference key for the visibility in the next/previous drop down toolbar action. |
void |
setSymbolicImageName(String symbolicImageName)
Sets the symbolic name of the image to be drawn in the vertical ruler. |
void |
setTextPreferenceKey(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(String key)
Sets the preference key for the text style property. |
void |
setTextStyleValue(String value)
Sets the value for the text style property. |
protected void |
setValue(Object attribute,
boolean value)
Sets the given value for the given attribute. |
protected void |
setValue(Object attribute,
int value)
Sets the given value for the given attribute. |
protected void |
setValue(Object attribute,
Object value)
Sets the given value for the given attribute. |
void |
setVerticalRulerPreferenceKey(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 String STYLE_NONE
public static final String STYLE_SQUIGGLES
public static final String STYLE_BOX
public static final String STYLE_UNDERLINE
public static final String STYLE_IBEAM
protected static final Object IMAGE_DESCRIPTOR
protected static final Object PREFERENCE_LABEL
protected static final Object PRESENTATION_LAYER
protected static final Object SYMBOLIC_IMAGE_NAME
protected static final Object HEADER_VALUE
protected static final Object IMAGE_PROVIDER
protected static final Object INCLUDE_ON_PREFERENCE_PAGE
protected static final Object TEXT_PREFERENCE_KEY
protected static final Object TEXT_PREFERENCE_VALUE
protected static final Object COLOR_PREFERENCE_KEY
protected static final Object COLOR_PREFERENCE_VALUE
protected static final Object HIGHLIGHT_PREFERENCE_KEY
protected static final Object HIGHLIGHT_PREFERENCE_VALUE
protected static final Object IS_GO_TO_NEXT_TARGET_KEY
protected static final Object IS_GO_TO_NEXT_TARGET_VALUE
protected static final Object IS_GO_TO_PREVIOUS_TARGET_KEY
protected static final Object IS_GO_TO_PREVIOUS_TARGET_VALUE
protected static final Object VERTICAL_RULER_PREFERENCE_KEY
protected static final Object VERTICAL_RULER_PREFERENCE_VALUE
protected static final Object OVERVIEW_RULER_PREFERENCE_KEY
protected static final Object OVERVIEW_RULER_PREFERENCE_VALUE
protected static final Object SHOW_IN_NAVIGATION_DROPDOWN_KEY
protected static final Object SHOW_IN_NAVIGATION_DROPDOWN_VALUE
protected static final Object TEXT_STYLE_PREFERENCE_KEY
protected static final Object TEXT_STYLE_PREFERENCE_VALUE
protected static final Object[] ATTRIBUTES
public IAnnotationImageProvider fAnnotationImageProvider
public IConfigurationElement fConfigurationElement
public String fAnnotationImageProviderAttribute
Constructor Detail |
public AnnotationPreference()
null
annotation type are invalid and should not be
used.
public AnnotationPreference(Object annotationType, String colorKey, String textKey, 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(Object attribute, Object value)
attribute
- the attributevalue
- the attribute valueprotected void setValue(Object attribute, int value)
attribute
- the attributevalue
- the attribute valueprotected void setValue(Object attribute, boolean value)
attribute
- the attributevalue
- the attribute valueprotected String getStringValue(Object attribute)
attribute
- the attribute
protected boolean getBooleanValue(Object attribute)
attribute
- the attribute
protected int getIntegerValue(Object attribute)
attribute
- the attribute
public Object getValue(Object attribute)
attribute
- the attribute
public boolean hasValue(Object attribute)
attribute
- the attribute
true
if the attribute has a value false
otherwisepublic boolean isPreferenceKey(String key)
key
- the string to test
true
if the string is a preference keypublic Object getAnnotationType()
null
if the receiver has not
been initialized yetpublic String getMarkerType()
null
if none is setpublic int getSeverity()
public void setAnnotationType(Object annotationType)
null
annotation type are considered invalid and should not be used with the
framework.
annotationType
- the annotation typepublic void setMarkerType(String markerType)
markerType
- the marker typepublic void setSeverity(int severity)
severity
- the marker severitypublic String getColorPreferenceKey()
null
if none is setpublic RGB getColorPreferenceValue()
null
if none is
setpublic String getPreferenceLabel()
null
if none is setpublic String getOverviewRulerPreferenceKey()
null
if none is setpublic boolean getOverviewRulerPreferenceValue()
public String getVerticalRulerPreferenceKey()
null
if none is setpublic boolean getVerticalRulerPreferenceValue()
public int getPresentationLayer()
public String getTextPreferenceKey()
null
if none is setpublic boolean getTextPreferenceValue()
public 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(String colorKey)
colorKey
- the preference keypublic void setColorPreferenceValue(RGB colorValue)
colorValue
- the default colorpublic void setPreferenceLabel(String label)
label
- the presentation labelpublic void setOverviewRulerPreferenceKey(String overviewRulerKey)
overviewRulerKey
- the preference keypublic void setOverviewRulerPreferenceValue(boolean overviewRulerValue)
overviewRulerValue
- true
if visible by default, false
otherwisepublic void setVerticalRulerPreferenceKey(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(String textKey)
textKey
- the preference keypublic void setTextPreferenceValue(boolean textValue)
textValue
- true
if visible by default, false
otherwisepublic void setHighlightPreferenceKey(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 String getIsGoToNextNavigationTargetKey()
null
if the key is undefinedpublic void setIsGoToNextNavigationTargetKey(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 String getIsGoToPreviousNavigationTargetKey()
null
if the key is undefinedpublic void setIsGoToPreviousNavigationTargetKey(String isGoToPreviousNavigationTargetKey)
isGoToPreviousNavigationTargetKey
- the preference keypublic String getShowInNextPrevDropdownToolbarActionKey()
null
if the key is undefinedpublic void setShowInNextPrevDropdownToolbarActionKey(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(String key)
key
- the new keypublic String getTextStylePreferenceKey()
null
if the key is undefinedpublic String getTextStyleValue()
null
if the key is undefinedpublic void setTextStyleValue(String value)
value
- the new text decoration stylepublic ImageDescriptor getImageDescriptor()
getAnnotationImageProvider
returns null
.
null
public void setImageDescriptor(ImageDescriptor descriptor)
descriptor
- the image descriptorpublic String getSymbolicImageName()
getImageDescriptor
returns null
.
null
public void setSymbolicImageName(String symbolicImageName)
symbolicImageName
- the symbolic image namepublic IAnnotationImageProvider getAnnotationImageProvider()
public void setAnnotationImageProvider(IAnnotationImageProvider provider)
provider
- the annotation image providerpublic void setAnnotationImageProviderData(IConfigurationElement configurationElement, 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 preference
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.