KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > preferences > CodeFormatterPreferencePage


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.ui.preferences;
12
13
14 import org.eclipse.swt.widgets.Composite;
15
16 import org.eclipse.ui.PlatformUI;
17
18 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
19 import org.eclipse.jdt.internal.ui.preferences.formatter.CodeFormatterConfigurationBlock;
20 import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileConfigurationBlock;
21
22 /*
23  * The page to configure the code formatter options.
24  */

25 public class CodeFormatterPreferencePage extends ProfilePreferencePage {
26
27     public static final String JavaDoc PREF_ID= "org.eclipse.jdt.ui.preferences.CodeFormatterPreferencePage"; //$NON-NLS-1$
28
public static final String JavaDoc PROP_ID= "org.eclipse.jdt.ui.propertyPages.CodeFormatterPreferencePage"; //$NON-NLS-1$
29

30     public CodeFormatterPreferencePage() {
31         // only used when page is shown programatically
32
setTitle(PreferencesMessages.CodeFormatterPreferencePage_title);
33     }
34     
35     /* (non-Javadoc)
36      * @see org.eclipse.jdt.internal.ui.preferences.ProfilePreferencePage#createControl(org.eclipse.swt.widgets.Composite)
37      */

38     public void createControl(Composite parent) {
39         super.createControl(parent);
40         PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.CODEFORMATTER_PREFERENCE_PAGE);
41     }
42
43     protected ProfileConfigurationBlock createConfigurationBlock(PreferencesAccess access) {
44         return new CodeFormatterConfigurationBlock(getProject(), access);
45     }
46
47     /* (non-Javadoc)
48      * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID()
49      */

50     protected String JavaDoc getPreferencePageID() {
51         return PREF_ID;
52     }
53     
54     /* (non-Javadoc)
55      * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
56      */

57     protected String JavaDoc getPropertyPageID() {
58         return PROP_ID;
59     }
60
61 }
62
Popular Tags