mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-25 00:24:48 +01:00
Revert "chore: draft of user_list for java but its broken"
This reverts commit ba1a53c3a9
.
This commit is contained in:
parent
ba1a53c3a9
commit
9d1b919b31
2 changed files with 0 additions and 31 deletions
10
dist/java/src/mp/code/Workspace.java
vendored
10
dist/java/src/mp/code/Workspace.java
vendored
|
@ -69,16 +69,6 @@ public final class Workspace {
|
|||
return get_file_tree(this.ptr, filter.orElse(null), strict);
|
||||
}
|
||||
|
||||
private static native String[] user_list(long self);
|
||||
|
||||
/**
|
||||
* Get names of all users currently in this workspace
|
||||
* @return an array containing user display names
|
||||
*/
|
||||
public String[] userList() {
|
||||
return user_list(this.ptr);
|
||||
}
|
||||
|
||||
private static native String[] active_buffers(long self);
|
||||
|
||||
/**
|
||||
|
|
|
@ -76,27 +76,6 @@ pub extern "system" fn Java_mp_code_Workspace_get_1file_1tree(
|
|||
}).jexcept(&mut env).as_raw()
|
||||
}
|
||||
|
||||
/// Get the user list.
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_mp_code_Workspace_user_1list(
|
||||
mut env: JNIEnv,
|
||||
_class: JClass,
|
||||
self_ptr: jlong,
|
||||
) -> jobjectArray {
|
||||
let workspace = unsafe { Box::leak(Box::from_raw(self_ptr as *mut Workspace)) };
|
||||
|
||||
let user_list = workspace.user_list();
|
||||
env.find_class("java/lang/String")
|
||||
.and_then(|class| env.new_object_array(user_list.len() as i32, class, JObject::null()))
|
||||
.inspect(|arr| {
|
||||
for (idx, path) in user_list.iter().enumerate() {
|
||||
env.new_string(path)
|
||||
.and_then(|path| env.set_object_array_element(arr, idx as i32, path))
|
||||
.jexcept(&mut env)
|
||||
}
|
||||
}).jexcept(&mut env).as_raw()
|
||||
}
|
||||
|
||||
/// Gets a list of the active buffers.
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_mp_code_Workspace_active_1buffers(
|
||||
|
|
Loading…
Reference in a new issue