Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: registering local grammar injection in plugin.xml broken #733 #734

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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());
}

/**
Expand All @@ -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));
}
Expand Down
Loading