// Path: e3-based-application/org.fipro.eclipse.migration.ui/src/org/fipro/eclipse/migration/ui/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "org.fipro.eclipse.migration.ui"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static Activator plugin;
// 	
// 	/**
// 	 * The constructor
// 	 */
// 	public Activator() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
// 	 */
// 	@Override
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
// 	 */
// 	@Override
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 *
// 	 * @return the shared instance
// 	 */
// 	public static Activator getDefault() {
// 		return plugin;
// 	}
// 
// 	/**
// 	 * Returns an image descriptor for the image file at the given
// 	 * plug-in relative path
// 	 *
// 	 * @param path the path
// 	 * @return the image descriptor
// 	 */
// 	public static ImageDescriptor getImageDescriptor(String path) {
// 		return imageDescriptorFromPlugin(PLUGIN_ID, path);
// 	}
// }


import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.fipro.eclipse.migration.ui.Activator;

		// Reset the fields to the defaults
		checkBoxBlack.setSelection(isBlack);
		checkBoxBlue.setSelection(!isBlack);
	}

	/**
	 * Called when user clicks Apply or OK
	 * 
	 * @return boolean
	 */
	@Override
	public boolean performOk() {
		// Get the preference store
		IPreferenceStore preferenceStore = getPreferenceStore();

		// Set the values from the fields
		if (checkBoxBlack != null && checkBoxBlack.getSelection()) {
			preferenceStore.setValue(DESCRIPTION_COLOR, "black");
		}
		else if (checkBoxBlue != null && checkBoxBlue.getSelection()) {
			preferenceStore.setValue(DESCRIPTION_COLOR, "blue");
		}

		// Return true to allow dialog to close
		return true;
	}

	@Override
	public void init(IWorkbench workbench) {
// Path: e3-based-application/org.fipro.eclipse.migration.ui/src/org/fipro/eclipse/migration/ui/Activator.java
// public class Activator extends AbstractUIPlugin {
// 
// 	// The plug-in ID
// 	public static final String PLUGIN_ID = "org.fipro.eclipse.migration.ui"; //$NON-NLS-1$
// 
// 	// The shared instance
// 	private static Activator plugin;
// 	
// 	/**
// 	 * The constructor
// 	 */
// 	public Activator() {
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
// 	 */
// 	@Override
// 	public void start(BundleContext context) throws Exception {
// 		super.start(context);
// 		plugin = this;
// 	}
// 
// 	/*
// 	 * (non-Javadoc)
// 	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
// 	 */
// 	@Override
// 	public void stop(BundleContext context) throws Exception {
// 		plugin = null;
// 		super.stop(context);
// 	}
// 
// 	/**
// 	 * Returns the shared instance
// 	 *
// 	 * @return the shared instance
// 	 */
// 	public static Activator getDefault() {
// 		return plugin;
// 	}
// 
// 	/**
// 	 * Returns an image descriptor for the image file at the given
// 	 * plug-in relative path
// 	 *
// 	 * @param path the path
// 	 * @return the image descriptor
// 	 */
// 	public static ImageDescriptor getImageDescriptor(String path) {
// 		return imageDescriptorFromPlugin(PLUGIN_ID, path);
// 	}
// }


// Path: e3-based-application/org.fipro.eclipse.migration.ui/src/org/fipro/eclipse/migration/ui/preferences/DescriptionPreferencePage.java
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.fipro.eclipse.migration.ui.Activator;


		// Reset the fields to the defaults
		checkBoxBlack.setSelection(isBlack);
		checkBoxBlue.setSelection(!isBlack);
	}

	/**
	 * Called when user clicks Apply or OK
	 * 
	 * @return boolean
	 */
	@Override
	public boolean performOk() {
		// Get the preference store
		IPreferenceStore preferenceStore = getPreferenceStore();

		// Set the values from the fields
		if (checkBoxBlack != null && checkBoxBlack.getSelection()) {
			preferenceStore.setValue(DESCRIPTION_COLOR, "black");
		}
		else if (checkBoxBlue != null && checkBoxBlue.getSelection()) {
			preferenceStore.setValue(DESCRIPTION_COLOR, "blue");
		}

		// Return true to allow dialog to close
		return true;
	}

	@Override
	public void init(IWorkbench workbench) {
		setPreferenceStore(Activator.getDefault().getPreferenceStore());