<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
	<extension
		point="org.eclipse.ui.editors">
		<editor
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
			contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
			default="true"
			extensions="sysml"
			id="eu.fbk.sysmlv2.SysMLv2"
			name="SysMLv2 Editor">
		</editor>
	</extension>
	<extension
		point="org.eclipse.ui.handlers">
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
			commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
			<activeWhen>
				<reference
					definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
			commandId="eu.fbk.sysmlv2.SysMLv2.validate">
			<activeWhen>
				<reference
					definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
		<!-- copy qualified name -->
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
			commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
			<activeWhen>
				<reference definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened" />
			</activeWhen>
		</handler>
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
			commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
			<activeWhen>
				<and>
					<reference definitionId="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
			<and>
				<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
				<with variable="activeEditor">
					<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
						value="eu.fbk.sysmlv2.SysMLv2"
						forcePluginActivation="true"/>
				</with>
			</and>
		</definition>
		<definition id="eu.fbk.sysmlv2.SysMLv2.XtextEditor.opened">
			<and>
				<reference definitionId="isXtextEditorActive"/>
				<with variable="activeEditor">
					<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
						value="eu.fbk.sysmlv2.SysMLv2"
						forcePluginActivation="true"/>
				</with>
			</and>
		</definition>
	</extension>
	<extension
			point="org.eclipse.ui.preferencePages">
		<page
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2"
			name="SysMLv2">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
		<page
			category="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.coloring"
			name="Syntax Coloring">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
		<page
			category="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.templates"
			name="Templates">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
	</extension>
	<extension
			point="org.eclipse.ui.propertyPages">
		<page
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2"
			name="SysMLv2">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
			<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="eu.fbk.sysmlv2.ui.keyword_SysMLv2"
			label="SysMLv2"/>
	</extension>
	<extension
		point="org.eclipse.ui.commands">
		<command
			description="Trigger expensive validation"
			id="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.validate"
				style="push"
				tooltip="Trigger expensive validation">
				<visibleWhen checkEnabled="false">
					<reference
						definitionId="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
					</reference>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
			commandId="org.eclipse.xtext.ui.editor.FindReferences">
			<activeWhen>
				<reference
					definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
				</reference>
			</activeWhen>
		</handler>
	</extension>
	<extension point="org.eclipse.core.contenttype.contentTypes">
		<content-type
			base-type="org.eclipse.core.runtime.text"
			file-extensions="sysml"
			id="eu.fbk.sysmlv2.SysMLv2.contenttype"
			name="SysMLv2 File"
			priority="normal">
		</content-type>
	</extension>
	<!-- adding resource factories -->
	<extension
		point="org.eclipse.emf.ecore.extension_parser">
		<parser
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
			type="sysml">
		</parser>
	</extension>
	<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
		<resourceServiceProvider
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
			uriExtension="sysml">
		</resourceServiceProvider>
	</extension>
	<!-- marker definitions for eu.fbk.sysmlv2.SysMLv2 -->
	<extension
			id="sysmlv2.check.fast"
			name="SysMLv2 Problem"
			point="org.eclipse.core.resources.markers">
		<super type="org.eclipse.xtext.ui.check.fast"/>
		<persistent value="true"/>
	</extension>
	<extension
			id="sysmlv2.check.normal"
			name="SysMLv2 Problem"
			point="org.eclipse.core.resources.markers">
		<super type="org.eclipse.xtext.ui.check.normal"/>
		<persistent value="true"/>
	</extension>
	<extension
			id="sysmlv2.check.expensive"
			name="SysMLv2 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="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.validator.preferencePage"
			name="Errors/Warnings">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
	</extension>
	<extension point="org.eclipse.xtext.builder.participant">
		<participant
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
			fileExtensions="sysml"/>
	</extension>
	<extension point="org.eclipse.ui.preferencePages">
		<page
			category="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.compiler.preferencePage"
			name="Compiler">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
	</extension>
	<extension point="org.eclipse.ui.propertyPages">
		<page
			category="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.compiler.propertyPage"
			name="Compiler">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
			<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="eu.fbk.sysmlv2.SysMLv2.OpenGeneratedCode"
				style="push">
				<visibleWhen checkEnabled="false">
					<reference definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened" />
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
			commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
			<activeWhen>
				<reference definitionId="eu.fbk.sysmlv2.SysMLv2.Editor.opened" />
			</activeWhen>
		</handler>
	</extension>
	<!-- Quick Outline -->
	<extension
		point="org.eclipse.ui.handlers">
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
			commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
			<activeWhen>
				<reference
					definitionId="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.Editor.opened"/>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<!-- quickfix marker resolution generator for eu.fbk.sysmlv2.SysMLv2 -->
	<extension
			point="org.eclipse.ui.ide.markerResolution">
		<markerResolutionGenerator
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="eu.fbk.sysmlv2.ui.sysmlv2.check.fast">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
		<markerResolutionGenerator
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="eu.fbk.sysmlv2.ui.sysmlv2.check.normal">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
		<markerResolutionGenerator
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
			markerType="eu.fbk.sysmlv2.ui.sysmlv2.check.expensive">
			<attribute
				name="FIXABLE_KEY"
				value="true">
			</attribute>
		</markerResolutionGenerator>
	</extension>
	<!-- Rename Refactoring -->
	<extension point="org.eclipse.ui.handlers">
		<handler
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
			commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
			<activeWhen>
				<reference
					definitionId="eu.fbk.sysmlv2.SysMLv2.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="eu.fbk.sysmlv2.SysMLv2.Editor.opened">
					</reference>
				</visibleWhen>
			</command>
		</menuContribution>
	</extension>
	<extension point="org.eclipse.ui.preferencePages">
		<page
			category="eu.fbk.sysmlv2.SysMLv2"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
			id="eu.fbk.sysmlv2.SysMLv2.refactoring"
			name="Refactoring">
			<keywordReference id="eu.fbk.sysmlv2.ui.keyword_SysMLv2"/>
		</page>
	</extension>
	<extension point="org.eclipse.compare.contentViewers">
		<viewer id="eu.fbk.sysmlv2.SysMLv2.compare.contentViewers"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
			extensions="sysml">
		</viewer>
		<contentTypeBinding
			contentTypeId="eu.fbk.sysmlv2.SysMLv2.contenttype"
			contentViewerId="eu.fbk.sysmlv2.SysMLv2.compare.contentViewers" />
	</extension>
	<extension point="org.eclipse.compare.contentMergeViewers">
		<viewer id="eu.fbk.sysmlv2.SysMLv2.compare.contentMergeViewers"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
			extensions="sysml" label="SysMLv2 Compare">
		</viewer>
		<contentTypeBinding
			contentTypeId="eu.fbk.sysmlv2.SysMLv2.contenttype"
			contentMergeViewerId="eu.fbk.sysmlv2.SysMLv2.compare.contentMergeViewers" />
	</extension>
	<extension point="org.eclipse.ui.editors.documentProviders">
		<provider id="eu.fbk.sysmlv2.SysMLv2.editors.documentProviders"
			class="eu.fbk.sysmlv2.ui.SysMLv2ExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
			extensions="sysml">
		</provider>
	</extension>
	<extension point="org.eclipse.team.core.fileTypes">
		<fileTypes
			extension="sysml"
			type="text">
		</fileTypes>
	</extension>
</plugin>
