public class ContributionContextTypeRegistry extends ContextTypeRegistry
ContextType
s can be added either directly using
ContextTypeRegistry.addContextType(TemplateContextType)
or by instantiating and adding a
contributed context type using addContextType(String)
.Constructor and Description |
---|
ContributionContextTypeRegistry()
Creates a new context type registry.
|
ContributionContextTypeRegistry(String registryId)
Creates a new context type registry and registers all context types contributed for the given
registry ID.
|
Modifier and Type | Method and Description |
---|---|
void |
addContextType(String id)
Tries to create a context type given an id.
|
static TemplateContextType |
createContextType(String id)
Tries to create a context type given an id.
|
addContextType, contextTypes, getContextType
public ContributionContextTypeRegistry(String registryId)
registryId
- the registry IDpublic ContributionContextTypeRegistry()
Clients need to enable the desired context types by calling addContextType(String)
.
public void addContextType(String id)
org.eclipse.ui.editors.templates
extension point are searched for the given identifier and the specified
context type instantiated if it is found.id
- the id for the context type as specified in XMLpublic static TemplateContextType createContextType(String id)
org.eclipse.ui.editors.templates
extension point are
searched for the given identifier and the specified context type
instantiated if it is found. Any contributed
TemplateVariableResolver
s
are also instantiated and added to the context type.id
- the id for the context type as specified in XMLnull
if it is not found or cannot be instantiated
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.