public void setImplementationProvider(final StaticRegistrationOptions implementationProvider) { if (implementationProvider == null) { this.implementationProvider = null; return; } this.implementationProvider = Either.forRight(implementationProvider); }
public void setDocumentation(final MarkupContent documentation) { if (documentation == null) { this.documentation = null; return; } this.documentation = Either.forRight(documentation); }
public void setChangeNotifications(final Boolean changeNotifications) { if (changeNotifications == null) { this.changeNotifications = null; return; } this.changeNotifications = Either.forRight(changeNotifications); }
public void setChangeNotifications(final Boolean changeNotifications) { if (changeNotifications == null) { this.changeNotifications = null; return; } this.changeNotifications = Either.forRight(changeNotifications); }
public void setCodeActionProvider(final CodeActionOptions codeActionProvider) { if (codeActionProvider == null) { this.codeActionProvider = null; return; } this.codeActionProvider = Either.forRight(codeActionProvider); }
public void setColorProvider(final ColorProviderOptions colorProvider) { if (colorProvider == null) { this.colorProvider = null; return; } this.colorProvider = Either.forRight(colorProvider); }
public void setDocumentation(final MarkupContent documentation) { if (documentation == null) { this.documentation = null; return; } this.documentation = Either.forRight(documentation); }
public void setDocumentation(final MarkupContent documentation) { if (documentation == null) { this.documentation = null; return; } this.documentation = Either.forRight(documentation); }
public void setTextDocumentSync(final TextDocumentSyncOptions textDocumentSync) { if (textDocumentSync == null) { this.textDocumentSync = null; return; } this.textDocumentSync = Either.forRight(textDocumentSync); }
public void setTypeHierarchyProvider(final StaticRegistrationOptions typeHierarchyProvider) { if (typeHierarchyProvider == null) { this.typeHierarchyProvider = null; return; } this.typeHierarchyProvider = Either.forRight(typeHierarchyProvider); }
public void setDocumentation(final MarkupContent documentation) { if (documentation == null) { this.documentation = null; return; } this.documentation = Either.forRight(documentation); }
public void setCodeActionProvider(final CodeActionOptions codeActionProvider) { if (codeActionProvider == null) { this.codeActionProvider = null; return; } this.codeActionProvider = Either.forRight(codeActionProvider); }
public void setId(final String id) { if (id == null) { this.id = null; return; } this.id = Either.forRight(id); }
public void setContents(final MarkupContent contents) { if (contents == null) { this.contents = null; return; } this.contents = Either.forRight(contents); }
@Override public CompletableFuture<Either<List<CompletionItem>, CompletionList>> completion(CompletionParams position) { log.info("completion request received"); CompletionHandler h = completionHandler; if (h!=null) { return completionHandler.handle(position) .map(Either::<List<CompletionItem>, CompletionList>forRight) .toFuture(); } return CompletableFuture.completedFuture(Either.forRight(NO_COMPLETIONS)); }
@SuppressWarnings("unchecked") protected Either<L, R> createRight(R obj) throws IOException { if (Either3.class.isAssignableFrom(typeToken.getRawType())) return (Either<L, R>) Either3.forRight3((Either<?, ?>) obj); else return Either.forRight(obj); }
private Either<List<CompletionItem>, List<SymbolInfo>> filterSymbolsOnFallback(LSServiceOperationContext context, String pkgName, String delimiter) { List<SymbolInfo> visibleSymbols = context.get(CompletionKeys.VISIBLE_SYMBOLS_KEY); List<SymbolInfo> filteredSymbols = FilterUtils.getInvocationAndFieldSymbolsOnVar(context, pkgName, delimiter, visibleSymbols); return Either.forRight(filteredSymbols); } }
private static void convertCUResourceChange(WorkspaceEdit edit, RenameCompilationUnitChange cuChange) { ICompilationUnit modifiedCU = (ICompilationUnit) cuChange.getModifiedElement(); RenameFile rf = new RenameFile(); String newCUName = cuChange.getNewName(); IPath currentPath = modifiedCU.getResource().getLocation(); rf.setOldUri(ResourceUtils.fixURI(modifiedCU.getResource().getRawLocationURI())); IPath newPath = currentPath.removeLastSegments(1).append(newCUName); rf.setNewUri(ResourceUtils.fixURI(newPath.toFile().toURI())); edit.getDocumentChanges().add(Either.forRight(rf)); }
@Test public void testSerializeEither() { MyObjectA object = new MyObjectA(); object.myProperty = Either.forRight(7); assertSerialize(object, "{\"myProperty\":7}"); }
@Test public void testParseEither() { MyObjectA object = new MyObjectA(); object.myProperty = Either.forRight(7); assertParse(object, "{\"myProperty\":7}"); }