d51c4b4159a9ecc3ac4980fc7bfa354b43ae3303
[phpeclipse.git] /
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.internal.ui.text.folding;
12
13 import org.eclipse.swt.SWT;
14 import org.eclipse.swt.layout.GridData;
15 import org.eclipse.swt.layout.GridLayout;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.swt.widgets.Control;
18 import org.eclipse.swt.widgets.Label;
19
20 import net.sourceforge.phpdt.ui.text.folding.IJavaFoldingPreferenceBlock;
21
22
23 /**
24  * Empty preference block for extensions to the
25  * <code>net.sourceforge.phpdt.ui.javaFoldingStructureProvider</code> extension
26  * point that do not specify their own.
27  * 
28  * @since 3.0
29  */
30 class EmptyJavaFoldingPreferenceBlock implements IJavaFoldingPreferenceBlock {
31         /*
32          * @see net.sourceforge.phpdt.internal.ui.text.folding.IJavaFoldingPreferences#createControl(org.eclipse.swt.widgets.Group)
33          */
34         public Control createControl(Composite composite) {
35                 Composite inner= new Composite(composite, SWT.NONE);
36                 inner.setLayout(new GridLayout(3, false));
37
38                 Label label= new Label(inner, SWT.CENTER);
39                 GridData gd= new GridData(GridData.FILL_BOTH);
40                 gd.widthHint= 30;
41                 label.setLayoutData(gd);
42                 
43                 label= new Label(inner, SWT.CENTER);
44                 label.setText(FoldingMessages.getString("EmptyJavaFoldingPreferenceBlock.emptyCaption")); //$NON-NLS-1$
45                 gd= new GridData(GridData.CENTER);
46                 label.setLayoutData(gd);
47
48                 label= new Label(inner, SWT.CENTER);
49                 gd= new GridData(GridData.FILL_BOTH);
50                 gd.widthHint= 30;
51                 label.setLayoutData(gd);
52                 
53                 return inner;
54         }
55
56         /*
57          * @see net.sourceforge.phpdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#initialize()
58          */
59         public void initialize() {
60         }
61
62         /*
63          * @see net.sourceforge.phpdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#performOk()
64          */
65         public void performOk() {
66         }
67
68         /*
69          * @see net.sourceforge.phpdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#performDefaults()
70          */
71         public void performDefaults() {
72         }
73
74         /*
75          * @see net.sourceforge.phpdt.internal.ui.text.folding.IJavaFoldingPreferenceBlock#dispose()
76          */
77         public void dispose() {
78         }
79
80 }