mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Upcoming (#686)
* Added 1/8" jack * Release 4.20 * Merge traces and wires into "Wiring" layer * Add shabang to run.sh * Added gray theme * Prevent the donation label from wrapping into several lines * Use Backspace key to delete selection in Mac OS * Upgrade xstream to fix java 16 compatibility * Add exec to run.sh
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<classpathentry kind="lib" path="lib/jettison-1.0.1.jar"/>
|
||||
<classpathentry kind="lib" path="lib/java-http-proxy.jar"/>
|
||||
<classpathentry kind="lib" path="lib/AppleJavaExtensions.jar"/>
|
||||
<classpathentry kind="lib" path="lib/xstream-1.4.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/xstream-1.4.19.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -50,7 +50,7 @@ public interface IDIYComponent<T> 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;
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ import org.diylc.utils.Constants;
|
||||
|
||||
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<Version> allVersions = (List<Version>) xStream.fromXML(in);
|
||||
CURRENT_VERSION = allVersions.get(allVersions.size() - 1).getVersionNumber();
|
||||
@@ -2593,6 +2595,7 @@ public class Presenter implements IPlugInPort {
|
||||
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 @@ public class Presenter implements IPlugInPort {
|
||||
if (resource != null) {
|
||||
BufferedInputStream in = new BufferedInputStream(resource.openStream());
|
||||
XStream xStream = new XStream(new DomDriver());
|
||||
xStream.addPermission(AnyTypePermission.ANY);
|
||||
Map<String, List<Template>> defaults = (Map<String, List<Template>>) xStream.fromXML(in);
|
||||
in.close();
|
||||
|
||||
@@ -2654,6 +2658,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);
|
||||
Map<String, List<IDIYComponent<?>>> defaults = (Map<String, List<IDIYComponent<?>>>) xStream.fromXML(in);
|
||||
in.close();
|
||||
|
||||
@@ -2937,6 +2942,7 @@ public class Presenter implements IPlugInPort {
|
||||
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 class Presenter implements IPlugInPort {
|
||||
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 class Presenter implements IPlugInPort {
|
||||
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;
|
||||
|
||||
|
||||
@@ -3605,5 +3605,37 @@
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
<org.diylc.appframework.update.Version>
|
||||
<versionNumber>
|
||||
<major>4</major>
|
||||
<minor>21</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2022-02-16 00:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Fixed compatibility issues with Java version 16 and above</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added 'Gray' theme</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Add shabang to run.sh for *nix systems</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Prevent the donation label from wrapping into several lines</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Use Backspace key to delete selection in Mac OS</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
</a>
|
||||
</java.util.Arrays_-ArrayList>
|
||||
|
||||
@@ -58,6 +58,7 @@ import org.xml.sax.SAXException;
|
||||
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 class ProjectFileManager {
|
||||
}
|
||||
};
|
||||
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 class ProjectFileManager {
|
||||
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() {
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.diylc.presenter.Presenter;
|
||||
|
||||
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 class VersionReader {
|
||||
if (resource != null) {
|
||||
BufferedInputStream in = new BufferedInputStream(resource.openStream());
|
||||
XStream xStream = new XStream(new DomDriver());
|
||||
xStream.addPermission(AnyTypePermission.ANY);
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Version> allVersions = (List<Version>) xStream.fromXML(in);
|
||||
Version latest = allVersions.get(allVersions.size() - 1);
|
||||
|
||||
Reference in New Issue
Block a user