blob: 5a5ac8ba97e98928c42cc693315193c58444e3e8 (
plain) (
blame)
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
32
33
|
/*******************************************************************************
* Copyright (c) 2015 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
*******************************************************************************/
define(['xtext/services/XtextService', 'jquery'], function(XtextService, jQuery) {
/**
* Service class for semantic highlighting.
*/
function HighlightingService(serviceUrl, resourceId) {
this.initialize(serviceUrl, 'highlight', resourceId);
};
HighlightingService.prototype = new XtextService();
HighlightingService.prototype._checkPreconditions = function(editorContext, params) {
return this._state === undefined;
}
HighlightingService.prototype._onConflict = function(editorContext, cause) {
this.setState(undefined);
return {
suppressForcedUpdate: true
};
};
return HighlightingService;
});
|