Package org.eclipse.ui.texteditor.rulers
Class RulerColumnPreferenceAdapter
- java.lang.Object
-
- org.eclipse.ui.texteditor.rulers.RulerColumnPreferenceAdapter
-
public final class RulerColumnPreferenceAdapter extends Object
Manages the preferences for ruler contributions stored in a preference store.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description RulerColumnPreferenceAdapter(IPreferenceStore store, String key)
Creates a new preference adapter that will read and write under the specified key in the given preference store.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEnabled(RulerColumnDescriptor descriptor)
Returns the enablement state of the given ruler contribution.void
setEnabled(RulerColumnDescriptor descriptor, boolean enabled)
Sets the enablement state of the given ruler contribution.void
toggle(RulerColumnDescriptor descriptor)
Toggles the enablement state of given the ruler contribution.
-
-
-
Constructor Detail
-
RulerColumnPreferenceAdapter
public RulerColumnPreferenceAdapter(IPreferenceStore store, String key)
Creates a new preference adapter that will read and write under the specified key in the given preference store.- Parameters:
store
- the preference storekey
- the key
-
-
Method Detail
-
isEnabled
public boolean isEnabled(RulerColumnDescriptor descriptor)
Returns the enablement state of the given ruler contribution.- Parameters:
descriptor
- a ruler contribution descriptor- Returns:
true
if the ruler is enabled,false
otherwise
-
setEnabled
public void setEnabled(RulerColumnDescriptor descriptor, boolean enabled)
Sets the enablement state of the given ruler contribution.- Parameters:
descriptor
- a ruler contribution descriptorenabled
-true
to enable the contribution,false
to disable it
-
toggle
public void toggle(RulerColumnDescriptor descriptor)
Toggles the enablement state of given the ruler contribution.- Parameters:
descriptor
- a ruler contribution descriptor
-
-