<AddIn name        = "Subversion AddIn"
       author      = "Daniel Grunwald"
       copyright   = "prj:///doc/copyright.txt"
       description = "Adds support for Subversion to the project browser"
       addInManagerHidden = "preinstalled">
	
	<Manifest>
		<Identity name = "ICSharpCode.Svn"/>
	</Manifest>
	
	<Runtime>
		<Condition name = "Compare" string = "${Platform}" equals = "Win64">
			<DisableAddIn message = "This AddIn does not work when SharpDevelop runs as 64-bit process."/>
		</Condition>
		<Import assembly = "SubversionAddIn.dll">
			<ConditionEvaluator name="SubversionState" class="ICSharpCode.Svn.SubversionStateCondition"/>
			<ConditionEvaluator name="SubversionIsControlled" class="ICSharpCode.Svn.SubversionIsControlledCondition"/>
		</Import>
	</Runtime>
	
	<Path name = "/SharpDevelop/Autostart">
		<Class id = "ICSharpCode.Svn.Commands.RegisterEventsCommand"
		       class = "ICSharpCode.Svn.Commands.RegisterEventsCommand"/>
	</Path>
	
	<Path name="/Workspace/DocumentVersionProviders">
		<Class id="svn"
		       class="ICSharpCode.Svn.SvnVersionProvider" />
	</Path>
	
	<Path name = "/SharpDevelop/Workbench/DisplayBindings">
		<DisplayBinding id               = "SubversionHistoryView"
		                type             = "Secondary"
		                insertbefore     = "Text"
		                class            = "ICSharpCode.Svn.HistoryViewDisplayBinding"/>
	</Path>
	
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SubversionItem">
		<Condition name = "SubversionIsControlled">
			<MenuItem id = "SvnSeparator" type = "Separator"/>
			
			<Condition name = "SubversionState" state = "Modified;Added;Replaced">
				<MenuItem id = "SvnCommit"
				          label = "${res:AddIns.Subversion.Commit}..."
				          icon  = "Svn.Commit"
				          class = "ICSharpCode.Svn.Commands.CommitCommand"/>
			</Condition>
			<Condition name = "SubversionState" state = "Modified;Conflicted;Added;Replaced">
				<Condition name = "SubversionState" state = "Modified" item = "File">
					<MenuItem id = "SvnDiff"
					          label = "${res:AddIns.Subversion.Diff}"
					          class = "ICSharpCode.Svn.Commands.DiffCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Conflicted" item = "File">
					<MenuItem id = "SvnEditConflicts"
					          label = "${res:AddIns.Subversion.EditConflicts}"
					          class = "ICSharpCode.Svn.Commands.EditConflictsCommand"/>
					<MenuItem id = "SvnResolveConflicts"
					          label = "${res:AddIns.Subversion.MarkConflictsAsResolved}"
					          class = "ICSharpCode.Svn.Commands.ResolveConflictsCommand"/>
				</Condition>
				<MenuItem id = "SvnRevert"
				          label = "${res:AddIns.Subversion.Revert}"
				          icon = "Icons.16x16.UndoIcon"
				          class = "ICSharpCode.Svn.Commands.RevertCommand"/>
			</Condition>
			
			<MenuItem id = "SvnMenu" type = "Menu" label = "Subversion">
				<ComplexCondition>
					<Not>
						<Condition name = "SubversionState" state = "Unversioned;Ignored"/>
					</Not>
					<MenuItem id = "SvnRepoBrowser"
					          label = "${res:AddIns.Subversion.RepositoryBrowser}"
					          class = "ICSharpCode.Svn.Commands.RepoBrowserCommand"/>
					<MenuItem id = "SvnRepoStatus"
					          label = "${res:AddIns.Subversion.CheckForModifications}"
					          class = "ICSharpCode.Svn.Commands.RepoStatusCommand"/>
					<MenuItem id = "SvnRevisionGraph"
					          label = "${res:AddIns.Subversion.RevisionGraph}"
					          class = "ICSharpCode.Svn.Commands.RevisionGraphCommand"/>
					<MenuItem id = "Sep1" type = "Separator"/>
					<MenuItem id = "SvnUpdate"
					          label = "${res:AddIns.Subversion.Update}"
					          icon  = "Svn.Update"
					          class = "ICSharpCode.Svn.Commands.UpdateCommand"/>
					<MenuItem id = "SvnUpdateToRev"
					          label = "${res:AddIns.Subversion.UpdateToRevision}..."
					          icon  = "Svn.Update"
					          class = "ICSharpCode.Svn.Commands.UpdateToRevisionCommand"/>
					<MenuItem id = "SvnShowLog"
					          label = "${res:AddIns.Subversion.ShowLog}"
					          class = "ICSharpCode.Svn.Commands.ShowLogCommand"/>
					<MenuItem id = "SvnCleanup"
					          label = "${res:AddIns.Subversion.CleanUp}"
					          class = "ICSharpCode.Svn.Commands.CleanupCommand"/>
					<MenuItem id = "Sep2" type = "Separator"/>
					<MenuItem id = "SvnBranch"
					          label = "${res:AddIns.Subversion.BranchOrTag}..."
					          class = "ICSharpCode.Svn.Commands.BranchCommand"/>
					<MenuItem id = "SvnSwitch"
					          label = "${res:AddIns.Subversion.Switch}..."
					          class = "ICSharpCode.Svn.Commands.SwitchCommand"/>
					<MenuItem id = "SvnMerge"
					          label = "${res:AddIns.Subversion.Merge}..."
					          class = "ICSharpCode.Svn.Commands.MergeCommand"/>
					<Condition name = "SubversionState" item = "Folder">
						<MenuItem id = "SvnExport"
						          label = "${res:AddIns.Subversion.Export}..."
						          class = "ICSharpCode.Svn.Commands.ExportWorkingCopyCommand"/>
						<MenuItem id = "SvnRelocate"
						          label = "${res:AddIns.Subversion.Relocate}..."
						          class = "ICSharpCode.Svn.Commands.RelocateCommand"/>
					</Condition>
					<MenuItem id = "Sep3" type = "Separator"/>
				</ComplexCondition>
				
				<Condition name = "SubversionState" state = "Unversioned;Ignored">
					<MenuItem id = "SvnAdd"
					          label = "${res:Global.AddButtonText}..."
					          class = "ICSharpCode.Svn.Commands.AddCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Unversioned">
					<MenuItem id = "SvnIgnore"
					          label = "${res:AddIns.Subversion.AddToIgnoreList}"
					          class = "ICSharpCode.Svn.Commands.IgnoreCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Ignored">
					<MenuItem id = "SvnIgnore"
					          label = "${res:AddIns.Subversion.RemoveFromIgnoreList}"
					          class = "ICSharpCode.Svn.Commands.UnignoreCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Modified;Normal" item = "File">
					<MenuItem id = "SvnLock"
					          label = "${res:AddIns.Subversion.Lock}..."
					          class = "ICSharpCode.Svn.Commands.LockCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Modified;Normal" item = "File">
					<MenuItem id = "SvnBlame"
					          label = "${res:AddIns.Subversion.Blame}..."
					          class = "ICSharpCode.Svn.Commands.BlameCommand"/>
				</Condition>
				<Condition name = "SubversionState" state = "Modified;Conflicted;Added;Replaced">
					<MenuItem id = "SvnCreatePatch"
					          label = "${res:AddIns.Subversion.CreatePatch}..."
					          icon  = "Svn.CreatePatch"
					          class = "ICSharpCode.Svn.Commands.CreatePatchCommand"/>
				</Condition>
				<!--<Condition name = "SubversionState" state = "Modified;Normal" item = "Folder">
					<MenuItem id = "SvnApplyPatch"
					          label = "Apply patch..."
					          icon  = "Svn.ApplyPatch"
					          class = "ICSharpCode.Svn.Commands.ApplyPatchCommand"/>
				</Condition>-->
				<MenuItem id = "Sep4" type = "Separator"/>
				<MenuItem id = "SvnHelp"
				          label = "${res:MainWindow.Windows.HelpScoutLabel}"
				          icon = "Icons.16x16.HelpIcon"
				          class = "ICSharpCode.Svn.Commands.HelpCommand"/>
				<MenuItem id = "SvnSettings"
				          label = "${res:Dialog.Options.IDEOptions.ProjectAndSolutionOptions.SettingsGroupBox}"
				          class = "ICSharpCode.Svn.Commands.SettingsCommand"/>
				<MenuItem id = "SvnAbout"
				          label = "${res:ComponentInspector.AboutDialog.Title}"
				          class = "ICSharpCode.Svn.Commands.AboutCommand"/>
			</MenuItem>
		</Condition>
	</Path>
	
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SolutionNode">
		<Include id = "SubversionInclude" path = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SubversionItem"/>
	</Path>
	
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectNode">
		<Include id = "SubversionInclude" path = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SubversionItem"/>
	</Path>
	
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/FolderNode">
		<Include id = "SubversionInclude" path = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SubversionItem"/>
	</Path>
	
	<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/FileNode">
		<Include id = "SubversionInclude" path = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/SubversionItem"/>
	</Path>
	
	<Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions">
		<OptionPanel id = "SubversionOptionsPanel"
		             label = "${res:AddIns.Subversion.Options.Title}"
		             class = "ICSharpCode.Svn.Gui.SubversionOptionsPanel"/>
	</Path>
	
	<!--
	These options aren't really useful and just add to the confusion in our menu system as other SVN commands aren't available in Tools>SVN.
	<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
		<MenuItem id = "SvnExport"
		          label = "Subversion"
		          insertbefore = "LastSeparator"
		          type="Menu">
			<MenuItem id = "SvnExport"
			          label = "${res:AddIns.Subversion.Export}..."
			          icon  = "Svn.Export"
			          class = "ICSharpCode.Svn.Commands.ExportCommand"/>
			<MenuItem id = "SvnCheckout"
			          label = "${res:AddIns.Subversion.Checkout}..."
			          icon  = "Svn.Checkout"
			          class = "ICSharpCode.Svn.Commands.CheckoutCommand"/>
		</MenuItem>
	</Path>
	-->
</AddIn>
