<AddIn name        = "NAnt Add-in"
       author      = "Matt Ward"
       copyright   = "prj:///doc/copyright.txt"
       description = "NAnt integration for SharpDevelop.">

	<Manifest>
		<Identity name = "ICSharpCode.NAntAddIn"/>
	</Manifest>
	
	<Runtime>
		<Import assembly = "NAntAddIn.dll">
			<ConditionEvaluator name = "IsNAntRunning" class = "ICSharpCode.NAntAddIn.IsNAntRunningCondition"/>
		</Import>
	</Runtime>

	<!-- NAnt file filter -->
	<Path name = "/SharpDevelop/Workbench/FileFilter">
		<FileFilter id = "NAnt"
	                insertbefore="AllFiles"
	                name = "NAnt Build Files (*.build;*.include)"
	                extensions = "*.build;*.include"/>
	</Path>
	
	<!-- Menu options -->
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectActions">
		<MenuItem id = "NAnt"
		          label = "&amp;NAnt"
		          icon="NAntAddIn.Icons.16x16.NAntPad"
		          type="Menu">
			<ComplexCondition action="Disable">
				<And>
					<Condition name="SolutionOpen"/>
					<Not>
						<Condition name="IsNAntRunning"/>
					</Not>
				</And>
				<MenuItem id = "RunNAnt"
			 	    icon         = "NAntAddIn.Icons.16x16.RunNAnt"
				    label        = "${res:ICSharpCode.NAntAddIn.RunDefaultTargetMenuLabel}" 
				    description  = "Runs NAnt on the build file contained in a SharpDevelop project file." 
				    class        = "ICSharpCode.NAntAddIn.Commands.RunNAntCommand"
				/>
				<MenuItem id = "RunNAntCleanTarget"
				    icon         = "NAntAddIn.Icons.16x16.RunNAntClean"
				    insertafter  = "RunNAnt"
				    label        = "${res:ICSharpCode.NAntAddIn.RunCleanTargetMenuLabel}" 
				    description  = "Runs the clean target on the build file." 
				    class        = "ICSharpCode.NAntAddIn.Commands.RunNAntCleanTargetCommand"
				/>
			</ComplexCondition>
			<ComplexCondition action="Disable">
				<And>
					<Condition name="SolutionOpen"/>
					<Condition name="IsNAntRunning"/>
				</And>
				<MenuItem id = "StopNAnt"
				    icon         = "NAntAddIn.Icons.16x16.StopNAnt"
				    insertafter  = "RunNAntCleanTarget"
				    label        = "${res:ICSharpCode.NAntAddIn.StopNAntMenuLabel}" 
				    description  = "Stops the currently running build." 
				    class        = "ICSharpCode.NAntAddIn.Commands.StopNAntCommand"
				/>
			</ComplexCondition>
		</MenuItem>
	</Path>
	
	<!-- Project browser icons -->
	<Path name = "/Workspace/Icons">
		<Icon id         = "NAntBuildFileIcon"
		      extensions = ".build"
		      resource   = "NAntAddIn.Icons.16x16.BuildFile" />
		<Icon id         = "NAntBuildIncludeFileIcon"
		      extensions = ".include"
		      resource   = "NAntAddIn.Icons.16x16.BuildFile" />
	</Path>

	<!-- Options panel -->
	<Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions">
		<DialogPanel id    = "NAntAddInOptionPanel"
		       	     label = "NAnt"
		       	     class = "ICSharpCode.NAntAddIn.Gui.NAntAddInOptionPanel"/>
	</Path>

	<!-- NAnt pad -->
	<Path name = "/SharpDevelop/Workbench/Pads">
		<Pad id       = "NAntPad"
		     category = "Tools"
		     title    = "NAnt"
		     icon     = "NAntAddIn.Icons.16x16.NAntPad"
		     class    = "ICSharpCode.NAntAddIn.Gui.NAntPadContent"/>
	</Path>

	<!-- NAnt pad toolbar -->
	<Path name = "/SharpDevelop/Pads/NAntPad/Toolbar">
		<ComplexCondition action="Disable">
			<And>
				<Condition name="SolutionOpen"/>
				<Not>
					<Condition name="IsNAntRunning"/>
				</Not>
			</And>
			<ToolbarItem id      = "Run"
			             icon    = "Icons.16x16.RunProgramIcon"
			             tooltip = "${res:ICSharpCode.NAntAddIn.NAntPadContent.RunCommandBarButtonText}"
			             class   = "ICSharpCode.NAntAddIn.Commands.RunSelectedNAntTargetCommand"/>
		</ComplexCondition>
		<Condition name = "SolutionOpen" action="Disable">
			<ToolbarItem id      = "Refresh"
			             icon    = "Icons.16x16.BrowserRefresh"
			             tooltip = "${res:ICSharpCode.NAntAddIn.NAntPadContent.RefreshCommandBarButtonText}"
			             class   = "ICSharpCode.NAntAddIn.Commands.RefreshNAntPadCommand"/>
		</Condition>
		<ComplexCondition action="Disable">
			<And>
				<Condition name="SolutionOpen"/>
				<Condition name="IsNAntRunning"/>
			</And>
			<ToolbarItem id      = "Stop"
			             icon    = "Icons.16x16.Debug.StopProcess"
			             tooltip = "${res:ICSharpCode.NAntAddIn.NAntPadContent.StopCommandBarButtonText}"
			             class   = "ICSharpCode.NAntAddIn.Commands.StopNAntCommand"/>
		</ComplexCondition>
	</Path>
	
	<!-- NAnt pad tree view context menu -->
	<Path name = "/SharpDevelop/Pads/NAntPad/ContextMenu">
		<Condition name="Ownerstate" ownerstate="BuildFileSelected">
			<MenuItem id = "RunDefaultTarget"
				icon  = "NAntAddIn.Icons.16x16.RunNAnt"
				label = "${res:ICSharpCode.NAntAddIn.RunDefaultTargetMenuLabel}"
		    	class = "ICSharpCode.NAntAddIn.Commands.RunSelectedNAntTargetCommand"/>
			<MenuItem id = "RunNAntCleanTarget"
			    icon         = "NAntAddIn.Icons.16x16.RunNAntClean"
			    label        = "${res:ICSharpCode.NAntAddIn.RunCleanTargetMenuLabel}" 
			    description  = "Runs the clean target on the build file." 
			    class        = "ICSharpCode.NAntAddIn.Commands.RunNAntCleanTargetCommand"/>
		</Condition>
		<Condition name="Ownerstate" ownerstate="BuildFileSelected">
			<MenuItem id = "StopNAnt"
			    icon         = "NAntAddIn.Icons.16x16.StopNAnt"
			    label        = "${res:ICSharpCode.NAntAddIn.StopNAntMenuLabel}" 
			    description  = "Stops the currently running build." 
			    class        = "ICSharpCode.NAntAddIn.Commands.StopNAntCommand"/>
		</Condition>
		<Condition name="Ownerstate" ownerstate="TargetSelected">
			<MenuItem id    = "RunTarget"
			          icon  = "Icons.16x16.RunProgramIcon"
			          label = "${res:ICSharpCode.NAntAddIn.RunTargetMenuLabel}"
			          class = "ICSharpCode.NAntAddIn.Commands.RunSelectedNAntTargetCommand"/>
		</Condition>
		<MenuItem id    = "OpenBuildFile"
		          icon  = "Icons.16x16.OpenFileIcon"
                  label = "${res:ProjectComponent.ContextMenu.Open}"
                  class = "ICSharpCode.NAntAddIn.Commands.OpenNAntBuildFileCommand"/>
		<Condition name="Ownerstate" ownerstate="TargetSelected">
			<MenuItem id    = "GoToTargetDefinition"
        	          label = "${res:ICSharpCode.NAntAddIn.GotoDefinitionMenuLabel}"
                	  class = "ICSharpCode.NAntAddIn.Commands.GoToTargetDefinitionCommand"/>
		</Condition>
		<Condition name="Ownerstate" ownerstate="ErrorSelected">
			<MenuItem id    = "GoToError"
        	          label = "${res:ICSharpCode.NAntAddIn.GotoErrorMenuLabel}"
                	  class = "ICSharpCode.NAntAddIn.Commands.GoToErrorCommand"/>
		</Condition>
	</Path>
</AddIn>
