mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-07-01 13:33:27 +02:00
Added preferences store and UI
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package com.minres.rdl.ui.preferences
|
||||
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage
|
||||
import org.eclipse.ui.IWorkbench
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor
|
||||
import com.minres.rdl.preferences.PreferenceConstants
|
||||
import org.eclipse.ui.preferences.ScopedPreferenceStore
|
||||
import org.eclipse.core.runtime.preferences.InstanceScope
|
||||
import org.eclipse.jface.preference.ComboFieldEditor
|
||||
|
||||
class RdlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
|
||||
|
||||
new() {
|
||||
super(GRID)
|
||||
val store = new ScopedPreferenceStore(InstanceScope.INSTANCE, "com.minres.rdl.rdl");
|
||||
setPreferenceStore(store);
|
||||
setDescription("Code generator configuration options");
|
||||
}
|
||||
|
||||
override createFieldEditors() {
|
||||
addField(new BooleanFieldEditor(PreferenceConstants.P_GENERATE_CSV, "Generate CSV:", getFieldEditorParent()));
|
||||
addField(new ComboFieldEditor(PreferenceConstants.P_ADDRESSUNIT, "Address unit size", #[#["Byte (8bit)","byte"], #["Word (16bit)","word"], #["DWord (32bit)","dword"]], getFieldEditorParent()))
|
||||
}
|
||||
|
||||
override init(IWorkbench workbench) {
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user