X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FMnemonicEditingSupport.java;h=7248f4f522bd2b45a5200f41219acb486bb20a26;hb=648fc6e69e09fe4467cb6bac47934be1a7dcf0d6;hp=1140e6838e91e40b6ab5ced72caa9dc2f889f99c;hpb=95b1269b5d1ff51f4321e2182d3c37efa6ae093a;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/MnemonicEditingSupport.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/MnemonicEditingSupport.java index 1140e683..7248f4f5 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/MnemonicEditingSupport.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/MnemonicEditingSupport.java @@ -25,8 +25,10 @@ public class MnemonicEditingSupport extends EditingSupport super(viewer); family = (MnemonicFamily) definition.getParameterClassifications()[index]; editor = new ComboBoxCellEditor(viewer.getTable(), family.getStringValues(), SWT.READ_ONLY); + editor.setActivationStyle( + ComboBoxCellEditor.DROP_DOWN_ON_TRAVERSE_ACTIVATION | ComboBoxCellEditor.DROP_DOWN_ON_PROGRAMMATIC_ACTIVATION + | ComboBoxCellEditor.DROP_DOWN_ON_MOUSE_ACTIVATION | ComboBoxCellEditor.DROP_DOWN_ON_KEY_ACTIVATION); this.index = index; - editor.setValidator(new MnemonicCellEditorValidator(family)); this.provider = provider; } @@ -54,7 +56,10 @@ public class MnemonicEditingSupport extends EditingSupport { InstructionTableRow row = ((InstructionTableRow) element); MicroInstructionParameter[] params = row.data.getCell(row.address).getParameters(); - params[index] = family.get((Integer) value); + Mnemonic newParam = family.get((Integer) value); + if (newParam.equals(params[index])) + return; + params[index] = newParam; row.data.setCell(row.address, MicroInstruction.create(params)); provider.update(row.address); }