Java 类org.eclipse.jface.text.provisional.codelens.CodeLens 实例源码

项目:codelens-eclipse    文件:LSPCodeLens.java   
public void update(org.eclipse.lsp4j.CodeLens cl) {
    Command command = cl.getCommand();
    if (command != null) {
        org.eclipse.jface.text.provisional.codelens.Command c = new org.eclipse.jface.text.provisional.codelens.Command(
                command.getTitle(), command.getCommand());
        super.setCommand(c);
    }
}
项目:codelens-eclipse    文件:LSPCodeLens.java   
public LSPCodeLens(org.eclipse.lsp4j.CodeLens cl) {
    super(toRange(cl));
    update(cl);
    this.cl = cl;
}
项目:codelens-eclipse    文件:LSPCodeLens.java   
private static Range toRange(org.eclipse.lsp4j.CodeLens cl) {
    org.eclipse.lsp4j.Range range = cl.getRange();
    return new Range(range.getStart().getLine() + 1, range.getStart().getCharacter());
}
项目:codelens-eclipse    文件:LSPCodeLens.java   
public org.eclipse.lsp4j.CodeLens getCl() {
    return cl;
}