0c4ef4b0e4f975ca62e56e7b1aec08382734ec19
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / ui / text / folding / IJavaFoldingStructureProvider.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.ui.text.folding;
12
13 import org.eclipse.jface.text.source.projection.ProjectionViewer;
14
15 import org.eclipse.ui.texteditor.ITextEditor;
16
17 /**
18  * Contributors to the
19  * <code>net.sourceforge.phpdt.ui.foldingStructureProvider</code> extension
20  * point must specify an implementation of this interface which will create and
21  * maintain
22  * {@link org.eclipse.jface.text.source.projection.ProjectionAnnotation} objects
23  * as understood by
24  * {@link org.eclipse.jface.text.source.projection.ProjectionViewer}.
25  * <p>
26  * Clients may implement this interface.
27  * </p>
28  * 
29  * @since 3.0
30  */
31 public interface IJavaFoldingStructureProvider {
32
33         /**
34          * Installs this structure provider on the given editor and viewer.
35          * Implementations should observe the projection events generated by
36          * <code>viewer</code> and enable / disable generation of projection
37          * structure accordingly.
38          * 
39          * @param editor the editor that this provider works on
40          * @param viewer the projection viewer that displays the annotations created
41          *        by this structure provider
42          */
43         public abstract void install(ITextEditor editor, ProjectionViewer viewer);
44
45         /**
46          * Uninstalls this structure provider. Any references to editors or viewers
47          * should be cleared.
48          */
49         public abstract void uninstall();
50
51         /**
52          * (Re-)initializes the structure provided by the receiver.
53          */
54         public abstract void initialize();
55 }