Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused leftovers of WPF launcher in JNIBridge #624

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class JNIBridge {

private native String _get_os_recommended_folder();

private native int OleInitialize(int reserved);

private native void OleUninitialize();

private String library;
private boolean libraryLoaded = false;

Expand All @@ -53,15 +49,6 @@ public JNIBridge(String library) {
private void loadLibrary() {
if (library != null) {
try {
if (library.contains("wpf")) { //$NON-NLS-1$
int idx = library.indexOf("eclipse_"); //$NON-NLS-1$
if (idx != -1) {
String comLibrary = library.substring(0, idx) + "com_"; //$NON-NLS-1$
comLibrary += library.substring(idx + 8, library.length());
Runtime.getRuntime().load(comLibrary);
OleInitialize(0);
}
}
Runtime.getRuntime().load(library);
} catch (UnsatisfiedLinkError e) {
//failed
Expand Down Expand Up @@ -158,20 +145,6 @@ public boolean takeDownSplash() {
}
}

public boolean uninitialize() {
if (libraryLoaded && library != null) {
if (library.contains("wpf")) { //$NON-NLS-1$
try {
OleUninitialize();
} catch (UnsatisfiedLinkError e) {
// library not loaded
return false;
}
}
}
return true;
}

public String getOSRecommendedFolder() {
try {
return _get_os_recommended_folder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1526,8 +1526,6 @@ public int run(String[] args) {
} finally {
// always try putting down the splash screen just in case the application failed to do so
takeDownSplash();
if (bridge != null)
bridge.uninitialize();
}
// Return an int exit code and ensure the system property is set.
System.setProperty(PROP_EXITCODE, Integer.toString(result));
Expand Down
Loading