Package org.eclipse.ui.texteditor
Class AbstractTextEditor.ColumnSupport
- java.lang.Object
-
- org.eclipse.ui.texteditor.AbstractTextEditor.ColumnSupport
-
- All Implemented Interfaces:
IColumnSupport
- Enclosing class:
- AbstractTextEditor
protected static class AbstractTextEditor.ColumnSupport extends Object implements IColumnSupport
Implements the ruler column support of for the given editor.This is currently only used to support vertical ruler columns.
- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description ColumnSupport(AbstractTextEditor editor, RulerColumnRegistry registry)Creates a new column support for the given editor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Removes and disposes all currently visible ruler columns.protected voidinitializeColumn(IContributedRulerColumn column)Hook to let subclasses initialize a newly created column.booleanisColumnSupported(RulerColumnDescriptor descriptor)Returnstrueif the column described bydescriptoris supported by the receiver's editor,falseifidis not the identifier of a known column contribution, if the column does not target the editor, or if the editor does not support contributed columns.booleanisColumnVisible(RulerColumnDescriptor descriptor)Returnstrueif the column described bydescriptoris currently showing,falseif not.voidsetColumnVisible(RulerColumnDescriptor descriptor, boolean visible)Attempts to set the visibility of the column described bydescriptor.
-
-
-
Constructor Detail
-
ColumnSupport
public ColumnSupport(AbstractTextEditor editor, RulerColumnRegistry registry)
Creates a new column support for the given editor. Only the editor itself should normally create such an instance.- Parameters:
editor- the editorregistry- the contribution registry to refer to
-
-
Method Detail
-
setColumnVisible
public final void setColumnVisible(RulerColumnDescriptor descriptor, boolean visible)
Description copied from interface:IColumnSupportAttempts to set the visibility of the column described bydescriptor. Nothing happens if the visibility is already as requested, or if the column is not supported by the editor.- Specified by:
setColumnVisiblein interfaceIColumnSupport- Parameters:
descriptor- the column descriptorvisible-trueto show the column,falseto hide it
-
initializeColumn
protected void initializeColumn(IContributedRulerColumn column)
Hook to let subclasses initialize a newly created column.Subclasses may extend this method.
- Parameters:
column- the created column
-
isColumnVisible
public final boolean isColumnVisible(RulerColumnDescriptor descriptor)
Description copied from interface:IColumnSupportReturnstrueif the column described bydescriptoris currently showing,falseif not.- Specified by:
isColumnVisiblein interfaceIColumnSupport- Parameters:
descriptor- the column descriptor- Returns:
trueif the specified column is currently visible
-
isColumnSupported
public final boolean isColumnSupported(RulerColumnDescriptor descriptor)
Description copied from interface:IColumnSupportReturnstrueif the column described bydescriptoris supported by the receiver's editor,falseifidis not the identifier of a known column contribution, if the column does not target the editor, or if the editor does not support contributed columns.- Specified by:
isColumnSupportedin interfaceIColumnSupport- Parameters:
descriptor- the column descriptor- Returns:
trueif the specified column is supported
-
dispose
public void dispose()
Removes and disposes all currently visible ruler columns.Subclasses may extend this method.
- Specified by:
disposein interfaceIColumnSupport
-
-