mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
fix(java): borked glue methods
This commit is contained in:
parent
5218042ca0
commit
f6ee2f0806
4 changed files with 10 additions and 8 deletions
1
dist/java/build.gradle
vendored
1
dist/java/build.gradle
vendored
|
@ -52,3 +52,4 @@ tasks.register('cargoBuild', Exec) {
|
||||||
}
|
}
|
||||||
|
|
||||||
build.dependsOn cargoBuild
|
build.dependsOn cargoBuild
|
||||||
|
build.finalizedBy shadowJar
|
||||||
|
|
10
dist/java/src/mp/code/Client.java
vendored
10
dist/java/src/mp/code/Client.java
vendored
|
@ -50,9 +50,9 @@ public class Client {
|
||||||
return leave_workspace(this.ptr, id);
|
return leave_workspace(this.ptr, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static native Workspace get_workspace(long self);
|
private static native Workspace get_workspace(long self, String workspace);
|
||||||
public Optional<Workspace> getWorkspace() {
|
public Optional<Workspace> getWorkspace(String workspace) {
|
||||||
return Optional.ofNullable(get_workspace(this.ptr));
|
return Optional.ofNullable(get_workspace(this.ptr, workspace));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static native void refresh_native(long self) throws ConnectionRemoteException;
|
private static native void refresh_native(long self) throws ConnectionRemoteException;
|
||||||
|
@ -70,8 +70,8 @@ public class Client {
|
||||||
static {
|
static {
|
||||||
try {
|
try {
|
||||||
if(System.getProperty("os.name").startsWith("Windows"))
|
if(System.getProperty("os.name").startsWith("Windows"))
|
||||||
NativeUtils.loadLibraryFromJar("/natives/codemp_intellij.dll");
|
NativeUtils.loadLibraryFromJar("/natives/codemp.dll");
|
||||||
else NativeUtils.loadLibraryFromJar("/natives/libcodemp_intellij.so");
|
else NativeUtils.loadLibraryFromJar("/natives/libcodemp.so");
|
||||||
setup_tracing(System.getenv().get("CODEMP_TRACING_LOG"));
|
setup_tracing(System.getenv().get("CODEMP_TRACING_LOG"));
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
@ -3,7 +3,7 @@ package mp.code.exceptions;
|
||||||
/**
|
/**
|
||||||
* An exception returned by the server as a response.
|
* An exception returned by the server as a response.
|
||||||
*/
|
*/
|
||||||
public abstract class ConnectionRemoteException extends Exception {
|
public abstract class ConnectionRemoteException extends ConnectionException {
|
||||||
protected ConnectionRemoteException(String msg) {
|
protected ConnectionRemoteException(String msg) {
|
||||||
super(msg);
|
super(msg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,8 +204,9 @@ pub extern "system" fn Java_mp_code_Client_setup_1tracing<'local>(
|
||||||
super::setup_logger(
|
super::setup_logger(
|
||||||
true,
|
true,
|
||||||
Some(path)
|
Some(path)
|
||||||
.filter(|p| p.is_null())
|
.filter(|p| !p.is_null())
|
||||||
.map(|p| env.get_string(&p).map(|s| s.into()).jexcept(&mut env))
|
.map(|p| env.get_string(&p).map(|s| s.into())
|
||||||
|
.jexcept(&mut env))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue