aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-04-28 12:08:57 (EDT)
committersefftinge2009-04-28 12:08:57 (EDT)
commit972de11c5bbdcc1baba7e27e01b58b2115784d5f (patch)
treeec9f9df97440a859d98ee89d51624c1fa965045a
parent7f68d9f3eed1a34ed6da234f647811666084f75e (diff)
downloadorg.eclipse.xtext-972de11c5bbdcc1baba7e27e01b58b2115784d5f.zip
org.eclipse.xtext-972de11c5bbdcc1baba7e27e01b58b2115784d5f.tar.gz
org.eclipse.xtext-972de11c5bbdcc1baba7e27e01b58b2115784d5f.tar.bz2
Fix: name of importURI feature is configurable (https://bugs.eclipse.org/bugs/show_bug.cgi?id=270416)
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/DeclarativeScopeProviderTest.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/PartialLinkingTest.java2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/DeclarativeScopeProviderTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/DeclarativeScopeProviderTest.java
index 64e3fc8..f7a0bed 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/DeclarativeScopeProviderTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/DeclarativeScopeProviderTest.java
@@ -24,6 +24,7 @@ import org.eclipse.xtext.crossref.IScope;
import org.eclipse.xtext.crossref.IScopedElement;
import org.eclipse.xtext.crossref.impl.AbstractDeclarativeScopeProvider;
import org.eclipse.xtext.crossref.impl.DefaultScopeProvider;
+import org.eclipse.xtext.crossref.impl.ImportUriResolver;
import org.eclipse.xtext.crossref.impl.SimpleScope;
import junit.framework.TestCase;
@@ -109,6 +110,7 @@ public class DeclarativeScopeProviderTest extends TestCase {
}
};
DefaultScopeProvider defaultScopeProvider = new DefaultScopeProvider();
+ defaultScopeProvider.setImportUriResolver(new ImportUriResolver());
provider.setGenericFallBack(defaultScopeProvider);
ResourceSet resourceSet = new ResourceSetImpl();
Resource res = new XMIResourceFactoryImpl().createResource(URI.createURI("test.uri"));
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/PartialLinkingTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/PartialLinkingTest.java
index ad0a6bd..a6dbc93 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/PartialLinkingTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/PartialLinkingTest.java
@@ -17,6 +17,7 @@ import org.eclipse.xtext.crossref.IScope;
import org.eclipse.xtext.crossref.IScopeProvider;
import org.eclipse.xtext.crossref.impl.DefaultLinkingService;
import org.eclipse.xtext.crossref.impl.DefaultScopeProvider;
+import org.eclipse.xtext.crossref.impl.ImportUriResolver;
import org.eclipse.xtext.crossref.impl.Linker;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.testlanguages.ReferenceGrammarTestLanguageStandaloneSetup;
@@ -46,6 +47,7 @@ public class PartialLinkingTest extends AbstractGeneratorTest implements IScopeP
super.setUp();
with(ReferenceGrammarTestLanguageStandaloneSetup.class);
scopeProvider = new DefaultScopeProvider();
+ ((DefaultScopeProvider) scopeProvider).setImportUriResolver(get(ImportUriResolver.class));
modelAsText =
"spielplatz 1 {\n" +
" kind( Bommel1 1)\n" +