mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
added a clear test
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
206b7afb19
commit
8133d0be88
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,7 @@ import org.eclipse.xtext.serializer.ISerializer;
|
|||
import org.eclipse.xtext.service.OperationCanceledManager;
|
||||
import org.eclipse.xtext.util.IResourceScopeCache;
|
||||
import org.eclipse.xtext.util.LazyStringInputStream;
|
||||
import org.eclipse.xtext.util.OnChangeEvictingCache;
|
||||
import org.eclipse.xtext.util.ReplaceRegion;
|
||||
import org.eclipse.xtext.util.TextRegion;
|
||||
import org.eclipse.xtext.validation.IConcreteSyntaxValidator;
|
||||
|
@ -296,6 +297,10 @@ public class XtextResource extends ResourceImpl {
|
|||
EObject newRootASTElement = parseResult.getRootASTElement();
|
||||
if (newRootASTElement != null && !containsRootElement(newRootASTElement))
|
||||
getContents().add(0, newRootASTElement);
|
||||
IResourceScopeCache cache = getCache();
|
||||
if (cache instanceof OnChangeEvictingCache) {
|
||||
((OnChangeEvictingCache) cache).clear(this);
|
||||
}
|
||||
reattachModificationTracker(newRootASTElement);
|
||||
clearErrorsAndWarnings();
|
||||
addSyntaxErrors();
|
||||
|
|
Loading…
Reference in a new issue