Compare commits

..

11 Commits

Author SHA1 Message Date
Bane Stojkovic 14944a3e38 Release 4.36 2023-03-30 10:02:06 +02:00
Bane Stojkovic 48fe5f496b Fix fuse symbol 2023-03-29 09:38:27 +02:00
Bane Stojkovic 57a7932675 Improve backup file date format 2023-03-28 16:54:00 +02:00
Bane Stojkovic e0d2964e12 When backing up the configuration file, append the current timestamp at the end instead of a '~' 2023-03-28 16:35:40 +02:00
Bane Stojkovic c3f9208ab7 Fix issue deserializing building blocks 2023-03-28 16:12:33 +02:00
Bane Stojkovic 3a5e6f553d Fix issue with null value in inductor causing exceptions 2023-03-28 16:12:19 +02:00
Bane Stojkovic 24c8afd620 Configurable max switch combination count for circuit analysis (using org.diylc.maxSwitchCombinations argument) 2023-03-28 16:11:57 +02:00
Bane Stojkovic 4710d1b484 Merge branch 'master' of https://github.com/bancika/diy-layout-creator 2023-03-26 13:48:59 +02:00
Bane Stojkovic 2ce7677672 Title Block added as one of factory building blocks (was missing in 4.35 by mistake) 2023-03-26 13:48:58 +02:00
Bane Stojkovic 04a22436d2 Lever switch orientation not loaded correctly from files created prior to version 4.35 2023-03-26 13:48:26 +02:00
Bane Stojkovic 0ef3bc4adb Update ISSUE_TEMPLATE.md 2023-01-16 13:33:57 +01:00
20 changed files with 693 additions and 27 deletions
+1
View File
@@ -2,6 +2,7 @@ Thank you for reporting issues and contributing ideas and features to DIYLC repo
Before you proceed, please read the following: Before you proceed, please read the following:
* One request or bug report per issue, please. No bundling.
* If you are reporting a bug, please attach the latest application log file together with description of steps that lead to the issue. They can be found in the user directory under `.diylc/logs` directory. On Windows 7 and later, it's located in `c:/Users/<your username>/.diylc/logs`. On Linux and MacOS, it's typically in `/Users/<your username>/.diylc/logs`. * If you are reporting a bug, please attach the latest application log file together with description of steps that lead to the issue. They can be found in the user directory under `.diylc/logs` directory. On Windows 7 and later, it's located in `c:/Users/<your username>/.diylc/logs`. On Linux and MacOS, it's typically in `/Users/<your username>/.diylc/logs`.
* If you are having issues starting the application under MacOS, make sure that 3rd party apps are allowed on your Mac. This document covers how to do it - https://support.apple.com/en-us/HT202491. * If you are having issues starting the application under MacOS, make sure that 3rd party apps are allowed on your Mac. This document covers how to do it - https://support.apple.com/en-us/HT202491.
* Try to look for similar unresolved issues that are already reported to avoid duplicates. * Try to look for similar unresolved issues that are already reported to avoid duplicates.
Binary file not shown.
@@ -31,7 +31,7 @@ public abstract class AbstractAngledComponent<T> extends AbstractTransparentComp
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Deprecated @Deprecated
protected transient Orientation orientation; protected Orientation orientation;
protected int angle; protected int angle;
transient protected Shape[] body; transient protected Shape[] body;
@@ -226,7 +226,7 @@ public abstract class NetlistAnalyzer {
} }
protected String extractName(IDIYComponent<?> c) { protected String extractName(IDIYComponent<?> c) {
return c.getName() + " " + c.getValueForDisplay(); return c.getName() + " " + (c.getValueForDisplay() == null ? "" : c.getValueForDisplay());
} }
public static List<Set<IDIYComponent<?>>> extractComponentGroups(List<Netlist> netlists) { public static List<Set<IDIYComponent<?>>> extractComponentGroups(List<Netlist> netlists) {
@@ -29,6 +29,7 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.log4j.Logger;
import org.diylc.common.ComponentType; import org.diylc.common.ComponentType;
import org.diylc.core.ICommonNode; import org.diylc.core.ICommonNode;
import org.diylc.core.IContinuity; import org.diylc.core.IContinuity;
@@ -50,11 +51,13 @@ public class NetlistBuilder {
public static final float eps = 4; // consider any nodes closer than this as connected public static final float eps = 4; // consider any nodes closer than this as connected
private static final int MAX_SWITCH_COMBINATIONS = 64; public static int MAX_SWITCH_COMBINATIONS = 64;
private static final String MAX_SWITCH_COMBINATIONS_ERROR = LangUtil private static final String MAX_SWITCH_COMBINATIONS_ERROR = LangUtil
.translate("Maximum number of switching combinations exceeded. Allowed: %s, actual: %s"); .translate("Maximum number of switching combinations exceeded. Allowed: %s, actual: %s");
private static final Logger LOG = Logger.getLogger(NetlistBuilder.class);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static List<Netlist> extractNetlists(boolean includeSwitches, Project project, public static List<Netlist> extractNetlists(boolean includeSwitches, Project project,
List<ContinuityArea> continuityAreas) throws NetlistException { List<ContinuityArea> continuityAreas) throws NetlistException {
@@ -131,7 +134,17 @@ public class NetlistBuilder {
int totalSwitchCombinations = int totalSwitchCombinations =
switches.stream().map(sw -> sw.getPositionCount()).reduce(1, (a, b) -> a * b); switches.stream().map(sw -> sw.getPositionCount()).reduce(1, (a, b) -> a * b);
if (totalSwitchCombinations > MAX_SWITCH_COMBINATIONS) { int maxSwitch = MAX_SWITCH_COMBINATIONS;
String maxSwitchStr = System.getProperty("org.diylc.maxSwitchCombinations");
if (maxSwitchStr != null) {
try {
maxSwitch = Integer.parseInt(maxSwitchStr);
} catch (Exception e) {
LOG.error("Could not apply property org.diylc.maxSwitchCombinations", e);
}
}
if (totalSwitchCombinations > maxSwitch) {
throw new NetlistException(String.format(MAX_SWITCH_COMBINATIONS_ERROR, throw new NetlistException(String.format(MAX_SWITCH_COMBINATIONS_ERROR,
MAX_SWITCH_COMBINATIONS, totalSwitchCombinations)); MAX_SWITCH_COMBINATIONS, totalSwitchCombinations));
} }
@@ -133,4 +133,608 @@
</diylc.semiconductors.TransistorTO92> </diylc.semiconductors.TransistorTO92>
</list> </list>
</entry> </entry>
<entry>
<string>Title Block</string>
<list>
<org.diylc.components.shapes.Rectangle>
<name>RECT1</name>
<alpha>127</alpha>
<value></value>
<controlPoints>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.7007874015748</x>
<y>149.60629921259843</y>
</java.awt.geom.Point2D_-Double>
</controlPoints>
<firstPoint>
<x>0.0</x>
<y>0.0</y>
</firstPoint>
<secondPoint>
<x>393.7007874015748</x>
<y>149.60629921259843</y>
</secondPoint>
<color>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</color>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<borderThickness>
<value>0.5</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</borderThickness>
<edgeRadius>
<value>0.0</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</edgeRadius>
</org.diylc.components.shapes.Rectangle>
<org.diylc.components.connectivity.Line>
<name>LN1</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>188.9763779527559</x>
<y>149.60629921259843</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>188.9763779527559</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN2</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.70078740157487</x>
<y>118.11023622047246</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN3</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>55.118110236220474</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.7007874015748</x>
<y>55.118110236220474</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.connectivity.Line>
<name>LN4</name>
<alpha>127</alpha>
<points>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>86.61417322834646</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>393.70078740157476</x>
<y>86.61417322834646</y>
</java.awt.geom.Point2D_-Double>
<java.awt.geom.Point2D_-Double>
<x>0.0</x>
<y>0.0</y>
</java.awt.geom.Point2D_-Double>
</points>
<bodyColor>
<red>255</red>
<green>255</green>
<blue>255</blue>
<alpha>255</alpha>
</bodyColor>
<borderColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</borderColor>
<labelColor>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</labelColor>
<leadColor>
<red>204</red>
<green>204</green>
<blue>204</blue>
<alpha>255</alpha>
</leadColor>
<display>NAME</display>
<flipStanding>false</flipStanding>
<labelOriantation>Directional</labelOriantation>
<moveLabel>false</moveLabel>
<hideShortLeads>false</hideShortLeads>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<style>SOLID</style>
<thickness>
<value>0.2</value>
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
</thickness>
<arrowSize>
<value>5.0</value>
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
</arrowSize>
<arrowTx serialization="custom">
<java.awt.geom.AffineTransform>
<default>
<m00>1.0</m00>
<m01>0.0</m01>
<m02>0.0</m02>
<m10>0.0</m10>
<m11>1.0</m11>
<m12>0.0</m12>
</default>
</java.awt.geom.AffineTransform>
</arrowTx>
<arrowStart>false</arrowStart>
<arrowEnd>false</arrowEnd>
</org.diylc.components.connectivity.Line>
<org.diylc.components.misc.Label>
<name>LAB1</name>
<point>
<x>204.7244094488189</x>
<y>133.85826771653544</y>
</point>
<text>revision</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB2</name>
<point>
<x>291.3385826771654</x>
<y>133.85826771653544</y>
</point>
<text>1.0.0</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB3</name>
<point>
<x>15.748031496062993</x>
<y>133.85826771653544</y>
</point>
<text>updated</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB4</name>
<point>
<x>86.61417322834646</x>
<y>133.85826771653544</y>
</point>
<text>1/1/2020</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB5</name>
<point>
<x>47.24409448818898</x>
<y>70.86614173228347</y>
</point>
<text>drawn by</text>
<font reference="../../org.diylc.components.misc.Label/font"/>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB6</name>
<point>
<x>31.496062992125985</x>
<y>15.748031496062993</y>
</point>
<text>title</text>
<font reference="../../org.diylc.components.misc.Label/font"/>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB7</name>
<point>
<x>188.9763779527559</x>
<y>70.86614173228347</y>
</point>
<text>Author Name</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB8</name>
<point>
<x>188.9763779527559</x>
<y>31.496062992125985</y>
</point>
<text>My Cool Project</text>
<font>
<size class="float">20.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>255</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB9</name>
<point>
<x>15.748031496062993</x>
<y>102.36220472440945</y>
</point>
<text>website</text>
<font>
<size class="float">14.0</size>
<weight class="null"/>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Roman</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>LEFT</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
<org.diylc.components.misc.Label>
<name>LAB10</name>
<point>
<x>188.9763779527559</x>
<y>102.36220472440945</y>
</point>
<text>www.mysite.com/myproject</text>
<font>
<size class="float">14.0</size>
<weight class="float">2.0</weight>
<width class="null"/>
<superscript class="null"/>
<posture class="null"/>
<transform class="null"/>
<family class="string">Square721 BT Bold</family>
<tracking class="null"/>
</font>
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
<alpha>255</alpha>
</color>
<horizontalAlignment>CENTER</horizontalAlignment>
<verticalAlignment>CENTER</verticalAlignment>
<orientation>DEFAULT</orientation>
</org.diylc.components.misc.Label>
</list>
</entry>
</map> </map>
@@ -4309,5 +4309,45 @@
</changes> </changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url> <url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version> </org.diylc.appframework.update.Version>
<org.diylc.appframework.update.Version>
<versionNumber>
<major>4</major>
<minor>36</minor>
<build>0</build>
</versionNumber>
<releaseDate>2023-03-30 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Title Block added as one of factory building blocks (was missing in 4.35 by mistake)</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Configurable max switch combination count for circuit analysis (using org.diylc.maxSwitchCombinations argument)</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Added resilience to the code that saves the configuration file to avoid it getting corrupted</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>When backing up the configuration file, append the current timestamp at the end instead of a '~'</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Improve the format of timestamp in file backups</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>General application slowness when Inductor or Fuse Symbol components are added to the drawing</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Lever switch orientation not loaded correctly from files created prior to version 4.35</description>
</org.diylc.appframework.update.Change>
</changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version>
</a> </a>
</java.util.Arrays_-ArrayList> </java.util.Arrays_-ArrayList>
@@ -26,6 +26,7 @@ import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext; import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader; import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.mapper.Mapper;
/** /**
* Serializes {@link Font} objects in a more compact fashion. Backwards compatible when unmarshalling. * Serializes {@link Font} objects in a more compact fashion. Backwards compatible when unmarshalling.
@@ -34,8 +35,8 @@ import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
*/ */
public class FontConverter extends com.thoughtworks.xstream.converters.extended.FontConverter { public class FontConverter extends com.thoughtworks.xstream.converters.extended.FontConverter {
public FontConverter() { public FontConverter(Mapper mapper) {
super(null); super(mapper);
} }
@Override @Override
@@ -116,7 +116,7 @@ public class ProjectFileManager {
xStream.aliasPackage("diylc", "org.diylc.components"); xStream.aliasPackage("diylc", "org.diylc.components");
xStream.registerConverter(new PointConverter()); xStream.registerConverter(new PointConverter());
xStream.registerConverter(new ColorConverter()); xStream.registerConverter(new ColorConverter());
xStream.registerConverter(new FontConverter()); xStream.registerConverter(new FontConverter(xStream.getMapper()));
xStream.registerConverter(new MeasureConverter()); xStream.registerConverter(new MeasureConverter());
xStream.registerConverter(new AreaConverter()); xStream.registerConverter(new AreaConverter());
xStream.addImmutableType(Color.class, true); xStream.addImmutableType(Color.class, true);
Binary file not shown.
Binary file not shown.
@@ -60,7 +60,7 @@ public class FuseSymbol extends AbstractSchematicLeadedSymbol<Current> {
@Override @Override
public String getValueForDisplay() { public String getValueForDisplay() {
return getValue().toString();// + (getPowerNew() == null ? "" : " " + getPowerNew().toString()); return getValue() == null ? null : getValue().toString();// + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
} }
public void drawIcon(Graphics2D g2d, int width, int height) { public void drawIcon(Graphics2D g2d, int width, int height) {
@@ -76,7 +76,7 @@ public class RadialInductor extends AbstractRadialComponent<Inductance> {
@Override @Override
public String getValueForDisplay() { public String getValueForDisplay() {
return getValue().toString(); return getValue() == null ? null : getValue().toString();
} }
@Override @Override
+1 -1
View File
@@ -10,7 +10,7 @@
<property name="jar.dir" value="${build.dir}/jar" /> <property name="jar.dir" value="${build.dir}/jar" />
<property name="report.dir" value="${build.dir}/junitreport" /> <property name="report.dir" value="${build.dir}/junitreport" />
<property name="main.class" value="org.diylc.DIYLCStarter" /> <property name="main.class" value="org.diylc.DIYLCStarter" />
<property name="diylc.version" value="4.35.0" /> <property name="diylc.version" value="4.36.0" />
<property name="osx.jre8.path" value="tools\jre\osx\jre8u321\Contents\Home\" /> <property name="osx.jre8.path" value="tools\jre\osx\jre8u321\Contents\Home\" />
<property name="osx.jre8m1.path" value="tools\jre\osx\zulu-8.jre\Contents\Home\" /> <property name="osx.jre8m1.path" value="tools\jre\osx\zulu-8.jre\Contents\Home\" />
@@ -37,6 +37,20 @@
<update_contact>nbenitezl_AT_gmail.com</update_contact> <update_contact>nbenitezl_AT_gmail.com</update_contact>
<content_rating type="oars-1.1"/> <content_rating type="oars-1.1"/>
<releases> <releases>
<release version="4.36.0" date="2023-03-30">
<description>
<ul>
<li>[New Feature] Title Block added as one of factory building blocks (was missing in 4.35 by mistake)</li>
<li>[New Feature] Configurable max switch combination count for circuit analysis (using org.diylc.maxSwitchCombinations argument)</li>
<li>[Improvement] Added resilience to the code that saves the configuration file to avoid it getting corrupted</li>
<li>[Improvement] When backing up the configuration file, append the current timestamp at the end instead of a '~'</li>
<li>[Improvement] Improve the format of timestamp in file backups</li>
<li>[Bug Fix] General application slowness when Inductor component is added to the drawing</li>
<li>[Bug Fix] Lever switch orientation not loaded correctly from files created prior to version 4.35</li>
</ul>
</description>
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.36.0</url>
</release>
<release version="4.35.0" date="2022-12-23"> <release version="4.35.0" date="2022-12-23">
<description> <description>
<ul> <ul>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -230,9 +230,7 @@ public class DIYLCStarter {
if (ConfigurationManager.getInstance().isFileWithErrors()) if (ConfigurationManager.getInstance().isFileWithErrors())
mainFrame.showMessage("<html>" mainFrame.showMessage("<html>"
+ "There was an error reading the configuration file and it was replaced by a default configuration.<br>" + "There was an error reading the configuration file and it was replaced by a default configuration.<br>"
+ "The backup file is created and placed in user directory under '.diylc' sub-directory with '~' at the end.<br>" + "The backup file is created and placed in user directory under 'diylc' sub-directory with the current timestamp at the end.<br>"
+ "This can happen when running two versions of DIYLC on the same machine at the same time.<br>"
+ "Replace the main 'config.xml' file with the backup when running the latest version of DIYLC."
+ "</html>", "Warning", IView.WARNING_MESSAGE); + "</html>", "Warning", IView.WARNING_MESSAGE);
} }
@@ -23,11 +23,10 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.DateFormat; import java.time.LocalDateTime;
import java.text.SimpleDateFormat; import java.time.format.DateTimeFormatter;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
@@ -129,15 +128,11 @@ public class AutoSavePlugin implements IPlugIn {
name = name.substring(0, name.length() - 4); name = name.substring(0, name.length() - 4);
// append date and time // append date and time
Date date = new Date(); String timestamp = LocalDateTime.now()
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd-HHmmss"); .format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
file = new File(AUTO_SAVE_PATH + File.separator + name + "." + dateFormat.format(date) + ".diy"); .substring(0, 19)
// make sure that it doesn't already exist .replace(':', '-');
int i = 2; file = new File(AUTO_SAVE_PATH + File.separator + name + "." + timestamp + ".diy");
while (file.exists()) {
file = new File(AUTO_SAVE_PATH + File.separator + name + "." + dateFormat.format(date) + "-" + i + ".diy");
i++;
}
return file.getAbsolutePath(); return file.getAbsolutePath();
} }