MPROMEditor now calls its columns "Opcode" and "muPC" master
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Thu, 14 Jan 2021 12:19:46 +0000 (13:19 +0100)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Thu, 14 Jan 2021 12:23:00 +0000 (13:23 +0100)
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/AbstractMemoryEditor.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java

index e306cff..0391511 100644 (file)
@@ -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<Control> 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
index 9c6ce81..c64bd38 100644 (file)
@@ -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)
        {
index 6d0d7b5..318ee9d 100644 (file)
@@ -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)
        {