<AddIn name        = "Profiler AddIn"
       author      = "Siegfried Pammer"
       url         = ""
       description = "Integrates a Profiler with GUI into SharpDevelop"
       addInManagerHidden = "preinstalled">
	
	<Runtime>
		<Import assembly="ICSharpCode.Profiler.AddIn.dll" />
	</Runtime>
	
	<Manifest>
		<Identity name="Profiler.AddIn" />
		<Dependency addin="ICSharpCode.UnitTesting" requirePreload="true" />
	</Manifest>
	
	<Path name="/SharpDevelop/Workbench/MainMenu/Analysis">
		<MenuItem id="Profiler" label="Profiler" type="Menu" insertbefore="Separator1">
			<ComplexCondition action="Disable">
				<And>
					<Condition name = "ProjectActive" activeproject="*" />
				</And>
				<MenuItem
					id="ProfileProject"
					class="ICSharpCode.Profiler.AddIn.Commands.ProfileProject"
					label="${res:AddIns.Profiler.ProfileCurrentProject}"
				/>
			</ComplexCondition>
			<MenuItem
				id="ProfileExecutable"
				class="ICSharpCode.Profiler.AddIn.Commands.ProfileExecutable"
				label="${res:AddIns.Profiler.ProfileExecutable}"
			/>
		</MenuItem>
	</Path>
	
	<Path name = "/SharpDevelop/Workbench/DisplayBindings">
		<DisplayBinding id = "ProfilerDisplayBinding"
		                insertbefore="Text"
		                fileNamePattern="\.(sdps)$"
		                title = "${res:AddIns.Profiler.ProfilingView.Title}"
		                class = "ICSharpCode.Profiler.AddIn.Views.ProfilerDisplayBinding"/>
	</Path>
	
	<Path name="/AddIns/Profiler/QueryView/ContextMenu">
		<MenuItem
			id="GoToDefinition"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.GoToDefinition}"
			class="ICSharpCode.Profiler.AddIn.Commands.GoToDefinition" />
		<MenuItem
			id="FindReferences"
			label="${res:SharpDevelop.Refactoring.FindReferences}"
			class="ICSharpCode.Profiler.AddIn.Commands.FindReferences" />
		<MenuItem type="Separator" id="Separator2" />
		<MenuItem
			id="SetAsRoot"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.SetAsRoot}"
			class="ICSharpCode.Profiler.AddIn.Commands.SetAsRoot" />
		<MenuItem
			id="FindCallsOfSelected"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.FindCallsOfSelected}"
			class="ICSharpCode.Profiler.AddIn.Commands.FindCallsOfSelected" />
		<MenuItem
			id="ShowFunctions"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.ShowFunctions}"
			class="ICSharpCode.Profiler.AddIn.Commands.ShowFunctions" />
		<MenuItem type="Separator" id="Separator1" />
		<MenuItem
			id="CopyStacktrace"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.CopyStacktrace}"
			class="ICSharpCode.Profiler.AddIn.Commands.CopyStacktrace" />
		<MenuItem
			id="CopySelectedData"
			label="${res:AddIns.Profiler.ProfilingView.ContextMenu.CopySelectedData}"
			class="ICSharpCode.Profiler.AddIn.Commands.CopySelectedData" />
	</Path>
	
	<Path name="/SharpDevelop/Workbench/FileFilter">
		<FileFilter id = "SharpDevelopProfilingSession"
		            insertbefore="AllFiles"
		            name = "${res:AddIns.Profiler.FileExtensionDescription}"
		            extensions = "*.sdps"
		            mimeType = "application/x-sharpdevelop-profiler"/>
	</Path>
	
	<Path name="/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions">
		<OptionPanel id    = "Profiling"
		             label = "${res:AddIns.Profiler.Options.Title}"
		             class = "ICSharpCode.Profiler.AddIn.OptionPanels.General"
		             insertbefore = "TextEditorOptions" />
	</Path>

	<Path name = "/SharpDevelop/Pads/UnitTestsPad/CommonTestCommands">
		<ComplexCondition action="Disable">
			<And>
				<Condition name="SolutionOpen"/>
				<Not>
					<Condition name="RunningTests"/>
				</Not>
			</And>
			<MenuItem id    = "RunWithProfiler"
			          label = "${res:AddIns.Profiler.UnitTests.RunWithProfiler}"
			          class = "ICSharpCode.Profiler.AddIn.Commands.RunSelectedTestsWithProfilerCommand"/>
		</ComplexCondition>
	</Path>
</AddIn>
