X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FInstructionTableContentProvider.java;fp=net.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmi%2FInstructionTableContentProvider.java;h=b8021b74a31e7d91e30e9ce8ca3c537f52b2809e;hb=7958e659b3ea9aac43c1a67a0b2921c5323e4c84;hp=ddca5787cd76b0e573ec3f1d9bceb90a91abec5f;hpb=a8ba08b067b7c5e449656fca56ac067d5d701270;p=Mograsim.git diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTableContentProvider.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTableContentProvider.java index ddca5787..b8021b74 100644 --- a/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTableContentProvider.java +++ b/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/mi/InstructionTableContentProvider.java @@ -10,6 +10,7 @@ public class InstructionTableContentProvider implements ILazyContentProvider { private TableViewer viewer; private MicroInstructionMemory memory; + private long minAddr = 0; @Override public void updateElement(int index) @@ -24,6 +25,14 @@ public class InstructionTableContentProvider implements ILazyContentProvider this.viewer = (TableViewer) viewer; this.memory = (MicroInstructionMemory) newInput; if (this.memory != null) + { this.viewer.setItemCount((int) memory.size()); + this.minAddr = memory.getDefinition().getMinimalAddress(); + } + } + + public void update(long address) + { + updateElement((int) (address - minAddr)); } }