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