KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > ui > internal > preferences > AptPreferencePage


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc. 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  * BEA Systems Inc. - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.apt.ui.internal.preferences;
13
14 import org.eclipse.jdt.apt.ui.internal.AptUIPlugin;
15 import org.eclipse.jdt.apt.ui.internal.util.IAptHelpContextIds;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
18
19 /*
20  * The page to configure the naming style options.
21  */

22 public class AptPreferencePage extends BasePreferencePage {
23
24     private static final String JavaDoc PREF_ID= "org.eclipse.jdt.apt.ui.preferences.aptPreferences"; //$NON-NLS-1$
25
private static final String JavaDoc PROP_ID= "org.eclipse.jdt.apt.ui.propertyPages.aptPreferences"; //$NON-NLS-1$
26

27     public AptPreferencePage() {
28         setPreferenceStore(AptUIPlugin.getDefault().getPreferenceStore());
29         
30         // only shown for workspace preferences
31
setDescription(Messages.AptPreferencePage_preferences);
32         
33         // only used when page is shown programatically
34
setTitle(Messages.AptPreferencePage_preferencesTitle);
35     }
36
37     /*
38      * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
39      */

40     public void createControl(Composite parent) {
41         IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer();
42         setConfigurationBlock(new AptConfigurationBlock(getNewStatusChangedListener(), getProject(), container));
43         
44         super.createControl(parent);
45     }
46
47     @Override JavaDoc
48     protected String JavaDoc 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 JavaDoc getPreferencePageID() {
56         return PREF_ID;
57     }
58     
59     /* (non-Javadoc)
60      * @see org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage#getPropertyPageID()
61      */

62     protected String JavaDoc getPropertyPageID() {
63         return PROP_ID;
64     }
65     
66     
67
68 }
69
70
71
72
Popular Tags