Skip to content

Commit 0d35a5d

Browse files
committed
v1.42
1 parent 0e3fe86 commit 0d35a5d

135 files changed

Lines changed: 8670 additions & 1277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

XCBEditor/.metadata/.log

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,3 +1488,59 @@ user global configuration and to define the default location to store repositori
14881488
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
14891489
EGit might behave differently since they see different configuration options.
14901490
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
1491+
!SESSION 2019-01-16 16:18:43.123 -----------------------------------------------
1492+
eclipse.buildId=4.9.0.I20180906-0745
1493+
java.version=1.8.0_181
1494+
java.vendor=Oracle Corporation
1495+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
1496+
Framework arguments: -product org.eclipse.epp.package.java.product
1497+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
1498+
1499+
!ENTRY org.eclipse.egit.ui 2 0 2019-01-16 16:18:52.755
1500+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
1501+
user global configuration and to define the default location to store repositories: 'C:\Users\soft'. If this is
1502+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
1503+
EGit might behave differently since they see different configuration options.
1504+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
1505+
!SESSION 2019-01-16 16:19:40.018 -----------------------------------------------
1506+
eclipse.buildId=4.9.0.I20180906-0745
1507+
java.version=1.8.0_181
1508+
java.vendor=Oracle Corporation
1509+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
1510+
Framework arguments: -product org.eclipse.epp.package.java.product
1511+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
1512+
1513+
!ENTRY org.eclipse.egit.ui 2 0 2019-01-16 16:19:50.146
1514+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
1515+
user global configuration and to define the default location to store repositories: 'C:\Users\soft'. If this is
1516+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
1517+
EGit might behave differently since they see different configuration options.
1518+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
1519+
!SESSION 2019-01-18 10:34:29.839 -----------------------------------------------
1520+
eclipse.buildId=4.9.0.I20180906-0745
1521+
java.version=1.8.0_181
1522+
java.vendor=Oracle Corporation
1523+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
1524+
Framework arguments: -product org.eclipse.epp.package.java.product
1525+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
1526+
1527+
!ENTRY org.eclipse.egit.ui 2 0 2019-01-18 10:34:51.133
1528+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
1529+
user global configuration and to define the default location to store repositories: 'C:\Users\soft'. If this is
1530+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
1531+
EGit might behave differently since they see different configuration options.
1532+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
1533+
!SESSION 2019-01-18 11:53:58.900 -----------------------------------------------
1534+
eclipse.buildId=4.9.0.I20180906-0745
1535+
java.version=1.8.0_181
1536+
java.vendor=Oracle Corporation
1537+
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
1538+
Framework arguments: -product org.eclipse.epp.package.java.product
1539+
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
1540+
1541+
!ENTRY org.eclipse.egit.ui 2 0 2019-01-18 11:54:08.109
1542+
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
1543+
user global configuration and to define the default location to store repositories: 'C:\Users\soft'. If this is
1544+
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
1545+
EGit might behave differently since they see different configuration options.
1546+
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package XCBVisualEditor.XCBJson;
2+
3+
import java.io.FileNotFoundException;
4+
import java.io.FileReader;
5+
6+
import com.google.gson.JsonIOException;
7+
import com.google.gson.JsonObject;
8+
import com.google.gson.JsonParser;
9+
import com.google.gson.JsonSyntaxException;
10+
11+
public class InitConfigJson {
12+
private String path;
13+
private JsonObject jsoninfo;
14+
public InitConfigJson(String input) {
15+
this.path=input;
16+
JsonParser jp=new JsonParser();
17+
try {
18+
jsoninfo=(JsonObject)jp.parse(new FileReader(path));
19+
} catch (JsonIOException | JsonSyntaxException | FileNotFoundException e) {
20+
jsoninfo=null;
21+
}
22+
}
23+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package XCBVisualEditor.XCBJson;
2+
3+
import java.io.FileNotFoundException;
4+
import java.io.FileReader;
5+
6+
import javax.swing.JOptionPane;
7+
8+
import com.google.gson.JsonArray;
9+
import com.google.gson.JsonIOException;
10+
import com.google.gson.JsonObject;
11+
import com.google.gson.JsonParser;
12+
import com.google.gson.JsonSyntaxException;
13+
14+
public class InitConfigJson {
15+
private String path;
16+
private JsonObject jsoninfo;
17+
public InitConfigJson(String input) {
18+
this.path=input;
19+
JsonParser jp=new JsonParser();
20+
try {
21+
jsoninfo=(JsonObject)jp.parse(new FileReader(path));
22+
} catch (JsonIOException | JsonSyntaxException | FileNotFoundException e) {
23+
JOptionPane.showMessageDialog(null, "配置文件读取失败!\n"+e.getMessage());
24+
jsoninfo=null;
25+
}
26+
}
27+
public void BladeInit() {
28+
if(jsoninfo!=null) {
29+
//jsondata=jsoninfo.get("XCustomizedBladeConfig").getAsJsonArray();
30+
JsonArray temp=new JsonArray();
31+
try {
32+
jsoninfo.remove("XCustomizedBladeConfig");
33+
jsoninfo.add("XCustomizedBladeConfig", temp);
34+
JOptionPane.showMessageDialog(null, "拔刀剑配置已初始化");
35+
}catch(Exception error) {
36+
JOptionPane.showMessageDialog(null, "拔刀剑配置初始化失败!\n"+error.getMessage());
37+
}
38+
}
39+
}
40+
public void VerInit(double version) {
41+
try {
42+
jsoninfo.remove("XCustomizedBladeVER");
43+
jsoninfo.addProperty("XCustomizedBladeVER", version);
44+
JOptionPane.showMessageDialog(null, "版本号已更新");
45+
}catch(Exception error) {
46+
JOptionPane.showMessageDialog(null, "版本号更新失败!\n"+error.getMessage());
47+
}
48+
}
49+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package XCBVisualEditor.XCBJson;
2+
3+
import java.io.FileReader;
4+
5+
import com.google.gson.JsonObject;
6+
7+
public class InitConfigJson {
8+
private String path;
9+
private JsonObject jsoninfo;
10+
public InitConfigJson(String input) {
11+
this.path=input;
12+
jsoninfo=(JsonObject)jp.parse(new FileReader(jsonpath));
13+
}
14+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package XCBVisualEditor.XCBJson;
2+
3+
import java.io.FileNotFoundException;
4+
import java.io.FileReader;
5+
6+
import javax.swing.JOptionPane;
7+
8+
import com.google.gson.JsonIOException;
9+
import com.google.gson.JsonObject;
10+
import com.google.gson.JsonParser;
11+
import com.google.gson.JsonSyntaxException;
12+
13+
public class InitConfigJson {
14+
private String path;
15+
private JsonObject jsoninfo;
16+
public InitConfigJson(String input) {
17+
this.path=input;
18+
JsonParser jp=new JsonParser();
19+
try {
20+
jsoninfo=(JsonObject)jp.parse(new FileReader(path));
21+
} catch (JsonIOException | JsonSyntaxException | FileNotFoundException e) {
22+
JOptionPane.showMessageDialog(null, "配置文件读取失败!");
23+
jsoninfo=null;
24+
}
25+
}
26+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package XCBVisualEditor.XCBJson;
2+
3+
import java.io.FileNotFoundException;
4+
import java.io.FileOutputStream;
5+
import java.io.FileReader;
6+
import java.io.IOException;
7+
8+
import javax.swing.JOptionPane;
9+
10+
import com.google.gson.Gson;
11+
import com.google.gson.JsonArray;
12+
import com.google.gson.JsonIOException;
13+
import com.google.gson.JsonObject;
14+
import com.google.gson.JsonParser;
15+
import com.google.gson.JsonSyntaxException;
16+
17+
public class InitConfigJson {
18+
private String path;
19+
private JsonObject jsoninfo;
20+
public InitConfigJson(String input) {
21+
this.path=input;
22+
JsonParser jp=new JsonParser();
23+
try {
24+
jsoninfo=(JsonObject)jp.parse(new FileReader(path));
25+
} catch (JsonIOException | JsonSyntaxException | FileNotFoundException e) {
26+
JOptionPane.showMessageDialog(null, "配置文件读取失败!\n"+e.getMessage());
27+
jsoninfo=null;
28+
}
29+
}
30+
public void BladeInit() {
31+
if(jsoninfo!=null) {
32+
//jsondata=jsoninfo.get("XCustomizedBladeConfig").getAsJsonArray();
33+
JsonArray temp=new JsonArray();
34+
try {
35+
jsoninfo.remove("XCustomizedBladeConfig");
36+
jsoninfo.add("XCustomizedBladeConfig", temp);
37+
FileWriter();
38+
JOptionPane.showMessageDialog(null, "拔刀剑配置已初始化");
39+
}catch(Exception error) {
40+
JOptionPane.showMessageDialog(null, "拔刀剑配置初始化失败!\n"+error.getMessage());
41+
}
42+
}
43+
}
44+
public void SAInit() {
45+
if(jsoninfo!=null) {
46+
JsonArray temp=new JsonArray();
47+
try {
48+
jsoninfo.remove("XCustomizedSA");
49+
jsoninfo.add("XCustomizedSA", temp);
50+
FileWriter();
51+
JOptionPane.showMessageDialog(null, "SA配置已初始化");
52+
}catch(Exception error) {
53+
JOptionPane.showMessageDialog(null, "SA配置初始化失败!\n"+error.getMessage());
54+
}
55+
}
56+
}
57+
public void SEInit() {
58+
if(jsoninfo!=null) {
59+
JsonArray temp=new JsonArray();
60+
try {
61+
jsoninfo.remove("XCustomizedSE");
62+
jsoninfo.add("XCustomizedSE", temp);
63+
JOptionPane.showMessageDialog(null, "SE配置已初始化");
64+
}catch(Exception error) {
65+
JOptionPane.showMessageDialog(null, "SE配置初始化失败!\n"+error.getMessage());
66+
}
67+
}
68+
}
69+
public void VerInit(double version) {
70+
if(jsoninfo!=null) {
71+
try {
72+
jsoninfo.remove("XCustomizedBladeVER");
73+
jsoninfo.addProperty("XCustomizedBladeVER", version);
74+
JOptionPane.showMessageDialog(null, "版本号已更新");
75+
}catch(Exception error) {
76+
JOptionPane.showMessageDialog(null, "版本号更新失败!\n"+error.getMessage());
77+
}
78+
}
79+
}
80+
private void FileWriter() {
81+
Gson out=new Gson();
82+
try {
83+
FileOutputStream output=new FileOutputStream(path);
84+
output.write(out.toJson(this.jsoninfo).getBytes());
85+
output.close();
86+
} catch (FileNotFoundException e) {
87+
System.out.println("XCC Error:"+e.getMessage());
88+
} catch (IOException e) {
89+
System.out.println("XCC Error:"+e.getMessage());
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)