Improved preference handling in plugin.core
[Mograsim.git] / plugins / net.mograsim.plugin.core / src / net / mograsim / plugin / MainPreferencePage.java
diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/MainPreferencePage.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/MainPreferencePage.java
new file mode 100644 (file)
index 0000000..69430ed
--- /dev/null
@@ -0,0 +1,27 @@
+package net.mograsim.plugin;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class MainPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage
+{
+       public MainPreferencePage()
+       {
+               super(GRID);
+       }
+
+       @Override
+       public void init(IWorkbench workbench)
+       {
+               setPreferenceStore(MograsimActivator.instance().getPreferenceStore());
+       }
+
+       @Override
+       protected void createFieldEditors()
+       {
+               addField(new BooleanFieldEditor("net.mograsim.logic.model.debug.openhlsshell", "Open the debug HLS shell", getFieldEditorParent()));
+               // TODO add other preferences
+       }
+}
\ No newline at end of file