public boolean isSupportsCompletionDocumentationMarkdown() { //@formatter:off return v3supported && capabilities.getTextDocument().getCompletion() != null && capabilities.getTextDocument().getCompletion().getCompletionItem() != null && capabilities.getTextDocument().getCompletion().getCompletionItem().getDocumentationFormat() != null && capabilities.getTextDocument().getCompletion().getCompletionItem().getDocumentationFormat().contains(MarkupKind.MARKDOWN); //@formatter:on }
public boolean isSignatureHelpSupported() { return v3supported && capabilities.getTextDocument().getSignatureHelp() != null; }
private static ReferenceParams createReferenceParams(URI uri, int line, int col, boolean includeDeclaration) { ReferenceParams referenceParams = new ReferenceParams(new ReferenceContext(includeDeclaration)); referenceParams.setTextDocument(new TextDocumentIdentifier(uri.toString())); referenceParams.setPosition(new Position(line, col)); return referenceParams; }
private int compare(Position p1, Position p2) { int d = p1.getLine() - p2.getLine(); if (d!=0) return d; return p1.getCharacter() - p2.getCharacter(); } };
public boolean isCompletionSnippetsSupported() { //@formatter:off return v3supported && capabilities.getTextDocument().getCompletion() != null && capabilities.getTextDocument().getCompletion().getCompletionItem() != null && isTrue(capabilities.getTextDocument().getCompletion().getCompletionItem().getSnippetSupport()); //@formatter:on }
public boolean isSemanticHighlightingSupported() { //@formatter:off return v3supported && capabilities.getTextDocument().getSemanticHighlightingCapabilities() != null && capabilities.getTextDocument().getSemanticHighlightingCapabilities().getSemanticHighlighting() != null && capabilities.getTextDocument().getSemanticHighlightingCapabilities().getSemanticHighlighting().booleanValue(); //@formatter:on }
/** * {@code true} if the client has explicitly set the * {@code textDocument.documentSymbol.hierarchicalDocumentSymbolSupport} to * {@code true} when initializing the LS. Otherwise, {@code false}. */ public boolean isHierarchicalDocumentSymbolSupported() { //@formatter:off return v3supported && capabilities.getTextDocument().getDocumentSymbol() != null && capabilities.getTextDocument().getDocumentSymbol().getHierarchicalDocumentSymbolSupport() != null && capabilities.getTextDocument().getDocumentSymbol().getHierarchicalDocumentSymbolSupport().booleanValue(); }
private String sortKey(CompletionItem item) { String k = item.getSortText(); if (k==null) { k = item.getLabel(); } return k; } });
public boolean isResourceOperationSupported() { //@formatter:off return capabilities.getWorkspace() != null && capabilities.getWorkspace().getWorkspaceEdit() != null && capabilities.getWorkspace().getWorkspaceEdit().getResourceOperations() != null && capabilities.getWorkspace().getWorkspaceEdit().getResourceOperations().contains(ResourceOperationKind.Create) && capabilities.getWorkspace().getWorkspaceEdit().getResourceOperations().contains(ResourceOperationKind.Rename) && capabilities.getWorkspace().getWorkspaceEdit().getResourceOperations().contains(ResourceOperationKind.Delete); //@formatter:on }
@Override @Pure public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode()); result = prime * result + ((this.range== null) ? 0 : this.range.hashCode()); return prime * result + ((this.context== null) ? 0 : this.context.hashCode()); } }
@Override @Pure public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode()); result = prime * result + ((this.color== null) ? 0 : this.color.hashCode()); return prime * result + ((this.range== null) ? 0 : this.range.hashCode()); } }
ReferenceContext clone(ReferenceContext referenceContext) { if (referenceContext == null) { return null; } boolean includeDeclaration = referenceContext.isIncludeDeclaration(); ReferenceContext cloned = new ReferenceContext(); cloned.setIncludeDeclaration(includeDeclaration); return cloned; }
public static RenameOptions createOptions() { RenameOptions renameOptions = new RenameOptions(); renameOptions.setPrepareProvider(true); return renameOptions; }
@Override @Pure public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode()); result = prime * result + ((this.range== null) ? 0 : this.range.hashCode()); return prime * result + ((this.context== null) ? 0 : this.context.hashCode()); } }
@Override @Pure public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode()); result = prime * result + ((this.color== null) ? 0 : this.color.hashCode()); return prime * result + ((this.range== null) ? 0 : this.range.hashCode()); } }