blob: 82fbac8260ef19b01ad13cd07be269b400432fe1 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
*
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.jpt.ui.internal.preferences;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jpt.ui.JptUiPlugin;
import org.eclipse.jpt.ui.internal.JptUiMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
* This is the root of the Java Persistence preferences hierarchy in the IDE
* preferences dialog.
* <p>
* Structure:
* <p>
* Java Persistence<br>
* |- Errors/Warnings
*
* @version 2.2
* @since 2.2
*/
public class JpaPreferencesPage extends PreferencePage
implements IWorkbenchPreferencePage {
/**
* Creates a new <code>JpaPreferencesPage</code>.
*/
public JpaPreferencesPage() {
super();
}
/**
* {@inheritDoc}
*/
@Override
protected Control createContents(Composite parent) {
parent = new Composite(parent, SWT.NONE);
parent.setLayout(new GridLayout(1, false));
// Message label
Label label = new Label(parent, SWT.NONE);
label.setText(JptUiMessages.JpaPreferencesPage_Description);
label.setData(new GridData(GridData.BEGINNING, GridData.BEGINNING, true, true));
return parent;
}
/**
* {@inheritDoc}
*/
public void init(IWorkbench workbench) {
setPreferenceStore(JptUiPlugin.instance().getPreferenceStore());
}
}