Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jdt.ui.text.java.ISemanticTokensProvider;
import org.eclipse.lsp4e.operations.semanticTokens.AbstractcSemanticTokensDataStreamProcessor;
import org.eclipse.lsp4e.operations.semanticTokens.AbstractSemanticTokensDataStreamProcessor;
import org.eclipse.lsp4j.Position;

class JavaSemanticTokensProcessor extends AbstractcSemanticTokensDataStreamProcessor<ISemanticTokensProvider.TokenType, ISemanticTokensProvider.SemanticToken> {
class JavaSemanticTokensProcessor extends AbstractSemanticTokensDataStreamProcessor<ISemanticTokensProvider.TokenType, ISemanticTokensProvider.SemanticToken> {

public JavaSemanticTokensProcessor(final Function<String, ISemanticTokensProvider.@Nullable TokenType> tokenTypeMapper,
final Function<Position, Integer> offsetMapper) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import org.eclipse.lsp4j.Position;
import org.eclipse.lsp4j.SemanticTokensLegend;

public abstract class AbstractcSemanticTokensDataStreamProcessor<T, V> {
public abstract class AbstractSemanticTokensDataStreamProcessor<T, V> {

private final Function<Position, Integer> offsetMapper;
private final Function<String, @Nullable T> tokenTypeMapper;

public AbstractcSemanticTokensDataStreamProcessor(Function<Position, Integer> offsetMapper,
protected AbstractSemanticTokensDataStreamProcessor(Function<Position, Integer> offsetMapper,
Function<String, @Nullable T> tokenTypeMapper) {
this.offsetMapper = offsetMapper;
this.tokenTypeMapper = tokenTypeMapper;
Expand Down Expand Up @@ -78,7 +78,7 @@ public final List<V> getTokensData(final List<Integer> dataStream,
return tokens;
}

abstract protected @Nullable V createTokenData(@Nullable T tokenType, int offset, int length, List<String> tokenModifiers);
protected abstract @Nullable V createTokenData(@Nullable T tokenType, int offset, int length, List<String> tokenModifiers);

private @Nullable String tokenType(final Integer data, final List<String> legend) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* The Class SemanticTokensDataStreamProcessor translates a stream of integers
* as defined by the LSP SemanticTokenRequests into a list of StyleRanges.
*/
public class SemanticTokensDataStreamProcessor extends AbstractcSemanticTokensDataStreamProcessor<IToken, StyleRange> {
public class SemanticTokensDataStreamProcessor extends AbstractSemanticTokensDataStreamProcessor<IToken, StyleRange> {

/**
* Creates a new instance of {@link SemanticTokensDataStreamProcessor}.
Expand Down
Loading