diff --git a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java index c7ab7de8a..936e1d2be 100644 --- a/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java +++ b/org.eclipse.tm4e.registry/src/main/java/org/eclipse/tm4e/registry/internal/AbstractGrammarRegistryManager.java @@ -255,10 +255,14 @@ public Reader getReader() throws IOException { .toArray(IGrammarDefinition[]::new); } + + /** + * @param scopeName an unqualified (sources.batchfile) or qualified (sources.batchfile@plugin) scope name + */ @Override public @Nullable Collection getInjections(final String scopeName) { - // -> is effectively unused at the moment - return injections.get(scopeName); + // -> indirectly used by org.eclipse.tm4e.core.registry.Registry._doLoadSingleGrammar(String) + return injections.get(TMScope.parse(scopeName).getName()); } /** @@ -283,7 +287,7 @@ void registerInjection(final String scopeName, final String injectTo) { .map(binding -> binding.contentType).toList(); } - void registerContentTypeToScopeBinding(String pluginId, IContentType contentType, String scopeName) { + void registerContentTypeToScopeBinding(final String pluginId, final IContentType contentType, final String scopeName) { // -> used by GrammarRegistryManager.loadGrammarsFromExtensionPoints() contentTypeToScopeBindings.put(contentType, new ContentTypeToScopeBinding(pluginId, contentType, scopeName)); }