X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Ftables%2Fmemory%2FMemoryCellEditingSupport.java;h=6f689e7a29cd6d6b552042c1261f50efa989ec76;hb=a0fae260c3294a22c172845de26b44b3efb24ee4;hp=46eefcd91492d9306be1276d509bf44b12f28892;hpb=58babf45ae7d259a296656451d796dbe601377a4;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryCellEditingSupport.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryCellEditingSupport.java index 46eefcd9..6f689e7a 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryCellEditingSupport.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/tables/memory/MemoryCellEditingSupport.java @@ -3,6 +3,7 @@ package net.mograsim.plugin.tables.memory; import java.math.BigInteger; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.swt.widgets.Control; import net.mograsim.plugin.tables.DisplaySettings; import net.mograsim.plugin.tables.NumberCellEditingSupport; @@ -27,4 +28,15 @@ public class MemoryCellEditingSupport extends NumberCellEditingSupport MemoryTableRow row = (MemoryTableRow) element; return row.getMemory().getCellAsBigInteger(row.address); } + + @Override + public int getBitLength(Object element) + { + return ((MemoryTableRow) element).getMemory().getDefinition().getCellWidth(); + } + + public Control getCellEditorControl() + { + return editor.getControl(); + } } \ No newline at end of file