org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration Java Examples

The following examples show how to use org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration. 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: GamlEditTemplateDialog.java    From gama with GNU General Public License v3.0 6 votes vote down vote up
public GamlEditTemplateDialog(final Shell parent, final TemplatePersistenceData data, final boolean edit,
		final ContextTypeRegistry registry, final TemplatesLanguageConfiguration configuration,
		final IEditedResourceProvider resourceProvider, final String languageName) {
	super(parent);
	this.data = data;
	this.configuration = configuration;
	this.resourceProvider = resourceProvider;
	this.languageName = languageName;

	final String title = edit ? TemplateDialogMessages.EditTemplateDialog_title_edit
			: TemplateDialogMessages.EditTemplateDialog_title_new;
	setTitle(title);

	// this.fTemplate = data.getTemplate();
	// fIsNameModifiable = isNameModifiable;

	final List<String[]> contexts = Lists.newArrayList();
	for (final Iterator<TemplateContextType> it =
			Iterators.filter(registry.contextTypes(), TemplateContextType.class); it.hasNext();) {
		final TemplateContextType type = it.next();
		contexts.add(new String[] { type.getId(), type.getName() });
	}
	// fContextTypes = contexts.toArray(new String[contexts.size()][]);
	// fContextTypeRegistry = registry;

}
 
Example #2
Source File: CodetemplatesUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public Provider<TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return new Provider<TemplatesLanguageConfiguration>() {
		@Override
		public TemplatesLanguageConfiguration get() {
			return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider().get();
		}
	};
}
 
Example #3
Source File: AccessibleCodetemplatesActivator.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
protected TemplatesLanguageConfiguration getTemplatesLanguageConfigurationInstance() {
	if (configuration == null) {
		Injector singleTemplateInjector = getInjector("org.eclipse.xtext.ui.codetemplates.SingleCodetemplate");
		configuration = singleTemplateInjector.getInstance(TemplatesLanguageConfiguration.class);
	}
	return configuration;
}
 
Example #4
Source File: AccessibleCodetemplatesActivator.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public static Provider<TemplatesLanguageConfiguration> getTemplatesLanguageConfigurationProvider() {
	return new Provider<TemplatesLanguageConfiguration>() {
		@Override
		public TemplatesLanguageConfiguration get() {
			return ((AccessibleCodetemplatesActivator) getInstance()).getTemplatesLanguageConfigurationInstance();
		}
	};
}
 
Example #5
Source File: AbstractSARLUiModule.java    From sarl with Apache License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #6
Source File: AbstractN4JSUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #7
Source File: AbstractGamlUiModule.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #8
Source File: AbstractHelloWorldUiModule.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #9
Source File: AbstractXtendUiModule.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #10
Source File: AbstractPureXbaseUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #11
Source File: AbstractBuilderTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #12
Source File: AbstractArithmeticsUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #13
Source File: AbstractRuleEngineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #14
Source File: AbstractStatemachineUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #15
Source File: AbstractDomainmodelUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #16
Source File: AbstractEcore2XtextTestUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #17
Source File: AbstractXtextUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #18
Source File: AbstractCodetemplatesUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #19
Source File: AbstractXmlUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #20
Source File: AbstractNestedRefsTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #21
Source File: AbstractNoJdtTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #22
Source File: AbstractXtextGrammarTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #23
Source File: AbstractFileAwareTestLanguageUiModule.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #24
Source File: AbstractMyDslUiModule.java    From M2Doc with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #25
Source File: AbstractBromiumUiModule.java    From bromium with MIT License 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #26
Source File: AbstractTypesUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #27
Source File: AbstractJSONUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}
 
Example #28
Source File: AbstractRegularExpressionUiModule.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
	return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
}