Skip to content

Commit 95da02a

Browse files
committed
Updated libraries
1 parent 2fee8e4 commit 95da02a

7 files changed

Lines changed: 74 additions & 13 deletions

File tree

.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
</natures>
1717
<filteredResources>
1818
<filter>
19-
<id>1609592034176</id>
19+
<id>1669754474412</id>
2020
<name></name>
2121
<type>30</type>
2222
<matcher>
2323
<id>org.eclipse.core.resources.regexFilterMatcher</id>
24-
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
24+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
2525
</matcher>
2626
</filter>
2727
</filteredResources>

jars/openxliff.jar

57.7 KB
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": "tmxvalidator",
33
"productName": "TMXValidator",
4-
"version": "2.3.0",
4+
"version": "2.4.0",
55
"description": "TMX Validator",
66
"main": "js/app.js",
77
"scripts": {
@@ -19,7 +19,7 @@
1919
"url": "https://github.com/rmraya/TMXValidator.git"
2020
},
2121
"devDependencies": {
22-
"electron": "^17.0.1",
23-
"typescript": "^4.5.5"
22+
"electron": "^22.0.0",
23+
"typescript": "4.8.4"
2424
}
2525
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*******************************************************************************
2+
* Copyright (c) 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.server;
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/tmxvalidation/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
public class Constants {
1515

16-
public static final String VERSION="2.3.0";
17-
public static final String BUILD="20220217_1413";
16+
public static final String VERSION="2.4.0";
17+
public static final String BUILD="202212_0908";
1818

1919
public static final String SUCCESS = "Success";
2020
public static final String ERROR = "Error";

src/module-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*******************************************************************************/
1212
module tmxvalidator {
1313

14+
exports com.maxprograms.server;
1415
exports com.maxprograms.tmxvalidation;
1516

1617
requires transitive openxliff;

ts/app.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ class TMXValidator {
4545
TMXValidator.ls.stderr.on('data', (data) => {
4646
console.error(`stderr: ${data}`);
4747
});
48-
execFileSync('bin/java', ['--module-path', 'lib', '-m', 'openxliff/com.maxprograms.server.CheckURL', 'http://localhost:8010/ValidationServer'], { cwd: app.getAppPath() });
49-
48+
execFileSync('bin/java', ['--module-path', 'lib', '-m', 'tmxvalidator/com.maxprograms.server.CheckURL', 'http://localhost:8010/ValidationServer'], { cwd: app.getAppPath() });
5049
app.on('ready', () => {
5150
TMXValidator.createWindows();
5251
TMXValidator.mainWindow.show();
@@ -147,8 +146,7 @@ class TMXValidator {
147146
backgroundColor: '#2d2d2e',
148147
webPreferences: {
149148
nodeIntegration: true,
150-
contextIsolation: false,
151-
nativeWindowOpen: true
149+
contextIsolation: false
152150
}
153151
});
154152
about.loadURL('file://' + app.getAppPath() + '/html/about.html');
@@ -167,8 +165,7 @@ class TMXValidator {
167165
darkTheme:true,
168166
webPreferences: {
169167
nodeIntegration: true,
170-
contextIsolation: false,
171-
nativeWindowOpen: true
168+
contextIsolation: false
172169
}
173170
});
174171
TMXValidator.mainWindow.setMenu(null);

0 commit comments

Comments
 (0)