Search in sources :

Example 1 with DocumentHighlightKind

use of org.eclipse.lsp4j.DocumentHighlightKind in project xtext-core by eclipse.

the class AbstractLanguageServerTest method _toExpectation.

protected String _toExpectation(final DocumentHighlight it) {
    String _xblockexpression = null;
    {
        StringConcatenation _builder = new StringConcatenation();
        {
            Range _range = it.getRange();
            boolean _tripleEquals = (_range == null);
            if (_tripleEquals) {
                _builder.append("[NaN, NaN]:[NaN, NaN]");
            } else {
                String _expectation = this.toExpectation(it.getRange());
                _builder.append(_expectation);
            }
        }
        final String rangeString = _builder.toString();
        StringConcatenation _builder_1 = new StringConcatenation();
        {
            DocumentHighlightKind _kind = it.getKind();
            boolean _tripleEquals_1 = (_kind == null);
            if (_tripleEquals_1) {
                _builder_1.append("NaN");
            } else {
                String _expectation_1 = this.toExpectation(it.getKind());
                _builder_1.append(_expectation_1);
            }
        }
        _builder_1.append(" ");
        _builder_1.append(rangeString);
        _xblockexpression = _builder_1.toString();
    }
    return _xblockexpression;
}
Also used : DocumentHighlightKind(org.eclipse.lsp4j.DocumentHighlightKind) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) FoldingRange(org.eclipse.lsp4j.FoldingRange) Range(org.eclipse.lsp4j.Range)

Aggregations

DocumentHighlightKind (org.eclipse.lsp4j.DocumentHighlightKind)1 FoldingRange (org.eclipse.lsp4j.FoldingRange)1 Range (org.eclipse.lsp4j.Range)1 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1