refactory: added UI removed from core plugin.
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpdt / ui / text / folding / IJavaFoldingPreferenceBlock.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.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.Control;
15
16 /**
17  * Contributors to the
18  * <code>net.sourceforge.phpdt.ui.foldingStructureProvider</code> extension
19  * point can specify an implementation of this interface to be displayed on the
20  * Java &gt; Editor &gt; Folding preference page.
21  * <p>
22  * Clients may implement this interface.
23  * </p>
24  * 
25  * @since 3.0
26  */
27 public interface IJavaFoldingPreferenceBlock {
28
29         /**
30          * Creates the control that will be displayed on the Java Editor folding
31          * preference page.
32          * 
33          * @param parent
34          *            the parent composite to which to add the preferences control
35          * @return the control that was added to <code>parent</code>
36          */
37         Control createControl(Composite parent);
38
39         /**
40          * Called after creating the control. Implementations should load the
41          * preferences values and update the controls accordingly.
42          */
43         void initialize();
44
45         /**
46          * Called when the <code>OK</code> button is pressed on the preference
47          * page. Implementations should commit the configured preference settings
48          * into their form of preference storage.
49          */
50         void performOk();
51
52         /**
53          * Called when the <code>Defaults</code> button is pressed on the
54          * preference page. Implementation should reset any preference settings to
55          * their default values and adjust the controls accordingly.
56          */
57         void performDefaults();
58
59         /**
60          * Called when the preference page is being disposed. Implementations should
61          * free any resources they are holding on to.
62          */
63         void dispose();
64
65 }