<AddIn name        = "Xml Editor"
       author      = "Matt Ward"
       copyright   = "prj:///doc/copyright.txt"
       description = "Xml Editor">
	
	<Manifest>
		<Identity name = "ICSharpCode.XmlEditor"/>
	</Manifest>
	
	<Runtime>
		<Import assembly = "XmlEditor.dll">
			<ConditionEvaluator name = "StylesheetAssigned" class = "ICSharpCode.XmlEditor.StylesheetAssignedCondition"/>
		</Import>
		<Import assembly = ":ICSharpCode.SharpDevelop"/>
	</Runtime>
	
	<!-- Xml Editor View -->
	<Path name = "/SharpDevelop/Workbench/DisplayBindings">
		<DisplayBinding id = "XmlEditor"
		                insertbefore = "Text"
		                supportedformats = "Text Files,Source Files"
		                class = "ICSharpCode.XmlEditor.XmlDisplayBinding"/>
	</Path>
	
	<!-- Xml parser used to initiate the folding update -->
	<Path name = "/Workspace/Parser">
		<Parser id = "XmlFoldingParser"
		        supportedextensions  = ".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.proj;.csproj;.vbproj;.ilproj;.build;.xfrm;.targets;.xaml;.xpt;.xft"
		        class = "ICSharpCode.XmlEditor.Parser"/>
	</Path>
	
	<!-- Xml file filter -->
	<Path name = "/SharpDevelop/Workbench/FileFilter">
		<FileFilter id = "Xml"
	                insertbefore="AllFiles"
	                name = "${res:SharpDevelop.FileFilter.XmlFiles}"
	                extensions = "*.xml"/>
		<FileFilter id = "Xsl"
		            insertbefore="AllFiles"
		            name = "XSL files (*.xsl;*.xslt)"
		            extensions = "*.xsl;*.xslt"/>
	</Path>

	<!-- XML menu -->
	<Path name = "/SharpDevelop/Workbench/MainMenu">
		<Condition name = "WindowActive" activewindow="ICSharpCode.XmlEditor.XmlView">
	        <MenuItem id = "Xml" insertafter="View" insertbefore="Tools" label="&amp;XML" type = "Menu">
				<MenuItem id = "CreateSchema"
				          label = "${res:ICSharpCode.XmlEditor.CreateSchemaMenuLabel}"
				          class = "ICSharpCode.XmlEditor.CreateSchemaCommand" />
				<MenuItem id = "ValidateXml"
				          label = "${res:ICSharpCode.XmlEditor.ValidateXmlMenuLabel}"
				          class = "ICSharpCode.XmlEditor.ValidateXmlCommand"
				          shortcut = "Control|Shift|V" />
				<MenuItem id = "Separator1" type = "Separator"/>
	        	<ComplexCondition action="Disable">
					<Not>
						<Condition name = "WindowActive" activewindow = "ICSharpCode.XmlEditor.XslOutputView"/>
					</Not>
					<MenuItem id="AssignStylesheet"
						      label="&amp;Assign XSLT..."
						      class="ICSharpCode.XmlEditor.AssignStylesheetCommand"/>
			        	<Condition name = "StylesheetAssigned" action="Disable">
							<MenuItem id="OpenStylesheet"
								      label="&amp;Open XSLT"
								      class="ICSharpCode.XmlEditor.OpenStylesheetCommand"/>
			        	</Condition>
					<MenuItem id="RunTransform"
						      label="Run XSL&amp;T"
						      class="ICSharpCode.XmlEditor.RunXslTransformCommand"
						      shortcut="Control|Shift|T"/>
				</ComplexCondition>
			</MenuItem>
		</Condition>
	</Path>

	<!-- Right click menu -->
	<Path name = "/SharpDevelop/ViewContent/XmlEditor/ContextMenu">
		<MenuItem id = "Cut"
		          label = "${res:XML.TextAreaContextMenu.Cut}"
		          icon = "Icons.16x16.CutIcon"
		          shortcut = "Control|X"
		          class = "ICSharpCode.SharpDevelop.Commands.Cut"/>
		<MenuItem id = "Copy"
		          label = "${res:XML.TextAreaContextMenu.Copy}"
		          icon = "Icons.16x16.CopyIcon"
		          shortcut = "Control|C"
		          class = "ICSharpCode.SharpDevelop.Commands.Copy"/>
		<MenuItem id = "Paste"
		          label = "${res:XML.TextAreaContextMenu.Paste}"
		          icon = "Icons.16x16.PasteIcon"
		          shortcut = "Control|V"
		          class = "ICSharpCode.SharpDevelop.Commands.Paste"/>
		<MenuItem id = "Delete"
		          label = "${res:XML.MainMenu.EditMenu.Delete}"
		          icon = "Icons.16x16.DeleteIcon"
		          class = "ICSharpCode.SharpDevelop.Commands.Delete"/>
		<MenuItem id = "Separator1" type = "Separator"/>
		<MenuItem id = "Save"
		          label = "${res:XML.MainMenu.FileMenu.Save}"
		          icon = "Icons.16x16.SaveIcon"
		          shortcut = "Control|S"
		          class = "ICSharpCode.SharpDevelop.Commands.SaveFile"/>
		<MenuItem id = "SaveAs"
		          label = "${res:XML.MainMenu.FileMenu.SaveAs}"
		          class = "ICSharpCode.SharpDevelop.Commands.SaveFileAs"/>
		<MenuItem id = "File"
		          label = "${res:XML.MainMenu.FileMenu.Close}"
		          class = "ICSharpCode.SharpDevelop.Commands.CloseFile"/>
		<MenuItem id = "Separator2" type = "Separator"/>
		<MenuItem id = "Indent"
		          label = "${res:XML.TextAreaContextMenu.Indent}"
		          shortcut = "Control|I"
		          class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.IndentSelection" />
		<MenuItem id = "FileMode" label = "${res:XML.TextAreaContextMenu.FileMode}" type="Menu">
			<MenuItem id = "HighlightBuilder" type="Builder" class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.HighlightingTypeBuilder" />
		</MenuItem>
		<MenuItem id = "Separator3" type = "Separator"/>
		<MenuItem id = "Options"
		          label = "${res:XML.TextAreaContextMenu.BufferOptions}"
		          icon = "Icons.16x16.PropertiesIcon"
		          class ="ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowBufferOptions"/>
	</Path>
	
	<!-- Options panel -->
	<Path path = "/SharpDevelop/Dialogs/OptionsDialog/TextEditorOptions">
		<DialogPanel id = "XmlSchemasPanel"
		             insertafter = "Markers"
		             label = "${res:ICSharpCode.XmlEditor.XmlSchemasPanel.Title}"
		             class = "ICSharpCode.XmlEditor.XmlSchemasPanel" />
		<DialogPanel id = "XmlEditorOptionsPanel"
		             insertafter = "Markers"
		             insertbefore = "XmlSchemasPanel"
		             label = "${res:ICSharpCode.XmlEditor.XmlEditorOptionsPanel.Title}"
		             class = "ICSharpCode.XmlEditor.XmlEditorOptionsPanel" />
	</Path>
	
	<Path path = "/AddIns/XmlEditor/EditActions">
		<EditAction id = "XmlCompletionPopup" class = "ICSharpCode.XmlEditor.CodeCompletionPopupCommand"  keys = "Control|Space"/>
	</Path>
</AddIn>
