From: Daniel Kirschten Date: Thu, 14 Jan 2021 12:19:46 +0000 (+0100) Subject: MPROMEditor now calls its columns "Opcode" and "muPC" X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=HEAD;p=Mograsim.git MPROMEditor now calls its columns "Opcode" and "muPC" --- 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 diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java index 9c6ce817..c64bd389 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java @@ -6,6 +6,11 @@ import net.mograsim.machine.mi.StandardMPROM; public class MPROMEditor extends AbstractMemoryEditor { + public MPROMEditor() + { + super("Opcode", "\u00b5PC"); // 00b5 = mu / micro symbol + } + @Override protected BitVectorMemory createEmptyMemory(MachineDefinition activeMachineDefinition) { diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java index 6d0d7b52..318ee9d7 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java @@ -6,6 +6,11 @@ import net.mograsim.machine.StandardMainMemory; public class MainMemoryEditor extends AbstractMemoryEditor { + public MainMemoryEditor() + { + super("Address", "Data"); + } + @Override protected BitVectorMemory createEmptyMemory(MachineDefinition activeMachineDefinition) {