<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
	<extension
		point="org.eclipse.ui.editors">
		<editor
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
			contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
			default="true"
			extensions="tdltx"
			id="org.etsi.mts.tdl.TDLtx"
			name="TDLtx Editor">
		</editor>
	</extension>
	<extension
		point="org.eclipse.ui.handlers">
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
			commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
			<activeWhen>
				<reference
					definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
			commandId="org.etsi.mts.tdl.TDLtx.validate">
			<activeWhen>
				<reference
					definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
		<!-- copy qualified name -->
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
			commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
			<activeWhen>
				<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened" />
			</activeWhen>
		</handler>
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
			commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
			<activeWhen>
				<and>
					<reference definitionId="org.etsi.mts.tdl.TDLtx.XtextEditor.opened" />
					<iterate>
						<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
					</iterate>
				</and>
			</activeWhen>
		</handler>
	</extension>
	<extension point="org.eclipse.core.expressions.definitions">
		<definition id="org.etsi.mts.tdl.TDLtx.Editor.opened">
			<and>
				<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
				<with variable="activeEditor">
					<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
						value="org.etsi.mts.tdl.TDLtx"
						forcePluginActivation="true"/>
				</with>
			</and>
		</definition>
		<definition id="org.etsi.mts.tdl.TDLtx.XtextEditor.opened">
			<and>
				<reference definitionId="isXtextEditorActive"/>
				<with variable="activeEditor">
					<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
						value="org.etsi.mts.tdl.TDLtx"
						forcePluginActivation="true"/>
				</with>
			</and>
		</definition>
	</extension>
	<extension
			point="org.eclipse.ui.preferencePages">
		<page
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
			id="org.etsi.mts.tdl.TDLtx"
			name="TDLtx">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
			id="org.etsi.mts.tdl.TDLtx.coloring"
			name="Syntax Coloring">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
			id="org.etsi.mts.tdl.TDLtx.templates"
			name="Templates">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
	</extension>
	<extension
			point="org.eclipse.ui.propertyPages">
		<page
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
			id="org.etsi.mts.tdl.TDLtx"
			name="TDLtx">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
			<enabledWhen>
				<adapt type="org.eclipse.core.resources.IProject"/>
			</enabledWhen>
			<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
		</page>
	</extension>
	<extension
		point="org.eclipse.ui.keywords">
		<keyword
			id="org.etsi.mts.tdl.ui.keyword_TDLtx"
			label="TDLtx"/>
	</extension>
	<extension
		point="org.eclipse.ui.commands">
		<command
			description="Trigger expensive validation"
			id="org.etsi.mts.tdl.TDLtx.validate"
			name="Validate">
		</command>
		<!-- copy qualified name -->
		<command
			id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
			categoryId="org.eclipse.ui.category.edit"
			description="Copy the qualified name for the selected element"
			name="Copy Qualified Name">
		</command>
		<command
			id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
			categoryId="org.eclipse.ui.category.edit"
			description="Copy the qualified name for the selected element"
			name="Copy Qualified Name">
		</command>
	</extension>
	<extension point="org.eclipse.ui.menus">
		<menuContribution
			locationURI="popup:#TextEditorContext?after=group.edit">
			<command
				commandId="org.etsi.mts.tdl.TDLtx.validate"
				style="push"
				tooltip="Trigger expensive validation">
				<visibleWhen checkEnabled="false">
					<reference
						definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
					</reference>
				</visibleWhen>
			</command>
		</menuContribution>
		<!-- copy qualified name -->
		<menuContribution locationURI="popup:#TextEditorContext?after=copy">
			<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
				style="push" tooltip="Copy Qualified Name">
				<visibleWhen checkEnabled="false">
					<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened" />
				</visibleWhen>
			</command>
		</menuContribution>
		<menuContribution locationURI="menu:edit?after=copy">
			<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
				style="push" tooltip="Copy Qualified Name">
				<visibleWhen checkEnabled="false">
					<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened" />
				</visibleWhen>
			</command>
		</menuContribution>
		<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
			<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
				style="push" tooltip="Copy Qualified Name">
				<visibleWhen checkEnabled="false">
					<and>
						<reference definitionId="org.etsi.mts.tdl.TDLtx.XtextEditor.opened" />
						<iterate>
							<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
						</iterate>
					</and>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.menus">
		<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
			<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
				<visibleWhen checkEnabled="false">
					<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
					</reference>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
			commandId="org.eclipse.xtext.ui.editor.FindReferences">
			<activeWhen>
				<reference
					definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
	</extension>
	<extension point="org.eclipse.core.contenttype.contentTypes">
		<content-type
			base-type="org.eclipse.core.runtime.text"
			file-extensions="tdltx"
			id="org.etsi.mts.tdl.TDLtx.contenttype"
			name="TDLtx File"
			priority="normal">
		</content-type>
	</extension>
	<!-- adding resource factories -->
	<extension
		point="org.eclipse.emf.ecore.extension_parser">
		<parser
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
			type="tdltx">
		</parser>
	</extension>
	<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
		<resourceServiceProvider
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
			uriExtension="tdltx">
		</resourceServiceProvider>
	</extension>
	<!-- marker definitions for org.etsi.mts.tdl.TDLtx -->
	<extension
			id="tdltx.check.fast"
			name="TDLtx Problem"
			point="org.eclipse.core.resources.markers">
		<super type="org.eclipse.xtext.ui.check.fast"/>
		<persistent value="true"/>
	</extension>
	<extension
			id="tdltx.check.normal"
			name="TDLtx Problem"
			point="org.eclipse.core.resources.markers">
		<super type="org.eclipse.xtext.ui.check.normal"/>
		<persistent value="true"/>
	</extension>
	<extension
			id="tdltx.check.expensive"
			name="TDLtx Problem"
			point="org.eclipse.core.resources.markers">
		<super type="org.eclipse.xtext.ui.check.expensive"/>
		<persistent value="true"/>
	</extension>
	<extension point="org.eclipse.ui.preferencePages">
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
			id="org.etsi.mts.tdl.TDLtx.validator.preferencePage"
			name="Errors/Warnings">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
	</extension>
	<extension point="org.eclipse.xtext.builder.participant">
		<participant
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
			fileExtensions="tdltx"/>
	</extension>
	<extension point="org.eclipse.ui.preferencePages">
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
			id="org.etsi.mts.tdl.TDLtx.compiler.preferencePage"
			name="Compiler">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
	</extension>
	<extension point="org.eclipse.ui.propertyPages">
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
			id="org.etsi.mts.tdl.TDLtx.compiler.propertyPage"
			name="Compiler">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
			<enabledWhen>
				<adapt type="org.eclipse.core.resources.IProject"/>
			</enabledWhen>
			<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
		</page>
	</extension>
	<extension point="org.eclipse.ui.menus">
		<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
			<command
				commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
				id="org.etsi.mts.tdl.TDLtx.OpenGeneratedCode"
				style="push">
				<visibleWhen checkEnabled="false">
					<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened" />
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
			commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
			<activeWhen>
				<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened" />
			</activeWhen>
		</handler>
	</extension>
	<!-- Quick Outline -->
	<extension
		point="org.eclipse.ui.handlers">
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
			commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
			<activeWhen>
				<reference
					definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
	</extension>
	<extension
		point="org.eclipse.ui.commands">
		<command
			description="Open the quick outline."
			id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
			name="Quick Outline">
		</command>
	</extension>
	<extension point="org.eclipse.ui.menus">
		<menuContribution
			locationURI="popup:#TextEditorContext?after=group.open">
			<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
				style="push"
				tooltip="Open Quick Outline">
				<visibleWhen checkEnabled="false">
					<reference definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened"/>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<!-- quickfix marker resolution generator for org.etsi.mts.tdl.TDLtx -->
	<extension
			point="org.eclipse.ui.ide.markerResolution">
		<markerResolutionGenerator
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="org.etsi.mts.tdl.tx.ui.tdltx.check.fast">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
		<markerResolutionGenerator
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="org.etsi.mts.tdl.tx.ui.tdltx.check.normal">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
		<markerResolutionGenerator
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="org.etsi.mts.tdl.tx.ui.tdltx.check.expensive">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
	</extension>
	<!-- Rename Refactoring -->
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
			commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
			<activeWhen>
				<reference
					definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
	</extension>
	<extension point="org.eclipse.ui.menus">
		<menuContribution
			locationURI="popup:#TextEditorContext?after=group.edit">
			<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
				style="push">
				<visibleWhen checkEnabled="false">
					<reference
						definitionId="org.etsi.mts.tdl.TDLtx.Editor.opened">
					</reference>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.preferencePages">
		<page
			category="org.etsi.mts.tdl.TDLtx"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
			id="org.etsi.mts.tdl.TDLtx.refactoring"
			name="Refactoring">
			<keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtx"/>
		</page>
	</extension>
	<extension point="org.eclipse.compare.contentViewers">
		<viewer id="org.etsi.mts.tdl.TDLtx.compare.contentViewers"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
			extensions="tdltx">
		</viewer>
		<contentTypeBinding
			contentTypeId="org.etsi.mts.tdl.TDLtx.contenttype"
			contentViewerId="org.etsi.mts.tdl.TDLtx.compare.contentViewers" />
	</extension>
	<extension point="org.eclipse.compare.contentMergeViewers">
		<viewer id="org.etsi.mts.tdl.TDLtx.compare.contentMergeViewers"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
			extensions="tdltx" label="TDLtx Compare">
		</viewer>
		<contentTypeBinding
			contentTypeId="org.etsi.mts.tdl.TDLtx.contenttype"
			contentMergeViewerId="org.etsi.mts.tdl.TDLtx.compare.contentMergeViewers" />
	</extension>
	<extension point="org.eclipse.ui.editors.documentProviders">
		<provider id="org.etsi.mts.tdl.TDLtx.editors.documentProviders"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
			extensions="tdltx">
		</provider>
	</extension>
	<extension point="org.eclipse.team.core.fileTypes">
		<fileTypes
			extension="tdltx"
			type="text">
		</fileTypes>
	</extension>
	<extension
		point="org.eclipse.ui.newWizards">
		<category id="org.etsi.mts.tdl.ui.category" name="TDLtx">
		</category>
		<wizard
			category="org.etsi.mts.tdl.ui.category"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewProjectWizard"
			id="org.etsi.mts.tdl.ui.wizard.TDLtxNewProjectWizard"
			name="TDLtx Project"
			icon="icons/new_TDLtx_proj.gif"
			project="true">
		</wizard>
	</extension>
	<extension
		point="org.eclipse.xtext.ui.projectTemplate">
		<projectTemplateProvider
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxProjectTemplateProvider"
			grammarName="org.etsi.mts.tdl.TDLtx">
		</projectTemplateProvider>
	</extension>
	<extension
		point="org.eclipse.ui.perspectiveExtensions">
		<perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
			<newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxNewProjectWizard"/>
		</perspectiveExtension>
		<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
			<newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxNewProjectWizard"/>
		</perspectiveExtension>
	</extension>
	<extension
		point="org.eclipse.ui.menus">
		<menuContribution
			allPopups="false"
			locationURI="toolbar:org.eclipse.ui.main.toolbar">
			<toolbar
				id="org.etsi.mts.tdl.ui.toolbar">
				<!--
					For some reason the tooltip is not shown when hovering over the toolbar button
					See also https://www.eclipse.org/forums/index.php/t/1079111/
				-->
				<command
					commandId="org.eclipse.ui.newWizard"
					tooltip="Create a new TDLtx project">
					<parameter
						name="newWizardId"
						value="org.etsi.mts.tdl.ui.wizard.TDLtxNewProjectWizard">
					</parameter>
				</command>
			</toolbar>
		</menuContribution>
	</extension>
	<extension
		point="org.eclipse.ui.newWizards">
		<category id="org.etsi.mts.tdl.ui.category" name="TDLtx">
		</category>
		<wizard
			category="org.etsi.mts.tdl.ui.category"
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewFileWizard"
			id="org.etsi.mts.tdl.ui.wizard.TDLtxNewFileWizard"
			name="TDLtx File"
			icon="icons/new_TDLtx_file.png">
		</wizard>
	</extension>
	<extension
		point="org.eclipse.xtext.ui.fileTemplate">
		<fileTemplateProvider
			class="org.etsi.mts.tdl.ui.TDLtxExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxFileTemplateProvider"
			grammarName="org.etsi.mts.tdl.TDLtx">
		</fileTemplateProvider>
	</extension>
	<extension
		point="org.eclipse.ui.perspectiveExtensions">
		<perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
			<newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxNewFileWizard"/>
		</perspectiveExtension>
		<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
			<newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxNewFileWizard"/>
		</perspectiveExtension>
	</extension>
	<extension
		point="org.eclipse.ui.menus">
		<menuContribution
			allPopups="false"
			locationURI="toolbar:org.eclipse.ui.main.toolbar">
			<toolbar
				id="org.etsi.mts.tdl.ui.toolbar">
				<!--
					For some reason the tooltip is not shown when hovering over the toolbar button
					See also https://www.eclipse.org/forums/index.php/t/1079111/
				-->
				<command
					commandId="org.eclipse.ui.newWizard"
					tooltip="Create a new TDLtx file">
					<parameter
						name="newWizardId"
						value="org.etsi.mts.tdl.ui.wizard.TDLtxNewFileWizard">
					</parameter>
				</command>
			</toolbar>
		</menuContribution>
	</extension>
</plugin>
