Package org.eclipse.ui.texteditor
Class AbstractTextEditor.ColumnSupport
java.lang.Object
org.eclipse.ui.texteditor.AbstractTextEditor.ColumnSupport
- All Implemented Interfaces:
IColumnSupport
- Enclosing class:
- AbstractTextEditor
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
ConstructorDescriptionColumnSupport
(AbstractTextEditor editor, RulerColumnRegistry registry) Creates a new column support for the given editor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Removes and disposes all currently visible ruler columns.protected void
Hook to let subclasses initialize a newly created column.final boolean
isColumnSupported
(RulerColumnDescriptor descriptor) Returnstrue
if the column described bydescriptor
is supported by the receiver's editor,false
ifid
is 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.final boolean
isColumnVisible
(RulerColumnDescriptor descriptor) Returnstrue
if the column described bydescriptor
is currently showing,false
if not.final void
setColumnVisible
(RulerColumnDescriptor descriptor, boolean visible) Attempts to set the visibility of the column described bydescriptor
.
-
Constructor Details
-
ColumnSupport
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 Details
-
setColumnVisible
Description copied from interface:IColumnSupport
Attempts 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:
setColumnVisible
in interfaceIColumnSupport
- Parameters:
descriptor
- the column descriptorvisible
-true
to show the column,false
to hide it
-
initializeColumn
Hook to let subclasses initialize a newly created column.Subclasses may extend this method.
- Parameters:
column
- the created column
-
isColumnVisible
Description copied from interface:IColumnSupport
Returnstrue
if the column described bydescriptor
is currently showing,false
if not.- Specified by:
isColumnVisible
in interfaceIColumnSupport
- Parameters:
descriptor
- the column descriptor- Returns:
true
if the specified column is currently visible
-
isColumnSupported
Description copied from interface:IColumnSupport
Returnstrue
if the column described bydescriptor
is supported by the receiver's editor,false
ifid
is 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:
isColumnSupported
in interfaceIColumnSupport
- Parameters:
descriptor
- the column descriptor- Returns:
true
if the specified column is supported
-
dispose
public void dispose()Removes and disposes all currently visible ruler columns.Subclasses may extend this method.
- Specified by:
dispose
in interfaceIColumnSupport
-