From 8a2fbe89a9d4379b16e0f1a830ce32255ad6da23 Mon Sep 17 00:00:00 2001 From: hneemann Date: Sun, 9 Dec 2018 22:23:58 +0100 Subject: [PATCH] Added a simple compatibility check to the custom shape import. --- .../shapes/custom/CustomShapeDescription.java | 23 +++++++++++++++++++ .../gui/components/CustomShapeEditor.java | 10 ++++++-- src/main/resources/lang/lang_de.xml | 1 + src/main/resources/lang/lang_en.xml | 1 + 4 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/neemann/digital/draw/shapes/custom/CustomShapeDescription.java b/src/main/java/de/neemann/digital/draw/shapes/custom/CustomShapeDescription.java index 2f25e3ae7..0484dfa6d 100644 --- a/src/main/java/de/neemann/digital/draw/shapes/custom/CustomShapeDescription.java +++ b/src/main/java/de/neemann/digital/draw/shapes/custom/CustomShapeDescription.java @@ -5,6 +5,10 @@ */ package de.neemann.digital.draw.shapes.custom; +import de.neemann.digital.core.ObservableValue; +import de.neemann.digital.core.ObservableValues; +import de.neemann.digital.core.element.PinDescription; +import de.neemann.digital.draw.elements.Circuit; import de.neemann.digital.draw.elements.PinException; import de.neemann.digital.draw.graphics.*; import de.neemann.digital.draw.graphics.Polygon; @@ -197,6 +201,25 @@ public class CustomShapeDescription implements Iterable Mehr als einen Programmspeicher gefunden. Es darf nur einen Programmspeicher geben. Fehler beim Laden des Programmspeichers. Fehler beim Laden der SVG-Datei. + Die SVG-Datei enthält Pins, die es in der Schaltung nicht gibt. Adress-Bits Anzahl der Adress-Bits, die verwendet werden. diff --git a/src/main/resources/lang/lang_en.xml b/src/main/resources/lang/lang_en.xml index 7dbe1e89d..8e321c43c 100644 --- a/src/main/resources/lang/lang_en.xml +++ b/src/main/resources/lang/lang_en.xml @@ -960,6 +960,7 @@ More then one program memories found! Only one program memory must be flages as such. Error loading the program memory. Error while reading the SVG file. + The SVG file contains pins that do not exist in the circuit. Address Bits Number of address bits used.