Package org.eclipse.ui.texteditor.rulers
Class RulerColumnDescriptor
- java.lang.Object
-
- org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor
-
public final class RulerColumnDescriptor extends Object
The description of an extension to theorg.eclipse.ui.workbench.texteditor.rulerColumnsextension point. Instances are immutable. Instances can be obtained from aRulerColumnRegistry.- Since:
- 3.3
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IContributedRulerColumncreateColumn(ITextEditor editor)Creates aIContributedRulerColumninstance as described by the receiver.booleanequals(Object obj)booleangetDefaultEnablement()Returns the default enablement of the described extension.ImageDescriptorgetIcon()Returns the image descriptor of the described extension,nullif it does not have an image.StringgetId()Returns the identifier of the described extension.StringgetName()Returns the name of the described extension.inthashCode()booleanisGlobal()Returns the global property of the described extension.booleanisIncludedInMenu()Returns the menu inclusion property of the described extension.booleanmatchesEditor(ITextEditor editor)Returnstrueif this contribution matches the passed editor,falseif not.StringtoString()
-
-
-
Method Detail
-
getId
public String getId()
Returns the identifier of the described extension.- Returns:
- the identifier of the described extension
-
getName
public String getName()
Returns the name of the described extension.- Returns:
- the name of the described extension
-
getIcon
public ImageDescriptor getIcon()
Returns the image descriptor of the described extension,nullif it does not have an image.- Returns:
- the image descriptor of the described extension or
nullfor no image
-
getDefaultEnablement
public boolean getDefaultEnablement()
Returns the default enablement of the described extension. Editors that support this contribution should typically enable the column by default.- Returns:
- the default enablement of the described extension
-
isGlobal
public boolean isGlobal()
Returns the global property of the described extension. Changing the visibility of a column with the global property set totrueshould typically affect all matching editors. Changing the visibility of a column with the global property set tofalseshould only affect the current editor.- Returns:
- the global property of the described extension
-
isIncludedInMenu
public boolean isIncludedInMenu()
Returns the menu inclusion property of the described extension. A toggle menu entry should be inluded in the ruler context menu for columns with this property set totrue.- Returns:
- the menu inclusion property of the described extension
-
matchesEditor
public boolean matchesEditor(ITextEditor editor)
Returnstrueif this contribution matches the passed editor,falseif not.- Parameters:
editor- the editor to check- Returns:
trueif this contribution targets the passed editor
-
createColumn
public IContributedRulerColumn createColumn(ITextEditor editor) throws CoreException, InvalidRegistryObjectException
Creates aIContributedRulerColumninstance as described by the receiver. This may load the contributing plug-in.- Parameters:
editor- the editor that loads the contributed column- Returns:
- the instantiated column
- Throws:
CoreException- as thrown byIConfigurationElement.createExecutableExtension(String)InvalidRegistryObjectException- as thrown byIConfigurationElement.createExecutableExtension(String)
-
-