projects
/
Mograsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9f4b106
)
Only BitDisplay now uses dashes instead of Z
author
Daniel Kirschten
<daniel.kirschten@gmx.de>
Sat, 12 Oct 2019 13:10:29 +0000
(15:10 +0200)
committer
Daniel Kirschten
<daniel.kirschten@gmx.de>
Sat, 12 Oct 2019 13:10:29 +0000
(15:10 +0200)
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java
patch
|
blob
|
history
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelBitDisplay.java
patch
|
blob
|
history
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelFixedOutput.java
patch
|
blob
|
history
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelManualSwitch.java
patch
|
blob
|
history
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineRegister.java
patch
|
blob
|
history
diff --git
a/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java
b/plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java
index
b24e342
..
8ffe07a
100644
(file)
--- a/
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java
+++ b/
plugins/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVectorFormatter.java
@@
-9,9
+9,9
@@
import net.mograsim.preferences.Preferences;
public class BitVectorFormatter
{
public class BitVectorFormatter
{
- public static String formatValueAsString(ReadEnd end)
+ public static String formatValueAsString(ReadEnd end
, boolean useDashInsteadOfZ
)
{
{
- return formatAsString(end == null ? null : end.getValues());
+ return formatAsString(end == null ? null : end.getValues()
, useDashInsteadOfZ
);
}
public static String toBitstring(BitVector bitVector)
}
public static String toBitstring(BitVector bitVector)
@@
-19,7
+19,7
@@
public class BitVectorFormatter
return bitVector.toBitstring();
}
return bitVector.toBitstring();
}
- public static String formatAsString(BitVector bitVector)
+ public static String formatAsString(BitVector bitVector
, boolean useDashInsteadOfZ
)
{
if (bitVector == null)
return "null";
{
if (bitVector == null)
return "null";
@@
-32,7
+32,7
@@
public class BitVectorFormatter
sb.append(hexdigits);
return sb.toString();
}
sb.append(hexdigits);
return sb.toString();
}
- if (bitVector.isHighImpedance())
+ if (
useDashInsteadOfZ &&
bitVector.isHighImpedance())
return "-";
return bitVector.toBitstring();
}
return "-";
return bitVector.toBitstring();
}
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelBitDisplay.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelBitDisplay.java
index
ac33266
..
1cf14e8
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelBitDisplay.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelBitDisplay.java
@@
-55,7
+55,7
@@
public class ModelBitDisplay extends ModelComponent
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
- String label = BitVectorFormatter.formatAsString(bitDisplay == null ? null : bitDisplay.getDisplayedValue());
+ String label = BitVectorFormatter.formatAsString(bitDisplay == null ? null : bitDisplay.getDisplayedValue()
, true
);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelFixedOutput.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelFixedOutput.java
index
1d3bb1e
..
bdf6546
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelFixedOutput.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelFixedOutput.java
@@
-58,7
+58,7
@@
public class ModelFixedOutput extends ModelComponent
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
- String label = BitVectorFormatter.formatAsString(bits);
+ String label = BitVectorFormatter.formatAsString(bits
, false
);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
diff --git
a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelManualSwitch.java
b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelManualSwitch.java
index
d4e0437
..
04d3b42
100644
(file)
--- a/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelManualSwitch.java
+++ b/
plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/model/components/atomic/ModelManualSwitch.java
@@
-142,7
+142,7
@@
public class ModelManualSwitch extends ModelComponent
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
if (foreground != null)
gc.setForeground(foreground);
gc.drawRectangle(getBounds());
- String label = BitVectorFormatter.formatAsString(manualSwitch == null ? null : getOutValues());
+ String label = BitVectorFormatter.formatAsString(manualSwitch == null ? null : getOutValues()
, false
);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
Font oldFont = gc.getFont();
Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());
gc.setFont(labelFont);
diff --git
a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineRegister.java
b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineRegister.java
index
e470420
..
88c6ba7
100644
(file)
--- a/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineRegister.java
+++ b/
plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/launch/MachineRegister.java
@@
-97,7
+97,7
@@
public class MachineRegister extends PlatformObject implements IRegister
public String getValueString()
{
public String getValueString()
{
- return BitVectorFormatter.formatAsString(getMachine().getRegister(machineRegister));
+ return BitVectorFormatter.formatAsString(getMachine().getRegister(machineRegister)
, false
);
}
@Override
}
@Override