01: /*******************************************************************************
02: * Copyright (c) 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.texteditor.rulers;
11:
12: /**
13: * Provides support to modify and query the visibility of
14: * ruler columns and test whether a ruler column is supported.
15: * <p>
16: * This interface must not be implemented by clients.
17: * </p>
18: *
19: * @since 3.3
20: */
21: public interface IColumnSupport {
22:
23: /**
24: * Returns <code>true</code> if the column described by <code>descriptor</code> is
25: * currently showing, <code>false</code> if not.
26: *
27: * @param descriptor the column descriptor
28: * @return <code>true</code> if the specified column is currently visible
29: */
30: boolean isColumnVisible(RulerColumnDescriptor descriptor);
31:
32: /**
33: * Attempts to set the visibility of the column described by <code>descriptor</code>. Nothing
34: * happens if the visibility is already as requested, or if the column is not supported by the
35: * editor.
36: *
37: * @param descriptor the column descriptor
38: * @param visible <code>true</code> to show the column, <code>false</code> to hide it
39: */
40: void setColumnVisible(RulerColumnDescriptor descriptor,
41: boolean visible);
42:
43: /**
44: * Returns <code>true</code> if the column described by <code>descriptor</code> is
45: * supported by the receiver's editor, <code>false</code> if <code>id</code> is not the
46: * identifier of a known column contribution, if the column does not target the editor, or if
47: * the editor does not support contributed columns.
48: *
49: * @param descriptor the column descriptor
50: * @return <code>true</code> if the specified column is supported
51: */
52: boolean isColumnSupported(RulerColumnDescriptor descriptor);
53:
54: /**
55: * Removes and disposes all currently visible ruler columns.
56: */
57: void dispose();
58: }
|