@Test public void clearNamespaceTest() throws ExecutionException, InterruptedException { assertNormalBehavior( () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, null)), () -> bufferStreamApi.clearNamespace(1, 5, 7), request -> assertMethodAndArguments(request, NeovimBufferApi.CLEAR_NAMESPACE, buffer, 1, 5, 7) ); assertErrorBehavior( () -> bufferStreamApi.clearNamespace(7, 3, 1), request -> assertMethodAndArguments(request, NeovimBufferApi.CLEAR_NAMESPACE, buffer, 7, 3, 1) ); }
@Override public CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd) { return sendWithNoResponse( prepareMessage(CLEAR_NAMESPACE) .addArgument(namespaceId) .addArgument(lineStart) .addArgument(lineEnd) ); }
BufferStreamApi extends BaseStreamApi implements NeovimBufferApi { @Override public CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd) { return sendWithNoResponse( prepareMessage(CLEAR_NAMESPACE) .addArgument(namespaceId) .addArgument(lineStart) .addArgument(lineEnd) ); } }
BufferStreamApi extends BaseStreamApi implements NeovimBufferApi { @Override public CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd) { return sendWithNoResponse( prepareMessage(CLEAR_NAMESPACE) .addArgument(namespaceId) .addArgument(lineStart) .addArgument(lineEnd) ); } BufferStreamApi(ReactiveRpcStreamer reactiveRpcStreamer,
                           Buffer model); }
BufferStreamApi extends BaseStreamApi implements NeovimBufferApi { @Override public CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd) { return sendWithNoResponse( prepareMessage(CLEAR_NAMESPACE) .addArgument(namespaceId) .addArgument(lineStart) .addArgument(lineEnd) ); } BufferStreamApi(ReactiveRpcStreamer reactiveRpcStreamer,
                           Buffer model); @Override Buffer get(); @Override CompletableFuture<Integer> getLineCount(); @Override CompletableFuture<List<String>> getLines(int start, int end, boolean strictIndexing); @Override CompletableFuture<Void> setLines(int start, int end, boolean strictIndexing, List<String> replacement); @Override CompletableFuture<Integer> getOffset(int index); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Object> getOption(String name); @Override CompletableFuture<Void> setOption(String name, Object value); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<String> getName(); @Override CompletableFuture<Void> setName(String name); @Override CompletableFuture<Boolean> isLoaded(); @Override CompletableFuture<Boolean> isValid(); @Override CompletableFuture<VimCoords> getMark(String name); @Override CompletableFuture<Object> getChangedTick(); @Override CompletableFuture<List<VimKeyMap>> getKeymap(String mode); @Override CompletableFuture<Void> setKeymap(String mode, String lhs, String rhs, Map<String, Boolean> options); @Override CompletableFuture<Void> deleteKeymap(String mode, String lhs); @Override CompletableFuture<Integer> addHighlight(int srcId, String hlGroup, int line, int colStart, int colEnd); @Override CompletableFuture<Void> clearHighlight(int srcId, int lineStart, int lineEnd); @Override CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd); @Override CompletableFuture<Integer> setVirtualText(int namespaceId, int line, List<HighlightedText> chunks, Map optionalParams); @Override CompletableFuture<Boolean> attach(boolean loadFullBufferOnStart, Map opts); @Override CompletableFuture<Boolean> detach(); @Override CompletableFuture<Map<String, CommandInfo>> getCommands(GetCommandsOptions commandsOptions); @Override String toString(); }
BufferStreamApi extends BaseStreamApi implements NeovimBufferApi { @Override public CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd) { return sendWithNoResponse( prepareMessage(CLEAR_NAMESPACE) .addArgument(namespaceId) .addArgument(lineStart) .addArgument(lineEnd) ); } BufferStreamApi(ReactiveRpcStreamer reactiveRpcStreamer,
                           Buffer model); @Override Buffer get(); @Override CompletableFuture<Integer> getLineCount(); @Override CompletableFuture<List<String>> getLines(int start, int end, boolean strictIndexing); @Override CompletableFuture<Void> setLines(int start, int end, boolean strictIndexing, List<String> replacement); @Override CompletableFuture<Integer> getOffset(int index); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Object> getOption(String name); @Override CompletableFuture<Void> setOption(String name, Object value); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<String> getName(); @Override CompletableFuture<Void> setName(String name); @Override CompletableFuture<Boolean> isLoaded(); @Override CompletableFuture<Boolean> isValid(); @Override CompletableFuture<VimCoords> getMark(String name); @Override CompletableFuture<Object> getChangedTick(); @Override CompletableFuture<List<VimKeyMap>> getKeymap(String mode); @Override CompletableFuture<Void> setKeymap(String mode, String lhs, String rhs, Map<String, Boolean> options); @Override CompletableFuture<Void> deleteKeymap(String mode, String lhs); @Override CompletableFuture<Integer> addHighlight(int srcId, String hlGroup, int line, int colStart, int colEnd); @Override CompletableFuture<Void> clearHighlight(int srcId, int lineStart, int lineEnd); @Override CompletableFuture<Void> clearNamespace(int namespaceId, int lineStart, int lineEnd); @Override CompletableFuture<Integer> setVirtualText(int namespaceId, int line, List<HighlightedText> chunks, Map optionalParams); @Override CompletableFuture<Boolean> attach(boolean loadFullBufferOnStart, Map opts); @Override CompletableFuture<Boolean> detach(); @Override CompletableFuture<Map<String, CommandInfo>> getCommands(GetCommandsOptions commandsOptions); @Override String toString();  }