Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit dc93bc4

Browse files
committed
Issue #163: Update the installer and accept the new status codes
1 parent 33736f7 commit dc93bc4

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed
0 Bytes
Binary file not shown.
2.09 KB
Binary file not shown.
Binary file not shown.

dev/org.eclipse.codewind.core/src/org/eclipse/codewind/core/internal/InstallUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ public class InstallUtil {
7070
private static String installExec = null;
7171

7272
public enum InstallStatus {
73-
RUNNING(2),
74-
INSTALLED(1),
75-
NOT_INSTALLED(0),
73+
NOT_INSTALLED(200),
74+
INSTALLED(201),
75+
RUNNING(202),
7676
UNKNOWN(-1);
7777

7878
private int code;
@@ -166,7 +166,7 @@ public static ProcessResult removeCodewind(IProgressMonitor monitor) throws IOEx
166166
}
167167
}
168168

169-
public static ProcessResult statusCodewind() throws IOException, TimeoutException {
169+
private static ProcessResult statusCodewind() throws IOException, TimeoutException {
170170
Process process = null;
171171
try {
172172
process = runInstaller(STATUS_CMD, null);

dev/org.eclipse.codewind.ui/src/org/eclipse/codewind/ui/internal/actions/CodewindInstall.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,14 @@
4848
public class CodewindInstall {
4949

5050
public static boolean isCodewindInstalled() throws InvocationTargetException {
51-
5251
try {
53-
ProcessResult result = InstallUtil.statusCodewind();
54-
55-
if (result.getExitValue() == 0) {
56-
return false;
57-
} else {
58-
return true;
59-
}
60-
52+
InstallStatus status = InstallUtil.getInstallStatus();
53+
return status != null && status.isInstalled();
6154
} catch (IOException e) {
6255
throw new InvocationTargetException(e, "An error occurred trying to determine Codewind status: " + e.getMessage()); //$NON-NLS-1$
6356
} catch (TimeoutException e) {
6457
throw new InvocationTargetException(e, "Codewind did not return status in the expected time: " + e.getMessage()); //$NON-NLS-1$
6558
}
66-
6759
}
6860

6961
public static void codewindInstallerDialog() {

0 commit comments

Comments
 (0)