X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FIntegerEditingSupport.java;h=4f5b61616245bbf157821b3e402c9c1771fe7e6c;hb=38902818500a67f6a55973b9acbd4194f7a82838;hp=d3b48ce439d086cdc742bfcd83b98a920ca1041d;hpb=7d05144c25daa53e60fc9ed9fd503546a86567f8;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/IntegerEditingSupport.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/IntegerEditingSupport.java index d3b48ce4..4f5b6161 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/IntegerEditingSupport.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/IntegerEditingSupport.java @@ -4,9 +4,11 @@ import java.math.BigInteger; import org.eclipse.jface.viewers.TableViewer; +import net.mograsim.machine.mi.MicroInstruction; import net.mograsim.machine.mi.MicroInstructionDefinition; import net.mograsim.machine.mi.parameters.IntegerClassification; import net.mograsim.machine.mi.parameters.IntegerImmediate; +import net.mograsim.machine.mi.parameters.MicroInstructionParameter; import net.mograsim.plugin.tables.DisplaySettings; import net.mograsim.plugin.tables.NumberCellEditingSupport; @@ -29,7 +31,9 @@ public class IntegerEditingSupport extends NumberCellEditingSupport protected void setAsBigInteger(Object element, BigInteger value) { InstructionTableRow row = ((InstructionTableRow) element); - row.data.setParameter(index, new IntegerImmediate(value, classification.getExpectedBits())); + MicroInstructionParameter[] params = row.data.getCell(row.address).getParameters(); + params[index] = new IntegerImmediate(value, classification.getExpectedBits()); + row.data.setCell(row.address, MicroInstruction.create(params)); provider.update(row.address); // viewer.update(element, null); Does not do anything for some reason } @@ -37,7 +41,8 @@ public class IntegerEditingSupport extends NumberCellEditingSupport @Override protected BigInteger getAsBigInteger(Object element) { - return ((IntegerImmediate) ((InstructionTableRow) element).data.getParameter(index)).getValueAsBigInteger(); + InstructionTableRow row = ((InstructionTableRow) element); + return ((IntegerImmediate) row.data.getCell(row.address).getParameter(index)).getValueAsBigInteger(); } }