diff options
author | Stéphane Thibaudeau | 2018-04-23 15:16:26 +0000 |
---|---|---|
committer | lgoubet | 2018-06-22 08:02:06 +0000 |
commit | 9dee904cd971679c3e86773cf7836da0c71878d3 (patch) | |
tree | 869eca44cfb87f0292d46b1f87680ae9d34b1897 /plugins | |
parent | 225e9dae4e8bcaa9c67adf13a6a9b616cd7563bc (diff) | |
download | org.eclipse.emf.compare-9dee904cd971679c3e86773cf7836da0c71878d3.tar.gz org.eclipse.emf.compare-9dee904cd971679c3e86773cf7836da0c71878d3.tar.xz org.eclipse.emf.compare-9dee904cd971679c3e86773cf7836da0c71878d3.zip |
Better handling of Xtext with Live scope option
Change-Id: I0105fef51d9e42c193793bf37406e488c8082a46
Signed-off-by: Stéphane Thibaudeau <stephane.thibaudeau@obeo.fr>
Diffstat (limited to 'plugins')
3 files changed, 8 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/SynchronizedResourceSet.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/SynchronizedResourceSet.java index d849e7691..0ccd43a5c 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/SynchronizedResourceSet.java +++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/resolver/SynchronizedResourceSet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 Obeo and others. + * Copyright (c) 2011, 2018 Obeo and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -98,6 +98,7 @@ public class SynchronizedResourceSet extends ResourceSetImpl implements Disposab }); loadOptions.put(XMLResource.OPTION_USE_PARSER_POOL, parserPool); loadOptions.put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE); + loadOptions.put(XTEXT_SCOPING_LIVE_SCOPE_OPTION, Boolean.TRUE); /* * We don't use XMLResource.OPTION_USE_XML_NAME_TO_FEATURE_MAP whereas it could bring performance diff --git a/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/DisposableResourceSet.java b/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/DisposableResourceSet.java index 8122e465b..73ca7ebf1 100644 --- a/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/DisposableResourceSet.java +++ b/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/DisposableResourceSet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 Obeo. + * Copyright (c) 2014, 2018 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -19,6 +19,9 @@ import org.eclipse.emf.ecore.resource.ResourceSet; */ public interface DisposableResourceSet extends ResourceSet { + /** This constant is used to resolve Xtext resources. */ + public final String XTEXT_SCOPING_LIVE_SCOPE_OPTION = "org.eclipse.xtext.scoping.LIVE_SCOPE"; //$NON-NLS-1$ + /** * This method should be called when the resource set is no longer needed. */ diff --git a/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/NotLoadingResourceSet.java b/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/NotLoadingResourceSet.java index 514a9f254..8686823ca 100644 --- a/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/NotLoadingResourceSet.java +++ b/plugins/org.eclipse.emf.compare.ide/src/org/eclipse/emf/compare/ide/internal/utils/NotLoadingResourceSet.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2017 Obeo and others. + * Copyright (c) 2012, 2018 Obeo and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -440,6 +440,7 @@ public final class NotLoadingResourceSet extends ResourceSetImpl implements Disp parserPool.addProxyListener(this); loadOptions.put(XMLResource.OPTION_USE_PARSER_POOL, parserPool); loadOptions.put(XMLResource.OPTION_USE_DEPRECATED_METHODS, Boolean.FALSE); + loadOptions.put(XTEXT_SCOPING_LIVE_SCOPE_OPTION, Boolean.TRUE); return loadOptions; } |