projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
648fc6e
)
MPROMEditor now calls its columns "Opcode" and "muPC"
master
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Thu, 14 Jan 2021 12:19:46 +0000
(13:19 +0100)
committer
Daniel 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
patch
|
blob
|
history
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MPROMEditor.java
patch
|
blob
|
history
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/MainMemoryEditor.java
patch
|
blob
|
history
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
e306cff
..
0391511
100644
(file)
--- 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 LazyTableViewer viewer;
private MemoryTableContentProvider provider;
private DisplaySettings displaySettings;
+ private final String addrColName;
+ private final String dataColName;
private Collection<Control> fontDependent = new HashSet<>();
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;
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;
}
memListener = this::cellModified;
}
@@
-197,10
+202,10
@@
public abstract class AbstractMemoryEditor extends EditorPart
private void createColumns()
{
private void createColumns()
{
- TableViewerColumn addrCol = createTableViewerColumn(
"Address"
, 100);
+ TableViewerColumn addrCol = createTableViewerColumn(
addrColName
, 100);
addrCol.setLabelProvider(new AddressLabelProvider());
addrCol.setLabelProvider(new AddressLabelProvider());
- TableViewerColumn dataCol = createTableViewerColumn(
"Data"
, 100);
+ TableViewerColumn dataCol = createTableViewerColumn(
dataColName
, 100);
dataCol.setLabelProvider(new NumberColumnLabelProvider(displaySettings)
{
@Override
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
9c6ce81
..
c64bd38
100644
(file)
--- 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 class MPROMEditor extends AbstractMemoryEditor
{
+ public MPROMEditor()
+ {
+ super("Opcode", "\u00b5PC"); // 00b5 = mu / micro symbol
+ }
+
@Override
protected BitVectorMemory createEmptyMemory(MachineDefinition activeMachineDefinition)
{
@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
6d0d7b5
..
318ee9d
100644
(file)
--- 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 class MainMemoryEditor extends AbstractMemoryEditor
{
+ public MainMemoryEditor()
+ {
+ super("Address", "Data");
+ }
+
@Override
protected BitVectorMemory createEmptyMemory(MachineDefinition activeMachineDefinition)
{
@Override
protected BitVectorMemory createEmptyMemory(MachineDefinition activeMachineDefinition)
{