X-Git-Url: https://mograsim.net/gitweb/?p=Mograsim.git;a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Feditors%2FAbstractMemoryEditor.java;h=03915112d9d35b97abd175d213e69ad9d01959e1;hp=e306cff65ffbf39c4f1aaa6656f6f2c2328e2202;hb=535fdb21372b0d55ada7331177e0dd72997920d2;hpb=648fc6e69e09fe4467cb6bac47934be1a7dcf0d6 diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/AbstractMemoryEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/AbstractMemoryEditor.java index e306cff6..03915112 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/AbstractMemoryEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/AbstractMemoryEditor.java @@ -59,6 +59,8 @@ public abstract class AbstractMemoryEditor extends EditorPart private LazyTableViewer viewer; private MemoryTableContentProvider provider; private DisplaySettings displaySettings; + private final String addrColName; + private final String dataColName; private Collection fontDependent = new HashSet<>(); @@ -69,8 +71,11 @@ public abstract class AbstractMemoryEditor extends EditorPart private final static String font = "net.mograsim.plugin.memory.table_font"; private IPropertyChangeListener fontChangeListener; - public AbstractMemoryEditor() + public AbstractMemoryEditor(String addrColName, String dataColName) { + this.addrColName = addrColName; + this.dataColName = dataColName; + memListener = this::cellModified; } @@ -197,10 +202,10 @@ public abstract class AbstractMemoryEditor extends EditorPart private void createColumns() { - TableViewerColumn addrCol = createTableViewerColumn("Address", 100); + TableViewerColumn addrCol = createTableViewerColumn(addrColName, 100); addrCol.setLabelProvider(new AddressLabelProvider()); - TableViewerColumn dataCol = createTableViewerColumn("Data", 100); + TableViewerColumn dataCol = createTableViewerColumn(dataColName, 100); dataCol.setLabelProvider(new NumberColumnLabelProvider(displaySettings) { @Override