/
IHighlightedPositionAcceptor.java
31 lines (28 loc) · 1.17 KB
/
IHighlightedPositionAcceptor.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*******************************************************************************
* Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.xtext.ide.editor.syntaxcoloring;
/**
* Xtext uses an {@link IHighlightedPositionAcceptor} to collect any ranges that should
* be highlighted based on semantic information of your model. It is passed to a
* {@link ISemanticHighlightingCalculator}.
*
* This interface is not intended to be implemented by clients.
*
* @author Sebastian Zarnekow - Initial contribution and API
* @since 2.9
*/
public interface IHighlightedPositionAcceptor {
/**
* Associates a text range with a style.
* @param offset the offset of the range.
* @param length the length of the range.
* @param id the ids of the highlighting style, that should be applied.
*/
void addPosition(int offset, int length, String... id);
}