diff --git a/diylc/diylc-core/.classpath b/diylc/diylc-core/.classpath index b52b9a355..4905130d1 100644 --- a/diylc/diylc-core/.classpath +++ b/diylc/diylc-core/.classpath @@ -8,7 +8,7 @@ - + diff --git a/diylc/diylc-core/lib/app-framework.jar b/diylc/diylc-core/lib/app-framework.jar index e8515ab12..ad805805a 100644 Binary files a/diylc/diylc-core/lib/app-framework.jar and b/diylc/diylc-core/lib/app-framework.jar differ diff --git a/diylc/diylc-core/lib/java-http-proxy.jar b/diylc/diylc-core/lib/java-http-proxy.jar index 05f39078e..9295029e9 100644 Binary files a/diylc/diylc-core/lib/java-http-proxy.jar and b/diylc/diylc-core/lib/java-http-proxy.jar differ diff --git a/diylc/diylc-core/lib/xstream-1.4.19.jar b/diylc/diylc-core/lib/xstream-1.4.19.jar new file mode 100644 index 000000000..95d1c6a64 Binary files /dev/null and b/diylc/diylc-core/lib/xstream-1.4.19.jar differ diff --git a/diylc/diylc-core/lib/xstream-1.4.3.jar b/diylc/diylc-core/lib/xstream-1.4.3.jar deleted file mode 100644 index 815ed039b..000000000 Binary files a/diylc/diylc-core/lib/xstream-1.4.3.jar and /dev/null differ diff --git a/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java b/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java index e2fd94562..61349b069 100644 --- a/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java +++ b/diylc/diylc-core/src/org/diylc/core/IDIYComponent.java @@ -50,7 +50,7 @@ public interface IDIYComponent extends Serializable, Cloneable { public static final int CHASSIS = 1; public static final int BOARD = 2; - public static final int TRACE = 3; + public static final int WIRING = 3; public static final int COMPONENT = 4; public static final int TEXT = 5; diff --git a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java index 86c7133f5..254e466c3 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/Presenter.java +++ b/diylc/diylc-core/src/org/diylc/presenter/Presenter.java @@ -98,6 +98,7 @@ import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; +import com.thoughtworks.xstream.security.AnyTypePermission; /** * The main presenter class, contains core app logic and drawing routines. @@ -143,6 +144,7 @@ public class Presenter implements IPlugInPort { if (resource != null) { BufferedInputStream in = new BufferedInputStream(resource.openStream()); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); @SuppressWarnings("unchecked") List allVersions = (List) xStream.fromXML(in); CURRENT_VERSION = allVersions.get(allVersions.size() - 1).getVersionNumber(); @@ -2593,6 +2595,7 @@ public void saveSelectedComponentAsVariant(String variantName) { try { BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("variants.xml")); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); xStream.toXML(defaultVariantMap, out); out.close(); // no more user variants @@ -2615,6 +2618,7 @@ private void importDefaultVariants() { if (resource != null) { BufferedInputStream in = new BufferedInputStream(resource.openStream()); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); Map> defaults = (Map>) xStream.fromXML(in); in.close(); @@ -2654,6 +2658,7 @@ private void importDefaultBlocks() { if (resource != null) { BufferedInputStream in = new BufferedInputStream(resource.openStream()); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); Map>> defaults = (Map>>) xStream.fromXML(in); in.close(); @@ -2937,6 +2942,7 @@ public int compare(IDIYComponent o1, IDIYComponent o2) { try { BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("blocks.xml")); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); xStream.toXML(defaultBlockMap, out); out.close(); // no more user variants @@ -3015,6 +3021,7 @@ public int importVariants(String fileName) throws IOException { LOG.debug(String.format("importVariants(%s)", fileName)); BufferedInputStream in = new BufferedInputStream(new FileInputStream(fileName)); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); VariantPackage pkg; @@ -3064,6 +3071,7 @@ public int importBlocks(String fileName) throws IOException { LOG.debug(String.format("importBlocks(%s)", fileName)); BufferedInputStream in = new BufferedInputStream(new FileInputStream(fileName)); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); BuildingBlockPackage pkg; diff --git a/diylc/diylc-core/src/org/diylc/presenter/update.xml b/diylc/diylc-core/src/org/diylc/presenter/update.xml index 96bc84118..d9ffff2f8 100644 --- a/diylc/diylc-core/src/org/diylc/presenter/update.xml +++ b/diylc/diylc-core/src/org/diylc/presenter/update.xml @@ -3605,5 +3605,37 @@ https://github.com/bancika/diy-layout-creator/releases + + + 4 + 21 + 0 + + 2022-02-16 00:00:00.000 CET + + + + BUG_FIX + Fixed compatibility issues with Java version 16 and above + + + NEW_FEATURE + Added 'Gray' theme + + + IMPROVEMENT + Add shabang to run.sh for *nix systems + + + IMPROVEMENT + Prevent the donation label from wrapping into several lines + + + IMPROVEMENT + Use Backspace key to delete selection in Mac OS + + + https://github.com/bancika/diy-layout-creator/releases + diff --git a/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java b/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java index 0d710608e..0114b0ba8 100644 --- a/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java +++ b/diylc/diylc-core/src/org/diylc/serialization/ProjectFileManager.java @@ -58,6 +58,7 @@ DIY Layout Creator (DIYLC). import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; import com.thoughtworks.xstream.mapper.MapperWrapper; +import com.thoughtworks.xstream.security.AnyTypePermission; public class ProjectFileManager { @@ -97,7 +98,8 @@ public boolean shouldSerializeMember(Class definedIn, String fieldName) { } }; configure(xStream); - this.xStreamOld = new XStream(new DomDriver()); + this.xStreamOld = new XStream(new DomDriver()); + this.xStreamOld.addPermission(AnyTypePermission.ANY); xStreamOld.autodetectAnnotations(true); this.messageDispatcher = messageDispatcher; } @@ -126,6 +128,7 @@ public static void configure(XStream xStream) { xStream.addImmutableType(org.diylc.core.measures.Power.class); xStream.addImmutableType(org.diylc.core.measures.Inductance.class); xStream.addImmutableType(org.diylc.core.measures.Size.class); + xStream.addPermission(AnyTypePermission.ANY); } public void startNewFile() { diff --git a/diylc/diylc-core/src/org/diylc/utils/VersionReader.java b/diylc/diylc-core/src/org/diylc/utils/VersionReader.java index a11fae018..133f3e371 100644 --- a/diylc/diylc-core/src/org/diylc/utils/VersionReader.java +++ b/diylc/diylc-core/src/org/diylc/utils/VersionReader.java @@ -12,6 +12,7 @@ import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; +import com.thoughtworks.xstream.security.AnyTypePermission; public class VersionReader { public static void main(String[] args) { @@ -20,6 +21,7 @@ public static void main(String[] args) { if (resource != null) { BufferedInputStream in = new BufferedInputStream(resource.openStream()); XStream xStream = new XStream(new DomDriver()); + xStream.addPermission(AnyTypePermission.ANY); @SuppressWarnings("unchecked") List allVersions = (List) xStream.fromXML(in); Version latest = allVersions.get(allVersions.size() - 1); diff --git a/diylc/diylc-library/.classpath b/diylc/diylc-library/.classpath index 0b3ed2f46..a84d409de 100644 --- a/diylc/diylc-library/.classpath +++ b/diylc/diylc-library/.classpath @@ -7,8 +7,8 @@ + - diff --git a/diylc/diylc-library/lib/app-framework.jar b/diylc/diylc-library/lib/app-framework.jar index e8515ab12..ad805805a 100644 Binary files a/diylc/diylc-library/lib/app-framework.jar and b/diylc/diylc-library/lib/app-framework.jar differ diff --git a/diylc/diylc-library/lib/diylc-core.jar b/diylc/diylc-library/lib/diylc-core.jar index dbaf43ff8..1cd82f6de 100644 Binary files a/diylc/diylc-library/lib/diylc-core.jar and b/diylc/diylc-library/lib/diylc-core.jar differ diff --git a/diylc/diylc-library/lib/xstream-1.4.19.jar b/diylc/diylc-library/lib/xstream-1.4.19.jar new file mode 100644 index 000000000..95d1c6a64 Binary files /dev/null and b/diylc/diylc-library/lib/xstream-1.4.19.jar differ diff --git a/diylc/diylc-library/lib/xstream-1.4.3.jar b/diylc/diylc-library/lib/xstream-1.4.3.jar deleted file mode 100644 index 815ed039b..000000000 Binary files a/diylc/diylc-library/lib/xstream-1.4.3.jar and /dev/null differ diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java b/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java index 94356dfa9..0506f7cff 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/CopperTrace.java @@ -38,7 +38,7 @@ @ComponentDescriptor(name = "Copper Trace", author = "Branislav Stojkovic", category = "Connectivity", creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "Trace", - description = "Straight copper trace", zOrder = IDIYComponent.TRACE, bomPolicy = BomPolicy.NEVER_SHOW, + description = "Straight copper trace", zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB", transformer = SimpleComponentTransformer.class) public class CopperTrace extends AbstractLeadedComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java b/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java index c73c05c87..340e8dd07 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/CurvedTrace.java @@ -38,7 +38,7 @@ @ComponentDescriptor(name = "Curved Trace", author = "Branislav Stojkovic", category = "Connectivity", instanceNamePrefix = "Trace", description = "Curved copper trace with two control points", - zOrder = IDIYComponent.TRACE, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, + zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB", transformer = SimpleComponentTransformer.class, enableCache = true) public class CurvedTrace extends AbstractCurvedComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java index 38cc77d17..b51f1bdf0 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Eyelet.java @@ -46,7 +46,7 @@ DIY Layout Creator (DIYLC). @ComponentDescriptor(name = "Eyelet", category = "Connectivity", author = "Branislav Stojkovic", description = "Eyelet or turret terminal", instanceNamePrefix = "Eyelet", - zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, + zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class, enableCache = true) public class Eyelet extends AbstractComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java b/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java index a81c79cc6..9406acd5b 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/GroundFill.java @@ -42,7 +42,7 @@ DIY Layout Creator (DIYLC). import org.diylc.core.measures.SizeUnit; @ComponentDescriptor(name = "Ground Fill", author = "Branislav Stojkovic", category = "Connectivity", - instanceNamePrefix = "GF", description = "Polygonal ground fill area", zOrder = IDIYComponent.TRACE, + instanceNamePrefix = "GF", description = "Polygonal ground fill area", zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class) public class GroundFill extends AbstractComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java b/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java index 3d2c1d372..59dbf9aef 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/HookupWire.java @@ -39,7 +39,7 @@ import org.diylc.utils.Constants; @ComponentDescriptor(name = "Hookup Wire", author = "Branislav Stojkovic", category = "Connectivity", - instanceNamePrefix = "W", description = "Flexible wire with two control points", zOrder = IDIYComponent.COMPONENT, + instanceNamePrefix = "W", description = "Flexible wire with two control points", zOrder = IDIYComponent.WIRING, flexibleZOrder = true, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class, enableCache = true) public class HookupWire extends AbstractCurvedComponent implements IContinuity { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java index 0392d5154..4e0609aef 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Jumper.java @@ -41,7 +41,7 @@ DIY Layout Creator (DIYLC). @ComponentDescriptor(name = "Jumper", author = "Branislav Stojkovic", category = "Connectivity", creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "J", description = "", - zOrder = IDIYComponent.COMPONENT, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, + zOrder = IDIYComponent.WIRING, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class) public class Jumper extends AbstractLeadedComponent implements IContinuity { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java b/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java index 04f4727dc..b5aa610ef 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/SolderPad.java @@ -43,7 +43,7 @@ @ComponentDescriptor(name = "Solder Pad", category = "Connectivity", author = "Branislav Stojkovic", description = "Copper solder pad, round or square", instanceNamePrefix = "Pad", - zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, + zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG, keywordTag = "PCB", transformer = SimpleComponentTransformer.class, enableCache = true) public class SolderPad extends AbstractComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java b/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java index f33b5b8a8..aa9039e4c 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/Turret.java @@ -44,7 +44,7 @@ DIY Layout Creator (DIYLC). @ComponentDescriptor(name = "Turret Lug", category = "Connectivity", author = "Branislav Stojkovic", description = "Turret terminal lug", instanceNamePrefix = "Turret", - zOrder = IDIYComponent.TRACE + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, + zOrder = IDIYComponent.WIRING + 0.1, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class, enableCache = true) public class Turret extends AbstractComponent { diff --git a/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java b/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java index 1343a8e43..a411a74f6 100644 --- a/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java +++ b/diylc/diylc-library/src/org/diylc/components/connectivity/TwistedWire.java @@ -46,7 +46,7 @@ import org.diylc.utils.Constants; @ComponentDescriptor(name = "Twisted Leads", author = "Branislav Stojkovic", category = "Connectivity", - instanceNamePrefix = "W", description = "A pair of flexible leads twisted tighly together", zOrder = IDIYComponent.COMPONENT, + instanceNamePrefix = "W", description = "A pair of flexible leads twisted tighly together", zOrder = IDIYComponent.WIRING, flexibleZOrder = true, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class, enableCache = true) public class TwistedWire extends AbstractCurvedComponent implements IContinuity { diff --git a/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java b/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java index 89bdf695f..d0964888b 100644 --- a/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java +++ b/diylc/diylc-library/src/org/diylc/components/misc/PCBText.java @@ -45,7 +45,7 @@ DIY Layout Creator (DIYLC). import org.diylc.core.annotations.EditableProperty; @ComponentDescriptor(name = "PCB Text", author = "Branislav Stojkovic", category = "Misc", - description = "Mirrored text for PCB artwork", instanceNamePrefix = "L", zOrder = IDIYComponent.TRACE, + description = "Mirrored text for PCB artwork", instanceNamePrefix = "L", zOrder = IDIYComponent.WIRING, flexibleZOrder = false, bomPolicy = BomPolicy.NEVER_SHOW, transformer = TextTransformer.class) public class PCBText extends AbstractComponent { diff --git a/diylc/diylc-swing/.classpath b/diylc/diylc-swing/.classpath index e9e694485..6886c6074 100644 --- a/diylc/diylc-swing/.classpath +++ b/diylc/diylc-swing/.classpath @@ -17,10 +17,10 @@ - + - + diff --git a/diylc/diylc-swing/DIYLCStarter.launch b/diylc/diylc-swing/DIYLCStarter.launch index b0eed7ab2..e9b88586a 100644 --- a/diylc/diylc-swing/DIYLCStarter.launch +++ b/diylc/diylc-swing/DIYLCStarter.launch @@ -9,8 +9,10 @@ + + - + diff --git a/diylc/diylc-swing/build.xml b/diylc/diylc-swing/build.xml index 384b9c195..d282e3500 100644 --- a/diylc/diylc-swing/build.xml +++ b/diylc/diylc-swing/build.xml @@ -10,7 +10,7 @@ - + @@ -116,6 +116,11 @@