mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-29 07:50:29 -04:00
Merge branch 'master' into undo
This commit is contained in:
commit
f2513b1c87
@ -28,14 +28,7 @@ public class MissingShape implements Shape {
|
||||
*/
|
||||
public MissingShape(String elementName, Exception cause) {
|
||||
this.message = Lang.get("msg_missingShape_N", elementName);
|
||||
this.cause = getMessage(cause);
|
||||
}
|
||||
|
||||
private String getMessage(Throwable e) {
|
||||
String message = e.getMessage();
|
||||
if (e.getCause() != null)
|
||||
message += "; " + getMessage(e.getCause());
|
||||
return message;
|
||||
this.cause = cause.getMessage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,10 +13,7 @@ import de.neemann.digital.gui.components.testing.TestDataEditor;
|
||||
import de.neemann.digital.gui.sync.NoSync;
|
||||
import de.neemann.digital.lang.Lang;
|
||||
import de.neemann.digital.testing.TestData;
|
||||
import de.neemann.gui.ErrorMessage;
|
||||
import de.neemann.gui.LineBreaker;
|
||||
import de.neemann.gui.MyFileChooser;
|
||||
import de.neemann.gui.ToolTipAction;
|
||||
import de.neemann.gui.*;
|
||||
import de.neemann.gui.language.Bundle;
|
||||
import de.neemann.gui.language.Language;
|
||||
|
||||
@ -242,7 +239,15 @@ public final class EditorFactory {
|
||||
button.setBackground(color);
|
||||
}
|
||||
}
|
||||
});
|
||||
}) {
|
||||
@Override
|
||||
protected void paintComponent(Graphics graphics) {
|
||||
graphics.setColor(Color.WHITE);
|
||||
graphics.fillRect(0, 0, getWidth(), getHeight());
|
||||
super.paintComponent(graphics);
|
||||
}
|
||||
};
|
||||
button.setPreferredSize(new Dimension(10, Screen.getInstance().getFontSize() * 3 / 2));
|
||||
button.setBackground(color);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.neemann.digital.testing;
|
||||
|
||||
import de.neemann.digital.lang.Lang;
|
||||
import de.neemann.digital.testing.parser.LineEmitter;
|
||||
import de.neemann.digital.testing.parser.Parser;
|
||||
import de.neemann.digital.testing.parser.ParserException;
|
||||
@ -66,7 +67,7 @@ public class TestData {
|
||||
lines = tdp.getLines();
|
||||
names = tdp.getNames();
|
||||
} catch (ParserException | IOException e) {
|
||||
throw new TestingDataException(e);
|
||||
throw new TestingDataException(Lang.get("err_errorParsingTestdata"), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class TestResult {
|
||||
try {
|
||||
lines.emitLines(new LineListenerResolveDontCare(values -> checkRow(model, values), inputs), new Context());
|
||||
} catch (ParserException e) {
|
||||
throw new TestingDataException(e);
|
||||
throw new TestingDataException(Lang.get("err_errorParsingTestdata"), e);
|
||||
} catch (RuntimeException e) {
|
||||
if (allPassed) {
|
||||
allPassed = false;
|
||||
|
@ -7,10 +7,11 @@ public class TestingDataException extends Exception {
|
||||
/**
|
||||
* creates a new instance
|
||||
*
|
||||
* @param cause the cause
|
||||
* @param message the error message
|
||||
* @param cause the cause
|
||||
*/
|
||||
public TestingDataException(Exception cause) {
|
||||
super(cause);
|
||||
public TestingDataException(String message, Exception cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ public class ErrorMessage implements Runnable {
|
||||
message.append(e.getClass().getSimpleName());
|
||||
e = e.getCause();
|
||||
if (e != null)
|
||||
message.append("\ncaused by: ");
|
||||
message.append("\n").append(Lang.get("msg_errCausedBy")).append(": ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,6 +529,7 @@ Sind evtl. die Namen der Variablen nicht eindeutig?</string>
|
||||
<string name="err_MultiBitFlipFlopFound">Es sind keine Flipflops mit mehr als einem Bit erlaubt!</string>
|
||||
<string name="err_invalidTransmissionGateState">Die Steuereingänge eines Transmission-Gates müssen invertiert beschaltet werden!</string>
|
||||
<string name="err_nameUsedTwice_N">Signal {0} wurde mehrfach verwendet!</string>
|
||||
<string name="err_errorParsingTestdata">Fehler beim Einlesen der Testdaten.</string>
|
||||
|
||||
<string name="key_AddrBits">Adress-Bits</string>
|
||||
<string name="key_AddrBits_tt">Anzahl der Adress-Bits die verwendet werden.</string>
|
||||
@ -870,6 +871,7 @@ Die Icons stammen aus dem Tango Desktop Project.</string>
|
||||
<string name="btn_gifComplete">Fertig</string>
|
||||
<string name="btn_gifComplete_tt">Die GIF-Datei wird abgeschlossen.</string>
|
||||
<string name="msg_gifExport">GIF-Export</string>
|
||||
<string name="msg_errCausedBy">verursacht durch</string>
|
||||
|
||||
<string name="ok">Ok</string>
|
||||
<string name="rot_0">0°</string>
|
||||
|
@ -429,8 +429,8 @@
|
||||
<string name="error">Error</string>
|
||||
<string name="err_N_isNotInputOrOutput">Pin {0} in component {1} is not a input or output</string>
|
||||
<string name="err_aSingleClockNecessary">A single clock component is necessary. All flip-flops must use this clock signal.</string>
|
||||
<string name="err_analyseNoInputs">The circuit has no Inputs</string>
|
||||
<string name="err_analyseNoOutputs">The circuit has no outputs</string>
|
||||
<string name="err_analyseNoInputs">The circuit has no labeled inputs</string>
|
||||
<string name="err_analyseNoOutputs">The circuit has no labeled outputs</string>
|
||||
<string name="err_breakTimeOut">Break timeout after {0} cycles</string>
|
||||
<string name="err_builder_exprNotSupported">Expression {0} not supported</string>
|
||||
<string name="err_builder_operationNotSupported">Operation {0} not supported</string>
|
||||
@ -519,6 +519,7 @@ The names of the variables may not be unique.</string>
|
||||
<string name="err_MultiBitFlipFlopFound">Flipflops with more then one bits are not allowed!</string>
|
||||
<string name="err_invalidTransmissionGateState">The two control inputs of a transmission gate must be inverted!</string>
|
||||
<string name="err_nameUsedTwice_N">Signal {0} is used twice!</string>
|
||||
<string name="err_errorParsingTestdata">Error parsing the test data.</string>
|
||||
|
||||
<string name="key_AddrBits">Address Bits</string>
|
||||
<string name="key_AddrBits_tt">Number of address bits used.</string>
|
||||
@ -858,6 +859,7 @@ The icons are taken from the Tango Desktop Project.</string>
|
||||
<string name="btn_gifComplete">Ready</string>
|
||||
<string name="btn_gifComplete_tt">The GIF file is finalized and closed.</string>
|
||||
<string name="msg_gifExport">GIF Export</string>
|
||||
<string name="msg_errCausedBy">caused by</string>
|
||||
|
||||
<string name="ok">Ok</string>
|
||||
<string name="rot_0">0°</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user