Community
Participate
Working Groups
Build Identifier: I20100608-0911 There is a ListEditor to support preferences to support editing of list of preference values. There is a need for a table based field editor for list of records with multiples fields in each record. A patch for a TableFieldEditor is attached. Sample usage: @Override protected void createFieldEditors() { TableFieldEditor folderCommandsTableEditor = new CommandTableEditor( "foldersKey", "Folder", getFieldEditorParent()); addField(folderCommandsTableEditor); } private static class CommandTableEditor extends TableFieldEditor { CommandTableEditor(String key, String item, Composite parent) { super(key, "Custom " + item + " commands:", new String[] {"Name", "Pattern", "Command"}, new int[] {150, 100, 300}, parent); } @Override protected String createList(String[][] items) { // code to join records and fields into a string goes here return ""; } @Override protected String[][] parseString(String stringList) { // code to split a persisted string value of the preference into records and fields return new String[0][0]; } @Override protected String[] getNewInputObject() { return new String[] {"", "*", ""}; } } Reproducible: Always Steps to Reproduce: N/A
Created attachment 178282 [details] patch for TableFieldEditor
Created attachment 178283 [details] TableFieldEditor example usage.
I originally developed the TableFieldEditor for use in the Path Tools plug-in. Details at: http://code.google.com/p/pathtools/
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.