/*******************************************************************************
* Copyright (c) 2006, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.texteditor.rulers;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.jface.text.source.IVerticalRulerColumn;
import org.eclipse.ui.texteditor.ITextEditor;
/**
* Interface that has to be implemented by contributions to the
* org.eclipse.ui.texteditor.rulerColumns
extension point.
*
* Implementors must have a zero-argument constructor so that they can be created * by {@link IConfigurationElement#createExecutableExtension(String)}.
* * @since 3.3 */ public interface IContributedRulerColumn extends IVerticalRulerColumn { /** * Returns the extension point descriptor of this ruler. * * @return descriptor the extension point descriptor of this ruler ornull
if called before {@link #columnCreated()}
*/
RulerColumnDescriptor getDescriptor();
/**
* Sets the extension point descriptor of this ruler.
* * This method will be called by the framework and must not * be called by clients.
* * @param descriptor the extension point descriptor */ void setDescriptor(RulerColumnDescriptor descriptor); /** * Sets the editor (called right after the extension was instantiated). ** This method will be called by the framework and must not * be called by clients.
* * @param editor the editor targeted by this ruler instance */ void setEditor(ITextEditor editor); /** * Returns the editor targeted by this ruler instance. * * @return the editor targeted by this ruler instance ornull
if called before {@link #columnCreated()}
*/
ITextEditor getEditor();
/**
* Hook method called after a column has been instantiated, but before it is
* added to a {@link org.eclipse.jface.text.source.CompositeRuler} and before
* {@linkplain org.eclipse.jface.text.source.IVerticalRulerColumn#createControl(org.eclipse.jface.text.source.CompositeRuler, org.eclipse.swt.widgets.Composite) createControl}
* is called.
* * This happens when *
* This happens when *
* The column will not be used after this method has been called. A new * column will be instantiated if the same column type should be shown for * the same editor. *
*/ void columnRemoved(); }