blob: a87c4a522d90d29f5054d859eb7de7db103024ed [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.internal.ui.preferences;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
* The page for setting debugger work in progress preferences.
*/
public class DebugWorkInProgressPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage, IDebugPreferenceConstants {
public static final String WIP_PREF_USE_LAUNCH_WIZARD = DebugUIPlugin.getUniqueIdentifier() + ".WIP_PREF_USE_LAUNCH_WIZARD"; //$NON-NLS-1$
public DebugWorkInProgressPreferencePage() {
super(GRID);
IPreferenceStore store= DebugUIPlugin.getDefault().getPreferenceStore();
setPreferenceStore(store);
setDescription("Work In Progress"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) {
super.createControl(parent);
}
/**
* @see FieldEditorPreferencePage#createFieldEditors
*/
protected void createFieldEditors() {
addField(new BooleanFieldEditor(WIP_PREF_USE_LAUNCH_WIZARD, "Use launch wizard instead of launch dialog", SWT.NONE, getFieldEditorParent())); //$NON-NLS-1$
}
/**
* @see IWorkbenchPreferencePage#init(IWorkbench)
*/
public void init(IWorkbench workbench) {
}
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
*/
public boolean performOk() {
boolean ok= super.performOk();
DebugUIPlugin.getDefault().savePluginPreferences();
return ok;
}
}