01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 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.internal.ui.preferences;
11:
12: import org.eclipse.swt.widgets.Composite;
13:
14: import org.eclipse.ui.PlatformUI;
15:
16: import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
17: import org.eclipse.jdt.internal.ui.preferences.formatter.CodeFormatterConfigurationBlock;
18: import org.eclipse.jdt.internal.ui.preferences.formatter.ProfileConfigurationBlock;
19:
20: /*
21: * The page to configure the code formatter options.
22: */
23: public class CodeFormatterPreferencePage extends ProfilePreferencePage {
24:
25: public static final String PREF_ID = "org.eclipse.jdt.ui.preferences.CodeFormatterPreferencePage"; //$NON-NLS-1$
26: public static final String PROP_ID = "org.eclipse.jdt.ui.propertyPages.CodeFormatterPreferencePage"; //$NON-NLS-1$
27:
28: public CodeFormatterPreferencePage() {
29: // only used when page is shown programatically
30: setTitle(PreferencesMessages.CodeFormatterPreferencePage_title);
31: }
32:
33: /* (non-Javadoc)
34: * @see org.eclipse.jdt.internal.ui.preferences.ProfilePreferencePage#createControl(org.eclipse.swt.widgets.Composite)
35: */
36: public void createControl(Composite parent) {
37: super .createControl(parent);
38: PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(),
39: IJavaHelpContextIds.CODEFORMATTER_PREFERENCE_PAGE);
40: }
41:
42: protected ProfileConfigurationBlock createConfigurationBlock(
43: 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 getPreferencePageID() {
51: return PREF_ID;
52: }
53:
54: /* (non-Javadoc)
55: * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
56: */
57: protected String getPropertyPageID() {
58: return PROP_ID;
59: }
60:
61: }
|