Skip to content

Commit 0c4d716

Browse files
committed
Updated for release 2.10.0
1 parent 8a10743 commit 0c4d716

68 files changed

Lines changed: 211 additions & 171 deletions

Some content is hidden

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

html/licenses/electron.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Copyright (c) Electron contributors
12
Copyright (c) 2013-2020 GitHub Inc.
23

34
Permission is hereby granted, free of charge, to any person obtaining

html/licenses/jsoup.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
The MIT License
32

4-
Copyright (c) 2009-2019 Jonathan Hedley <jonathan@hedley.net>
3+
Copyright (c) 2009-2022 Jonathan Hedley <https://jsoup.org/>
54

65
Permission is hereby granted, free of charge, to any person obtaining a copy
76
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1918
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2019
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2120
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22-
SOFTWARE.
21+
SOFTWARE.

images/about.png

-388 Bytes
Loading

jars/openxliff.jar

921 Bytes
Binary file not shown.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tmxeditor",
33
"productName": "TMXEditor",
4-
"version": "2.9.0",
4+
"version": "2.10.0",
55
"description": "TMX Editor",
66
"main": "js/app.js",
77
"scripts": {
@@ -19,7 +19,7 @@
1919
"url": "https://github.com/rmraya/TMXEditor.git"
2020
},
2121
"devDependencies": {
22-
"electron": "^16.0.3",
23-
"typescript": "^4.5.2"
22+
"electron": "^18.1.0",
23+
"typescript": "^4.6.3"
2424
}
2525
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2018-2022 Maxprograms.
3+
*
4+
* This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Public License 1.0
6+
* which accompanies this distribution, and is available at
7+
* https://www.eclipse.org/org/documents/epl-v10.html
8+
*
9+
* Contributors:
10+
* Maxprograms - initial API and implementation
11+
*******************************************************************************/
12+
13+
package com.maxprograms.tmxserver;
14+
15+
import java.io.IOException;
16+
import java.lang.System.Logger;
17+
import java.lang.System.Logger.Level;
18+
import java.net.HttpURLConnection;
19+
import java.net.URL;
20+
21+
public class CheckURL {
22+
23+
protected static final Logger LOGGER = System.getLogger(CheckURL.class.getName());
24+
25+
public static void main(String[] args) {
26+
if (args.length < 1) {
27+
return;
28+
}
29+
checkURL(args[0]);
30+
}
31+
32+
protected static void checkURL(String string) {
33+
boolean waiting = true;
34+
int count = 0;
35+
while (waiting && count < 40) {
36+
try {
37+
connect(string);
38+
waiting = false;
39+
} catch (IOException e) {
40+
try {
41+
Thread.sleep(500);
42+
count++;
43+
} catch (InterruptedException e1) {
44+
LOGGER.log(Level.ERROR, e1.getMessage(), e1);
45+
Thread.currentThread().interrupt();
46+
}
47+
}
48+
}
49+
if (count < 40) {
50+
LOGGER.log(Level.INFO, "ready");
51+
} else {
52+
System.exit(1);
53+
}
54+
}
55+
56+
private static void connect(String string) throws IOException {
57+
URL url = new URL(string);
58+
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
59+
connection.setConnectTimeout(1000);
60+
connection.connect();
61+
}
62+
63+
}

src/com/maxprograms/tmxserver/Constants.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018-2021 Maxprograms.
2+
* Copyright (c) 2018-2022 Maxprograms.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 1.0
@@ -19,8 +19,8 @@ private Constants() {
1919
}
2020

2121
public static final String APPNAME = "TMXEditor";
22-
public static final String VERSION = "2.9.0";
23-
public static final String BUILD = "20211201_0811";
22+
public static final String VERSION = "2.10.0";
23+
public static final String BUILD = "20220423_1037";
2424

2525
public static final String REASON = "reason";
2626
public static final String STATUS = "status";

src/com/maxprograms/tmxserver/TMXServer.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018-2021 Maxprograms.
2+
* Copyright (c) 2018-2022 Maxprograms.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 1.0
@@ -289,10 +289,6 @@ public void handle(HttpExchange t) throws IOException {
289289
}
290290
}
291291
}
292-
if ("stop".equals(command)) {
293-
logger.log(Level.INFO, "Stopping server");
294-
System.exit(0);
295-
}
296292
} catch (IOException e) {
297293
logger.log(Level.ERROR, e);
298294
String message = e.getMessage();

src/com/maxprograms/tmxserver/TMXService.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018-2021 Maxprograms.
2+
* Copyright (c) 2018-2022 Maxprograms.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 1.0
@@ -1592,6 +1592,11 @@ public JSONObject convertCsv(String csvFile, String tmxFile, List<String> langua
15921592
optionalDelims);
15931593
result.put(Constants.STATUS, Constants.SUCCESS);
15941594
} catch (Exception e) {
1595+
try {
1596+
Files.deleteIfExists(new File(tmxFile).toPath());
1597+
} catch (IOException e1) {
1598+
// do nothing
1599+
}
15951600
logger.log(Level.SEVERE, e.getMessage(), e);
15961601
result.put(Constants.STATUS, Constants.ERROR);
15971602
result.put(Constants.REASON, e.getMessage());
@@ -1822,6 +1827,11 @@ public JSONObject convertExcel(String excelFile, String tmxFile, String sheetNam
18221827
}
18231828
result.put(Constants.STATUS, Constants.SUCCESS);
18241829
} catch (IOException | SAXException | ParserConfigurationException e) {
1830+
try {
1831+
Files.deleteIfExists(new File(tmxFile).toPath());
1832+
} catch (IOException e1) {
1833+
// do nothing
1834+
}
18251835
logger.log(Level.SEVERE, e.getMessage(), e);
18261836
result.put(Constants.STATUS, Constants.ERROR);
18271837
result.put(Constants.REASON, e.getMessage());

src/com/maxprograms/tmxserver/excel/ExcelReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2018-2021 Maxprograms.
2+
* Copyright (c) 2018-2022 Maxprograms.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 1.0

0 commit comments

Comments
 (0)