org.eclipse.xtext.ui.editor.templates.CrossReferenceTemplateVariableResolver Java Examples

The following examples show how to use org.eclipse.xtext.ui.editor.templates.CrossReferenceTemplateVariableResolver. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: InspectableTemplateVariableResolverRegistry.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public IInspectableTemplateVariableResolver toInspectableResolver(TemplateVariableResolver resolver) {
	if (resolver instanceof IInspectableTemplateVariableResolver)
		return (IInspectableTemplateVariableResolver) resolver;
	if (resolver instanceof SimpleTemplateVariableResolver) {
		return new InspectableSimpleTemplateVariableResolver((SimpleTemplateVariableResolver) resolver);
	}
	if ("CrossReference".equals(resolver.getType())) {
		return new InspectableCrossReferenceVariableResolver((CrossReferenceTemplateVariableResolver) resolver);
	}
	if ("Enum".equals(resolver.getType())) {
		return new InspectableEnumVariableResolver((EnumTemplateVariableResolver) resolver);
	}
	return null;
}
 
Example #2
Source File: InspectableCrossReferenceVariableResolver.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public InspectableCrossReferenceVariableResolver(CrossReferenceTemplateVariableResolver resolver) {
	super(resolver);
}
 
Example #3
Source File: XtendTemplateContextType.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void setCrossReferenceResolver(CrossReferenceTemplateVariableResolver resolver) {
	// don't register the CrossReferenceTemplateVariableResolver for Xtend
	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=462917
}
 
Example #4
Source File: SARLTemplateContextType.java    From sarl with Apache License 2.0 4 votes vote down vote up
@Override
public void setCrossReferenceResolver(CrossReferenceTemplateVariableResolver resolver) {
	// don't register the CrossReferenceTemplateVariableResolver for Xtend, then for SARL
	// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=462917
}
 
Example #5
Source File: ValidUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}
 
Example #6
Source File: FormatUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}
 
Example #7
Source File: ExportUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}
 
Example #8
Source File: ScopeUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}
 
Example #9
Source File: CheckUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}
 
Example #10
Source File: CheckCfgUiModule.java    From dsl-devkit with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Binds a {@link CrossReferenceTemplateVariableResolver} which prefixes keywords with escape characters.
 *
 * @return {@link KeywordAwareCrossReferenceTemplateVariableResolver}
 */
public Class<? extends CrossReferenceTemplateVariableResolver> bindCrossReferenceTemplateVariableResolver() {
  return KeywordAwareCrossReferenceTemplateVariableResolver.class;
}