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=ebb8975ab97f40c767f7040a255fc9aeff69acba;hb=648fc6e69e09fe4467cb6bac47934be1a7dcf0d6;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..ebb8975a 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; @@ -11,7 +12,8 @@ public class MemoryCellEditingSupport extends NumberCellEditingSupport { public MemoryCellEditingSupport(TableViewer viewer, DisplaySettings displaySettings) { - super(viewer, displaySettings); + // TODO maybe allow X here too? + super(viewer, displaySettings, false); } @Override @@ -27,4 +29,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