mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 04:55:10 +00:00
Revert "improve java17, intellij compatibility"
This commit is contained in:
parent
be67cbd3ff
commit
21ae6a09b7
@ -28,7 +28,14 @@ java {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
srcDirs("src")
|
srcDirs("src/ext")
|
||||||
|
srcDirs("src/gen")
|
||||||
|
srcDirs("src/h")
|
||||||
|
srcDirs("src/jcckit")
|
||||||
|
srcDirs("src/net")
|
||||||
|
srcDirs("src/org")
|
||||||
|
srcDirs("src/smetana")
|
||||||
|
srcDirs("src/sprites")
|
||||||
}
|
}
|
||||||
resources {
|
resources {
|
||||||
srcDirs("src")
|
srcDirs("src")
|
||||||
@ -40,7 +47,8 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
test {
|
test {
|
||||||
java {
|
java {
|
||||||
srcDirs("test")
|
srcDirs("test/net")
|
||||||
|
srcDirs("test/nonreg")
|
||||||
}
|
}
|
||||||
resources {
|
resources {
|
||||||
srcDirs(".")
|
srcDirs(".")
|
||||||
@ -63,9 +71,8 @@ tasks.withType<Jar> {
|
|||||||
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
||||||
})
|
})
|
||||||
|
|
||||||
// source sets for java and resources are on "src", only put once into the jar
|
|
||||||
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.EXCLUDE
|
|
||||||
from("skin") { into("skin") }
|
from("skin") { into("skin") }
|
||||||
|
from("sprites/archimate") { into("sprites/archimate") }
|
||||||
from("stdlib") { into("stdlib") }
|
from("stdlib") { into("stdlib") }
|
||||||
from("svg") { into("svg") }
|
from("svg") { into("svg") }
|
||||||
from("themes") { into("themes") }
|
from("themes") { into("themes") }
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# Editor configuration, see http://editorconfig.org
|
# Editor configuration, see http://editorconfig.org
|
||||||
root = true
|
root = true
|
||||||
|
# no reformat
|
||||||
[*]
|
|
||||||
# no reformat with intellij
|
|
||||||
ij_formatter_enabled = false
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# Editor configuration, see http://editorconfig.org
|
# Editor configuration, see http://editorconfig.org
|
||||||
root = true
|
root = true
|
||||||
|
# no reformat
|
||||||
[*]
|
|
||||||
# no reformat with intellij
|
|
||||||
ij_formatter_enabled = false
|
|
||||||
|
@ -92,16 +92,16 @@ public class DotPath implements UShape, Moveable {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private final List<CubicCurve2D.Double> beziers = new ArrayList<>();
|
private final List<CubicCurve2D.Double> beziers = new ArrayList<CubicCurve2D.Double>();
|
||||||
private String comment;
|
private String comment;
|
||||||
private String codeLine;
|
private String codeLine;
|
||||||
|
|
||||||
public DotPath() {
|
public DotPath() {
|
||||||
this(new ArrayList<>());
|
this(new ArrayList<CubicCurve2D.Double>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public DotPath(DotPath other) {
|
public DotPath(DotPath other) {
|
||||||
this(new ArrayList<>());
|
this(new ArrayList<CubicCurve2D.Double>());
|
||||||
for (CubicCurve2D.Double c : other.beziers) {
|
for (CubicCurve2D.Double c : other.beziers) {
|
||||||
this.beziers.add(new CubicCurve2D.Double(c.x1, c.y1, c.ctrlx1, c.ctrly1, c.ctrlx2, c.ctrly2, c.x2, c.y2));
|
this.beziers.add(new CubicCurve2D.Double(c.x1, c.y1, c.ctrlx1, c.ctrly1, c.ctrlx2, c.ctrly2, c.x2, c.y2));
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DotPath addCurve(Point2D pt1, Point2D pt2, Point2D pt3, Point2D pt4) {
|
public DotPath addCurve(Point2D pt1, Point2D pt2, Point2D pt3, Point2D pt4) {
|
||||||
final List<CubicCurve2D.Double> beziersNew = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> beziersNew = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
beziersNew.add(new CubicCurve2D.Double(pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY(), pt3.getX(), pt3.getY(),
|
beziersNew.add(new CubicCurve2D.Double(pt1.getX(), pt1.getY(), pt2.getX(), pt2.getY(), pt3.getX(), pt3.getY(),
|
||||||
pt4.getX(), pt4.getY()));
|
pt4.getX(), pt4.getY()));
|
||||||
return new DotPath(beziersNew);
|
return new DotPath(beziersNew);
|
||||||
@ -337,31 +337,31 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DotPath addBefore(CubicCurve2D.Double before) {
|
public DotPath addBefore(CubicCurve2D.Double before) {
|
||||||
final List<CubicCurve2D.Double> copy = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> copy = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
copy.add(0, before);
|
copy.add(0, before);
|
||||||
return new DotPath(copy);
|
return new DotPath(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DotPath addBefore(DotPath other) {
|
private DotPath addBefore(DotPath other) {
|
||||||
final List<CubicCurve2D.Double> copy = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> copy = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
copy.addAll(0, other.beziers);
|
copy.addAll(0, other.beziers);
|
||||||
return new DotPath(copy);
|
return new DotPath(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DotPath addAfter(CubicCurve2D.Double after) {
|
public DotPath addAfter(CubicCurve2D.Double after) {
|
||||||
final List<CubicCurve2D.Double> copy = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> copy = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
copy.add(after);
|
copy.add(after);
|
||||||
return new DotPath(copy);
|
return new DotPath(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DotPath addAfter(DotPath other) {
|
public DotPath addAfter(DotPath other) {
|
||||||
final List<CubicCurve2D.Double> copy = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> copy = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
copy.addAll(other.beziers);
|
copy.addAll(other.beziers);
|
||||||
return new DotPath(copy);
|
return new DotPath(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Point2D, Double> somePoints() {
|
public Map<Point2D, Double> somePoints() {
|
||||||
final Map<Point2D, Double> result = new HashMap<>();
|
final Map<Point2D, Double> result = new HashMap<Point2D, Double>();
|
||||||
for (CubicCurve2D.Double bez : beziers) {
|
for (CubicCurve2D.Double bez : beziers) {
|
||||||
final CubicCurve2D.Double left = new CubicCurve2D.Double();
|
final CubicCurve2D.Double left = new CubicCurve2D.Double();
|
||||||
final CubicCurve2D.Double right = new CubicCurve2D.Double();
|
final CubicCurve2D.Double right = new CubicCurve2D.Double();
|
||||||
@ -443,7 +443,7 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Point2D getFrontierIntersection(Shape shape, Rectangle2D... notIn) {
|
private Point2D getFrontierIntersection(Shape shape, Rectangle2D... notIn) {
|
||||||
final List<CubicCurve2D.Double> all = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> all = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < 8; i++) {
|
||||||
for (CubicCurve2D.Double immutable : all) {
|
for (CubicCurve2D.Double immutable : all) {
|
||||||
if (contains(immutable, notIn)) {
|
if (contains(immutable, notIn)) {
|
||||||
@ -467,7 +467,7 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void cutAllCubic(List<CubicCurve2D.Double> all) {
|
private void cutAllCubic(List<CubicCurve2D.Double> all) {
|
||||||
final List<CubicCurve2D.Double> tmp = new ArrayList<>(all);
|
final List<CubicCurve2D.Double> tmp = new ArrayList<CubicCurve2D.Double>(all);
|
||||||
all.clear();
|
all.clear();
|
||||||
for (CubicCurve2D.Double bez : tmp) {
|
for (CubicCurve2D.Double bez : tmp) {
|
||||||
final CubicCurve2D.Double left = new CubicCurve2D.Double();
|
final CubicCurve2D.Double left = new CubicCurve2D.Double();
|
||||||
@ -497,7 +497,7 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private DotPath manageRect(Rectangle2D start, Rectangle2D end) {
|
private DotPath manageRect(Rectangle2D start, Rectangle2D end) {
|
||||||
final List<CubicCurve2D.Double> list = new ArrayList<>(this.beziers);
|
final List<CubicCurve2D.Double> list = new ArrayList<CubicCurve2D.Double>(this.beziers);
|
||||||
while (true) {
|
while (true) {
|
||||||
if (BezierUtils.isCutting(list.get(0), start) == false) {
|
if (BezierUtils.isCutting(list.get(0), start) == false) {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
@ -557,9 +557,9 @@ public class DotPath implements UShape, Moveable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public DotPath reverse() {
|
public DotPath reverse() {
|
||||||
final List<CubicCurve2D.Double> reverse = new ArrayList<>(beziers);
|
final List<CubicCurve2D.Double> reverse = new ArrayList<CubicCurve2D.Double>(beziers);
|
||||||
Collections.reverse(reverse);
|
Collections.reverse(reverse);
|
||||||
final List<CubicCurve2D.Double> copy = new ArrayList<>();
|
final List<CubicCurve2D.Double> copy = new ArrayList<CubicCurve2D.Double>();
|
||||||
for (CubicCurve2D.Double cub : reverse) {
|
for (CubicCurve2D.Double cub : reverse) {
|
||||||
copy.add(reverse(cub));
|
copy.add(reverse(cub));
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public class CArray<O> extends UnsupportedC {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
data.add(cl.getDeclaredConstructor().newInstance());
|
data.add((O) cl.newInstance());
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -60,7 +60,7 @@ public class CString extends UnsupportedC implements __ptr__ {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CString(String string) {
|
public CString(String string) {
|
||||||
this(new ArrayList<>(), 0);
|
this(new ArrayList<Character>(), 0);
|
||||||
for (int i = 0; i < string.length(); i++) {
|
for (int i = 0; i < string.length(); i++) {
|
||||||
data2.add(string.charAt(i));
|
data2.add(string.charAt(i));
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ public class CString extends UnsupportedC implements __ptr__ {
|
|||||||
public CString duplicate() {
|
public CString duplicate() {
|
||||||
// return this;
|
// return this;
|
||||||
|
|
||||||
return new CString(new ArrayList<>(this.data2), currentStart);
|
return new CString(new ArrayList<Character>(this.data2), currentStart);
|
||||||
|
|
||||||
// final CString result = new CString(this.data.size());
|
// final CString result = new CString(this.data.size());
|
||||||
// for (int i = 0; i < result.data.size(); i++) {
|
// for (int i = 0; i < result.data.size(); i++) {
|
||||||
@ -89,7 +89,7 @@ public class CString extends UnsupportedC implements __ptr__ {
|
|||||||
|
|
||||||
|
|
||||||
public CString(int size) {
|
public CString(int size) {
|
||||||
this(new ArrayList<>(), 0);
|
this(new ArrayList<Character>(), 0);
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
data2.add('\0');
|
data2.add('\0');
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ public class CString extends UnsupportedC implements __ptr__ {
|
|||||||
|
|
||||||
public CString strchr(char c) {
|
public CString strchr(char c) {
|
||||||
for (int i = currentStart; i < data2.size(); i++) {
|
for (int i = currentStart; i < data2.size(); i++) {
|
||||||
if (data2.get(i) == c) {
|
if (data2.get(i).charValue() == c) {
|
||||||
return new CString(data2, i);
|
return new CString(data2, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ import gen.annotation.Reviewed;
|
|||||||
|
|
||||||
public class Purify {
|
public class Purify {
|
||||||
|
|
||||||
private final Map<String, Method> methods = new LinkedHashMap<>();
|
private final Map<String, Method> methods = new LinkedHashMap<String, Method>();
|
||||||
private final File out2 = new File("../out-smetana", "smetana.txt");
|
private final File out2 = new File("../out-smetana", "smetana.txt");
|
||||||
private PrintWriter pw2;
|
private PrintWriter pw2;
|
||||||
private int currentLevel;
|
private int currentLevel;
|
||||||
@ -161,7 +161,7 @@ public class Purify {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void printMe() {
|
public void printMe() {
|
||||||
final List<Entry<String, Method>> reverse = new ArrayList<>(methods.entrySet());
|
final List<Entry<String, Method>> reverse = new ArrayList<Entry<String, Method>>(methods.entrySet());
|
||||||
Collections.reverse(reverse);
|
Collections.reverse(reverse);
|
||||||
for (Entry<String, Method> ent : reverse) {
|
for (Entry<String, Method> ent : reverse) {
|
||||||
final String signature = ent.getKey();
|
final String signature = ent.getKey();
|
||||||
@ -170,8 +170,8 @@ public class Purify {
|
|||||||
final String version = getVersion(m);
|
final String version = getVersion(m);
|
||||||
final String path = getPath(m);
|
final String path = getPath(m);
|
||||||
final String hasND_Rank = hasND_Rank(m) ? "*" : " ";
|
final String hasND_Rank = hasND_Rank(m) ? "*" : " ";
|
||||||
System.err.printf("%-8s %-26s %-12s %s %-30s %s%n", version, signature, reviewedWhen,
|
System.err.println(String.format("%-8s %-26s %-12s %s %-30s %s", version, signature, reviewedWhen,
|
||||||
hasND_Rank, m.getName(), path);
|
hasND_Rank, m.getName(), path));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user