Package org.eclipse.ui.texteditor
Class AnnotationPreference
- java.lang.Object
-
- org.eclipse.ui.texteditor.AnnotationPreference
-
public class AnnotationPreference extends Object
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 thegetAnnotationTypeandsetAnnotationTypemethods. 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.The following annotation preferences are covered:
Display Preferences controlling how and where annotations are shown
- as text background highlighting (and respective preference key),
- as text decorations (and respective preference key),
- on the overview ruler (and respective preference key),
- on the overview ruler header,
- on the vertical ruler (and respective preference key),
Additional Display Preferences
- the base color for annotations of this type (and respective preference key),
- the style of text decorations that are drawn (and respective preference key),
- the annotation image provider,
- the quick fix image descriptor,
- the image descriptor,
- the symbolic image name,
- the presentation layer.
Navigation Preferences
- whether included in the "Go to Next Annotation" navigation action (and respective preference key),
- whether included in the "Go to Previous Annotation" navigation action (and respective preference key),
- whether to be shown in the "Go to Next/Previous Annotation" navigation toolbar drop down (and respective preference key).
Preference Page Preferences
- whether the annotation type should be included on the generic annotation preference page,
- preference label.
- Since:
- 2.1
-
-
Field Summary
Fields Modifier and Type Field Description protected static Object[]ATTRIBUTESArray of all supported attributes.protected static ObjectCOLOR_PREFERENCE_KEYThe preference key for the presentation color.protected static ObjectCOLOR_PREFERENCE_VALUEThe presentation color.IAnnotationImageProviderfAnnotationImageProviderThe annotation image provider.StringfAnnotationImageProviderAttributeThe name of the attribute used to load the annotation image provider from the configuration element.IConfigurationElementfConfigurationElementThe configuration element from which to create the annotation image provider.protected static ObjectHEADER_VALUEIndicates whether the annotation type contributed to the overview ruler's header.protected static ObjectHIGHLIGHT_PREFERENCE_KEYThe preference key for highlighting inside text.protected static ObjectHIGHLIGHT_PREFERENCE_VALUEThe value for highlighting inside text.protected static ObjectIMAGE_DESCRIPTORThe image to be used for drawing in the vertical ruler.protected static ObjectIMAGE_PROVIDERThe annotation image provider.protected static ObjectINCLUDE_ON_PREFERENCE_PAGEThe value for the includeOnPreferencePage property.protected static ObjectIS_GO_TO_NEXT_TARGET_KEYThe preference key for go to next navigation enablement.protected static ObjectIS_GO_TO_NEXT_TARGET_VALUEThe value for go to next navigation enablement.protected static ObjectIS_GO_TO_PREVIOUS_TARGET_KEYThe preference key for go to previous navigation enablement.protected static ObjectIS_GO_TO_PREVIOUS_TARGET_VALUEThe value for go to previous navigation enablement.protected static ObjectOVERVIEW_RULER_PREFERENCE_KEYThe preference key for the visibility in the overview ruler.protected static ObjectOVERVIEW_RULER_PREFERENCE_VALUEThe visibility in the overview ruler.protected static ObjectPREFERENCE_LABELThe preference label.protected static ObjectPRESENTATION_LAYERThe presentation layer.protected static ObjectQUICK_FIX_IMAGE_DESCRIPTORThe Quick Fix image to be used for drawing in the vertical ruler.protected static ObjectSHOW_IN_NAVIGATION_DROPDOWN_KEYThe preference key for the visibility in the next/previous drop down toolbar action.protected static ObjectSHOW_IN_NAVIGATION_DROPDOWN_VALUEThe value for the visibility in the next/previous drop down toolbar action.static StringSTYLE_BOXConstant defining box decoration for the show in text style preference.static StringSTYLE_DASHED_BOXConstant defining dashed box decoration for the show in text style preference.static StringSTYLE_IBEAMConstant defining i-beam decoration for the show in text style preference.static StringSTYLE_NONEConstant defining no decoration for the show in text style preference.static StringSTYLE_PROBLEM_UNDERLINEConstant defining the native problem underline decoration for the show in text style preference.static StringSTYLE_SQUIGGLESConstant defining squiggly decoration for the show in text style preference.static StringSTYLE_UNDERLINEConstant defining underline decoration for the show in text style preference.protected static ObjectSYMBOLIC_IMAGE_NAMEThe symbolic name of the image to be drawn in the vertical ruler.protected static ObjectTEXT_PREFERENCE_KEYThe preference key for the visibility inside text.protected static ObjectTEXT_PREFERENCE_VALUEThe visibility inside text.protected static ObjectTEXT_STYLE_PREFERENCE_KEYThe preference key for the decoration style.protected static ObjectTEXT_STYLE_PREFERENCE_VALUEThe value for the text decoration style.protected static ObjectVERTICAL_RULER_PREFERENCE_KEYThe preference key for the visibility in the vertical ruler.protected static ObjectVERTICAL_RULER_PREFERENCE_VALUEThe visibility in the vertical ruler.
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontributesToHeader()Returns whether the annotation type contributes to the header of the overview ruler.IAnnotationImageProvidergetAnnotationImageProvider()Returns the annotation image provider.ObjectgetAnnotationType()Returns the annotation type.protected booleangetBooleanValue(Object attribute)Returns the value of the given attribute as boolean.StringgetColorPreferenceKey()Returns the preference key for the presentation color.RGBgetColorPreferenceValue()Returns the default presentation color.StringgetHighlightPreferenceKey()Returns the preference key for highlighting inside text.booleangetHighlightPreferenceValue()Returns the default value for highlighting inside text.ImageDescriptorgetImageDescriptor()Returns the image descriptor for the image to be drawn in the vertical ruler.protected intgetIntegerValue(Object attribute)Returns the value of the given attribute as integer.StringgetIsGoToNextNavigationTargetKey()Returns the preference key for go to next navigation enablement.StringgetIsGoToPreviousNavigationTargetKey()Returns the preference key for go to previous navigation enablement.StringgetMarkerType()Deprecated.since 3.0StringgetOverviewRulerPreferenceKey()Returns the preference key for the visibility in the overview ruler.booleangetOverviewRulerPreferenceValue()Returns the default visibility in the overview ruler.StringgetPreferenceLabel()Returns the presentation string for this annotation type.intgetPresentationLayer()Returns the presentation layer.ImageDescriptorgetQuickFixImageDescriptor()Returns the Quick Fix image descriptor for the image to be drawn in the vertical ruler.intgetSeverity()Deprecated.since 3.0StringgetShowInNextPrevDropdownToolbarActionKey()Returns the preference key for the visibility in the next/previous drop down toolbar action.protected StringgetStringValue(Object attribute)Returns the value of the given attribute as string.StringgetSymbolicImageName()Returns the symbolic name of the image to be drawn in the vertical ruler.StringgetTextPreferenceKey()Returns the preference key for the visibility inside text.booleangetTextPreferenceValue()Returns the default visibility inside text.StringgetTextStylePreferenceKey()Returns the preference key for the decoration style used when the annotation is shown in text.StringgetTextStyleValue()Returns the value for the decoration style used when the annotation is shown in text.ObjectgetValue(Object attribute)Returns the value of the given attribute.StringgetVerticalRulerPreferenceKey()Returns the preference key for the visibility in the vertical ruler.booleangetVerticalRulerPreferenceValue()Returns the default visibility in the vertical ruler.booleanhasValue(Object attribute)Returns whether the given attribute is defined.booleanisGoToNextNavigationTarget()Returns the default value for go to next navigation enablement.booleanisGoToPreviousNavigationTarget()Returns the default value for go to previous navigation enablement.booleanisIncludeOnPreferencePage()Returns the property of the receiver of whether it should be included on the default annotation preference page.booleanisPreferenceKey(String key)Returns whether the given string is a preference key.booleanisShowInNextPrevDropdownToolbarAction()Returns the default value for the visibility in the next/previous drop down toolbar action.voidmerge(AnnotationPreference preference)Merges the values of the given preference into this preference.voidsetAnnotationImageProvider(IAnnotationImageProvider provider)Sets the annotation image provider who provides images for annotations of the specified annotation type.voidsetAnnotationImageProviderData(IConfigurationElement configurationElement, String annotationImageProviderAttribute)Sets the data needed to create the annotation image provider.voidsetAnnotationType(Object annotationType)Sets the annotation type.voidsetColorPreferenceKey(String colorKey)Sets the preference key for the presentation color.voidsetColorPreferenceValue(RGB colorValue)Sets the default presentation color.voidsetContributesToHeader(boolean contributesToHeader)Sets whether the annotation type contributes to the overview ruler's header.voidsetHighlightPreferenceKey(String highlightKey)Sets the preference key for highlighting inside text.voidsetHighlightPreferenceValue(boolean highlightValue)Sets the default value for highlighting inside text.voidsetImageDescriptor(ImageDescriptor descriptor)Sets the image descriptor for the image to be drawn in the vertical ruler.voidsetIncludeOnPreferencePage(boolean includeOnPreferencePage)Sets the property of this annotation preference whether it should be included on the default annotation preference page.voidsetIsGoToNextNavigationTarget(boolean isGoToNextNavigationTarget)Sets the default value for go to next navigation enablement.voidsetIsGoToNextNavigationTargetKey(String isGoToNextNavigationTargetKey)Sets the preference key for go to next navigation enablement.voidsetIsGoToPreviousNavigationTarget(boolean isGoToPreviousNavigationTarget)Sets the default value for go to previous navigation enablement.voidsetIsGoToPreviousNavigationTargetKey(String isGoToPreviousNavigationTargetKey)Sets the preference key for go to previous navigation enablement.voidsetMarkerType(String markerType)Sets the marker type.voidsetOverviewRulerPreferenceKey(String overviewRulerKey)Sets the preference key for the visibility in the overview ruler.voidsetOverviewRulerPreferenceValue(boolean overviewRulerValue)Sets the default visibility in the overview ruler.voidsetPreferenceLabel(String label)Sets the presentation label of this annotation type.voidsetPresentationLayer(int presentationLayer)Sets the presentation layer.voidsetQuickFixImageDescriptor(ImageDescriptor descriptor)Sets the Quick Fix image descriptor for the image to be drawn in the vertical ruler.voidsetSeverity(int severity)Sets the marker severity.voidsetShowInNextPrevDropdownToolbarAction(boolean showInNextPrevDropdownToolbarAction)Sets the default value for the visibility in the next/previous drop down toolbar action.voidsetShowInNextPrevDropdownToolbarActionKey(String showInNextPrevDropdownToolbarActionKey)Sets the preference key for the visibility in the next/previous drop down toolbar action.voidsetSymbolicImageName(String symbolicImageName)Sets the symbolic name of the image to be drawn in the vertical ruler.voidsetTextPreferenceKey(String textKey)Sets the preference key for the visibility of squiggles inside text.voidsetTextPreferenceValue(boolean textValue)Sets the default visibility inside text.voidsetTextStylePreferenceKey(String key)Sets the preference key for the text style property.voidsetTextStyleValue(String value)Sets the value for the text style property.protected voidsetValue(Object attribute, boolean value)Sets the given value for the given attribute.protected voidsetValue(Object attribute, int value)Sets the given value for the given attribute.protected voidsetValue(Object attribute, Object value)Sets the given value for the given attribute.voidsetVerticalRulerPreferenceKey(String verticalRulerKey)Sets the preference key for the visibility in the vertical ruler.voidsetVerticalRulerPreferenceValue(boolean verticalRulerValue)Sets the default visibility in the vertical ruler.
-
-
-
Field Detail
-
STYLE_NONE
public static final String STYLE_NONE
Constant defining no decoration for the show in text style preference.- Since:
- 3.0
- See Also:
- Constant Field Values
-
STYLE_SQUIGGLES
public static final String STYLE_SQUIGGLES
Constant defining squiggly decoration for the show in text style preference.- Since:
- 3.0
- See Also:
- Constant Field Values
-
STYLE_PROBLEM_UNDERLINE
public static final String STYLE_PROBLEM_UNDERLINE
Constant defining the native problem underline decoration for the show in text style preference.The look of this style is platform dependent.
- Since:
- 3.4
- See Also:
- Constant Field Values
-
STYLE_BOX
public static final String STYLE_BOX
Constant defining box decoration for the show in text style preference.- Since:
- 3.0
- See Also:
- Constant Field Values
-
STYLE_DASHED_BOX
public static final String STYLE_DASHED_BOX
Constant defining dashed box decoration for the show in text style preference.- Since:
- 3.3
- See Also:
- Constant Field Values
-
STYLE_UNDERLINE
public static final String STYLE_UNDERLINE
Constant defining underline decoration for the show in text style preference.- Since:
- 3.0
- See Also:
- Constant Field Values
-
STYLE_IBEAM
public static final String STYLE_IBEAM
Constant defining i-beam decoration for the show in text style preference.- Since:
- 3.0
- See Also:
- Constant Field Values
-
IMAGE_DESCRIPTOR
protected static final Object IMAGE_DESCRIPTOR
The image to be used for drawing in the vertical ruler.- Since:
- 3.0
-
QUICK_FIX_IMAGE_DESCRIPTOR
protected static final Object QUICK_FIX_IMAGE_DESCRIPTOR
The Quick Fix image to be used for drawing in the vertical ruler.- Since:
- 3.2
-
PREFERENCE_LABEL
protected static final Object PREFERENCE_LABEL
The preference label.- Since:
- 3.0
-
PRESENTATION_LAYER
protected static final Object PRESENTATION_LAYER
The presentation layer.- Since:
- 3.0
-
SYMBOLIC_IMAGE_NAME
protected static final Object SYMBOLIC_IMAGE_NAME
The symbolic name of the image to be drawn in the vertical ruler.- Since:
- 3.0
-
HEADER_VALUE
protected static final Object HEADER_VALUE
Indicates whether the annotation type contributed to the overview ruler's header.- Since:
- 3.0
-
IMAGE_PROVIDER
protected static final Object IMAGE_PROVIDER
The annotation image provider.- Since:
- 3.0
-
INCLUDE_ON_PREFERENCE_PAGE
protected static final Object INCLUDE_ON_PREFERENCE_PAGE
The value for the includeOnPreferencePage property.- Since:
- 3.0
-
TEXT_PREFERENCE_KEY
protected static final Object TEXT_PREFERENCE_KEY
The preference key for the visibility inside text.- Since:
- 3.0
-
TEXT_PREFERENCE_VALUE
protected static final Object TEXT_PREFERENCE_VALUE
The visibility inside text.- Since:
- 3.0
-
COLOR_PREFERENCE_KEY
protected static final Object COLOR_PREFERENCE_KEY
The preference key for the presentation color.- Since:
- 3.0
-
COLOR_PREFERENCE_VALUE
protected static final Object COLOR_PREFERENCE_VALUE
The presentation color.- Since:
- 3.0
-
HIGHLIGHT_PREFERENCE_KEY
protected static final Object HIGHLIGHT_PREFERENCE_KEY
The preference key for highlighting inside text.- Since:
- 3.0
-
HIGHLIGHT_PREFERENCE_VALUE
protected static final Object HIGHLIGHT_PREFERENCE_VALUE
The value for highlighting inside text.- Since:
- 3.0
-
IS_GO_TO_NEXT_TARGET_KEY
protected static final Object IS_GO_TO_NEXT_TARGET_KEY
The preference key for go to next navigation enablement.- Since:
- 3.0
-
IS_GO_TO_NEXT_TARGET_VALUE
protected static final Object IS_GO_TO_NEXT_TARGET_VALUE
The value for go to next navigation enablement.- Since:
- 3.0
-
IS_GO_TO_PREVIOUS_TARGET_KEY
protected static final Object IS_GO_TO_PREVIOUS_TARGET_KEY
The preference key for go to previous navigation enablement.- Since:
- 3.0
-
IS_GO_TO_PREVIOUS_TARGET_VALUE
protected static final Object IS_GO_TO_PREVIOUS_TARGET_VALUE
The value for go to previous navigation enablement.- Since:
- 3.0
-
VERTICAL_RULER_PREFERENCE_KEY
protected static final Object VERTICAL_RULER_PREFERENCE_KEY
The preference key for the visibility in the vertical ruler.- Since:
- 3.0
-
VERTICAL_RULER_PREFERENCE_VALUE
protected static final Object VERTICAL_RULER_PREFERENCE_VALUE
The visibility in the vertical ruler.- Since:
- 3.0
-
OVERVIEW_RULER_PREFERENCE_KEY
protected static final Object OVERVIEW_RULER_PREFERENCE_KEY
The preference key for the visibility in the overview ruler.- Since:
- 3.0
-
OVERVIEW_RULER_PREFERENCE_VALUE
protected static final Object OVERVIEW_RULER_PREFERENCE_VALUE
The visibility in the overview ruler.- Since:
- 3.0
-
SHOW_IN_NAVIGATION_DROPDOWN_KEY
protected static final Object SHOW_IN_NAVIGATION_DROPDOWN_KEY
The preference key for the visibility in the next/previous drop down toolbar action.- Since:
- 3.0
-
SHOW_IN_NAVIGATION_DROPDOWN_VALUE
protected static final Object SHOW_IN_NAVIGATION_DROPDOWN_VALUE
The value for the visibility in the next/previous drop down toolbar action.- Since:
- 3.0
-
TEXT_STYLE_PREFERENCE_KEY
protected static final Object TEXT_STYLE_PREFERENCE_KEY
The preference key for the decoration style.- Since:
- 3.0
-
TEXT_STYLE_PREFERENCE_VALUE
protected static final Object TEXT_STYLE_PREFERENCE_VALUE
The value for the text decoration style.- Since:
- 3.0
-
ATTRIBUTES
protected static final Object[] ATTRIBUTES
Array of all supported attributes.- Since:
- 3.0
-
fAnnotationImageProvider
public IAnnotationImageProvider fAnnotationImageProvider
The annotation image provider.- Since:
- 3.0
-
fConfigurationElement
public IConfigurationElement fConfigurationElement
The configuration element from which to create the annotation image provider.- Since:
- 3.0
-
fAnnotationImageProviderAttribute
public String fAnnotationImageProviderAttribute
The name of the attribute used to load the annotation image provider from the configuration element.- Since:
- 3.0
-
-
Constructor Detail
-
AnnotationPreference
public AnnotationPreference()
Creates a new un-initialized annotation preference. Note that instances with anullannotation type are invalid and should not be used.
-
AnnotationPreference
public AnnotationPreference(Object annotationType, String colorKey, String textKey, String overviewRulerKey, int presentationLayer)
Creates a new annotation preference for the given annotation type.- Parameters:
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 layer
-
-
Method Detail
-
setValue
protected void setValue(Object attribute, Object value)
Sets the given value for the given attribute.- Parameters:
attribute- the attributevalue- the attribute value- Since:
- 3.0
-
setValue
protected void setValue(Object attribute, int value)
Sets the given value for the given attribute.- Parameters:
attribute- the attributevalue- the attribute value- Since:
- 3.0
-
setValue
protected void setValue(Object attribute, boolean value)
Sets the given value for the given attribute.- Parameters:
attribute- the attributevalue- the attribute value- Since:
- 3.0
-
getStringValue
protected String getStringValue(Object attribute)
Returns the value of the given attribute as string.- Parameters:
attribute- the attribute- Returns:
- the attribute value
- Since:
- 3.0
-
getBooleanValue
protected boolean getBooleanValue(Object attribute)
Returns the value of the given attribute as boolean.- Parameters:
attribute- the attribute- Returns:
- the attribute value
- Since:
- 3.0
-
getIntegerValue
protected int getIntegerValue(Object attribute)
Returns the value of the given attribute as integer.- Parameters:
attribute- the attribute- Returns:
- the attribute value
- Since:
- 3.0
-
getValue
public Object getValue(Object attribute)
Returns the value of the given attribute.- Parameters:
attribute- the attribute- Returns:
- the attribute value
- Since:
- 3.0
-
hasValue
public boolean hasValue(Object attribute)
Returns whether the given attribute is defined.- Parameters:
attribute- the attribute- Returns:
trueif the attribute has a valuefalseotherwise- Since:
- 3.0
-
isPreferenceKey
public boolean isPreferenceKey(String key)
Returns whether the given string is a preference key.- Parameters:
key- the string to test- Returns:
trueif the string is a preference key
-
getAnnotationType
public Object getAnnotationType()
Returns the annotation type. Should not be null in a completely set up instance.- Returns:
- the annotation type,
nullif the receiver has not been initialized yet
-
getMarkerType
@Deprecated public String getMarkerType()
Deprecated.since 3.0Returns the marker type.- Returns:
- the marker type, or
nullif none is set
-
getSeverity
@Deprecated public int getSeverity()
Deprecated.since 3.0Returns the marker severity.- Returns:
- the marker severity
-
setAnnotationType
public void setAnnotationType(Object annotationType)
Sets the annotation type. Note that instances with anullannotation type are considered invalid and should not be used with the framework.- Parameters:
annotationType- the annotation type
-
setMarkerType
public void setMarkerType(String markerType)
Sets the marker type.- Parameters:
markerType- the marker type
-
setSeverity
public void setSeverity(int severity)
Sets the marker severity.- Parameters:
severity- the marker severity
-
getColorPreferenceKey
public String getColorPreferenceKey()
Returns the preference key for the presentation color.- Returns:
- the preference key for the presentation color or
nullif none is set
-
getColorPreferenceValue
public RGB getColorPreferenceValue()
Returns the default presentation color.- Returns:
- the default presentation color or
nullif none is set
-
getPreferenceLabel
public String getPreferenceLabel()
Returns the presentation string for this annotation type.- Returns:
- the presentation string for this annotation type or
nullif none is set
-
getOverviewRulerPreferenceKey
public String getOverviewRulerPreferenceKey()
Returns the preference key for the visibility in the overview ruler.- Returns:
- the preference key for the visibility in the overview ruler or
nullif none is set
-
getOverviewRulerPreferenceValue
public boolean getOverviewRulerPreferenceValue()
Returns the default visibility in the overview ruler.- Returns:
- the default visibility in the overview ruler
-
getVerticalRulerPreferenceKey
public String getVerticalRulerPreferenceKey()
Returns the preference key for the visibility in the vertical ruler.- Returns:
- the preference key for the visibility in the vertical ruler or
nullif none is set - Since:
- 3.0
-
getVerticalRulerPreferenceValue
public boolean getVerticalRulerPreferenceValue()
Returns the default visibility in the vertical ruler.- Returns:
- the default visibility in the vertical ruler
- Since:
- 3.0
-
getPresentationLayer
public int getPresentationLayer()
Returns the presentation layer.- Returns:
- the presentation layer
-
getTextPreferenceKey
public String getTextPreferenceKey()
Returns the preference key for the visibility inside text.- Returns:
- the preference key for the visibility inside text or
nullif none is set
-
getTextPreferenceValue
public boolean getTextPreferenceValue()
Returns the default visibility inside text.- Returns:
- the default visibility inside text
-
getHighlightPreferenceKey
public String getHighlightPreferenceKey()
Returns the preference key for highlighting inside text.- Returns:
- the preference key for highlighting inside text or
nullif none is set - Since:
- 3.0
-
getHighlightPreferenceValue
public boolean getHighlightPreferenceValue()
Returns the default value for highlighting inside text.- Returns:
- the default value for highlighting inside text
- Since:
- 3.0
-
contributesToHeader
public boolean contributesToHeader()
Returns whether the annotation type contributes to the header of the overview ruler.- Returns:
trueif the annotation type contributes to the header of the overview ruler
-
setColorPreferenceKey
public void setColorPreferenceKey(String colorKey)
Sets the preference key for the presentation color.- Parameters:
colorKey- the preference key
-
setColorPreferenceValue
public void setColorPreferenceValue(RGB colorValue)
Sets the default presentation color.- Parameters:
colorValue- the default color
-
setPreferenceLabel
public void setPreferenceLabel(String label)
Sets the presentation label of this annotation type.- Parameters:
label- the presentation label
-
setOverviewRulerPreferenceKey
public void setOverviewRulerPreferenceKey(String overviewRulerKey)
Sets the preference key for the visibility in the overview ruler.- Parameters:
overviewRulerKey- the preference key
-
setOverviewRulerPreferenceValue
public void setOverviewRulerPreferenceValue(boolean overviewRulerValue)
Sets the default visibility in the overview ruler.- Parameters:
overviewRulerValue-trueif visible by default,falseotherwise
-
setVerticalRulerPreferenceKey
public void setVerticalRulerPreferenceKey(String verticalRulerKey)
Sets the preference key for the visibility in the vertical ruler.- Parameters:
verticalRulerKey- the preference key- Since:
- 3.0
-
setVerticalRulerPreferenceValue
public void setVerticalRulerPreferenceValue(boolean verticalRulerValue)
Sets the default visibility in the vertical ruler.- Parameters:
verticalRulerValue-trueif visible by default,falseotherwise- Since:
- 3.0
-
setPresentationLayer
public void setPresentationLayer(int presentationLayer)
Sets the presentation layer.- Parameters:
presentationLayer- the presentation layer
-
setTextPreferenceKey
public void setTextPreferenceKey(String textKey)
Sets the preference key for the visibility of squiggles inside text.- Parameters:
textKey- the preference key
-
setTextPreferenceValue
public void setTextPreferenceValue(boolean textValue)
Sets the default visibility inside text.- Parameters:
textValue-trueif visible by default,falseotherwise
-
setHighlightPreferenceKey
public void setHighlightPreferenceKey(String highlightKey)
Sets the preference key for highlighting inside text.- Parameters:
highlightKey- the preference key- Since:
- 3.0
-
setHighlightPreferenceValue
public void setHighlightPreferenceValue(boolean highlightValue)
Sets the default value for highlighting inside text.- Parameters:
highlightValue-trueif highlighted in text by default,falseotherwise- Since:
- 3.0
-
setContributesToHeader
public void setContributesToHeader(boolean contributesToHeader)
Sets whether the annotation type contributes to the overview ruler's header.- Parameters:
contributesToHeader-trueif in header,falseotherwise
-
isGoToNextNavigationTarget
public boolean isGoToNextNavigationTarget()
Returns the default value for go to next navigation enablement.- Returns:
trueif enabled by default- Since:
- 3.0
-
setIsGoToNextNavigationTarget
public void setIsGoToNextNavigationTarget(boolean isGoToNextNavigationTarget)
Sets the default value for go to next navigation enablement.- Parameters:
isGoToNextNavigationTarget-trueif enabled by default- Since:
- 3.0
-
getIsGoToNextNavigationTargetKey
public String getIsGoToNextNavigationTargetKey()
Returns the preference key for go to next navigation enablement.- Returns:
- the preference key or
nullif the key is undefined - Since:
- 3.0
-
setIsGoToNextNavigationTargetKey
public void setIsGoToNextNavigationTargetKey(String isGoToNextNavigationTargetKey)
Sets the preference key for go to next navigation enablement.- Parameters:
isGoToNextNavigationTargetKey-trueif enabled by default- Since:
- 3.0
-
isGoToPreviousNavigationTarget
public boolean isGoToPreviousNavigationTarget()
Returns the default value for go to previous navigation enablement.- Returns:
trueif enabled by default- Since:
- 3.0
-
setIsGoToPreviousNavigationTarget
public void setIsGoToPreviousNavigationTarget(boolean isGoToPreviousNavigationTarget)
Sets the default value for go to previous navigation enablement.- Parameters:
isGoToPreviousNavigationTarget-trueif enabled by default- Since:
- 3.0
-
getIsGoToPreviousNavigationTargetKey
public String getIsGoToPreviousNavigationTargetKey()
Returns the preference key for go to previous navigation enablement.- Returns:
- the preference key or
nullif the key is undefined - Since:
- 3.0
-
setIsGoToPreviousNavigationTargetKey
public void setIsGoToPreviousNavigationTargetKey(String isGoToPreviousNavigationTargetKey)
Sets the preference key for go to previous navigation enablement.- Parameters:
isGoToPreviousNavigationTargetKey- the preference key- Since:
- 3.0
-
getShowInNextPrevDropdownToolbarActionKey
public String getShowInNextPrevDropdownToolbarActionKey()
Returns the preference key for the visibility in the next/previous drop down toolbar action.- Returns:
- the preference key or
nullif the key is undefined - Since:
- 3.0
-
setShowInNextPrevDropdownToolbarActionKey
public void setShowInNextPrevDropdownToolbarActionKey(String showInNextPrevDropdownToolbarActionKey)
Sets the preference key for the visibility in the next/previous drop down toolbar action.- Parameters:
showInNextPrevDropdownToolbarActionKey- the preference key- Since:
- 3.0
-
isShowInNextPrevDropdownToolbarAction
public boolean isShowInNextPrevDropdownToolbarAction()
Returns the default value for the visibility in the next/previous drop down toolbar action.- Returns:
trueif enabled by default- Since:
- 3.0
-
setShowInNextPrevDropdownToolbarAction
public void setShowInNextPrevDropdownToolbarAction(boolean showInNextPrevDropdownToolbarAction)
Sets the default value for the visibility in the next/previous drop down toolbar action.- Parameters:
showInNextPrevDropdownToolbarAction-trueif enabled by default- Since:
- 3.0
-
setTextStylePreferenceKey
public void setTextStylePreferenceKey(String key)
Sets the preference key for the text style property.- Parameters:
key- the new key- Since:
- 3.0
-
getTextStylePreferenceKey
public String getTextStylePreferenceKey()
Returns the preference key for the decoration style used when the annotation is shown in text.- Returns:
- the preference key for the decoration style or
nullif the key is undefined - Since:
- 3.0
-
getTextStyleValue
public String getTextStyleValue()
Returns the value for the decoration style used when the annotation is shown in text.- Returns:
- the value for the decoration style or
nullif the key is undefined - Since:
- 3.0
-
setTextStyleValue
public void setTextStyleValue(String value)
Sets the value for the text style property.- Parameters:
value- the new text decoration style- Since:
- 3.0
-
getImageDescriptor
public ImageDescriptor getImageDescriptor()
Returns the image descriptor for the image to be drawn in the vertical ruler. The provided image is only used, ifgetAnnotationImageProviderreturnsnull.- Returns:
- the image descriptor or
null - Since:
- 3.0
-
setImageDescriptor
public void setImageDescriptor(ImageDescriptor descriptor)
Sets the image descriptor for the image to be drawn in the vertical ruler.- Parameters:
descriptor- the image descriptor- Since:
- 3.0
-
getSymbolicImageName
public String getSymbolicImageName()
Returns the symbolic name of the image to be drawn in the vertical ruler. The image is only used ifgetImageDescriptorreturnsnull.- Returns:
- the symbolic name of the image or
null - Since:
- 3.0
-
setSymbolicImageName
public void setSymbolicImageName(String symbolicImageName)
Sets the symbolic name of the image to be drawn in the vertical ruler.- Parameters:
symbolicImageName- the symbolic image name- Since:
- 3.0
-
getAnnotationImageProvider
public IAnnotationImageProvider getAnnotationImageProvider()
Returns the annotation image provider. If no default annotation image provider has been set, this method checks whether the annotation image provider data has been set. If so, an annotation image provider is created if the configuration element's plug-in is loaded. When an annotation image provider has been created successfully, it is set as the default annotation image provider.- Returns:
- the annotation image provider
- Since:
- 3.0
-
setAnnotationImageProvider
public void setAnnotationImageProvider(IAnnotationImageProvider provider)
Sets the annotation image provider who provides images for annotations of the specified annotation type.- Parameters:
provider- the annotation image provider- Since:
- 3.0
-
setAnnotationImageProviderData
public void setAnnotationImageProviderData(IConfigurationElement configurationElement, String annotationImageProviderAttribute)
Sets the data needed to create the annotation image provider.- Parameters:
configurationElement- the configuration elementannotationImageProviderAttribute- the attribute of the configuration element- Since:
- 3.0
-
setIncludeOnPreferencePage
public void setIncludeOnPreferencePage(boolean includeOnPreferencePage)
Sets the property of this annotation preference whether it should be included on the default annotation preference page.- Parameters:
includeOnPreferencePage- the new value- Since:
- 3.0
-
isIncludeOnPreferencePage
public boolean isIncludeOnPreferencePage()
Returns the property of the receiver of whether it should be included on the default annotation preference page.- Returns:
- the includeOnPreferencePage property
- Since:
- 3.0
-
merge
public void merge(AnnotationPreference preference)
Merges the values of the given preference into this preference. Existing values will not be overwritten. Subclasses may extend.- Parameters:
preference- the preference to merge into this preference- Since:
- 3.0
-
setQuickFixImageDescriptor
public void setQuickFixImageDescriptor(ImageDescriptor descriptor)
Sets the Quick Fix image descriptor for the image to be drawn in the vertical ruler.- Parameters:
descriptor- the image descriptor- Since:
- 3.2
-
getQuickFixImageDescriptor
public ImageDescriptor getQuickFixImageDescriptor()
Returns the Quick Fix image descriptor for the image to be drawn in the vertical ruler. The provided image is only used, ifgetAnnotationImageProviderreturnsnull.- Returns:
- the image descriptor or
null - Since:
- 3.2
-
-