01: /*******************************************************************************
02: * Copyright (c) 2005, 2007 BEA Systems, Inc. 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: * BEA Systems Inc. - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.apt.ui.internal.preferences;
11:
12: import org.eclipse.jdt.apt.ui.internal.AptUIPlugin;
13: import org.eclipse.jdt.apt.ui.internal.util.IAptHelpContextIds;
14: import org.eclipse.swt.widgets.Composite;
15: import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
16:
17: /*
18: * The page to configure the naming style options.
19: */
20: public class AptPreferencePage extends BasePreferencePage {
21:
22: private static final String PREF_ID = "org.eclipse.jdt.apt.ui.preferences.aptPreferences"; //$NON-NLS-1$
23: private static final String PROP_ID = "org.eclipse.jdt.apt.ui.propertyPages.aptPreferences"; //$NON-NLS-1$
24:
25: public AptPreferencePage() {
26: setPreferenceStore(AptUIPlugin.getDefault()
27: .getPreferenceStore());
28:
29: // only shown for workspace preferences
30: setDescription(Messages.AptPreferencePage_preferences);
31:
32: // only used when page is shown programatically
33: setTitle(Messages.AptPreferencePage_preferencesTitle);
34: }
35:
36: /*
37: * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
38: */
39: public void createControl(Composite parent) {
40: IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
41: setConfigurationBlock(new AptConfigurationBlock(
42: getNewStatusChangedListener(), getProject(), container));
43:
44: super .createControl(parent);
45: }
46:
47: @Override
48: protected String getContextHelpId() {
49: return IAptHelpContextIds.APTCONFIGURATION_PREFERENCE_PAGE;
50: }
51:
52: /* (non-Javadoc)
53: * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPreferencePageID()
54: */
55: protected String getPreferencePageID() {
56: return PREF_ID;
57: }
58:
59: /* (non-Javadoc)
60: * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
61: */
62: protected String getPropertyPageID() {
63: return PROP_ID;
64: }
65:
66: }
|