// Path: DataHierarchy/src/de/loskutov/dh/DataHierarchyPlugin.java
// public class DataHierarchyPlugin extends AbstractUIPlugin {
// 
//     private static DataHierarchyPlugin plugin;
// 
//     private int viewCount;
// 
//     public static final Object JOB_FAMILY = DataHierarchyPlugin.class;
// 
//     public DataHierarchyPlugin() {
//         super();
//     }
// 
//     public static void logError(String message, Throwable e) {
//         if (message == null) {
//             message = e.getMessage();
//             if (message == null) {
//                 message = e.toString();
//             }
//         }
//         getDefault().getLog().log(new Status(IStatus.ERROR, getId(), IStatus.OK, message, e));
//     }
// 
//     public static void showError(String message, Throwable error) {
//         Shell shell = getShell();
//         if (message == null) {
//             message = Messages.error;
//         }
//         message = message + " " + error.getMessage();
// 
//         getDefault().getLog().log(new Status(IStatus.ERROR, getId(), IStatus.OK, message, error));
// 
//         MessageDialog.openError(shell, Messages.title, message);
//     }
// 
//     public static Shell getShell() {
//         return getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
//     }
// 
//     public static String getId() {
//         return getDefault().getBundle().getSymbolicName();
//     }
// 
//     @Override
//     public void start(BundleContext context) throws Exception {
//         super.start(context);
//         if(plugin == null) {
//             plugin = this;
//         }
//     }
// 
//     /**
//      * Returns the shared instance
//      *
//      * @return the shared instance
//      */
//     public static DataHierarchyPlugin 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(getId(), path);
//     }
// 
//     public static String nextViewId(){
//         DataHierarchyPlugin hierarchyPlugin = getDefault();
//         int next;
//         synchronized (hierarchyPlugin) {
//             hierarchyPlugin.viewCount ++;
//             next = hierarchyPlugin.viewCount;
//         }
//         return String.valueOf(next);
//     }
// }


import java.util.List;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
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.Group;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import de.loskutov.dh.DataHierarchyPlugin;

        TabFolder tabFolder = new TabFolder(parent, SWT.TOP);
        tabFolder.setLayout(new GridLayout(1, true));
        tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

        TabItem tabFilter = new TabItem(tabFolder, SWT.NONE);
        tabFilter.setText("Filters");

        Group defPanel = new Group(tabFolder, SWT.NONE);
        defPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        defPanel.setLayout(new GridLayout(1, false));
        defPanel.setText("Search Filters");

        tabFilter.setControl(defPanel);

        TabItem support = new TabItem(tabFolder, SWT.NONE);
        support.setText("Misc...");
        Composite supportPanel = createContainer(tabFolder);
        support.setControl(supportPanel);
        SupportPanel.createSupportLinks(supportPanel);

        return super.createContents(defPanel);
    }

    @Override
    public void init(IWorkbench workbench) {
        // noop
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {

// Path: DataHierarchy/src/de/loskutov/dh/DataHierarchyPlugin.java
// public class DataHierarchyPlugin extends AbstractUIPlugin {
// 
//     private static DataHierarchyPlugin plugin;
// 
//     private int viewCount;
// 
//     public static final Object JOB_FAMILY = DataHierarchyPlugin.class;
// 
//     public DataHierarchyPlugin() {
//         super();
//     }
// 
//     public static void logError(String message, Throwable e) {
//         if (message == null) {
//             message = e.getMessage();
//             if (message == null) {
//                 message = e.toString();
//             }
//         }
//         getDefault().getLog().log(new Status(IStatus.ERROR, getId(), IStatus.OK, message, e));
//     }
// 
//     public static void showError(String message, Throwable error) {
//         Shell shell = getShell();
//         if (message == null) {
//             message = Messages.error;
//         }
//         message = message + " " + error.getMessage();
// 
//         getDefault().getLog().log(new Status(IStatus.ERROR, getId(), IStatus.OK, message, error));
// 
//         MessageDialog.openError(shell, Messages.title, message);
//     }
// 
//     public static Shell getShell() {
//         return getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
//     }
// 
//     public static String getId() {
//         return getDefault().getBundle().getSymbolicName();
//     }
// 
//     @Override
//     public void start(BundleContext context) throws Exception {
//         super.start(context);
//         if(plugin == null) {
//             plugin = this;
//         }
//     }
// 
//     /**
//      * Returns the shared instance
//      *
//      * @return the shared instance
//      */
//     public static DataHierarchyPlugin 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(getId(), path);
//     }
// 
//     public static String nextViewId(){
//         DataHierarchyPlugin hierarchyPlugin = getDefault();
//         int next;
//         synchronized (hierarchyPlugin) {
//             hierarchyPlugin.viewCount ++;
//             next = hierarchyPlugin.viewCount;
//         }
//         return String.valueOf(next);
//     }
// }


// Path: DataHierarchy/src/de/loskutov/dh/preferences/DataHierarchyPreferencePage.java
import java.util.List;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
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.Group;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import de.loskutov.dh.DataHierarchyPlugin;

        TabFolder tabFolder = new TabFolder(parent, SWT.TOP);
        tabFolder.setLayout(new GridLayout(1, true));
        tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

        TabItem tabFilter = new TabItem(tabFolder, SWT.NONE);
        tabFilter.setText("Filters");

        Group defPanel = new Group(tabFolder, SWT.NONE);
        defPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        defPanel.setLayout(new GridLayout(1, false));
        defPanel.setText("Search Filters");

        tabFilter.setControl(defPanel);

        TabItem support = new TabItem(tabFolder, SWT.NONE);
        support.setText("Misc...");
        Composite supportPanel = createContainer(tabFolder);
        support.setControl(supportPanel);
        SupportPanel.createSupportLinks(supportPanel);

        return super.createContents(defPanel);
    }

    @Override
    public void init(IWorkbench workbench) {
        // noop
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {

        return DataHierarchyPlugin.getDefault().getPreferenceStore();
