mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 22:41:59 -04:00
Correct error message if no equations are available in the TableDialog.
This commit is contained in:
parent
bf4b8c3976
commit
22b5e497f5
@ -595,13 +595,21 @@ public class TableDialog extends JDialog {
|
||||
expressionListener = new ExpressionListenerJK(expressionListener);
|
||||
|
||||
lastGeneratedExpressions = new ExpressionListenerStore(expressionListener);
|
||||
new ExpressionCreator(model.getTable(), minimizer).create(lastGeneratedExpressions);
|
||||
final int numVars = model.getTable().getVars().size();
|
||||
new ExpressionCreator(model.getTable(), getMinimizer(numVars)).create(lastGeneratedExpressions);
|
||||
|
||||
} catch (ExpressionException | FormatterException | AnalyseException e1) {
|
||||
lastGeneratedExpressions = null;
|
||||
new ErrorMessage(Lang.get("msg_errorDuringCalculation")).addCause(e1).show();
|
||||
}
|
||||
}
|
||||
|
||||
private MinimizerInterface getMinimizer(int size) {
|
||||
if (size<=4)
|
||||
return new MinimizerQuineMcCluskeyExam();
|
||||
else
|
||||
return minimizer;
|
||||
}
|
||||
|
||||
private final class SizeAction extends AbstractAction {
|
||||
private int n;
|
||||
@ -680,6 +688,9 @@ public class TableDialog extends JDialog {
|
||||
}
|
||||
|
||||
public void create(ExpressionListenerStore expressions) throws ExpressionException, FormatterException {
|
||||
if (expressions==null)
|
||||
throw new ExpressionException(Lang.get("err_noExpressionsAvailable"));
|
||||
|
||||
ExpressionListener el = new ExpressionListener() {
|
||||
@Override
|
||||
public void resultFound(String name, Expression expression) throws FormatterException, ExpressionException {
|
||||
|
@ -449,6 +449,7 @@ Es sind nur {1} Variablen erlaubt, es wurden jedoch {2} gefunden.</string>
|
||||
<string name="err_processDoesNotTerminate_N">Der Prozess "{0}" wird nicht beendet!</string>
|
||||
<string name="err_processExitedWithError_N1_N2">Der Prozess meldet den Rückgabewert {0}: {1}</string>
|
||||
<string name="err_errorRunningFitter">Fehler beim Starten des externen Fitters!</string>
|
||||
<string name="err_noExpressionsAvailable">Es liegen keine minimierten Gleichungen vor!</string>
|
||||
|
||||
<string name="key_AddrBits">Adress-Bits</string>
|
||||
<string name="key_AddrBits_tt">Anzahl der Adress-Bits die verwendet werden.</string>
|
||||
|
@ -436,6 +436,7 @@ allowed are {1} variables but {2} are found.</string>
|
||||
<string name="err_processDoesNotTerminate_N">The process "{0}" does not return!</string>
|
||||
<string name="err_processExitedWithError_N1_N2">The process returns the non zero value {0}: {1}</string>
|
||||
<string name="err_errorRunningFitter">Error starting the external fitter!</string>
|
||||
<string name="err_noExpressionsAvailable">There are no minimized equations!</string>
|
||||
|
||||
<string name="key_AddrBits">Address Bits</string>
|
||||
<string name="key_AddrBits_tt">Number of address bits used.</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user