Skip to content

Commit 2826c7f

Browse files
authored
Merge pull request #38 from jGauravGupta/FISH-654
FISH-654 Release Eclipse tools v1.3.0
2 parents 32ca878 + 46bc5e5 commit 2826c7f

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

features/org.eclipse.payara.tools.everything/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<feature id="org.eclipse.payara.tools.everything" label="Payara Tools Build Wrapper" provider-name="Eclipse.org - Payara Tools" version="1.2.0.qualifier">
2+
<feature id="org.eclipse.payara.tools.everything" label="Payara Tools Build Wrapper" provider-name="Eclipse.org - Payara Tools" version="1.3.0.qualifier">
33

44
<includes id="org.eclipse.payara.tools" version="0.0.0"/>
55
<includes id="org.eclipse.payara.tools.source" version="0.0.0"/>

features/org.eclipse.payara.tools.source/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<feature id="org.eclipse.payara.tools.source" label="%featureName" provider-name="%providerName" version="1.2.0.qualifier">
2+
<feature id="org.eclipse.payara.tools.source" label="%featureName" provider-name="%providerName" version="1.3.0.qualifier">
33

44
<description>
55
%featureDescription

features/org.eclipse.payara.tools/feature.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feature
33
id="org.eclipse.payara.tools"
44
label="%featureName"
5-
version="1.2.0.qualifier"
5+
version="1.3.0.qualifier"
66
provider-name="%providerName"
77
plugin="org.eclipse.payara.tools">
88

plugins/org.eclipse.payara.tools.jver/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ Bundle-ManifestVersion: 2
33
Bundle-Name: %BundleName
44
Bundle-Vendor: %BundleVendor
55
Bundle-SymbolicName: org.eclipse.payara.tools.jver
6-
Bundle-Version: 1.2.0.qualifier
6+
Bundle-Version: 1.3.0.qualifier
77
Bundle-Localization: bundle
88
Bundle-RequiredExecutionEnvironment: JavaSE-1.8

plugins/org.eclipse.payara.tools.ui/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.payara.tools.ui;singleton:=true
5-
Bundle-Version: 1.2.0.qualifier
5+
Bundle-Version: 1.3.0.qualifier
66
Bundle-ActivationPolicy: lazy
77
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
88
Bundle-Localization: plugin

plugins/org.eclipse.payara.tools/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.payara.tools;singleton:=true
5-
Bundle-Version: 1.2.0.qualifier
5+
Bundle-Version: 1.3.0.qualifier
66
Bundle-Localization: plugin
77
Bundle-Activator: org.eclipse.payara.tools.PayaraToolsPlugin
88
Bundle-Vendor: %providerName

plugins/org.eclipse.payara.tools/src/org/eclipse/payara/tools/micro/MicroRuntimeProcess.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import java.io.IOException;
1313
import java.lang.reflect.Field;
14+
import java.lang.reflect.Method;
1415
import java.util.Map;
1516
import org.eclipse.core.runtime.Platform;
1617
import org.eclipse.debug.core.DebugException;
@@ -62,16 +63,23 @@ private void disconnectDebuggerConnection() throws DebugException {
6263
private void terminateInstance() {
6364
try {
6465
Process process = (Process) getSystemProcess();
65-
Field field = process.getClass().getDeclaredField("handle");
66-
field.setAccessible(true);
67-
long handleValue = field.getLong(process);
68-
Kernel32 kernel = Kernel32.INSTANCE;
69-
WinNT.HANDLE handle = new WinNT.HANDLE();
70-
handle.setPointer(Pointer.createConstant(handleValue));
71-
int pid = kernel.GetProcessId(handle);
66+
long pid;
67+
try {
68+
Method method = process.getClass().getDeclaredMethod("pid");
69+
method.setAccessible(true);
70+
pid = (long) method.invoke(process);
71+
} catch (NoSuchMethodException ex) {
72+
Field field = process.getClass().getDeclaredField("handle");
73+
field.setAccessible(true);
74+
long handleValue = field.getLong(process);
75+
Kernel32 kernel = Kernel32.INSTANCE;
76+
WinNT.HANDLE handle = new WinNT.HANDLE();
77+
handle.setPointer(Pointer.createConstant(handleValue));
78+
pid = kernel.GetProcessId(handle);
79+
}
7280
killProcess(String.valueOf(pid));
7381
} catch (Exception ex) {
74-
LOG.log(Level.SEVERE, ERROR_MESSAGE, ex);
82+
LOG.log(Level.SEVERE, ERROR_MESSAGE, ex);
7583
}
7684
}
7785

0 commit comments

Comments
 (0)