1 /*******************************************************************************
2 * Copyright (c) 2000, 2011 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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.ui.preferences;
14 import org.eclipse.swt.widgets.Composite;
16 import org.eclipse.ui.PlatformUI;
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;
23 * The page to configure the code formatter options.
25 public class CodeFormatterPreferencePage extends ProfilePreferencePage {
27 public static final String PREF_ID= "org.eclipse.jdt.ui.preferences.CodeFormatterPreferencePage"; //$NON-NLS-1$
28 public static final String PROP_ID= "org.eclipse.jdt.ui.propertyPages.CodeFormatterPreferencePage"; //$NON-NLS-1$
30 public CodeFormatterPreferencePage() {
31 // only used when page is shown programatically
32 setTitle(PreferencesMessages.CodeFormatterPreferencePage_title);
36 * @see org.eclipse.jdt.internal.ui.preferences.ProfilePreferencePage#createControl(org.eclipse.swt.widgets.Composite)
39 public void createControl(Composite parent) {
40 super.createControl(parent);
41 PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.CODEFORMATTER_PREFERENCE_PAGE);
45 protected ProfileConfigurationBlock createConfigurationBlock(PreferencesAccess access) {
46 return new CodeFormatterConfigurationBlock(getProject(), access);
50 * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID()
53 protected String getPreferencePageID() {
58 * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
61 protected String getPropertyPageID() {