mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-23 05:14:54 +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.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);
|
||||
}
|
||||
|
||||
private static native Workspace get_workspace(long self);
|
||||
public Optional<Workspace> getWorkspace() {
|
||||
return Optional.ofNullable(get_workspace(this.ptr));
|
||||
private static native Workspace get_workspace(long self, String workspace);
|
||||
public Optional<Workspace> getWorkspace(String workspace) {
|
||||
return Optional.ofNullable(get_workspace(this.ptr, workspace));
|
||||
}
|
||||
|
||||
private static native void refresh_native(long self) throws ConnectionRemoteException;
|
||||
|
@ -70,8 +70,8 @@ public class Client {
|
|||
static {
|
||||
try {
|
||||
if(System.getProperty("os.name").startsWith("Windows"))
|
||||
NativeUtils.loadLibraryFromJar("/natives/codemp_intellij.dll");
|
||||
else NativeUtils.loadLibraryFromJar("/natives/libcodemp_intellij.so");
|
||||
NativeUtils.loadLibraryFromJar("/natives/codemp.dll");
|
||||
else NativeUtils.loadLibraryFromJar("/natives/libcodemp.so");
|
||||
setup_tracing(System.getenv().get("CODEMP_TRACING_LOG"));
|
||||
} catch(IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
@ -3,7 +3,7 @@ package mp.code.exceptions;
|
|||
/**
|
||||
* 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) {
|
||||
super(msg);
|
||||
}
|
||||
|
|
|
@ -204,8 +204,9 @@ pub extern "system" fn Java_mp_code_Client_setup_1tracing<'local>(
|
|||
super::setup_logger(
|
||||
true,
|
||||
Some(path)
|
||||
.filter(|p| p.is_null())
|
||||
.map(|p| env.get_string(&p).map(|s| s.into()).jexcept(&mut env))
|
||||
.filter(|p| !p.is_null())
|
||||
.map(|p| env.get_string(&p).map(|s| s.into())
|
||||
.jexcept(&mut env))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue