From 355b7e9cf328545575852bab7123b23cca9bcf8d Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 14 May 2010 12:35:10 +0000 Subject: [PATCH 01/79] Add SharpDevelop.TargetingPack.targets to setup. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5823 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/Setup/Files.wxs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs index cb00ad58af..09308424e0 100644 --- a/src/Setup/Files.wxs +++ b/src/Setup/Files.wxs @@ -153,13 +153,14 @@ - + + From b650045eb29c8f344c145eada6ba2f20c1f92d35 Mon Sep 17 00:00:00 2001 From: Kumar Devvrat Date: Sun, 16 May 2010 10:25:00 +0000 Subject: [PATCH 02/79] Fix bug : clicking on a selected control, if two or more controls were already selected in WPF designer did not change the selection. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5827 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../WpfDesign.Designer/Project/Services/SelectionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs index c9052085d2..f2403016d2 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs @@ -87,7 +87,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services // changes the primary selection was changed to an already-selected item, // then we keep the current selection. // otherwise, we replace it - if (components.Count == 1 && IsComponentSelected(newPrimarySelection)) { + if (components.Count == 1 && IsComponentSelected(newPrimarySelection && prevSelectedItems.Length == 1)){ // keep selectionType = 0 -> don't change the selection } else { selectionType = SelectionTypes.Replace; From a481519d8281d006d4823f16b4b8e17774546128 Mon Sep 17 00:00:00 2001 From: Kumar Devvrat Date: Sun, 16 May 2010 19:39:21 +0000 Subject: [PATCH 03/79] Filter DefaultEvent for controls derived from ItemsControl : Menu, TreeView, StatusBar git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5829 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Src/AbstractEventHandlerService.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/AbstractEventHandlerService.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/AbstractEventHandlerService.cs index dad38625fc..48915e8b52 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/AbstractEventHandlerService.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.AddIn/Src/AbstractEventHandlerService.cs @@ -88,10 +88,15 @@ namespace ICSharpCode.WpfDesign.AddIn object[] attributes = item.ComponentType.GetCustomAttributes(typeof(DefaultEventAttribute), true); if (attributes.Length == 1) { DefaultEventAttribute dae = (DefaultEventAttribute)attributes[0]; - DesignItemProperty property = item.Properties.GetProperty(dae.Name); - if (property != null && property.IsEvent) { - return property; - } + // To filter controls derived from ItemsControl + if (dae.Name != "OnItemsChanged") + { + DesignItemProperty property = item.Properties.GetProperty(dae.Name); + if (property != null && property.IsEvent) + { + return property; + } + } } return null; } From 5fe2988ee070c35228682cb72998c492069262b5 Mon Sep 17 00:00:00 2001 From: Kumar Devvrat Date: Sun, 16 May 2010 20:43:51 +0000 Subject: [PATCH 04/79] Fix error in commit:5827 git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5832 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../WpfDesign.Designer/Project/Services/SelectionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs index f2403016d2..f0257b1ad6 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Services/SelectionService.cs @@ -87,7 +87,7 @@ namespace ICSharpCode.WpfDesign.Designer.Services // changes the primary selection was changed to an already-selected item, // then we keep the current selection. // otherwise, we replace it - if (components.Count == 1 && IsComponentSelected(newPrimarySelection && prevSelectedItems.Length == 1)){ + if (components.Count == 1 && IsComponentSelected(newPrimarySelection) && prevSelectedItems.Length == 1){ // keep selectionType = 0 -> don't change the selection } else { selectionType = SelectionTypes.Replace; From 608d54ffdf0772ba71bb88ac9d33c4ebae398840 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Thu, 20 May 2010 06:14:27 +0000 Subject: [PATCH 05/79] checked in the initial version of the new HelpViewer addin git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5834 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../HelpViewer/Configuration/AssemblyInfo.cs | 16 ++ src/AddIns/Misc/HelpViewer/HelpViewer.addin | 29 +++ src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 105 ++++++++ src/AddIns/Misc/HelpViewer/HelpViewer.sln | 17 ++ .../Misc/HelpViewer/Source/BrowserScheme.cs | 29 +++ .../HelpViewer/Source/Core/DisplayHelp.cs | 193 ++++++++++++++ .../HelpViewer/Source/Core/Help3Catalog.cs | 66 +++++ .../Source/Core/Help3Environment.cs | 97 +++++++ .../HelpViewer/Source/Core/Help3Service.cs | 239 ++++++++++++++++++ .../Source/Core/HelpLibraryAgent.cs | 129 ++++++++++ .../HelpViewer/Source/Core/NativeMethods.cs | 58 +++++ .../HelpViewer/Source/Help3OptionsPanel.xaml | 19 ++ .../Source/Help3OptionsPanel.xaml.cs | 79 ++++++ src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs | 15 ++ .../Source/Helper/Help3Configuration.cs | 31 +++ .../Source/Helper/HelpClientWatcher.cs | 141 +++++++++++ .../Source/Helper/ProjectLanguages.cs | 52 ++++ .../Misc/HelpViewer/Source/MSHelp3Provider.cs | 30 +++ 18 files changed, 1345 insertions(+) create mode 100644 src/AddIns/Misc/HelpViewer/Configuration/AssemblyInfo.cs create mode 100644 src/AddIns/Misc/HelpViewer/HelpViewer.addin create mode 100644 src/AddIns/Misc/HelpViewer/HelpViewer.csproj create mode 100644 src/AddIns/Misc/HelpViewer/HelpViewer.sln create mode 100644 src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/NativeMethods.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml create mode 100644 src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/MSHelp3Provider.cs diff --git a/src/AddIns/Misc/HelpViewer/Configuration/AssemblyInfo.cs b/src/AddIns/Misc/HelpViewer/Configuration/AssemblyInfo.cs new file mode 100644 index 0000000000..5982ec6dc3 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Configuration/AssemblyInfo.cs @@ -0,0 +1,16 @@ +using System.Reflection; +using System.Security.Permissions; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("Microsoft Help Viewer")] +[assembly: AssemblyDescription("Microsoft Help System v1.0 for SharpDevelop")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: System.CLSCompliant(false)] diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin new file mode 100644 index 0000000000..d8f3bbacf3 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj new file mode 100644 index 0000000000..98523e3a7b --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -0,0 +1,105 @@ + + + + {80F76D10-0B44-4D55-B4BD-DAEB5464090C} + Debug + x86 + Library + MSHelpSystem + HelpViewer + v4.0 + False + False + 4 + false + OnBuildSuccess + + + x86 + False + Auto + 4194304 + 4096 + + + ..\..\..\..\AddIns\AddIns\Misc\HelpViewer\ + true + Full + False + True + DEBUG;TRACE + + + ..\..\..\..\AddIns\AddIns\Misc\HelpViewer\ + false + None + True + False + TRACE + + + + ..\..\..\..\bin\ICSharpCode.Core.dll + False + + + ..\..\..\..\bin\ICSharpCode.Core.Presentation.dll + False + + + ..\..\..\..\bin\ICSharpCode.SharpDevelop.dll + False + + + + + + + 3.5 + + + + + + + 3.5 + + + + + + Always + + + + + Configuration\GlobalAssemblyInfo.cs + + + + + + + + + + Help3OptionsPanel.xaml + Code + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.sln b/src/AddIns/Misc/HelpViewer/HelpViewer.sln new file mode 100644 index 0000000000..43cffb0f03 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.sln @@ -0,0 +1,17 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.0.0.5828 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.Build.0 = Release|Any CPU + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs b/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs new file mode 100644 index 0000000000..f8c0142bd8 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs @@ -0,0 +1,29 @@ +using System; +using System.Globalization; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.BrowserDisplayBinding; +using MSHelpSystem.Core; + +namespace MSHelpSystem +{ + public class BrowserScheme : DefaultSchemeExtension + { + public override void GoHome(HtmlViewPane pane) + { + if (pane == null) { + throw new ArgumentNullException("pane"); + } + LoggingService.Info("Help 3.0: Calling browser (\"GoHome()\")"); + DisplayHelp.Catalog(); + } + + public override void GoSearch(HtmlViewPane pane) + { + if (pane == null) { + throw new ArgumentNullException("pane"); + } + LoggingService.Info("Help 3.0: Calling browser (\"GoSearch()\")"); + pane.Navigate(new Uri(string.Format(@"http://social.msdn.microsoft.com/Search/{0}", CultureInfo.CurrentCulture.Name.ToLower()))); + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs new file mode 100644 index 0000000000..3385ca8f1e --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -0,0 +1,193 @@ +using System; +using System.Globalization; +using System.Threading; +using System.Windows.Forms; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.BrowserDisplayBinding; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using MSHelpSystem.Helper; +using MSHelpSystem.Core.Native; + +namespace MSHelpSystem.Core +{ + internal sealed class DisplayHelp + { + DisplayHelp() + { + } + + public static void Catalog() + { + if (!Help3Environment.IsLocalHelp) { + MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", + "Help Viewer", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + return; + } + Help3Catalog c = Help3Service.ActiveCatalog; + if (c == null) { + throw new ArgumentNullException("c"); + } + string helpCatalogUrl = string.Format(@"ms-xhelp://?method=page&id=-1&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale); + LoggingService.Debug(string.Format("Help 3.0: {0}", helpCatalogUrl)); + DisplayLocalHelp(helpCatalogUrl); + } + + public static void Page(string pageId) + { + if (string.IsNullOrEmpty(pageId)) { + throw new ArgumentNullException("pageId"); + } + if (!Help3Environment.IsLocalHelp) { + MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", + "Help Viewer", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + return; + } + Help3Catalog c = Help3Service.ActiveCatalog; + if (c == null) { + throw new ArgumentNullException("c"); + } + string helpPageUrl = string.Format(@"ms-xhelp://?method=page&id={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, pageId); + LoggingService.Debug(string.Format("Help 3.0: {0}", helpPageUrl)); + DisplayLocalHelp(helpPageUrl); + } + + public static void ContextualHelp(string contextual) + { + if (string.IsNullOrEmpty(contextual)) { + throw new ArgumentNullException("contextual"); + } + if (!Help3Environment.IsLocalHelp) { + DisplayHelpOnMSDN(contextual); + return; + } + Help3Catalog c = Help3Service.ActiveCatalog; + if (c == null) { + throw new ArgumentNullException("c"); + } + string helpContextualUrl = string.Format(@"ms-xhelp://?method=f1&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, contextual); + LoggingService.Debug(string.Format("Help 3.0: {0}", helpContextualUrl)); + DisplayLocalHelp(helpContextualUrl); + } + + public static void Search(string searchWords) + { + if (string.IsNullOrEmpty(searchWords)) { + throw new ArgumentNullException("searchWords"); + } + if (!Help3Environment.IsLocalHelp) { + DisplaySearchOnMSDN(searchWords); + return; + } + Help3Catalog c = Help3Service.ActiveCatalog; + if (c == null) { + throw new ArgumentNullException("c"); + } + string helpSearchUrl = string.Format(@"ms-xhelp://method=search&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, searchWords.Replace(" ", "+")); + LoggingService.Debug(string.Format("Help 3.0: {0}", helpSearchUrl)); + DisplayLocalHelp(helpSearchUrl); + } + + public static void Keywords(string keywords) + { + if (string.IsNullOrEmpty(keywords)) { + throw new ArgumentNullException("keywords"); + } + if (!Help3Environment.IsLocalHelp) { + MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", + "Help Viewer", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + return; + } + Help3Catalog c = Help3Service.ActiveCatalog; + if (c == null) { + throw new ArgumentNullException("c"); + } + string helpKeywordsUrl = string.Format(@"ms-xhelp://?method=keywords&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, keywords); + LoggingService.Debug(string.Format("Help 3.0: {0}", helpKeywordsUrl)); + DisplayLocalHelp(helpKeywordsUrl); + } + + + static string FormatMsXHelpToHttp(string helpUrl) + { + string output = helpUrl; + if (output.StartsWith("ms-xhelp://?")) { + output = string.Format( + @"http://127.0.0.1:{0}/help/{1}-{2}/ms.help?{3}", + HelpLibraryAgent.PortNumber, + NativeMethods.GetSessionId(), + HelpLibraryAgent.ProcessId, + output.Replace("ms-xhelp://?", "")); + } + return output; + } + + static void DisplayLocalHelp(string arguments) + { + // TODO: set "embedded" to TRUE if we have a TOC control or something similar + DisplayLocalHelp(arguments, false); + } + + static void DisplayLocalHelp(string arguments, bool embedded) + { + if (!Help3Environment.IsLocalHelp) { return; } + if (!HelpLibraryAgent.IsRunning) { + HelpLibraryAgent.Start(); + Thread.Sleep(0x3e8); + } + string helpUrl = string.Format(@"{0}{1}{2}", FormatMsXHelpToHttp(arguments), ProjectLanguages.FormattedAsHttpParam(), (embedded)?"&embedded=true":string.Empty); + BrowserPane browser = ActiveHelp3Browser(); + if (browser != null) { + LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", helpUrl)); + browser.Navigate(helpUrl); + browser.WorkbenchWindow.SelectWindow(); + } + } + + static void DisplayHelpOnMSDN(string keyword) + { + string msdnUrl = string.Format(@"http://msdn.microsoft.com/library/{0}.aspx", keyword); + BrowserPane browser = ActiveHelp3Browser(); + if (browser != null) { + LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", msdnUrl)); + browser.Navigate(msdnUrl); + browser.WorkbenchWindow.SelectWindow(); + } + } + + static void DisplaySearchOnMSDN(string searchWords) + { + string msdnUrl = string.Format(@"http://social.social.msdn.microsoft.com/Search/{0}/?query={1}&ac=3", CultureInfo.CurrentUICulture.ToString(), searchWords.Replace(" ", "+")); + BrowserPane browser = ActiveHelp3Browser(); + if (browser != null) { + LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", msdnUrl)); + browser.Navigate(msdnUrl); + browser.WorkbenchWindow.SelectWindow(); + } + } + + static BrowserPane ActiveHelp3Browser() + { + IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; + if (window != null) + { + BrowserPane browser = window.ActiveViewContent as BrowserPane; + if (browser != null && browser.Url.Scheme == "http") return browser; + } + foreach (IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) + { + BrowserPane browser = view as BrowserPane; + if (browser != null && browser.Url.Scheme == "http") return browser; + } + BrowserPane tmp = new BrowserPane(); + WorkbenchSingleton.Workbench.ShowView(tmp); + return tmp; + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs new file mode 100644 index 0000000000..cb5157c16d --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs @@ -0,0 +1,66 @@ +using System; + +namespace MSHelpSystem.Core +{ + public class Help3Catalog + { + public Help3Catalog(string code, string version, string locale, string name, string catPath, string contPath, string brandPackage) + { + productCode = code; + productVersion = version; + productLocale = locale; + displayName = (string.IsNullOrEmpty(name)) ? code:name; + catalogPath = catPath; + contentPath = contPath; + brandingPackage = brandPackage; + } + + string productCode; + string productVersion; + string productLocale; + string displayName; + string catalogPath; + string contentPath; + string brandingPackage; + + public string ProductCode + { + get { return productCode; } + } + + public string ProductVersion + { + get { return productVersion; } + } + + public string Locale + { + get { return productLocale.ToUpper(); } + } + + public string DisplayName + { + get { return displayName; } + } + + public string CatalogPath + { + get { return catalogPath; } + } + + public string ContentPath + { + get { return contentPath; } + } + + public string BrandingPackage + { + get { return brandingPackage; } + } + + public override string ToString() + { + return string.Format(@"{0}/{1}/{2}", productCode, productVersion, productLocale); + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs new file mode 100644 index 0000000000..82417852c9 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs @@ -0,0 +1,97 @@ +using System; +using System.IO; +using Microsoft.Win32; +using ICSharpCode.Core; +using MSHelpSystem.Helper; + +namespace MSHelpSystem.Core +{ + internal sealed class Help3Environment + { + Help3Environment() + { + } + + public static bool IsHelp3ProtocolRegistered + { + get + { + try { + RegistryKey hkcr = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry64).OpenSubKey(@"MS-XHelp\shell\open\command", false); + string helpLibAgent = (string)hkcr.GetValue("", string.Empty); + hkcr.Close(); + return (!string.IsNullOrEmpty(helpLibAgent)); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return false; + } + } + + public static bool IsLocalStoreInitialized + { + get + { + string localStore = LocalStore; + return (!string.IsNullOrEmpty(localStore) && Directory.Exists(localStore)); + } + } + + public static string LocalStore + { + get + { + try { + RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(@"SOFTWARE\Microsoft\Help\v1.0", false); + string localStore = (string)hklm.GetValue("LocalStore", string.Empty); + hklm.Close(); + return localStore; + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return string.Empty; + } + } + + public static string BuildLocalStoreFolder + { + get { return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); } + } + + public static string AppRoot + { + get + { + try { + RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(@"SOFTWARE\Microsoft\Help\v1.0", false); + string appRoot = (string)hklm.GetValue("AppRoot", string.Empty); + hklm.Close(); + return appRoot; + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return string.Empty; + } + } + + public static string ManifestFolder + { + get + { + string manifestFolder = LocalStore; + if (string.IsNullOrEmpty(manifestFolder)) return string.Empty; + manifestFolder = System.IO.Path.Combine(manifestFolder, "manifest"); + if (Directory.Exists(manifestFolder)) return manifestFolder; + else return string.Empty; + } + } + + public static bool IsLocalHelp + { + get { return HelpClientWatcher.IsLocalHelp; } + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs new file mode 100644 index 0000000000..db4b5322e7 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.IO; +using System.Xml; +using System.Xml.Serialization; +using ICSharpCode.Core; +using MSHelpSystem.Helper; + +namespace MSHelpSystem.Core +{ + public sealed class Help3Service + { + Help3Service() + { + HelpLibraryAgent.Start(); + } + + static Help3Service() + { + Help3Service.CatalogsUpdated += new EventHandler(Help3HasUpdatedTheCatalogs); + Help3Service.CatalogChanged += new EventHandler(Help3ActiveCatalogIdChanged); + Help3Service.ConfigurationUpdated += new EventHandler(Help3ConfigurationUpdated); + LoadHelpConfiguration(); + UpdateCatalogs(); + if (config.OfflineMode) HelpClientWatcher.EnableLocalHelp(); + else HelpClientWatcher.EnableOnlineHelp(); + } + + static List catalogs = new List(); + static Help3Catalog activeCatalog = null; + static Help3Configuration config = new Help3Configuration(); + + #region Read help catalogs + + static void UpdateCatalogs() + { + catalogs.Clear(); + if (Help3Environment.IsHelp3ProtocolRegistered && !string.IsNullOrEmpty(Help3Environment.ManifestFolder)) + { + try { + DirectoryInfo folder = new DirectoryInfo(Help3Environment.ManifestFolder); + FileInfo[] files = folder.GetFiles(@"queryManifest*.xml"); + foreach (FileInfo file in files) { + XmlDocument xml = new XmlDocument(); + xml.Load(file.FullName); + XmlNodeList n = xml.SelectNodes("/queryManifest[@version=\"1.0\"]/catalogs/catalog"); + foreach (XmlNode node in n) { + catalogs.Add( + new Help3Catalog(node.Attributes["productId"].InnerText, + node.Attributes["productVersion"].InnerText, + node.Attributes["productLocale"].InnerText, + node.Attributes["productDisplayName"].InnerText, + node.SelectSingleNode("catalogPath").InnerText, + node.SelectSingleNode("contentPath").InnerText, + node.SelectSingleNode("brandingPackageFileName").InnerText) + ); + } + } + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + } + OnCatalogsUpdated(EventArgs.Empty); + } + + static void Help3HasUpdatedTheCatalogs(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(config.ActiveCatalogId)) { + config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ProductCode:string.Empty; + } + activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsString(config.ActiveCatalogId); + } + + static void Help3ActiveCatalogIdChanged(object sender, EventArgs e) + { + activeCatalog = (catalogs.Count > 0) ? FindCatalogByItsString(config.ActiveCatalogId) : null; + } + + static void Help3ConfigurationUpdated(object sender, EventArgs e) + { + if (config.OfflineMode) { + HelpClientWatcher.EnableLocalHelp(); + } + else { + HelpClientWatcher.EnableOnlineHelp(); + HelpLibraryAgent.Stop(); + } + } + + #endregion + + + public static int Count + { + get + { + return catalogs.Count; + } + } + + public static ReadOnlyCollection Items + { + get + { + ReadOnlyCollection c = new ReadOnlyCollection(catalogs); + return c; + } + } + + public static Help3Catalog FindCatalogByProductCode(string productCode) + { + foreach (Help3Catalog catalog in catalogs) + { + if (string.Compare(productCode, catalog.ProductCode, true) == 0) + { + return catalog; + } + } + return null; + } + + public static Help3Catalog FindCatalogByDisplayName(string displayName) + { + foreach (Help3Catalog catalog in catalogs) + { + if (string.Compare(displayName, catalog.DisplayName, true) == 0) + { + return catalog; + } + } + return null; + } + + public static Help3Catalog FindCatalogByItsString(string stringValue) + { + foreach (Help3Catalog catalog in catalogs) + { + if (string.Compare(stringValue, catalog.ToString()) == 0) + { + return catalog; + } + } + return null; + } + + public static string ActiveCatalogId + { + get + { + return config.ActiveCatalogId; + } + set + { + config.ActiveCatalogId = value; + OnCatalogChanged(EventArgs.Empty); + } + } + + public static Help3Catalog ActiveCatalog + { + get + { + return activeCatalog; + } + } + + public static Help3Configuration Config + { + get { return config; } + } + + #region Configuration + + public static void LoadHelpConfiguration() + { + string configFile = System.IO.Path.Combine(PropertyService.ConfigDirectory, "mshelpsystem.xml"); + if (!File.Exists(configFile)) { + return; + } + try { + XmlSerializer serialize = new XmlSerializer(typeof(Help3Configuration)); + TextReader file = new StreamReader(configFile); + config = (Help3Configuration)serialize.Deserialize(file); + file.Close(); + LoggingService.Info("Help 3.0: Configuration successfully loaded"); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + OnConfigurationUpdated(EventArgs.Empty); + } + + public static void SaveHelpConfiguration() + { + string configFile = System.IO.Path.Combine(PropertyService.ConfigDirectory, "mshelpsystem.xml"); + try { + XmlSerializer serialize = new XmlSerializer(typeof(Help3Configuration)); + TextWriter file = new StreamWriter(configFile); + serialize.Serialize(file, config); + file.Close(); + LoggingService.Info("Help 3.0: Configuration successfully saved"); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + OnConfigurationUpdated(EventArgs.Empty); + } + + #endregion + + #region Event handling + + public static event EventHandler CatalogsUpdated; + public static event EventHandler CatalogChanged; + public static event EventHandler ConfigurationUpdated; + + static void OnCatalogsUpdated(EventArgs e) + { + LoggingService.Debug("Help 3.0: \"OnCatalogsUpdated\" event raised"); + if (CatalogsUpdated != null) CatalogsUpdated(null, e); + } + + static void OnCatalogChanged(EventArgs e) + { + LoggingService.Debug("Help 3.0: \"OnCatalogChanged\" event raised"); + if (CatalogChanged != null) CatalogChanged(null, e); + } + + static void OnConfigurationUpdated(EventArgs e) + { + LoggingService.Debug("Help 3.0: \"OnConfigurationUpdated\" event raised"); + if (ConfigurationUpdated != null) ConfigurationUpdated(null, e); + } + + #endregion + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs new file mode 100644 index 0000000000..8ac4da8279 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs @@ -0,0 +1,129 @@ +using System; +using System.Diagnostics; +using System.IO; +using Microsoft.Win32; +using ICSharpCode.Core; + +namespace MSHelpSystem.Core +{ + internal sealed class HelpLibraryAgent + { + HelpLibraryAgent() + { + } + + public static bool IsRunning + { + get + { + Process[] agents = Process.GetProcessesByName("HelpLibAgent"); + LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryAgent.exe found", agents.Length, (agents.Length == 1)?"process":"processes")); + return agents.Length > 0; + } + } + + public static string Agent + { + get + { + if (string.IsNullOrEmpty(Help3Environment.AppRoot)) return string.Empty; + string agent = Path.Combine(Help3Environment.AppRoot, "HelpLibAgent.exe"); + LoggingService.Debug(string.Format("Help 3.0: Help library agent is \"{0}\"", agent)); + return (File.Exists(agent)) ? agent : string.Empty; + } + } + + public static int PortNumber + { + get + { + try { + RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(@"SOFTWARE\Microsoft\Help\v1.0", false); + string port = (string)hklm.GetValue("AgentPort", "47873"); + hklm.Close(); + return Convert.ToInt32(port); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return 47873; // This is the DEFAULT port number! + } + } + + public static int ProcessId + { + get + { + Process[] agents = Process.GetProcessesByName("HelpLibAgent"); + int processId = (agents.Length > 0) ? agents[0].Id:0; + LoggingService.Debug(string.Format("Help 3.0: Port number is \"{0}\"", processId)); + return processId; + } + } + + public static string CurrentViewer + { + get + { + string viewer = string.Empty; + try { + RegistryKey hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(@"SOFTWARE\Microsoft\Help\v1.0", false); + viewer = (string)hklm.GetValue("HelpViewerProgID", string.Empty); + hklm.Close(); + + if (string.IsNullOrEmpty(viewer)) { + RegistryKey hkcr = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry64).OpenSubKey(@"HTTP\shell\open\command", false); + viewer = (string)hkcr.GetValue("", string.Empty); + hkcr.Close(); + if (viewer.LastIndexOf(' ') > 0) viewer = viewer.Substring(0, viewer.LastIndexOf(' ')); + viewer = viewer.Trim("\"".ToCharArray()); + } + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + LoggingService.Debug(string.Format("Help 3.0: Default viewer is \"{0}\"", viewer)); + return viewer; + } + } + + public static bool Start() + { + if (IsRunning) return true; + if (!Help3Environment.IsLocalHelp) return false; + try { + Process p = Process.Start(Agent); + p.WaitForInputIdle(); + LoggingService.Info("Help 3.0: Help library agent started"); + return IsRunning; + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return false; + } + + public static bool Stop() + { + return Stop(true); + } + + public static bool Stop(bool waitForExit) + { + try { + Process[] agents = Process.GetProcessesByName("HelpLibAgent"); + LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryAgent.exe found", agents.Length, (agents.Length == 1)?"process":"processes")); + + foreach (Process agent in agents) { + agent.Kill(); + if (waitForExit) agent.WaitForExit(); + } + LoggingService.Info("Help 3.0: Help library agent stopped"); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return true; + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/NativeMethods.cs b/src/AddIns/Misc/HelpViewer/Source/Core/NativeMethods.cs new file mode 100644 index 0000000000..d1a3c18b23 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/NativeMethods.cs @@ -0,0 +1,58 @@ +using System; +using System.Runtime.InteropServices; + +namespace MSHelpSystem.Core.Native +{ + internal sealed class NativeMethods + { + NativeMethods() + { + } + + [DllImport("Wtsapi32.dll")] + internal static extern bool WTSQuerySessionInformation(IntPtr hServer, int sessionId, WTSInfoClass wtsInfoClass, out IntPtr ppBuffer, out uint pBytesReturned); + + [DllImport("Wtsapi32.dll", ExactSpelling = true, SetLastError = false)] + public static extern void WTSFreeMemory(IntPtr memory); + + internal enum WTSInfoClass + { + WTSInitialProgram, + WTSApplicationName, + WTSWorkingDirectory, + WTSOEMId, + WTSSessionId, + WTSUserName, + WTSWinStationName, + WTSDomainName, + WTSConnectState, + WTSClientBuildNumber, + WTSClientName, + WTSClientDirectory, + WTSClientProductId, + WTSClientHardwareId, + WTSClientAddress, + WTSClientDisplay, + WTSClientProtocolType + } + + internal static IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero; + internal static int WTS_CURRENT_SESSION = -1; + + public static int GetSessionId() + { + IntPtr pSessionId = IntPtr.Zero; + Int32 sessionId = 0; + uint bytesReturned; + + try { + bool returnValue = WTSQuerySessionInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WTSInfoClass.WTSSessionId, out pSessionId, out bytesReturned); + if (returnValue) sessionId = Marshal.ReadInt32(pSessionId); + } + finally { + if (pSessionId != IntPtr.Zero) WTSFreeMemory(pSessionId); + } + return sessionId; + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml new file mode 100644 index 0000000000..e7a7afbee4 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs new file mode 100644 index 0000000000..4fed1bfa26 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -0,0 +1,79 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Forms; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using MSHelpSystem.Core; +using MSHelpSystem.Helper; + +namespace MSHelpSystem +{ + public partial class Help3OptionsPanel : OptionPanel + { + public Help3OptionsPanel() + { + InitializeComponent(); + LoadCatalogs(); + onlineMode.IsChecked = !Help3Service.Config.OfflineMode; + } + + void LoadCatalogs() + { + if (Help3Environment.IsLocalHelp) HelpLibraryAgent.Start(); + + help3Catalogs.Items.Clear(); + if (Help3Service.Count > 0) { + foreach (Help3Catalog catalog in Help3Service.Items) { + LoggingService.Debug(string.Format("Help 3.0: Found help catalog \"{0}\"", catalog.ToString())); + ComboBoxItem cbi = new ComboBoxItem(); + cbi.Content = catalog.ToString(); + help3Catalogs.Items.Add(cbi); + } + } + // TODO: localization needed for "Installed help catalogs" + groupBox1.Header = string.Format("{0} ({1})", "Installed Help catalogs", Help3Service.Count); + + if (help3Catalogs.Items.Count == 0) help3Catalogs.SelectedIndex = 0; + else { + foreach (ComboBoxItem item in help3Catalogs.Items) { + if (string.Compare((string)item.Content, Help3Service.ActiveCatalog.ToString(), true) == 0) { + help3Catalogs.SelectedItem = item; + break; + } + } + // TODO: There has to be a much more elegant way to select the catalog?! + } + help3Catalogs.IsEnabled = (help3Catalogs.Items.Count > 1 && Help3Service.Config.OfflineMode); + } + + void Help3CatalogsSelectionChanged(object sender, SelectionChangedEventArgs e) + { + ComboBoxItem selectedItem = (ComboBoxItem)help3Catalogs.SelectedItem; + if (selectedItem == null) return; + string activeCatalog = (string)selectedItem.Content; + if (!string.IsNullOrEmpty(activeCatalog)) Help3Service.ActiveCatalogId = activeCatalog; + } + + void Help3OfflineModeClicked(object sender, RoutedEventArgs e) + { + LoggingService.Info("Help 3.0: Setting help mode to \"offline\""); + Help3Service.Config.OfflineMode = true; + help3Catalogs.IsEnabled = (help3Catalogs.Items.Count > 1 && Help3Service.Config.OfflineMode); + } + + void Help3OnlineModeClicked(object sender, RoutedEventArgs e) + { + LoggingService.Info("Help 3.0: Setting help mode to \"online\""); + Help3Service.Config.OfflineMode = false; + help3Catalogs.IsEnabled = false; + } + + public override bool SaveOptions() + { + Help3Service.SaveHelpConfiguration(); + return true; + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs b/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs new file mode 100644 index 0000000000..f74794306e --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs @@ -0,0 +1,15 @@ +using System; +using MSHelpSystem.Core; +using ICSharpCode.Core; + +namespace MSHelpSystem.SharpDevelopMenu +{ + public class DisplayCatalogCommand : AbstractMenuCommand + { + public override void Run() + { + LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); + DisplayHelp.Catalog(); + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs new file mode 100644 index 0000000000..cd319fa8b6 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs @@ -0,0 +1,31 @@ +using System; +using System.Xml; +using System.Xml.Serialization; + +namespace MSHelpSystem.Helper +{ + [XmlRoot("mshelpsystem")] + public class Help3Configuration + { + public Help3Configuration() + { + } + + string activeCatalogId = string.Empty; + bool offlineMode = true; + + [XmlElement("activeCatalog")] + public string ActiveCatalogId + { + get { return activeCatalogId; } + set { activeCatalogId = value; } + } + + [XmlElement("offlineMode")] + public bool OfflineMode + { + get { return offlineMode; } + set { offlineMode = value; } + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs new file mode 100644 index 0000000000..d4e7714b52 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs @@ -0,0 +1,141 @@ +using System; +using System.IO; +using System.Configuration; +using System.Threading; +using ICSharpCode.Core; +using MSHelpSystem.Core; + +namespace MSHelpSystem.Helper +{ + internal sealed class HelpClientWatcher + { + HelpClientWatcher() + { + } + + static HelpClientWatcher() + { + if (!Directory.Exists(clientPath)) { + Directory.CreateDirectory(clientPath); + } + clientFileChanged = new FileSystemWatcher(clientPath); + clientFileChanged.NotifyFilter = NotifyFilters.LastWrite; + clientFileChanged.Filter = "HelpClient.cfg"; + clientFileChanged.Changed += new FileSystemEventHandler(OnFileChanged); + clientFileChanged.Created += new FileSystemEventHandler(OnFileChanged); + clientFileChanged.EnableRaisingEvents = true; + + helpMode = GetHelpMode(); + } + + static string clientPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Microsoft\HelpLibrary"); + static FileSystemWatcher clientFileChanged = null; + static string helpMode = string.Empty; + + static void OnFileChanged(object sender, FileSystemEventArgs e) + { + helpMode = GetHelpMode(); + Help3Service.Config.OfflineMode = IsLocalHelp; + } + + public static bool IsLocalHelp + { + get { return string.Compare("offline", helpMode, true) == 0; } + } + + public static void EnableLocalHelp() + { + helpMode = "offline"; + SetHelpMode(); + } + + public static void EnableOnlineHelp() + { + helpMode = "online"; + SetHelpMode(); + } + + static string GetHelpMode() + { + Configuration config = null; + try { + string clientFile = Path.Combine(clientPath, "HelpClient.cfg"); + if (File.Exists(clientFile)) { + ExeConfigurationFileMap fm = new ExeConfigurationFileMap(); + fm.ExeConfigFilename = clientFile; + try { + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + catch (ConfigurationErrorsException) { + Thread.Sleep(0x3e8); + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + if (config != null) { + AppSettingsSection section = (AppSettingsSection)config.GetSection("appSettings"); + string tmp = section.Settings["helpMode"].Value; + return (string.IsNullOrEmpty(tmp)) ? "offline":tmp; + } + } + else { + ExeConfigurationFileMap fm = new ExeConfigurationFileMap(); + fm.ExeConfigFilename = Path.Combine(Help3Environment.AppRoot, "HelpClient.cfg"); + try { + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + catch (ConfigurationErrorsException) { + Thread.Sleep(0x3e8); + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + if (config != null) { + AppSettingsSection section = (AppSettingsSection)config.GetSection("appSettings"); + string tmp = section.Settings["helpMode"].Value; + return (string.IsNullOrEmpty(tmp)) ? "offline":tmp; + } + } + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return "offline"; + } + + static void SetHelpMode() + { + clientFileChanged.EnableRaisingEvents = false; + LoggingService.Info(string.Format("Help 3.0: Trying to set Help mode to \"{0}\"", helpMode)); + + Configuration config = null; + try { + string clientFile = Path.Combine(clientPath, "HelpClient.cfg"); + if (!File.Exists(clientFile)) { + string sourceFile = Path.Combine(Help3Environment.AppRoot, "HelpClient.cfg"); + if (!Directory.Exists(clientPath)) { + Directory.CreateDirectory(clientPath); + } + File.Copy(sourceFile, clientFile); + Thread.Sleep(0x3e8); + } + if (File.Exists(clientFile)) { + ExeConfigurationFileMap fm = new ExeConfigurationFileMap(); + fm.ExeConfigFilename = clientFile; + try { + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + catch (ConfigurationErrorsException) { + Thread.Sleep(0x3e8); + config = ConfigurationManager.OpenMappedExeConfiguration(fm, ConfigurationUserLevel.None); + } + if (config != null) { + AppSettingsSection section = (AppSettingsSection)config.GetSection("appSettings"); + section.Settings["helpMode"].Value = helpMode; + config.Save(); + } + } + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + clientFileChanged.EnableRaisingEvents = true; + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs new file mode 100644 index 0000000000..47e7e1dbe9 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; + +namespace MSHelpSystem.Helper +{ + internal sealed class ProjectLanguages + { + ProjectLanguages() + { + } + + #region Supported project languages + + static Dictionary languages = InitializeLanguages(); + + static Dictionary InitializeLanguages() + { + Dictionary result = new Dictionary(); + result.Add("C++", "C%2B%2B"); + result.Add("C#", "CSharp"); + result.Add("VBNet", "VB"); + return result; + } + + #endregion + + public static string Formatted() + { + string output = string.Empty; + if (ProjectService.CurrentProject != null) { + string devLang = ProjectService.CurrentProject.Language; + if (string.IsNullOrEmpty(devLang)) { throw new ArgumentNullException("devLang"); } + output = devLang; + + if (!languages.ContainsKey(devLang) || !languages.TryGetValue(devLang, out output)) { + output = devLang; + } + LoggingService.Debug(string.Format("Help 3.0: Project language \"{0}\" formatted to \"{1}\"", devLang, output)); + } + return output.ToLower(); + } + + public static string FormattedAsHttpParam() + { + string devLang = Formatted(); + if (string.IsNullOrEmpty(devLang)) return string.Empty; + else return string.Format("&category=DevLang%3a{0}", devLang); + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/MSHelp3Provider.cs b/src/AddIns/Misc/HelpViewer/Source/MSHelp3Provider.cs new file mode 100644 index 0000000000..6b945386e6 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/MSHelp3Provider.cs @@ -0,0 +1,30 @@ +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using MSHelpSystem.Core; + +namespace MSHelpSystem +{ + public class MSHelp3Provider : HelpProvider + { + public override bool TryShowHelp(string fullTypeName) + { + if (string.IsNullOrEmpty(fullTypeName)) { + throw new ArgumentNullException("fullTypeName"); + } + LoggingService.Info(string.Format("Help 3.0: Calling \"TryShowHelp\" with {0}", fullTypeName)); + DisplayHelp.ContextualHelp(fullTypeName); + return true; + } + + public override bool TryShowHelpByKeyword(string keyword) + { + if (string.IsNullOrEmpty(keyword)) { + throw new ArgumentNullException("keyword"); + } + LoggingService.Info(string.Format("Help 3.0: Calling \"TryShowHelpByKeyword\" with {0}", keyword)); + DisplayHelp.Keywords(keyword); + return true; + } + } +} From 22ef602258a3d4e7454d48546c97112d109f4a23 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Thu, 20 May 2010 07:48:32 +0000 Subject: [PATCH 06/79] ShowErrorHelpCommand included and HelpMenu.cs renamed into Commands.cs git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5835 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 18 ++++--- src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 2 +- src/AddIns/Misc/HelpViewer/Source/Commands.cs | 48 +++++++++++++++++++ src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs | 15 ------ 4 files changed, 60 insertions(+), 23 deletions(-) create mode 100644 src/AddIns/Misc/HelpViewer/Source/Commands.cs delete mode 100644 src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index d8f3bbacf3..f7dabbaa78 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -15,15 +15,19 @@ - - + + + + + + - + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index 98523e3a7b..5c45971815 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -89,7 +89,7 @@ - + diff --git a/src/AddIns/Misc/HelpViewer/Source/Commands.cs b/src/AddIns/Misc/HelpViewer/Source/Commands.cs new file mode 100644 index 0000000000..a995218494 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Commands.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using MSHelpSystem.Core; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; + +namespace MSHelpSystem.Commands +{ + // + // $Revision: 3555 $ + public class ShowErrorHelpCommand : AbstractMenuCommand + { + public override void Run() + { + ICSharpCode.SharpDevelop.Gui.TaskView view = (TaskView)Owner; + + foreach (Task t in new List(view.SelectedTasks)) { + if (t.BuildError == null) + continue; + + string code = t.BuildError.ErrorCode; + if (string.IsNullOrEmpty(code)) + return; + + if (Help3Environment.IsHelp3ProtocolRegistered) { + LoggingService.Debug(string.Format("Help 3.0: Getting description of \"{0}\"", code)); + if (Help3Environment.IsLocalHelp) + DisplayHelp.Keywords(code); + else + DisplayHelp.ContextualHelp(code); + } + else { + LoggingService.Error("Help 3.0: Help system ist not initialized"); + } + } + } + } + + public class DisplayCatalogCommand : AbstractMenuCommand + { + public override void Run() + { + LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); + DisplayHelp.Catalog(); + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs b/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs deleted file mode 100644 index f74794306e..0000000000 --- a/src/AddIns/Misc/HelpViewer/Source/HelpMenu.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using MSHelpSystem.Core; -using ICSharpCode.Core; - -namespace MSHelpSystem.SharpDevelopMenu -{ - public class DisplayCatalogCommand : AbstractMenuCommand - { - public override void Run() - { - LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); - DisplayHelp.Catalog(); - } - } -} From d08b0f49681c32790e8c1fe675809d3904cecc41 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Thu, 20 May 2010 17:35:16 +0000 Subject: [PATCH 07/79] fixed a probleme with the BrowserScheme extension and a few minor problems git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5836 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 2 +- .../Misc/HelpViewer/Source/BrowserScheme.cs | 2 - .../HelpViewer/Source/Core/DisplayHelp.cs | 17 +------ .../Source/Core/Help3Environment.cs | 12 +++++ .../HelpViewer/Source/Core/Help3Service.cs | 46 ++++++++----------- .../Source/Core/HelpLibraryAgent.cs | 5 +- .../Source/Help3OptionsPanel.xaml.cs | 9 ++-- 7 files changed, 40 insertions(+), 53 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index f7dabbaa78..163c65ebe4 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -12,7 +12,7 @@ - + diff --git a/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs b/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs index f8c0142bd8..bf81357440 100644 --- a/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs +++ b/src/AddIns/Misc/HelpViewer/Source/BrowserScheme.cs @@ -13,7 +13,6 @@ namespace MSHelpSystem if (pane == null) { throw new ArgumentNullException("pane"); } - LoggingService.Info("Help 3.0: Calling browser (\"GoHome()\")"); DisplayHelp.Catalog(); } @@ -22,7 +21,6 @@ namespace MSHelpSystem if (pane == null) { throw new ArgumentNullException("pane"); } - LoggingService.Info("Help 3.0: Calling browser (\"GoSearch()\")"); pane.Navigate(new Uri(string.Format(@"http://social.msdn.microsoft.com/Search/{0}", CultureInfo.CurrentCulture.Name.ToLower()))); } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 3385ca8f1e..46c45dabe8 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -7,7 +7,6 @@ using ICSharpCode.SharpDevelop.BrowserDisplayBinding; using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Project; using MSHelpSystem.Helper; -using MSHelpSystem.Core.Native; namespace MSHelpSystem.Core { @@ -114,20 +113,6 @@ namespace MSHelpSystem.Core } - static string FormatMsXHelpToHttp(string helpUrl) - { - string output = helpUrl; - if (output.StartsWith("ms-xhelp://?")) { - output = string.Format( - @"http://127.0.0.1:{0}/help/{1}-{2}/ms.help?{3}", - HelpLibraryAgent.PortNumber, - NativeMethods.GetSessionId(), - HelpLibraryAgent.ProcessId, - output.Replace("ms-xhelp://?", "")); - } - return output; - } - static void DisplayLocalHelp(string arguments) { // TODO: set "embedded" to TRUE if we have a TOC control or something similar @@ -141,7 +126,7 @@ namespace MSHelpSystem.Core HelpLibraryAgent.Start(); Thread.Sleep(0x3e8); } - string helpUrl = string.Format(@"{0}{1}{2}", FormatMsXHelpToHttp(arguments), ProjectLanguages.FormattedAsHttpParam(), (embedded)?"&embedded=true":string.Empty); + string helpUrl = string.Format(@"{0}{1}{2}", Help3Environment.FormatMsXHelpToHttp(arguments), ProjectLanguages.FormattedAsHttpParam(), (embedded)?"&embedded=true":string.Empty); BrowserPane browser = ActiveHelp3Browser(); if (browser != null) { LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", helpUrl)); diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs index 82417852c9..b6187fde7b 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs @@ -2,6 +2,7 @@ using System.IO; using Microsoft.Win32; using ICSharpCode.Core; +using MSHelpSystem.Core.Native; using MSHelpSystem.Helper; namespace MSHelpSystem.Core @@ -93,5 +94,16 @@ namespace MSHelpSystem.Core { get { return HelpClientWatcher.IsLocalHelp; } } + + public static string FormatMsXHelpToHttp(string helpUrl) + { + string output = helpUrl; + if (output.StartsWith("ms-xhelp://?")) { + output = string.Format( + @"http://127.0.0.1:{0}/help/{1}-{2}/ms.help?{3}", + HelpLibraryAgent.PortNumber, NativeMethods.GetSessionId(), HelpLibraryAgent.ProcessId, output.Replace("ms-xhelp://?", "")); + } + return output; + } } } \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs index db4b5322e7..ee4f059e4e 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -18,8 +18,8 @@ namespace MSHelpSystem.Core static Help3Service() { - Help3Service.CatalogsUpdated += new EventHandler(Help3HasUpdatedTheCatalogs); - Help3Service.CatalogChanged += new EventHandler(Help3ActiveCatalogIdChanged); + Help3Service.CatalogsUpdated += new EventHandler(Help3HasUpdatedTheCatalogs); + Help3Service.CatalogChanged += new EventHandler(Help3ActiveCatalogIdChanged); Help3Service.ConfigurationUpdated += new EventHandler(Help3ConfigurationUpdated); LoadHelpConfiguration(); UpdateCatalogs(); @@ -28,8 +28,8 @@ namespace MSHelpSystem.Core } static List catalogs = new List(); - static Help3Catalog activeCatalog = null; - static Help3Configuration config = new Help3Configuration(); + static Help3Catalog activeCatalog = null; + static Help3Configuration config = new Help3Configuration(); #region Read help catalogs @@ -57,10 +57,11 @@ namespace MSHelpSystem.Core ); } } + LoggingService.Debug(string.Format("Help 3.0: {0} {1} loaded", catalogs.Count, (catalogs.Count == 1)?"catalog":"catalogs")); } catch (Exception ex) { LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); - } + } } OnCatalogsUpdated(EventArgs.Empty); } @@ -68,14 +69,17 @@ namespace MSHelpSystem.Core static void Help3HasUpdatedTheCatalogs(object sender, EventArgs e) { if (string.IsNullOrEmpty(config.ActiveCatalogId)) { - config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ProductCode:string.Empty; + config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ToString():string.Empty; } activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsString(config.ActiveCatalogId); } static void Help3ActiveCatalogIdChanged(object sender, EventArgs e) { - activeCatalog = (catalogs.Count > 0) ? FindCatalogByItsString(config.ActiveCatalogId) : null; + if (string.IsNullOrEmpty(config.ActiveCatalogId)) { + config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ToString():string.Empty; + } + activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsString(config.ActiveCatalogId); } static void Help3ConfigurationUpdated(object sender, EventArgs e) @@ -94,10 +98,7 @@ namespace MSHelpSystem.Core public static int Count { - get - { - return catalogs.Count; - } + get { return catalogs.Count; } } public static ReadOnlyCollection Items @@ -111,10 +112,8 @@ namespace MSHelpSystem.Core public static Help3Catalog FindCatalogByProductCode(string productCode) { - foreach (Help3Catalog catalog in catalogs) - { - if (string.Compare(productCode, catalog.ProductCode, true) == 0) - { + foreach (Help3Catalog catalog in catalogs) { + if (string.Compare(productCode, catalog.ProductCode, true) == 0) { return catalog; } } @@ -123,10 +122,8 @@ namespace MSHelpSystem.Core public static Help3Catalog FindCatalogByDisplayName(string displayName) { - foreach (Help3Catalog catalog in catalogs) - { - if (string.Compare(displayName, catalog.DisplayName, true) == 0) - { + foreach (Help3Catalog catalog in catalogs) { + if (string.Compare(displayName, catalog.DisplayName, true) == 0) { return catalog; } } @@ -135,10 +132,8 @@ namespace MSHelpSystem.Core public static Help3Catalog FindCatalogByItsString(string stringValue) { - foreach (Help3Catalog catalog in catalogs) - { - if (string.Compare(stringValue, catalog.ToString()) == 0) - { + foreach (Help3Catalog catalog in catalogs) { + if (string.Compare(stringValue, catalog.ToString()) == 0) { return catalog; } } @@ -160,10 +155,7 @@ namespace MSHelpSystem.Core public static Help3Catalog ActiveCatalog { - get - { - return activeCatalog; - } + get { return activeCatalog; } } public static Help3Configuration Config diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs index 8ac4da8279..5597ad7dac 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs @@ -56,7 +56,7 @@ namespace MSHelpSystem.Core { Process[] agents = Process.GetProcessesByName("HelpLibAgent"); int processId = (agents.Length > 0) ? agents[0].Id:0; - LoggingService.Debug(string.Format("Help 3.0: Port number is \"{0}\"", processId)); + LoggingService.Debug(string.Format("Help 3.0: Help library agent uses has the process ID \"{0}\"", processId)); return processId; } } @@ -112,13 +112,12 @@ namespace MSHelpSystem.Core { try { Process[] agents = Process.GetProcessesByName("HelpLibAgent"); - LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryAgent.exe found", agents.Length, (agents.Length == 1)?"process":"processes")); foreach (Process agent in agents) { agent.Kill(); if (waitForExit) agent.WaitForExit(); } - LoggingService.Info("Help 3.0: Help library agent stopped"); + LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryAgent.exe stopped", agents.Length, (agents.Length == 1)?"process":"processes")); } catch (Exception ex) { LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs index 4fed1bfa26..65ed11f7bf 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -21,7 +21,7 @@ namespace MSHelpSystem void LoadCatalogs() { - if (Help3Environment.IsLocalHelp) HelpLibraryAgent.Start(); + HelpLibraryAgent.Start(); help3Catalogs.Items.Clear(); if (Help3Service.Count > 0) { @@ -32,10 +32,10 @@ namespace MSHelpSystem help3Catalogs.Items.Add(cbi); } } - // TODO: localization needed for "Installed help catalogs" + // TODO: Needs a localization groupBox1.Header = string.Format("{0} ({1})", "Installed Help catalogs", Help3Service.Count); - if (help3Catalogs.Items.Count == 0) help3Catalogs.SelectedIndex = 0; + if (help3Catalogs.Items.Count == 1) help3Catalogs.SelectedIndex = 0; else { foreach (ComboBoxItem item in help3Catalogs.Items) { if (string.Compare((string)item.Content, Help3Service.ActiveCatalog.ToString(), true) == 0) { @@ -53,7 +53,8 @@ namespace MSHelpSystem ComboBoxItem selectedItem = (ComboBoxItem)help3Catalogs.SelectedItem; if (selectedItem == null) return; string activeCatalog = (string)selectedItem.Content; - if (!string.IsNullOrEmpty(activeCatalog)) Help3Service.ActiveCatalogId = activeCatalog; + if (!string.IsNullOrEmpty(activeCatalog)) + Help3Service.ActiveCatalogId =activeCatalog; } void Help3OfflineModeClicked(object sender, RoutedEventArgs e) From 868f37138b98d930dbb617b1cc0c5aa61badd992 Mon Sep 17 00:00:00 2001 From: Kumar Devvrat Date: Thu, 20 May 2010 18:10:14 +0000 Subject: [PATCH 08/79] Fix bugs -Invert Row lengths that appears in left GridRailAdorner -Update code which caused Row/Column lengths to be displayed at wrong positions after creation of new RowDefinition/ColumnDefinition. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5838 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Controls/GridAdorner.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs index 9fb765e6c3..1d3111c664 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs @@ -127,10 +127,10 @@ namespace ICSharpCode.WpfDesign.Designer.Controls if (gridItem.Services.Selection.IsComponentSelected(rowItem)) { drawingContext.DrawRectangle(selBrush, null, selRect); } - drawingContext.PushTransform(new RotateTransform(-270)); - drawingContext.PushTransform(new TranslateTransform(0, -10)); - drawingContext.DrawText(text, new Point(row.Offset + row.ActualHeight / 2, 0)); - drawingContext.Pop(); + drawingContext.PushTransform(new RotateTransform(-90)); + //drawingContext.PushTransform(new TranslateTransform(0, -10)); + drawingContext.DrawText(text, new Point((row.Offset + row.ActualHeight / 2)*-1, 0)); + //drawingContext.Pop(); drawingContext.Pop(); } } @@ -285,7 +285,9 @@ namespace ICSharpCode.WpfDesign.Designer.Controls newRowDefinition.Properties[RowDefinition.HeightProperty].SetValue(newLength2); FixIndicesAfterSplit(i, Grid.RowProperty, Grid.RowSpanProperty); + grid.UpdateLayout(); changeGroup.Commit(); + gridItem.Services.Selection.SetSelectedComponents(new DesignItem[] { newRowDefinition }, SelectionTypes.Auto); break; } @@ -340,6 +342,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls columnCollection.CollectionElements[i].Properties[ColumnDefinition.WidthProperty].SetValue(newLength1); newColumnDefinition.Properties[ColumnDefinition.WidthProperty].SetValue(newLength2); FixIndicesAfterSplit(i, Grid.ColumnProperty, Grid.ColumnSpanProperty); + grid.UpdateLayout(); changeGroup.Commit(); gridItem.Services.Selection.SetSelectedComponents(new DesignItem[] { newColumnDefinition }, SelectionTypes.Auto); break; From c24ceaf5c37379eb6d97b8a7c790ae174c286afb Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Sat, 22 May 2010 13:39:10 +0000 Subject: [PATCH 09/79] renamed a few methods and includes the HelpLibraryManager.cs class (unused at this point) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5840 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 1 + .../HelpViewer/Source/Core/DisplayHelp.cs | 41 ++-- .../Source/Core/Help3Environment.cs | 15 +- .../HelpViewer/Source/Core/Help3Service.cs | 2 - .../Source/Core/HelpLibraryManager.cs | 225 ++++++++++++++++++ .../Source/Helper/ProjectLanguages.cs | 6 +- 6 files changed, 260 insertions(+), 30 deletions(-) create mode 100644 src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index 5c45971815..b168f5e917 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -81,6 +81,7 @@ + Help3OptionsPanel.xaml diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 46c45dabe8..26053d74fe 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -25,11 +25,12 @@ namespace MSHelpSystem.Core MessageBoxIcon.Error); return; } - Help3Catalog c = Help3Service.ActiveCatalog; - if (c == null) { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (catalog == null) { throw new ArgumentNullException("c"); } - string helpCatalogUrl = string.Format(@"ms-xhelp://?method=page&id=-1&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale); + string helpCatalogUrl = string.Format(@"ms-xhelp://?method=page&id=-1&product={0}&productVersion={1}&locale={2}", + catalog.ProductCode, catalog.ProductVersion, catalog.Locale); LoggingService.Debug(string.Format("Help 3.0: {0}", helpCatalogUrl)); DisplayLocalHelp(helpCatalogUrl); } @@ -46,11 +47,12 @@ namespace MSHelpSystem.Core MessageBoxIcon.Error); return; } - Help3Catalog c = Help3Service.ActiveCatalog; - if (c == null) { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (catalog == null) { throw new ArgumentNullException("c"); } - string helpPageUrl = string.Format(@"ms-xhelp://?method=page&id={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, pageId); + string helpPageUrl = string.Format(@"ms-xhelp://?method=page&id={3}&product={0}&productVersion={1}&locale={2}", + catalog.ProductCode, catalog.ProductVersion, catalog.Locale, pageId); LoggingService.Debug(string.Format("Help 3.0: {0}", helpPageUrl)); DisplayLocalHelp(helpPageUrl); } @@ -64,11 +66,12 @@ namespace MSHelpSystem.Core DisplayHelpOnMSDN(contextual); return; } - Help3Catalog c = Help3Service.ActiveCatalog; - if (c == null) { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (catalog == null) { throw new ArgumentNullException("c"); } - string helpContextualUrl = string.Format(@"ms-xhelp://?method=f1&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, contextual); + string helpContextualUrl = string.Format(@"ms-xhelp://?method=f1&query={3}&product={0}&productVersion={1}&locale={2}", + catalog.ProductCode, catalog.ProductVersion, catalog.Locale, contextual); LoggingService.Debug(string.Format("Help 3.0: {0}", helpContextualUrl)); DisplayLocalHelp(helpContextualUrl); } @@ -82,11 +85,12 @@ namespace MSHelpSystem.Core DisplaySearchOnMSDN(searchWords); return; } - Help3Catalog c = Help3Service.ActiveCatalog; - if (c == null) { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (catalog == null) { throw new ArgumentNullException("c"); } - string helpSearchUrl = string.Format(@"ms-xhelp://method=search&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, searchWords.Replace(" ", "+")); + string helpSearchUrl = string.Format(@"ms-xhelp://method=search&query={3}&product={0}&productVersion={1}&locale={2}", + catalog.ProductCode, catalog.ProductVersion, catalog.Locale, searchWords.Replace(" ", "+")); LoggingService.Debug(string.Format("Help 3.0: {0}", helpSearchUrl)); DisplayLocalHelp(helpSearchUrl); } @@ -103,11 +107,12 @@ namespace MSHelpSystem.Core MessageBoxIcon.Error); return; } - Help3Catalog c = Help3Service.ActiveCatalog; - if (c == null) { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (catalog == null) { throw new ArgumentNullException("c"); } - string helpKeywordsUrl = string.Format(@"ms-xhelp://?method=keywords&query={3}&product={0}&productVersion={1}&locale={2}", c.ProductCode, c.ProductVersion, c.Locale, keywords); + string helpKeywordsUrl = string.Format(@"ms-xhelp://?method=keywords&query={3}&product={0}&productVersion={1}&locale={2}", + catalog.ProductCode, catalog.ProductVersion, catalog.Locale, keywords); LoggingService.Debug(string.Format("Help 3.0: {0}", helpKeywordsUrl)); DisplayLocalHelp(helpKeywordsUrl); } @@ -126,11 +131,13 @@ namespace MSHelpSystem.Core HelpLibraryAgent.Start(); Thread.Sleep(0x3e8); } - string helpUrl = string.Format(@"{0}{1}{2}", Help3Environment.FormatMsXHelpToHttp(arguments), ProjectLanguages.FormattedAsHttpParam(), (embedded)?"&embedded=true":string.Empty); + string helpUrl = string.Format(@"{0}{1}{2}", + arguments, ProjectLanguages.GetCurrentLanguageAsHttpParam(), (embedded)?"&embedded=true":string.Empty); + BrowserPane browser = ActiveHelp3Browser(); if (browser != null) { LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", helpUrl)); - browser.Navigate(helpUrl); + browser.Navigate(Help3Environment.GetHttpFromMsXHelp(helpUrl)); browser.WorkbenchWindow.SelectWindow(); } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs index b6187fde7b..b228e3e9a8 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs @@ -95,15 +95,14 @@ namespace MSHelpSystem.Core get { return HelpClientWatcher.IsLocalHelp; } } - public static string FormatMsXHelpToHttp(string helpUrl) + public static string GetHttpFromMsXHelp(string helpUrl) { - string output = helpUrl; - if (output.StartsWith("ms-xhelp://?")) { - output = string.Format( - @"http://127.0.0.1:{0}/help/{1}-{2}/ms.help?{3}", - HelpLibraryAgent.PortNumber, NativeMethods.GetSessionId(), HelpLibraryAgent.ProcessId, output.Replace("ms-xhelp://?", "")); - } - return output; + if (!HelpLibraryAgent.Start()) { return helpUrl; } + if (!helpUrl.StartsWith("ms-xhelp://?")) { return helpUrl; } + return string.Format( + @"http://127.0.0.1:{0}/help/{1}-{2}/ms.help?{3}", + HelpLibraryAgent.PortNumber, NativeMethods.GetSessionId(), HelpLibraryAgent.ProcessId, helpUrl.Replace("ms-xhelp://?", "") + ); } } } \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs index ee4f059e4e..4b84a7405c 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -23,8 +23,6 @@ namespace MSHelpSystem.Core Help3Service.ConfigurationUpdated += new EventHandler(Help3ConfigurationUpdated); LoadHelpConfiguration(); UpdateCatalogs(); - if (config.OfflineMode) HelpClientWatcher.EnableLocalHelp(); - else HelpClientWatcher.EnableOnlineHelp(); } static List catalogs = new List(); diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs new file mode 100644 index 0000000000..c13e564e59 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs @@ -0,0 +1,225 @@ +using System; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Text.RegularExpressions; +using ICSharpCode.Core; + +namespace MSHelpSystem.Core +{ + internal sealed class HelpLibraryManager + { + HelpLibraryManager() + { + } + + public static bool IsRunning + { + get + { + Process[] managers = Process.GetProcessesByName("HelpLibManager"); + LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryManager.exe found", managers.Length, (managers.Length == 1)?"process":"processes")); + return managers.Length > 0; + } + } + + public static string Manager + { + get + { + if (string.IsNullOrEmpty(Help3Environment.AppRoot)) return string.Empty; + string manager = Path.Combine(Help3Environment.AppRoot, "HelpLibManager.exe"); + LoggingService.Debug(string.Format("Help 3.0: Help library manager is \"{0}\"", manager)); + return (File.Exists(manager)) ? manager : string.Empty; + } + } + + #region InitializeLocaleStore + + public static void InitializeLocaleStore(string productCode, string productVersion) + { + InitializeLocaleStore(productCode, productVersion, CultureInfo.CurrentCulture.Name.ToUpper(), string.Empty); + } + + public static void InitializeLocaleStore(string productCode, string productVersion, string locale) + { + InitializeLocaleStore(productCode, productVersion, locale, string.Empty); + } + + public static void InitializeLocaleStore(string productCode, string productVersion, string locale, string brandingPackage) + { + if (Help3Environment.IsLocalStoreInitialized) { return; } + if (string.IsNullOrEmpty(productCode)) { throw new ArgumentNullException("productCode"); } + if (string.IsNullOrEmpty(productVersion)) { throw new ArgumentNullException("productVersion"); } + if (string.IsNullOrEmpty(locale)) { throw new ArgumentNullException("locale"); } + if (!Regex.IsMatch(productVersion, @"^\d{3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("productVersion"); } + if (!Regex.IsMatch(locale, @"^\w{2}-\w{2}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("locale"); } + + string brandingSwitch = (!string.IsNullOrEmpty(brandingPackage)) ? string.Format("/brandingPackage \"{0}\"", brandingPackage):""; + string arguments = string.Format("/product {0} /version {1} /locale {2} /content \"{3}\" {4}", productCode, productVersion, locale, Help3Environment.BuildLocalStoreFolder, brandingSwitch); + + LoggingService.Debug(string.Format("Help 3.0: Initializing local store with \"{0}\"", arguments)); + HelpLibManagerProcessRunner(arguments); + } + + #endregion + + #region InstallHelpDocumentsFromLocalSource + + public static void InstallHelpDocumentsFromLocalSource(string productCode, string productVersion, string locale, string sourceMedia) + { + InstallHelpDocumentsFromLocalSource(productCode, productVersion, locale, sourceMedia, string.Empty); + } + + public static void InstallHelpDocumentsFromLocalSource(string productCode, string productVersion, string locale, string sourceMedia, string brandingPackage) + { + if (string.IsNullOrEmpty(productCode)) { throw new ArgumentNullException("productCode"); } + if (string.IsNullOrEmpty(productVersion)) { throw new ArgumentNullException("productVersion"); } + if (string.IsNullOrEmpty(locale)) { throw new ArgumentNullException("locale"); } + if (string.IsNullOrEmpty(sourceMedia)) { throw new ArgumentNullException("sourceMedia"); } + if (!File.Exists(sourceMedia)) { throw new FileNotFoundException(); } + if (!Regex.IsMatch(productVersion, @"^\d{3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("productVersion"); } + if (!Regex.IsMatch(locale, @"^\w{2}-\w{2}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("locale"); } + + string initLS = (!Help3Environment.IsLocalStoreInitialized) ? string.Format("/content \"{0}\"", Help3Environment.BuildLocalStoreFolder):""; + string brandingSwitch = (!string.IsNullOrEmpty(brandingPackage)) ? string.Format("/brandingPackage \"{0}\"", brandingPackage):""; + string arguments = string.Format("/product {0} /version {1} /locale {2} /sourceMedia \"{3}\" {4} {5}", productCode, productVersion, locale, sourceMedia, initLS, brandingSwitch); + + LoggingService.Debug(string.Format("Help 3.0: Installing local help documents with \"{0}\"", arguments)); + HelpLibManagerProcessRunner(arguments); + } + + #endregion + + #region InstallHelpDocumentsFromWebSource + + public static void InstallHelpDocumentsFromWebSource(string productCode, string productVersion, string locale, string sourceWeb) + { + InstallHelpDocumentsFromWebSource(productCode, productVersion, locale, sourceWeb, string.Empty); + } + + public static void InstallHelpDocumentsFromWebSource(string productCode, string productVersion, string locale, string sourceWeb, string brandingPackage) + { + if (string.IsNullOrEmpty(productCode)) { throw new ArgumentNullException("productCode"); } + if (string.IsNullOrEmpty(productVersion)) { throw new ArgumentNullException("productVersion"); } + if (string.IsNullOrEmpty(locale)) { throw new ArgumentNullException("locale"); } + if (string.IsNullOrEmpty(sourceWeb)) { throw new ArgumentNullException("sourceWeb"); } + if (!Regex.IsMatch(productVersion, @"^\d{3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("productVersion"); } + if (!Regex.IsMatch(locale, @"^\w{2}-\w{2}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("locale"); } + + string initLS = (!Help3Environment.IsLocalStoreInitialized) ? string.Format("/content \"{0}\"", Help3Environment.BuildLocalStoreFolder):""; + string brandingSwitch = (!string.IsNullOrEmpty(brandingPackage)) ? string.Format("/brandingPackage \"{0}\"", brandingPackage):""; + string arguments = string.Format("/product {0} /version {1} /locale {2} /sourceWeb \"{3}\" {4} {5}", productCode, productVersion, locale, sourceWeb, initLS, brandingSwitch); + + LoggingService.Debug(string.Format("Help 3.0: Installing help documents from web with \"{0}\"", arguments)); + HelpLibManagerProcessRunner(arguments); + } + + #endregion + + #region UninstallHelpDocuments + + public static void UninstallHelpDocuments(string productCode, string productVersion, string locale, string vendor, string productName, string mediaBookList) + { + if (!Help3Environment.IsLocalStoreInitialized) { return; } + if (string.IsNullOrEmpty(productCode)) { throw new ArgumentNullException("productCode"); } + if (string.IsNullOrEmpty(productVersion)) { throw new ArgumentNullException("productVersion"); } + if (string.IsNullOrEmpty(locale)) { throw new ArgumentNullException("locale"); } + if (string.IsNullOrEmpty(vendor)) { throw new ArgumentNullException("vendor"); } + if (string.IsNullOrEmpty(productName)) { throw new ArgumentNullException("productName"); } + if (string.IsNullOrEmpty(mediaBookList)) { throw new ArgumentNullException("mediaBookList"); } + if (!Regex.IsMatch(productVersion, @"^\d{3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("productVersion"); } + if (!Regex.IsMatch(locale, @"^\w{2}-\w{2}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase)) { throw new ArgumentOutOfRangeException("locale"); } + + string arguments = string.Format("/product {0} /version {1} /locale {2} /vendor \"{3}\" /productName \"{4}\" /mediaBookList {5} /uninstall", productCode, productVersion, locale, vendor, productName, mediaBookList); + + LoggingService.Debug(string.Format("Help 3.0: Uninstalling help documents with \"{0}\"", arguments)); + HelpLibManagerProcessRunner(arguments); + } + + #endregion + + static int HelpLibManagerProcessRunner(string arguments) + { + return HelpLibManagerProcessRunner(arguments, false); + } + + static int HelpLibManagerProcessRunner(string arguments, bool silent) + { + if (string.IsNullOrEmpty(Manager) || string.IsNullOrEmpty(Help3Environment.AppRoot)) return -10; + Stop(); + + ProcessStartInfo psi = new ProcessStartInfo(); + psi.FileName = Manager; + psi.WorkingDirectory = Help3Environment.AppRoot; + psi.Arguments = string.Format("{0} {1}", arguments, (silent)?"/silent":string.Empty); + psi.UseShellExecute = true; + psi.Verb = "runas"; + psi.WindowStyle = ProcessWindowStyle.Normal; + + try { + Process p = Process.Start(psi); + p.WaitForExit(); + return p.ExitCode; + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return -1; + } + + + public static bool Start() + { + if (IsRunning) return true; + if (string.IsNullOrEmpty(Manager)) { + throw new ArgumentNullException("Manager"); + } + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); + } + ProcessStartInfo psi = new ProcessStartInfo(); + psi.FileName = Manager; + psi.WorkingDirectory = Help3Environment.AppRoot; + psi.Arguments = string.Format("/product {0} /version {1} /locale {2}", + Help3Service.ActiveCatalog.ProductCode, + Help3Service.ActiveCatalog.ProductVersion, + Help3Service.ActiveCatalog.Locale); + psi.UseShellExecute = true; + psi.Verb = "runas"; + psi.WindowStyle = ProcessWindowStyle.Normal; + try { + Process p = Process.Start(psi); + p.WaitForInputIdle(); + LoggingService.Info("Help 3.0: Help library manager started"); + return IsRunning; + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return false; + } + + public static bool Stop() + { + return Stop(true); + } + + public static bool Stop(bool waitForExit) + { + try { + Process[] managers = Process.GetProcessesByName("HelpLibManager"); + + foreach (Process manager in managers) { + manager.Kill(); + if (waitForExit) manager.WaitForExit(); + } + LoggingService.Debug(string.Format("Help 3.0: {0} {1} of HelpLibraryManager.exe stopped", managers.Length, (managers.Length == 1)?"process":"processes")); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return true; + } + } +} \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs index 47e7e1dbe9..a65da2fe6d 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/ProjectLanguages.cs @@ -26,7 +26,7 @@ namespace MSHelpSystem.Helper #endregion - public static string Formatted() + public static string GetCurrentLanguage() { string output = string.Empty; if (ProjectService.CurrentProject != null) { @@ -42,9 +42,9 @@ namespace MSHelpSystem.Helper return output.ToLower(); } - public static string FormattedAsHttpParam() + public static string GetCurrentLanguageAsHttpParam() { - string devLang = Formatted(); + string devLang = GetCurrentLanguage(); if (string.IsNullOrEmpty(devLang)) return string.Empty; else return string.Format("&category=DevLang%3a{0}", devLang); } From a4dc802016a205b112d52b2f47c6e50c056ed3b8 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Sun, 23 May 2010 07:14:23 +0000 Subject: [PATCH 10/79] set core classes to public, fixed a bug in the search help URL and removed the DisplayCatalog menu command git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5841 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 8 -------- src/AddIns/Misc/HelpViewer/Source/Commands.cs | 9 --------- src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs | 6 +++--- .../Misc/HelpViewer/Source/Core/Help3Environment.cs | 2 +- .../Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs | 2 +- .../Misc/HelpViewer/Source/Core/HelpLibraryManager.cs | 2 +- 6 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index 163c65ebe4..7f715f7c0d 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -22,12 +22,4 @@ - - - - diff --git a/src/AddIns/Misc/HelpViewer/Source/Commands.cs b/src/AddIns/Misc/HelpViewer/Source/Commands.cs index a995218494..940bd081bf 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Commands.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Commands.cs @@ -36,13 +36,4 @@ namespace MSHelpSystem.Commands } } } - - public class DisplayCatalogCommand : AbstractMenuCommand - { - public override void Run() - { - LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); - DisplayHelp.Catalog(); - } - } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 26053d74fe..7921dcc839 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -10,7 +10,7 @@ using MSHelpSystem.Helper; namespace MSHelpSystem.Core { - internal sealed class DisplayHelp + public sealed class DisplayHelp { DisplayHelp() { @@ -89,7 +89,7 @@ namespace MSHelpSystem.Core if (catalog == null) { throw new ArgumentNullException("c"); } - string helpSearchUrl = string.Format(@"ms-xhelp://method=search&query={3}&product={0}&productVersion={1}&locale={2}", + string helpSearchUrl = string.Format(@"ms-xhelp://?method=search&query={3}&product={0}&productVersion={1}&locale={2}", catalog.ProductCode, catalog.ProductVersion, catalog.Locale, searchWords.Replace(" ", "+")); LoggingService.Debug(string.Format("Help 3.0: {0}", helpSearchUrl)); DisplayLocalHelp(helpSearchUrl); @@ -121,7 +121,7 @@ namespace MSHelpSystem.Core static void DisplayLocalHelp(string arguments) { // TODO: set "embedded" to TRUE if we have a TOC control or something similar - DisplayLocalHelp(arguments, false); + DisplayLocalHelp(arguments, true); } static void DisplayLocalHelp(string arguments, bool embedded) diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs index b228e3e9a8..471d4b8ccb 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Environment.cs @@ -7,7 +7,7 @@ using MSHelpSystem.Helper; namespace MSHelpSystem.Core { - internal sealed class Help3Environment + public sealed class Help3Environment { Help3Environment() { diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs index 5597ad7dac..2625d1f7ad 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs @@ -6,7 +6,7 @@ using ICSharpCode.Core; namespace MSHelpSystem.Core { - internal sealed class HelpLibraryAgent + public sealed class HelpLibraryAgent { HelpLibraryAgent() { diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs index c13e564e59..856af88236 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs @@ -7,7 +7,7 @@ using ICSharpCode.Core; namespace MSHelpSystem.Core { - internal sealed class HelpLibraryManager + public sealed class HelpLibraryManager { HelpLibraryManager() { From f3ef3d92f8ab1b3b92718c4b64822978ac359d0f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 23 May 2010 14:33:42 +0000 Subject: [PATCH 11/79] Integrated HelpViewer by Mathias Simmack into setup and removed old HtmlHelp2 git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5842 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- SharpDevelop.Tests.sln | 535 ++++++------ SharpDevelop.sln | 449 +++++----- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 9 +- src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 29 +- src/AddIns/Misc/HtmlHelp2/HtmlHelp2.sln | 16 - .../HtmlHelp2/JScriptGlobals/AssemblyInfo.vb | 26 - .../Misc/HtmlHelp2/JScriptGlobals/Globals.vb | 65 -- .../HtmlHelp2JScriptGlobals.vbproj | 53 -- .../Project/Configuration/AssemblyInfo.cs | 23 - .../Misc/HtmlHelp2/Project/HtmlHelp2.addin | 125 --- .../Misc/HtmlHelp2/Project/HtmlHelp2.csproj | 143 ---- .../HtmlHelp2/Project/HtmlHelp2.csproj.user | 5 - .../Project/Resources/ClosedBook.png | Bin 278 -> 0 bytes .../Resources/Favorites.16x16.Delete.bmp | Bin 246 -> 0 bytes .../Resources/Favorites.16x16.MoveDown.bmp | Bin 246 -> 0 bytes .../Resources/Favorites.16x16.MoveUp.bmp | Bin 246 -> 0 bytes .../Resources/Favorites.16x16.Rename.bmp | Bin 246 -> 0 bytes .../HtmlHelp2.16x16.AddToFavorites.png | Bin 824 -> 0 bytes .../Resources/HtmlHelp2.16x16.Index.png | Bin 751 -> 0 bytes .../Resources/HtmlHelp2.16x16.Print.bmp | Bin 687 -> 0 bytes .../Resources/HtmlHelp2.16x16.Search.png | Bin 714 -> 0 bytes .../Resources/HtmlHelp2.16x16.TextZoom.png | Bin 254 -> 0 bytes .../Project/Resources/HtmlHelp2.16x16.Toc.png | Bin 834 -> 0 bytes .../Project/Resources/HtmlHelp2Options.xfrm | 53 -- .../HtmlHelp2/Project/Resources/OpenBook.png | Bin 274 -> 0 bytes .../Project/Resources/buildwin32resource.bat | 10 - .../HtmlHelp2/Project/Resources/context.html | 48 -- .../Project/Resources/dynamichelp.rc | 10 - .../Project/Resources/dynamichelp.res | Bin 1588 -> 0 bytes .../src/BaseControls/DynamicHelpPad.cs | 635 --------------- .../Project/src/BaseControls/FavoritesPad.cs | 319 -------- .../Project/src/BaseControls/IndexPad.cs | 345 -------- .../src/BaseControls/IndexResultsPad.cs | 144 ---- .../Project/src/BaseControls/SearchPad.cs | 411 ---------- .../src/BaseControls/SearchResultsPad.cs | 155 ---- .../Project/src/BaseControls/TocPad.cs | 450 ---------- .../src/BrowserControl/HelpBrowserCommands.cs | 88 -- .../src/BrowserControl/ShowHelpBrowser.cs | 103 --- .../HtmlHelp2/Project/src/BrowserScheme.cs | 91 --- .../src/Commands/ShowErrorHelpCommand.cs | 85 -- .../HtmlHelp2/Project/src/MsHelpProvider.cs | 47 -- .../Project/src/Service/AxMSHelpControls.cs | 764 ----------------- .../src/Service/Help2ControlsValidation.cs | 52 -- .../src/Service/Help2RegistryWalker.cs | 180 ---- .../Project/src/Service/HtmlHelp2Dialog.cs | 123 --- .../Project/src/Service/HtmlHelp2Options.cs | 98 --- .../Project/src/Service/HtmlHelp2Service.cs | 407 --------- .../Project/src/Service/ResourcesHelper.cs | 38 - .../src/Service/SharpDevLanguageClass.cs | 131 --- .../RequiredLibraries/AxMSHelpControls.cs | 769 ------------------ .../RequiredLibraries/MSHelpControls.dll | Bin 19456 -> 0 bytes .../RequiredLibraries/MSHelpServices.dll | Bin 45056 -> 0 bytes .../HtmlHelp2/RequiredLibraries/import.bat | 15 - .../HtmlHelp2/RequiredLibraries/import.txt | 16 - .../HtmlHelp2/RequiredLibraries/stdole.dll | Bin 15872 -> 0 bytes src/Setup/Files.wxs | 10 +- 56 files changed, 512 insertions(+), 6563 deletions(-) delete mode 100644 src/AddIns/Misc/HtmlHelp2/HtmlHelp2.sln delete mode 100644 src/AddIns/Misc/HtmlHelp2/JScriptGlobals/AssemblyInfo.vb delete mode 100644 src/AddIns/Misc/HtmlHelp2/JScriptGlobals/Globals.vb delete mode 100644 src/AddIns/Misc/HtmlHelp2/JScriptGlobals/HtmlHelp2JScriptGlobals.vbproj delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Configuration/AssemblyInfo.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj.user delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/ClosedBook.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.Delete.bmp delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.MoveDown.bmp delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.MoveUp.bmp delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.Rename.bmp delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.AddToFavorites.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Index.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Print.bmp delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Search.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.TextZoom.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Toc.png delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2Options.xfrm delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/OpenBook.png delete mode 100755 src/AddIns/Misc/HtmlHelp2/Project/Resources/buildwin32resource.bat delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/context.html delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.rc delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.res delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/DynamicHelpPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/FavoritesPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexResultsPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchResultsPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/HelpBrowserCommands.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/ShowHelpBrowser.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/BrowserScheme.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Commands/ShowErrorHelpCommand.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/MsHelpProvider.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/AxMSHelpControls.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2ControlsValidation.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2RegistryWalker.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Dialog.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Options.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Service.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/ResourcesHelper.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/Project/src/Service/SharpDevLanguageClass.cs delete mode 100644 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/AxMSHelpControls.cs delete mode 100755 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpControls.dll delete mode 100755 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpServices.dll delete mode 100755 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/import.bat delete mode 100644 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/import.txt delete mode 100755 src/AddIns/Misc/HtmlHelp2/RequiredLibraries/stdole.dll diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln index 06bfbd04bb..cff182dfe0 100644 --- a/SharpDevelop.Tests.sln +++ b/SharpDevelop.Tests.sln @@ -1,69 +1,69 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5676 +# SharpDevelop 4.0.0.5826 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -72,50 +72,50 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{ ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" - ProjectSection(SolutionItems) = postProject - EndProjectSection +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -124,226 +124,218 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278 ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Analysis\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Tests", "src\AddIns\Analysis\Profiler\Tests\Profiler.Tests\Profiler.Tests.csproj", "{068F9531-5D29-49E0-980E-59982A3A0469}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Analysis\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding.Tests", "src\AddIns\BackendBindings\CSharpBinding\Tests\CSharpBinding.Tests.csproj", "{52006F3F-3156-45DE-89D8-C4813694FBA4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Debugger\Debugger.Tests\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring.Tests", "src\AddIns\Misc\SharpRefactoring\Test\SharpRefactoring.Tests.csproj", "{A4AA51DE-A096-47EC-AA5D-D91457834ECF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "src\AddIns\Misc\HtmlHelp2\JScriptGlobals\HtmlHelp2JScriptGlobals.vbproj", "{E54A5AD2-418D-4A85-BA5E-CD803DE38715}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -353,216 +345,216 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddI {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring.Tests", "src\AddIns\Misc\SharpRefactoring\Test\SharpRefactoring.Tests.csproj", "{A4AA51DE-A096-47EC-AA5D-D91457834ECF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Debugger\Debugger.Tests\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding.Tests", "src\AddIns\BackendBindings\CSharpBinding\Tests\CSharpBinding.Tests.csproj", "{52006F3F-3156-45DE-89D8-C4813694FBA4}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Analysis\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Tests", "src\AddIns\Analysis\Profiler\Tests\Profiler.Tests\Profiler.Tests.csproj", "{068F9531-5D29-49E0-980E-59982A3A0469}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Analysis\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "src\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}" @@ -701,14 +693,6 @@ Global {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Any CPU.Build.0 = Release|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.Build.0 = Release|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Release|Any CPU.Build.0 = Release|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1025,126 +1009,137 @@ Global {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|Win32.ActiveCfg = Release|x86 {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|x86.Build.0 = Release|x86 {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|x86.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Win32.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Win32.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|x86.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|x86.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Win32.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Win32.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.ActiveCfg = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {B5F54272-49F0-40DB-845A-8D837875D3BA} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} - {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} + {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} - {F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} + {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} {C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94} - {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94} - {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} - {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} - {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} - {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} - {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} - {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} - {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94} - {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} - {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} - {C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789} + {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} + {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} + {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} + {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789} + {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} {66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789} - {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} - {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} - {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} - {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} - {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789} + {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} + {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} + {52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94} + {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} + {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} + {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} + {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} + {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} + {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} + {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94} + {388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94} + {E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960} EndGlobalSection EndGlobal diff --git a/SharpDevelop.sln b/SharpDevelop.sln index d08fab6e18..bd2e7279a7 100644 --- a/SharpDevelop.sln +++ b/SharpDevelop.sln @@ -1,59 +1,59 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5779 +# SharpDevelop 4.0.0.5826 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -62,40 +62,40 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{ ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -104,362 +104,354 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278 ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "src\AddIns\Misc\HtmlHelp2\Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HtmlHelp2JScriptGlobals", "src\AddIns\Misc\HtmlHelp2\JScriptGlobals\HtmlHelp2JScriptGlobals.vbproj", "{E54A5AD2-418D-4A85-BA5E-CD803DE38715}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddIns\Misc\ResourceToolkit\Project\ResourceToolkit.csproj", "{461606BD-E824-4D0A-8CBA-01810B1F5E02}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "src\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}" @@ -598,14 +590,6 @@ Global {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Any CPU.ActiveCfg = Release|Any CPU {D022A6CE-7438-41E8-AC64-F2DE18EC54C6}.Release|Any CPU.Build.0 = Release|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.Build.0 = Release|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E54A5AD2-418D-4A85-BA5E-CD803DE38715}.Release|Any CPU.Build.0 = Release|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Debug|Any CPU.Build.0 = Debug|Any CPU {5EEB99CF-EA2B-4733-80A6-CE9192D68170}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -830,105 +814,116 @@ Global {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|Win32.ActiveCfg = Release|x86 {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|x86.Build.0 = Release|x86 {B5F54272-49F0-40DB-845A-8D837875D3BA}.Release|x86.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Any CPU.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Win32.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|Win32.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|x86.Build.0 = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Debug|x86.ActiveCfg = Debug|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Any CPU.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Win32.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Win32.ActiveCfg = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.Build.0 = Release|x86 + {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.ActiveCfg = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {B5F54272-49F0-40DB-845A-8D837875D3BA} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} + {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} - {F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} {C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} - {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} - {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} - {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} - {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} - {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} - {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} - {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} - {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {E54A5AD2-418D-4A85-BA5E-CD803DE38715} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {918487B7-2153-4618-BBB3-344DBDDF2A2A} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} + {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} + {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} + {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} + {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} {66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} - {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} - {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} - {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} + {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} + {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} + {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} + {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} + {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} + {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} + {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} + {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} + {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} EndGlobalSection EndGlobal diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index 7f715f7c0d..6e615fb4b8 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -1,7 +1,8 @@ - + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index b168f5e917..e9c059e1b0 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -38,18 +38,6 @@ TRACE - - ..\..\..\..\bin\ICSharpCode.Core.dll - False - - - ..\..\..\..\bin\ICSharpCode.Core.Presentation.dll - False - - - ..\..\..\..\bin\ICSharpCode.SharpDevelop.dll - False - @@ -102,5 +90,22 @@ + + + {2748AD25-9C63-4E12-877B-4DCE96FBED54} + ICSharpCode.SharpDevelop + False + + + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + ICSharpCode.Core + False + + + {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} + ICSharpCode.Core.Presentation + False + + \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/HtmlHelp2.sln b/src/AddIns/Misc/HtmlHelp2/HtmlHelp2.sln deleted file mode 100644 index f4c9f6faf7..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/HtmlHelp2.sln +++ /dev/null @@ -1,16 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# SharpDevelop 2.0.0.658 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlHelp2", "Project\HtmlHelp2.csproj", "{918487B7-2153-4618-BBB3-344DBDDF2A2A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.Build.0 = Release|Any CPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/AssemblyInfo.vb b/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/AssemblyInfo.vb deleted file mode 100644 index 7b28cfe7b5..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/AssemblyInfo.vb +++ /dev/null @@ -1,26 +0,0 @@ -Imports System.Reflection -Imports System.Runtime.CompilerServices - -' Information about this assembly is defined by the following -' attributes. -' -' Change them to the information which is associated with the assembly -' you compile. - - - - - - - - - - -' The assembly version has following format : -' -' Major.Minor.Build.Revision -' -' You can specify all values by your own or you can build default build and revision -' numbers with the '*' character (the default): - - diff --git a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/Globals.vb b/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/Globals.vb deleted file mode 100644 index a859e98e77..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/Globals.vb +++ /dev/null @@ -1,65 +0,0 @@ -' -' -' -' -' $Revision$ -' - -Imports System.Runtime.InteropServices - - _ -Public Class JScriptExternal - Dim jScriptGlobals As New JScriptGlobals - - Public ReadOnly Property Globals() As JScriptGlobals - Get - Return jScriptGlobals - End Get - End Property -End Class - - _ -Public Class JScriptGlobals - Dim variableValueCol As New Dictionary(Of String, String) - Dim variablePersistCol As New Dictionary(Of String, Boolean) - - Public Property VariableValueCollection() As Dictionary(Of String, String) - Get - Return variableValueCol - End Get - Set - variableValueCol = value - End Set - End Property - - Public Property VariablePersistCollection() As Dictionary(Of String, Boolean) - Get - Return variablePersistCol - End Get - Set - variablePersistCol = value - End Set - End Property - - Public Function VariableExists(ByVal key As String) As Boolean - Return variableValueCol.ContainsKey(key) - End Function - - Public Default Property VariableValue(ByVal key As String) As Object - Get - Return variableValueCol(key) - End Get - Set - variableValueCol(key) = value - End Set - End Property - - Public Property VariablePersists(ByVal key As String) As Boolean - Get - Return variablePersistCol(key) - End Get - Set - variablePersistCol(key) = value - End Set - End Property -End Class diff --git a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/HtmlHelp2JScriptGlobals.vbproj b/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/HtmlHelp2JScriptGlobals.vbproj deleted file mode 100644 index 8ceb27523b..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/JScriptGlobals/HtmlHelp2JScriptGlobals.vbproj +++ /dev/null @@ -1,53 +0,0 @@ - - - Library - HtmlHelp2.JScriptGlobals - HtmlHelp2JScriptGlobals - Debug - AnyCPU - Windows - {E54A5AD2-418D-4A85-BA5E-CD803DE38715} - False - On - Off - Binary - False - Auto - 120586240 - AnyCPU - 4 - false - - - bin\Debug\ - False - DEBUG,TRACE - true - Full - - - bin\Release\ - True - TRACE - False - None - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Configuration/AssemblyInfo.cs b/src/AddIns/Misc/HtmlHelp2/Project/Configuration/AssemblyInfo.cs deleted file mode 100644 index a9ccc131af..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/Configuration/AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System.Reflection; -using System.Security.Permissions; - -// Information about this assembly is defined by the following -// attributes. -// -// change them to the information which is associated with the assembly -// you compile. - -[assembly: AssemblyTitle("Microsoft Help 2.0 Environment")] -[assembly: AssemblyDescription("Integrates Microsoft Help 2.0 in SharpDevelop")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: System.CLSCompliant(false)] diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin deleted file mode 100644 index 9901a37ff7..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj deleted file mode 100644 index b721292863..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj +++ /dev/null @@ -1,143 +0,0 @@ - - - - Library - HtmlHelp2 - HtmlHelp2 - Debug - AnyCPU - {918487B7-2153-4618-BBB3-344DBDDF2A2A} - 8.0.50215 - 2.0 - Resources\dynamichelp.res - False - False - False - False - Auto - 119537664 - AnyCPU - 4096 - 4 - false - v4.0 - C:\SharpDevelop Projects\0\SharpDevelop 3\src\AddIns\Misc\HtmlHelp2\Project\Settings.SourceAnalysis - - - ..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\ - DEBUG;TRACE - False - - - ..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\ - true - TRACE - - - Full - true - - - None - false - - - - - - - - ..\RequiredLibraries\stdole.dll - False - - - ..\RequiredLibraries\MSHelpControls.dll - False - - - ..\RequiredLibraries\MSHelpServices.dll - False - - - - - - UserControl - - - UserControl - - - - UserControl - - - - - UserControl - - - - Always - - - - - Form - - - - - - Component - - - - - - - - - - - - - - - - - - - - Configuration\GlobalAssemblyInfo.cs - - - - - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} - NRefactory - False - - - {2748AD25-9C63-4E12-877B-4DCE96FBED54} - ICSharpCode.SharpDevelop - False - - - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - ICSharpCode.Core - False - - - {E54A5AD2-418D-4A85-BA5E-CD803DE38715} - HtmlHelp2JScriptGlobals - - - {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} - ICSharpCode.SharpDevelop.Dom - False - - - - - \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj.user b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj.user deleted file mode 100644 index 6481ba3dcb..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj.user +++ /dev/null @@ -1,5 +0,0 @@ - - - 8.0.50215 - - \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/ClosedBook.png b/src/AddIns/Misc/HtmlHelp2/Project/Resources/ClosedBook.png deleted file mode 100644 index 2bc28f6a8578b4e9968ca78385219ba74b3ab9d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF43iG@FAuM}+8t_on(b<(g+}3llZ^6;;mz#_7VBj&y<04` pAf{GAVXe`IUC}wBU0?qm%HRw!|aj`b%;kZDD4&A8W~{)LvqcW)!4S;LJaaaHlIISSd{d*FKyoB Hg?PpdAmLN# diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.MoveDown.bmp b/src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.MoveDown.bmp deleted file mode 100644 index 08996c68382736701b94448e0a2b690f270b541f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmZ?r{l)+RWk5;;hy|dSk%0v)(Eui~5kMJ`WJ3dl0+K)`5H~O!IB)ITNBC(*k4>0NzPf AlK=n! diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.Rename.bmp b/src/AddIns/Misc/HtmlHelp2/Project/Resources/Favorites.16x16.Rename.bmp deleted file mode 100644 index 20380c1a3faf5865a4edf03ff5a253de7ae02f85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 246 zcmZvVu@S%^35mg4pKA~@eyVc$4xFv)bE!1-N}c!*kPY%EWwG#4>6zO1=Gz? AZU6uP diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.AddToFavorites.png b/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.AddToFavorites.png deleted file mode 100644 index 4acd3ad02ba3d1647d4e10de996b6954d1cf6a44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 824 zcmV-81IPS{P)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;u1Q2eRCwBA`2YVu!}s0m&wqIR{yd2N?AiPCk58Wm zvoFnO`2X|kdjSv|7X}C*hVLi#pZ{;n@c(zX!TIO6?w|h|W^n$my}sUo#D9=CKE1iGfXe`Y0AhOn{KNTQ;fCj#zI-tFC9ZIR`RfORuhAAa7(n2|HU=pf zc82FS4>&O30005R`0(V3S2ATDqA%^;8Scy9W{`WJ%D{i^CIj!HX$%ZEY#11LH5qp8 zmOQ}2@eaihUir8Uy3YB500G2!W|{qcV+ThC20m>D25vGR^;Q9-TKpR}Tz@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;Wl2OqRCwBA{Qv(y10?_;fLLIRDO0BW|NZ+n!=FEY z7+{7nGBPlLn2aC>5PbXg9n3s+>J-D4EnC21009IyfSa3(Au%xtiyi+!S{Y8Byvnd+ z#}1&`jEu;R1_&S~7z1QGCin@&?}7L&!{5Ju8S3lnL4qiL1_&Uy3x59mi6jhC^A(7{ zK=C_<#>OU~SC|->m>5A`0x1Cd3m|~t25@q6LRo)-3YdWkc^E`Rd4OJHV7PNgWF?{~=o#FSd&kP?weqj(0_yG3K z|Nno1-u(kN03d*nyzm1^egNCT%d5P{^0Xnf782VorBqc!_A27(ty#=Pc z2C(LT|Nf!403d+i27r<<1H%g-ehmzyaE4Ex-ZQ*@`Vz-feui5Vp^0t66>0Vhr*Gk_A=@83Uw{`}1F zMf*Sx3U;sYA2u8326A=Ia002ovPDHLkV1g0qFPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!ElET{R5(wylmAarQ5eSkr&z76R$FZvYGt;toDmIIQZ$TdLCG|- zDK*K$t*9xK8`PjL=#ZFMEN^znB`H(HO&}*ogb1h*U!Ly0RAj)`);in!%X`oBeBS$< zbIQv8$8vdsFus~8S%%SRl;qOlG184cSMpmL-sM$1F;Ae1D=BTDw|vBAB84yEC~Wpw zrk+_z=u8CcGd|P{J8|?(dvSwzjzthti(B9{c`cTJb0GkOg+%3vOE6i9LW58w4z+<`7^@`P|tXJ!6f z)-#9)hH+G#l;#Ya^FH)yN1!o%z+Jr!4_~}Tuf~G*TY88()ZjKNaDdueQQv}NXRkro zKLoK{jr|Q5a|SmDULqP#6r@f!Qt1pfs6goqg5eD;t;8Vh)}XPqhnnEWNyz(*Fuk6_ zQ>z^s;~4H}hta8e3`uuCgl#JDE-1ih>cBys6y?XoI7jvB1Xr=UR+yWhO{ptNr<>9B zB)tALOwI-I))BxEu>`KD3zZG6U{##T8Aue53Jjulo!(zh~@X; zrUdlIzo}oN|NaFT?U)FW#!ay?d3FM&yn-kc}RdA)u*wI&1a}Z#sB)6zXJi- VFG*fjUmpMf002ovPDHLkV1gWME)4(x diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Search.png b/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.Search.png deleted file mode 100644 index e2d421efe2c885715a1611ff467b57dfba7e0013..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 714 zcmV;*0yX`KP)z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;KuJVFRCwBA{Qv(y10?_;fLL%z0F7nbd-Q(Gr91Bu zzWn?v!N|nKz|YC{LS2?;m7ASX5hGX$0|P(+F=BH8Nb|yVSC0K*VzyAx6ldU-o{`>txW{i;$$Pj=4V!~$o-XjnDelW9Gqy%U(=qm~_{9#~ac>0!= zflW||!Ny;c;VUbr!G`VEW`NWJ1Q1pOZan!ECa)pJaOX1v!|4|c3}62-Fi40qF!1v; zF#HBOPf1st;pX$NVIZ{t0faRS-hcij#V5|o@bD`G1BVa;0}l@a13T0cg&4M6kWehH}fu# zT7Uq;41-(C8x(|5N06S*E?~!l@*#H0l07*qoM6N<$f-~PJf&c&j diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.TextZoom.png b/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2.16x16.TextZoom.png deleted file mode 100644 index 098c6fedf43b05b24b458414e542917ca239d33c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF8d@ zBeIx*f$IYZGdis?nE@1JNq6*hWMJ6X&;2Kn705RT@Ck8c_y=S$F#P`yrU(z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;xJg7oRCwBA`2YVu12LFGU7eFnTAB%693X&L4jw+p zz{tqRzyL%HOhAf>k-^s7mH`B67;FDSBp4Z(_?Tmu#rZdJYH0lV_vOpa1KZd9+o89e z0U&@FK?Xq801aRS8o7Nzl@xf$i_K!q{pA0`3z60SohVx)U`}kJJFp4v5`pfhe zY!E;IF&;c}5U$zI!j^$YQa399h5u4_26v!VkoMm|?ccxz6P6mc~jEleq6#UNt%Yfuy03d*vY%LMahH3r-#vlWJGN@H7 zW4PB52iNc$2>&ts2eZ4h=RE=lAQq730-$Cupk@#NIU8j2FR=FC4DtV?Ac`6Lz+v(i zNP@sAAOrz`0Aec0^k2#VjfB5&r-R@xhU*>S4AU5AG4wJ{1dIL!Vi52=>j8HWKmdWm z00g%I;a{*4h~qDHhA_00Gl1Rl2WlY5dmd*z82$FO7Dc7{`Rrx*^Z-dPP0Kr9gLj10AmbwER! zz`R<01LS9*y6xL`fNh3p{?E*K93X(e27qD$q|o+-%uOI@BM540Ro5x z7Kq2s9A~h5A-inb|7~!C7@!9I2WHBHs<%-zA6Pu||DnT&7ytqc0KupF M07*qoM6N<$f&qwRjsO4v diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2Options.xfrm b/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2Options.xfrm deleted file mode 100644 index bb2fd530ff..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/Resources/HtmlHelp2Options.xfrm +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/OpenBook.png b/src/AddIns/Misc/HtmlHelp2/Project/Resources/OpenBook.png deleted file mode 100644 index 9eacadfe4cdf2848b8d3fee1d5fc1bdaecfc4581..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFfF}q`D+fI!J9wFXhMnj2~ kDGdxq5=2;-7-vXJF!&r1k~^WYvmWFUPgg&ebxsLQ03)1G$^ZZW diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/buildwin32resource.bat b/src/AddIns/Misc/HtmlHelp2/Project/Resources/buildwin32resource.bat deleted file mode 100755 index c938f6e626..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/Resources/buildwin32resource.bat +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -setlocal -set RC="K:\Programme\Microsoft.NET\SDK\v2.0\Bin\rc.exe" - -if not exist %RC% goto ExitJump -if exist dynamichelp.res del dynamichelp.res -%RC% /fo "dynamichelp.res" "dynamichelp.rc" - -set RC= -:ExitJump \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/context.html b/src/AddIns/Misc/HtmlHelp2/Project/Resources/context.html deleted file mode 100644 index 2a5023c672..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/Resources/context.html +++ /dev/null @@ -1,48 +0,0 @@ - - -Dynamic Help - - - - - \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.rc b/src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.rc deleted file mode 100644 index a700ca66a4..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.rc +++ /dev/null @@ -1,10 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// -// HTML RESOURCES -// - -#define RT_HTML 23 - -context RT_HTML "context.html" -open RT_HTML "OpenBook.png" -close RT_HTML "ClosedBook.png" \ No newline at end of file diff --git a/src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.res b/src/AddIns/Misc/HtmlHelp2/Project/Resources/dynamichelp.res deleted file mode 100644 index 95b3a046e51503f14e0fbfb7059b9128c3fad89e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1588 zcmbVMQEU`d6n)#SgvOb0%O$m|vjNwe znYZn332{V%2qq-Nm?r)}Nc2kr@rT0Ceh{M=NK7aJj7Iq|{7B-5i811O-^^~^iW>DL zcjnEx@7{an+}wu{LK0Y`;TvpME!v6Dc0d}9r_m_di?S$((r6z%{WX9>!B#+`#LILj z5>Au|*2S9}oRXnb&BSFxlg0?O5-}eG=TvV0czP(&ud0!7BplUvHP7^#bSM%Iu{mNF zD4SPnaS2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cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/DynamicHelpPad.cs deleted file mode 100644 index 397219246b..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/DynamicHelpPad.cs +++ /dev/null @@ -1,635 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.Drawing; - using System.Globalization; - using System.Reflection; - using System.Security.Permissions; - using System.Windows.Forms; - - using HtmlHelp2.Environment; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; - using ICSharpCode.SharpDevelop.Dom; - using ICSharpCode.SharpDevelop.Gui; - using ICSharpCode.SharpDevelop.Project; - using MSHelpServices; - using ICSharpCode.NRefactory; - using ICSharpCode.SharpDevelop.Editor; - - public class ShowDynamicHelpMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor dynamicHelp = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2DynamicHelpPad)); - if (dynamicHelp != null) dynamicHelp.BringPadToFront(); - } - } - - public class HtmlHelp2DynamicHelpPad : AbstractPadContent - { - HtmlHelp2DynamicHelpBrowserControl dynamicHelpBrowser; - private List dynamicHelpTerms = new List(); - private Location lastPoint = Location.Empty; - private string debugPreElement = String.Empty; - private bool enableDebugInfo = HtmlHelp2Environment.Config.DynamicHelpDebugInfos; - - public override object Control - { - get { return dynamicHelpBrowser; } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public HtmlHelp2DynamicHelpPad() - { - dynamicHelpBrowser = new HtmlHelp2DynamicHelpBrowserControl(); - dynamicHelpBrowser.LoadDynamicHelpPage(); - - ParserService.ParserUpdateStepFinished += UpdateTick; - PropertyPad.SelectedObjectChanged += new EventHandler(this.FormsDesignerSelectedObjectChanged); - PropertyPad.SelectedGridItemChanged += new SelectedGridItemChangedEventHandler(this.FormsDesignerSelectedGridItemChanged); - ProjectService.SolutionClosed += new EventHandler(this.SolutionClosed); - - HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); - ResourceService.LanguageChanged += delegate { dynamicHelpBrowser.RedrawContent(); }; - } - - #region Dynamic Help Calls - private void BuildDynamicHelpList() - { - try - { - dynamicHelpBrowser.RemoveAllChildren(); - this.debugPreElement = string.Empty; - bool helpResults = false; - Cursor.Current = Cursors.WaitCursor; - - foreach (string currentHelpTerm in this.dynamicHelpTerms) - { - if (!currentHelpTerm.StartsWith("!")) - { - helpResults = (this.CallDynamicHelp(currentHelpTerm, false) || helpResults); - } - } - foreach (string currentHelpTerm in this.dynamicHelpTerms) - { - if (currentHelpTerm.StartsWith("!")) - { - helpResults = (this.CallDynamicHelp(currentHelpTerm.Substring(1)) || helpResults); - } - } - - Cursor.Current = Cursors.Default; - - // debug info - if (this.enableDebugInfo) - { - this.debugPreElement += - string.Format(CultureInfo.InvariantCulture, "
Current project language: {0}", SharpDevLanguage.GetPatchedLanguage()); - dynamicHelpBrowser.CreateDebugPre(this.debugPreElement); - } - } - catch (System.Runtime.InteropServices.COMException ex) - { - LoggingService.Error("Help 2.0: Dynamic Help Call Exception; " + ex.ToString()); - } - } - - private bool CallDynamicHelp(string searchTerm) - { - return this.CallDynamicHelp(searchTerm, true); - } - - private bool CallDynamicHelp(string searchTerm, bool keywordSearch) - { - if (!HtmlHelp2Environment.SessionIsInitialized || HtmlHelp2Environment.DynamicHelpIsBusy) - { - return false; - } - - IHxTopicList topics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchTerm); - bool result = (topics != null && topics.Count > 0); - - if (result) - { - // debug info - this.debugPreElement += - string.Format(CultureInfo.InvariantCulture, - "{0} ({1}): {2} {3}
", searchTerm, (keywordSearch)?"Kwd":"DH", - topics.Count, (topics.Count==1)?"topic":"topics"); - - List newTopics = SortTopics(topics); - foreach (IHxTopic topic in newTopics) - { - if ((keywordSearch)?SharpDevLanguage.CheckUniqueTopicLanguage(topic):SharpDevLanguage.CheckTopicLanguage(topic)) - { - this.BuildNewChild(topic.Location, - topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, - HxTopicGetTitleDefVal.HxTopicGetTitleFileName), - topic.URL); - } - } - } - return result; - } - - private void BuildNewChild(string sectionName, string topicName, string topicUrl) - { - try { - dynamicHelpBrowser.BuildNewChild(sectionName, topicName, topicUrl); - } catch (NullReferenceException ex) { - // HACK: the code doesn't properly check for nulls, so we just ignore errors. - // There were bug reports with BuildNewChild crashing simply on a layout change. - // e.g. http://community.sharpdevelop.net/forums/t/9180.aspx - LoggingService.Warn(ex); - } - } - #endregion - - #region Taken from DefinitionView.cs - private void UpdateTick(object sender, ParserUpdateStepEventArgs e) - { - WorkbenchSingleton.SafeThreadAsyncCall(UpdateTick, e); - } - - void UpdateTick(ParserUpdateStepEventArgs e) - { - this.dynamicHelpTerms.Clear(); - ResolveResult res = ResolveAtCaret(e); - if (res == null) return; - - if (res != null && res.ResolvedType != null) - { - this.AddToStringCollection(res.ResolvedType.FullyQualifiedName); - } - - MemberResolveResult member = res as MemberResolveResult; - NamespaceResolveResult nspace = res as NamespaceResolveResult; - MethodGroupResolveResult method = res as MethodGroupResolveResult; - TypeResolveResult types = res as TypeResolveResult; - - if (member != null && member.ResolvedMember != null) - { - this.AddToStringCollection(0, member.ResolvedMember.FullyQualifiedName); - } - if (nspace != null) - { - this.AddToStringCollection(0, nspace.Name); - } - if (method != null && method.ContainingType != null) - { - this.AddToStringCollection(0, method.ContainingType.FullyQualifiedName); - } - if (types != null && types.ResolvedClass != null) - { - this.AddToStringCollection(0, types.ResolvedClass.FullyQualifiedName); - } - - BuildDynamicHelpList(); - } - - private ResolveResult ResolveAtCaret(ParserUpdateStepEventArgs e) - { - IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; - if (window == null) return null; - ITextEditorProvider provider = window.ActiveViewContent as ITextEditorProvider; - if (provider == null) return null; - ITextEditor editor = provider.TextEditor; - - // e might be null when this is a manually triggered update - FileName fileName = (e == null) ? editor.FileName : e.FileName; - if (editor.FileName != fileName) return null; - IExpressionFinder expressionFinder = ParserService.GetExpressionFinder(fileName); - if (expressionFinder == null) return null; - string content = (e == null) ? editor.Document.Text : e.Content.Text; - ExpressionResult expr = expressionFinder.FindFullExpression(content, editor.Caret.Offset); - if (expr.Expression == null) return null; - - // save the current position - if(this.lastPoint != null && this.lastPoint == editor.Caret.Position) return null; - this.lastPoint = editor.Caret.Position; - this.AddToStringCollection(string.Format(CultureInfo.InvariantCulture, "!{0}", expr.Expression)); - - return ParserService.Resolve(expr, editor.Caret.Line, editor.Caret.Column, fileName, content); - } - #endregion - - #region Dynamic Help for Forms Designer - private void FormsDesignerSelectedObjectChanged(object sender, EventArgs e) - { - this.CallDynamicHelpForFormsDesigner(PropertyPad.Grid.SelectedObject, - PropertyPad.Grid.SelectedGridItem); - } - - private void FormsDesignerSelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) - { - this.CallDynamicHelpForFormsDesigner(PropertyPad.Grid.SelectedObject, - e.NewSelection); - } - - private void CallDynamicHelpForFormsDesigner(object selectedObject, GridItem selectedItem) - { - if (selectedObject == null) return; - this.dynamicHelpTerms.Clear(); - - Type myObject = selectedObject.GetType(); - if (selectedItem != null && selectedItem.Label != null) { - foreach (Type type in TypeHandling.FindDeclaringType(myObject, selectedItem.Label)) { - this.AddToStringCollection(string.Format(CultureInfo.InvariantCulture, - "{0}.{1}", type.FullName, selectedItem.Label)); - } - } - this.AddToStringCollection(myObject.FullName); - - WorkbenchSingleton.SafeThreadAsyncCall(BuildDynamicHelpList); - } - #endregion - - private void SolutionClosed(object sender, EventArgs e) - { - dynamicHelpBrowser.RemoveAllChildren(); - } - - #region StringCollection & Sorting - private void AddToStringCollection(string searchTerm) - { - this.AddToStringCollection(-1, searchTerm); - } - - private void AddToStringCollection(int insertWhere, string searchTerm) - { - if (this.dynamicHelpTerms.IndexOf(searchTerm) == -1) - { - if (insertWhere == -1) - this.dynamicHelpTerms.Add(searchTerm); - else - this.dynamicHelpTerms.Insert(insertWhere, searchTerm); - } - } - - private static List SortTopics(IHxTopicList topics) - { - if (topics == null || topics.Count == 0) - { - return null; - } - - List result = new List(); - foreach (IHxTopic topic in topics) - { - if (!result.Contains(topic)) result.Add(topic); - } - TopicComparer topicComparer = new TopicComparer(); - result.Sort(topicComparer); - - return result; - } - - class TopicComparer : IComparer - { - public int Compare(IHxTopic x, IHxTopic y) - { - int result = CompareType("kbSyntax", x, y); - if(result == 0) result = CompareType("kbHowTo", x, y); - if(result == 0) result = CompareType("kbOrient", x, y); - if(result == 0) result = CompareType("kbArticle", x, y); - - return result; - } - - private static int CompareType(string topicType, IHxTopic x, IHxTopic y) - { - if(x.HasAttribute("TopicType", topicType) && !y.HasAttribute("TopicType", topicType)) - return -1; - else if(y.HasAttribute("TopicType", topicType) && !x.HasAttribute("TopicType", topicType)) - return 1; - else - return 0; - } - } - #endregion - - private void NamespaceReloaded(object sender, EventArgs e) - { - this.enableDebugInfo = HtmlHelp2Environment.Config.DynamicHelpDebugInfos; - } - } - - public class HtmlHelp2DynamicHelpBrowserControl : UserControl - { - WebBrowser axWebBrowser = new WebBrowser(); - ToolStrip dynamicHelpToolbar = new ToolStrip(); - int internalIndex; - string[] toolbarButtons = new string[] { - "${res:AddIns.HtmlHelp2.Contents}", - "${res:AddIns.HtmlHelp2.Index}", - "${res:AddIns.HtmlHelp2.Search}" - }; - - public void RedrawContent() - { - for (int i = 0; i < toolbarButtons.Length; i++) - { - dynamicHelpToolbar.Items[i].Text = StringParser.Parse(toolbarButtons[i]); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public HtmlHelp2DynamicHelpBrowserControl() - { - this.InitializeComponents(); - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - private void InitializeComponents() - { - Dock = DockStyle.Fill; - Size = new Size(500, 500); - - Controls.Add(axWebBrowser); - axWebBrowser.Dock = DockStyle.Fill; - axWebBrowser.WebBrowserShortcutsEnabled = false; - axWebBrowser.IsWebBrowserContextMenuEnabled = false; - axWebBrowser.AllowWebBrowserDrop = false; - axWebBrowser.DocumentCompleted += - new WebBrowserDocumentCompletedEventHandler(this.OnDocumentCompleted); - - Controls.Add(dynamicHelpToolbar); - dynamicHelpToolbar.Dock = DockStyle.Top; - dynamicHelpToolbar.AllowItemReorder = false; - dynamicHelpToolbar.ShowItemToolTips = false; - dynamicHelpToolbar.GripStyle = ToolStripGripStyle.Hidden; - for (int i = 0; i < toolbarButtons.Length; i++) - { - ToolStripButton button = new ToolStripButton(); - button.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - button.ImageIndex = i; - button.Click += new EventHandler(this.ToolStripButtonClicked); - - dynamicHelpToolbar.Items.Add(button); - } - - this.RedrawContent(); - - dynamicHelpToolbar.ImageList = new ImageList(); - dynamicHelpToolbar.ImageList.ColorDepth = ColorDepth.Depth32Bit; - dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Toc.png")); - dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Index.png")); - dynamicHelpToolbar.ImageList.Images.Add(ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Search.png")); - - if (HtmlHelp2Environment.SessionIsInitialized) - { - HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public void LoadDynamicHelpPage() - { - string url = string.Format(CultureInfo.InvariantCulture, "res://{0}/context", Assembly.GetExecutingAssembly().Location); - axWebBrowser.Navigate(url); - } - - private void OnDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) - { - this.RemoveAllChildren(); - } - - private void ToolStripButtonClicked(object sender, EventArgs e) - { - ToolStripItem item = (ToolStripItem)sender; - PadDescriptor pad = null; - - switch (item.ImageIndex) - { - case 0: - pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)); - break; - case 1: - pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexPad)); - break; - case 2: - pad = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); - break; - } - - if(pad != null) pad.BringPadToFront(); - } - - #region Help 2.0 Environment Events - private void NamespaceReloaded(object sender, EventArgs e) - { - this.LoadDynamicHelpPage(); - } - #endregion - - #region WebBrowser Scripting - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public void BuildNewChild(string sectionName, string topicName, string topicLink) - { - HtmlElementCollection children = - axWebBrowser.Document.Body.GetElementsByTagName("span"); - foreach (HtmlElement child in children) - { - if (child.GetAttribute("className") == "section") - { - HtmlElement sectionBlock = child.FirstChild.NextSibling; - HtmlElement contentSpan = sectionBlock.NextSibling.NextSibling; - - if (sectionBlock.TagName == "B" && - sectionBlock.InnerText == sectionName && - contentSpan.TagName == "SPAN" && - contentSpan.GetAttribute("className") == "content") - { - if (!DoesLinkExist(contentSpan, topicName, topicLink)) - { - HtmlElement newLink = this.CreateNewLink(topicLink, topicName); - if (newLink != null) - { - contentSpan.AppendChild(newLink); - contentSpan.AppendChild(this.CreateABreak()); - } - } - - return; - } - } - } - - if (children.Count > 0) - { - axWebBrowser.Document.Body.InsertAdjacentElement - (HtmlElementInsertionOrientation.BeforeEnd, this.CreateABreak()); - } - - HtmlElement linkContent = null; - HtmlElement htmlSection = this.CreateNewSection(sectionName, out linkContent); - if (htmlSection != null) - { - axWebBrowser.Document.Body.InsertAdjacentElement - (HtmlElementInsertionOrientation.BeforeEnd, htmlSection); - - HtmlElement newLink = this.CreateNewLink(topicLink, topicName); - if (newLink != null) - { - linkContent.AppendChild(newLink); - linkContent.AppendChild(this.CreateABreak()); - } - - this.internalIndex++; - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - private HtmlElement CreateNewSection(string sectionName, out HtmlElement linkNode) - { - HtmlElement span = axWebBrowser.Document.CreateElement("span"); - span.SetAttribute("className", "section"); - span.InnerHtml = string.Format - (CultureInfo.InvariantCulture, - "" + - "{1}
", - this.internalIndex, sectionName); - - linkNode = axWebBrowser.Document.CreateElement("span"); - linkNode.SetAttribute("className", "content"); - linkNode.Id = string.Format(CultureInfo.InvariantCulture, "content_{0}", this.internalIndex); - span.AppendChild(linkNode); - - return span; - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - private HtmlElement CreateNewLink(string topicUrl, string topicName) - { - HtmlElement span = axWebBrowser.Document.CreateElement("a"); - span.InnerText = topicName; - span.SetAttribute("src", topicUrl); - span.SetAttribute("className", "link"); - span.SetAttribute("title", topicName); - span.Click += new HtmlElementEventHandler(OnLinkClick); - span.MouseOver += new HtmlElementEventHandler(OnMouseOver); - span.MouseLeave += new HtmlElementEventHandler(OnMouseOut); - - return span; - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - private HtmlElement CreateABreak() - { - HtmlElement br = axWebBrowser.Document.CreateElement("br"); - return br; - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - private static bool DoesLinkExist(HtmlElement parentNode, string topicName, string topicUrl) - { - HtmlElementCollection links = parentNode.GetElementsByTagName("a"); - foreach (HtmlElement link in links) - { - if (string.Compare(topicName, link.InnerText) == 0 && - string.Compare(topicUrl, link.GetAttribute("src")) == 0) - { - return true; - } - } - return false; - } - - private void OnMouseOver(object sender, HtmlElementEventArgs e) - { - HtmlElement link = sender as HtmlElement; - if (link != null) - { - StatusBarService.SetMessage(link.GetAttribute("src")); - } - } - - private void OnMouseOut(object sender, HtmlElementEventArgs e) - { - StatusBarService.SetMessage(string.Empty); - } - - private void OnLinkClick(object sender, HtmlElementEventArgs e) - { - HtmlElement link = sender as HtmlElement; - if (link != null) - { - string url = link.GetAttribute("src"); - if (!string.IsNullOrEmpty(url)) ShowHelpBrowser.OpenHelpView(url); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public void RemoveAllChildren() - { - try - { - this.internalIndex = 0; - var document = axWebBrowser != null ? axWebBrowser.Document : null; - var body = document != null ? document.Body : null; - if (body != null) - body.InnerHtml = string.Empty; - } - catch (System.NotSupportedException ex) - { - LoggingService.Error("Help 2.0: Clean-up Call Exception; " + ex.ToString()); - } - } - #endregion - - #region DebugInfo - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public void CreateDebugPre(string debugInformation) - { - if (!string.IsNullOrEmpty(debugInformation)) - { - axWebBrowser.Document.Body.InsertAdjacentElement - (HtmlElementInsertionOrientation.BeforeEnd, CreateABreak()); - axWebBrowser.Document.Body.InsertAdjacentElement - (HtmlElementInsertionOrientation.BeforeEnd, CreateABreak()); - - HtmlElement pre = axWebBrowser.Document.CreateElement("pre"); - pre.InnerHtml = "--- Dynamic Help Debug ---
" + debugInformation; - - axWebBrowser.Document.Body.InsertAdjacentElement - (HtmlElementInsertionOrientation.BeforeEnd, pre); - } - } - #endregion - } - - public static class TypeHandling - { - public static IEnumerable FindDeclaringType(Type type, string memberName) - { - MemberInfo[] memberInfos = type.GetMember(memberName); - List declaringTypes = new List(); - - foreach (MemberInfo memberInfo in memberInfos) - { - if (!declaringTypes.Contains(memberInfo.DeclaringType)) - declaringTypes.Add(memberInfo.DeclaringType); - } - - foreach (Type declaringType in declaringTypes) - { - yield return declaringType; - } - - #region TypeHandling Class by Robert_G - // QUOTE: "Aber das ist ja wohl eher ein no-Brainer... ;-) - #endregion - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/FavoritesPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/FavoritesPad.cs deleted file mode 100644 index 2793dd2dfd..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/FavoritesPad.cs +++ /dev/null @@ -1,319 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Drawing; - using System.Windows.Forms; - using System.Xml; - - using HtmlHelp2.Environment; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - - public class ShowFavoritesMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor favorites = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2FavoritesPad)); - if (favorites != null) favorites.BringPadToFront(); - } - } - - public class HtmlHelp2FavoritesPad : AbstractPadContent - { - const string help2FavoritesFile = "help2favorites.xml"; - string[] toolbarButtons = new string[] { - "${res:AddIns.HtmlHelp2.MoveUp}", - "${res:AddIns.HtmlHelp2.MoveDown}", - "${res:AddIns.HtmlHelp2.Rename}", - "${res:AddIns.HtmlHelp2.Delete}" - }; - - bool Help2EnvIsReady = false; - Panel mainPanel = new Panel(); - TreeView tv = new TreeView(); - ToolStrip toolStrip = new ToolStrip(); - - public override Control Control - { - get { return mainPanel; } - } - - public override void RedrawContent() - { - for (int i = 0; i < toolbarButtons.Length; i++) - { - toolStrip.Items[i].ToolTipText = StringParser.Parse(toolbarButtons[i]); - } - } - - public HtmlHelp2FavoritesPad() - { - this.InitializeComponents(); - } - - private void InitializeComponents() - { - Help2EnvIsReady = HtmlHelp2Environment.IsReady; - - mainPanel.Controls.Add(tv); - tv.Dock = DockStyle.Fill; - tv.Enabled = Help2EnvIsReady; - tv.ShowLines = false; - tv.ShowRootLines = false; - tv.LabelEdit = true; - tv.HideSelection = false; - tv.AfterSelect += new TreeViewEventHandler(this.TreeNodeAfterSelect); - tv.BeforeLabelEdit += new NodeLabelEditEventHandler(this.BeforeLabelEdit); - tv.AfterLabelEdit += new NodeLabelEditEventHandler(this.AfterLabelEdit); - tv.KeyDown += new KeyEventHandler(this.TreeViewKeyDown); - tv.DoubleClick += new EventHandler(this.TreeNodeDoubleClick); - - mainPanel.Controls.Add(toolStrip); - toolStrip.Dock = DockStyle.Top; - toolStrip.Enabled = Help2EnvIsReady; - toolStrip.AllowItemReorder = false; - for (int i = 0; i < toolbarButtons.Length; i++) - { - ToolStripButton button = new ToolStripButton(); - button.ToolTipText = StringParser.Parse(toolbarButtons[i]); - button.ImageIndex = i; - button.Enabled = false; - button.Click += new EventHandler(this.ToolStripButtonClicked); - - toolStrip.Items.Add(button); - } - - toolStrip.ImageList = new ImageList(); - toolStrip.ImageList.ColorDepth = ColorDepth.Depth4Bit; - toolStrip.ImageList.TransparentColor = Color.Red; - toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.MoveUp.bmp")); - toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.MoveDown.bmp")); - toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.Rename.bmp")); - toolStrip.ImageList.Images.Add(ResourcesHelper.GetBitmap("Favorites.16x16.Delete.bmp")); - - if (Help2EnvIsReady) this.LoadFavorites(); - } - - #region TreeView - private void TreeNodeAfterSelect(object sender, TreeViewEventArgs e) - { - TreeNode tn = tv.SelectedNode; - - toolStrip.Items[0].Enabled = (tn != null && tn.PrevNode != null); - toolStrip.Items[1].Enabled = (tn != null && tn.NextNode != null); - toolStrip.Items[2].Enabled = (tn != null); - toolStrip.Items[3].Enabled = (tn != null); - } - - private void BeforeLabelEdit(object sender, NodeLabelEditEventArgs e) - { - e.CancelEdit = (e.Node == null); - } - - private void AfterLabelEdit(object Sender, NodeLabelEditEventArgs e) - { - if (e.Label != null && e.Label.Length > 0) - { - if (e.Node.Tag != null && e.Node.Tag is string && (string)e.Node.Tag != "") - { - this.PatchFavoriteName(e.Label.ToString(), (string)e.Node.Tag); - } - } - } - - private void TreeViewKeyDown(object sender, KeyEventArgs e) - { - if (tv.SelectedNode != null) - { - switch (e.KeyCode) - { - case Keys.F2: - tv.SelectedNode.BeginEdit(); - break; - case Keys.Delete: - tv.Nodes.Remove(tv.SelectedNode); - this.SaveFavorites(); - break; - } - } - } - - private void TreeNodeDoubleClick(object sender, EventArgs e) - { - TreeNode tn = tv.SelectedNode; - - if (tn != null && tn.Tag != null && tn.Tag is string && (string)tn.Tag != "") - { - ShowHelpBrowser.OpenHelpView((string)tn.Tag); - } - } - #endregion - - #region ToolStrip - private void ToolStripButtonClicked(object sender, EventArgs e) - { - if (tv.SelectedNode == null) return; - - ToolStripItem item = (ToolStripItem)sender; - TreeNode tempNode = null; - - switch (item.ImageIndex) - { - case 0: - tempNode = (TreeNode)tv.SelectedNode.Clone(); - tv.Nodes.Insert(tv.SelectedNode.PrevNode.Index, tempNode); - tv.Nodes.Remove(tv.SelectedNode); - tv.SelectedNode = tempNode; - this.SaveFavorites(); - break; - case 1: - tempNode = (TreeNode)tv.SelectedNode.Clone(); - TreeNode nextNextNode = tv.SelectedNode.NextNode.NextNode; - if (nextNextNode == null) - tv.Nodes.Add(tempNode); - else - tv.Nodes.Insert(nextNextNode.Index, tempNode); - tv.Nodes.Remove(tv.SelectedNode); - tv.SelectedNode = tempNode; - this.SaveFavorites(); - break; - case 2: - tv.SelectedNode.BeginEdit(); - break; - case 3: - string text = StringParser.Parse("${res:AddIns.HtmlHelp2.RemoveFavorite}", new string[,] {{"0", tv.SelectedNode.Text}}); - DialogResult result = MessageBox.Show(text, - StringParser.Parse("${res:MainWindow.Windows.HelpScoutLabel}"), - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result == DialogResult.Yes) - { - tv.Nodes.Remove(tv.SelectedNode); - this.SaveFavorites(); - } - break; - } - - this.TreeNodeAfterSelect(null, null); - } - #endregion - - #region Favorites - private void LoadFavorites() - { - tv.Nodes.Clear(); - tv.BeginUpdate(); - - try - { - XmlDocument xmldoc = new XmlDocument(); - xmldoc.Load(PropertyService.ConfigDirectory + help2FavoritesFile); - - XmlNodeList nl = xmldoc.SelectNodes("favorites/favorite"); - for (int i = 0; i < nl.Count; i++) - { - XmlNode title = nl.Item(i).SelectSingleNode("title"); - XmlNode url = nl.Item(i).SelectSingleNode("url"); - - if (title != null && url != null && title.InnerText != "" && url.InnerText != "") - { - TreeNode node = new TreeNode(); - node.Text = title.InnerText; - node.Tag = url.InnerText; - tv.Nodes.Add(node); - } - } - } - catch {} - - tv.EndUpdate(); - } - - private void SaveFavorites() - { - try - { - XmlDocument xmldoc = new XmlDocument(); - xmldoc.LoadXml(""); - - foreach (TreeNode node in tv.Nodes) - { - if (node.Text != "" && node.Tag != null && node.Tag is string && (string)node.Tag != "") - { - XmlNode favorite = xmldoc.CreateElement("favorite"); - - XmlNode title = xmldoc.CreateElement("title"); - title.InnerText = node.Text; - favorite.AppendChild(title); - - XmlCDataSection cdata = xmldoc.CreateCDataSection((string)node.Tag); - XmlNode url = xmldoc.CreateElement("url"); - url.AppendChild(cdata); - favorite.AppendChild(url); - xmldoc.DocumentElement.AppendChild(favorite); - } - } - - xmldoc.Save(PropertyService.ConfigDirectory + help2FavoritesFile); - } - catch {} - } - - private void PatchFavoriteName(string newName, string topicUrl) - { - try - { - XmlDocument xmldoc = new XmlDocument(); - xmldoc.Load(PropertyService.ConfigDirectory + help2FavoritesFile); - - XmlNode node = xmldoc.SelectSingleNode(String.Format("/favorites/favorite[url=\"{0}\"]/title", topicUrl)); - - if (node != null) - { - node.InnerText = newName; - xmldoc.Save(PropertyService.ConfigDirectory + help2FavoritesFile); - } - } - catch {} - } - - public void AddToFavorites(string topicName, string topicUrl) - { - if (Help2EnvIsReady && topicName != "" && topicUrl != "") - { - bool urlFound = false; - - foreach (TreeNode node in tv.Nodes) - { - if (node.Tag != null && - node.Tag is string && - String.Compare(topicUrl, (string)node.Tag) == 0) - { - urlFound = true; - break; - } - } - - if (!urlFound) - { - TreeNode node = new TreeNode(); - node.Text = topicName; - node.Tag = topicUrl; - - tv.Nodes.Add(node); - this.SaveFavorites(); - } - } - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexPad.cs deleted file mode 100644 index e5c2eeefb2..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexPad.cs +++ /dev/null @@ -1,345 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Drawing; - using System.Security.Permissions; - using System.Windows.Forms; - - using AxMSHelpControls; - using HtmlHelp2.Environment; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - using MSHelpControls; - using MSHelpServices; - - public class ShowIndexMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor index = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexPad)); - if (index != null) index.BringPadToFront(); - } - } - - public class HtmlHelp2IndexPad : AbstractPadContent - { - MSHelp2IndexControl help2IndexControl; - - public override object Control - { - get { return help2IndexControl; } - } - - public override void Dispose() - { - help2IndexControl.Dispose(); - } - - public HtmlHelp2IndexPad() - { - help2IndexControl = new MSHelp2IndexControl(); - ResourceService.LanguageChanged += delegate { help2IndexControl.RedrawContent(); }; - } - } - - public class MSHelp2IndexControl : UserControl - { - AxHxIndexCtrl indexControl; - ComboBox filterCombobox = new ComboBox(); - ComboBox searchTerm = new ComboBox(); - Label label1 = new Label(); - Label label2 = new Label(); - Label infoLabel = new Label(); - bool indexControlFailed; - bool itemClicked; - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing && indexControl != null) - { - indexControl.Dispose(); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public MSHelp2IndexControl() - { - this.InitializeComponents(); - this.UpdateControls(); - - HtmlHelp2Environment.FilterQueryChanged += new EventHandler(this.FilterQueryChanged); - HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); - } - - private void UpdateControls() - { - filterCombobox.Enabled = - (HtmlHelp2Environment.SessionIsInitialized && !this.indexControlFailed); - searchTerm.Enabled = - (HtmlHelp2Environment.SessionIsInitialized && !this.indexControlFailed); - infoLabel.Visible = false; - - if (this.indexControlFailed) - { - this.ShowInfoMessage - (StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSystemNotAvailable}")); - } - else if (!HtmlHelp2Environment.SessionIsInitialized) - { - if (indexControl != null) indexControl.Visible = false; - this.ShowInfoMessage - ("${res:AddIns.HtmlHelp2.HelpCollectionMayBeEmpty}"); - } - else - { - indexControl.Visible = true; - this.LoadIndex(); - } - } - - private void InitializeComponents() - { - infoLabel.Dock = DockStyle.Fill; - infoLabel.Visible = false; - infoLabel.TextAlign = ContentAlignment.MiddleCenter; - Controls.Add(infoLabel); - - if (Help2ControlsValidation.IsIndexControlRegistered) - { - try - { - indexControl = new AxHxIndexCtrl(); - indexControl.BeginInit(); - indexControl.Dock = DockStyle.Fill; - indexControl.ItemClick += - new AxMSHelpControls.IHxIndexViewEvents_ItemClickEventHandler(this.IndexItemClick); - indexControl.EndInit(); - Controls.Add(indexControl); - indexControl.CreateControl(); - indexControl.BorderStyle = HxBorderStyle.HxBorderStyle_FixedSingle; - indexControl.FontSource = HxFontSourceConstant.HxFontExternal; - } - catch (System.Runtime.InteropServices.COMException ex) - { - LoggingService.Error("Help 2.0: Index control failed; " + ex.ToString()); - this.indexControlFailed = true; - } - } - - Panel panel1 = new Panel(); - Controls.Add(panel1); - panel1.Dock = DockStyle.Top; - panel1.Height = filterCombobox.Height + 7; - - panel1.Controls.Add(filterCombobox); - filterCombobox.Dock = DockStyle.Top; - filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; - filterCombobox.Sorted = true; - filterCombobox.Enabled = false; - filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - - Controls.Add(label1); - label1.Dock = DockStyle.Top; - label1.TextAlign = ContentAlignment.MiddleLeft; - label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - Panel panel2 = new Panel(); - Controls.Add(panel2); - panel2.Dock = DockStyle.Top; - panel2.Height = searchTerm.Height + 7; - - panel2.Controls.Add(searchTerm); - searchTerm.Dock = DockStyle.Top; - searchTerm.Enabled = false; - searchTerm.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - searchTerm.TextChanged += new EventHandler(this.SearchTextChanged); - searchTerm.KeyPress += new KeyPressEventHandler(this.SearchKeyPress); - - Controls.Add(label2); - label2.Dock = DockStyle.Top; - label2.TextAlign = ContentAlignment.MiddleLeft; - label2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - this.RedrawContent(); - - this.indexControlFailed = (this.indexControlFailed || indexControl == null); - } - - private void ShowInfoMessage(string infoText) - { - filterCombobox.Items.Clear(); - searchTerm.Items.Clear(); - searchTerm.Text = string.Empty; - infoLabel.Text = infoText; - infoLabel.Visible = true; - } - - public void RedrawContent() - { - label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); - label2.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookFor}"); - } - - private void IndexItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) - { - string indexTerm = indexControl.IndexData.GetFullStringFromSlot(e.iItem, ","); - int indexSlot = e.iItem; - - itemClicked = true; - searchTerm.Items.Insert(0, indexTerm); - searchTerm.SelectedIndex = 0; - itemClicked = false; - - this.ShowSelectedItemEntry(indexTerm, indexSlot); - } - - private void FilterChanged(object sender, EventArgs e) - { - string selectedFilterName = filterCombobox.SelectedItem.ToString(); - if (!string.IsNullOrEmpty(selectedFilterName)) - { - Cursor.Current = Cursors.WaitCursor; - this.SetIndex(selectedFilterName); - Cursor.Current = Cursors.Default; - } - } - - private void SearchTextChanged(object sender, EventArgs e) - { - if (!this.itemClicked && searchTerm.Text.Length > 0) - { - indexControl.Selection = - indexControl.IndexData.GetSlotFromString(searchTerm.Text); - } - } - - private void SearchKeyPress(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == (char)13) - { - int indexSlot = indexControl.IndexData.GetSlotFromString(searchTerm.Text); - string indexTerm = indexControl.IndexData.GetFullStringFromSlot(indexSlot, ","); - - searchTerm.Items.Insert(0, indexTerm); - searchTerm.SelectedIndex = 0; - if (searchTerm.Items.Count > 10) - { - searchTerm.Items.RemoveAt(10); - } - - this.ShowSelectedItemEntry(indexTerm, indexSlot); - } - } - - private void LoadIndex() - { - if (this.SetIndex(HtmlHelp2Environment.CurrentFilterName)) - { - searchTerm.Text = string.Empty; - searchTerm.Items.Clear(); - filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); - HtmlHelp2Environment.BuildFilterList(filterCombobox); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - } - } - - private bool SetIndex(string filterName) - { - try - { - indexControl.IndexData = - HtmlHelp2Environment.GetIndex(HtmlHelp2Environment.FindFilterQuery(filterName)); - return true; - } - catch (System.Runtime.InteropServices.COMException) - { - LoggingService.Error("Help 2.0: cannot connect to IHxIndex interface (Index)"); - return false; - } - } - - private void ShowSelectedItemEntry(string indexTerm, int indexSlot) - { - PadDescriptor indexResults = - WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexResultsPad)); - if (indexResults == null) return; - - try - { - IHxTopicList matchingTopics = indexControl.IndexData.GetTopicsFromSlot(indexSlot); - - try - { - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).CleanUp(); - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.BeginUpdate(); - - foreach (IHxTopic topic in matchingTopics) - { - ListViewItem lvi = new ListViewItem(); - lvi.Text = - topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, - HxTopicGetTitleDefVal.HxTopicGetTitleFileName); - lvi.Tag = topic; - lvi.SubItems.Add(topic.Location); - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.Items.Add(lvi); - } - } - finally - { - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).IndexResultsListView.EndUpdate(); - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).SortLV(0); - ((HtmlHelp2IndexResultsPad)indexResults.PadContent).SetStatusMessage(indexTerm); - } - - switch (matchingTopics.Count) - { - case 0: - break; - case 1: - IHxTopic topic = (IHxTopic)matchingTopics.ItemAt(1); - if(topic != null) ShowHelpBrowser.OpenHelpView(topic); - break; - default: - indexResults.BringPadToFront(); - break; - } - } - catch (System.Runtime.InteropServices.COMException cEx) - { - LoggingService.Error("Help 2.0: cannot get matching index entries; " + cEx.ToString()); - } - } - - #region Help 2.0 Environment Events - private void FilterQueryChanged(object sender, EventArgs e) - { - Application.DoEvents(); - - string currentFilterName = filterCombobox.SelectedItem.ToString(); - if (string.Compare(currentFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) - { - filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); - filterCombobox.SelectedIndex = - filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); - this.SetIndex(HtmlHelp2Environment.CurrentFilterName); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - } - } - - private void NamespaceReloaded(object sender, EventArgs e) - { - this.UpdateControls(); - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexResultsPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexResultsPad.cs deleted file mode 100644 index 8141438fc0..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/IndexResultsPad.cs +++ /dev/null @@ -1,144 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Collections; - using System.Globalization; - using System.Windows.Forms; - - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - using MSHelpServices; - - public class ShowIndexResultsMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor indexResults = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2IndexResultsPad)); - if (indexResults != null) indexResults.BringPadToFront(); - } - } - - public class HtmlHelp2IndexResultsPad : AbstractPadContent - { - ListView listView = new ListView(); - ColumnHeader title = new ColumnHeader(); - ColumnHeader location = new ColumnHeader(); - - public override object Control - { - get { return listView; } - } - - public ListView IndexResultsListView - { - get { return listView; } - } - - public HtmlHelp2IndexResultsPad() - { - this.SetListViewHeader(); - ResourceService.LanguageChanged += delegate { SetListViewHeader(); }; - - listView.Columns.Add(title); - listView.Columns.Add(location); - - listView.FullRowSelect = true; - listView.Alignment = ListViewAlignment.Left; - listView.View = View.Details; - listView.Dock = DockStyle.Fill; - listView.MultiSelect = false; - listView.HideSelection = false; - listView.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - ListViewResize(this,null); - - listView.Resize += new EventHandler(ListViewResize); - listView.DoubleClick += new EventHandler(ListViewDoubleClick); - listView.ColumnClick += new ColumnClickEventHandler(ColumnClick); - listView.CreateControl(); - } - - public void SortLV(int listViewColumn) - { - listView.ListViewItemSorter = new ListViewItemComparer(listViewColumn); - listView.Sort(); - } - - private void SetListViewHeader() - { - title.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Title}"); - location.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Location}"); - } - - private void ListViewResize(object sender, EventArgs e) - { - int w = (listView.Width - 60) / 2; - title.Width = w; - location.Width = w; - } - - private void ListViewDoubleClick(object sender, EventArgs e) - { - ListViewItem lvi = listView.SelectedItems[0]; - if (lvi != null && lvi.Tag != null && lvi.Tag is IHxTopic) - { - ShowHelpBrowser.OpenHelpView((IHxTopic)lvi.Tag); - } - } - - private void ColumnClick(object sender, ColumnClickEventArgs e) - { - this.SortLV(e.Column); - } - - public void CleanUp() - { - foreach (ListViewItem lvi in listView.Items) - { - if(lvi.Tag != null) { lvi.Tag = null; } - } - - listView.Items.Clear(); - } - - public void SetStatusMessage(string indexTerm) - { - if (listView.Items.Count > 1) - { - string text = StringParser.Parse("${res:AddIns.HtmlHelp2.ResultsOfIndexResults}", - new string[,] - {{"0", indexTerm}, - {"1", listView.Items.Count.ToString(CultureInfo.InvariantCulture)}, - {"2", (listView.Items.Count == 1)?"${res:AddIns.HtmlHelp2.SingleTopic}":"${res:AddIns.HtmlHelp2.MultiTopic}"}} - ); - - StatusBarService.SetMessage(text); - } - } - - #region Sorting - class ListViewItemComparer : IComparer - { - private int col; - - public ListViewItemComparer(int column) - { - col = column; - } - - public int Compare(object x, object y) - { - return String.Compare(((ListViewItem)x).SubItems[col].Text, - ((ListViewItem)y).SubItems[col].Text); - } - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchPad.cs deleted file mode 100644 index 0c64b7f6da..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchPad.cs +++ /dev/null @@ -1,411 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Drawing; - using System.Globalization; - using System.Windows.Forms; - - using HtmlHelp2.Environment; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - using ICSharpCode.SharpDevelop.Project; - using ICSharpCode.SharpDevelop.Editor.Search; - using MSHelpServices; - - public class ShowSearchMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); - if (search != null) - { - search.BringPadToFront(); - ((HtmlHelp2SearchPad)search.PadContent).FocusSearchTextBox(); - } - } - } - - public class HtmlHelp2SearchPad : AbstractPadContent - { - Panel mainPanel = new Panel(); - Button searchButton = new Button(); - ComboBox filterCombobox = new ComboBox(); - ComboBox searchTerm = new ComboBox(); - CheckBox titlesOnly = new CheckBox(); - CheckBox enableStemming = new CheckBox(); - CheckBox reuseMatches = new CheckBox(); - CheckBox hiliteTopics = new CheckBox(); - CheckBox useCurrentLang = new CheckBox(); - Label label1 = new Label(); - Label label2 = new Label(); - bool searchIsBusy; - - public override object Control - { - get { return mainPanel; } - } - - public void FocusSearchTextBox() - { - searchTerm.Focus(); - } - - void RedrawContentInternal() - { - searchButton.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Search}"); - titlesOnly.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.SearchInTitlesOnly}"); - enableStemming.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookForSimilarWords}"); - reuseMatches.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.SearchInPreviouslyFoundTopics}"); - hiliteTopics.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HighlightMatches}"); - useCurrentLang.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.UseCurrentProjectLanguageForSearch}"); - label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); - label2.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.LookFor}"); - } - - public bool HiliteEnabled - { - get { return hiliteTopics.Checked; } - } - - public HtmlHelp2SearchPad() - { - this.InitializeComponents(); - this.UpdateControls(); - ResourceService.LanguageChanged += delegate { RedrawContentInternal(); }; - - HtmlHelp2Environment.FilterQueryChanged += new EventHandler(FilterQueryChanged); - HtmlHelp2Environment.NamespaceReloaded += new EventHandler(NamespaceReloaded); - - ProjectService.SolutionLoaded += this.SolutionLoaded; - ProjectService.SolutionClosed += this.SolutionUnloaded; - } - - private void UpdateControls() - { - titlesOnly.Enabled = HtmlHelp2Environment.SessionIsInitialized; - enableStemming.Enabled = HtmlHelp2Environment.SessionIsInitialized; - hiliteTopics.Enabled = HtmlHelp2Environment.SessionIsInitialized; - useCurrentLang.Enabled = HtmlHelp2Environment.SessionIsInitialized; - filterCombobox.Enabled = HtmlHelp2Environment.SessionIsInitialized; - searchTerm.Enabled = HtmlHelp2Environment.SessionIsInitialized; - - searchTerm.Text = string.Empty; - searchTerm.Items.Clear(); - filterCombobox.Items.Clear(); - - if (HtmlHelp2Environment.SessionIsInitialized) - { - HtmlHelp2Environment.BuildFilterList(filterCombobox); - } - } - - private void InitializeComponents() - { - // Search controls - Panel panel3 = new Panel(); - mainPanel.Controls.Add(panel3); - panel3.Width = 500; - int pw = panel3.Width; - - panel3.Controls.Add(searchButton); - searchButton.Enabled = false; - searchButton.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - searchButton.Click += new EventHandler(SearchButtonClick); - panel3.Controls.Add(titlesOnly); - panel3.Controls.Add(enableStemming); - panel3.Controls.Add(reuseMatches); - panel3.Controls.Add(hiliteTopics); - panel3.Controls.Add(useCurrentLang); - - titlesOnly.Width = pw; - titlesOnly.Top = searchButton.Top + searchButton.Height + 10; - titlesOnly.TextAlign = ContentAlignment.MiddleLeft; - titlesOnly.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - enableStemming.Width = pw; - enableStemming.Top = titlesOnly.Top + titlesOnly.Height - 4; - enableStemming.TextAlign = ContentAlignment.MiddleLeft; - enableStemming.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - reuseMatches.Width = pw; - reuseMatches.Top = enableStemming.Top + enableStemming.Height - 4; - reuseMatches.Enabled = false; - reuseMatches.TextAlign = ContentAlignment.MiddleLeft; - reuseMatches.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - hiliteTopics.Width = pw; - hiliteTopics.Top = reuseMatches.Top + reuseMatches.Height - 4; - hiliteTopics.TextAlign = ContentAlignment.MiddleLeft; - hiliteTopics.Checked = true; - hiliteTopics.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - useCurrentLang.Width = pw; - useCurrentLang.Top = hiliteTopics.Top + hiliteTopics.Height; - useCurrentLang.TextAlign = ContentAlignment.MiddleLeft; - useCurrentLang.Visible = ProjectService.CurrentProject != null; - useCurrentLang.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - panel3.Dock = DockStyle.Fill; - - // Filter Combobox - Panel panel1 = new Panel(); - mainPanel.Controls.Add(panel1); - panel1.Dock = DockStyle.Top; - panel1.Height = filterCombobox.Height + 15; - panel1.Controls.Add(filterCombobox); - filterCombobox.Dock = DockStyle.Top; - filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; - filterCombobox.Sorted = true; - filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); - - // Filter label - mainPanel.Controls.Add(label1); - label1.Dock = DockStyle.Top; - label1.TextAlign = ContentAlignment.MiddleLeft; - label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - // SearchTerm Combobox - Panel panel2 = new Panel(); - mainPanel.Controls.Add(panel2); - panel2.Dock = DockStyle.Top; - panel2.Height = searchTerm.Height + 7; - panel2.Controls.Add(searchTerm); - searchTerm.Dock = DockStyle.Top; - searchTerm.TextChanged += new EventHandler(SearchTextChanged); - searchTerm.KeyPress += new KeyPressEventHandler(KeyPressed); - searchTerm.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - mainPanel.Controls.Add(label2); - label2.Dock = DockStyle.Top; - label2.TextAlign = ContentAlignment.MiddleLeft; - label2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - - this.RedrawContentInternal(); - } - - private void FilterChanged(object sender, EventArgs e) - { - string selectedFilterName = filterCombobox.SelectedItem.ToString(); - if (!string.IsNullOrEmpty(selectedFilterName)) - { - HtmlHelp2Environment.FindFilterQuery(selectedFilterName); - } - } - - #region Help 2.0 Environment Events - private void FilterQueryChanged(object sender, EventArgs e) - { - mainPanel.Refresh(); - - string selectedFilterName = filterCombobox.SelectedItem.ToString(); - if (string.Compare(selectedFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) - { - filterCombobox.SelectedIndexChanged -= new EventHandler(FilterChanged); - filterCombobox.SelectedIndex = filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); - filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); - } - } - - private void NamespaceReloaded(object sender, EventArgs e) - { - this.UpdateControls(); - - if (HtmlHelp2Environment.SessionIsInitialized) - { - filterCombobox.SelectedIndexChanged -= new EventHandler(FilterChanged); - HtmlHelp2Environment.BuildFilterList(filterCombobox); - filterCombobox.SelectedIndexChanged += new EventHandler(FilterChanged); - } - } - #endregion - - private void SearchButtonClick(object sender, EventArgs e) - { - if (!string.IsNullOrEmpty(searchTerm.Text)) - { - this.AddTermToList(searchTerm.Text); - this.PerformFts(searchTerm.Text); - } - } - - private void SearchTextChanged(object sender, EventArgs e) - { - searchButton.Enabled = (!string.IsNullOrEmpty(searchTerm.Text)); - } - - private void KeyPressed(object sender, KeyPressEventArgs e) - { - if (e.KeyChar == (char)13 && searchTerm.Text.Length > 0) - { - e.Handled = true; - this.AddTermToList(searchTerm.Text); - this.PerformFts(searchTerm.Text); - } - } - - private void AddTermToList(string searchText) - { - if (searchTerm.Items.IndexOf(searchText) == -1) - { - searchTerm.Items.Insert(0, searchText); - if (searchTerm.Items.Count > 10) searchTerm.Items.RemoveAt(10); - searchTerm.SelectedIndex = 0; - } - } - - #region FTS - private void PerformFts(string searchWord) - { - this.PerformFts(searchWord, false); - } - - private void PerformFts(string searchWord, bool useDynamicHelp) - { - if (!HtmlHelp2Environment.SessionIsInitialized || string.IsNullOrEmpty(searchWord) || searchIsBusy) - { - return; - } - - HtmlHelp2SearchResultsView searchResults = HtmlHelp2SearchResultsView.Instance; - - HtmlHelp2Dialog searchDialog = new HtmlHelp2Dialog(); - try - { - searchIsBusy = true; - IHxTopicList matchingTopics = null; - - HxQuery_Options searchFlags = HxQuery_Options.HxQuery_No_Option; - searchFlags |= (titlesOnly.Checked)?HxQuery_Options.HxQuery_FullTextSearch_Title_Only:HxQuery_Options.HxQuery_No_Option; - searchFlags |= (enableStemming.Checked)?HxQuery_Options.HxQuery_FullTextSearch_Enable_Stemming:HxQuery_Options.HxQuery_No_Option; - searchFlags |= (reuseMatches.Checked)?HxQuery_Options.HxQuery_FullTextSearch_SearchPrevious:HxQuery_Options.HxQuery_No_Option; - - searchDialog.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSearchCaption}"); - searchDialog.ActionLabel = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSearchInProgress}", - new string[,] - {{"0", searchWord}}); - searchDialog.Show(); - Application.DoEvents(); - Cursor.Current = Cursors.WaitCursor; - if (useDynamicHelp) - matchingTopics = HtmlHelp2Environment.GetMatchingTopicsForDynamicHelp(searchWord); - else - matchingTopics = HtmlHelp2Environment.Fts.Query(searchWord, searchFlags); - - Cursor.Current = Cursors.Default; - - try - { - searchResults.CleanUp(); - searchResults.SearchResultsListView.BeginUpdate(); - - foreach (IHxTopic topic in matchingTopics) - { - if (useCurrentLang.Checked && !useDynamicHelp && !SharpDevLanguage.CheckTopicLanguage(topic)) - continue; - - ListViewItem lvi = new ListViewItem(); - lvi.Text = topic.get_Title(HxTopicGetTitleType.HxTopicGetRLTitle, - HxTopicGetTitleDefVal.HxTopicGetTitleFileName); - lvi.Tag = topic; - lvi.SubItems.Add(topic.Location); - lvi.SubItems.Add(topic.Rank.ToString(CultureInfo.CurrentCulture)); - - searchResults.SearchResultsListView.Items.Add(lvi); - } - - reuseMatches.Enabled = true; - } - finally - { - searchResults.SearchResultsListView.EndUpdate(); - searchResults.SetStatusMessage(searchTerm.Text); - SearchResultsPad.Instance.ShowSearchResults( - new HelpSearchResult(searchTerm.Text, searchResults) - ); - SearchResultsPad.Instance.BringToFront(); - searchIsBusy = false; - } - } - catch (System.Runtime.InteropServices.COMException ex) - { - LoggingService.Error("Help 2.0: cannot get matching search word; " + ex.ToString()); - - foreach (Control control in this.mainPanel.Controls) - { - control.Enabled = false; - } - } - finally - { - searchDialog.Dispose(); - } - } - - public bool PerformF1Fts(string keyword) - { - return this.PerformF1Fts(keyword, false); - } - - public bool PerformF1Fts(string keyword, bool useDynamicHelp) - { - if (!HtmlHelp2Environment.SessionIsInitialized || string.IsNullOrEmpty(keyword) || searchIsBusy) - { - return false; - } - - this.PerformFts(keyword, useDynamicHelp); - - HtmlHelp2SearchResultsView searchResults = HtmlHelp2SearchResultsView.Instance; - return searchResults.SearchResultsListView.Items.Count > 0; - } - #endregion - - #region Project Events to hide/show the new "Use language" checkbox - private void SolutionLoaded(object sender, SolutionEventArgs e) - { - useCurrentLang.Visible = true; - } - - private void SolutionUnloaded(object sender, EventArgs e) - { - useCurrentLang.Visible = false; - useCurrentLang.Checked = false; - } - #endregion - } - - sealed class HelpSearchResult : ISearchResult - { - string searchTerm; - HtmlHelp2SearchResultsView view; - - public HelpSearchResult(string searchTerm, HtmlHelp2SearchResultsView view) - { - this.searchTerm = searchTerm; - this.view = view; - } - - public string Text { - get { return searchTerm; } - } - - public object GetControl() - { - return view; - } - - public System.Collections.IList GetToolbarItems() - { - return null; - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchResultsPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchResultsPad.cs deleted file mode 100644 index c8d91fbddb..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/SearchResultsPad.cs +++ /dev/null @@ -1,155 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Collections; - using System.Globalization; - using System.Windows.Forms; - - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - using MSHelpServices; - - public class HtmlHelp2SearchResultsView : UserControl - { - ListView listView = new ListView(); - ColumnHeader title = new ColumnHeader(); - ColumnHeader location = new ColumnHeader(); - ColumnHeader rank = new ColumnHeader(); - - static HtmlHelp2SearchResultsView instance; - - public static HtmlHelp2SearchResultsView Instance - { - get - { - if (instance == null) instance = new HtmlHelp2SearchResultsView(); - return instance; - } - } - - public override void Refresh() - { - this.SetListViewHeader(); - base.Refresh(); - } - - public ListView SearchResultsListView - { - get { return listView; } - } - - public HtmlHelp2SearchResultsView() - { - this.SetListViewHeader(); - listView.Columns.Add(title); - listView.Columns.Add(location); - listView.Columns.Add(rank); - - listView.FullRowSelect = true; - listView.AutoArrange = true; - listView.Alignment = ListViewAlignment.Left; - listView.View = View.Details; - listView.Dock = DockStyle.Fill; - listView.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - ListViewResize(this,null); - - listView.Resize += new EventHandler(ListViewResize); - listView.DoubleClick += new EventHandler(ListViewDoubleClick); - listView.ColumnClick += new ColumnClickEventHandler(ColumnClick); - Controls.Add(listView); - } - - private void SetListViewHeader() - { - title.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Title}"); - location.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Location}"); - rank.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.Rank}"); - } - - private void ListViewResize(object sender, EventArgs e) - { - rank.Width = 80; - int w = (listView.Width - rank.Width - 40) / 2; - title.Width = w; - location.Width = w; - } - - private void ListViewDoubleClick(object sender, EventArgs e) - { - PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); - bool hiliteMatches = (search != null && ((HtmlHelp2SearchPad)search.PadContent).HiliteEnabled); - - ListViewItem lvi = listView.SelectedItems[0]; - if (lvi != null && lvi.Tag != null && lvi.Tag is IHxTopic) - { - ShowHelpBrowser.OpenHelpView((IHxTopic)lvi.Tag, hiliteMatches); - } - } - - private void ColumnClick(object sender, ColumnClickEventArgs e) - { - listView.ListViewItemSorter = new ListViewItemComparer(e.Column); - listView.Sort(); - } - - public void CleanUp() - { - foreach (ListViewItem lvi in listView.Items) - { - if(lvi.Tag != null) { lvi.Tag = null; } - } - - listView.Items.Clear(); - } - - public void SetStatusMessage(string indexTerm) - { - string text = StringParser.Parse("${res:AddIns.HtmlHelp2.ResultsOfSearchResults}", - new string[,] - {{"0", indexTerm}, - {"1", listView.Items.Count.ToString(CultureInfo.InvariantCulture)}, - {"2", (listView.Items.Count == 1)?"${res:AddIns.HtmlHelp2.SingleTopic}":"${res:AddIns.HtmlHelp2.MultiTopic}"}} - ); - - StatusBarService.SetMessage(text); - } - - #region Sorting - class ListViewItemComparer : IComparer - { - private int col; - - public ListViewItemComparer(int column) - { - col = column; - } - - public int Compare(object x, object y) - { - ListViewItem itemA = x as ListViewItem; - ListViewItem itemB = y as ListViewItem; - - switch (col) - { - case 2: - int a = Int32.Parse(itemA.SubItems[col].Text, CultureInfo.InvariantCulture); - int b = Int32.Parse(itemB.SubItems[col].Text, CultureInfo.InvariantCulture); - if(a > b) return 1; - else if(a < b) return -1; - else return 0; - default: - return string.Compare(itemA.SubItems[col].Text, itemB.SubItems[col].Text); - } - } - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs deleted file mode 100644 index a9c11fc943..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BaseControls/TocPad.cs +++ /dev/null @@ -1,450 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using System.Drawing; - using System.Security.Permissions; - using System.Windows.Forms; - - using AxMSHelpControls; - using HtmlHelp2.Environment; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - using MSHelpControls; - using PrintOptions = MSHelpServices.HxHierarchy_PrintNode_Options; - using TSC = MSHelpControls.HxTreeStyleConstant; - - public class ShowTocMenuCommand : AbstractMenuCommand - { - public override void Run() - { - PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)); - if (toc != null) toc.BringPadToFront(); - } - } - - public class HtmlHelp2TocPad : AbstractPadContent - { - MSHelp2TocControl help2TocControl; - - public override object Control - { - get { return help2TocControl; } - } - - public override void Dispose() - { - help2TocControl.Dispose(); - } - - public HtmlHelp2TocPad() - { - help2TocControl = new MSHelp2TocControl(); - ResourceService.LanguageChanged += delegate { help2TocControl.RedrawContent(); }; - } - - public void SyncToc(string topic) - { - help2TocControl.SynchronizeToc(topic); - } - - public void GetPrevFromNode() - { - help2TocControl.GetPrevFromNode(); - } - - public void GetPrevFromUrl(string topic) - { - help2TocControl.GetPrevFromUrl(topic); - } - - public void GetNextFromNode() - { - help2TocControl.GetNextFromNode(); - } - - public void GetNextFromUrl(string topic) - { - help2TocControl.GetNextFromUrl(topic); - } - - public bool IsNotFirstNode - { - get { return help2TocControl.IsNotFirstNode; } - } - - public bool IsNotLastNode - { - get { return help2TocControl.IsNotLastNode; } - } - } - - public class MSHelp2TocControl : UserControl - { - AxHxTocCtrl tocControl; - ComboBox filterCombobox = new ComboBox(); - Label label1 = new Label(); - Label infoLabel = new Label(); - ContextMenuStrip printContextMenu = new ContextMenuStrip(); - ToolStripMenuItem printTopic = new ToolStripMenuItem(); - ToolStripMenuItem printTopicAndSubTopics = new ToolStripMenuItem(); - bool tocControlFailed; - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing && tocControl != null) - { - tocControl.Dispose(); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public MSHelp2TocControl() - { - this.InitializeComponents(); - this.UpdateControl(); - - HtmlHelp2Environment.FilterQueryChanged += new EventHandler(this.FilterQueryChanged); - HtmlHelp2Environment.NamespaceReloaded += new EventHandler(this.NamespaceReloaded); - } - - private void UpdateControl() - { - filterCombobox.Enabled = - (HtmlHelp2Environment.SessionIsInitialized && !this.tocControlFailed); - infoLabel.Visible = false; - - if (this.tocControlFailed) - { - this.ShowInfoMessage - (StringParser.Parse("${res:AddIns.HtmlHelp2.HelpSystemNotAvailable}")); - } - else if (!HtmlHelp2Environment.SessionIsInitialized) - { - if (tocControl != null) tocControl.Visible = false; - this.ShowInfoMessage - ("${res:AddIns.HtmlHelp2.HelpCollectionMayBeEmpty}"); - } - else - { - tocControl.Visible = true; - this.LoadToc(); - } - } - - private void InitializeComponents() - { - infoLabel.Dock = DockStyle.Fill; - infoLabel.Visible = false; - infoLabel.TextAlign = ContentAlignment.MiddleCenter; - Controls.Add(infoLabel); - - if (Help2ControlsValidation.IsTocControlRegistered) - { - try - { - tocControl = new AxHxTocCtrl(); - tocControl.BeginInit(); - tocControl.Dock = DockStyle.Fill; - tocControl.NodeClick += - new AxMSHelpControls.IHxTreeViewEvents_NodeClickEventHandler(this.TocNodeClick); - tocControl.NodeRightClick += - new AxMSHelpControls.IHxTreeViewEvents_NodeRightClickEventHandler(TocNodeRightClick); - tocControl.EndInit(); - Controls.Add(tocControl); - tocControl.CreateControl(); - - tocControl.Visible = false; - tocControl.BorderStyle = HxBorderStyle.HxBorderStyle_FixedSingle; - tocControl.FontSource = HxFontSourceConstant.HxFontExternal; - tocControl.TreeStyle = - (HtmlHelp2Environment.Config.TocPictures)?TSC.HxTreeStyle_TreelinesPlusMinusPictureText:TSC.HxTreeStyle_TreelinesPlusMinusText; - - printTopic.Image = ResourcesHelper.GetBitmap("HtmlHelp2.16x16.Print.bmp"); - printTopic.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - printTopic.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.PrintTopic}"); - printTopic.Click += new EventHandler(this.PrintTopic); - printContextMenu.Items.Add(printTopic); - - printTopicAndSubTopics.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.PrintSubtopics}"); - printTopicAndSubTopics.Click += new EventHandler(this.PrintTopicAndSubTopics); - printContextMenu.Items.Add(printTopicAndSubTopics); - } - catch (System.Runtime.InteropServices.COMException cEx) - { - LoggingService.Error("Help 2.0: TOC control failed: " + cEx.ToString()); - this.tocControlFailed = true; - } - } - - Panel panel1 = new Panel(); - Controls.Add(panel1); - panel1.Dock = DockStyle.Top; - panel1.Height = filterCombobox.Height + 7; - - panel1.Controls.Add(filterCombobox); - filterCombobox.Dock = DockStyle.Top; - filterCombobox.DropDownStyle = ComboBoxStyle.DropDownList; - filterCombobox.Sorted = true; - filterCombobox.Enabled = false; - filterCombobox.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - - Controls.Add(label1); - label1.Dock = DockStyle.Top; - label1.TextAlign = ContentAlignment.MiddleLeft; - label1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.RedrawContent(); - - this.tocControlFailed = (this.tocControlFailed || tocControl == null); - } - - private void ShowInfoMessage(string infoText) - { - filterCombobox.Items.Clear(); - infoLabel.Text = infoText; - infoLabel.Visible = true; - } - - public void RedrawContent() - { - label1.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.FilteredBy}"); - } - - private void TocNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) - { - string topicUrl = tocControl.Hierarchy.GetURL(e.hNode); - this.CallHelp(topicUrl); - } - - private void TocNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) - { - if (e.hNode != 0) - { - printTopic.Enabled = !string.IsNullOrEmpty(tocControl.Hierarchy.GetURL(e.hNode)); - printTopicAndSubTopics.Enabled = tocControl.Hierarchy.GetFirstChild(e.hNode) != 0; - bool selectTextFlag = (tocControl.Hierarchy.GetFirstChild(e.hNode) == 0 || - string.IsNullOrEmpty(tocControl.Hierarchy.GetURL(e.hNode))); - printTopicAndSubTopics.Text = - StringParser.Parse((selectTextFlag)? - "${res:AddIns.HtmlHelp2.PrintSubtopics}": - "${res:AddIns.HtmlHelp2.PrintTopicAndSubtopics}"); - - Point p = new Point(e.x, e.y); - p = this.PointToClient(p); - printContextMenu.Show(this, p); - } - } - - #region Printing - private void PrintTopic(object sender, EventArgs e) - { - if (tocControl.Selection != 0) - { - tocControl.Hierarchy.PrintNode(0, tocControl.Selection, PrintOptions.HxHierarchy_PrintNode_Option_Node); - } - } - - private void PrintTopicAndSubTopics(object sender, EventArgs e) - { - if (tocControl.Selection != 0) - { - tocControl.Hierarchy.PrintNode(0, tocControl.Selection, PrintOptions.HxHierarchy_PrintNode_Option_Children); - } - } - #endregion - - private void FilterChanged(object sender, EventArgs e) - { - string selectedFilterName = filterCombobox.SelectedItem.ToString(); - if (selectedFilterName != null && selectedFilterName.Length > 0) - { - Cursor.Current = Cursors.WaitCursor; - this.SetToc(selectedFilterName); - Cursor.Current = Cursors.Default; - } - } - - private void LoadToc() - { - if (this.SetToc(HtmlHelp2Environment.CurrentFilterName)) - { - filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); - HtmlHelp2Environment.BuildFilterList(filterCombobox); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - } - } - - private bool SetToc(string filterName) - { - try - { - tocControl.Hierarchy = - HtmlHelp2Environment.GetTocHierarchy(HtmlHelp2Environment.FindFilterQuery(filterName)); - return true; - } - catch (System.Runtime.InteropServices.COMException) - { - LoggingService.Error("Help 2.0: Cannot connect to the IHxHierarchy interface."); - return false; - } - } - - private void CallHelp(string topic) - { - this.CallHelp(topic, true); - } - - private void CallHelp(string topic, bool syncToc) - { - if (!string.IsNullOrEmpty(topic)) - { - if (syncToc) this.SynchronizeToc(topic); - ShowHelpBrowser.OpenHelpView(topic); - } - } - - #region Help 2.0 Environment Events - private void FilterQueryChanged(object sender, EventArgs e) - { - Application.DoEvents(); - - string currentFilterName = filterCombobox.SelectedItem.ToString(); - if (string.Compare(currentFilterName, HtmlHelp2Environment.CurrentFilterName) != 0) - { - filterCombobox.SelectedIndexChanged -= new EventHandler(this.FilterChanged); - filterCombobox.SelectedIndex = - filterCombobox.Items.IndexOf(HtmlHelp2Environment.CurrentFilterName); - this.SetToc(HtmlHelp2Environment.CurrentFilterName); - filterCombobox.SelectedIndexChanged += new EventHandler(this.FilterChanged); - } - } - - private void NamespaceReloaded(object sender, EventArgs e) - { - this.UpdateControl(); - - if (tocControl != null) { - tocControl.TreeStyle = - (HtmlHelp2Environment.Config.TocPictures)?TSC.HxTreeStyle_TreelinesPlusMinusPictureText:TSC.HxTreeStyle_TreelinesPlusMinusText; - } - } - #endregion - - #region Published Help 2.0 Commands - public void SynchronizeToc(string topic) - { - try - { - tocControl.Synchronize(topic); - } - catch (System.Runtime.InteropServices.COMException) - { - // SD2-812: ignore exception when trying to synchronize non-existing URL - } - } - - public void GetNextFromNode() - { - try - { - int currentNode = tocControl.Hierarchy.GetNextFromNode(tocControl.Selection); - string topicUrl = tocControl.Hierarchy.GetURL(currentNode); - this.CallHelp(topicUrl, true); - } - catch (System.Runtime.InteropServices.COMException) - { - } - } - - public void GetNextFromUrl(string topic) - { - if (topic == null || topic.Length == 0) return; - try - { - int currentNode = tocControl.Hierarchy.GetNextFromUrl(topic); - string topicUrl = tocControl.Hierarchy.GetURL(currentNode); - this.CallHelp(topicUrl, true); - } - catch (System.Runtime.InteropServices.COMException) - { - // SD2-812: ignore exception when trying to synchronize non-existing URL - } - catch (ArgumentException) - { - } - } - - public void GetPrevFromNode() - { - try - { - int currentNode = tocControl.Hierarchy.GetPrevFromNode(tocControl.Selection); - string topicUrl = tocControl.Hierarchy.GetURL(currentNode); - this.CallHelp(topicUrl, true); - } - catch (System.Runtime.InteropServices.COMException) - { - } - } - - public void GetPrevFromUrl(string topic) - { - if (topic == null || topic.Length == 0) return; - try - { - int currentNode = tocControl.Hierarchy.GetPrevFromUrl(topic); - string topicUrl = tocControl.Hierarchy.GetURL(currentNode); - this.CallHelp(topicUrl, true); - } - catch (System.Runtime.InteropServices.COMException) - { - // SD2-812: ignore exception when trying to synchronize non-existing URL - } - catch (ArgumentException) - { - } - } - - public bool IsNotFirstNode - { - get - { - try - { - int node = tocControl.Hierarchy.GetPrevFromNode(tocControl.Selection); - return node != 0; - } - catch (System.Runtime.InteropServices.COMException) - { - return true; - } - } - } - - public bool IsNotLastNode - { - get - { - try - { - int node = tocControl.Hierarchy.GetNextFromNode(tocControl.Selection); - return (node != 0); - } - catch (System.Runtime.InteropServices.COMException) - { - return true; - } - } - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/HelpBrowserCommands.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/HelpBrowserCommands.cs deleted file mode 100644 index ba241d1a15..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/HelpBrowserCommands.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Security.Permissions; -using System.Windows.Forms; - -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.BrowserDisplayBinding; -using ICSharpCode.SharpDevelop.Gui; - -namespace HtmlHelp2 -{ - public abstract class HelpToolbarCommand : AbstractCommand - { - public static HtmlHelp2TocPad TocPad - { - get - { - return (HtmlHelp2TocPad)WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)).PadContent; - } - } - - public WebBrowser Browser - { - get - { - return ((HtmlViewPane)Owner).WebBrowser; - } - } - - public static void BringTocPadToFront() - { - WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2TocPad)).BringPadToFront(); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - [PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] - public class SyncTocCommand : HelpToolbarCommand - { - public override void Run() - { - TocPad.SyncToc(Browser.Url.ToString()); - BringTocPadToFront(); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - [PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] - public class PreviousTopicCommand : HelpToolbarCommand - { - public override void Run() - { - try - { - TocPad.GetPrevFromNode(); - } - catch (System.ArgumentException) - { - TocPad.GetPrevFromUrl(Browser.Url.ToString()); - } - BringTocPadToFront(); - } - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - [PermissionSet(SecurityAction.InheritanceDemand, Name="Execution")] - public class NextTopicCommand : HelpToolbarCommand - { - public override void Run() - { - try - { - TocPad.GetNextFromNode(); - } - catch (System.ArgumentException) - { - TocPad.GetNextFromUrl(Browser.Url.ToString()); - } - BringTocPadToFront(); - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/ShowHelpBrowser.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/ShowHelpBrowser.cs deleted file mode 100644 index f473e6ec55..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserControl/ShowHelpBrowser.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - // With a big "Thank you" to Robert_G (Delphi-PRAXiS) - - using System; - using System.Security.Permissions; - using ICSharpCode.SharpDevelop.BrowserDisplayBinding; - using ICSharpCode.SharpDevelop.Gui; - using MSHelpServices; - - public static class ShowHelpBrowser - { - static bool hiliteMatches; - static IHxTopic lastTopic; - - public static void OpenHelpView(IHxTopic topic) - { - if (topic == null) - { - throw new ArgumentNullException("topic"); - } - OpenHelpView(topic.URL, null, false); - } - - public static void OpenHelpView(IHxTopic topic, bool hiliteMatchingWords) - { - if (topic == null) - { - throw new ArgumentNullException("topic"); - } - OpenHelpView(topic.URL, topic, hiliteMatchingWords); - } - - public static void OpenHelpView(string topicLink) - { - OpenHelpView(topicLink, null, false); - } - - public static void OpenHelpView(string topicLink, bool hiliteMatchingWords) - { - OpenHelpView(topicLink, null, hiliteMatchingWords); - } - - public static void OpenHelpView(string topicLink, IHxTopic topic, bool hiliteMatchingWords) - { - hiliteMatches = hiliteMatchingWords; - lastTopic = topic; - BrowserPane help2Browser = ActiveHelp2BrowserView(); - - if (help2Browser != null) - { - help2Browser.Navigate(topicLink); - help2Browser.WorkbenchWindow.SelectWindow(); - } - } - - public static BrowserPane ActiveHelp2BrowserView() - { - IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; - if (window != null) - { - BrowserPane browserPane = window.ActiveViewContent as BrowserPane; - if (browserPane != null && browserPane.Url.Scheme == "ms-help") - return browserPane; - } - - foreach(IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) - { - BrowserPane browserPane = view as BrowserPane; - if (browserPane != null && browserPane.Url.Scheme == "ms-help") - return browserPane; - } - return CreateNewHelp2BrowserView(); - } - - public static BrowserPane CreateNewHelp2BrowserView() - { - BrowserPane tempPane = new BrowserPane(); - WorkbenchSingleton.Workbench.ShowView(tempPane); - return tempPane; - } - - [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public static void HighlightDocument(HtmlViewPane htmlViewPane) - { - if (htmlViewPane == null) - { - throw new ArgumentNullException("htmlViewPane"); - } - if (hiliteMatches && lastTopic != null) - { - lastTopic.HighlightDocument(htmlViewPane.WebBrowser.Document.DomDocument); - } - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserScheme.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserScheme.cs deleted file mode 100644 index 1d7acb8dcf..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/BrowserScheme.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -using HtmlHelp2.Environment; -using HtmlHelp2.JScriptGlobals; -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.BrowserDisplayBinding; - -namespace HtmlHelp2 -{ - public class BrowserScheme : DefaultSchemeExtension - { - JScriptExternal scriptObject; - - public override void GoHome(HtmlViewPane pane) - { - if (pane == null) - { - throw new ArgumentNullException("pane"); - } - pane.Navigate(new Uri(HtmlHelp2Environment.DefaultPage)); - } - - public override void GoSearch(HtmlViewPane pane) - { - if (pane == null) - { - throw new ArgumentNullException("pane"); - } - pane.Navigate(new Uri(HtmlHelp2Environment.SearchPage)); - } - -// [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public override void InterceptNavigate(HtmlViewPane pane, WebBrowserNavigatingEventArgs e) - { - if (pane == null) - { - throw new ArgumentNullException("pane"); - } - if (scriptObject == null) { - scriptObject = new JScriptExternal(); - LoadHelpState(); - } - pane.WebBrowser.ObjectForScripting = scriptObject; - // add event (max. 1 one time) - pane.WebBrowser.Disposed -= SaveHelpState; - pane.WebBrowser.Disposed += SaveHelpState; - base.InterceptNavigate(pane, e); - } - - void LoadHelpState() - { - foreach (string line in PropertyService.Get("HtmlHelpPersistedJScriptGlobals", new string[0])) { - int pos = line.IndexOf('='); - string name = line.Substring(0, pos); - scriptObject.Globals.VariablePersistCollection[name] = true; - scriptObject.Globals.VariableValueCollection[name] = line.Substring(pos + 1); - } - } - - void SaveHelpState(object sender, EventArgs e) - { - ((System.ComponentModel.IComponent)sender).Disposed -= SaveHelpState; - List lines = new List(); - foreach (KeyValuePair pair in scriptObject.Globals.VariablePersistCollection) { - if (pair.Value) { - lines.Add(pair.Key + "=" + scriptObject.Globals.VariableValueCollection[pair.Key]); - } - } - PropertyService.Set("HtmlHelpPersistedJScriptGlobals", lines.ToArray()); - } - -// [PermissionSet(SecurityAction.LinkDemand, Name="Execution")] - public override void DocumentCompleted(HtmlViewPane pane, WebBrowserDocumentCompletedEventArgs e) - { - if (pane == null) - { - throw new ArgumentNullException("pane"); - } - ShowHelpBrowser.HighlightDocument(pane); - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Commands/ShowErrorHelpCommand.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Commands/ShowErrorHelpCommand.cs deleted file mode 100644 index 822b35e20e..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Commands/ShowErrorHelpCommand.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using MSHelpServices; -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Gui; - -namespace HtmlHelp2.Commands -{ - /// - /// Shows help information for an error in the Errors window. - /// - public class ShowErrorHelpCommand : AbstractMenuCommand - { - /// - /// Starts the command - /// - public override void Run() - { - ICSharpCode.SharpDevelop.Gui.TaskView view = (ICSharpCode.SharpDevelop.Gui.TaskView)Owner; - - // Search all selected tasks - foreach (Task t in new List(view.SelectedTasks)) { - if (t.BuildError == null) - continue; - - string code = t.BuildError.ErrorCode; - - if (string.IsNullOrEmpty(code)) - return; - - // Get help content - MSHelpServices.IHxTopic topic; - - // If HtmlHelp2 AddIn is initialised correctly we can start! - if (HtmlHelp2.Environment.HtmlHelp2Environment.SessionIsInitialized) { - // Get the topic - IHxIndex index = HtmlHelp2.Environment.HtmlHelp2Environment.GetIndex(""); - if (index == null) { - MessageService.ShowErrorFormatted("No help available for {0}!", code); - return; - } - int indexSlot = index.GetSlotFromString(code); - if (indexSlot <= 0) { - MessageService.ShowErrorFormatted("No help available for {0}!", code); - return; - } - IHxTopicList list = index.GetTopicsFromSlot(indexSlot); - if (list == null) { - MessageService.ShowErrorFormatted("No help available for {0}!", code); - return; - } - try { - topic = list.ItemAt(1); - } catch (ArgumentException) { - topic = null; - } - if (topic == null) { - MessageService.ShowErrorFormatted("No help available for {0}!", code); - return; - } - string topicTitle = topic.get_Title(HxTopicGetTitleType.HxTopicGetTOCTitle, HxTopicGetTitleDefVal.HxTopicGetTitleFileName); - if (topicTitle == null || !topicTitle.Contains(code)) { - MessageService.ShowErrorFormatted("No help available for {0}!", code); - return; - } - } else { // Otherwise we have to show an Error message ... - LoggingService.Error("Couldn't initialize help database"); - return; - } - - // Show Browser window - HtmlHelp2.ShowHelpBrowser.OpenHelpView(topic); - } - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/MsHelpProvider.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/MsHelpProvider.cs deleted file mode 100644 index 9755c665f9..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/MsHelpProvider.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2 -{ - using System; - using ICSharpCode.Core; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Gui; - - public class MSHelpProvider : HelpProvider - { - public override bool TryShowHelp(string fullTypeName) - { - LoggingService.Info("Help 2.0: MsHelpProvider.TryShowHelp"); - -// try -// { - PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); - return ((HtmlHelp2SearchPad)search.PadContent).PerformF1Fts(fullTypeName, true); -// } -// catch -// { -// return false; -// } - } - - public override bool TryShowHelpByKeyword(string keyword) - { - LoggingService.Info("Help 2.0: MsHelpProvider.TryShowHelpByKeyword"); - -// try -// { - PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(HtmlHelp2SearchPad)); - return ((HtmlHelp2SearchPad)search.PadContent).PerformF1Fts(keyword); -// } -// catch -// { -// return false; -// } - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/AxMSHelpControls.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/AxMSHelpControls.cs deleted file mode 100644 index 8cb693d075..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/AxMSHelpControls.cs +++ /dev/null @@ -1,764 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.44 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ -namespace AxMSHelpControls -{ - [System.Windows.Forms.AxHost.ClsidAttribute("{314111b8-a502-11d2-bbca-00c04f8ec294}")] - [System.ComponentModel.DesignTimeVisibleAttribute(true)] - public class AxHxTocCtrl : System.Windows.Forms.AxHost { - - private MSHelpControls.IHxTreeView ocx; - - private AxHxTocCtrlEventMulticaster eventMulticaster; - - private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; - - public AxHxTocCtrl() : base("314111b8-a502-11d2-bbca-00c04f8ec294") - { - } - - [System.ComponentModel.Browsable(false)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4096)] - public virtual MSHelpServices.IHxHierarchy Hierarchy { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Hierarchy; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Hierarchy = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4100)] - public virtual int ImageList { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.ImageList; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.ImageList = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4097)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual bool HideSelection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.HideSelection; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HideSelection = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4098)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxTreeLineStyleConstant LineStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LineStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LineStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4099)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxTreeStyleConstant TreeStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.TreeStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.TreeStyle = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-501)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Color BackColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.BackColor))); - } - else { - return base.BackColor; - } - } - set { - base.BackColor = value; - if ((this.ocx != null)) { - this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-513)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Color ForeColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); - } - else { - return base.ForeColor; - } - } - set { - base.ForeColor = value; - if ((this.ocx != null)) { - this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-504)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxBorderStyle BorderStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.BorderStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.BorderStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-520)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxAppearanceConstant Appearance { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Appearance; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Appearance = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-521)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxMousePointerConstant MousePointer { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.MousePointer; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.MousePointer = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-512)] - [System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Font Font { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetFontFromIFont(this.ocx.Font); - } - else { - return base.Font; - } - } - set { - base.Font = value; - if ((this.ocx != null)) { - this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4102)] - public virtual int Selection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Selection; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4103)] - public virtual short LangId { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LangId; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LangId = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4104)] - public virtual MSHelpControls.HxFontSourceConstant FontSource { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.FontSource; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FontSource = value; - } - } - - public event IHxTreeViewEvents_NodeClickEventHandler NodeClick; - - public event IHxTreeViewEvents_NodeRightClickEventHandler NodeRightClick; - - public override void Refresh() { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Refresh(); - } - - public virtual void Synchronize(string bstrURL) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Synchronize", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Synchronize(bstrURL); - } - - protected override void CreateSink() { - try { - this.eventMulticaster = new AxHxTocCtrlEventMulticaster(this); - this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxTreeViewEvents)); - } - catch (System.Exception ) { - } - } - - protected override void DetachSink() { - try { - this.cookie.Disconnect(); - } - catch (System.Exception ) { - } - } - - protected override void AttachInterfaces() { - try { - this.ocx = ((MSHelpControls.IHxTreeView)(this.GetOcx())); - } - catch (System.Exception ) { - } - } - - internal void RaiseOnNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) { - if ((this.NodeClick != null)) { - this.NodeClick(sender, e); - } - } - - internal void RaiseOnNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) { - if ((this.NodeRightClick != null)) { - this.NodeRightClick(sender, e); - } - } - } - - public delegate void IHxTreeViewEvents_NodeClickEventHandler(object sender, IHxTreeViewEvents_NodeClickEvent e); - - public class IHxTreeViewEvents_NodeClickEvent { - - public int hNode; - - public IHxTreeViewEvents_NodeClickEvent(int hNode) { - this.hNode = hNode; - } - } - - public delegate void IHxTreeViewEvents_NodeRightClickEventHandler(object sender, IHxTreeViewEvents_NodeRightClickEvent e); - - public class IHxTreeViewEvents_NodeRightClickEvent { - - public int hNode; - - public int x; - - public int y; - - public IHxTreeViewEvents_NodeRightClickEvent(int hNode, int x, int y) { - this.hNode = hNode; - this.x = x; - this.y = y; - } - } - - [System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] - public class AxHxTocCtrlEventMulticaster : MSHelpControls.IHxTreeViewEvents { - - private AxHxTocCtrl parent; - - public AxHxTocCtrlEventMulticaster(AxHxTocCtrl parent) { - this.parent = parent; - } - - public virtual void NodeClick(int hNode) { - IHxTreeViewEvents_NodeClickEvent nodeclickEvent = new IHxTreeViewEvents_NodeClickEvent(hNode); - this.parent.RaiseOnNodeClick(this.parent, nodeclickEvent); - } - - public virtual void NodeRightClick(int hNode, int x, int y) { - IHxTreeViewEvents_NodeRightClickEvent noderightclickEvent = new IHxTreeViewEvents_NodeRightClickEvent(hNode, x, y); - this.parent.RaiseOnNodeRightClick(this.parent, noderightclickEvent); - } - } - - [System.Windows.Forms.AxHost.ClsidAttribute("{314111c6-a502-11d2-bbca-00c04f8ec294}")] - [System.ComponentModel.DesignTimeVisibleAttribute(true)] - public class AxHxIndexCtrl : System.Windows.Forms.AxHost { - - private MSHelpControls.IHxIndexView ocx; - - private AxHxIndexCtrlEventMulticaster eventMulticaster; - - private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; - - public AxHxIndexCtrl() : - base("314111c6-a502-11d2-bbca-00c04f8ec294") { - } - - [System.ComponentModel.Browsable(false)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16384)] - public virtual MSHelpServices.IHxIndex IndexData { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.IndexData; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.IndexData = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16385)] - public virtual int Selection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Selection; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Selection = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-501)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public override System.Drawing.Color BackColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.BackColor))); - } - else { - return base.BackColor; - } - } - set { - base.BackColor = value; - if ((this.ocx != null)) { - this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-513)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public override System.Drawing.Color ForeColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); - } - else { - return base.ForeColor; - } - } - set { - base.ForeColor = value; - if ((this.ocx != null)) { - this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-504)] - public virtual MSHelpControls.HxBorderStyle BorderStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.BorderStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.BorderStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-520)] - public virtual MSHelpControls.HxAppearanceConstant Appearance { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Appearance; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Appearance = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-521)] - public virtual MSHelpControls.HxMousePointerConstant MousePointer { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.MousePointer; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.MousePointer = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-512)] - [System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Font Font { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetFontFromIFont(this.ocx.Font); - } - else { - return base.Font; - } - } - set { - base.Font = value; - if ((this.ocx != null)) { - this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16388)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color HighlightForeColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.HighlightForeColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HighlightForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16389)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color HighlightBackColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.HighlightBackColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HighlightBackColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16390)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color FocusHighlightForeColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightForeColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FocusHighlightForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16391)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color FocusHighlightBackColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightBackColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FocusHighlightBackColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16392)] - public virtual short LangId { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LangId; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LangId = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16393)] - public virtual MSHelpControls.HxFontSourceConstant FontSource { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.FontSource; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FontSource = value; - } - } - - public event IHxIndexViewEvents_ItemClickEventHandler ItemClick; - - public event IHxIndexViewEvents_ItemSelectEventHandler ItemSelect; - - public virtual void SelectItem(int iItem) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SelectItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.SelectItem(iItem); - } - - public virtual void ClickItem(int iItem) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ClickItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.ClickItem(iItem); - } - - public override void Refresh() { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Refresh(); - } - - protected override void CreateSink() { - try { - this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); - this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); - } - catch (System.Exception ) { - } - } - - protected override void DetachSink() { - try { - this.cookie.Disconnect(); - } - catch (System.Exception ) { - } - } - - protected override void AttachInterfaces() { - try { - this.ocx = ((MSHelpControls.IHxIndexView)(this.GetOcx())); - } - catch (System.Exception ) { - } - } - - internal void RaiseOnItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) { - if ((this.ItemClick != null)) { - this.ItemClick(sender, e); - } - } - - internal void RaiseOnItemSelect(object sender, IHxIndexViewEvents_ItemSelectEvent e) { - if ((this.ItemSelect != null)) { - this.ItemSelect(sender, e); - } - } - } - - public delegate void IHxIndexViewEvents_ItemClickEventHandler(object sender, IHxIndexViewEvents_ItemClickEvent e); - - public class IHxIndexViewEvents_ItemClickEvent { - - public int iItem; - - public IHxIndexViewEvents_ItemClickEvent(int iItem) { - this.iItem = iItem; - } - } - - public delegate void IHxIndexViewEvents_ItemSelectEventHandler(object sender, IHxIndexViewEvents_ItemSelectEvent e); - - public class IHxIndexViewEvents_ItemSelectEvent { - - public int iItem; - - public IHxIndexViewEvents_ItemSelectEvent(int iItem) { - this.iItem = iItem; - } - } - - [System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] - public class AxHxIndexCtrlEventMulticaster : MSHelpControls.IHxIndexViewEvents { - - private AxHxIndexCtrl parent; - - public AxHxIndexCtrlEventMulticaster(AxHxIndexCtrl parent) { - this.parent = parent; - } - - public virtual void ItemClick(int iItem) { - IHxIndexViewEvents_ItemClickEvent itemclickEvent = new IHxIndexViewEvents_ItemClickEvent(iItem); - this.parent.RaiseOnItemClick(this.parent, itemclickEvent); - } - - public virtual void ItemSelect(int iItem) { - IHxIndexViewEvents_ItemSelectEvent itemselectEvent = new IHxIndexViewEvents_ItemSelectEvent(iItem); - this.parent.RaiseOnItemSelect(this.parent, itemselectEvent); - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2ControlsValidation.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2ControlsValidation.cs deleted file mode 100644 index 04c27ed8d8..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2ControlsValidation.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.IO; - using Microsoft.Win32; - - public sealed class Help2ControlsValidation - { - Help2ControlsValidation() - { - } - - public static bool IsTocControlRegistered - { - get - { - return IsClassRegistered("{314111b8-a502-11d2-bbca-00c04f8ec294}"); - } - } - - public static bool IsIndexControlRegistered - { - get - { - return IsClassRegistered("{314111c6-a502-11d2-bbca-00c04f8ec294}"); - } - } - - private static bool IsClassRegistered(string classId) - { - try - { - RegistryKey tmp = Registry.ClassesRoot.OpenSubKey - (string.Format(null, @"CLSID\{0}\InprocServer32", classId), false); - string help2Library = (string)tmp.GetValue("", string.Empty); - tmp.Close(); - return (!string.IsNullOrEmpty(help2Library) && File.Exists(help2Library)); - } - catch (System.NullReferenceException) - { - } - return false; - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2RegistryWalker.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2RegistryWalker.cs deleted file mode 100644 index e93c0083cd..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/Help2RegistryWalker.cs +++ /dev/null @@ -1,180 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.Runtime.InteropServices; - using System.Windows.Forms; - - using MSHelpServices; - - public sealed class Help2RegistryWalker - { - Help2RegistryWalker() - { - } - - public static bool BuildNamespacesList(ComboBox help2Collections, string selectedHelp2Collection) - { - if (help2Collections == null) - { - throw new ArgumentNullException("help2Collections"); - } - - HxRegistryWalkerClass registryWalker; - IHxRegNamespaceList help2Namespaces; - try - { - registryWalker = new HxRegistryWalkerClass(); - help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); - } - catch (System.Runtime.InteropServices.COMException) - { - help2Namespaces = null; - registryWalker = null; - } - - if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) - { - return false; - } - - help2Collections.Items.Clear(); - help2Collections.BeginUpdate(); - try - { - string currentDescription = string.Empty; - - foreach (IHxRegNamespace currentNamespace in help2Namespaces) - { - help2Collections.Items.Add - ((string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription)); - - if (!string.IsNullOrEmpty(selectedHelp2Collection) && - string.Compare(selectedHelp2Collection, currentNamespace.Name) == 0) - { - currentDescription = - (string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription); - } - } - - if (!string.IsNullOrEmpty(currentDescription)) - help2Collections.SelectedIndex = help2Collections.Items.IndexOf(currentDescription); - else - help2Collections.SelectedIndex = 0; - } - finally - { - help2Collections.EndUpdate(); - } - return true; - } - - public static string GetNamespaceName(string description) - { - HxRegistryWalkerClass registryWalker; - IHxRegNamespaceList help2Namespaces; - try - { - registryWalker = new HxRegistryWalkerClass(); - help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); - } - catch (System.Runtime.InteropServices.COMException) - { - help2Namespaces = null; - registryWalker = null; - } - - if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) - { - return string.Empty; - } - foreach (IHxRegNamespace currentNamespace in help2Namespaces) - { - string currentDescription = - (string)currentNamespace.GetProperty(HxRegNamespacePropId.HxRegNamespaceDescription); - if (string.Compare(currentDescription, description) == 0) - { - return currentNamespace.Name; - } - } - return string.Empty; - } - - public static string GetFirstNamespace(string name) - { - HxRegistryWalkerClass registryWalker; - IHxRegNamespaceList help2Namespaces; - try - { - registryWalker = new HxRegistryWalkerClass(); - help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); - } - catch (System.Runtime.InteropServices.COMException) - { - help2Namespaces = null; - registryWalker = null; - } - - if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0) - { - return string.Empty; - } - foreach (IHxRegNamespace currentNamespace in help2Namespaces) - { - if (string.Compare(currentNamespace.Name, name) == 0) - { - return name; - } - } - return help2Namespaces.ItemAt(1).Name; - } - - public static string GetFirstMatchingNamespaceName(string matchingName) - { - HxRegistryWalkerClass registryWalker; - IHxRegNamespaceList help2Namespaces; - try - { - registryWalker = new HxRegistryWalkerClass(); - help2Namespaces = registryWalker.get_RegisteredNamespaceList(""); - - if (registryWalker == null || help2Namespaces == null || help2Namespaces.Count == 0 || string.IsNullOrEmpty(matchingName)) - { - return string.Empty; - } - foreach (IHxRegNamespace currentNamespace in help2Namespaces) - { - if (NativeMethods.PathMatchSpec(currentNamespace.Name, matchingName)) - { - return currentNamespace.Name; - } - } - return help2Namespaces.ItemAt(1).Name; - } - catch (System.Runtime.InteropServices.COMException) - { - return string.Empty; - } - } - - } - - internal class NativeMethods - { - NativeMethods() - { - } - - #region PatchMatchSpec - [DllImport("shlwapi.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool PathMatchSpec(string pwszFile, string pwszSpec); - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Dialog.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Dialog.cs deleted file mode 100644 index b0e7a15f3b..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Dialog.cs +++ /dev/null @@ -1,123 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.Drawing; - using System.Windows.Forms; - - public class IconPictureBox : PictureBox - { - private Icon icon; - - public Icon Icon - { - get - { - return this.icon; - } - set - { - if (value == null) - { - throw new ArgumentNullException("value"); - } - else - { - this.icon = value; - base.Image = this.icon.ToBitmap(); - } - } - } - - protected override void OnPaint(PaintEventArgs e) - { - e.Graphics.DrawIconUnstretched(this.icon, base.ClientRectangle); - } - } - - public class HtmlHelp2Dialog : Form - { - private IconPictureBox pictureBox1; - private System.Windows.Forms.Label actionLabel; - - public string ActionLabel - { - get { return actionLabel.Text; } - set { actionLabel.Text = value; } - } - - public Icon ActionIcon - { - get { return pictureBox1.Icon; } - set - { - if (value == null) - { - throw new ArgumentNullException("value"); - } - else - { - pictureBox1.Icon = value; - } - } - } - - public HtmlHelp2Dialog() - { - this.InitializeComponent(); - pictureBox1.Icon = SystemIcons.Question; - } - - #region Windows Forms Designer generated code - /// - /// This method is required for Windows Forms designer support. - /// Do not change the method contents inside the source code editor. The Forms designer might - /// not be able to load this method if it was changed manually. - /// - private void InitializeComponent() - { - this.actionLabel = new System.Windows.Forms.Label(); - this.pictureBox1 = new IconPictureBox(); - - this.SuspendLayout(); - // - // actionLabel - // - this.actionLabel.Location = new System.Drawing.Point(66, 16); - this.actionLabel.Name = "actionLabel"; - this.actionLabel.Size = new System.Drawing.Size(190, 64); - this.actionLabel.TabIndex = 1; - // - // pictureBox1 - // - this.pictureBox1.Location = new System.Drawing.Point(16, 16); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(32, 32); - this.pictureBox1.TabIndex = 0; - this.pictureBox1.TabStop = false; - // - // HtmlHelp2Dialog - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.ClientSize = new System.Drawing.Size(268, 96); - this.Controls.Add(this.actionLabel); - this.Controls.Add(this.pictureBox1); - this.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.ControlBox = false; - this.Name = "HtmlHelp2Dialog"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; -// this.Text = "HtmlHelp2Dialog"; - this.ResumeLayout(false); - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Options.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Options.cs deleted file mode 100644 index dc60ae5a64..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Options.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using ICSharpCode.SharpDevelop.Gui.OptionPanels; - using System; - using System.Windows.Forms; - using System.Xml.Serialization; - using ICSharpCode.SharpDevelop.Gui; - - public class HtmlHelp2OptionsPanel : XmlFormsOptionPanel - { - ComboBox help2Collections; - CheckBox tocPictures; - string selectedHelp2Collection = string.Empty; - - public override void LoadPanelContents() - { - SetupFromXmlStream - (this.GetType().Assembly.GetManifestResourceStream("HtmlHelp2.Resources.HtmlHelp2Options.xfrm")); - this.InitializeComponents(); - } - - public override bool StorePanelContents() - { - this.SaveHelp2Config(); - HtmlHelp2Environment.ReloadNamespace(); - return true; - } - - private void InitializeComponents() - { - selectedHelp2Collection = HtmlHelp2Environment.DefaultNamespaceName; - - help2Collections = (ComboBox)ControlDictionary["help2Collections"]; - help2Collections.SelectedIndexChanged += new EventHandler(this.NamespaceNameChanged); - - tocPictures = (CheckBox)ControlDictionary["tocPictures"]; - tocPictures.Checked = HtmlHelp2Environment.Config.TocPictures; - - if (!Help2RegistryWalker.BuildNamespacesList(help2Collections, selectedHelp2Collection)) - { - help2Collections.Enabled = false; - tocPictures.Enabled = false; - } - } - - private void NamespaceNameChanged(object sender, EventArgs e) - { - if (help2Collections.SelectedItem != null) - { - selectedHelp2Collection = - Help2RegistryWalker.GetNamespaceName(help2Collections.SelectedItem.ToString()); - } - } - - private void SaveHelp2Config() - { - HtmlHelp2Environment.Config.SelectedCollection = selectedHelp2Collection; - HtmlHelp2Environment.Config.TocPictures = tocPictures.Checked; - HtmlHelp2Environment.SaveConfiguration(); - } - } - - [XmlRoot("help2environment")] - public class HtmlHelp2Options - { - private string selectedCollection = string.Empty; - private bool tocPictures; - private bool dynamicHelpDebugInfo; - - [XmlElement("collection")] - public string SelectedCollection - { - get { return selectedCollection; } - set { selectedCollection = value; } - } - - [XmlElement("tocpictures")] - public bool TocPictures - { - get { return tocPictures; } - set { tocPictures = value; } - } - - [XmlElement("dhdebuginfos")] - public bool DynamicHelpDebugInfos - { - get { return this.dynamicHelpDebugInfo; } - set { this.dynamicHelpDebugInfo = value; } - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Service.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Service.cs deleted file mode 100644 index a95e1bc16e..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/HtmlHelp2Service.cs +++ /dev/null @@ -1,407 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.Globalization; - using System.IO; - using System.Windows.Forms; - using System.Xml.Serialization; - - using ICSharpCode.Core; - using MSHelpServices; - - public sealed class HtmlHelp2Environment - { - static Guid TocGuid = new Guid("314111B2-A502-11D2-BBCA-00C04F8EC294"); - static Guid IndexGuid = new Guid("314111CC-A502-11D2-BBCA-00C04F8EC294"); - static Guid QueryGuid = new Guid("31411193-A502-11D2-BBCA-00C04F8EC294"); - static HxSession session; - static IHxRegFilterList namespaceFilters; - static IHxQuery fulltextSearch; - static IHxIndex dynamicHelp; - static string defaultNamespaceName; - static string currentSelectedFilterQuery; - static string currentSelectedFilterName; - static string defaultPage = "about:blank"; - static string searchPage = "http://msdn.microsoft.com"; - static bool dynamicHelpIsBusy; - static HtmlHelp2Options config = new HtmlHelp2Options(); - - HtmlHelp2Environment() - { - } - - static HtmlHelp2Environment() - { - InitializeNamespace(); - } - - #region Properties - public static bool SessionIsInitialized - { - get { return session != null; } - } - - public static string DefaultNamespaceName - { - get { return defaultNamespaceName; } - } - - public static string CurrentFilterQuery - { - get { return currentSelectedFilterQuery; } - } - - public static string CurrentFilterName - { - get { return currentSelectedFilterName; } - } - - public static string DefaultPage - { - get { return defaultPage; } - } - - public static string SearchPage - { - get { return searchPage; } - } - - public static IHxQuery Fts - { - get { return fulltextSearch; } - } - - public static bool DynamicHelpIsBusy - { - get { return dynamicHelpIsBusy; } - } - - public static HtmlHelp2Options Config - { - get { return config; } - } - #endregion - - #region Namespace Functions - private static void LoadHelp2Config() - { - if (string.IsNullOrEmpty(defaultNamespaceName)) - { - defaultNamespaceName = - Help2RegistryWalker.GetFirstMatchingNamespaceName("MS.NETFramework.v20*"); - } - else - { - defaultNamespaceName = Help2RegistryWalker.GetFirstNamespace(defaultNamespaceName); - } - - LoadConfiguration(); - - if (!string.IsNullOrEmpty(config.SelectedCollection)) - { - defaultNamespaceName = - Help2RegistryWalker.GetFirstNamespace(config.SelectedCollection); - } - } - - public static void ReloadNamespace() - { - InitializeNamespace(); - OnNamespaceReloaded(EventArgs.Empty); - } - - private static void InitializeNamespace() - { - LoadHelp2Config(); - - if (string.IsNullOrEmpty(defaultNamespaceName)) - { - return; - } - - session = null; - - HtmlHelp2Dialog initDialog = new HtmlHelp2Dialog(); - try - { - initDialog.Text = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpUpdateCaption}"); - initDialog.ActionLabel = StringParser.Parse("${res:AddIns.HtmlHelp2.HelpUpdateInProgress}"); - initDialog.Show(); - Application.DoEvents(); - - currentSelectedFilterQuery = string.Empty; - currentSelectedFilterName = string.Empty; - - session = new HxSession(); - session.Initialize(String.Format(CultureInfo.InvariantCulture, "ms-help://{0}", defaultNamespaceName), 0); - namespaceFilters = session.GetFilterList(); - - ReloadDefaultPages(); - ReloadFTSSystem(); - ReloadDynamicHelpSystem(); - - LoggingService.Info("Help 2.0: Service sucessfully loaded"); - } - catch (System.Runtime.InteropServices.COMException cEx) - { - LoggingService.Error("Help 2.0: Cannot not initialize service; " + cEx.ToString()); - session = null; - } - finally - { - initDialog.Dispose(); - } - } - - private static void ReloadFTSSystem() - { - try - { - fulltextSearch = (IHxQuery)session.GetNavigationInterface - ("!DefaultFullTextSearch", currentSelectedFilterQuery, ref QueryGuid); - } - catch (System.Runtime.InteropServices.COMException) - { - fulltextSearch = null; - } - } - - private static void ReloadDynamicHelpSystem() - { - try - { - dynamicHelp = (IHxIndex)session.GetNavigationInterface - ("!DefaultContextWindowIndex", currentSelectedFilterQuery, ref IndexGuid); - } - catch (System.Runtime.InteropServices.COMException) - { - dynamicHelp = null; - } - } - - private static void ReloadDefaultPages() - { - defaultPage = GetDefaultPage("HomePage", "DefaultPage"); - searchPage = GetDefaultPage("SearchHelpPage", "SearchWebPage", "http://msdn.microsoft.com"); - } - - private static string GetDefaultPage(string pageName, string alternatePageName) - { - return GetDefaultPage(pageName, alternatePageName, "about:blank"); - } - - private static string GetDefaultPage(string pageName, string alternatePageName, string defaultValue) - { - if (string.IsNullOrEmpty(pageName) && string.IsNullOrEmpty(alternatePageName)) - { - throw new ArgumentNullException("pageName & alternatePageName"); - } - try - { - string result = string.Empty; - - IHxIndex namedUrlIndex = - (IHxIndex)session.GetNavigationInterface("!DefaultNamedUrlIndex", "", ref IndexGuid); - IHxTopicList topics = namedUrlIndex.GetTopicsFromString(pageName, 0); - - if (topics.Count == 0 && !string.IsNullOrEmpty(alternatePageName)) - { - topics = namedUrlIndex.GetTopicsFromString(alternatePageName, 0); - } - - if (topics.Count > 0) result = topics.ItemAt(1).URL; - if (string.IsNullOrEmpty(result)) result = defaultValue; - - return result; - } - catch (System.Runtime.InteropServices.COMException) - { - return defaultValue; - } - } - - public static IHxHierarchy GetTocHierarchy(string filterQuery) - { - IHxHierarchy defaultToc = - (IHxHierarchy)session.GetNavigationInterface("!DefaultTOC", filterQuery, ref TocGuid); - return defaultToc; - } - - public static IHxIndex GetIndex(string filterQuery) - { - IHxIndex defaultIndex = - (IHxIndex)session.GetNavigationInterface("!DefaultKeywordIndex", filterQuery, ref IndexGuid); - return defaultIndex; - } - - public static void BuildFilterList(ComboBox filterCombobox) - { - if (filterCombobox == null) - { - throw new ArgumentNullException("filterCombobox"); - } - - filterCombobox.Items.Clear(); - filterCombobox.BeginUpdate(); - - if (namespaceFilters == null || namespaceFilters.Count == 0) - { - filterCombobox.Items.Add - (StringParser.Parse("${res:AddIns.HtmlHelp2.DefaultEmptyFilter}")); - filterCombobox.SelectedIndex = 0; - } - else - { - foreach (IHxRegFilter filter in namespaceFilters) - { - string filterName = - (string)filter.GetProperty(HxRegFilterPropId.HxRegFilterName); - filterCombobox.Items.Add(filterName); - - if (string.IsNullOrEmpty(currentSelectedFilterName)) - { - currentSelectedFilterName = filterName; - } - } - - if (string.IsNullOrEmpty(currentSelectedFilterName)) - filterCombobox.SelectedIndex = 0; - else - filterCombobox.SelectedIndex = filterCombobox.Items.IndexOf(currentSelectedFilterName); - } - filterCombobox.EndUpdate(); - } - - public static string FindFilterQuery(string filterName) - { - if (string.Compare(filterName, currentSelectedFilterName) == 0) - { - return currentSelectedFilterQuery; - } - if (namespaceFilters == null || namespaceFilters.Count == 0) - { - return string.Empty; - } - - IHxRegFilter filter = namespaceFilters.FindFilter(filterName); - if (filter == null) - { - return string.Empty; - } - - currentSelectedFilterName = filterName; - currentSelectedFilterQuery = - (string)filter.GetProperty(HxRegFilterPropId.HxRegFilterQuery); - - OnFilterQueryChanged(EventArgs.Empty); - - try - { - ReloadFTSSystem(); - ReloadDynamicHelpSystem(); - ReloadDefaultPages(); - } - catch (System.Runtime.InteropServices.COMException cEx) - { - LoggingService.Error("Help 2.0: Cannot not initialize service; " + cEx.ToString()); - } - return currentSelectedFilterQuery; - } - - public static IHxTopicList GetMatchingTopicsForDynamicHelp(string searchTerm) - { - if (dynamicHelpIsBusy || dynamicHelp == null || string.IsNullOrEmpty(searchTerm)) - { - return null; - } - IHxTopicList topics; - try - { - dynamicHelpIsBusy = true; - topics = dynamicHelp.GetTopicsFromString(searchTerm, 0); - LoggingService.Info("Help 2.0: Dynamic Help called"); - } - catch (System.Runtime.InteropServices.COMException) - { - LoggingService.Error("Help 2.0: Dynamic Help search failed"); - topics = null; - } - finally - { - dynamicHelpIsBusy = false; - } - return topics; - } - #endregion - - #region Event Handling - public static event EventHandler FilterQueryChanged; - public static event EventHandler NamespaceReloaded; - - private static void OnFilterQueryChanged(EventArgs e) - { - if(FilterQueryChanged != null) - { - FilterQueryChanged(null, e); - } - } - - private static void OnNamespaceReloaded(EventArgs e) - { - if(NamespaceReloaded != null) - { - NamespaceReloaded(null, e); - } - } - #endregion - - #region Configuration - public static void LoadConfiguration() - { - string configFile = Path.Combine(PropertyService.ConfigDirectory, "help2environment.xml"); - if (!File.Exists(configFile)) - { - return; - } - try - { - XmlSerializer serialize = new XmlSerializer(typeof(HtmlHelp2Options)); - TextReader file = new StreamReader(configFile); - config = (HtmlHelp2Options)serialize.Deserialize(file); - file.Close(); - - LoggingService.Info("Help 2.0: Configuration successfully loaded"); - } - catch (InvalidOperationException) - { - LoggingService.Error("Help 2.0: Error while trying to load configuration"); - } - } - - public static void SaveConfiguration() - { - string configFile = Path.Combine(PropertyService.ConfigDirectory, "help2environment.xml"); - try - { - XmlSerializer serialize = new XmlSerializer(typeof(HtmlHelp2Options)); - TextWriter file = new StreamWriter(configFile); - serialize.Serialize(file, config); - file.Close(); - - LoggingService.Info("Help 2.0: Configuration successfully saved"); - } - catch (InvalidOperationException) - { - LoggingService.Error("Help 2.0: Error while trying to save configuration"); - } - } - #endregion - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/ResourcesHelper.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/ResourcesHelper.cs deleted file mode 100644 index 189e3a904e..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/ResourcesHelper.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.Drawing; - using System.Reflection; - using System.Resources; - - public sealed class ResourcesHelper - { - static ResourcesHelper instance = new ResourcesHelper(); - - public static Bitmap GetBitmap(string resourceName) - { - Assembly assembly = typeof(ResourcesHelper).Assembly; - string fullName = string.Format(null, "HtmlHelp2.Resources.{0}", resourceName); - return new Bitmap(assembly.GetManifestResourceStream(fullName)); - } - - public static Image GetImage(string imageName) - { - return instance.ImageResourceHelper.GetObject(imageName) as Image; - } - - ResourceManager ImageResourceHelper; - - ResourcesHelper() - { - ImageResourceHelper = new ResourceManager("HtmlHelp2.Resources", GetType().Assembly); - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/SharpDevLanguageClass.cs b/src/AddIns/Misc/HtmlHelp2/Project/src/Service/SharpDevLanguageClass.cs deleted file mode 100644 index 59750cf2df..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/src/Service/SharpDevLanguageClass.cs +++ /dev/null @@ -1,131 +0,0 @@ -// -// -// -// -// $Revision$ -// - -namespace HtmlHelp2.Environment -{ - using System; - using System.Collections.Generic; - using ICSharpCode.SharpDevelop; - using ICSharpCode.SharpDevelop.Project; - using MSHelpServices; - - public sealed class SharpDevLanguage - { - static Dictionary languages = InitializeLanguages(); - - static Dictionary InitializeLanguages() - { - Dictionary result = new Dictionary(); - result.Add("C#", "CSharp"); - result.Add("VBNet", "VB"); - - return result; - } - - SharpDevLanguage() - { - } - - private static int DevLangCounter(IHxTopic topic) - { - if (topic == null) - { - return 0; - } - - int counter = 0; - IHxAttributeList topicAttributes = topic.Attributes; - if (topicAttributes == null || topicAttributes.Count == 0) - { - return 0; - } - - foreach (IHxAttribute attr in topicAttributes) - { - if (String.Compare(attr.DisplayName, "DevLang") == 0) - { - counter++; - } - } - return counter; - } - - public static bool CheckTopicLanguage(IHxTopic topic) - { - if (ProjectService.CurrentProject != null) - { - return CheckTopicLanguage(topic, ProjectService.CurrentProject.Language); - } - else - { - return true; - } - } - - public static bool CheckTopicLanguage(IHxTopic topic, string expectedLanguage) - { - if (string.IsNullOrEmpty(expectedLanguage)) - { - return true; - } - if (topic == null) - { - return false; - } - - string tempLanguage = String.Empty; - if (!languages.ContainsKey(expectedLanguage) || - !languages.TryGetValue(expectedLanguage, out tempLanguage)) - { - tempLanguage = expectedLanguage; - } - - return (string.IsNullOrEmpty(tempLanguage) || topic.HasAttribute("DevLang", tempLanguage)); - } - - public static bool CheckUniqueTopicLanguage(IHxTopic topic) - { - if (ProjectService.CurrentProject != null) - { - return CheckUniqueTopicLanguage(topic, ProjectService.CurrentProject.Language); - } - else - { - return CheckUniqueTopicLanguage(topic, string.Empty); - } - } - - public static bool CheckUniqueTopicLanguage(IHxTopic topic, string expectedLanguage) - { - return (CheckTopicLanguage(topic, expectedLanguage) && DevLangCounter(topic) == 1); - } - - public static string GetPatchedLanguage() - { - if (ProjectService.CurrentProject == null) - return GetPatchedLanguage(AmbienceService.DefaultAmbienceName); - else - return GetPatchedLanguage(ProjectService.CurrentProject.Language); - } - - public static string GetPatchedLanguage(string expectedLanguage) - { - string tempLanguage = expectedLanguage; - - if (!string.IsNullOrEmpty(tempLanguage)) - { - if (!languages.ContainsKey(expectedLanguage) || - !languages.TryGetValue(expectedLanguage, out tempLanguage)) - { - tempLanguage = expectedLanguage; - } - } - - return tempLanguage; - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/AxMSHelpControls.cs b/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/AxMSHelpControls.cs deleted file mode 100644 index 4dd8f3ff61..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/AxMSHelpControls.cs +++ /dev/null @@ -1,769 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50215.44 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -[assembly: System.Reflection.AssemblyVersion("1.0.0.0")] -[assembly: System.Windows.Forms.AxHost.TypeLibraryTimeStamp("09.04.2005 00:38:34")] - -namespace AxMSHelpControls { - - - [System.Windows.Forms.AxHost.ClsidAttribute("{314111b8-a502-11d2-bbca-00c04f8ec294}")] - [System.ComponentModel.DesignTimeVisibleAttribute(true)] - public class AxHxTocCtrl : System.Windows.Forms.AxHost { - - private MSHelpControls.IHxTreeView ocx; - - private AxHxTocCtrlEventMulticaster eventMulticaster; - - private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; - - public AxHxTocCtrl() : - base("314111b8-a502-11d2-bbca-00c04f8ec294") { - } - - [System.ComponentModel.Browsable(false)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4096)] - public virtual MSHelpServices.IHxHierarchy Hierarchy { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Hierarchy; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Hierarchy", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Hierarchy = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4100)] - public virtual int ImageList { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.ImageList; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ImageList", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.ImageList = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4097)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual bool HideSelection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.HideSelection; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HideSelection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HideSelection = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4098)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxTreeLineStyleConstant LineStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LineStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LineStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LineStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4099)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxTreeStyleConstant TreeStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.TreeStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("TreeStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.TreeStyle = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-501)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Color BackColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.BackColor))); - } - else { - return base.BackColor; - } - } - set { - base.BackColor = value; - if ((this.ocx != null)) { - this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-513)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Color ForeColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); - } - else { - return base.ForeColor; - } - } - set { - base.ForeColor = value; - if ((this.ocx != null)) { - this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-504)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxBorderStyle BorderStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.BorderStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.BorderStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-520)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxAppearanceConstant Appearance { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Appearance; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Appearance = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-521)] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public virtual MSHelpControls.HxMousePointerConstant MousePointer { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.MousePointer; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.MousePointer = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-512)] - [System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Font Font { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetFontFromIFont(this.ocx.Font); - } - else { - return base.Font; - } - } - set { - base.Font = value; - if ((this.ocx != null)) { - this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4102)] - public virtual int Selection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Selection; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4103)] - public virtual short LangId { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LangId; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LangId = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(4104)] - public virtual MSHelpControls.HxFontSourceConstant FontSource { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.FontSource; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FontSource = value; - } - } - - public event IHxTreeViewEvents_NodeClickEventHandler NodeClick; - - public event IHxTreeViewEvents_NodeRightClickEventHandler NodeRightClick; - - public virtual void Refresh() { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Refresh(); - } - - public virtual void Synchronize(string bstrURL) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Synchronize", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Synchronize(bstrURL); - } - - protected override void CreateSink() { - try { - this.eventMulticaster = new AxHxTocCtrlEventMulticaster(this); - this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxTreeViewEvents)); - } - catch (System.Exception ) { - } - } - - protected override void DetachSink() { - try { - this.cookie.Disconnect(); - } - catch (System.Exception ) { - } - } - - protected override void AttachInterfaces() { - try { - this.ocx = ((MSHelpControls.IHxTreeView)(this.GetOcx())); - } - catch (System.Exception ) { - } - } - - internal void RaiseOnNodeClick(object sender, IHxTreeViewEvents_NodeClickEvent e) { - if ((this.NodeClick != null)) { - this.NodeClick(sender, e); - } - } - - internal void RaiseOnNodeRightClick(object sender, IHxTreeViewEvents_NodeRightClickEvent e) { - if ((this.NodeRightClick != null)) { - this.NodeRightClick(sender, e); - } - } - } - - public delegate void IHxTreeViewEvents_NodeClickEventHandler(object sender, IHxTreeViewEvents_NodeClickEvent e); - - public class IHxTreeViewEvents_NodeClickEvent { - - public int hNode; - - public IHxTreeViewEvents_NodeClickEvent(int hNode) { - this.hNode = hNode; - } - } - - public delegate void IHxTreeViewEvents_NodeRightClickEventHandler(object sender, IHxTreeViewEvents_NodeRightClickEvent e); - - public class IHxTreeViewEvents_NodeRightClickEvent { - - public int hNode; - - public int x; - - public int y; - - public IHxTreeViewEvents_NodeRightClickEvent(int hNode, int x, int y) { - this.hNode = hNode; - this.x = x; - this.y = y; - } - } - - [System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] - public class AxHxTocCtrlEventMulticaster : MSHelpControls.IHxTreeViewEvents { - - private AxHxTocCtrl parent; - - public AxHxTocCtrlEventMulticaster(AxHxTocCtrl parent) { - this.parent = parent; - } - - public virtual void NodeClick(int hNode) { - IHxTreeViewEvents_NodeClickEvent nodeclickEvent = new IHxTreeViewEvents_NodeClickEvent(hNode); - this.parent.RaiseOnNodeClick(this.parent, nodeclickEvent); - } - - public virtual void NodeRightClick(int hNode, int x, int y) { - IHxTreeViewEvents_NodeRightClickEvent noderightclickEvent = new IHxTreeViewEvents_NodeRightClickEvent(hNode, x, y); - this.parent.RaiseOnNodeRightClick(this.parent, noderightclickEvent); - } - } - - [System.Windows.Forms.AxHost.ClsidAttribute("{314111c6-a502-11d2-bbca-00c04f8ec294}")] - [System.ComponentModel.DesignTimeVisibleAttribute(true)] - public class AxHxIndexCtrl : System.Windows.Forms.AxHost { - - private MSHelpControls.IHxIndexView ocx; - - private AxHxIndexCtrlEventMulticaster eventMulticaster; - - private System.Windows.Forms.AxHost.ConnectionPointCookie cookie; - - public AxHxIndexCtrl() : - base("314111c6-a502-11d2-bbca-00c04f8ec294") { - } - - [System.ComponentModel.Browsable(false)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16384)] - public virtual MSHelpServices.IHxIndex IndexData { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.IndexData; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("IndexData", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.IndexData = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16385)] - public virtual int Selection { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Selection; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Selection", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Selection = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-501)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public override System.Drawing.Color BackColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.BackColor))); - } - else { - return base.BackColor; - } - } - set { - base.BackColor = value; - if ((this.ocx != null)) { - this.ocx.BackColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-513)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public override System.Drawing.Color ForeColor { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetColorFromOleColor(((uint)(this.ocx.ForeColor))); - } - else { - return base.ForeColor; - } - } - set { - base.ForeColor = value; - if ((this.ocx != null)) { - this.ocx.ForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-504)] - public virtual MSHelpControls.HxBorderStyle BorderStyle { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.BorderStyle; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("BorderStyle", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.BorderStyle = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-520)] - public virtual MSHelpControls.HxAppearanceConstant Appearance { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.Appearance; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Appearance", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.Appearance = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-521)] - public virtual MSHelpControls.HxMousePointerConstant MousePointer { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.MousePointer; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("MousePointer", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.MousePointer = value; - } - } - - [System.ComponentModel.Browsable(true)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(-512)] - [System.Runtime.InteropServices.ComAliasNameAttribute("stdole.StdFont")] - [System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)] - public override System.Drawing.Font Font { - get { - if (((this.ocx != null) - && (this.PropsValid() == true))) { - return GetFontFromIFont(this.ocx.Font); - } - else { - return base.Font; - } - } - set { - base.Font = value; - if ((this.ocx != null)) { - this.ocx.Font = ((stdole.StdFont)(GetIFontFromFont(value))); - } - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16388)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color HighlightForeColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.HighlightForeColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HighlightForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16389)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color HighlightBackColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.HighlightBackColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("HighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.HighlightBackColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16390)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color FocusHighlightForeColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightForeColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightForeColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FocusHighlightForeColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16391)] - [System.Runtime.InteropServices.ComAliasNameAttribute("System.UInt32")] - public virtual System.Drawing.Color FocusHighlightBackColor { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return GetColorFromOleColor(((uint)(this.ocx.FocusHighlightBackColor))); - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FocusHighlightBackColor", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FocusHighlightBackColor = ((uint)(GetOleColorFromColor(value))); - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16392)] - public virtual short LangId { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.LangId; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("LangId", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.LangId = value; - } - } - - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - [System.Runtime.InteropServices.DispIdAttribute(16393)] - public virtual MSHelpControls.HxFontSourceConstant FontSource { - get { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertyGet); - } - return this.ocx.FontSource; - } - set { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("FontSource", System.Windows.Forms.AxHost.ActiveXInvokeKind.PropertySet); - } - this.ocx.FontSource = value; - } - } - - public event IHxIndexViewEvents_ItemClickEventHandler ItemClick; - - public event IHxIndexViewEvents_ItemSelectEventHandler ItemSelect; - - public virtual void SelectItem(int iItem) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("SelectItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.SelectItem(iItem); - } - - public virtual void ClickItem(int iItem) { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("ClickItem", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.ClickItem(iItem); - } - - public virtual void Refresh() { - if ((this.ocx == null)) { - throw new System.Windows.Forms.AxHost.InvalidActiveXStateException("Refresh", System.Windows.Forms.AxHost.ActiveXInvokeKind.MethodInvoke); - } - this.ocx.Refresh(); - } - - protected override void CreateSink() { - try { - this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); - this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); - } - catch (System.Exception ) { - } - } - - protected override void DetachSink() { - try { - this.cookie.Disconnect(); - } - catch (System.Exception ) { - } - } - - protected override void AttachInterfaces() { - try { - this.ocx = ((MSHelpControls.IHxIndexView)(this.GetOcx())); - } - catch (System.Exception ) { - } - } - - internal void RaiseOnItemClick(object sender, IHxIndexViewEvents_ItemClickEvent e) { - if ((this.ItemClick != null)) { - this.ItemClick(sender, e); - } - } - - internal void RaiseOnItemSelect(object sender, IHxIndexViewEvents_ItemSelectEvent e) { - if ((this.ItemSelect != null)) { - this.ItemSelect(sender, e); - } - } - } - - public delegate void IHxIndexViewEvents_ItemClickEventHandler(object sender, IHxIndexViewEvents_ItemClickEvent e); - - public class IHxIndexViewEvents_ItemClickEvent { - - public int iItem; - - public IHxIndexViewEvents_ItemClickEvent(int iItem) { - this.iItem = iItem; - } - } - - public delegate void IHxIndexViewEvents_ItemSelectEventHandler(object sender, IHxIndexViewEvents_ItemSelectEvent e); - - public class IHxIndexViewEvents_ItemSelectEvent { - - public int iItem; - - public IHxIndexViewEvents_ItemSelectEvent(int iItem) { - this.iItem = iItem; - } - } - - [System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)] - public class AxHxIndexCtrlEventMulticaster : MSHelpControls.IHxIndexViewEvents { - - private AxHxIndexCtrl parent; - - public AxHxIndexCtrlEventMulticaster(AxHxIndexCtrl parent) { - this.parent = parent; - } - - public virtual void ItemClick(int iItem) { - IHxIndexViewEvents_ItemClickEvent itemclickEvent = new IHxIndexViewEvents_ItemClickEvent(iItem); - this.parent.RaiseOnItemClick(this.parent, itemclickEvent); - } - - public virtual void ItemSelect(int iItem) { - IHxIndexViewEvents_ItemSelectEvent itemselectEvent = new IHxIndexViewEvents_ItemSelectEvent(iItem); - this.parent.RaiseOnItemSelect(this.parent, itemselectEvent); - } - } -} diff --git a/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpControls.dll b/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpControls.dll deleted file mode 100755 index a39e0c45268d62444de8620f628334a7d65d9416..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19456 zcmeHP3wV^(ng0IE{By~LTo6G)hnob1G=Zp4K|^jNnh+q0Xtl{?W(Wh5%s4Z_M2d|< zU1`;7>$YmG8^v}@ukLPJtG%VjV~f~6wo5Oz#m2&8OS@gyr57LD%D&(CUuP15XSdzQ zK2Hb#cfQ*>=R4o|{&UWM{)rve-9s7?>9|gwB>ED*`BN`=Y8ZjK^!%qv>GQ#F&;F9q z{_WXUZAoOq=}f9G6X_2}BLf4eT(~zL&I}HO69eI<&aQBODi*IUDGAN9s$SPj)UIe$ z{=!ch?AFGqbas&vAZmidFs1+5i|;V55nSwD7+Rfy%2mZGW0O+Kzmfzsy6DI1Z z&SW!DaN^qt2=s_raCtuU2uO7%o=m||d>w_7>$(D$=TlF_t>t~5?=@NWO(h?-E+$%c zF_DsIb>>WEjY@N1j`HPi1c`Q3!Q~Z|kT~2ML4{I77}-UOh$h%C%(G`s>~D7Lb%Kjd z{Z*wzA+9sa9hJOaZLxC`N zJ6vwkFs1Nnljh6_*P1ksK$w-V_c8r3ljckff6t`-Ok4E?nEtXUhiepm)}%vBx4}9>Q>^NtZBvw@IU?6y9&rQ<%Pw=?W!K1x{kH<3e<`LaCq>`X>@2Hyxeaxx@-a z7A}Q$B7QmoMd#KS#5su0$yilY*!8ge+u2u+VAaEjefFb((6k~J>|nK#L#&hvC55pK z8Gebp!9(Rleh0T>nx&?~=z=5MW2x~hus>a-z)O{a)RQ3ADD2OxAQ0dJf4HU<&swFW z-qbWy5eh>@MS{l4Pl6Wr*xH{u8wNR8sl@?F!l{=chsdPaPw_v6@Pxvc_o!QHxpZTG zB{QIQx*XWC2sNjWHX$R-nX>8<+nOU%buJVau=P|Y;8P{o%Xzr`Qe;z+-?)6^$&)7w zg8>UW9!Fkwd`$QL7RINtMyHuPZg#%fbCIMMQcu~*H{_yo zG50(GyNP+tX|t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j3@zf%PfFh>;cSV!^|=E&4cB4;~( z_qu6>XeKX?)@P=MH3{z$y6`q;Bimx~tb zCB9XQw!fM{D5y1pcPA})SChnhoHo2u*=+s(n1As{c$<-d1x|&akKp}E0$TIe%I~Jf z^>?9Ce(#loRRZ$9Nov|8HZ@d(_h_4eb$GXf7~stfzwc~Bef{_sN9i0|F;jG&N0*lN zhtb=J*ug~7c(K^no;RU}EZ$AAAL%?l!?3Tx+e?18XZCU(*2-vut>u?4BG@on6oA$r52phqXqI; nICU~U`Mwm6QsEd$C*CU1WB$GFf0=(8^j7ie?|%G0Mc{t`iNMNP diff --git a/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpServices.dll b/src/AddIns/Misc/HtmlHelp2/RequiredLibraries/MSHelpServices.dll deleted file mode 100755 index 6c5a7b75b8db5da585d517be343c164de5b231bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45056 zcmeHw3wT^rwf{b6GVe!b@@SGKz?2l)0xe0}0;M8plZHn6PG9n{nNFtd*l8xtOiBv{ zQi?(aY!S35puvL3Lj_Sm1q{>&CP z6k-!4qV#V_h)}8QQ24kIXo3FofuE~6A*K{kn+o8sJ{Jf&ZmShHIR1+Z(LE)X&n3Ze zY=a=kW+%Y$*NTKp$)z$`7;>ybP?Fss!132AgwC-;JW7scU^D}x85qsLXa+_zFq(nU z42))AGy|g<7|p={feiG~b2a|x+0+zn@qsBIGC~+6{CE6SHo3&nD2MW~fBJ1jsxNp*SB;wPnOrolm~l-YrlT@rqbg zAWl!ZSJa`(5Itn0R3p%JzBn}@ULk3iiuf!^yNGUX9H@)IO_NYeB;9;fpK$k8eh|CFR7L_a9$a-y#$y29{HgofLG zUJn{uVN{4L^epidYSGB^*I4Puquqh?Q!*u@zR4r#JOPd4yiY{H(hu36OtDf9Cx(&p zdVGAfKLvK8=nIpZGcCeApUQ9aTuTM471pQ9GD$11ST9%CRHQ}{)9 zT9C$|c>V$c2`-6;Jk6lAX}{TOxC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R|q zuC0_hM}Z>C=6A1}Emy2)2{ku`I_f*SLp}A4p~jB-*3QmO6zu2-g_=U4a7U-@y|cS# zMRzE)yuPD#Wplx@V~XWWg=(D1z;BpqI@WjfcH?VYZi6x;gz6ILe_LX>gx@8~T>@vU zwoR2wR13keI}tU#dqkXZWF8+XVvs=ai7ysOmq#CqSR*>kCG4|asC=%(a0&i_u^8ja zXk3!-&hDm`<)Nnf)}FS;`o_j^cYRw|caxKw=FZO6mPUNL%}JnE9P>FD;w^yvzDmJ& zi0t?5!pkatFs;yZ$7-PX)m+9DDlXC&RqRB#va_c()YclR@9b$>Ug*84{d}Q97dS4s z_pTd=+<-oetn0=}L6~stQKG(nih3S?tl-dpbg`^_^X9m^6)D zq58JgmTq)+IMmz|Uf$N$)?`Q7j7igoxm4fL)7t7+l|J zpOsjaJmJ{l>_Q5*d!~P&{)c729zpok=45GLJk1CvqVJTm-5T824H3PrGG||}tIZ$= zaSpx(*p0JX{4M~etJ@d@Yt( zdclo|CATVrH#5%42#vzJIA+hz&Tbs##!xPcZzVVbwr#t7TeZQdgR{#qxb0<*vqmW4 z#nOPNlKA86eQ1w@?*OuhC64bhVz4XDVFya)#Pcvp>_AQvs4)ZUEG%&l1<6(^Jq9Wd ziwvYe*e1|}JSwtM>XMQOE`e7
- + - - - - - - + + From 34a8c8b85ff503cf41ec1721b14ef65be9638a13 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Sun, 23 May 2010 15:33:30 +0000 Subject: [PATCH 12/79] new property for catalog class replaces the ToString() usage, fixed a misspelling in a debug message, options dialog uses data binding git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5843 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../HelpViewer/Source/Core/DisplayHelp.cs | 2 +- .../HelpViewer/Source/Core/Help3Catalog.cs | 10 ++--- .../HelpViewer/Source/Core/Help3Service.cs | 16 +++---- .../Source/Core/HelpLibraryAgent.cs | 2 +- .../HelpViewer/Source/Help3OptionsPanel.xaml | 16 +++++-- .../Source/Help3OptionsPanel.xaml.cs | 42 ++++++------------- .../Source/Helper/HelpClientWatcher.cs | 2 +- 7 files changed, 41 insertions(+), 49 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 7921dcc839..cdba04ac28 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -121,7 +121,7 @@ namespace MSHelpSystem.Core static void DisplayLocalHelp(string arguments) { // TODO: set "embedded" to TRUE if we have a TOC control or something similar - DisplayLocalHelp(arguments, true); + DisplayLocalHelp(arguments, false); } static void DisplayLocalHelp(string arguments, bool embedded) diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs index cb5157c16d..259b85bd84 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs @@ -42,6 +42,11 @@ namespace MSHelpSystem.Core { get { return displayName; } } + + public string ShortName + { + get { return string.Format(@"{0}/{1}/{2}", productCode, productVersion, productLocale); } + } public string CatalogPath { @@ -57,10 +62,5 @@ namespace MSHelpSystem.Core { get { return brandingPackage; } } - - public override string ToString() - { - return string.Format(@"{0}/{1}/{2}", productCode, productVersion, productLocale); - } } } \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs index 4b84a7405c..44be723831 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -67,17 +67,17 @@ namespace MSHelpSystem.Core static void Help3HasUpdatedTheCatalogs(object sender, EventArgs e) { if (string.IsNullOrEmpty(config.ActiveCatalogId)) { - config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ToString():string.Empty; + config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ShortName:string.Empty; } - activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsString(config.ActiveCatalogId); + activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsShortName(config.ActiveCatalogId); } static void Help3ActiveCatalogIdChanged(object sender, EventArgs e) { if (string.IsNullOrEmpty(config.ActiveCatalogId)) { - config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ToString():string.Empty; + config.ActiveCatalogId = (catalogs.Count > 0) ? catalogs[0].ShortName:string.Empty; } - activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsString(config.ActiveCatalogId); + activeCatalog = (string.IsNullOrEmpty(config.ActiveCatalogId)) ? null:FindCatalogByItsShortName(config.ActiveCatalogId); } static void Help3ConfigurationUpdated(object sender, EventArgs e) @@ -111,7 +111,7 @@ namespace MSHelpSystem.Core public static Help3Catalog FindCatalogByProductCode(string productCode) { foreach (Help3Catalog catalog in catalogs) { - if (string.Compare(productCode, catalog.ProductCode, true) == 0) { + if (productCode.Equals(catalog.ProductCode, StringComparison.InvariantCultureIgnoreCase)) { return catalog; } } @@ -121,17 +121,17 @@ namespace MSHelpSystem.Core public static Help3Catalog FindCatalogByDisplayName(string displayName) { foreach (Help3Catalog catalog in catalogs) { - if (string.Compare(displayName, catalog.DisplayName, true) == 0) { + if (displayName.Equals(catalog.DisplayName, StringComparison.InvariantCultureIgnoreCase)) { return catalog; } } return null; } - public static Help3Catalog FindCatalogByItsString(string stringValue) + public static Help3Catalog FindCatalogByItsShortName(string catalogString) { foreach (Help3Catalog catalog in catalogs) { - if (string.Compare(stringValue, catalog.ToString()) == 0) { + if (catalogString.Equals(catalog.ShortName, StringComparison.InvariantCultureIgnoreCase)) { return catalog; } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs index 2625d1f7ad..68627dca15 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs @@ -56,7 +56,7 @@ namespace MSHelpSystem.Core { Process[] agents = Process.GetProcessesByName("HelpLibAgent"); int processId = (agents.Length > 0) ? agents[0].Id:0; - LoggingService.Debug(string.Format("Help 3.0: Help library agent uses has the process ID \"{0}\"", processId)); + LoggingService.Debug(string.Format("Help 3.0: Help library agent has the process ID \"{0}\"", processId)); return processId; } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml index e7a7afbee4..c15d45ca78 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml @@ -7,12 +7,22 @@ > - + - - + + diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs index 65ed11f7bf..6472351cb3 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; using System.Windows.Forms; @@ -15,46 +17,26 @@ namespace MSHelpSystem public Help3OptionsPanel() { InitializeComponent(); - LoadCatalogs(); - onlineMode.IsChecked = !Help3Service.Config.OfflineMode; + Load(); } - void LoadCatalogs() + void Load() { HelpLibraryAgent.Start(); - - help3Catalogs.Items.Clear(); - if (Help3Service.Count > 0) { - foreach (Help3Catalog catalog in Help3Service.Items) { - LoggingService.Debug(string.Format("Help 3.0: Found help catalog \"{0}\"", catalog.ToString())); - ComboBoxItem cbi = new ComboBoxItem(); - cbi.Content = catalog.ToString(); - help3Catalogs.Items.Add(cbi); - } - } + DataContext = Help3Service.Items; // TODO: Needs a localization groupBox1.Header = string.Format("{0} ({1})", "Installed Help catalogs", Help3Service.Count); - - if (help3Catalogs.Items.Count == 1) help3Catalogs.SelectedIndex = 0; - else { - foreach (ComboBoxItem item in help3Catalogs.Items) { - if (string.Compare((string)item.Content, Help3Service.ActiveCatalog.ToString(), true) == 0) { - help3Catalogs.SelectedItem = item; - break; - } - } - // TODO: There has to be a much more elegant way to select the catalog?! - } - help3Catalogs.IsEnabled = (help3Catalogs.Items.Count > 1 && Help3Service.Config.OfflineMode); + help3Catalogs.SelectedValue = Help3Service.ActiveCatalog.ShortName; + help3Catalogs.IsEnabled = (Help3Service.Count > 1 && Help3Service.Config.OfflineMode); + onlineMode.IsChecked = !Help3Service.Config.OfflineMode; } void Help3CatalogsSelectionChanged(object sender, SelectionChangedEventArgs e) { - ComboBoxItem selectedItem = (ComboBoxItem)help3Catalogs.SelectedItem; - if (selectedItem == null) return; - string activeCatalog = (string)selectedItem.Content; - if (!string.IsNullOrEmpty(activeCatalog)) - Help3Service.ActiveCatalogId =activeCatalog; + string item = (string)help3Catalogs.SelectedValue; + if (!string.IsNullOrEmpty(item)) { + Help3Service.ActiveCatalogId = item; + } } void Help3OfflineModeClicked(object sender, RoutedEventArgs e) diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs index d4e7714b52..c346cc567c 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/HelpClientWatcher.cs @@ -40,7 +40,7 @@ namespace MSHelpSystem.Helper public static bool IsLocalHelp { - get { return string.Compare("offline", helpMode, true) == 0; } + get { return helpMode.Equals("offline", StringComparison.InvariantCultureIgnoreCase); } } public static void EnableLocalHelp() From daee118e459a2283bdd7c16472720f1d93c3dea9 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sun, 23 May 2010 17:27:59 +0000 Subject: [PATCH 13/79] Unit testing addin can now be extended with custom test runners. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5844 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Src/RunTestWithCodeCoverageCommand.cs | 20 +- .../Frontend/AddIn/Profiler.AddIn.csproj | 1 + .../Commands/RunTestWithProfilerCommand.cs | 72 +-- .../Frontend/AddIn/Src/ProfilerTestRunner.cs | 115 ++++ .../Src/AbstractRunTestCommands.cs | 332 +++++++++++ .../Src/BuildProjectBeforeTestRun.cs | 44 ++ .../UnitTesting/Src/EmptyUnitTestsPad.cs | 37 ++ .../Analysis/UnitTesting/Src/IAddInTree.cs | 17 + .../Analysis/UnitTesting/Src/IBuildOptions.cs | 16 + .../UnitTesting/Src/IBuildProjectFactory.cs | 17 + .../Src/IRegisteredTestFrameworks.cs | 26 + .../UnitTesting/Src/IRunTestCommandContext.cs | 25 + .../UnitTesting/Src/ITestFrameworkFactory.cs | 16 + .../UnitTesting/Src/ITestResultsMonitor.cs | 22 + .../Analysis/UnitTesting/Src/ITestRunner.cs | 21 + .../Src/IUnitTestDebuggerService.cs | 19 + .../UnitTesting/Src/IUnitTestFileService.cs | 18 + .../Src/IUnitTestMessageService.cs | 17 + .../UnitTesting/Src/IUnitTestProcessRunner.cs | 25 + .../Src/IUnitTestSaveAllFilesCommand.cs | 16 + .../UnitTesting/Src/IUnitTestTaskService.cs | 23 + .../UnitTesting/Src/IUnitTestWorkbench.cs | 19 + .../Analysis/UnitTesting/Src/IUnitTestsPad.cs | 21 + .../Src/MessageReceivedEventArgs.cs | 27 + ...rtHelper.cs => NUnitConsoleCommandLine.cs} | 120 ++-- .../UnitTesting/Src/NUnitTestDebugger.cs | 47 ++ .../UnitTesting/Src/NUnitTestFramework.cs | 115 ++++ .../UnitTesting/Src/NUnitTestResult.cs | 41 ++ .../UnitTesting/Src/NUnitTestRunner.cs | 45 ++ .../Src/RegisteredTestFrameworks.cs | 113 ++++ .../Src/RunAllTestsInPadCommand.cs | 30 + .../Src/RunProjectTestsInPadCommand.cs | 47 ++ .../UnitTesting/Src/RunTestCommandContext.cs | 61 ++ .../UnitTesting/Src/RunTestCommands.cs | 550 ------------------ .../UnitTesting/Src/RunTestInPadCommand.cs | 30 + .../Src/RunTestWithDebuggerCommand.cs | 30 + .../Analysis/UnitTesting/Src/SelectedTests.cs | 96 +++ .../UnitTesting/Src/TestAttributeName.cs | 12 +- .../Analysis/UnitTesting/Src/TestClass.cs | 55 +- .../UnitTesting/Src/TestDebuggerBase.cs | 112 ++++ .../UnitTesting/Src/TestFinishedEventArgs.cs | 6 +- .../Analysis/UnitTesting/Src/TestFramework.cs | 25 + .../Src/TestFrameworkDescriptor.cs | 81 +++ .../UnitTesting/Src/TestFrameworkDoozer.cs | 34 ++ .../UnitTesting/Src/TestFrameworkFactory.cs | 27 + .../Analysis/UnitTesting/Src/TestMethod.cs | 38 +- .../UnitTesting/Src/TestProcessRunnerBase.cs | 82 +++ .../Analysis/UnitTesting/Src/TestProject.cs | 72 +-- .../Analysis/UnitTesting/Src/TestResult.cs | 58 +- .../UnitTesting/Src/TestResultTask.cs | 102 ++++ .../UnitTesting/Src/TestResultsMonitor.cs | 23 +- .../UnitTesting/Src/TestResultsReader.cs | 8 +- .../UnitTesting/Src/TestRunnerBase.cs | 72 +++ .../Analysis/UnitTesting/Src/TestService.cs | 51 ++ .../Analysis/UnitTesting/Src/TestTreeView.cs | 144 +++-- .../UnitTesting/Src/TestableCondition.cs | 42 +- .../UnitTesting/Src/UnitTestAddInTree.cs | 21 + .../UnitTesting/Src/UnitTestBuildOptions.cs | 19 + .../Src/UnitTestBuildProjectFactory.cs | 20 + .../UnitTesting/Src/UnitTestCommands.cs | 48 +- .../Src/UnitTestDebuggerService.cs | 23 + .../UnitTesting/Src/UnitTestFileService.cs | 25 + .../UnitTesting/Src/UnitTestMessageService.cs | 20 + .../UnitTesting/Src/UnitTestProcessRunner.cs | 57 ++ .../Src/UnitTestSaveAllFilesCommand.cs | 19 + .../UnitTesting/Src/UnitTestTaskService.cs | 39 ++ .../UnitTesting/Src/UnitTestWorkbench.cs | 31 + .../Analysis/UnitTesting/Src/UnitTestsPad.cs | 79 +-- .../CreateNUnitTestRunnerTestFixture.cs | 47 ++ .../NUnitConsoleCommandLineTests.cs | 266 +++++++++ .../NUnitConsoleExeSelectedTestFixture.cs | 40 +- ...NUnitConsoleProcessStartInfoTestFixture.cs | 62 ++ .../NUnitTestFrameworkIsTestClassTests.cs | 90 +++ .../NUnitTestFrameworkIsTestMethodTests.cs | 113 ++++ .../NUnitTestFrameworkIsTestProjectTests.cs | 96 +++ .../NUnitTestResultFailureTestFixture.cs | 74 +++ .../RegisteredTestFrameworksTestFixture.cs | 240 ++++++++ ...ojectFileExtensionWhitespaceTestFixture.cs | 50 ++ ...pportsCSharpAndVBNetProjectsTestFixture.cs | 50 ++ ...riptorSupportsCSharpProjectsTestFixture.cs | 65 +++ ...perCaseProjectFileExtensionsTestFixture.cs | 50 ++ .../TestFrameworkDoozerTestFixture.cs | 77 +++ .../TestResultsReaderTests.cs | 2 +- ...ConditionIsValidForClassNodeTestFixture.cs | 84 +++ ...stableConditionIsValidMethodTestFixture.cs | 67 +++ .../UnitTestingOptionsPanelTestFixture.cs | 4 +- .../UnitTestingOptionsTestFixture.cs | 8 +- ...ractBaseClassWithTestMethodsTestFixture.cs | 25 +- .../Test/Project/BaseTestMethodTestFixture.cs | 2 +- .../Test/Project/ClassRootNamespaceTests.cs | 17 +- .../ClassWithTwoChildNamespacesTestFixture.cs | 6 +- .../DuplicateClassNameChangedTestFixture.cs | 28 +- .../Project/DuplicateClassNameTestFixture.cs | 10 +- .../Project/DuplicateMethodNameTestFixture.cs | 18 +- ...uplicateProjectRootNamespaceTestFixture.cs | 15 +- .../Test/Project/EmptyProjectTestFixture.cs | 36 +- .../Project/EmptyRootNamespaceTestFixture.cs | 16 +- .../InnerClassMethodRenamedTestFixture.cs | 13 +- .../InnerClassNameChangesTestFixture.cs | 8 +- ...sTestFixtureAttributeRemovedTestFixture.cs | 9 +- .../Test/Project/InnerClassTestFixtureBase.cs | 22 +- .../Test/Project/IsTestClassTests.cs | 116 ---- .../Test/Project/IsTestMethodTests.cs | 153 ----- .../Test/Project/IsTestProjectTests.cs | 75 --- .../OverriddenBaseTestMethodTestFixture.cs | 37 +- .../Test/Project/RemovedClassesTestFixture.cs | 10 +- ...TestMethodUsesTestFrameworksTestFixture.cs | 62 ++ .../TestClassWithOneMethodTestFixture.cs | 32 +- .../TestClassWithTwoMethodsTestFixture.cs | 26 +- .../TestMethodsInBaseClassTestFixture.cs | 25 +- ...estProjectUsesTestFrameworksTestFixture.cs | 90 +++ .../TestProjectWithOneClassTestFixture.cs | 29 +- .../ThreeTestClassesTestResultsTestFixture.cs | 11 +- .../ThreeTestMethodsTestResultsTestFixture.cs | 10 +- ...woBaseClassesWithTestMethodsTestFixture.cs | 31 +- .../TwoProjectRootNamespacesTestFixture.cs | 21 +- .../AddNUnitReferenceToProjectTestFixture.cs | 59 ++ .../BuildErrorWhenRunningTestsTestFixture.cs | 63 ++ .../BuildProjectBeforeTestRunTestFixture.cs | 50 ++ .../ClassTestFixtureSelectedTestFixture.cs | 64 ++ .../ClassWithNoRootNamespaceTestFixture.cs | 24 +- .../Test/Tree/GetProjectsTestFixture.cs | 6 +- .../GoToSelectedBaseClassMethodTestFixture.cs | 57 ++ .../Test/Tree/GoToSelectedClassTestFixture.cs | 51 ++ ...oSelectedClassWithNoLocationTestFixture.cs | 43 ++ .../Tree/GoToSelectedMethodTestFixture.cs | 66 +++ ...SelectedMethodWithNoLocationTestFixture.cs | 44 ++ .../Tree/MethodTestSelectedTestFixture.cs | 79 +++ .../Tree/MultipleTestProjectsTestFixture.cs | 16 +- .../NoOwnerForSelectedTestsTestFixture.cs | 53 ++ ...oTestsRunWhenNoTestsSelectedTestFixture.cs | 30 + ...RunWhenUnitTestPadNotCreatedTestFixture.cs | 42 ++ ...estProjectNotAddedToTestTreeTestFixture.cs | 81 +++ .../Test/Tree/OneTestClassTestFixture.cs | 54 +- .../Tree/RemoveSolutionFolderTestFixture.cs | 89 +++ .../Test/Tree/RunAllTestsInPadTestFixture.cs | 36 ++ .../Tree/RunNUnitTestsForMethodTestFixture.cs | 221 +++++++ .../RunNUnitTestsWithDebuggerTestFixture.cs | 303 ++++++++++ .../Tree/RunProjectTestsInPadTestFixture.cs | 64 ++ .../Test/Tree/RunProjectTestsTestFixture.cs | 201 +++++++ .../RunTestCommandBeforeRunTestFixture.cs | 166 ++++++ .../Tree/RunTestCommandTestFixtureBase.cs | 40 ++ .../Tree/RunTestInPadCommandTestFixture.cs | 173 ++++++ .../RunTestWhenDebuggerRunningTestFixture.cs | 114 ++++ .../RunTestWithDebuggerCommandTestFixture.cs | 106 ++++ ...nTestWithDebuggerCommandTestFixtureBase.cs | 73 +++ .../Test/Tree/RunTestsForClassTestFixture.cs | 73 +++ .../Test/Tree/RunTestsForMethodTestFixture.cs | 86 +++ .../Tree/RunTestsForNamespaceTestFixture.cs | 53 ++ ...nTestsWithoutBuildingProjectTestFixture.cs | 82 +++ .../RunTestsWithoutUnitTestsPadTestFixture.cs | 57 ++ .../Tree/RunTwoProjectsTestsTestFixture.cs | 74 +++ .../Test/Tree/SelectedTestsTestFixture.cs | 95 +++ ...edAfterUnitTestsTreeDisposedTestFixture.cs | 35 ++ .../Test/Tree/SolutionOpenedTestFixture.cs | 14 +- ...wsExceptionWhenStartingTestsTestFixture.cs | 44 ++ .../Test/Tree/StopRunningTestsTestFixture.cs | 100 ++++ .../Tree/TestResultFailureTaskTestFixture.cs | 68 +++ ...sultFailureTaskWithNoMessageTestFixture.cs | 42 ++ .../Tree/TestResultIgnoreTaskTestFixture.cs | 67 +++ ...esultIgnoreTaskWithNoMessageTestFixture.cs | 43 ++ ...askWithoutMatchingTestMethodTestFixture.cs | 69 +++ .../Test/{ => Tree}/TestableConditionTests.cs | 142 +---- .../Tree/TreeNodeContextMenuTestFixture.cs | 2 +- .../Test/Tree/TreeNodeSortingTestFixture.cs | 18 +- ...ClassesInDifferentNamespacesTestFixture.cs | 29 +- .../Test/UnitTestCommandLineTests.cs | 228 -------- .../UnitTesting/Test/UnitTesting.Tests.csproj | 139 ++++- .../Test/Utils/DerivedRunTestCommand.cs | 112 ++++ .../Test/Utils/DerivedRunTestInPadCommand.cs | 27 + .../DerivedRunTestWithDebuggerCommand.cs | 26 + .../Test/Utils/DerivedTestTreeView.cs | 5 + .../Test/Utils/DerivedUnitTestsPad.cs | 20 +- .../Utils/DummyParserServiceTestTreeView.cs | 18 +- .../UnitTesting/Test/Utils/JumpedToFile.cs | 47 ++ .../UnitTesting/Test/Utils/MockAddInTree.cs | 37 ++ .../Test/Utils/MockBuildOptions.cs | 22 + .../Utils/MockBuildProjectBeforeTestRun.cs | 44 ++ .../Test/Utils/MockBuildProjectFactory.cs | 43 ++ .../Test/Utils/MockCSharpProject.cs | 30 +- .../UnitTesting/Test/Utils/MockClass.cs | 396 +++---------- .../UnitTesting/Test/Utils/MockDebugger.cs | 175 ++++++ .../Test/Utils/MockDebuggerService.cs | 32 + .../UnitTesting/Test/Utils/MockFileService.cs | 37 ++ .../Test/Utils/MockMessageService.cs | 39 ++ .../UnitTesting/Test/Utils/MockMethod.cs | 317 +--------- .../Test/Utils/MockNUnitTestFramework.cs | 97 +++ .../Test/Utils/MockNUnitTestRunnerContext.cs | 38 ++ .../Test/Utils/MockProcessRunner.cs | 81 +++ .../Test/Utils/MockProjectContent.cs | 46 +- .../Utils/MockRegisteredTestFrameworks.cs | 62 ++ .../Test/Utils/MockRunTestCommandContext.cs | 106 ++++ .../Test/Utils/MockSaveAllFilesCommand.cs | 27 + .../UnitTesting/Test/Utils/MockTaskService.cs | 64 ++ .../Test/Utils/MockTestFramework.cs | 109 ++++ .../Test/Utils/MockTestFrameworkFactory.cs | 43 ++ ...TestFrameworksWithNUnitFrameworkSupport.cs | 36 ++ .../Test/Utils/MockTestResultsMonitor.cs | 81 +++ .../UnitTesting/Test/Utils/MockTestRunner.cs | 78 +++ .../Test/Utils/MockTestTreeView.cs | 38 +- .../Test/Utils/MockUnitTestWorkbench.cs | 113 ++++ .../Test/Utils/MockUnitTestsPad.cs | 76 +++ .../UnitTesting/Test/Utils/ResourceManager.cs | 1 + .../Test/Utils/SelectedTestsHelper.cs | 33 ++ .../UnitTesting/Test/Utils/TaskComparison.cs | 114 ++++ .../Test/Utils/TestProjectHelper.cs | 62 ++ ...reateMockClassWithAttributesTestFixture.cs | 95 +++ ...MockClassWithSingleAttributeTestFixture.cs | 53 ++ ...ockClassWithoutAnyAttributesTestFixture.cs | 56 ++ ...eateMockMethodWithAttributesTestFixture.cs | 71 +++ ...ockMethodWithSingleAttributeTestFixture.cs | 53 ++ ...ckMethodWithoutAnyAttributesTestFixture.cs | 44 ++ .../CreateProjectWithOutputPathTestFixture.cs | 71 +++ ...TestProjectWithOneTestMethodTestFixture.cs | 113 ++++ ...estProjectWithTwoTestMethodsTestFixture.cs | 50 ++ .../Tests/DerivedRunTestCommandTestFixture.cs | 100 ++++ .../Utils/Tests/MockAddInTreeTestFixture.cs | 45 ++ .../Tests/MockBuildOptionsTestFixture.cs | 38 ++ ...ockBuildProjectBeforeTestRunTestFixture.cs | 88 +++ .../Test/Utils/Tests/MockClassTestFixture.cs | 167 ++++++ .../Tests/MockDebuggerServiceTestFixture.cs | 113 ++++ .../Utils/Tests/MockFileServiceTestFixture.cs | 101 ++++ .../Tests/MockMessageServiceTestFixture.cs | 69 +++ .../Test/Utils/Tests/MockMethodTestFixture.cs | 44 ++ .../MockNUnitTestFrameworkTestFixture.cs | 139 +++++ .../MockNUnitTestRunnerContextTestFixture.cs | 45 ++ .../Tests/MockProcessRunnerTestFixture.cs | 121 ++++ .../Tests/MockProjectContentTestFixture.cs | 55 ++ .../Utils/Tests/MockProjectSaveTestFixture.cs | 41 ++ ...MockRegisteredTestFrameworksTestFixture.cs | 75 +++ .../MockRunTestCommandContextTestFixture.cs | 80 +++ .../MockSaveAllFilesCommandTestFixture.cs | 39 ++ .../Utils/Tests/MockTaskServiceTestFixture.cs | 102 ++++ .../MockTestFrameworkFactoryTestFixture.cs | 55 ++ .../Tests/MockTestFrameworkTestFixture.cs | 160 +++++ ...rksWithNUnitFrameworkSupportTestFixture.cs | 38 ++ .../MockTestResultsMonitorTestFixture.cs | 114 ++++ .../Utils/Tests/MockTestRunnerTestFixture.cs | 125 ++++ .../Tests/MockUnitTestWorkbenchTestFixture.cs | 144 +++++ .../Tests/MockUnitTestsPadTestFixture.cs | 108 ++++ .../SelectedTestsWithTestMethodTestFixture.cs | 51 ++ .../Utils/Tests/TaskComparisonTestFixture.cs | 211 +++++++ .../Analysis/UnitTesting/UnitTesting.addin | 187 +++--- .../Analysis/UnitTesting/UnitTesting.csproj | 56 +- .../Analysis/UnitTesting/UnitTesting.sln | 12 +- .../CompilerMessageView/FileLineReference.cs | 26 +- 246 files changed, 13426 insertions(+), 2863 deletions(-) create mode 100644 src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/ProfilerTestRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommands.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/BuildProjectBeforeTestRun.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/EmptyUnitTestsPad.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IAddInTree.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IBuildOptions.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IBuildProjectFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IRunTestCommandContext.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/ITestFrameworkFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/ITestResultsMonitor.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/ITestRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestDebuggerService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestFileService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestMessageService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestProcessRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestSaveAllFilesCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestTaskService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestWorkbench.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/IUnitTestsPad.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/MessageReceivedEventArgs.cs rename src/AddIns/Analysis/UnitTesting/Src/{UnitTestApplicationStartHelper.cs => NUnitConsoleCommandLine.cs} (66%) create mode 100644 src/AddIns/Analysis/UnitTesting/Src/NUnitTestDebugger.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/NUnitTestResult.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/NUnitTestRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunAllTestsInPadCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunProjectTestsInPadCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunTestCommandContext.cs delete mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunTestCommands.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunTestInPadCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/RunTestWithDebuggerCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestDebuggerBase.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDescriptor.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDoozer.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestFrameworkFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestProcessRunnerBase.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestResultTask.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestRunnerBase.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/TestService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestAddInTree.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildOptions.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildProjectFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestDebuggerService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestFileService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestMessageService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestProcessRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestSaveAllFilesCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestTaskService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Src/UnitTestWorkbench.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/CreateNUnitTestRunnerTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs rename src/AddIns/Analysis/UnitTesting/Test/{ => Frameworks}/NUnitConsoleExeSelectedTestFixture.cs (72%) create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestMethodTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestProjectTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestResultFailureTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorIgnoresProjectFileExtensionWhitespaceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpAndVBNetProjectsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpProjectsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsUpperCaseProjectFileExtensionsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDoozerTestFixture.cs rename src/AddIns/Analysis/UnitTesting/Test/{ => Frameworks}/TestResultsReaderTests.cs (99%) create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidForClassNodeTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidMethodTestFixture.cs rename src/AddIns/Analysis/UnitTesting/Test/{ => Frameworks}/UnitTestingOptionsPanelTestFixture.cs (98%) rename src/AddIns/Analysis/UnitTesting/Test/{ => Frameworks}/UnitTestingOptionsTestFixture.cs (98%) delete mode 100644 src/AddIns/Analysis/UnitTesting/Test/Project/IsTestClassTests.cs delete mode 100644 src/AddIns/Analysis/UnitTesting/Test/Project/IsTestMethodTests.cs delete mode 100644 src/AddIns/Analysis/UnitTesting/Test/Project/IsTestProjectTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectUsesTestFrameworksTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/AddNUnitReferenceToProjectTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/BuildErrorWhenRunningTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/BuildProjectBeforeTestRunTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassWithNoLocationTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodWithNoLocationTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenNoTestsSelectedTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenUnitTestPadNotCreatedTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/NonTestProjectNotAddedToTestTreeTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RemoveSolutionFolderTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunAllTestsInPadTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsInPadTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandBeforeRunTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandTestFixtureBase.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWhenDebuggerRunningTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixtureBase.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForClassTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForNamespaceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutBuildingProjectTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutUnitTestsPadTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/RunTwoProjectsTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionLoadedAfterUnitTestsTreeDisposedTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/StartingDebuggerThrowsExceptionWhenStartingTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/StopRunningTestsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskWithNoMessageTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithNoMessageTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithoutMatchingTestMethodTestFixture.cs rename src/AddIns/Analysis/UnitTesting/Test/{ => Tree}/TestableConditionTests.cs (51%) delete mode 100644 src/AddIns/Analysis/UnitTesting/Test/UnitTestCommandLineTests.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestInPadCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestWithDebuggerCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/JumpedToFile.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockAddInTree.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildOptions.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectBeforeTestRun.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebugger.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebuggerService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockFileService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockMessageService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestRunnerContext.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockProcessRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockRegisteredTestFrameworks.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockRunTestCommandContext.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockSaveAllFilesCommand.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTaskService.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworkFactory.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworksWithNUnitFrameworkSupport.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestResultsMonitor.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestRunner.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestWorkbench.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestsPad.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/SelectedTestsHelper.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/TaskComparison.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/TestProjectHelper.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithAttributesTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithSingleAttributeTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithoutAnyAttributesTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithAttributesTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithSingleAttributeTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithoutAnyAttributesTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateProjectWithOutputPathTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithOneTestMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithTwoTestMethodsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/DerivedRunTestCommandTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockAddInTreeTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildOptionsTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildProjectBeforeTestRunTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockClassTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockDebuggerServiceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockFileServiceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMessageServiceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestFrameworkTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestRunnerContextTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProcessRunnerTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectContentTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectSaveTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRegisteredTestFrameworksTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRunTestCommandContextTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockSaveAllFilesCommandTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTaskServiceTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkFactoryTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworksWithNUnitFrameworkSupportTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestResultsMonitorTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestRunnerTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestWorkbenchTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestsPadTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs create mode 100644 src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/TaskComparisonTestFixture.cs diff --git a/src/AddIns/Analysis/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs b/src/AddIns/Analysis/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs index 28b6a5d19d..cd5629e8de 100644 --- a/src/AddIns/Analysis/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs +++ b/src/AddIns/Analysis/CodeCoverage/Project/Src/RunTestWithCodeCoverageCommand.cs @@ -34,9 +34,9 @@ namespace ICSharpCode.CodeCoverage runner.OutputLineReceived += OutputLineReceived; } - protected override void RunTests(UnitTestApplicationStartHelper helper) + protected override void RunTests(NUnitConsoleApplication app) { - SetPartCoverRunnerProperties(helper); + SetPartCoverRunnerProperties(app); RunPartCover(); } @@ -62,7 +62,7 @@ namespace ICSharpCode.CodeCoverage protected override void OnAfterRunTests() { if (!TaskService.HasCriticalErrors(false)) { - ShowPad(WorkbenchSingleton.Workbench.GetPad(typeof(CodeCoveragePad))); + ShowPad(Context.Workbench.GetPad(typeof(CodeCoveragePad))); } } @@ -78,10 +78,10 @@ namespace ICSharpCode.CodeCoverage } } - void SetPartCoverRunnerProperties(UnitTestApplicationStartHelper helper) + void SetPartCoverRunnerProperties(NUnitConsoleApplication app) { - string partCoverOutputDirectory = GetPartCoverOutputDirectory(helper.Project); - PartCoverSettings settings = GetPartCoverSettings(helper.Project); + string partCoverOutputDirectory = GetPartCoverOutputDirectory(app.Project); + PartCoverSettings settings = GetPartCoverSettings(app.Project); // By default get the code coverage for everything if // no include or exclude regular expressions have been @@ -94,9 +94,9 @@ namespace ICSharpCode.CodeCoverage } runner.PartCoverFileName = GetPartCoverFileName(); - runner.Target = helper.UnitTestApplication; - runner.TargetArguments = helper.GetArguments(); - runner.TargetWorkingDirectory = Path.GetDirectoryName(helper.Assemblies[0]); + runner.Target = app.FileName; + runner.TargetArguments = app.GetArguments(); + runner.TargetWorkingDirectory = Path.GetDirectoryName(app.Assemblies[0]); runner.Output = Path.Combine(partCoverOutputDirectory, "Coverage.Xml"); AddStringsToCollection(settings.Include, runner.Include); AddStringsToCollection(settings.Exclude, runner.Exclude); @@ -128,7 +128,7 @@ namespace ICSharpCode.CodeCoverage void PartCoverExited(object sender, PartCoverExitEventArgs e) { DisplayCoverageResults(runner.Output); - WorkbenchSingleton.SafeThreadAsyncCall(TestsFinished); + WorkbenchSingleton.SafeThreadAsyncCall(TestRunCompleted); } void OutputLineReceived(object sender, LineReceivedEventArgs e) diff --git a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj index 8cda72ef01..de5de3bc4e 100644 --- a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj +++ b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Profiler.AddIn.csproj @@ -89,6 +89,7 @@ + ComparisonView.xaml diff --git a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs index b051eca516..b68b166f9f 100644 --- a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs +++ b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs @@ -5,82 +5,16 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Gui; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using ICSharpCode.Core; -using ICSharpCode.Profiler.AddIn; -using ICSharpCode.Profiler.Controller.Data; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; using ICSharpCode.UnitTesting; namespace ICSharpCode.Profiler.AddIn.Commands { public class RunTestWithProfilerCommand : AbstractRunTestCommand { - ProfilerRunner runner; - - protected override void RunTests(UnitTestApplicationStartHelper helper) + protected override ITestRunner CreateTestRunner(IProject project) { - TestRunnerCategory.AppendLine(helper.GetCommandLine()); - - ProcessStartInfo startInfo = new ProcessStartInfo(helper.UnitTestApplication); - - string path = helper.Project.GetSessionFileName(); - - startInfo.Arguments = helper.GetArguments(); - startInfo.WorkingDirectory = UnitTestApplicationStartHelper.UnitTestApplicationDirectory; - LoggingService.Info("starting profiler..."); - - runner = new ProfilerRunner(startInfo, true, new UnitTestWriter(new ProfilingDataSQLiteWriter(path), GetUnitTestNames(helper).ToArray())); - - runner.RunFinished += delegate { - WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path)); - AfterFinish(helper, path); - }; - - runner.Run(); - } - - IEnumerable GetUnitTestNames(UnitTestApplicationStartHelper helper) - { - IProjectContent content = ParserService.GetProjectContent(helper.Project); - - if (helper.Fixture == null) { - var testClasses = content.Classes - .Where(c => c.Attributes.Any(a => a.AttributeType.FullyQualifiedName == "NUnit.Framework.TestFixtureAttribute")); - return testClasses - .SelectMany(c2 => c2.Methods) - .Where(m => m.Attributes.Any(a2 => a2.AttributeType.FullyQualifiedName == "NUnit.Framework.TestAttribute")) - .Select(m2 => m2.FullyQualifiedName); - } - - if (helper.Test == null) { - return content.Classes - .Where(c => c.FullyQualifiedName == helper.Fixture).First().Methods - .Where(m => m.Attributes.Any(a2 => a2.AttributeType.FullyQualifiedName == "NUnit.Framework.TestAttribute")) - .Select(m2 => m2.FullyQualifiedName); - } - - return new[] { helper.Fixture + "." + helper.Test }; - } - - void AfterFinish(UnitTestApplicationStartHelper helper, string path) - { - helper.Project.AddSessionToProject(path); - WorkbenchSingleton.SafeThreadAsyncCall(TestsFinished); - LoggingService.Info("shutting profiler down..."); - } - - protected override void OnStop() - { - if (this.runner != null && this.runner.Profiler.IsRunning) { - LoggingService.Info("stopping profiler..."); - runner.Stop(); - } + return new ProfilerTestRunner(); } } } diff --git a/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/ProfilerTestRunner.cs b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/ProfilerTestRunner.cs new file mode 100644 index 0000000000..f7a622836d --- /dev/null +++ b/src/AddIns/Analysis/Profiler/Frontend/AddIn/Src/ProfilerTestRunner.cs @@ -0,0 +1,115 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using ICSharpCode.Core; +using ICSharpCode.Profiler.AddIn; +using ICSharpCode.Profiler.Controller.Data; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.Profiler.AddIn +{ + public class ProfilerTestRunner : TestRunnerBase + { + ProfilerRunner runner; + UnitTestingOptions options = new UnitTestingOptions(); + TestResultsMonitor testResultsMonitor; + + public ProfilerTestRunner() + { + } + + public override void Start(SelectedTests selectedTests) + { + ProcessStartInfo startInfo = GetProcessStartInfo(selectedTests); + Start(startInfo, selectedTests); + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests, options); + testResultsMonitor = new TestResultsMonitor(); + app.Results = testResultsMonitor.FileName; + return app.GetProcessStartInfo(); + } + + void Start(ProcessStartInfo startInfo, SelectedTests selectedTests) + { + LogCommandLine(startInfo); + + string path = selectedTests.Project.GetSessionFileName(); + + LoggingService.Info("starting profiler..."); + + runner = new ProfilerRunner(startInfo, true, new UnitTestWriter(new ProfilingDataSQLiteWriter(path), GetUnitTestNames(selectedTests).ToArray())); + + runner.RunFinished += delegate { + WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path)); + AfterFinish(selectedTests, path); + }; + + testResultsMonitor.TestFinished += OnTestFinished; + testResultsMonitor.Start(); + runner.Run(); + } + + IEnumerable GetUnitTestNames(SelectedTests selectedTests) + { + IProjectContent content = ParserService.GetProjectContent(selectedTests.Project); + + if (selectedTests.Class == null) { + var testClasses = content.Classes + .Where(c => c.Attributes.Any(a => a.AttributeType.FullyQualifiedName == "NUnit.Framework.TestFixtureAttribute")); + return testClasses + .SelectMany(c2 => c2.Methods) + .Where(m => m.Attributes.Any(a2 => a2.AttributeType.FullyQualifiedName == "NUnit.Framework.TestAttribute")) + .Select(m2 => m2.FullyQualifiedName); + } + + if (selectedTests.Method == null) { + return content.Classes + .Where(c => c.FullyQualifiedName == selectedTests.Class.DotNetName).First().Methods + .Where(m => m.Attributes.Any(a2 => a2.AttributeType.FullyQualifiedName == "NUnit.Framework.TestAttribute")) + .Select(m2 => m2.FullyQualifiedName); + } + + return new[] { selectedTests.Class.DotNetName + "." + selectedTests.Method.Name }; + } + + void AfterFinish(SelectedTests selectedTests, string path) + { + selectedTests.Project.AddSessionToProject(path); + OnAllTestsFinished(this, new EventArgs()); + LoggingService.Info("shutting profiler down..."); + } + + public override void Stop() + { + if (this.runner != null && this.runner.Profiler.IsRunning) { + LoggingService.Info("stopping profiler..."); + runner.Stop(); + } + + if (testResultsMonitor != null) { + testResultsMonitor.Stop(); + testResultsMonitor.Read(); + testResultsMonitor = null; + } + } + + public override void Dispose() + { + Stop(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommands.cs b/src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommands.cs new file mode 100644 index 0000000000..5cba431e82 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/AbstractRunTestCommands.cs @@ -0,0 +1,332 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; + +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public abstract class AbstractRunTestCommand : AbstractMenuCommand + { + static AbstractRunTestCommand runningTestCommand; + IUnitTestsPad unitTestsPad; + SelectedTests selectedTests; + IRunTestCommandContext context; + ITestRunner testRunner; + + public AbstractRunTestCommand() + : this(new RunTestCommandContext()) + { + } + + public AbstractRunTestCommand(IRunTestCommandContext context) + { + this.context = context; + } + + protected IRunTestCommandContext Context { + get { return context; } + } + + /// + /// Gets the running test command. + /// + public static AbstractRunTestCommand RunningTestCommand { + get { return runningTestCommand; } + set { runningTestCommand = value; } + } + + /// + /// Gets whether a test is currently running. + /// + public static bool IsRunningTest { + get { return runningTestCommand != null; } + } + + public override void Run() + { + GetUnitTestsPad(context.OpenUnitTestsPad); + + selectedTests = new SelectedTests(Owner, this.unitTestsPad.GetProjects()); + if (selectedTests.HasProjects) { + runningTestCommand = this; + BeforeRun(); + RunTests(); + } + } + + void GetUnitTestsPad(IUnitTestsPad unitTestsPad) + { + if (unitTestsPad != null) { + this.unitTestsPad = unitTestsPad; + } else { + this.unitTestsPad = new EmptyUnitTestsPad(); + } + } + + /// + /// Sets the initial workbench state before starting + /// a test run. + /// + void BeforeRun() + { + ClearTasks(); + ClearUnitTestCategoryText(); + + ShowUnitTestsPad(); + ShowOutputPad(); + + UpdateUnitTestsPadToolbar(); + ResetAllTestResultsInUnitTestsPad(); + + OnBeforeRunTests(); + } + + void RunTests() + { + if (IsBuildNeededBeforeTestRun()) { + BuildProjectBeforeRunningTests(selectedTests); + } else { + context.SaveAllFilesCommand.SaveAllFiles(); + RunTests(selectedTests); + } + } + + bool IsBuildNeededBeforeTestRun() + { + return context.RegisteredTestFrameworks.IsBuildNeededBeforeTestRunForProject(selectedTests.Project); + } + + void ClearTasks() + { + context.TaskService.BuildMessageViewCategory.ClearText(); + context.TaskService.InUpdate = true; + context.TaskService.ClearExceptCommentTasks(); + context.TaskService.InUpdate = false; + } + + void ClearUnitTestCategoryText() + { + context.UnitTestCategory.ClearText(); + } + + void ShowUnitTestsPad() + { + unitTestsPad.BringToFront(); + } + + void UpdateUnitTestsPadToolbar() + { + unitTestsPad.UpdateToolbar(); + } + + /// + /// Called before all tests are run. If multiple projects are + /// to be tested this is called only once. + /// + protected virtual void OnBeforeRunTests() + { + } + + /// + /// Runs the tests after building the project under test. + /// + void BuildProjectBeforeRunningTests(SelectedTests selectedTests) + { + BuildProjectBeforeTestRun build = CreateBuildProjectBeforeTestRun(selectedTests); + build.BuildComplete += delegate { + OnBuildComplete(build.LastBuildResults, selectedTests); + }; + build.Run(); + } + + BuildProjectBeforeTestRun CreateBuildProjectBeforeTestRun(SelectedTests selectedTests) + { + return context.BuildProjectFactory.CreateBuildProjectBeforeTestRun(selectedTests.Project); + } + + /// + /// Stops running the tests. + /// + public void Stop() + { + StopActiveTestRunner(); + + runningTestCommand = null; + UpdateUnitTestsPadToolbar(); + + OnStop(); + } + + void StopActiveTestRunner() + { + if (testRunner != null) { + testRunner.Stop(); + testRunner.Dispose(); + testRunner = null; + } + } + + /// + /// Called after all tests have been run even if there have + /// been errors. If multiple projects are to be tested this is called only once. + /// + protected virtual void OnAfterRunTests() + { + } + + protected virtual void RunTests(NUnitConsoleApplication helper) + { + } + + /// + /// Called by derived classes when a single test run + /// is finished. + /// + protected void TestRunCompleted() + { + StopActiveTestRunner(); + selectedTests.RemoveFirstProject(); + if (selectedTests.HasProjects) { + RunTests(); + } else { + runningTestCommand = null; + UpdateUnitTestsPadToolbar(); + ShowErrorList(); + OnAfterRunTests(); + } + } + + void TestFinished(object source, TestFinishedEventArgs e) + { + context.Workbench.SafeThreadAsyncCall(ShowResult, e.Result); + } + + protected void ShowResult(TestResult result) + { + if (IsTestResultFailureOrIsIgnored(result)) { + AddTaskForTestResult(result); + } + UpdateTestResult(result); + } + + bool IsTestResultFailureOrIsIgnored(TestResult result) + { + return result.IsFailure || result.IsIgnored; + } + + void AddTaskForTestResult(TestResult testResult) + { + TestProject project = GetTestProjectForProject(selectedTests.Project); + Task task = TestResultTask.Create(testResult, project); + context.TaskService.Add(task); + } + + /// + /// Called when the test run should be stopped. + /// + protected virtual void OnStop() + { + } + + void ShowOutputPad() + { + ShowPad(context.Workbench.GetPad(typeof(CompilerMessageView))); + } + + protected void ShowPad(PadDescriptor padDescriptor) + { + context.Workbench.SafeThreadAsyncCall(padDescriptor.BringPadToFront); + } + + void ShowErrorList() + { + if (HasErrorsThatShouldBeDisplayed()) { + ShowPad(context.Workbench.GetPad(typeof(ErrorListPad))); + } + } + + bool HasErrorsThatShouldBeDisplayed() + { + return context.TaskService.SomethingWentWrong && + context.BuildOptions.ShowErrorListAfterBuild; + } + + /// + /// Runs the test for the project after a successful build. + /// + void OnBuildComplete(BuildResults results, SelectedTests selectedTests) + { + if (BuildHasNoErrorsAndStillRunningTests(results)) { + RunTests(selectedTests); + } else { + if (IsRunningTest) { + Stop(); + } + ShowErrorList(); + } + } + + bool BuildHasNoErrorsAndStillRunningTests(BuildResults results) + { + return (results.ErrorCount == 0) && IsRunningTest; + } + + void RunTests(SelectedTests selectedTests) + { + testRunner = CreateTestRunner(selectedTests.Project); + if (testRunner != null) { + testRunner.MessageReceived += TestRunnerMessageReceived; + testRunner.AllTestsFinished += AllTestsFinished; + testRunner.TestFinished += TestFinished; + testRunner.Start(selectedTests); + } + } + + protected virtual ITestRunner CreateTestRunner(IProject project) + { + return null; + } + + void TestRunnerMessageReceived(object source, MessageReceivedEventArgs e) + { + context.UnitTestCategory.AppendLine(e.Message); + } + + void AllTestsFinished(object source, EventArgs e) + { + context.Workbench.SafeThreadAsyncCall(TestRunCompleted); + } + + /// + /// Clears the test results in the test tree view for all the + /// displayed projects. + /// + void ResetAllTestResultsInUnitTestsPad() + { + unitTestsPad.ResetTestResults(); + } + + TestProject GetTestProjectForProject(IProject project) + { + return unitTestsPad.GetTestProject(project); + } + + void UpdateTestResult(TestResult result) + { + TestProject testProject = GetTestProjectForProject(selectedTests.Project); + if (testProject != null) { + testProject.UpdateTestResult(result); + } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/BuildProjectBeforeTestRun.cs b/src/AddIns/Analysis/UnitTesting/Src/BuildProjectBeforeTestRun.cs new file mode 100644 index 0000000000..d0cb7fb7ae --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/BuildProjectBeforeTestRun.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.SharpDevelop.Project.Commands; + +namespace ICSharpCode.UnitTesting +{ + /// + /// Custom build command that makes sure errors and warnings + /// are not cleared from the Errors list before every build since + /// we may be running multiple tests after each other. + /// + public class BuildProjectBeforeTestRun : BuildProjectBeforeExecute + { + IUnitTestSaveAllFilesCommand saveAllFilesCommand; + + public BuildProjectBeforeTestRun(IProject targetProject, + IUnitTestSaveAllFilesCommand saveAllFilesCommand) + : base(targetProject) + { + this.saveAllFilesCommand = saveAllFilesCommand; + } + + public BuildProjectBeforeTestRun(IProject targetProject) + : this(targetProject, new UnitTestSaveAllFilesCommand()) + { + } + + /// + /// Before a build do not clear the tasks, just save any + /// dirty files. + /// + public override void BeforeBuild() + { + saveAllFilesCommand.SaveAllFiles(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/EmptyUnitTestsPad.cs b/src/AddIns/Analysis/UnitTesting/Src/EmptyUnitTestsPad.cs new file mode 100644 index 0000000000..7b936eca6e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/EmptyUnitTestsPad.cs @@ -0,0 +1,37 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class EmptyUnitTestsPad : IUnitTestsPad + { + public void UpdateToolbar() + { + } + + public void BringToFront() + { + } + + public void ResetTestResults() + { + } + + public IProject[] GetProjects() + { + return new IProject[0]; + } + + public TestProject GetTestProject(IProject project) + { + return null; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IAddInTree.cs b/src/AddIns/Analysis/UnitTesting/Src/IAddInTree.cs new file mode 100644 index 0000000000..d094964b04 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IAddInTree.cs @@ -0,0 +1,17 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; + +namespace ICSharpCode.UnitTesting +{ + public interface IAddInTree + { + List BuildItems(string path, object caller); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IBuildOptions.cs b/src/AddIns/Analysis/UnitTesting/Src/IBuildOptions.cs new file mode 100644 index 0000000000..d94cccc166 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IBuildOptions.cs @@ -0,0 +1,16 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface IBuildOptions + { + bool ShowErrorListAfterBuild { get; } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IBuildProjectFactory.cs b/src/AddIns/Analysis/UnitTesting/Src/IBuildProjectFactory.cs new file mode 100644 index 0000000000..476aedf1d0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IBuildProjectFactory.cs @@ -0,0 +1,17 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public interface IBuildProjectFactory + { + BuildProjectBeforeTestRun CreateBuildProjectBeforeTestRun(IProject project); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs b/src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs new file mode 100644 index 0000000000..a3964f1cc2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IRegisteredTestFrameworks.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public interface IRegisteredTestFrameworks + { + ITestFramework GetTestFrameworkForProject(IProject project); + ITestRunner CreateTestRunner(IProject project); + ITestRunner CreateTestDebugger(IProject project); + + bool IsTestMethod(IMember member); + bool IsTestClass(IClass c); + bool IsTestProject(IProject project); + + bool IsBuildNeededBeforeTestRunForProject(IProject project); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IRunTestCommandContext.cs b/src/AddIns/Analysis/UnitTesting/Src/IRunTestCommandContext.cs new file mode 100644 index 0000000000..3910a83c9f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IRunTestCommandContext.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public interface IRunTestCommandContext + { + IRegisteredTestFrameworks RegisteredTestFrameworks { get; } + IUnitTestTaskService TaskService { get; } + IUnitTestWorkbench Workbench { get; } + IBuildProjectFactory BuildProjectFactory { get; } + IBuildOptions BuildOptions { get; } + MessageViewCategory UnitTestCategory { get; } + IUnitTestsPad OpenUnitTestsPad { get; } + IUnitTestMessageService MessageService { get; } + IUnitTestSaveAllFilesCommand SaveAllFilesCommand { get; } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/ITestFrameworkFactory.cs b/src/AddIns/Analysis/UnitTesting/Src/ITestFrameworkFactory.cs new file mode 100644 index 0000000000..bab96f959e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/ITestFrameworkFactory.cs @@ -0,0 +1,16 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface ITestFrameworkFactory + { + ITestFramework Create(string className); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/ITestResultsMonitor.cs b/src/AddIns/Analysis/UnitTesting/Src/ITestResultsMonitor.cs new file mode 100644 index 0000000000..ebd4549db3 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/ITestResultsMonitor.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface ITestResultsMonitor : IDisposable + { + event TestFinishedEventHandler TestFinished; + + string FileName { get; set; } + + void Stop(); + void Start(); + void Read(); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/ITestRunner.cs b/src/AddIns/Analysis/UnitTesting/Src/ITestRunner.cs new file mode 100644 index 0000000000..b4c0710200 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/ITestRunner.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public interface ITestRunner : IDisposable + { + event TestFinishedEventHandler TestFinished; + event EventHandler AllTestsFinished; + event MessageReceivedEventHandler MessageReceived; + void Start(SelectedTests selectedTests); + void Stop(); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestDebuggerService.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestDebuggerService.cs new file mode 100644 index 0000000000..d3f091453c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestDebuggerService.cs @@ -0,0 +1,19 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Data; +using ICSharpCode.SharpDevelop.Debugging; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestDebuggerService + { + bool IsDebuggerLoaded { get; } + IDebugger CurrentDebugger { get; } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestFileService.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestFileService.cs new file mode 100644 index 0000000000..547fda718a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestFileService.cs @@ -0,0 +1,18 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestFileService + { + void OpenFile(string fileName); + + void JumpToFilePosition(string fileName, int line, int column); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestMessageService.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestMessageService.cs new file mode 100644 index 0000000000..169989ebb2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestMessageService.cs @@ -0,0 +1,17 @@ +// +// +// +// +// $Revision$ +// + + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestMessageService + { + bool AskQuestion(string question, string caption); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestProcessRunner.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestProcessRunner.cs new file mode 100644 index 0000000000..d3a8099a22 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestProcessRunner.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestProcessRunner + { + bool LogStandardOutputAndError { get; set; } + string WorkingDirectory { get; set; } + + void Start(string command, string arguments); + void Kill(); + + event LineReceivedEventHandler OutputLineReceived; + event LineReceivedEventHandler ErrorLineReceived; + event EventHandler ProcessExited; + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestSaveAllFilesCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestSaveAllFilesCommand.cs new file mode 100644 index 0000000000..86cdb41bc4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestSaveAllFilesCommand.cs @@ -0,0 +1,16 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestSaveAllFilesCommand + { + void SaveAllFiles(); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestTaskService.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestTaskService.cs new file mode 100644 index 0000000000..e26e754d61 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestTaskService.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestTaskService + { + MessageViewCategory BuildMessageViewCategory { get; } + bool InUpdate { get; set; } + void ClearExceptCommentTasks(); + void Add(Task task); + bool SomethingWentWrong { get; } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestWorkbench.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestWorkbench.cs new file mode 100644 index 0000000000..3ace159622 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestWorkbench.cs @@ -0,0 +1,19 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestWorkbench + { + PadDescriptor GetPad(Type type); + void SafeThreadAsyncCall(Action method); + void SafeThreadAsyncCall(Action method, A arg1); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/IUnitTestsPad.cs b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestsPad.cs new file mode 100644 index 0000000000..cd417bba2e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/IUnitTestsPad.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public interface IUnitTestsPad + { + void UpdateToolbar(); + void BringToFront(); + void ResetTestResults(); + IProject[] GetProjects(); + TestProject GetTestProject(IProject project); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/MessageReceivedEventArgs.cs b/src/AddIns/Analysis/UnitTesting/Src/MessageReceivedEventArgs.cs new file mode 100644 index 0000000000..e145d47b19 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/MessageReceivedEventArgs.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public delegate void MessageReceivedEventHandler(object sender, MessageReceivedEventArgs e); + + public class MessageReceivedEventArgs : EventArgs + { + string message; + + public MessageReceivedEventArgs(string message) + { + this.message = message; + } + + public string Message { + get { return message; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestApplicationStartHelper.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs similarity index 66% rename from src/AddIns/Analysis/UnitTesting/Src/UnitTestApplicationStartHelper.cs rename to src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs index f138e2245f..c8285a796f 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/UnitTestApplicationStartHelper.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitConsoleCommandLine.cs @@ -1,12 +1,13 @@ // // // -// +// // $Revision$ // using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Text; @@ -18,25 +19,67 @@ using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.UnitTesting { - /// - /// Helper to run the unit testing console application. - /// - public class UnitTestApplicationStartHelper + public class NUnitConsoleApplication { + public NUnitConsoleApplication(SelectedTests selectedTests, UnitTestingOptions options) + { + Initialize(selectedTests); + InitializeOptions(options); + } + + public NUnitConsoleApplication(SelectedTests selectedTests) + { + Initialize(selectedTests); + } + + void Initialize(SelectedTests selectedTests) + { + this.selectedTests = selectedTests; + this.project = selectedTests.Project; + Assemblies.Add(project.OutputAssemblyFullPath); + if (selectedTests.NamespaceFilter != null) { + NamespaceFilter = selectedTests.NamespaceFilter; + } + if (selectedTests.Class != null) { + Fixture = selectedTests.Class.DotNetName; + if (selectedTests.Method != null) { + Test = selectedTests.Method.Name; + } + } + } + + void InitializeOptions(UnitTestingOptions options) + { + NoThread = options.NoThread; + NoLogo = options.NoLogo; + NoDots = options.NoDots; + Labels = options.Labels; + ShadowCopy = !options.NoShadow; + + if (options.CreateXmlOutputFile) { + GenerateXmlOutputFileName(); + } + } + + void GenerateXmlOutputFileName() + { + string directory = Path.GetDirectoryName(project.OutputAssemblyFullPath); + string fileName = project.AssemblyName + "-TestResult.xml"; + XmlOutputFile = Path.Combine(directory, fileName); + } + /// /// returns full/path/to/Tools/NUnit /// - public static string UnitTestApplicationDirectory { - get { - return Path.Combine(FileUtility.ApplicationRootPath, @"bin\Tools\NUnit"); - } + string WorkingDirectory { + get { return Path.Combine(FileUtility.ApplicationRootPath, @"bin\Tools\NUnit"); } } - + /// - /// returns full/path/to/Tools/NUnit/nunit-console.exe (or whichever nunit-console exe is right - /// for the project - there are different .exes for .NET 4.0 and for x86-only projects. + /// returns full/path/to/Tools/NUnit/nunit-console.exe or nunit-console-x86.exe if the + /// project platform target is x86. /// - public string UnitTestApplication { + public string FileName { get { string exe = "nunit-console"; if (ProjectUsesDotnet20Runtime(project)) { @@ -46,7 +89,7 @@ namespace ICSharpCode.UnitTesting exe += "-x86"; } exe += ".exe"; - return Path.Combine(UnitTestApplicationDirectory, exe); + return Path.Combine(WorkingDirectory, exe); } } @@ -76,7 +119,7 @@ namespace ICSharpCode.UnitTesting /// Use /nodots directive. /// public bool NoDots = false; - + /// /// File to write xml output to. Default = null. /// @@ -98,42 +141,29 @@ namespace ICSharpCode.UnitTesting public string Results; /// - /// The namespace that tests need to be a part of if they are to + /// The namespace that tests need to be a part of if they are to /// be run. /// public string NamespaceFilter; IProject project; - - public void Initialize(IProject project, IClass fixture, IMember test) - { - Initialize(project, null, fixture, test); - } + SelectedTests selectedTests; - public void Initialize(IProject project, string namespaceFilter) - { - Initialize(project, namespaceFilter, null, null); + public SelectedTests SelectedTests { + get { return selectedTests; } } - public void Initialize(IProject project, string namespaceFilter, IClass fixture, IMember test) - { - this.project = project; - Assemblies.Add(project.OutputAssemblyFullPath); - if (namespaceFilter != null) { - NamespaceFilter = namespaceFilter; - } - if (fixture != null) { - Fixture = fixture.DotNetName; - if (test != null) { - Test = test.Name; - } - } + public IProject Project { + get { return project; } } - public IProject Project { - get { - return project; - } + public ProcessStartInfo GetProcessStartInfo() + { + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = FileName; + startInfo.Arguments = GetArguments(); + startInfo.WorkingDirectory = WorkingDirectory; + return startInfo; } /// @@ -143,7 +173,7 @@ namespace ICSharpCode.UnitTesting /// public string GetCommandLine() { - return String.Concat("\"", UnitTestApplication, "\" ", GetArguments()); + return String.Format("\"{0}\" {1}", FileName, GetArguments()); } /// @@ -165,9 +195,9 @@ namespace ICSharpCode.UnitTesting b.Append(" /nothread"); if (NoLogo) b.Append(" /nologo"); - if (Labels) + if (Labels) b.Append(" /labels"); - if (NoDots) + if (NoDots) b.Append(" /nodots"); if (XmlOutputFile != null) { b.Append(" /xml=\""); @@ -207,7 +237,7 @@ namespace ICSharpCode.UnitTesting MSBuildBasedProject msbuildProject = project as MSBuildBasedProject; if (msbuildProject != null) { string platformTarget = msbuildProject.GetEvaluatedProperty("PlatformTarget"); - return String.Equals(platformTarget, "x86", StringComparison.OrdinalIgnoreCase); + return String.Compare(platformTarget, "x86", true) == 0; } return false; } diff --git a/src/AddIns/Analysis/UnitTesting/Src/NUnitTestDebugger.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestDebugger.cs new file mode 100644 index 0000000000..a90861f7e9 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestDebugger.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Debugging; + +namespace ICSharpCode.UnitTesting +{ + public class NUnitTestDebugger : TestDebuggerBase + { + UnitTestingOptions options; + + public NUnitTestDebugger() + : this(new UnitTestDebuggerService(), + new UnitTestMessageService(), + new TestResultsMonitor(), + new UnitTestingOptions()) + { + } + + public NUnitTestDebugger(IUnitTestDebuggerService debuggerService, + IUnitTestMessageService messageService, + ITestResultsMonitor testResultsMonitor, + UnitTestingOptions options) + : base(debuggerService, messageService, testResultsMonitor) + { + this.options = options; + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests, options); + app.Results = base.TestResultsMonitor.FileName; + return app.GetProcessStartInfo(); + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new NUnitTestResult(testResult); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs new file mode 100644 index 0000000000..4adb39f3c6 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestFramework.cs @@ -0,0 +1,115 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class NUnitTestFramework : ITestFramework + { + /// + /// Determines whether the project is a test project. A project + /// is considered to be a test project if it contains a reference + /// to the NUnit.Framework assembly. + /// + public bool IsTestProject(IProject project) + { + if (project != null) { + foreach (ProjectItem projectItem in project.Items) { + ReferenceProjectItem referenceProjectItem = projectItem as ReferenceProjectItem; + if (IsNUnitFrameworkAssemblyReference(referenceProjectItem)) { + return true; + } + } + } + return false; + } + + bool IsNUnitFrameworkAssemblyReference(ReferenceProjectItem referenceProjectItem) + { + if (referenceProjectItem != null) { + string name = referenceProjectItem.ShortName; + return name.Equals("NUnit.Framework", StringComparison.OrdinalIgnoreCase); + } + return false; + } + + /// + /// Determines whether the class is a test fixture. A class + /// is considered to be a test class if it contains a TestFixture attribute. + /// + public bool IsTestClass(IClass c) + { + StringComparer nameComparer = GetNameComparer(c); + if (nameComparer != null) { + NUnitTestAttributeName testAttributeName = new NUnitTestAttributeName("TestFixture", nameComparer); + foreach (IAttribute attribute in c.Attributes) { + if (testAttributeName.IsEqual(attribute)) { + return true; + } + } + } + return false; + } + + StringComparer GetNameComparer(IClass c) + { + if (c != null) { + IProjectContent projectContent = c.ProjectContent; + if (projectContent != null) { + LanguageProperties language = projectContent.Language; + if (language != null) { + return language.NameComparer; + } + } + } + return null; + } + + /// + /// Determines whether the method is a test method. A method + /// is considered to be a test method if it contains the NUnit Test attribute. + /// If the method has parameters it cannot be a test method. + /// + public bool IsTestMethod(IMember member) + { + if (member == null) { + return false; + } + + StringComparer nameComparer = GetNameComparer(member.DeclaringType); + if (nameComparer != null) { + NUnitTestAttributeName testAttribute = new NUnitTestAttributeName("Test", nameComparer); + foreach (IAttribute attribute in member.Attributes) { + if (testAttribute.IsEqual(attribute)) { + IMethod method = (IMethod)member; + if (method.Parameters.Count == 0) { + return true; + } + } + } + } + return false; + } + + public bool IsBuildNeededBeforeTestRun { + get { return true; } + } + + public ITestRunner CreateTestRunner() + { + return new NUnitTestRunner(); + } + + public ITestRunner CreateTestDebugger() + { + return new NUnitTestDebugger(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/NUnitTestResult.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestResult.cs new file mode 100644 index 0000000000..b5d855a6e0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestResult.cs @@ -0,0 +1,41 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public class NUnitTestResult : TestResult + { + public NUnitTestResult(TestResult testResult) + : base(testResult.Name) + { + Message = testResult.Message; + ResultType = testResult.ResultType; + StackTrace = testResult.StackTrace; + } + + protected override void OnStackTraceChanged() + { + FileLineReference fileLineRef = OutputTextLineParser.GetNUnitOutputFileLineReference(StackTrace, true); + if (fileLineRef != null) { + StackTraceFilePosition = CreateFilePosition(fileLineRef); + } else { + StackTraceFilePosition = FilePosition.Empty; + } + } + + FilePosition CreateFilePosition(FileLineReference fileLineRef) + { + string fileName = Path.GetFullPath(fileLineRef.FileName); + return new FilePosition(fileName, fileLineRef.Line, fileLineRef.Column + 1); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/NUnitTestRunner.cs b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestRunner.cs new file mode 100644 index 0000000000..b8a9ca75cd --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/NUnitTestRunner.cs @@ -0,0 +1,45 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public class NUnitTestRunner : TestProcessRunnerBase + { + UnitTestingOptions options; + + public NUnitTestRunner() + : this(new UnitTestProcessRunner(), + new TestResultsMonitor(), + new UnitTestingOptions()) + { + } + + public NUnitTestRunner(IUnitTestProcessRunner processRunner, + ITestResultsMonitor testResultsMonitor, + UnitTestingOptions options) + : base(processRunner, testResultsMonitor) + { + this.options = options; + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests, options); + app.Results = base.TestResultsMonitor.FileName; + return app.GetProcessStartInfo(); + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new NUnitTestResult(testResult); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs b/src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs new file mode 100644 index 0000000000..d8e1a2dfb8 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RegisteredTestFrameworks.cs @@ -0,0 +1,113 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class RegisteredTestFrameworks : IRegisteredTestFrameworks + { + List testFrameworkDescriptors; + public const string AddInPath = "/SharpDevelop/UnitTesting/TestFrameworks"; + + public RegisteredTestFrameworks(IAddInTree addInTree) + { + testFrameworkDescriptors = addInTree.BuildItems(AddInPath, null); + } + + public ITestFramework GetTestFrameworkForProject(IProject project) + { + if (project != null) { + foreach (TestFrameworkDescriptor descriptor in testFrameworkDescriptors) { + if (descriptor.IsSupportedProject(project)) { + return descriptor.TestFramework; + } + } + } + return null; + } + + public bool IsTestMethod(IMember member) + { + ITestFramework testFramework = GetTestFramework(member); + if (testFramework != null) { + return testFramework.IsTestMethod(member); + } + return false; + } + + ITestFramework GetTestFramework(IMember member) + { + if (member != null) { + return GetTestFramework(member.DeclaringType); + } + return null; + } + + ITestFramework GetTestFramework(IClass c) + { + IProject project = GetProject(c); + return GetTestFrameworkForProject(project); + } + + IProject GetProject(IClass c) + { + if (c != null) { + return c.ProjectContent.Project as IProject; + } + return null; + } + + public bool IsTestClass(IClass c) + { + ITestFramework testFramework = GetTestFramework(c); + if (testFramework != null) { + return testFramework.IsTestClass(c); + } + return false; + } + + public bool IsTestProject(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.IsTestProject(project); + } + return false; + } + + public ITestRunner CreateTestRunner(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.CreateTestRunner(); + } + return null; + } + + public ITestRunner CreateTestDebugger(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.CreateTestDebugger(); + } + return null; + } + + public bool IsBuildNeededBeforeTestRunForProject(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.IsBuildNeededBeforeTestRun; + } + return true; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunAllTestsInPadCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/RunAllTestsInPadCommand.cs new file mode 100644 index 0000000000..b1965ee555 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RunAllTestsInPadCommand.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public class RunAllTestsInPadCommand : RunTestInPadCommand + { + public RunAllTestsInPadCommand() + { + } + + public RunAllTestsInPadCommand(IRunTestCommandContext context) + : base(context) + { + } + + public override void Run() + { + // To make sure all tests are run we set the Owner to null. + Owner = null; + base.Run(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunProjectTestsInPadCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/RunProjectTestsInPadCommand.cs new file mode 100644 index 0000000000..b01ee8decc --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RunProjectTestsInPadCommand.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class RunProjectTestsInPadCommand : RunTestInPadCommand, ITestTreeView + { + public RunProjectTestsInPadCommand() + { + } + + public RunProjectTestsInPadCommand(IRunTestCommandContext context) + : base(context) + { + } + + public override void Run() + { + Owner = this; + base.Run(); + } + + public IMember SelectedMethod { + get { return null; } + } + + public IClass SelectedClass { + get { return null; } + } + + public IProject SelectedProject { + get { return ProjectService.CurrentProject; } + } + + public string SelectedNamespace { + get { return null; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunTestCommandContext.cs b/src/AddIns/Analysis/UnitTesting/Src/RunTestCommandContext.cs new file mode 100644 index 0000000000..737c517676 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RunTestCommandContext.cs @@ -0,0 +1,61 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public class RunTestCommandContext : IRunTestCommandContext + { + UnitTestingOptions options = new UnitTestingOptions(); + IRegisteredTestFrameworks testFrameworks = TestService.RegisteredTestFrameworks; + UnitTestTaskService taskService = new UnitTestTaskService(); + UnitTestWorkbench workbench = new UnitTestWorkbench(); + UnitTestBuildProjectFactory buildProjectFactory = new UnitTestBuildProjectFactory(); + UnitTestBuildOptions buildOptions = new UnitTestBuildOptions(); + MessageViewCategory unitTestCategory = TestService.UnitTestMessageView; + UnitTestMessageService messageService = new UnitTestMessageService(); + UnitTestSaveAllFilesCommand saveAllFilesCommand = new UnitTestSaveAllFilesCommand(); + + public IRegisteredTestFrameworks RegisteredTestFrameworks { + get { return testFrameworks; } + } + + public IUnitTestTaskService TaskService { + get { return taskService; } + } + + public IUnitTestWorkbench Workbench { + get { return workbench; } + } + + public IBuildProjectFactory BuildProjectFactory { + get { return buildProjectFactory; } + } + + public IBuildOptions BuildOptions { + get { return buildOptions; } + } + + public MessageViewCategory UnitTestCategory { + get { return unitTestCategory; } + } + + public IUnitTestsPad OpenUnitTestsPad { + get { return UnitTestsPad.Instance; } + } + + public IUnitTestMessageService MessageService { + get { return messageService; } + } + + public IUnitTestSaveAllFilesCommand SaveAllFilesCommand { + get { return saveAllFilesCommand; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunTestCommands.cs b/src/AddIns/Analysis/UnitTesting/Src/RunTestCommands.cs deleted file mode 100644 index ad846b0d49..0000000000 --- a/src/AddIns/Analysis/UnitTesting/Src/RunTestCommands.cs +++ /dev/null @@ -1,550 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; - -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop; -using ICSharpCode.SharpDevelop.Commands; -using ICSharpCode.SharpDevelop.Debugging; -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Gui; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.SharpDevelop.Project.Commands; -using ICSharpCode.SharpDevelop.Util; - -namespace ICSharpCode.UnitTesting -{ - public abstract class AbstractRunTestCommand : AbstractMenuCommand - { - static MessageViewCategory testRunnerCategory; - static AbstractRunTestCommand runningTestCommand; - List projects; - IProject currentProject; - TestResultsMonitor testResultsMonitor; - - public AbstractRunTestCommand() - { - testResultsMonitor = new TestResultsMonitor(); - testResultsMonitor.TestFinished += TestFinished; - } - - /// - /// Gets the running test command. - /// - public static AbstractRunTestCommand RunningTestCommand { - get { - return runningTestCommand; - } - } - - /// - /// Gets whether a test is currently running. - /// - public static bool IsRunningTest { - get { - return runningTestCommand != null; - } - } - - public override void Run() - { - projects = new List(); - - IMember m = TestableCondition.GetMember(Owner); - IClass c = (m != null) ? m.DeclaringType : TestableCondition.GetClass(Owner); - IProject project = TestableCondition.GetProject(Owner); - string namespaceFilter = TestableCondition.GetNamespace(Owner); - - if (project != null) { - projects.Add(project); - } else if (UnitTestsPad.Instance != null) { - projects.AddRange(UnitTestsPad.Instance.TestTreeView.GetProjects()); - } - - if (projects.Count > 0) { - runningTestCommand = this; - try { - BeforeRun(); - if (IsRunningTest) { - currentProject = projects[0]; - Run(currentProject, namespaceFilter, c, m); - } - } catch { - runningTestCommand = null; - throw; - } - } - } - - public static MessageViewCategory TestRunnerCategory { - get { - if (testRunnerCategory == null) { - MessageViewCategory.Create(ref testRunnerCategory, "UnitTesting", "${res:ICSharpCode.NUnitPad.NUnitPadContent.PadName}"); - } - return testRunnerCategory; - } - } - - /// - /// Stops running the tests. - /// - public void Stop() - { - runningTestCommand = null; - UpdateUnitTestsPadToolbar(); - - projects.Clear(); - - testResultsMonitor.Stop(); - StopMonitoring(); - - OnStop(); - } - - /// - /// Called before all tests are run. If multiple projects are - /// to be tested this is called only once. - /// - protected virtual void OnBeforeRunTests() - { - } - - /// - /// Called after all tests have been run even if there have - /// been errors. If multiple projects are to be tested this is called only once. - /// - protected virtual void OnAfterRunTests() - { - } - - protected abstract void RunTests(UnitTestApplicationStartHelper helper); - - /// - /// Called by derived classes when a single test run - /// is finished. - /// - protected void TestsFinished() - { - WorkbenchSingleton.AssertMainThread(); - - // Read the rest of the file just in case. - testResultsMonitor.Stop(); - testResultsMonitor.Read(); - StopMonitoring(); - - projects.Remove(currentProject); - if (projects.Count > 0) { - currentProject = projects[0]; - Run(currentProject, null, null, null); - } else { - runningTestCommand = null; - UpdateUnitTestsPadToolbar(); - if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) { - ShowErrorList(); - } - OnAfterRunTests(); - } - } - - /// - /// Called by derived classes to show a single test result. - /// - protected void ShowResult(TestResult result) - { - if (result.IsFailure || result.IsIgnored) { - TaskService.Add(CreateTask(result)); - } - UpdateTestResult(result); - } - - /// - /// Called when the test run should be stopped. - /// - protected virtual void OnStop() - { - } - - /// - /// Brings the specified pad to the front. - /// - protected void ShowPad(PadDescriptor padDescriptor) - { - if (padDescriptor != null) { - WorkbenchSingleton.SafeThreadAsyncCall(padDescriptor.BringPadToFront); - } - } - - /// - /// Runs the tests after building the project under test. - /// - void Run(IProject project, string namespaceFilter, IClass fixture, IMember test) - { - BuildProjectBeforeTestRun build = new BuildProjectBeforeTestRun(project); - build.BuildComplete += delegate { - OnBuildComplete(build.LastBuildResults, project, namespaceFilter, fixture, test); - }; - build.Run(); - } - - void ShowUnitTestsPad() - { - ShowPad(WorkbenchSingleton.Workbench.GetPad(typeof(UnitTestsPad))); - } - - void UpdateUnitTestsPadToolbar() - { - if (UnitTestsPad.Instance != null) { - UnitTestsPad.Instance.UpdateToolbar(); - } - } - - /// - /// Sets the initial workbench state before starting - /// a test run. - /// - void BeforeRun() - { - TaskService.BuildMessageViewCategory.ClearText(); - TaskService.InUpdate = true; - TaskService.ClearExceptCommentTasks(); - TaskService.InUpdate = false; - - TestRunnerCategory.ClearText(); - - ShowUnitTestsPad(); - ShowOutputPad(); - - UpdateUnitTestsPadToolbar(); - ResetAllTestResults(); - - OnBeforeRunTests(); - } - - /// - /// Brings output pad to the front. - /// - void ShowOutputPad() - { - ShowPad(WorkbenchSingleton.Workbench.GetPad(typeof(CompilerMessageView))); - } - - Task CreateTask(TestResult result) - { - TaskType taskType = TaskType.Warning; - FileLineReference lineRef = null; - string message = String.Empty; - - if (result.IsFailure) { - taskType = TaskType.Error; - lineRef = OutputTextLineParser.GetNUnitOutputFileLineReference(result.StackTrace, true); - message = GetTestResultMessage(result, "${res:NUnitPad.NUnitPadContent.TestTreeView.TestFailedMessage}"); - } else if (result.IsIgnored) { - message = GetTestResultMessage(result, "${res:NUnitPad.NUnitPadContent.TestTreeView.TestNotExecutedMessage}"); - } - if (lineRef == null) { - lineRef = FindTest(result.Name); - } - if (lineRef != null) { - return new Task(FileName.Create(lineRef.FileName), - message, lineRef.Column, lineRef.Line, taskType); - } - return new Task(null, message, 0, 0, taskType); - } - - /// - /// Returns the test result message if there is on otherwise - /// uses the string resource to create a message. - /// - string GetTestResultMessage(TestResult result, string stringResource) - { - if (result.Message.Length > 0) { - return result.Message; - } - return StringParser.Parse(stringResource, new string[,] {{"TestCase", result.Name}}); - } - - /// - /// Returns the location of the specified test method in the - /// project being tested. - /// - FileLineReference FindTest(string methodName) - { - TestProject testProject = GetTestProject(currentProject); - if (testProject != null) { - TestMethod method = testProject.TestClasses.GetTestMethod(methodName); - if (method != null) { - MemberResolveResult resolveResult = new MemberResolveResult(null, null, method.Method); - FilePosition filePos = resolveResult.GetDefinitionPosition(); - return new FileLineReference(filePos.FileName, filePos.Line, filePos.Column); - } - } - return null; - } - - void ShowErrorList() - { - ShowPad(WorkbenchSingleton.Workbench.GetPad(typeof(ErrorListPad))); - } - - /// - /// Runs the test for the project after a successful build. - /// - void OnBuildComplete(BuildResults results, IProject project, string namespaceFilter, IClass fixture, IMember test) - { - if (results.ErrorCount == 0 && IsRunningTest) { - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - - UnitTestingOptions options = new UnitTestingOptions(); - helper.NoThread = options.NoThread; - helper.NoLogo = options.NoLogo; - helper.NoDots = options.NoDots; - helper.Labels = options.Labels; - helper.ShadowCopy = !options.NoShadow; - - if (options.CreateXmlOutputFile) { - helper.XmlOutputFile = Path.Combine(Path.GetDirectoryName(project.OutputAssemblyFullPath), project.AssemblyName + "-TestResult.xml"); - } - - helper.Initialize(project, namespaceFilter, fixture, test); - helper.Results = Path.GetTempFileName(); - - ResetTestResults(project); - - testResultsMonitor.FileName = helper.Results; - testResultsMonitor.Start(); - - try { - RunTests(helper); - } catch { - StopMonitoring(); - throw; - } - } else { - if (IsRunningTest) { - Stop(); - } - if (TaskService.SomethingWentWrong && ErrorListPad.ShowAfterBuild) { - ShowErrorList(); - } - } - } - - /// - /// Clears the test results in the test tree view for the - /// project currently being tested. - /// - void ResetTestResults(IProject project) - { - TestProject testProject = GetTestProject(project); - if (testProject != null) { - testProject.ResetTestResults(); - } - } - - /// - /// Clears the test results in the test tree view for all the - /// displayed projects. - /// - void ResetAllTestResults() - { - if (UnitTestsPad.Instance != null) { - UnitTestsPad.Instance.TestTreeView.ResetTestResults(); - } - } - - /// - /// Gets the TestProject associated with the specified project - /// from the test tree view. - /// - TestProject GetTestProject(IProject project) - { - if (UnitTestsPad.Instance != null) { - return UnitTestsPad.Instance.TestTreeView.GetTestProject(project); - } - return null; - } - - /// - /// Updates the test result in the test tree view. - /// - void UpdateTestResult(TestResult result) - { - TestProject testProject = GetTestProject(currentProject); - if (testProject != null) { - testProject.UpdateTestResult(result); - } - } - - void StopMonitoring() - { - try { - File.Delete(testResultsMonitor.FileName); - } catch { } - - testResultsMonitor.Dispose(); - } - - void TestFinished(object source, TestFinishedEventArgs e) - { - WorkbenchSingleton.SafeThreadAsyncCall(ShowResult, e.Result); - } - } - - /// - /// Custom build command that makes sure errors and warnings - /// are not cleared from the Errors list before every build since - /// we may be running multiple tests after each other. - /// - public class BuildProjectBeforeTestRun : BuildProjectBeforeExecute - { - public BuildProjectBeforeTestRun(IProject targetProject) - : base(targetProject) - { - } - - /// - /// Before a build do not clear the tasks, just save any - /// dirty files. - /// - public override void BeforeBuild() - { - SaveAllFiles.SaveAll(); - } - } - - public class RunTestInPadCommand : AbstractRunTestCommand - { - ProcessRunner runner; - - public RunTestInPadCommand() - { - runner = new ProcessRunner(); - runner.LogStandardOutputAndError = false; - runner.OutputLineReceived += OutputLineReceived; - runner.ProcessExited += ProcessExited; - } - - protected override void RunTests(UnitTestApplicationStartHelper helper) - { - TestRunnerCategory.AppendLine(helper.GetCommandLine()); - runner.Start(helper.UnitTestApplication, helper.GetArguments()); - } - - protected override void OnStop() - { - runner.Kill(); - } - - protected ProcessRunner GetProcessRunner() - { - return runner; - } - - void OutputLineReceived(object source, LineReceivedEventArgs e) - { - TestRunnerCategory.AppendLine(e.Line); - } - - void ProcessExited(object source, EventArgs e) - { - WorkbenchSingleton.SafeThreadAsyncCall(TestsFinished); - } - - void TestFinished(object source, TestFinishedEventArgs e) - { - WorkbenchSingleton.SafeThreadAsyncCall(ShowResult, e.Result); - } - } - - public class RunTestWithDebuggerCommand : AbstractRunTestCommand - { - public override void Run() - { - if (DebuggerService.IsDebuggerLoaded && DebuggerService.CurrentDebugger.IsDebugging) { - if (MessageService.AskQuestion("${res:XML.MainMenu.RunMenu.Compile.StopDebuggingQuestion}", - "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingTitle}")) - { - DebuggerService.CurrentDebugger.Stop(); - base.Run(); - } - } else { - base.Run(); - } - } - - protected override void RunTests(UnitTestApplicationStartHelper helper) - { - bool running = false; - - try { - TestRunnerCategory.AppendLine(helper.GetCommandLine()); - ProcessStartInfo startInfo = new ProcessStartInfo(helper.UnitTestApplication); - startInfo.Arguments = helper.GetArguments(); - startInfo.WorkingDirectory = UnitTestApplicationStartHelper.UnitTestApplicationDirectory; - DebuggerService.DebugStopped += DebuggerFinished; - DebuggerService.CurrentDebugger.Start(startInfo); - running = true; - } finally { - if (!running) { - DebuggerService.DebugStopped -= DebuggerFinished; - } - } - } - - protected override void OnStop() - { - if (DebuggerService.CurrentDebugger.IsDebugging) { - DebuggerService.CurrentDebugger.Stop(); - } - } - - void DebuggerFinished(object sender, EventArgs e) - { - DebuggerService.DebugStopped -= DebuggerFinished; - WorkbenchSingleton.SafeThreadAsyncCall(TestsFinished); - } - } - - public class RunAllTestsInPadCommand : RunTestInPadCommand - { - public override void Run() - { - // To make sure all tests are run we set the Owner to null. - Owner = null; - base.Run(); - } - } - - public class RunProjectTestsInPadCommand : RunTestInPadCommand, ITestTreeView - { - public override void Run() - { - Owner = this; - base.Run(); - } - - public IMember SelectedMethod { - get { return null; } - } - - public IClass SelectedClass { - get { return null; } - } - - public IProject SelectedProject { - get { return ProjectService.CurrentProject; } - } - - public string SelectedNamespace { - get { return null; } - } - } -} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunTestInPadCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/RunTestInPadCommand.cs new file mode 100644 index 0000000000..8bb0fbbf68 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RunTestInPadCommand.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public class RunTestInPadCommand : AbstractRunTestCommand + { + public RunTestInPadCommand() + { + } + + public RunTestInPadCommand(IRunTestCommandContext context) + : base(context) + { + } + + protected override ITestRunner CreateTestRunner(IProject project) + { + return Context.RegisteredTestFrameworks.CreateTestRunner(project); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/RunTestWithDebuggerCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/RunTestWithDebuggerCommand.cs new file mode 100644 index 0000000000..70ececa345 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/RunTestWithDebuggerCommand.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class RunTestWithDebuggerCommand : AbstractRunTestCommand + { + public RunTestWithDebuggerCommand() + { + } + + public RunTestWithDebuggerCommand(IRunTestCommandContext context) + : base(context) + { + } + + protected override ITestRunner CreateTestRunner(IProject project) + { + return Context.RegisteredTestFrameworks.CreateTestDebugger(project); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs b/src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs new file mode 100644 index 0000000000..1ad3df7804 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/SelectedTests.cs @@ -0,0 +1,96 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class SelectedTests + { + string namespaceFilter; + IClass c; + IMember method; + List projects = new List(); + + public SelectedTests(IProject project, string namespaceFilter, IClass c, IMember method) + { + this.namespaceFilter = namespaceFilter; + this.c = c; + this.method = method; + + if (project != null) { + projects.Add(project); + } + } + + public SelectedTests(IProject project) + : this(project, null, null, null) + { + } + + public SelectedTests(object owner, IProject[] selectedProjects) + { + IProject project = TestableCondition.GetProject(owner); + if (project != null) { + projects.Add(project); + } else { + projects.AddRange(selectedProjects); + } + + method = TestableCondition.GetMember(owner); + c = GetClass(method, owner); + namespaceFilter = TestableCondition.GetNamespace(owner); + } + + static IClass GetClass(IMember member, Object owner) + { + if (member != null) { + return member.DeclaringType; + } + return TestableCondition.GetClass(owner); + } + + public bool HasProjects { + get { return projects.Count > 0; } + } + + public void RemoveFirstProject() + { + if (HasProjects) { + projects.RemoveAt(0); + } + } + + public IList Projects { + get { return projects; } + } + + public IProject Project { + get { + if (projects.Count > 0) { + return projects[0]; + } + return null; + } + } + + public string NamespaceFilter { + get { return namespaceFilter; } + } + + public IClass Class { + get { return c; } + } + + public IMember Method { + get { return method; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestAttributeName.cs b/src/AddIns/Analysis/UnitTesting/Src/TestAttributeName.cs index 0182961b3e..cea45bd584 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestAttributeName.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestAttributeName.cs @@ -6,10 +6,11 @@ // using System; +using ICSharpCode.SharpDevelop.Dom; namespace ICSharpCode.UnitTesting { - public class TestAttributeName + public class NUnitTestAttributeName { string name = String.Empty; string qualifiedName = String.Empty; @@ -17,13 +18,13 @@ namespace ICSharpCode.UnitTesting StringComparer nameComparer; /// - /// Creates a new instance of the Test Attribute class. + /// Creates a new instance of the NUnit Test Attribute class. /// /// The name of the attribute (e.g. Test) not /// the full name of the attribute (e.g. TestAttribute). /// The string comparer to use /// when comparing attribute names. - public TestAttributeName(string name, StringComparer nameComparer) + public NUnitTestAttributeName(string name, StringComparer nameComparer) { this.name = name; this.nameComparer = nameComparer; @@ -44,5 +45,10 @@ namespace ICSharpCode.UnitTesting } return false; } + + public bool IsEqual(IAttribute attribute) + { + return IsEqual(attribute.AttributeType.FullyQualifiedName); + } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestClass.cs b/src/AddIns/Analysis/UnitTesting/Src/TestClass.cs index 9c8a54d0cd..38e999a7a2 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestClass.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestClass.cs @@ -13,24 +13,24 @@ using ICSharpCode.SharpDevelop.Dom; namespace ICSharpCode.UnitTesting { /// - /// Represents a class that can be tested. In order for a - /// class to be considered to be testable it needs to have the - /// [TestFixture] attribute. + /// Represents a class that can be tested. /// public class TestClass { IClass c; TestMethodCollection testMethods; TestResultType testResultType; + IRegisteredTestFrameworks testFrameworks; /// /// Raised when the test class result is changed. /// public event EventHandler ResultChanged; - public TestClass(IClass c) + public TestClass(IClass c, IRegisteredTestFrameworks testFrameworks) { this.c = c; + this.testFrameworks = testFrameworks; } /// @@ -40,42 +40,6 @@ namespace ICSharpCode.UnitTesting get { return c; } } - /// - /// Determines whether the class is a test fixture. A class - /// is considered to be a test class if it contains certain - /// test attributes. - /// - public static bool IsTestClass(IClass c) - { - StringComparer nameComparer = GetNameComparer(c); - if (nameComparer != null) { - TestAttributeName testAttributeName = new TestAttributeName("TestFixture", nameComparer); - foreach (IAttribute attribute in c.Attributes) { - if (testAttributeName.IsEqual(attribute.AttributeType.FullyQualifiedName)) { - return true; - } - } - } - return false; - } - - /// - /// Returns the name comparer for the specified class. - /// - public static StringComparer GetNameComparer(IClass c) - { - if (c != null) { - IProjectContent projectContent = c.ProjectContent; - if (projectContent != null) { - LanguageProperties language = projectContent.Language; - if (language != null) { - return language.NameComparer; - } - } - } - return null; - } - /// /// Gets the test classes that exist in the specified namespace. /// @@ -311,11 +275,11 @@ namespace ICSharpCode.UnitTesting /// /// Gets the test methods for the specified class. /// - static TestMethodCollection GetTestMethods(IClass c) + TestMethodCollection GetTestMethods(IClass c) { TestMethodCollection testMethods = new TestMethodCollection(); foreach (IMethod method in c.Methods) { - if (TestMethod.IsTestMethod(method)) { + if (IsTestMethod(method)) { if (!testMethods.Contains(method.Name)) { testMethods.Add(new TestMethod(method)); } @@ -326,7 +290,7 @@ namespace ICSharpCode.UnitTesting IClass declaringType = c; while (c.BaseClass != null) { foreach (IMethod method in c.BaseClass.Methods) { - if (TestMethod.IsTestMethod(method)) { + if (IsTestMethod(method)) { BaseTestMethod baseTestMethod = new BaseTestMethod(declaringType, method); TestMethod testMethod = new TestMethod(c.BaseClass.Name, baseTestMethod); if (method.IsVirtual) { @@ -345,6 +309,11 @@ namespace ICSharpCode.UnitTesting return testMethods; } + bool IsTestMethod(IMember method) + { + return testFrameworks.IsTestMethod(method); + } + /// /// Updates the test class's test result after the test method's /// test result has changed. diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestDebuggerBase.cs b/src/AddIns/Analysis/UnitTesting/Src/TestDebuggerBase.cs new file mode 100644 index 0000000000..5310545a37 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestDebuggerBase.cs @@ -0,0 +1,112 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Debugging; + +namespace ICSharpCode.UnitTesting +{ + public abstract class TestDebuggerBase : TestRunnerBase + { + IUnitTestDebuggerService debuggerService; + IUnitTestMessageService messageService; + IDebugger debugger; + ITestResultsMonitor testResultsMonitor; + + public TestDebuggerBase() + : this(new UnitTestDebuggerService(), + new UnitTestMessageService(), + new TestResultsMonitor()) + { + } + + public TestDebuggerBase(IUnitTestDebuggerService debuggerService, + IUnitTestMessageService messageService, + ITestResultsMonitor testResultsMonitor) + { + this.debuggerService = debuggerService; + this.messageService = messageService; + this.testResultsMonitor = testResultsMonitor; + this.debugger = debuggerService.CurrentDebugger; + + testResultsMonitor.TestFinished += OnTestFinished; + } + + protected ITestResultsMonitor TestResultsMonitor { + get { return testResultsMonitor; } + } + + public override void Start(SelectedTests selectedTests) + { + ProcessStartInfo startInfo = GetProcessStartInfo(selectedTests); + if (IsDebuggerRunning) { + if (CanStopDebugging()) { + debugger.Stop(); + Start(startInfo); + } + } else { + Start(startInfo); + } + } + + public bool IsDebuggerRunning { + get { return debuggerService.IsDebuggerLoaded && debugger.IsDebugging; } + } + + bool CanStopDebugging() + { + string question = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingQuestion}"; + string caption = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingTitle}"; + return messageService.AskQuestion(question, caption); + } + + void Start(ProcessStartInfo startInfo) + { + testResultsMonitor.Start(); + StartDebugger(startInfo); + } + + void StartDebugger(ProcessStartInfo startInfo) + { + LogCommandLine(startInfo); + + bool running = false; + debugger.DebugStopped += DebugStopped; + try { + debugger.Start(startInfo); + running = true; + } finally { + if (!running) { + debugger.DebugStopped -= DebugStopped; + } + } + } + + void DebugStopped(object source, EventArgs e) + { + debugger.DebugStopped -= DebugStopped; + OnAllTestsFinished(source, e); + } + + public override void Stop() + { + if (debugger.IsDebugging) { + debugger.Stop(); + } + + testResultsMonitor.Stop(); + testResultsMonitor.Read(); + } + + public override void Dispose() + { + Stop(); + testResultsMonitor.Dispose(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestFinishedEventArgs.cs b/src/AddIns/Analysis/UnitTesting/Src/TestFinishedEventArgs.cs index b3d8f1274f..473333a1db 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestFinishedEventArgs.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestFinishedEventArgs.cs @@ -9,6 +9,8 @@ using System; namespace ICSharpCode.UnitTesting { + public delegate void TestFinishedEventHandler(object source, TestFinishedEventArgs e); + public class TestFinishedEventArgs : EventArgs { TestResult result; @@ -19,9 +21,7 @@ namespace ICSharpCode.UnitTesting } public TestResult Result { - get { - return result; - } + get { return result; } } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs b/src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs new file mode 100644 index 0000000000..fbddc3976d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestFramework.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public interface ITestFramework + { + bool IsTestMethod(IMember member); + bool IsTestClass(IClass c); + bool IsTestProject(IProject project); + + ITestRunner CreateTestRunner(); + ITestRunner CreateTestDebugger(); + + bool IsBuildNeededBeforeTestRun { get; } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDescriptor.cs b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDescriptor.cs new file mode 100644 index 0000000000..e97c0a67ab --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDescriptor.cs @@ -0,0 +1,81 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using System.IO; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class TestFrameworkDescriptor + { + Properties properties; + ITestFrameworkFactory factory; + ITestFramework testFramework; + List supportedProjectFileExtensions = new List(); + + public TestFrameworkDescriptor(Properties properties, ITestFrameworkFactory factory) + { + this.properties = properties; + this.factory = factory; + + GetSupportedProjectFileExtensions(); + } + + void GetSupportedProjectFileExtensions() + { + string extensions = properties["supportedProjects"]; + + foreach (string extension in extensions.Split(';')) { + supportedProjectFileExtensions.Add(extension.ToLowerInvariant().Trim()); + } + } + + public string Id { + get { return properties["id"]; } + } + + public ITestFramework TestFramework { + get { + CreateTestFrameworkIfNotCreated(); + return testFramework; + } + } + + void CreateTestFrameworkIfNotCreated() + { + if (testFramework == null) { + testFramework = factory.Create(ClassName); + } + } + + string ClassName { + get { return properties["class"]; } + } + + public bool IsSupportedProject(IProject project) + { + string extension = GetProjectFileExtension(project); + return IsSupportedProjectFileExtension(extension); + } + + string GetProjectFileExtension(IProject project) + { + if (project != null) { + return Path.GetExtension(project.FileName).ToLowerInvariant(); + } + return null; + } + + bool IsSupportedProjectFileExtension(string extension) + { + return supportedProjectFileExtensions.Contains(extension); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDoozer.cs b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDoozer.cs new file mode 100644 index 0000000000..0ec68001f9 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkDoozer.cs @@ -0,0 +1,34 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections; +using ICSharpCode.Core; + +namespace ICSharpCode.UnitTesting +{ + public class TestFrameworkDoozer : IDoozer + { + public TestFrameworkDoozer() + { + } + + public bool HandleConditions { + get { return false; } + } + + public object BuildItem(object caller, Codon codon, ArrayList subItems) + { + return BuildItem(codon, new TestFrameworkFactory(codon.AddIn)); + } + + public TestFrameworkDescriptor BuildItem(Codon codon, ITestFrameworkFactory factory) + { + return new TestFrameworkDescriptor(codon.Properties, factory); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkFactory.cs b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkFactory.cs new file mode 100644 index 0000000000..a67547a094 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestFrameworkFactory.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; + +namespace ICSharpCode.UnitTesting +{ + public class TestFrameworkFactory : ITestFrameworkFactory + { + AddIn addin; + + public TestFrameworkFactory(AddIn addin) + { + this.addin = addin; + } + + public ITestFramework Create(string className) + { + return addin.CreateObject(className) as ITestFramework; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestMethod.cs b/src/AddIns/Analysis/UnitTesting/Src/TestMethod.cs index f2c8e191c1..15eb2195fa 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestMethod.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestMethod.cs @@ -11,8 +11,7 @@ using ICSharpCode.SharpDevelop.Dom; namespace ICSharpCode.UnitTesting { /// - /// Represents a method that has the [Test] attribute and - /// can be tested. + /// Represents a method that can be tested. /// public class TestMethod { @@ -56,9 +55,7 @@ namespace ICSharpCode.UnitTesting /// Gets the underlying IMethod for this TestMethod. /// public IMethod Method { - get { - return method; - } + get { return method; } } /// @@ -74,9 +71,7 @@ namespace ICSharpCode.UnitTesting /// Gets the test result for this method. /// public TestResultType Result { - get { - return testResultType; - } + get { return testResultType; } set { TestResultType previousTestResultType = testResultType; testResultType = value; @@ -98,33 +93,6 @@ namespace ICSharpCode.UnitTesting } } - /// - /// Determines whether the method is a test method. A method - /// is considered to be a test method if it contains certain - /// test attributes. If the method has parameters it cannot - /// be a test method. - /// - public static bool IsTestMethod(IMember member) - { - if (member == null) { - return false; - } - - StringComparer nameComparer = TestClass.GetNameComparer(member.DeclaringType); - if (nameComparer != null) { - TestAttributeName testAttribute = new TestAttributeName("Test", nameComparer); - foreach (IAttribute attribute in member.Attributes) { - if (testAttribute.IsEqual(attribute.AttributeType.FullyQualifiedName)) { - IMethod method = (IMethod)member; - if (method.Parameters.Count == 0) { - return true; - } - } - } - } - return false; - } - /// /// Returns the method name from a fully qualified name /// of the form: diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestProcessRunnerBase.cs b/src/AddIns/Analysis/UnitTesting/Src/TestProcessRunnerBase.cs new file mode 100644 index 0000000000..902b7c2f13 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestProcessRunnerBase.cs @@ -0,0 +1,82 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public class TestProcessRunnerBase : TestRunnerBase + { + IUnitTestProcessRunner processRunner; + ITestResultsMonitor testResultsMonitor; + + public TestProcessRunnerBase() + : this(new UnitTestProcessRunner(), + new TestResultsMonitor()) + { + } + + public TestProcessRunnerBase(IUnitTestProcessRunner processRunner, + ITestResultsMonitor testResultsMonitor) + { + this.processRunner = processRunner; + this.testResultsMonitor = testResultsMonitor; + + processRunner.LogStandardOutputAndError = false; + processRunner.OutputLineReceived += OutputLineReceived; + processRunner.ErrorLineReceived += OutputLineReceived; + processRunner.ProcessExited += OnAllTestsFinished; + testResultsMonitor.TestFinished += OnTestFinished; + } + + protected ITestResultsMonitor TestResultsMonitor { + get { return testResultsMonitor; } + } + +// public override event EventHandler AllTestsFinished { +// add { processRunner.ProcessExited += value; } +// remove { processRunner.ProcessExited -= value; } +// } + + void OutputLineReceived(object source, LineReceivedEventArgs e) + { + OnMessageReceived(e.Line); + } + + public override void Start(SelectedTests selectedTests) + { + ProcessStartInfo startInfo = GetProcessStartInfo(selectedTests); + Start(startInfo); + } + + void Start(ProcessStartInfo processStartInfo) + { + LogCommandLine(processStartInfo); + + testResultsMonitor.Start(); + processRunner.WorkingDirectory = processStartInfo.WorkingDirectory; + processRunner.Start(processStartInfo.FileName, processStartInfo.Arguments); + } + + public override void Stop() + { + processRunner.Kill(); + testResultsMonitor.Stop(); + testResultsMonitor.Read(); + } + + public override void Dispose() + { + testResultsMonitor.Dispose(); + testResultsMonitor.TestFinished -= OnTestFinished; + processRunner.ErrorLineReceived -= OutputLineReceived; + processRunner.OutputLineReceived -= OutputLineReceived; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestProject.cs b/src/AddIns/Analysis/UnitTesting/Src/TestProject.cs index f42f069e4e..d2e40349f0 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestProject.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestProject.cs @@ -23,53 +23,19 @@ namespace ICSharpCode.UnitTesting IProjectContent projectContent; TestClassCollection testClasses; List rootNamespaces; + IRegisteredTestFrameworks testFrameworks; - public TestProject(IProject project, IProjectContent projectContent) + public TestProject(IProject project, IProjectContent projectContent, IRegisteredTestFrameworks testFrameworks) { this.project = project; this.projectContent = projectContent; + this.testFrameworks = testFrameworks; } - /// - /// Returns the underlying project. - /// public IProject Project { get { return project; } } - /// - /// Determines whether the project is a test project. A project - /// is considered to be a test project if it contains a reference - /// to the NUnit.Framework assembly. - /// - public static bool IsTestProject(IProject project) - { - if (project != null) { - foreach (ProjectItem projectItem in project.Items) { - ReferenceProjectItem referenceProjectItem = projectItem as ReferenceProjectItem; - if (referenceProjectItem != null) { - if (IsTestFrameworkReference(referenceProjectItem)) { - return true; - } - } - } - } - return false; - } - - /// - /// Determines whether the specified reference is a reference to - /// a test framework. Currently only references to the - /// NUnit.Framework return true. - /// - public static bool IsTestFrameworkReference(ReferenceProjectItem referenceProjectItem) - { - if (referenceProjectItem != null) { - return string.Equals(referenceProjectItem.ShortName, "NUnit.Framework", StringComparison.OrdinalIgnoreCase); - } - return false; - } - /// /// Gets the test classes in this project. /// @@ -209,12 +175,17 @@ namespace ICSharpCode.UnitTesting /// void AddNewTestClass(IClass c) { - if (TestClass.IsTestClass(c)) { - TestClass testClass = new TestClass(c); + if (IsTestClass(c)) { + TestClass testClass = CreateTestClass(c); TestClasses.Add(testClass); } } + TestClass CreateTestClass(IClass c) + { + return new TestClass(c, testFrameworks); + } + /// /// Updates the test class methods based on the newly parsed class /// information. @@ -222,7 +193,7 @@ namespace ICSharpCode.UnitTesting void UpdateTestClass(IClass c) { if (TestClasses.Contains(c.DotNetName)) { - if (TestClass.IsTestClass(c)) { + if (IsTestClass(c)) { TestClass testClass = TestClasses[c.DotNetName]; testClass.UpdateClass(c); } else { @@ -236,38 +207,43 @@ namespace ICSharpCode.UnitTesting // check if the class is actually a test class since // AddNewTestClass does this anyway. AddNewTestClass(c); - } + } } void GetTestClasses() { testClasses = new TestClassCollection(); foreach (IClass c in projectContent.Classes) { - if (TestClass.IsTestClass(c)) { + if (IsTestClass(c)) { if (!testClasses.Contains(c.FullyQualifiedName)) { - testClasses.Add(new TestClass(c)); + testClasses.Add(CreateTestClass(c)); } } foreach (IClass innerClass in c.InnerClasses) { - if (TestClass.IsTestClass(innerClass)) { + if (IsTestClass(innerClass)) { if (!testClasses.Contains(innerClass.DotNetName)) { - testClasses.Add(new TestClass(innerClass)); + testClasses.Add(CreateTestClass(innerClass)); } } } } } + bool IsTestClass(IClass c) + { + return testFrameworks.IsTestClass(c); + } + void GetRootNamespaces() { rootNamespaces = new List(); foreach (TestClass c in TestClasses) { string rootNamespace = c.RootNamespace; - if (rootNamespace.Length > 0 && !rootNamespaces.Contains(rootNamespace)) { + if ((rootNamespace.Length > 0) && !rootNamespaces.Contains(rootNamespace)) { rootNamespaces.Add(rootNamespace); } } - } + } /// /// Gets an existing test class with the same name in the project. This @@ -277,7 +253,7 @@ namespace ICSharpCode.UnitTesting IClass GetExistingTestClassInProject(IClass c) { foreach (IClass existingClass in projectContent.Classes) { - if (TestClass.IsTestClass(existingClass)) { + if (IsTestClass(existingClass)) { if (existingClass.DotNetName == c.DotNetName) { return existingClass; } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestResult.cs b/src/AddIns/Analysis/UnitTesting/Src/TestResult.cs index e5463047e4..4d36ce826f 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestResult.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestResult.cs @@ -6,6 +6,7 @@ // using System; +using ICSharpCode.SharpDevelop.Dom; namespace ICSharpCode.UnitTesting { @@ -40,6 +41,7 @@ namespace ICSharpCode.UnitTesting string message = String.Empty; string stackTrace = String.Empty; TestResultType resultType = TestResultType.None; + FilePosition stackTraceFilePosition = FilePosition.Empty; public TestResult(string name) { @@ -47,60 +49,48 @@ namespace ICSharpCode.UnitTesting } public string Name { - get { - return name; - } + get { return name; } } public bool IsSuccess { - get { - return resultType == TestResultType.Success; - } - set { - resultType = TestResultType.Success; - } + get { return resultType == TestResultType.Success; } } public bool IsFailure { - get { - return resultType == TestResultType.Failure; - } - set { - resultType = TestResultType.Failure; - } + get { return resultType == TestResultType.Failure; } } public bool IsIgnored { - get { - return resultType == TestResultType.Ignored; - } - set { - resultType = TestResultType.Ignored; - } + get { return resultType == TestResultType.Ignored; } } public TestResultType ResultType { - get { - return resultType; - } + get { return resultType; } + set { resultType = value; } } public string Message { - get { - return message; - } - set { - message = value; - } + get { return message; } + set { message = value; } } public string StackTrace { - get { - return stackTrace; - } + get { return stackTrace; } set { - stackTrace = value; + if (stackTrace != value) { + stackTrace = value; + OnStackTraceChanged(); + } } } + + protected virtual void OnStackTraceChanged() + { + } + + public FilePosition StackTraceFilePosition { + get { return stackTraceFilePosition; } + set { stackTraceFilePosition = value; } + } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestResultTask.cs b/src/AddIns/Analysis/UnitTesting/Src/TestResultTask.cs new file mode 100644 index 0000000000..703430907f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestResultTask.cs @@ -0,0 +1,102 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public class TestResultTask + { + TestResultTask() + { + } + + public static Task Create(TestResult result, TestProject project) + { + TaskType taskType = TaskType.Warning; + FileLineReference lineRef = null; + string message = String.Empty; + + if (result.IsFailure) { + taskType = TaskType.Error; + if (!result.StackTraceFilePosition.IsEmpty) { + lineRef = new FileLineReference(result.StackTraceFilePosition.FileName, result.StackTraceFilePosition.Line - 1, result.StackTraceFilePosition.Column - 1); + } + message = GetTestFailedMessage(result); + } else if (result.IsIgnored) { + message = GetTestIgnoredMessage(result); + } + if (lineRef == null) { + lineRef = FindTest(result.Name, project); + } + FileName fileName = null; + if (lineRef != null) { + fileName = new FileName(Path.GetFullPath(lineRef.FileName)); + int line = lineRef.Line + 1; + return new Task(fileName, message, lineRef.Column, line, taskType); + } + return new Task(fileName, message, 0, 0, taskType); + } + + static string GetTestFailedMessage(TestResult result) + { + string resource = "${res:NUnitPad.NUnitPadContent.TestTreeView.TestFailedMessage}"; + return GetTestResultMessage(result, resource); + } + + static string GetTestIgnoredMessage(TestResult result) + { + string resource = "${res:NUnitPad.NUnitPadContent.TestTreeView.TestNotExecutedMessage}"; + return GetTestResultMessage(result, resource); + } + + /// + /// Returns the test result message if there is on otherwise + /// uses the string resource to create a message. + /// + static string GetTestResultMessage(TestResult result, string stringResource) + { + if (result.Message.Length > 0) { + return result.Message; + } + return GetTestResultMessageFromResource(result, stringResource); + } + + static string GetTestResultMessageFromResource(TestResult result, string stringResource) + { + string [,] customTags = new string[,] {{"TestCase", result.Name}}; + return StringParser.Parse(stringResource, customTags); + } + + /// + /// Returns the location of the specified test method in the + /// project being tested. + /// + static FileLineReference FindTest(string methodName, TestProject testProject) + { + if (testProject != null) { + TestMethod testMethod = testProject.TestClasses.GetTestMethod(methodName); + if (testMethod != null) { + return FindTest(testMethod); + } + } + return null; + } + + static FileLineReference FindTest(TestMethod testMethod) + { + MemberResolveResult resolveResult = new MemberResolveResult(null, null, testMethod.Method); + FilePosition filePos = resolveResult.GetDefinitionPosition(); + return new FileLineReference(filePos.FileName, filePos.Line - 1, filePos.Column - 1); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestResultsMonitor.cs b/src/AddIns/Analysis/UnitTesting/Src/TestResultsMonitor.cs index cab72561c3..d29efc4396 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestResultsMonitor.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestResultsMonitor.cs @@ -15,7 +15,7 @@ namespace ICSharpCode.UnitTesting /// Watches for new test results as they occur. Test results /// are written to a file and read in by this class. /// - public class TestResultsMonitor : IDisposable + public class TestResultsMonitor : ITestResultsMonitor { FileInfo fileInfo; TestResultsReader testResultsReader; @@ -25,8 +25,6 @@ namespace ICSharpCode.UnitTesting const int BytesBufferLength = 1024; byte[] bytes = new byte[BytesBufferLength]; - public delegate void TestFinishedEventHandler(object source, TestFinishedEventArgs e); - /// /// Raised when a single test has been completed. /// @@ -39,6 +37,7 @@ namespace ICSharpCode.UnitTesting } public TestResultsMonitor() + : this(Path.GetTempFileName()) { ResetFilePosition(); } @@ -47,12 +46,8 @@ namespace ICSharpCode.UnitTesting /// Gets or sets the test results filename. /// public string FileName { - get { - return fileInfo.FullName; - } - set { - fileInfo = new FileInfo(value); - } + get { return fileInfo.FullName; } + set { fileInfo = new FileInfo(value); } } /// @@ -80,7 +75,7 @@ namespace ICSharpCode.UnitTesting /// Stops monitoring. /// public void Stop() - { + { if (fileSystemWatcher != null) { fileSystemWatcher.Dispose(); fileSystemWatcher = null; @@ -108,6 +103,10 @@ namespace ICSharpCode.UnitTesting public void Dispose() { Stop(); + + try { + File.Delete(FileName); + } catch { } } void FileCreated(object source, FileSystemEventArgs e) @@ -124,7 +123,7 @@ namespace ICSharpCode.UnitTesting void OnTestResultsReceived(TestResult[] results) { - if (results.Length > 0 && TestFinished != null) { + if ((results.Length > 0) && (TestFinished != null)) { foreach (TestResult result in results) { TestFinished(this, new TestFinishedEventArgs(result)); } @@ -150,7 +149,7 @@ namespace ICSharpCode.UnitTesting filePosition += bytesRead; text.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytesRead)); } - } while (bytesRead > 0 && filePosition < fs.Length); + } while ((bytesRead > 0) && (filePosition < fs.Length)); } } } catch (FileNotFoundException) { diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestResultsReader.cs b/src/AddIns/Analysis/UnitTesting/Src/TestResultsReader.cs index a0eef4fef5..5871365a63 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestResultsReader.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestResultsReader.cs @@ -147,12 +147,12 @@ namespace ICSharpCode.UnitTesting void UpdateTestSuccess() { string value = valueBuilder.ToString(); - if (value =="Success") { - result.IsSuccess = true; + if (value == "Success") { + result.ResultType = TestResultType.Success; } else if (value == "Failure") { - result.IsFailure = true; + result.ResultType = TestResultType.Failure; } else { - result.IsIgnored = true; + result.ResultType = TestResultType.Ignored; } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestRunnerBase.cs b/src/AddIns/Analysis/UnitTesting/Src/TestRunnerBase.cs new file mode 100644 index 0000000000..43c5b48f71 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestRunnerBase.cs @@ -0,0 +1,72 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; + +namespace ICSharpCode.UnitTesting +{ + public abstract class TestRunnerBase : ITestRunner + { + public TestRunnerBase() + { + } + + protected virtual ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + return new ProcessStartInfo(); + } + + protected void LogCommandLine(ProcessStartInfo startInfo) + { + string commandLine = GetCommandLine(startInfo); + OnMessageReceived(commandLine); + } + + protected string GetCommandLine(ProcessStartInfo startInfo) + { + return String.Format("\"{0}\" {1}", startInfo.FileName, startInfo.Arguments); + } + + public event EventHandler AllTestsFinished; + + protected void OnAllTestsFinished(object source, EventArgs e) + { + if (AllTestsFinished != null) { + AllTestsFinished(source, e); + } + } + + public event TestFinishedEventHandler TestFinished; + + protected void OnTestFinished(object source, TestFinishedEventArgs e) + { + if (TestFinished != null) { + TestResult testResult = CreateTestResultForTestFramework(e.Result); + TestFinished(source, new TestFinishedEventArgs(testResult)); + } + } + + protected virtual TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return testResult; + } + + public event MessageReceivedEventHandler MessageReceived; + + protected virtual void OnMessageReceived(string message) + { + if (MessageReceived != null) { + MessageReceived(this, new MessageReceivedEventArgs(message)); + } + } + + public abstract void Dispose(); + public abstract void Stop(); + public abstract void Start(SelectedTests selectedTests); + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestService.cs b/src/AddIns/Analysis/UnitTesting/Src/TestService.cs new file mode 100644 index 0000000000..9c7b07a396 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/TestService.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public static class TestService + { + static IRegisteredTestFrameworks testFrameworks; + static MessageViewCategory unitTestMessageView; + + public static IRegisteredTestFrameworks RegisteredTestFrameworks { + get { + CreateRegisteredTestFrameworks(); + return testFrameworks; + } + set { testFrameworks = value; } + } + + static void CreateRegisteredTestFrameworks() + { + if (testFrameworks == null) { + UnitTestAddInTree addInTree = new UnitTestAddInTree(); + testFrameworks = new RegisteredTestFrameworks(addInTree); + } + } + + public static MessageViewCategory UnitTestMessageView { + get { + if (unitTestMessageView == null) { + CreateUnitTestCategory(); + } + return unitTestMessageView; + } + } + + static void CreateUnitTestCategory() + { + MessageViewCategory.Create(ref unitTestMessageView, + "UnitTesting", + "${res:ICSharpCode.NUnitPad.NUnitPadContent.PadName}"); + } + + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestTreeView.cs b/src/AddIns/Analysis/UnitTesting/Src/TestTreeView.cs index 1759f32251..e39d37a8d5 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestTreeView.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestTreeView.cs @@ -37,9 +37,11 @@ namespace ICSharpCode.UnitTesting /// only one test project then no such node will be added. /// AllTestsTreeNode allTestsNode; + IRegisteredTestFrameworks testFrameworks; - public TestTreeView() + public TestTreeView(IRegisteredTestFrameworks testFrameworks) { + this.testFrameworks = testFrameworks; ImageList = TestTreeViewImageList.ImageList; CanClearSelection = false; } @@ -50,7 +52,7 @@ namespace ICSharpCode.UnitTesting public Enum InternalState { get { TestTreeNode selectedNode = SelectedNode as TestTreeNode; - if (selectedNode is TestClassTreeNode || selectedNode is TestMethodTreeNode) { + if ((selectedNode is TestClassTreeNode) || (selectedNode is TestMethodTreeNode)) { return TestTreeViewState.SourceCodeItemSelected; } return TestTreeViewState.None; @@ -81,7 +83,7 @@ namespace ICSharpCode.UnitTesting /// /// Adds the project to the test tree view if the project - /// has a reference to a supported test framework. + /// is a test project. /// /// /// If the project is already in the tree then it will @@ -90,24 +92,58 @@ namespace ICSharpCode.UnitTesting /// public void AddProject(IProject project) { - if (TestProject.IsTestProject(project)) { + if (IsTestProject(project)) { if (GetProjectTreeNode(project) == null) { - // Add a new tree node. - IProjectContent projectContent = GetProjectContent(project); - if (projectContent != null) { - TestProject testProject = new TestProject(project, projectContent); - TestProjectTreeNode node = new TestProjectTreeNode(testProject); - - if (Nodes.Count == 0) { - node.AddTo(this); - } else { - AllTestsTreeNode allTestsNode = GetAllTestsNode(); - allTestsNode.AddProjectNode(node); - } - - // Sort the nodes. - SortNodes(Nodes, true); - } + AddProjectTreeNode(project); + } + } + } + + bool IsTestProject(IProject project) + { + return testFrameworks.IsTestProject(project); + } + + void AddProjectTreeNode(IProject project) + { + TestProjectTreeNode node = CreateProjectTreeNode(project); + if (node != null) { + AddProjectTreeNodeToTree(node); + SortNodes(Nodes, true); + } + } + + TestProjectTreeNode CreateProjectTreeNode(IProject project) + { + IProjectContent projectContent = GetProjectContent(project); + if (projectContent != null) { + TestProject testProject = new TestProject(project, projectContent, testFrameworks); + return new TestProjectTreeNode(testProject); + } + return null; + } + + void AddProjectTreeNodeToTree(TestProjectTreeNode node) + { + if (Nodes.Count == 0) { + node.AddTo(this); + } else { + AllTestsTreeNode allTestsNode = GetAllTestsNode(); + allTestsNode.AddProjectNode(node); + } + } + + public void RemoveSolutionFolder(ISolutionFolder solutionFolder) + { + IProject project = solutionFolder as IProject; + if (project != null) { + RemoveProject(project); + } + + ISolutionFolderContainer solutionFolderContainer = solutionFolder as ISolutionFolderContainer; + if (solutionFolderContainer != null) { + foreach (ISolutionFolder subSolutionFolder in solutionFolderContainer.Folders) { + RemoveSolutionFolder(subSolutionFolder); } } } @@ -119,11 +155,15 @@ namespace ICSharpCode.UnitTesting { TestProjectTreeNode projectNode = GetProjectTreeNode(project); RemoveProjectNode(projectNode); - - // Remove the All Tests node if it exists and there - // is only one project tree node left. - if (allTestsNode != null && GetProjectNodes().Count == 1) { - RemoveAllTestsNode(); + RemoveAllTestsNodeIfOnlyOneProjectLeft(); + } + + void RemoveAllTestsNodeIfOnlyOneProjectLeft() + { + if (allTestsNode != null) { + if (GetProjectNodes().Count == 1) { + RemoveAllTestsNode(); + } } } @@ -133,8 +173,6 @@ namespace ICSharpCode.UnitTesting public IProject[] GetProjects() { List projects = new List(); - - // Get the project information. foreach (TestProjectTreeNode projectNode in GetProjectNodes()) { projects.Add(projectNode.Project); } @@ -172,12 +210,8 @@ namespace ICSharpCode.UnitTesting public IClass SelectedClass { get { TestClassTreeNode classNode = SelectedNode as TestClassTreeNode; - if (classNode == null) { - TestMethodTreeNode methodNode = SelectedNode as TestMethodTreeNode; - if (methodNode != null) { - classNode = methodNode.Parent as TestClassTreeNode; - } + classNode = GetClassNodeFromSelectedMethodNode(); } if (classNode != null) { @@ -187,6 +221,15 @@ namespace ICSharpCode.UnitTesting } } + TestClassTreeNode GetClassNodeFromSelectedMethodNode() + { + TestMethodTreeNode methodNode = SelectedNode as TestMethodTreeNode; + if (methodNode != null) { + return methodNode.Parent as TestClassTreeNode; + } + return null; + } + /// /// Gets the project associated with the currently selected /// tree node. @@ -261,25 +304,6 @@ namespace ICSharpCode.UnitTesting return ParserService.GetProjectContent(project); } - /// - /// Adds or removes a project from the test tree view based on - /// whether a reference to a testing framework has been added or - /// removed. - /// - public void ProjectReferencesChanged(IProject project) - { - TestProjectTreeNode projectNode = GetProjectTreeNode(project); - if (TestProject.IsTestProject(project)) { - if (projectNode == null) { - TestProject testProject = new TestProject(project, GetProjectContent(project)); - projectNode = new TestProjectTreeNode(testProject); - projectNode.AddTo(this); - } - } else { - RemoveProjectNode(projectNode); - } - } - /// /// A tree node has been selected. Here we make sure the tree node /// uses the context menu strip that the tree view is using. This @@ -375,7 +399,6 @@ namespace ICSharpCode.UnitTesting /// void RemoveAllTestsNode() { - // Remove the all tests node. allTestsNode.Remove(); // Copy project nodes to the root. @@ -383,7 +406,6 @@ namespace ICSharpCode.UnitTesting Nodes.Add(node); } - // Dispose the all tests node. AllTestsNodeDisposed(null, null); } @@ -397,5 +419,21 @@ namespace ICSharpCode.UnitTesting allTestsNode.Disposed -= AllTestsNodeDisposed; allTestsNode = null; } + + /// + /// Adds the test project to the test tree view if it is now recognised as a + /// test project and is not already in the test tree. + /// + public void ProjectItemAdded(ProjectItem projectItem) + { + AddProject(projectItem.Project); + } + + public void ProjectItemRemoved(ProjectItem projectItem) + { + if (!testFrameworks.IsTestProject(projectItem.Project)) { + RemoveProject(projectItem.Project); + } + } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/TestableCondition.cs b/src/AddIns/Analysis/UnitTesting/Src/TestableCondition.cs index 6ca1e84c5c..b723129ea4 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/TestableCondition.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/TestableCondition.cs @@ -19,6 +19,18 @@ namespace ICSharpCode.UnitTesting /// public class TestableCondition : IConditionEvaluator { + IRegisteredTestFrameworks testFrameworks; + + public TestableCondition(IRegisteredTestFrameworks testFrameworks) + { + this.testFrameworks = testFrameworks; + } + + public TestableCondition() + : this(TestService.RegisteredTestFrameworks) + { + } + public static IMember GetMember(object caller) { ITestTreeView testTreeView = caller as ITestTreeView; @@ -61,9 +73,22 @@ namespace ICSharpCode.UnitTesting if (testTreeView != null) { return testTreeView.SelectedProject; } + IClass c = GetClassFromMemberOrCaller(caller); + return GetProject(c); + } + + static IClass GetClassFromMemberOrCaller(object caller) + { IMember m = GetMember(caller); - IClass c = (m != null) ? m.DeclaringType : GetClass(caller); - if (c != null && c.ProjectContent != null) { + if (m != null) { + return m.DeclaringType; + } + return GetClass(caller); + } + + static IProject GetProject(IClass c) + { + if (c != null) { return (IProject)c.ProjectContent.Project; } return null; @@ -85,13 +110,18 @@ namespace ICSharpCode.UnitTesting { IMember m = GetMember(caller); if (m != null) { - return TestMethod.IsTestMethod(m); + return testFrameworks.IsTestMethod(m); } IClass c = GetClass(caller); - if (c == null || c.ProjectContent == null || c.ProjectContent.Project == null) { - return false; + if (ClassHasProject(c)) { + return testFrameworks.IsTestClass(c); } - return TestClass.IsTestClass(c); + return false; + } + + static bool ClassHasProject(IClass c) + { + return (c != null) && (c.ProjectContent.Project != null); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestAddInTree.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestAddInTree.cs new file mode 100644 index 0000000000..87ac960bf9 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestAddInTree.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestAddInTree : IAddInTree + { + public List BuildItems(string path, object caller) + { + return AddInTree.BuildItems(path, caller); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildOptions.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildOptions.cs new file mode 100644 index 0000000000..1a2136307d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildOptions.cs @@ -0,0 +1,19 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestBuildOptions : IBuildOptions + { + public bool ShowErrorListAfterBuild { + get { return BuildOptions.ShowErrorListAfterBuild; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildProjectFactory.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildProjectFactory.cs new file mode 100644 index 0000000000..da4a07154d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestBuildProjectFactory.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestBuildProjectFactory : IBuildProjectFactory + { + public BuildProjectBeforeTestRun CreateBuildProjectBeforeTestRun(IProject project) + { + return new BuildProjectBeforeTestRun(project); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs index af5b3fec2e..d3bc62c853 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestCommands.cs @@ -27,28 +27,42 @@ namespace ICSharpCode.UnitTesting public class AddNUnitReferenceCommand : AbstractMenuCommand { - public override void Run() + public void Run(IProject project) { - if (ProjectService.CurrentProject != null) { - ProjectService.AddProjectItem(ProjectService.CurrentProject, new ReferenceProjectItem(ProjectService.CurrentProject, "nunit.framework")); - ProjectService.CurrentProject.Save(); + if (project != null) { + ReferenceProjectItem nunitRef = new ReferenceProjectItem(project, "nunit.framework"); + ProjectService.AddProjectItem(project, nunitRef); + project.Save(); } } + + public override void Run() + { + Run(ProjectService.CurrentProject); + } } public class GotoDefinitionCommand : AbstractMenuCommand { + IUnitTestFileService fileService; + + public GotoDefinitionCommand() + : this(new UnitTestFileService()) + { + } + + public GotoDefinitionCommand(IUnitTestFileService fileService) + { + this.fileService = fileService; + } + public override void Run() { ITestTreeView treeView = Owner as ITestTreeView; if (treeView != null) { - IMember member = treeView.SelectedMethod; + IMember member = GetMember(treeView); IClass c = treeView.SelectedClass; if (member != null) { - BaseTestMethod baseTestMethod = member as BaseTestMethod; - if (baseTestMethod != null) { - member = baseTestMethod.Method; - } GotoMember(member); } else if (c != null) { GotoClass(c); @@ -56,6 +70,18 @@ namespace ICSharpCode.UnitTesting } } + IMember GetMember(ITestTreeView treeView) + { + IMember member = treeView.SelectedMethod; + if (member != null) { + BaseTestMethod baseTestMethod = member as BaseTestMethod; + if (baseTestMethod != null) { + return baseTestMethod.Method; + } + } + return member; + } + void GotoMember(IMember member) { MemberResolveResult resolveResult = new MemberResolveResult(null, null, member); @@ -71,9 +97,9 @@ namespace ICSharpCode.UnitTesting void GotoFilePosition(FilePosition filePosition) { if (filePosition.Position.IsEmpty) { - FileService.OpenFile(filePosition.FileName); + fileService.OpenFile(filePosition.FileName); } else { - FileService.JumpToFilePosition(filePosition.FileName, filePosition.Line, filePosition.Column); + fileService.JumpToFilePosition(filePosition.FileName, filePosition.Line - 1, filePosition.Column - 1); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestDebuggerService.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestDebuggerService.cs new file mode 100644 index 0000000000..38fabcfe68 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestDebuggerService.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Debugging; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestDebuggerService : IUnitTestDebuggerService + { + public bool IsDebuggerLoaded { + get { return DebuggerService.IsDebuggerLoaded; } + } + + public IDebugger CurrentDebugger { + get { return DebuggerService.CurrentDebugger; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestFileService.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestFileService.cs new file mode 100644 index 0000000000..21b2fc7f89 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestFileService.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestFileService : IUnitTestFileService + { + public void OpenFile(string fileName) + { + FileService.OpenFile(fileName); + } + + public void JumpToFilePosition(string fileName, int line, int column) + { + FileService.JumpToFilePosition(fileName, line, column); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestMessageService.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestMessageService.cs new file mode 100644 index 0000000000..9f5eaeb67a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestMessageService.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestMessageService : IUnitTestMessageService + { + public bool AskQuestion(string question, string caption) + { + return MessageService.AskQuestion(question, caption); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestProcessRunner.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestProcessRunner.cs new file mode 100644 index 0000000000..c8de4aeef5 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestProcessRunner.cs @@ -0,0 +1,57 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestProcessRunner : IUnitTestProcessRunner + { + ProcessRunner runner; + + public event LineReceivedEventHandler OutputLineReceived { + add { runner.OutputLineReceived += value; } + remove { runner.OutputLineReceived -= value; } + } + + public event LineReceivedEventHandler ErrorLineReceived { + add { runner.ErrorLineReceived += value; } + remove { runner.ErrorLineReceived -= value; } + } + + public event EventHandler ProcessExited { + add { runner.ProcessExited += value; } + remove { runner.ProcessExited -= value; } + } + + public UnitTestProcessRunner() + { + runner = new ProcessRunner(); + } + + public bool LogStandardOutputAndError { + get { return runner.LogStandardOutputAndError; } + set { runner.LogStandardOutputAndError = value; } + } + + public string WorkingDirectory { + get { return runner.WorkingDirectory; } + set { runner.WorkingDirectory = value; } + } + + public void Start(string command, string arguments) + { + runner.Start(command, arguments); + } + + public void Kill() + { + runner.Kill(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestSaveAllFilesCommand.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestSaveAllFilesCommand.cs new file mode 100644 index 0000000000..8725ec2008 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestSaveAllFilesCommand.cs @@ -0,0 +1,19 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestSaveAllFilesCommand : IUnitTestSaveAllFilesCommand + { + public void SaveAllFiles() + { + ICSharpCode.SharpDevelop.Commands.SaveAllFiles.SaveAll(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestTaskService.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestTaskService.cs new file mode 100644 index 0000000000..0c26e5329f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestTaskService.cs @@ -0,0 +1,39 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestTaskService : IUnitTestTaskService + { + public void ClearExceptCommentTasks() + { + TaskService.ClearExceptCommentTasks(); + } + + public bool InUpdate { + get { return TaskService.InUpdate; } + set { TaskService.InUpdate = value; } + } + + public MessageViewCategory BuildMessageViewCategory { + get { return TaskService.BuildMessageViewCategory; } + } + + public void Add(Task task) + { + TaskService.Add(task); + } + + public bool SomethingWentWrong { + get { return TaskService.SomethingWentWrong; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestWorkbench.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestWorkbench.cs new file mode 100644 index 0000000000..5a031e4bb1 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestWorkbench.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; + +namespace ICSharpCode.UnitTesting +{ + public class UnitTestWorkbench : IUnitTestWorkbench + { + public PadDescriptor GetPad(Type type) + { + return WorkbenchSingleton.Workbench.GetPad(type); + } + + public void SafeThreadAsyncCall(Action method) + { + WorkbenchSingleton.SafeThreadAsyncCall(method); + } + + public void SafeThreadAsyncCall(Action method, A arg1) + { + WorkbenchSingleton.SafeThreadAsyncCall(method, arg1); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Src/UnitTestsPad.cs b/src/AddIns/Analysis/UnitTesting/Src/UnitTestsPad.cs index f6e2f27ed6..465f23aebb 100644 --- a/src/AddIns/Analysis/UnitTesting/Src/UnitTestsPad.cs +++ b/src/AddIns/Analysis/UnitTesting/Src/UnitTestsPad.cs @@ -18,7 +18,7 @@ using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.UnitTesting { - public class UnitTestsPad : AbstractPadContent + public class UnitTestsPad : AbstractPadContent, IUnitTestsPad { TestTreeView treeView; bool disposed; @@ -28,11 +28,16 @@ namespace ICSharpCode.UnitTesting static UnitTestsPad instance; public UnitTestsPad() + : this(TestService.RegisteredTestFrameworks) + { + } + + public UnitTestsPad(IRegisteredTestFrameworks testFrameworks) { instance = this; panel = new Panel(); - treeView = CreateTestTreeView(); + treeView = CreateTestTreeView(testFrameworks); treeView.Dock = DockStyle.Fill; treeView.DoubleClick += TestTreeViewDoubleClick; treeView.KeyPress += TestTreeViewKeyPress; @@ -49,7 +54,6 @@ namespace ICSharpCode.UnitTesting OnAddedLoadSolutionProjectsThreadEndedHandler(); // Display currently open solution. - if (!IsParserLoadingSolution) { Solution openSolution = GetOpenSolution(); if (openSolution != null) { @@ -68,15 +72,11 @@ namespace ICSharpCode.UnitTesting } public static UnitTestsPad Instance { - get { - return instance; - } + get { return instance; } } public override object Control { - get { - return panel; - } + get { return panel; } } public override void Dispose() @@ -97,9 +97,22 @@ namespace ICSharpCode.UnitTesting } public TestTreeView TestTreeView { - get { - return treeView; - } + get { return treeView; } + } + + public void ResetTestResults() + { + treeView.ResetTestResults(); + } + + public IProject[] GetProjects() + { + return treeView.GetProjects(); + } + + public TestProject GetTestProject(IProject project) + { + return treeView.GetTestProject(project); } /// @@ -137,15 +150,7 @@ namespace ICSharpCode.UnitTesting protected void SolutionFolderRemoved(ISolutionFolder solutionFolder) { - IProject project = solutionFolder as IProject; - if (project != null) { - treeView.RemoveProject(project); - } - - if (solutionFolder is ISolutionFolderContainer) { - // recurse into child folders that were also removed - ((ISolutionFolderContainer)solutionFolder).Folders.ForEach(SolutionFolderRemoved); - } + treeView.RemoveSolutionFolder(solutionFolder); } /// @@ -164,23 +169,12 @@ namespace ICSharpCode.UnitTesting /// protected void ProjectItemRemoved(ProjectItem projectItem) { - if (IsTestFrameworkReferenceProjectItem(projectItem)) { - if (!TestProject.IsTestProject(projectItem.Project)) { - treeView.RemoveProject(projectItem.Project); - } - } + treeView.ProjectItemRemoved(projectItem); } - /// - /// Adds the test project to the test tree view if it has - /// a reference to a unit testing framework and is not - /// already in the test tree. - /// protected void ProjectItemAdded(ProjectItem projectItem) { - if (IsTestFrameworkReferenceProjectItem(projectItem)) { - treeView.AddProject(projectItem.Project); - } + treeView.ProjectItemAdded(projectItem); } /// @@ -213,9 +207,9 @@ namespace ICSharpCode.UnitTesting /// Virtual method so we can override this method and return /// a dummy TestTreeView when testing. /// - protected virtual TestTreeView CreateTestTreeView() + protected virtual TestTreeView CreateTestTreeView(IRegisteredTestFrameworks testFrameworks) { - return new TestTreeView(); + return new TestTreeView(testFrameworks); } /// @@ -231,9 +225,7 @@ namespace ICSharpCode.UnitTesting /// solution. /// protected virtual bool IsParserLoadingSolution { - get { - return ParserService.LoadSolutionProjectsThreadRunning; - } + get { return ParserService.LoadSolutionProjectsThreadRunning; } } /// @@ -320,15 +312,6 @@ namespace ICSharpCode.UnitTesting command.Run(); } - bool IsTestFrameworkReferenceProjectItem(ProjectItem projectItem) - { - ReferenceProjectItem referenceProjectItem = projectItem as ReferenceProjectItem; - if (referenceProjectItem != null) { - return TestProject.IsTestFrameworkReference(referenceProjectItem); - } - return false; - } - void ProjectItemAdded(object source, ProjectItemEventArgs e) { ProjectItemAdded(e.ProjectItem); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/CreateNUnitTestRunnerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/CreateNUnitTestRunnerTestFixture.cs new file mode 100644 index 0000000000..23889a32fc --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/CreateNUnitTestRunnerTestFixture.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class CreateNUnitTestRunnerTestFixture + { + [TestFixtureSetUp] + public void SetUpFixture() + { + if (!PropertyService.Initialized) { + PropertyService.InitializeService(String.Empty, String.Empty, String.Empty); + } + } + + [Test] + public void NUnitTestFrameworkCreateTestRunnerReturnsNUnitTestRunner() + { + NUnitTestFramework testFramework = new NUnitTestFramework(); + Assert.IsInstanceOf(typeof(NUnitTestRunner), testFramework.CreateTestRunner()); + } + + [Test] + public void NUnitTestFrameworkCreateTestDebuggerReturnsNUnitTestDebugger() + { + NUnitTestFramework testFramework = new NUnitTestFramework(); + Assert.IsInstanceOf(typeof(NUnitTestDebugger), testFramework.CreateTestDebugger()); + } + + [Test] + public void IsBuildNeededBeforeTestRunReturnsTrue() + { + NUnitTestFramework testFramework = new NUnitTestFramework(); + Assert.IsTrue(testFramework.IsBuildNeededBeforeTestRun); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs new file mode 100644 index 0000000000..10cbede772 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleCommandLineTests.cs @@ -0,0 +1,266 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class NUnitConsoleCommandLineTests + { + CompilableProject project; + + [SetUp] + public void SetUp() + { + project = new MockCSharpProject(); + project.FileName = @"C:\Projects\MyTests\MyTests.csproj"; + project.AssemblyName = "MyTests"; + project.OutputType = OutputType.Library; + project.SetProperty("OutputPath", null); + } + + [Test] + public void TestResultsFile() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.Results = @"C:\results.txt"; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /results=\"C:\\results.txt\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void NoLogo() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = true; + app.ShadowCopy = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nologo"; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void NoShadowCopy() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = false; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /noshadow"; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void NoThread() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.NoThread = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nothread"; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void NoDots() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.NoDots = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nodots"; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void Labels() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.Labels = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /labels"; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void TestFixture() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.Fixture = "TestFixture"; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void TestNamespace() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.NamespaceFilter = "TestFixture"; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void XmlOutputFile() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.XmlOutputFile = @"C:\NUnit.xml"; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /xml=\"C:\\NUnit.xml\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void TestMethod() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + app.Fixture = "TestFixture"; + app.Test = "Test"; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void TestMethodSpecifiedInInitialize() + { + MockClass testFixture = new MockClass("TestFixture"); + MockMethod testMethod = new MockMethod(testFixture, "Test"); + SelectedTests selectedTests = new SelectedTests(project, null, testFixture, testMethod); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void TestNamespaceSpecifiedInInitialize() + { + SelectedTests selectedTests = new SelectedTests(project, "Project.MyTests", null, null); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"Project.MyTests\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void FullCommandLine() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = true; + app.ShadowCopy = true; + + FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; + + string expectedFullCommandLine = + "\"C:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " + + "\"C:\\Projects\\MyTests\\MyTests.dll\" " + + "/nologo"; + Assert.AreEqual(expectedFullCommandLine, app.GetCommandLine()); + } + + /// + /// Tests that a space is appended between the items added + /// to the UnitTestApplicationStartapp.Assemblies + /// when the command line is generated. + /// + [Test] + public void SecondAssemblySpecified() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.Assemblies.Add("SecondAssembly.dll"); + app.NoLogo = false; + app.ShadowCopy = true; + app.Results = @"C:\results.txt"; + + string expectedCommandLine = + "\"C:\\Projects\\MyTests\\MyTests.dll\" " + + "\"SecondAssembly.dll\" " + + "/results=\"C:\\results.txt\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void GetProject() + { + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + Assert.AreSame(project, app.Project); + } + + [Test] + public void TestInnerClassSpecifiedInInitialize() + { + MockClass testFixture = new MockClass("MyTests.TestFixture.InnerTest", "MyTests.TestFixture+InnerTest"); + SelectedTests selectedTests = new SelectedTests(project, null, testFixture, null); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + app.NoLogo = false; + app.ShadowCopy = true; + + string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" " + + "/run=\"MyTests.TestFixture+InnerTest\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void XmlOutputFileNameSpecifiedOnCommandLine() + { + UnitTestingOptions options = new UnitTestingOptions(new Properties()); + options.CreateXmlOutputFile = true; + MockClass testFixture = new MockClass("MyTests.TestFixture.MyTest"); + SelectedTests selectedTests = new SelectedTests(project, null, testFixture, null); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests, options); + app.NoLogo = false; + app.ShadowCopy = true; + + string expectedCommandLine = + "\"C:\\Projects\\MyTests\\MyTests.dll\" " + + "/xml=\"C:\\Projects\\MyTests\\MyTests-TestResult.xml\" " + + "/run=\"MyTests.TestFixture.MyTest\""; + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/NUnitConsoleExeSelectedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleExeSelectedTestFixture.cs similarity index 72% rename from src/AddIns/Analysis/UnitTesting/Test/NUnitConsoleExeSelectedTestFixture.cs rename to src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleExeSelectedTestFixture.cs index ab7ae27262..049f9f3019 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/NUnitConsoleExeSelectedTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleExeSelectedTestFixture.cs @@ -12,10 +12,10 @@ using NUnit.Framework; using ICSharpCode.UnitTesting; using UnitTesting.Tests.Utils; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Frameworks { /// - /// If the project explicitly targets 32 bit (x86) architecture then nunit-console-x86.exe should be + /// If the project explicitly targets 32 bit (x86) architecture then nunit-console-x86.exe should be /// used. Otherwise the normal nunit-console.exe is used. /// [TestFixture] @@ -23,7 +23,7 @@ namespace UnitTesting.Tests { string oldRootPath; - [TestFixtureSetUpAttribute] + [TestFixtureSetUp] public void SetUpFixture() { oldRootPath = FileUtility.ApplicationRootPath; @@ -40,12 +40,11 @@ namespace UnitTesting.Tests public void NothingSpecified() { MockCSharpProject project = new MockCSharpProject(); - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - helper.Initialize(project, null); - Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", helper.UnitTestApplication); + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe", app.FileName); } - [Test] public void TargetCpuAnyCPUDotnet2() { @@ -55,9 +54,9 @@ namespace UnitTesting.Tests project.SetProperty("PlatformTarget", "AnyCPU"); project.SetProperty("TargetFrameworkVersion", "v3.5"); - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - helper.Initialize(project, null); - Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2.exe", helper.UnitTestApplication); + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2.exe", app.FileName); } [Test] @@ -69,9 +68,9 @@ namespace UnitTesting.Tests project.SetProperty("PlatformTarget", "x86"); project.SetProperty("TargetFrameworkVersion", "v3.5"); - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - helper.Initialize(project, null); - Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", helper.UnitTestApplication); + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-dotnet2-x86.exe", app.FileName); } [Test] @@ -81,22 +80,21 @@ namespace UnitTesting.Tests project.ActiveConfiguration = "Debug"; project.ActivePlatform = "AnyCPU"; project.SetProperty("PlatformTarget", "x86"); - project.SetProperty("TargetFrameworkVersion", "v4.0"); - - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - helper.Initialize(project, null); - Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe", helper.UnitTestApplication); + + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe", app.FileName); } [Test] public void NotMSBuildBasedProject() { MissingProject project = new MissingProject(@"C:\Projects\Test.proj", "Test"); - UnitTestApplicationStartHelper helper = new UnitTestApplicationStartHelper(); - helper.Initialize(project, null); + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); Assert.AreEqual(project.GetType().BaseType, typeof(AbstractProject), "MissingProject should be derived from AbstractProject."); - Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console.exe", helper.UnitTestApplication); + Assert.AreEqual(@"D:\SharpDevelop\bin\Tools\NUnit\nunit-console.exe", app.FileName); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs new file mode 100644 index 0000000000..b837787072 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitConsoleProcessStartInfoTestFixture.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class NUnitConsoleProcessStartInfoTestFixture + { + ProcessStartInfo info; + + [TestFixtureSetUp] + public void SetUpFixture() + { + FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; + } + + [SetUp] + public void Init() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests selectedTests = new SelectedTests(project); + NUnitConsoleApplication app = new NUnitConsoleApplication(selectedTests); + + info = app.GetProcessStartInfo(); + } + + [Test] + public void WorkingDirectoryIsNUnitConsoleApplicationDirectory() + { + string expectedDirectory = @"C:\SharpDevelop\bin\Tools\NUnit"; + Assert.AreEqual(expectedDirectory, info.WorkingDirectory); + } + + [Test] + public void FileNameIsNUnitConsoleExe() + { + string expectedFileName = @"C:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + Assert.AreEqual(expectedFileName, info.FileName); + } + + [Test] + public void CommandLineArgumentsAreNUnitConsoleExeCommandLineArguments() + { + string expectedCommandLine = + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedCommandLine, info.Arguments); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs new file mode 100644 index 0000000000..cfce2eeb3b --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestClassTests.cs @@ -0,0 +1,90 @@ +// +// +// +// +// $Revision$ +// + +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class NUnitTestFrameworkIsTestClassTests + { + NUnitTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new NUnitTestFramework(); + } + + [Test] + public void IsTestClassReturnsFalseHasClassHasNoAttributes() + { + MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasTestFixtureAttributeMissingAttributePart() + { + MockAttribute testAttribute = new MockAttribute("TestFixture"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasTestFixtureAttribute() + { + MockAttribute testFixtureAttribute = new MockAttribute("TestFixtureAttribute"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasFullyQualifiedNUnitTestFixtureAttribute() + { + MockAttribute testFixtureAttribute = new MockAttribute("NUnit.Framework.TestFixtureAttribute"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsFalseWhenClassIsNull() + { + Assert.IsFalse(testFramework.IsTestClass(null)); + } + + [Test] + public void IsTestClassReturnsFalseWhenProjectContentLanguageIsNull() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + MockClass mockClass = new MockClass(mockProjectContent); + + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsFalseWhenProjectContentLanguageNameComparerIsNull() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + mockProjectContent.Language = new LanguageProperties(null); + MockClass mockClass = new MockClass(mockProjectContent); + mockClass.Attributes.Add(new MockAttribute("Test")); + + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestMethodTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestMethodTests.cs new file mode 100644 index 0000000000..1bebb26588 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestMethodTests.cs @@ -0,0 +1,113 @@ +// +// +// +// +// $Revision$ +// + +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class NUnitTestFrameworkIsTestMethodTests + { + NUnitTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new NUnitTestFramework(); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasNoAttributes() + { + MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasTestAttributeWithoutAttributePart() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasTestAttributeAttribute() + { + MockAttribute testAttribute = new MockAttribute("TestAttribute"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasFullyQualifiedNUnitTestAttribute() + { + MockAttribute testAttribute = new MockAttribute("NUnit.Framework.TestAttribute"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodIsNull() + { + Assert.IsFalse(testFramework.IsTestMethod(null)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenProjectContentLanguageHasNullNameComparer() + { + MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + mockClass.MockProjectContent.Language = new LanguageProperties(null); + MockMethod mockMethod = new MockMethod(mockClass); + mockMethod.Attributes.Add(new MockAttribute("Test")); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + /// + /// Even if the project is null the method should be + /// flagged as a TestMethod. + /// + [Test] + public void IsTestMethodReturnsTrueWhenProjectIsNull() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; + mockProjectContent.Project = null; + + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasNullLanguage() + { + MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + mockClass.MockProjectContent.Language = null; + MockMethod mockMethod = new MockMethod(mockClass); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasHasParameters() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + MockParameter mockParameter = new MockParameter(); + mockMethod.Parameters.Add(mockParameter); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestProjectTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestProjectTests.cs new file mode 100644 index 0000000000..9005dfb052 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestFrameworkIsTestProjectTests.cs @@ -0,0 +1,96 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class NUnitTestFrameworkIsTestProjectTests + { + NUnitTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new NUnitTestFramework(); + } + + [Test] + public void NUnitTestFrameworkImplementsITestFramework() + { + Assert.IsNotNull(testFramework as ITestFramework); + } + + [Test] + public void IsTestProjectReturnsFalseForNullProject() + { + Assert.IsFalse(testFramework.IsTestProject(null)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithNUnitFrameworkAssemblyReference() + { + MockCSharpProject project = new MockCSharpProject(); + + ReferenceProjectItem systemRef = new ReferenceProjectItem(project, "System"); + ProjectService.AddProjectItem(project, systemRef); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "NUnit.Framework"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsFalseForProjectWithoutNUnitFrameworkAssemblyReference() + { + MockCSharpProject project = new MockCSharpProject(); + Assert.IsFalse(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithNUnitFrameworkAssemblyReferenceIgnoringCase() + { + MockCSharpProject project = new MockCSharpProject(); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "NUNIT.FRAMEWORK"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithNUnitFrameworkAssemblyReferenceIgnoringNonReferenceProjectItems() + { + MockCSharpProject project = new MockCSharpProject(); + + FileProjectItem fileItem = new FileProjectItem(project, ItemType.Compile, "test.cs"); + ProjectService.AddProjectItem(project, fileItem); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "nunit.framework"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithNUnitFrameworkAssemblyReferenceUsingFullName() + { + MockCSharpProject project = new MockCSharpProject(); + string assemblyName = "nunit.framework, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"; + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, assemblyName); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestResultFailureTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestResultFailureTestFixture.cs new file mode 100644 index 0000000000..767f4bb7e3 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/NUnitTestResultFailureTestFixture.cs @@ -0,0 +1,74 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class NUnitTestResultFailureTestFixture + { + NUnitTestResult nunitTestResult; + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyNamespace.MyTests"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "Test failed"; + testResult.StackTrace = + "Test Error : MyTest.Test\r\n" + + "at TestResultTask.Create() in c:\\projects\\SharpDevelop\\TestResultTask.cs:line 45\r\n" + + "at MyTest.Test() in c:\\myprojects\\test\\..\\test\\mytest.cs:line 28\r\n" + + ""; + nunitTestResult = new NUnitTestResult(testResult); + } + + [Test] + public void TestResultTypeIsFailure() + { + Assert.AreEqual(TestResultType.Failure, nunitTestResult.ResultType); + } + + [Test] + public void TestResultMessageIsTestFailed() + { + Assert.AreEqual("Test failed", nunitTestResult.Message); + } + + [Test] + public void StackTraceFilePositionFileNameMatchesLastFileNameInStackTrace() + { + string expectedFileName = @"c:\myprojects\test\mytest.cs"; + Assert.AreEqual(expectedFileName, nunitTestResult.StackTraceFilePosition.FileName); + } + + [Test] + public void StackTraceFilePositionLineNumberIs28WhichIsEqualToReportedNUnitErrorLine() + { + Assert.AreEqual(28, nunitTestResult.StackTraceFilePosition.Line); + } + + [Test] + public void StackTraceFilePositionColumnNumberIsOne() + { + Assert.AreEqual(1, nunitTestResult.StackTraceFilePosition.Column); + } + + [Test] + public void ChangingStackTraceToEmptyStringSetsStackTraceFilePositionToEmpty() + { + nunitTestResult.StackTraceFilePosition = new FilePosition("test.cs", 10, 2); + nunitTestResult.StackTrace = String.Empty; + Assert.IsTrue(nunitTestResult.StackTraceFilePosition.IsEmpty); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs new file mode 100644 index 0000000000..5b89ee6aa2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/RegisteredTestFrameworksTestFixture.cs @@ -0,0 +1,240 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class RegisteredTestFrameworksTestFixture + { + RegisteredTestFrameworks testFrameworks; + MockTestFramework nunitTestFramework; + MockTestFramework mbUnitTestFramework; + + [SetUp] + public void Init() + { + List descriptors = new List(); + + MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); + + Properties mbUnitProperties = new Properties(); + mbUnitProperties["id"] = "mbunit"; + mbUnitProperties["class"] = "MBUnitTestFramework"; + mbUnitProperties["supportedProjects"] = ".vbproj"; + mbUnitTestFramework = new MockTestFramework(); + factory.Add("MBUnitTestFramework", mbUnitTestFramework); + + Properties nunitProperties = new Properties(); + nunitProperties["id"] = "nunit"; + nunitProperties["class"] = "NUnitTestFramework"; + nunitProperties["supportedProjects"] = ".csproj"; + nunitTestFramework = new MockTestFramework(); + factory.Add("NUnitTestFramework", nunitTestFramework); + + TestFrameworkDescriptor mbUnitDescriptor = new TestFrameworkDescriptor(mbUnitProperties, factory); + TestFrameworkDescriptor nunitDescriptor = new TestFrameworkDescriptor(nunitProperties, factory); + + descriptors.Add(mbUnitDescriptor); + descriptors.Add(nunitDescriptor); + + MockAddInTree addinTree = new MockAddInTree(); + addinTree.AddItems("/SharpDevelop/UnitTesting/TestFrameworks", descriptors); + + testFrameworks = new RegisteredTestFrameworks(addinTree); + } + + [Test] + public void NUnitTestFrameworkRegisteredForUseWithProjectsWithCSharpProjectFileExtension() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test\MyProj.csproj"; + + Assert.AreEqual(nunitTestFramework, testFrameworks.GetTestFrameworkForProject(project)); + } + + [Test] + public void MbUnitTestFrameworkRegisteredForUseWithProjectsWithVBNetProjectFileExtension() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test\MyProj.vbproj"; + + Assert.AreEqual(mbUnitTestFramework, testFrameworks.GetTestFrameworkForProject(project)); + } + + [Test] + public void IsTestMethodReturnsFalseForUnknownMbUnitFrameworkTestMethod() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj"; + + Assert.IsFalse(testFrameworks.IsTestMethod(method)); + } + + [Test] + public void IsTestMethodReturnsTrueForKnownMbUnitFrameworkTestMethod() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj"; + + mbUnitTestFramework.AddTestMethod(method); + + Assert.IsTrue(testFrameworks.IsTestMethod(method)); + } + + [Test] + public void IsTestMethodDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.MockDeclaringType.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.unknown"; + + Assert.IsFalse(testFrameworks.IsTestMethod(method)); + } + + [Test] + public void IsTestMethodDoesNotThrowNullReferenceWhenNullPassedToMethod() + { + Assert.IsFalse(testFrameworks.IsTestMethod(null)); + } + + [Test] + public void IsTestClassReturnsFalseForUnknownMbUnitFrameworkTestClass() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj"; + + Assert.IsFalse(testFrameworks.IsTestClass(c)); + } + + [Test] + public void IsTestClassReturnsTrueForKnownMbUnitFrameworkTestClass() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.vbproj"; + + mbUnitTestFramework.AddTestClass(c); + + Assert.IsTrue(testFrameworks.IsTestClass(c)); + } + + [Test] + public void IsTestClassDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.MockProjectContent.ProjectAsIProject.FileName = @"d:\projects\test.unknown"; + + Assert.IsFalse(testFrameworks.IsTestClass(c)); + } + + [Test] + public void IsTestClassDoesNotThrowNullReferenceWhenNullPassedToMethod() + { + Assert.IsFalse(testFrameworks.IsTestClass(null)); + } + + [Test] + public void IsTestProjectReturnsFalseForUnknownMbUnitFrameworkTestProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.vbproj"; + + Assert.IsFalse(testFrameworks.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForKnownMbUnitFrameworkTestProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.vbproj"; + + mbUnitTestFramework.AddTestProject(project); + + Assert.IsTrue(testFrameworks.IsTestProject(project)); + } + + [Test] + public void IsTestProjectDoesNotThrowNullReferenceExceptionWhenNoTestFrameworkSupportsProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.unknown"; + + Assert.IsFalse(testFrameworks.IsTestProject(project)); + } + + [Test] + public void IsTestProjectDoesNotThrowNullReferenceWhenNullPassedToMethod() + { + Assert.IsFalse(testFrameworks.IsTestProject(null)); + } + + [Test] + public void CreateTestRunnerReturnsNewTestRunnerFromCorrectTestFramework() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.csproj"; + + ITestRunner testRunner = testFrameworks.CreateTestRunner(project); + ITestRunner[] expectedTestRunners = new ITestRunner[] { testRunner }; + Assert.AreEqual(expectedTestRunners, nunitTestFramework.TestRunnersCreated.ToArray()); + } + + [Test] + public void CreateTestRunnerDoesNotThrowNullRefExceptionWhenUnknownProjectPassedToCreateTestRunnerMethod() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.unknown"; + + Assert.IsNull(testFrameworks.CreateTestRunner(project)); + } + + [Test] + public void CreateTestDebuggerReturnsNewTestRunnerFromCorrectTestFramework() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.csproj"; + + ITestRunner testDebugger = testFrameworks.CreateTestDebugger(project); + ITestRunner[] expectedTestRunners = new ITestRunner[] { testDebugger }; + Assert.AreEqual(expectedTestRunners, nunitTestFramework.TestDebuggersCreated.ToArray()); + } + + [Test] + public void CreateTestDebuggerDoesNotThrowNullRefExceptionWhenUnknownProjectPassedToCreateTestRunnerMethod() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.unknown"; + + Assert.IsNull(testFrameworks.CreateTestDebugger(project)); + } + + [Test] + public void IsBuildNeededBeforeTestRunReturnsTrueWhenTestFrameworkIsBuildNeededBeforeTestRunSetToTrue() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.csproj"; + nunitTestFramework.IsBuildNeededBeforeTestRun = true; + + Assert.IsTrue(testFrameworks.IsBuildNeededBeforeTestRunForProject(project)); + } + + [Test] + public void IsBuildNeededBeforeTestRunReturnsFalseWhenTestFrameworkIsBuildNeededBeforeTestRunSetToFalse() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\test.csproj"; + nunitTestFramework.IsBuildNeededBeforeTestRun = false; + + Assert.IsFalse(testFrameworks.IsBuildNeededBeforeTestRunForProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorIgnoresProjectFileExtensionWhitespaceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorIgnoresProjectFileExtensionWhitespaceTestFixture.cs new file mode 100644 index 0000000000..85d90a1cb0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorIgnoresProjectFileExtensionWhitespaceTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestFrameworkDescriptorIgnoresProjectFileExtensionWhitespaceTestFixture + { + TestFrameworkDescriptor descriptor; + + [SetUp] + public void Init() + { + MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); + Properties properties = new Properties(); + properties["id"] = "nunit"; + properties["supportedProjects"] = " .csproj; .vbproj "; + + descriptor = new TestFrameworkDescriptor(properties, factory); + } + + [Test] + public void IsSupportedProjectReturnsTrueForCSharpProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.csproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + + [Test] + public void IsSupportedProjectReturnsTrueForVBNetProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.vbproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpAndVBNetProjectsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpAndVBNetProjectsTestFixture.cs new file mode 100644 index 0000000000..083075067e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpAndVBNetProjectsTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestFrameworkDescriptorSupportsCSharpAndVBNetProjectsTestFixture + { + TestFrameworkDescriptor descriptor; + + [SetUp] + public void Init() + { + MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); + Properties properties = new Properties(); + properties["id"] = "nunit"; + properties["supportedProjects"] = ".csproj;.vbproj"; + + descriptor = new TestFrameworkDescriptor(properties, factory); + } + + [Test] + public void IsSupportedProjectReturnsTrueForCSharpProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.csproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + + [Test] + public void IsSupportedProjectReturnsTrueForVBNetProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.vbproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpProjectsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpProjectsTestFixture.cs new file mode 100644 index 0000000000..2a6ee024bb --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsCSharpProjectsTestFixture.cs @@ -0,0 +1,65 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestFrameworkDescriptorSupportsCSharpProjectsTestFixture + { + TestFrameworkDescriptor descriptor; + + [SetUp] + public void Init() + { + MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); + Properties properties = new Properties(); + properties["id"] = "nunit"; + properties["supportedProjects"] = ".csproj"; + + descriptor = new TestFrameworkDescriptor(properties, factory); + } + + [Test] + public void IsSupportedProjectReturnsTrueForCSharpProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.csproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + + [Test] + public void IsSupportedProjectReturnsFalseForVBNetProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.vbproj"; + + Assert.IsFalse(descriptor.IsSupportedProject(project)); + } + + [Test] + public void IsSupportedProjectReturnsFalseForNullProject() + { + Assert.IsFalse(descriptor.IsSupportedProject(null)); + } + + [Test] + public void IsSupportedProjectReturnsTrueForCSharpProjectFileExtensionInUpperCase() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.CSPROJ"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsUpperCaseProjectFileExtensionsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsUpperCaseProjectFileExtensionsTestFixture.cs new file mode 100644 index 0000000000..c00920cf8f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDescriptorSupportsUpperCaseProjectFileExtensionsTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestFrameworkDescriptorSupportsUpperCaseProjectFileExtensionsTestFixture + { + TestFrameworkDescriptor descriptor; + + [SetUp] + public void Init() + { + MockTestFrameworkFactory factory = new MockTestFrameworkFactory(); + Properties properties = new Properties(); + properties["id"] = "nunit"; + properties["supportedProjects"] = ".CSPROJ;.VBPROJ"; + + descriptor = new TestFrameworkDescriptor(properties, factory); + } + + [Test] + public void IsSupportedProjectReturnsTrueForCSharpProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.csproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + + [Test] + public void IsSupportedProjectReturnsTrueForVBNetProject() + { + MockCSharpProject project = new MockCSharpProject(); + project.FileName = @"d:\projects\myproj.vbproj"; + + Assert.IsTrue(descriptor.IsSupportedProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDoozerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDoozerTestFixture.cs new file mode 100644 index 0000000000..1c72774635 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestFrameworkDoozerTestFixture.cs @@ -0,0 +1,77 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestFrameworkDoozerTestFixture + { + TestFrameworkDescriptor descriptor; + TestFrameworkDoozer doozer; + MockTestFramework mockTestFramework; + MockTestFrameworkFactory mockTestFrameworkFactory; + + [SetUp] + public void Init() + { + Properties properties = new Properties(); + properties["id"] = "Default"; + properties["class"] = "UnitTesting.Tests.Utils.MockTestFramework"; + Codon codon = new Codon(null, "TestFramework", properties, null); + + mockTestFrameworkFactory = new MockTestFrameworkFactory(); + mockTestFramework = new MockTestFramework(); + mockTestFrameworkFactory.Add("UnitTesting.Tests.Utils.MockTestFramework", mockTestFramework); + + doozer = new TestFrameworkDoozer(); + descriptor = doozer.BuildItem(codon, mockTestFrameworkFactory); + } + + [Test] + public void TestFrameworkDescriptorIdIsDefault() + { + Assert.AreEqual("Default", descriptor.Id); + } + + [Test] + public void TestFrameworkDoozerImplementsIDoozer() + { + Assert.IsNotNull(doozer as IDoozer); + } + + [Test] + public void TestFrameworkDoozerDoesNotHandleConditions() + { + Assert.IsFalse(doozer.HandleConditions); + } + + [Test] + public void TestFrameworkDescriptorTestFrameworkPropertyReturnsMockTestFrameworkObject() + { + Assert.IsTrue(descriptor.TestFramework is MockTestFramework); + } + + [Test] + public void TestFrameworkDescriptorTestFrameworkPropertyOnlyCreatesOneObject() + { + ITestFramework testFramework = descriptor.TestFramework; + testFramework = descriptor.TestFramework; + + List expectedClassNames = new List(); + expectedClassNames.Add("UnitTesting.Tests.Utils.MockTestFramework"); + + Assert.AreEqual(expectedClassNames, mockTestFrameworkFactory.ClassNamesPassedToCreateMethod); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/TestResultsReaderTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestResultsReaderTests.cs similarity index 99% rename from src/AddIns/Analysis/UnitTesting/Test/TestResultsReaderTests.cs rename to src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestResultsReaderTests.cs index 6e2c9ca803..8646a74cc6 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/TestResultsReaderTests.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestResultsReaderTests.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; using ICSharpCode.UnitTesting; using NUnit.Framework; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Frameworks { [TestFixture] public class TestResultsReaderTests diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidForClassNodeTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidForClassNodeTestFixture.cs new file mode 100644 index 0000000000..7b3d5e8153 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidForClassNodeTestFixture.cs @@ -0,0 +1,84 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui.ClassBrowser; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestableConditionIsValidForClassNodeTestFixture + { + TestableCondition testableCondition; + MockClass classWithTestAttribute; + ClassNode classNodeForClassWithTestAttribute; + MockRegisteredTestFrameworks testFrameworks; + + [TestFixtureSetUp] + public void SetUpFixture() + { + ResourceManager.Initialize(); + } + + [SetUp] + public void Init() + { + MockAttribute testAttribute = new MockAttribute("Test"); + classWithTestAttribute = MockClass.CreateMockClassWithAttribute(testAttribute); + IProject project = classWithTestAttribute.MockProjectContent.ProjectAsIProject; + classNodeForClassWithTestAttribute = new ClassNode(project, classWithTestAttribute); + + testFrameworks = new MockRegisteredTestFrameworks(); + testFrameworks.AddTestClass(classWithTestAttribute); + + testableCondition = new TestableCondition(testFrameworks); + } + + [Test] + public void IsValidReturnsTrueForClassWithTestAttribute() + { + Assert.IsTrue(testableCondition.IsValid(classNodeForClassWithTestAttribute, null)); + } + + [Test] + public void IsValidReturnsFalseForClassWithoutAnyAttributes() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + IProject project = c.MockProjectContent.ProjectAsIProject; + ClassNode classNode = new ClassNode(project, c); + Assert.IsFalse(testableCondition.IsValid(classNode, null)); + } + + [Test] + public void TestClassPassedToRegisteredTestFrameworksIsTestClass() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + IProject project = c.MockProjectContent.ProjectAsIProject; + ClassNode classNode = new ClassNode(project, c); + testableCondition.IsValid(classNode, null); + Assert.AreEqual(c, testFrameworks.IsTestClassParameterUsed); + } + + /// + /// When class.ProjectContent.Project == null the + /// TestableCondition.IsValid should return false. + /// + [Test] + public void IsValidReturnFalseWhenProjectIsNull() + { + classWithTestAttribute.MockProjectContent.Project = null; + Assert.IsFalse(testableCondition.IsValid(classNodeForClassWithTestAttribute, null)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidMethodTestFixture.cs new file mode 100644 index 0000000000..70778845bc --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/TestableConditionIsValidMethodTestFixture.cs @@ -0,0 +1,67 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Frameworks +{ + [TestFixture] + public class TestableConditionIsValidForMemberNodeTestFixture + { + TestableCondition testableCondition; + MockMethod methodWithTestAttribute; + MockMemberNode memberNodeForMethodWithTestAttribute; + MockRegisteredTestFrameworks testFrameworks; + + [TestFixtureSetUp] + public void SetUpFixture() + { + ResourceManager.Initialize(); + } + + [SetUp] + public void Init() + { + MockAttribute testAttribute = new MockAttribute("Test"); + methodWithTestAttribute = MockMethod.CreateMockMethodWithAttribute(testAttribute); + memberNodeForMethodWithTestAttribute = new MockMemberNode(methodWithTestAttribute); + + testFrameworks = new MockRegisteredTestFrameworks(); + testFrameworks.AddTestMethod(methodWithTestAttribute); + + testableCondition = new TestableCondition(testFrameworks); + } + + [Test] + public void IsValidReturnsTrueForMethodWithTestAttribute() + { + Assert.IsTrue(testableCondition.IsValid(memberNodeForMethodWithTestAttribute, null)); + } + + [Test] + public void IsValidReturnsFalseForMethodWithoutAnyAttributes() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + MockMemberNode memberNode = new MockMemberNode(method); + Assert.IsFalse(testableCondition.IsValid(memberNode, null)); + } + + [Test] + public void TestMethodPassedToRegisteredTestFrameworksIsTestMethod() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + MockMemberNode memberNode = new MockMemberNode(method); + testableCondition.IsValid(memberNode, null); + Assert.AreEqual(method, testFrameworks.IsTestMethodMemberParameterUsed); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsPanelTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsPanelTestFixture.cs similarity index 98% rename from src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsPanelTestFixture.cs rename to src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsPanelTestFixture.cs index 3340c1a115..fd09a02532 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsPanelTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsPanelTestFixture.cs @@ -14,7 +14,7 @@ using ICSharpCode.UnitTesting; using NUnit.Framework; using UnitTesting.Tests.Utils; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Frameworks { /// /// Tests the UnitTestingOptionsPanel. @@ -58,7 +58,7 @@ namespace UnitTesting.Tests { panel.Dispose(); } - + [Test] public void SetupFromManifestStreamResourceName() { diff --git a/src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsTestFixture.cs similarity index 98% rename from src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsTestFixture.cs rename to src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsTestFixture.cs index 1461e0f8d5..e984d928c5 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/UnitTestingOptionsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Frameworks/UnitTestingOptionsTestFixture.cs @@ -10,7 +10,7 @@ using ICSharpCode.Core; using ICSharpCode.UnitTesting; using NUnit.Framework; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Frameworks { /// /// Tests the UnitTestingOptions class. @@ -101,8 +101,8 @@ namespace UnitTesting.Tests public void DefaultNoDots() { Assert.IsFalse(defaultOptions.NoDots); - } - + } + [Test] public void SetNoDots() { @@ -124,7 +124,7 @@ namespace UnitTesting.Tests public void DefaultLabels() { Assert.IsFalse(defaultOptions.Labels); - } + } [Test] public void SetLabels() diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/AbstractBaseClassWithTestMethodsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/AbstractBaseClassWithTestMethodsTestFixture.cs index 3ad8a4cd0d..b66019cecc 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/AbstractBaseClassWithTestMethodsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/AbstractBaseClassWithTestMethodsTestFixture.cs @@ -44,34 +44,31 @@ namespace UnitTesting.Tests.Project [SetUp] public void SetUp() - { + { MockProjectContent projectContent = new MockProjectContent(); - projectContent.Language = LanguageProperties.None; // Create the base test class. - MockClass baseClass = new MockClass("ICSharpCode.SharpDevelop.Tests.ReflectionOrCecilLayerTests"); - baseClass.ProjectContent = projectContent; - MockMethod baseMethod = new MockMethod("InheritanceTests"); + MockClass baseClass = new MockClass(projectContent, "ICSharpCode.SharpDevelop.Tests.ReflectionOrCecilLayerTests"); + MockMethod baseMethod = new MockMethod(baseClass, "InheritanceTests"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseClass; baseClass.Methods.Add(baseMethod); - + // Add a second method that does not have a Test attribute. - baseMethod = new MockMethod("NonTestMethod"); - baseMethod.DeclaringType = baseClass; + baseMethod = new MockMethod(baseClass, "NonTestMethod"); baseClass.Methods.Add(baseMethod); // Create the derived test class. - c = new MockClass("ICSharpCode.SharpDevelop.Tests.CecilLayerTests"); + c = new MockClass(projectContent, "ICSharpCode.SharpDevelop.Tests.CecilLayerTests"); + c.SetDotNetName(c.FullyQualifiedName); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Set derived class's base class. - c.BaseClass = baseClass; + c.AddBaseClass(baseClass); // Create TestClass. - testClass = new TestClass(c); + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testClass = new TestClass(c, testFrameworks); } [Test] @@ -106,7 +103,7 @@ namespace UnitTesting.Tests.Project testClasses.Add(testClass); TestResult testResult = new TestResult("ICSharpCode.SharpDevelop.Tests.CecilLayerTests.InheritanceTests"); - testResult.IsFailure = true; + testResult.ResultType = TestResultType.Failure; testClasses.UpdateTestResult(testResult); Assert.AreEqual(TestResultType.Failure, testClass.Result); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs index 5afa3d3be6..7d7008321f 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/BaseTestMethodTestFixture.cs @@ -31,7 +31,7 @@ namespace UnitTesting.Tests.Project public void SetUpFixture() { mockClass = new MockClass("Tests.MyTestFixture"); - mockMethod = new MockMethod("MyMethod"); + mockMethod = new MockMethod(mockClass, "MyMethod"); mockMethodRegion = new DomRegion(0, 0, 0, 10); mockMethod.Region = mockMethodRegion; diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/ClassRootNamespaceTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/ClassRootNamespaceTests.cs index ad605c8a9e..a3763c0b4f 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/ClassRootNamespaceTests.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/ClassRootNamespaceTests.cs @@ -18,12 +18,19 @@ namespace UnitTesting.Tests.Project [TestFixture] public class ClassRootNamespaceTests { + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + + [SetUp] + public void Init() + { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + } + [Test] public void OneParentNamespace() { MockClass mockClass = new MockClass("TestRootNamespace.MyFixture"); - mockClass.Namespace = "TestRootNamespace"; - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); Assert.AreEqual("TestRootNamespace", testClass.RootNamespace); } @@ -31,8 +38,7 @@ namespace UnitTesting.Tests.Project public void TwoParentNamespaces() { MockClass mockClass = new MockClass("TestRootNamespace.Tests.MyFixture"); - mockClass.Namespace = "TestRootNamespace.Tests"; - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); Assert.AreEqual("TestRootNamespace", testClass.RootNamespace); } @@ -40,8 +46,7 @@ namespace UnitTesting.Tests.Project public void NoNamespace() { MockClass mockClass = new MockClass("MyFixture"); - mockClass.Namespace = String.Empty; - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); Assert.AreEqual(String.Empty, testClass.RootNamespace); } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/ClassWithTwoChildNamespacesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/ClassWithTwoChildNamespacesTestFixture.cs index 3a0e86cf95..9172bf80f0 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/ClassWithTwoChildNamespacesTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/ClassWithTwoChildNamespacesTestFixture.cs @@ -16,14 +16,16 @@ namespace UnitTesting.Tests.Project public class ClassWithTwoChildNamespacesTestsFixture { TestClass c; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); MockClass mockClass = new MockClass("UnitTesting.Tests.MyTestFixture"); - c = new TestClass(mockClass); + c = new TestClass(mockClass, testFrameworks); } - + [Test] public void FullNamespace() { diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameChangedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameChangedTestFixture.cs index c6b933d2e1..f8e383c50d 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameChangedTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameChangedTestFixture.cs @@ -28,6 +28,7 @@ namespace UnitTesting.Tests.Project TestProject testProject; IProject project; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -41,42 +42,35 @@ namespace UnitTesting.Tests.Project // Add a test class. projectContent = new MockProjectContent(); - projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; - c.SetCompoundClass(c); - MockMethod test1Method = new MockMethod("Test1"); - test1Method .DeclaringType = c; - test1Method .Attributes.Add(new MockAttribute("Test")); + MockMethod test1Method = new MockMethod(c, "Test1"); + test1Method.Attributes.Add(new MockAttribute("Test")); c.Methods.Add(test1Method); // Test 2 method is from a duplicate test class. - MockMethod test2Method = new MockMethod("Test2"); - test2Method.DeclaringType = c; + MockMethod test2Method = new MockMethod(c, "Test2"); test2Method.Attributes.Add(new MockAttribute("Test")); c.Methods.Add(test2Method); projectContent.Classes.Add(c); - - testProject = new TestProject(project, projectContent); + + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); // Make sure test methods are created, otherwise // the Test2 method will never be looked at due to lazy evaluation - // of test method.s + // of test method. int count = testProject.TestClasses[0].TestMethods.Count; // Change the name of the second test class. DefaultCompilationUnit oldUnit = new DefaultCompilationUnit(projectContent); oldUnit.Classes.Add(c); c.Methods.Remove(test2Method); // Remove duplicate test class method. - // Create new compilation unit with inner class that has its method renamed. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - MockClass newTestClass = new MockClass("RootNamespace.MyNewTestFixture"); - newTestClass.ProjectContent = projectContent; + MockClass newTestClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newTestClass.Attributes.Add(new MockAttribute("TestFixture")); - newTestClass.SetCompoundClass(newTestClass); projectContent.Classes.Add(newTestClass); newTestClass.Methods.Add(test2Method); newUnit.Classes.Add(newTestClass); @@ -104,7 +98,7 @@ namespace UnitTesting.Tests.Project /// /// This test ensures that the existing class in the project content is used to update - /// the test methods. So the any methods from the duplicate test class are removed. + /// the test methods. So any methods from the duplicate test class are removed. /// [Test] public void OldTestClassHasOneMethod() diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameTestFixture.cs index 7591d985fb..7f6a2face5 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateClassNameTestFixture.cs @@ -26,6 +26,7 @@ namespace UnitTesting.Tests.Project TestProject testProject; IProject project; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -40,18 +41,17 @@ namespace UnitTesting.Tests.Project // Add a test class. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add a second class with the same name. - MockClass secondTestClass = new MockClass("RootNamespace.MyTestFixture"); - secondTestClass.ProjectContent = projectContent; + MockClass secondTestClass = new MockClass(projectContent, "RootNamespace.MyTestFixture"); secondTestClass.Attributes.Add(new MockAttribute("TestFixture")); projectContent.Classes.Add(secondTestClass); - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); } /// diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs index 85cc157a43..8e3a14cf86 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateMethodNameTestFixture.cs @@ -23,38 +23,38 @@ namespace UnitTesting.Tests.Project public class DuplicateMethodNameTestFixture { TestClass testClass; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() - { + { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + // Add a test class. MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add first method. - MockMethod method = new MockMethod("MyTest"); + MockMethod method = new MockMethod(c, "MyTest"); method.Attributes.Add(new MockAttribute("Test")); - method.DeclaringType = c; c.Methods.Add(method); // Add duplicate method. c.Methods.Add(method); // Add a base class that has duplicate methods. - MockClass baseClass = new MockClass("RootNamespace.MyTestFixtureBase"); + MockClass baseClass = new MockClass(projectContent, "RootNamespace.MyTestFixtureBase"); baseClass.Attributes.Add(new MockAttribute("TestFixture")); - baseClass.ProjectContent = projectContent; projectContent.Classes.Add(baseClass); - c.BaseClass = baseClass; + c.AddBaseClass(baseClass); baseClass.Methods.Add(method); baseClass.Methods.Add(method); // Create test class. - testClass = new TestClass(c); + testClass = new TestClass(c, testFrameworks); } /// diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateProjectRootNamespaceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateProjectRootNamespaceTestFixture.cs index 15c2a1b57e..3857a467bd 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateProjectRootNamespaceTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/DuplicateProjectRootNamespaceTestFixture.cs @@ -22,7 +22,8 @@ namespace UnitTesting.Tests.Project public class DuplicateProjectRootNamespaceTestFixture { TestProject testProject; - + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + [SetUp] public void Init() { @@ -36,20 +37,16 @@ namespace UnitTesting.Tests.Project // Add a test class with a TestFixture attributes. MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); - c.Namespace = "RootNamespace"; + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add a second class the same root namespace. - c = new MockClass("RootNamespace.MyTestFixture2"); - c.Namespace = "RootNamespace"; + c = new MockClass(projectContent, "RootNamespace.MyTestFixture2"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); - - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); } [Test] diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyProjectTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyProjectTestFixture.cs index 8874bebb3e..a9bb7eb2a5 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyProjectTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyProjectTestFixture.cs @@ -22,7 +22,8 @@ namespace UnitTesting.Tests.Project { TestProject testProject; MockProjectContent projectContent; - + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + [SetUp] public void Init() { @@ -36,7 +37,8 @@ namespace UnitTesting.Tests.Project projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); } /// @@ -45,13 +47,11 @@ namespace UnitTesting.Tests.Project /// [Test] public void NewClassInParserInfo() - { + { // Create new compilation unit with extra class. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - MockClass newClass = new MockClass("RootNamespace.MyNewTestFixture"); + MockClass newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newClass.Attributes.Add(new MockAttribute("TestFixture")); - newClass.ProjectContent = projectContent; - newClass.SetCompoundClass(newClass); newUnit.Classes.Add(newClass); // Update TestProject's parse info. @@ -71,20 +71,16 @@ namespace UnitTesting.Tests.Project // Create an old compilation unit with the test class // but without a [TestFixture] attribute. DefaultCompilationUnit oldUnit = new DefaultCompilationUnit(projectContent); - MockClass newClass = new MockClass("RootNamespace.MyNewTestFixture"); - newClass.ProjectContent = projectContent; - newClass.SetCompoundClass(newClass); + MockClass newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); oldUnit.Classes.Add(newClass); - + // Create a new compilation unit with the test class // having a [TestFixture] attribute. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - newClass = new MockClass("RootNamespace.MyNewTestFixture"); + newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newClass.Attributes.Add(new MockAttribute("TestFixture")); - newClass.ProjectContent = projectContent; - newClass.SetCompoundClass(newClass); newUnit.Classes.Add(newClass); - + // Update TestProject's parse info. testProject.UpdateParseInfo(oldUnit, newUnit); @@ -106,20 +102,16 @@ namespace UnitTesting.Tests.Project // Create an old compilation unit with the test class // having a [TestFixture] attribute. DefaultCompilationUnit oldUnit = new DefaultCompilationUnit(projectContent); - MockClass newClass = new MockClass("RootNamespace.MyNewTestFixture"); + MockClass newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newClass.Attributes.Add(new MockAttribute("TestFixture")); - newClass.ProjectContent = projectContent; - newClass.SetCompoundClass(newClass); oldUnit.Classes.Add(newClass); - + // Create a new compilation unit with the test class // but without a [TestFixture] attribute. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - newClass = new MockClass("RootNamespace.MyNewTestFixture"); - newClass.ProjectContent = projectContent; - newClass.SetCompoundClass(newClass); + newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newUnit.Classes.Add(newClass); - + // Update TestProject's parse info. testProject.UpdateParseInfo(oldUnit, newUnit); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyRootNamespaceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyRootNamespaceTestFixture.cs index cbf59f9613..b4896d6d2f 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyRootNamespaceTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/EmptyRootNamespaceTestFixture.cs @@ -22,7 +22,8 @@ namespace UnitTesting.Tests.Project public class EmptyRootNamespaceTestFixture { TestProject testProject; - + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + [SetUp] public void Init() { @@ -36,20 +37,17 @@ namespace UnitTesting.Tests.Project // Add a test class with a TestFixture attributes. MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); - c.Namespace = "RootNamespace"; + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add a second class no root namespace. - c = new MockClass("MyTestFixture2"); - c.Namespace = String.Empty; + c = new MockClass(projectContent, "MyTestFixture2"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); - - testProject = new TestProject(project, projectContent); + + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); } [Test] diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs index 92a772e053..efc8408d45 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassMethodRenamedTestFixture.cs @@ -31,23 +31,18 @@ namespace UnitTesting.Tests.Project // Create new compilation unit with inner class that has its method renamed. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - MockClass newOuterClass = new MockClass("MyTests.A"); - newOuterClass.ProjectContent = projectContent; + MockClass newOuterClass = new MockClass(projectContent, "MyTests.A"); projectContent.Classes.Add(newOuterClass); - newOuterClass.SetCompoundClass(newOuterClass); newUnit.Classes.Add(newOuterClass); // Create the inner test class. - MockClass newInnerClass = new MockClass("MyTests.A.InnerATest", "MyTests.A+InnerATest"); + MockClass newInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest", outerClass); + newInnerClass.SetDotNetName("MyTests.A+InnerATest"); newInnerClass.Attributes.Add(new MockAttribute("TestFixture")); - newInnerClass.ProjectContent = projectContent; - newInnerClass.DeclaringType = outerClass; // Declaring type is outer class. - newInnerClass.SetCompoundClass(newInnerClass); newOuterClass.InnerClasses.Add(newInnerClass); - MockMethod method = new MockMethod("FooBarRenamed"); + MockMethod method = new MockMethod(newInnerClass, "FooBarRenamed"); method.Attributes.Add(new MockAttribute("Test")); - method.DeclaringType = newInnerClass; newInnerClass.Methods.Add(method); outerClass.InnerClasses.Add(newInnerClass); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassNameChangesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassNameChangesTestFixture.cs index fe25ec2d67..3152aa26a0 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassNameChangesTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassNameChangesTestFixture.cs @@ -30,18 +30,14 @@ namespace UnitTesting.Tests.Project // Create new compilation unit with extra class. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - MockClass newOuterClass = new MockClass("MyTests.A"); - newOuterClass.ProjectContent = projectContent; + MockClass newOuterClass = new MockClass(projectContent, "MyTests.A"); projectContent.Classes.Add(newOuterClass); - newOuterClass.SetCompoundClass(newOuterClass); newUnit.Classes.Add(newOuterClass); // Create the inner test class. // Note the use of the DotNetName "MyTests.A+InnerTest". - MockClass newInnerClass = new MockClass("MyTests.A.InnerATestMod", "MyTests.A+InnerATestMod"); + MockClass newInnerClass = new MockClass(projectContent, "MyTests.A.InnerATestMod", "MyTests.A+InnerATestMod", outerClass); newInnerClass.Attributes.Add(new MockAttribute("TestFixture")); - newInnerClass.ProjectContent = projectContent; - newInnerClass.DeclaringType = outerClass; // Declaring type is outer class. newOuterClass.InnerClasses.Add(newInnerClass); // Update TestProject's parse info. diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureAttributeRemovedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureAttributeRemovedTestFixture.cs index fbb6d94d95..49114fef8f 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureAttributeRemovedTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureAttributeRemovedTestFixture.cs @@ -29,17 +29,12 @@ namespace UnitTesting.Tests.Project // Create new compilation unit with inner class that no longer has the TestFixture attribute. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); - MockClass newOuterClass = new MockClass("MyTests.A"); - newOuterClass.ProjectContent = projectContent; + MockClass newOuterClass = new MockClass(projectContent, "MyTests.A"); projectContent.Classes.Add(newOuterClass); - newOuterClass.SetCompoundClass(newOuterClass); newUnit.Classes.Add(newOuterClass); // Create the inner test class. - MockClass newInnerClass = new MockClass("MyTests.A.InnerATest", "MyTests.A+InnerATest"); - newInnerClass.ProjectContent = projectContent; - newInnerClass.DeclaringType = outerClass; // Declaring type is outer class. - newInnerClass.SetCompoundClass(newInnerClass); + MockClass newInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest", "MyTests.A+InnerATest", outerClass); newOuterClass.InnerClasses.Add(newInnerClass); // Update TestProject's parse info. diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs index ea82c73f54..e4dd7db76e 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/InnerClassTestFixtureBase.cs @@ -23,6 +23,7 @@ namespace UnitTesting.Tests.Project protected TestProject testProject; protected MockProjectContent projectContent; protected MockClass outerClass; + protected MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; protected void InitBase() { @@ -30,38 +31,31 @@ namespace UnitTesting.Tests.Project projectContent.Language = LanguageProperties.None; // Create the base test class. - outerClass = new MockClass("MyTests.A"); - outerClass.ProjectContent = projectContent; + outerClass = new MockClass(projectContent, "MyTests.A"); projectContent.Classes.Add(outerClass); // Create the inner test class. // Note the use of the DotNetName "MyTests.A+InnerTest". - innerClass = new MockClass("MyTests.A.InnerATest", "MyTests.A+InnerATest"); + innerClass = new MockClass(projectContent, "MyTests.A.InnerATest", "MyTests.A+InnerATest", outerClass); innerClass.Attributes.Add(new MockAttribute("TestFixture")); - innerClass.ProjectContent = projectContent; - innerClass.DeclaringType = outerClass; // Declaring type is outer class. - MockMethod method = new MockMethod("FooBar"); + MockMethod method = new MockMethod(innerClass, "FooBar"); method.Attributes.Add(new MockAttribute("Test")); - method.DeclaringType = innerClass; innerClass.Methods.Add(method); outerClass.InnerClasses.Add(innerClass); // Add another inner class that is not a test class. - MockClass nonTestInnerClass = new MockClass("MyTests.A.InnerBClass"); - nonTestInnerClass.ProjectContent = projectContent; - nonTestInnerClass.DeclaringType = outerClass; // Declaring type is outer class. + MockClass nonTestInnerClass = new MockClass(projectContent, "MyTests.A.InnerBClass", outerClass); outerClass.InnerClasses.Add(nonTestInnerClass); // Add another inner class with the same name as the InnerATest. // This makes sure duplicate classes are not added. - MockClass duplicateInnerClass = new MockClass("MyTests.A.InnerATest", "MyTests.A+InnerATest"); + MockClass duplicateInnerClass = new MockClass(projectContent, "MyTests.A.InnerATest", "MyTests.A+InnerATest", outerClass); duplicateInnerClass.Attributes.Add(new MockAttribute("TestFixture")); - duplicateInnerClass.ProjectContent = projectContent; - duplicateInnerClass.DeclaringType = outerClass; // Declaring type is outer class. outerClass.InnerClasses.Add(duplicateInnerClass); - testProject = new TestProject(null, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(null, projectContent, testFrameworks); if (testProject.TestClasses.Count > 0) { testClass = testProject.TestClasses[0]; } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestClassTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestClassTests.cs deleted file mode 100644 index abd5b92d50..0000000000 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestClassTests.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using UnitTesting.Tests.Utils; - -namespace UnitTesting.Tests.Project -{ - /// - /// Tests the TestClass.IsTestClass method. - /// - [TestFixture] - public class IsTestClassTests - { - [Test] - public void HasNoAttributes() - { - MockClass mockClass = CreateMockClass(); - Assert.IsFalse(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void HasTestFixtureAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("TestFixture")); - MockClass mockClass = CreateMockClass(attributes); - Assert.IsTrue(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void HasTestFixtureAttributeAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("TestFixtureAttribute")); - MockClass mockClass = CreateMockClass(attributes); - Assert.IsTrue(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void HasNUnitTestFixtureAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("NUnit.Framework.TestFixtureAttribute")); - MockClass mockClass = CreateMockClass(attributes); - Assert.IsTrue(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void NullClass() - { - Assert.IsFalse(TestClass.IsTestClass(null)); - } - - [Test] - public void NullLanguage() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; - - Assert.IsFalse(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void NullNameComparer() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = new LanguageProperties(null); - mockClass.ProjectContent = mockProjectContent; - mockClass.Attributes.Add(new MockAttribute("Test")); - - Assert.IsFalse(TestClass.IsTestClass(mockClass)); - } - - [Test] - public void GetNameComparerWithNullClass() - { - Assert.IsNull(TestClass.GetNameComparer(null)); - } - - static MockClass CreateMockClass() - { - return CreateMockClass(new MockAttribute[0]); - } - - static MockClass CreateMockClass(IList attributes) - { - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Language = LanguageProperties.None; - mockProjectContent.Project = new MockCSharpProject(); - mockClass.ProjectContent = mockProjectContent; - - foreach (MockAttribute attribute in attributes) { - mockClass.Attributes.Add(attribute); - } - - return mockClass; - } - } -} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestMethodTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestMethodTests.cs deleted file mode 100644 index 34c7194748..0000000000 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestMethodTests.cs +++ /dev/null @@ -1,153 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using UnitTesting.Tests.Utils; - -namespace UnitTesting.Tests.Project -{ - /// - /// Tests the TestMethod.IsTestMethod method. - /// - [TestFixture] - public class IsTestMethodTests - { - [Test] - public void HasNoAttributes() - { - MockMethod mockMethod = CreateMockMethod(); - Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void HasTestAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("Test")); - MockMethod mockMethod = CreateMockMethod(attributes); - Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void HasTestAttributeAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("TestAttribute")); - MockMethod mockMethod = CreateMockMethod(attributes); - Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void HasNUnitTestAttribute() - { - List attributes = new List(); - attributes.Add(new MockAttribute("NUnit.Framework.TestAttribute")); - MockMethod mockMethod = CreateMockMethod(attributes); - Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void NullMethod() - { - Assert.IsFalse(TestMethod.IsTestMethod(null)); - } - - [Test] - public void NullNameComparer() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = new LanguageProperties(null); - mockClass.ProjectContent = mockProjectContent; - MockMethod mockMethod = new MockMethod(); - mockMethod.DeclaringType = mockClass; - mockMethod.Attributes.Add(new MockAttribute("Test")); - - Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); - } - - /// - /// Even if the project is null the method should be - /// flagged as a TestMethod. - /// - [Test] - public void NullProject() - { - List attributes = new List(); - attributes.Add(new MockAttribute("Test")); - MockMethod mockMethod = CreateMockMethod(attributes); - MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; - mockProjectContent.Project = null; - - Assert.IsTrue(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void NullDeclaringType() - { - MockMethod mockMethod = new MockMethod(); - - Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void NullLanguage() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; - MockMethod mockMethod = new MockMethod(); - mockMethod.DeclaringType = mockClass; - - Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); - } - - [Test] - public void MethodHasParameters() - { - List attributes = new List(); - attributes.Add(new MockAttribute("Test")); - MockMethod mockMethod = CreateMockMethod(attributes); - MockParameter mockParameter = new MockParameter(); - mockMethod.Parameters.Add(mockParameter); - - Assert.IsFalse(TestMethod.IsTestMethod(mockMethod)); - } - - static MockMethod CreateMockMethod() - { - return CreateMockMethod(new MockAttribute[0]); - } - - static MockMethod CreateMockMethod(IList attributes) - { - MockMethod mockMethod = new MockMethod(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Language = LanguageProperties.None; - IProject project = new MockCSharpProject(); - mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; - mockMethod.DeclaringType = mockClass; - - foreach (MockAttribute attribute in attributes) { - mockMethod.Attributes.Add(attribute); - } - - return mockMethod; - } - } -} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestProjectTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestProjectTests.cs deleted file mode 100644 index ab55d08d66..0000000000 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/IsTestProjectTests.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using System; -using UnitTesting.Tests.Utils; - -namespace UnitTesting.Tests.Project -{ - /// - /// A project is considered to be a test project if it contains - /// a reference to the NUnit.Framework assembly. - /// - [TestFixture] - public class IsTestProjectTests - { - [Test] - public void ProjectWithNoReferences() - { - IProject project = new MockCSharpProject(); - Assert.IsFalse(TestProject.IsTestProject(project)); - } - - [Test] - public void ProjectWithNUnitFrameworkReference() - { - IProject project = new MockCSharpProject(); - ReferenceProjectItem referenceProjectItem = new ReferenceProjectItem(project); - referenceProjectItem.Include = "NUnit.Framework"; - ProjectService.AddProjectItem(project, referenceProjectItem); - - Assert.IsTrue(TestProject.IsTestProject(project)); - } - - [Test] - public void ProjectWithNUnitFrameworkReferenceCaseInsensitive() - { - IProject project = new MockCSharpProject(); - ReferenceProjectItem referenceProjectItem = new ReferenceProjectItem(project); - referenceProjectItem.Include = "nunit.framework"; - ProjectService.AddProjectItem(project, referenceProjectItem); - - Assert.IsTrue(TestProject.IsTestProject(project)); - } - - [Test] - public void ProjectWithNUnitFrameworkReferenceSpecificVersion() - { - IProject project = new MockCSharpProject(); - ReferenceProjectItem referenceProjectItem = new ReferenceProjectItem(project); - referenceProjectItem.Include = "NUnit.Framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"; - ProjectService.AddProjectItem(project, referenceProjectItem); - - Assert.IsTrue(TestProject.IsTestProject(project)); - } - - [Test] - public void NullReferenceName() - { - Assert.IsFalse(TestProject.IsTestFrameworkReference(null)); - } - - [Test] - public void NullProject() - { - Assert.IsFalse(TestProject.IsTestProject(null)); - } - } -} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/OverriddenBaseTestMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/OverriddenBaseTestMethodTestFixture.cs index 236b7a1266..b62c6903c3 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/OverriddenBaseTestMethodTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/OverriddenBaseTestMethodTestFixture.cs @@ -18,49 +18,46 @@ namespace UnitTesting.Tests.Project { TestClass testClass; MockClass c; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() - { + { MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; // Create the base test class. - MockClass baseClass = new MockClass("ICSharpCode.Tests.BaseClass"); - baseClass.ProjectContent = projectContent; - + MockClass baseClass = new MockClass(projectContent, "ICSharpCode.Tests.BaseClass"); + // Add a virtual method to base class. - MockMethod baseMethod = new MockMethod("VirtualTestMethod"); + MockMethod baseMethod = new MockMethod(baseClass, "VirtualTestMethod"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseClass; - baseMethod.IsVirtual = true; + baseMethod.Modifiers = ModifierEnum.Virtual; baseClass.Methods.Add(baseMethod); - + // Add a second method that is virtual but will not be overriden. - baseMethod = new MockMethod("VirtualNonOverriddenTestMethod"); + baseMethod = new MockMethod(baseClass, "VirtualNonOverriddenTestMethod"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseClass; - baseMethod.IsVirtual = true; + baseMethod.Modifiers = ModifierEnum.Virtual; baseClass.Methods.Add(baseMethod); // Create the derived test class. - c = new MockClass("ICSharpCode.Tests.DerivedClass"); + c = new MockClass(projectContent, "ICSharpCode.Tests.DerivedClass"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); - + // Create a new test method that overrides one of the base class methods. - MockMethod method = new MockMethod("VirtualTestMethod"); + MockMethod method = new MockMethod(c, "VirtualTestMethod"); method.Attributes.Add(new MockAttribute("Test")); - method.DeclaringType = c; - method.IsOverride = true; + method.Modifiers = ModifierEnum.Override; c.Methods.Add(method); - + // Set derived class's base class. - c.BaseClass = baseClass; + c.AddBaseClass(baseClass); // Create TestClass. - testClass = new TestClass(c); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testClass = new TestClass(c, testFrameworks); } [Test] diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/RemovedClassesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/RemovedClassesTestFixture.cs index c616251244..fc4b3f2bf7 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/RemovedClassesTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/RemovedClassesTestFixture.cs @@ -29,7 +29,7 @@ namespace UnitTesting.Tests.Project myClass = new MockClass("MyTests.MyClass"); innerClass = new MockClass("MyTests.MyClass.InnerClass", "MyTests.MyClass+InnerClass"); myClass.InnerClasses.Add(innerClass); - + anotherClass = new MockClass("MyTests.AnotherClass"); List classes = new List(); @@ -42,7 +42,7 @@ namespace UnitTesting.Tests.Project [Test] public void InnerClassesIncludedInMissingClasses() - { + { List expectedClasses = new List(); expectedClasses.Add(myClass); expectedClasses.Add(innerClass); @@ -50,7 +50,7 @@ namespace UnitTesting.Tests.Project AssertContains(expectedClasses, removedClasses.GetMissingClasses()); } - + /// /// Should remove inner class too. /// @@ -64,7 +64,7 @@ namespace UnitTesting.Tests.Project AssertContains(expectedClasses, removedClasses.GetMissingClasses()); } - + [Test] public void RemoveInnerClass() { @@ -97,7 +97,7 @@ namespace UnitTesting.Tests.Project Assert.IsTrue(actualClasses.Contains(c), "Class missing: " + c.FullyQualifiedName + " Actual:\r\n" + GetClassNames(actualClasses)); } Assert.AreEqual(expectedClasses.Count, actualClasses.Count, "Actual:\r\n" + GetClassNames(actualClasses)); - } + } string GetClassNames(IList classes) { diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs new file mode 100644 index 0000000000..36854fcbe4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassIsTestMethodUsesTestFrameworksTestFixture.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Project +{ + [TestFixture] + public class TestClassIsTestMethodUsesTestFrameworksTestFixture + { + TestClass testClass; + MockClass mockTestClass; + MockMethod testMethod; + MockRegisteredTestFrameworks testFrameworks; + MockClass mockBaseTestClass; + MockMethod baseClassTestMethod; + + [SetUp] + public void Init() + { + mockTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); + mockTestClass.FullyQualifiedName = "DerivedClass"; + + testMethod = new MockMethod(mockTestClass, "myTestMethod"); + mockTestClass.Methods.Add(testMethod); + baseClassTestMethod = new MockMethod(mockTestClass, "myBaseTestMethod"); + + testFrameworks = new MockRegisteredTestFrameworks(); + testFrameworks.AddTestMethod(testMethod); + testFrameworks.AddTestMethod(baseClassTestMethod); + + mockBaseTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); + mockBaseTestClass.FullyQualifiedName = "BaseClass"; + mockBaseTestClass.Methods.Add(baseClassTestMethod); + + mockTestClass.AddBaseClass(mockBaseTestClass); + + testClass = new TestClass(mockTestClass, testFrameworks); + } + + [Test] + public void TestClassHasTestMethod() + { + Assert.AreEqual(testMethod, testClass.TestMethods[0].Method); + } + + [Test] + public void TestClassHasBaseClassTestMethod() + { + BaseTestMethod baseTestMethod = testClass.TestMethods[1].Method as BaseTestMethod; + Assert.AreEqual(baseClassTestMethod, baseTestMethod.Method); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithOneMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithOneMethodTestFixture.cs index b8d8492692..c6075411f3 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithOneMethodTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithOneMethodTestFixture.cs @@ -24,6 +24,7 @@ namespace UnitTesting.Tests.Project TestMethod testMethod; bool resultChangedCalled; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -34,23 +35,21 @@ namespace UnitTesting.Tests.Project ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project); nunitFrameworkReferenceItem.Include = "NUnit.Framework"; ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem); - + projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass mockClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - mockClass.Namespace = "RootNamespace.Tests"; - mockClass.ProjectContent = projectContent; + MockClass mockClass = new MockClass(projectContent, "RootNamespace.Tests.MyTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); projectContent.Classes.Add(mockClass); // Add a method to the test class - MockMethod mockMethod = new MockMethod("TestMethod"); - mockMethod.DeclaringType = mockClass; + MockMethod mockMethod = new MockMethod(mockClass, "TestMethod"); mockMethod.Attributes.Add(new MockAttribute("Test")); mockClass.Methods.Add(mockMethod); - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); testClass = testProject.TestClasses[0]; testMethod = testClass.TestMethods[0]; } @@ -71,7 +70,7 @@ namespace UnitTesting.Tests.Project public void TestFailed() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); @@ -89,7 +88,7 @@ namespace UnitTesting.Tests.Project public void TestClassIgnored() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod"); - result.IsIgnored = true; + result.ResultType = TestResultType.Ignored; testProject.UpdateTestResult(result); @@ -102,7 +101,7 @@ namespace UnitTesting.Tests.Project try { testMethod.ResultChanged += ResultChanged; TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); } finally { testMethod.ResultChanged -= ResultChanged; @@ -117,7 +116,7 @@ namespace UnitTesting.Tests.Project try { testClass.ResultChanged += ResultChanged; TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); } finally { testClass.ResultChanged -= ResultChanged; @@ -130,7 +129,7 @@ namespace UnitTesting.Tests.Project public void UpdateProjectWithTestResultHavingClassNameOnly() { TestResult result = new TestResult("ClassNameOnly"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); } @@ -139,7 +138,7 @@ namespace UnitTesting.Tests.Project public void UpdateProjectWithTestResultWithUnknownClassName() { TestResult result = new TestResult("RootNamespace.Tests.UnknownClassName.TestMethod"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); } @@ -148,7 +147,7 @@ namespace UnitTesting.Tests.Project public void UpdateProjectWithTestResultWithUnknownMethodName() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.UnknownMethodName"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); } @@ -190,10 +189,9 @@ namespace UnitTesting.Tests.Project // Create new compilation unit. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); newUnit.Classes.Add(testClass.Class); - + // Add a new method to a new compound class. - MockClass compoundClass = new MockClass("RootNamespace.MyTestFixture"); - compoundClass.ProjectContent = projectContent; + MockClass compoundClass = new MockClass(projectContent, "RootNamespace.MyTestFixture"); compoundClass.Attributes.Add(new MockAttribute("TestFixture")); MockClass mockClass = (MockClass)testClass.Class; mockClass.SetCompoundClass(compoundClass); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithTwoMethodsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithTwoMethodsTestFixture.cs index 1c8d197529..2a94cbdd2f 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithTwoMethodsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestClassWithTwoMethodsTestFixture.cs @@ -23,6 +23,7 @@ namespace UnitTesting.Tests.Project TestMethod testMethod1; TestMethod testMethod2; MockClass mockClass; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -36,24 +37,21 @@ namespace UnitTesting.Tests.Project MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - mockClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - mockClass.Namespace = "RootNamespace.Tests"; - mockClass.ProjectContent = projectContent; + mockClass = new MockClass(projectContent, "RootNamespace.Tests.MyTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); projectContent.Classes.Add(mockClass); // Add a method to the test class - MockMethod mockMethod = new MockMethod("TestMethod1"); - mockMethod.DeclaringType = mockClass; + MockMethod mockMethod = new MockMethod(mockClass, "TestMethod1"); mockMethod.Attributes.Add(new MockAttribute("Test")); mockClass.Methods.Add(mockMethod); - mockMethod = new MockMethod("TestMethod2"); - mockMethod.DeclaringType = mockClass; + mockMethod = new MockMethod(mockClass, "TestMethod2"); mockMethod.Attributes.Add(new MockAttribute("Test")); mockClass.Methods.Add(mockMethod); - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); testClass = testProject.TestClasses[0]; testMethod1 = testClass.TestMethods[0]; testMethod2 = testClass.TestMethods[1]; @@ -69,7 +67,7 @@ namespace UnitTesting.Tests.Project public void TestMethod1Failed() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod1"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; testProject.UpdateTestResult(result); @@ -80,7 +78,7 @@ namespace UnitTesting.Tests.Project public void TestMethod1Ignored() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod1"); - result.IsIgnored = true; + result.ResultType = TestResultType.Ignored; testProject.UpdateTestResult(result); @@ -99,7 +97,7 @@ namespace UnitTesting.Tests.Project public void TestMethod1Passes() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod1"); - result.IsSuccess = true; + result.ResultType = TestResultType.Success; testProject.UpdateTestResult(result); @@ -118,7 +116,7 @@ namespace UnitTesting.Tests.Project public void TestMethod2Passes() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.TestMethod2"); - result.IsSuccess = true; + result.ResultType = TestResultType.Success; testProject.UpdateTestResult(result); @@ -192,10 +190,8 @@ namespace UnitTesting.Tests.Project [Test] public void TestMethodShouldBeUpdatedInClass() { - MockMethod mockMethod = new MockMethod("TestMethod1"); - mockMethod.DeclaringType = mockClass; + MockMethod mockMethod = new MockMethod(mockClass, "TestMethod1"); mockMethod.Attributes.Add(new MockAttribute("Test")); - mockClass.SetCompoundClass(mockClass); // Remove the existing TestMethod1 in the class. mockClass.Methods.RemoveAt(0); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestMethodsInBaseClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestMethodsInBaseClassTestFixture.cs index 28fbe985e3..cb15cf0d97 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TestMethodsInBaseClassTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestMethodsInBaseClassTestFixture.cs @@ -39,37 +39,34 @@ namespace UnitTesting.Tests.Project { TestClass testClass; MockClass c; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() - { + { MockProjectContent projectContent = new MockProjectContent(); - projectContent.Language = LanguageProperties.None; // Create the base test class. - MockClass baseClass = new MockClass("RootNamespace.TestFixtureBase"); + MockClass baseClass = new MockClass(projectContent, "RootNamespace.TestFixtureBase"); baseClass.Attributes.Add(new MockAttribute("TestFixture")); - baseClass.ProjectContent = projectContent; - MockMethod baseMethod = new MockMethod("BaseMethod"); + MockMethod baseMethod = new MockMethod(baseClass, "BaseMethod"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseClass; baseClass.Methods.Add(baseMethod); // Create the derived test class. - c = new MockClass("RootNamespace.MyTestFixture"); + c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; - MockMethod method = new MockMethod("DerivedMethod"); - method.DeclaringType = c; + MockMethod method = new MockMethod(c, "DerivedMethod"); method.Attributes.Add(new MockAttribute("Test")); c.Methods.Add(method); projectContent.Classes.Add(c); // Set derived class's base class. - c.BaseClass = baseClass; + c.AddBaseClass(baseClass); // Create TestClass. - testClass = new TestClass(c); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testClass = new TestClass(c, testFrameworks); } [Test] @@ -110,7 +107,7 @@ namespace UnitTesting.Tests.Project testClasses.Add(testClass); TestResult testResult = new TestResult("RootNamespace.MyTestFixture.TestFixtureBase.BaseMethod"); - testResult.IsFailure = true; + testResult.ResultType = TestResultType.Failure; testClasses.UpdateTestResult(testResult); Assert.AreEqual(TestResultType.Failure, testClass.Result); @@ -123,7 +120,7 @@ namespace UnitTesting.Tests.Project testClasses.Add(testClass); TestResult testResult = new TestResult("RootNamespace.MyTestFixture.BaseMethod"); - testResult.IsFailure = true; + testResult.ResultType = TestResultType.Failure; testClasses.UpdateTestResult(testResult); Assert.AreEqual(TestResultType.Failure, testClass.Result); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectUsesTestFrameworksTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectUsesTestFrameworksTestFixture.cs new file mode 100644 index 0000000000..1768a6e098 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectUsesTestFrameworksTestFixture.cs @@ -0,0 +1,90 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Project +{ + [TestFixture] + public class TestProjectUsesTestFrameworksTestFixture + { + MockRegisteredTestFrameworks testFrameworks; + TestProject testProject; + MockClass myTestClass; + DefaultCompilationUnit oldUnit; + + [SetUp] + public void Init() + { + testFrameworks = new MockRegisteredTestFrameworks(); + myTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); + myTestClass.SetDotNetName("MyTests"); + testFrameworks.AddTestClass(myTestClass); + + oldUnit = new DefaultCompilationUnit(myTestClass.ProjectContent); + oldUnit.Classes.Add(myTestClass); + + testProject = new TestProject(myTestClass.Project, myTestClass.ProjectContent, testFrameworks); + } + + [Test] + public void TestProjectHasTestClassCalledMyTests() + { + Assert.AreEqual(myTestClass, testProject.TestClasses[0].Class); + } + + [Test] + public void NewTestClassInNewCompilationUnitAddedToTestProjectTestClasses() + { + MockClass myNewTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); + myNewTestClass.SetDotNetName("MyNewTests"); + testFrameworks.AddTestClass(myNewTestClass); + + DefaultCompilationUnit newUnit = new DefaultCompilationUnit(myTestClass.ProjectContent); + newUnit.Classes.Add(myTestClass); + newUnit.Classes.Add(myNewTestClass); + + testProject.UpdateParseInfo(oldUnit, newUnit); + + Assert.AreEqual(myNewTestClass, testProject.TestClasses[1].Class); + } + + [Test] + public void NewInnerTestClassInNewCompilationUnitAddedToTestProjectTestClasses() + { + MockClass myNewInnerTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); + myNewInnerTestClass.SetDotNetName("MyNewInnerTests"); + testFrameworks.AddTestClass(myNewInnerTestClass); + myTestClass.InnerClasses.Add(myNewInnerTestClass); + + DefaultCompilationUnit newUnit = new DefaultCompilationUnit(myTestClass.ProjectContent); + newUnit.Classes.Add(myTestClass); + + testProject.UpdateParseInfo(oldUnit, newUnit); + + Assert.AreEqual(myNewInnerTestClass, testProject.TestClasses[1].Class); + } + + [Test] + public void TestProjectRemovesTestClassWhenItIsNoLongerATestClass() + { + testFrameworks.RemoveTestClass(myTestClass); + + DefaultCompilationUnit newUnit = new DefaultCompilationUnit(myTestClass.ProjectContent); + newUnit.Classes.Add(myTestClass); + + testProject.UpdateParseInfo(oldUnit, newUnit); + + Assert.AreEqual(0, testProject.TestClasses.Count); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectWithOneClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectWithOneClassTestFixture.cs index 96166cd19b..85e14197f3 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectWithOneClassTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TestProjectWithOneClassTestFixture.cs @@ -28,6 +28,7 @@ namespace UnitTesting.Tests.Project MockProjectContent projectContent; List classesAdded; List classesRemoved; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -46,21 +47,20 @@ namespace UnitTesting.Tests.Project // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace.MyTestFixture"); + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.SetCompoundClass(c); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add a second class that has no test fixture attribute. - MockClass nonTestClass = new MockClass(); - nonTestClass.ProjectContent = projectContent; + MockClass nonTestClass = new MockClass(projectContent); projectContent.Classes.Add(nonTestClass); - testProject = new TestProject(project, projectContent); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); testProject.TestClasses.TestClassAdded += TestClassAdded; testProject.TestClasses.TestClassRemoved += TestClassRemoved; - + testClass = testProject.TestClasses[0]; } @@ -141,9 +141,8 @@ namespace UnitTesting.Tests.Project // Create new compilation unit with extra class. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); newUnit.Classes.Add(testClass.Class); - MockClass newClass = new MockClass("RootNamespace.MyNewTestFixture"); + MockClass newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newClass.Attributes.Add(new MockAttribute("TestFixture")); - newClass.ProjectContent = projectContent; newClass.SetCompoundClass(newClass); newUnit.Classes.Add(newClass); @@ -173,9 +172,8 @@ namespace UnitTesting.Tests.Project // already exists in the project. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); newUnit.Classes.Add(testClass.Class); - MockClass c = new MockClass("RootNamespace.MyTestFixture"); + MockClass c = new MockClass(projectContent, "RootNamespace.MyTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; c.SetCompoundClass(c); newUnit.Classes.Add(c); @@ -202,8 +200,7 @@ namespace UnitTesting.Tests.Project // Create new compilation unit with extra class. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); newUnit.Classes.Add(testClass.Class); - MockClass newClass = new MockClass("RootNamespace.MyNewTestFixture"); - newClass.ProjectContent = projectContent; + MockClass newClass = new MockClass(projectContent, "RootNamespace.MyNewTestFixture"); newClass.SetCompoundClass(newClass); newUnit.Classes.Add(newClass); @@ -270,13 +267,11 @@ namespace UnitTesting.Tests.Project // Create new compilation unit. DefaultCompilationUnit newUnit = new DefaultCompilationUnit(projectContent); newUnit.Classes.Add(testClass.Class); - + // Add a new method to a new compound class. - MockClass compoundClass = new MockClass("RootNamespace.MyTestFixture"); - compoundClass.ProjectContent = projectContent; + MockClass compoundClass = new MockClass(projectContent, "RootNamespace.MyTestFixture"); compoundClass.Attributes.Add(new MockAttribute("TestFixture")); - MockMethod method = new MockMethod("NewMethod"); - method.DeclaringType = testClass.Class; + MockMethod method = new MockMethod(testClass.Class, "NewMethod"); method.Attributes.Add(new MockAttribute("Test")); compoundClass.Methods.Add(method); MockClass mockClass = (MockClass)testClass.Class; diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestClassesTestResultsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestClassesTestResultsTestFixture.cs index 803aef5475..9625d1f69d 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestClassesTestResultsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestClassesTestResultsTestFixture.cs @@ -23,26 +23,29 @@ namespace UnitTesting.Tests.Project TestClass testClass3; TestClassCollection testClasses; bool testClassesResultChanged; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testClassesResultChanged = false; testClasses = new TestClassCollection(); // TestClass1. MockClass mockClass = new MockClass("TestClass1"); - testClass1 = new TestClass(mockClass); + testClass1 = new TestClass(mockClass, testFrameworks); testClasses.Add(testClass1); // TestClass2. mockClass = new MockClass("TestClass2"); - testClass2 = new TestClass(mockClass); + testClass2 = new TestClass(mockClass, testFrameworks); testClasses.Add(testClass2); // TestClass3. mockClass = new MockClass("TestClass3"); - testClass3 = new TestClass(mockClass); + testClass3 = new TestClass(mockClass, testFrameworks); testClasses.Add(testClass3); testClasses.ResultChanged += TestClassesResultChanged; @@ -149,7 +152,7 @@ namespace UnitTesting.Tests.Project AllTestClassesPass(); MockClass mockClass = new MockClass("TestClass4"); - TestClass testClass4 = new TestClass(mockClass); + TestClass testClass4 = new TestClass(mockClass, testFrameworks); testClass4.Result = TestResultType.Failure; testClasses.Add(testClass4); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestMethodsTestResultsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestMethodsTestResultsTestFixture.cs index 6e0d8e0695..588b1419a8 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestMethodsTestResultsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/ThreeTestMethodsTestResultsTestFixture.cs @@ -31,17 +31,18 @@ namespace UnitTesting.Tests.Project testMethods = new TestMethodCollection(); // TestMethod1. - MockMethod mockMethod = new MockMethod("TestMethod1"); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod mockMethod = new MockMethod(c, "TestMethod1"); testMethod1 = new TestMethod(mockMethod); testMethods.Add(testMethod1); // TestMethod2. - mockMethod = new MockMethod("TestMethod2"); + mockMethod = new MockMethod(c, "TestMethod2"); testMethod2 = new TestMethod(mockMethod); testMethods.Add(testMethod2); // TestMethod3. - mockMethod = new MockMethod("TestMethod3"); + mockMethod = new MockMethod(c, "TestMethod3"); testMethod3 = new TestMethod(mockMethod); testMethods.Add(testMethod3); @@ -157,7 +158,8 @@ namespace UnitTesting.Tests.Project { AllTestMethodsPass(); - MockMethod mockMethod = new MockMethod("TestMethod4"); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod mockMethod = new MockMethod(c, "TestMethod4"); TestMethod testMethod4 = new TestMethod(mockMethod); testMethod4.Result = TestResultType.Failure; testMethods.Add(testMethod4); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TwoBaseClassesWithTestMethodsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TwoBaseClassesWithTestMethodsTestFixture.cs index 9e5a989513..2f73f4170c 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TwoBaseClassesWithTestMethodsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TwoBaseClassesWithTestMethodsTestFixture.cs @@ -26,41 +26,38 @@ namespace UnitTesting.Tests.Project { TestClass testClass; MockClass c; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() - { + { MockProjectContent projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - + // Create the top base test class. - MockClass baseBaseClass = new MockClass("ICSharpCode.SharpDevelop.Tests.BaseBaseTestFixture"); - baseBaseClass.ProjectContent = projectContent; - MockMethod baseMethod = new MockMethod("BaseBaseTest"); + MockClass baseBaseClass = new MockClass(projectContent, "ICSharpCode.SharpDevelop.Tests.BaseBaseTestFixture"); + MockMethod baseMethod = new MockMethod(baseBaseClass, "BaseBaseTest"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseBaseClass; baseBaseClass.Methods.Add(baseMethod); // Create the next level test class. - MockClass baseClass = new MockClass("ICSharpCode.SharpDevelop.Tests.BaseTestFixture"); - baseClass.ProjectContent = projectContent; - baseMethod = new MockMethod("BaseTest"); + MockClass baseClass = new MockClass(projectContent, "ICSharpCode.SharpDevelop.Tests.BaseTestFixture"); + baseMethod = new MockMethod(baseClass, "BaseTest"); baseMethod.Attributes.Add(new MockAttribute("Test")); - baseMethod.DeclaringType = baseClass; baseClass.Methods.Add(baseMethod); - + // Create the derived test class. - c = new MockClass("ICSharpCode.SharpDevelop.Tests.MainTestFixture"); + c = new MockClass(projectContent, "ICSharpCode.SharpDevelop.Tests.MainTestFixture"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Set the base class for each class in the hierarchy. - c.BaseClass = baseClass; - baseClass.BaseClass = baseBaseClass; + c.AddBaseClass(baseClass); + baseClass.AddBaseClass(baseBaseClass); // Create TestClass. - testClass = new TestClass(c); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testClass = new TestClass(c, testFrameworks); } [Test] @@ -95,7 +92,7 @@ namespace UnitTesting.Tests.Project testClasses.Add(testClass); TestResult testResult = new TestResult("ICSharpCode.SharpDevelop.Tests.MainTestFixture.BaseBaseTest"); - testResult.IsFailure = true; + testResult.ResultType = TestResultType.Failure; testClasses.UpdateTestResult(testResult); Assert.AreEqual(TestResultType.Failure, testClass.Result); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Project/TwoProjectRootNamespacesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Project/TwoProjectRootNamespacesTestFixture.cs index dd03364edf..894ac3d60e 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Project/TwoProjectRootNamespacesTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Project/TwoProjectRootNamespacesTestFixture.cs @@ -19,7 +19,8 @@ namespace UnitTesting.Tests.Project { TestProject testProject; MockProjectContent projectContent; - + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + [SetUp] public void Init() { @@ -33,18 +34,17 @@ namespace UnitTesting.Tests.Project // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - MockClass c = new MockClass("RootNamespace1.MyTestFixture1"); + MockClass c = new MockClass(projectContent, "RootNamespace1.MyTestFixture1"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); // Add a second class with a different root namespace. - c = new MockClass("RootNamespace2.MyTestFixture2"); + c = new MockClass(projectContent, "RootNamespace2.MyTestFixture2"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; projectContent.Classes.Add(c); - - testProject = new TestProject(project, projectContent); + + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + testProject = new TestProject(project, projectContent, testFrameworks); } [Test] @@ -123,13 +123,12 @@ namespace UnitTesting.Tests.Project [Test] public void DuplicateClassName() { - MockClass c = new MockClass("RootNamespace1.MyTestFixture2"); + MockClass c = new MockClass(projectContent, "RootNamespace1.MyTestFixture2"); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; - TestClass testClass = new TestClass(c); + TestClass testClass = new TestClass(c, testFrameworks); testProject.TestClasses.Add(testClass); - + testClass.Result = TestResultType.Failure; TestClass testClass2 = testProject.TestClasses["RootNamespace2.MyTestFixture2"]; testClass2.Result = TestResultType.Failure; diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/AddNUnitReferenceToProjectTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/AddNUnitReferenceToProjectTestFixture.cs new file mode 100644 index 0000000000..eb243ef23f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/AddNUnitReferenceToProjectTestFixture.cs @@ -0,0 +1,59 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class AddNUnitReferenceToProjectTestFixture + { + MockCSharpProject project; + ReferenceProjectItem referenceProjectItem; + AddNUnitReferenceCommand command = new AddNUnitReferenceCommand(); + + [SetUp] + public void Init() + { + project = new MockCSharpProject(); + + command.Run(project); + + if (project.Items.Count > 0) { + referenceProjectItem = project.Items[0] as ReferenceProjectItem; + } + } + + [Test] + public void ProjectHasNUnitFrameworkReferenceAdded() + { + Assert.AreEqual("nunit.framework", referenceProjectItem.Name); + } + + [Test] + public void NUnitReferenceProjectPropertyEqualsProjectPassedToRunMethod() + { + Assert.AreEqual(project, referenceProjectItem.Project); + } + + [Test] + public void ProjectIsSaved() + { + Assert.IsTrue(project.IsSaved); + } + + [Test] + public void NoExceptionThrownWhenProjectIsNull() + { + Assert.DoesNotThrow(delegate { command.Run(null); }); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildErrorWhenRunningTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildErrorWhenRunningTestsTestFixture.cs new file mode 100644 index 0000000000..15ca6c62f3 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildErrorWhenRunningTestsTestFixture.cs @@ -0,0 +1,63 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class BuildErrorWhenRunningTestsTestFixture : RunTestCommandTestFixtureBase + { + MockBuildProjectBeforeTestRun buildProjectBeforeTestRun; + + [SetUp] + public void Init() + { + base.InitBase(); + + MockCSharpProject project = new MockCSharpProject(); + context.MockUnitTestsPad.AddProject(project); + + buildProjectBeforeTestRun = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProjectBeforeTestRun); + + runTestCommand.Run(); + + FileName fileName = new FileName("test.cs"); + context.MockTaskService.Add(new Task(fileName, String.Empty, 1, 1, TaskType.Error)); + + BuildError error = new BuildError(); + buildProjectBeforeTestRun.LastBuildResults.Add(error); + buildProjectBeforeTestRun.FireBuildCompleteEvent(); + } + + [Test] + public void RunTestMethodIsNotCalled() + { + Assert.AreEqual(0, runTestCommand.Helpers.Count); + } + + [Test] + public void IsOnStopMethodCalledReturnsTrue() + { + Assert.IsTrue(runTestCommand.IsOnStopMethodCalled); + } + + [Test] + public void IsRunningTestReturnsFalseAfterStopMethodCalled() + { + Assert.IsFalse(AbstractRunTestCommand.IsRunningTest); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildProjectBeforeTestRunTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildProjectBeforeTestRunTestFixture.cs new file mode 100644 index 0000000000..88fd597f9d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/BuildProjectBeforeTestRunTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class BuildProjectBeforeTestRunTestFixture + { + BuildProjectBeforeTestRun buildProjectBeforeTestRun; + MockSaveAllFilesCommand saveAllFilesCommand; + MockCSharpProject project; + + [SetUp] + public void Init() + { + if (!PropertyService.Initialized) { + PropertyService.InitializeServiceForUnitTests(); + } + saveAllFilesCommand = new MockSaveAllFilesCommand(); + project = new MockCSharpProject(); + BuildResults buildResults = new BuildResults(); + + buildProjectBeforeTestRun = new BuildProjectBeforeTestRun(project, saveAllFilesCommand); + } + + [Test] + public void SaveAllFilesCommandNotCalledInitially() + { + Assert.IsFalse(saveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + + [Test] + public void BeforeBuildMethodSavesAllFiles() + { + buildProjectBeforeTestRun.BeforeBuild(); + Assert.IsTrue(saveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs new file mode 100644 index 0000000000..6f038338de --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassTestFixtureSelectedTestFixture.cs @@ -0,0 +1,64 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class ClassTestFixtureSelectedTestFixture + { + SelectedTests selectedTests; + List projects; + MockCSharpProject project; + MockClass c; + + [SetUp] + public void Init() + { + projects = new List(); + projects.Add(new MockCSharpProject()); + projects.Add(new MockCSharpProject()); + + project = new MockCSharpProject(); + + c = new MockClass(); + + MockTestTreeView treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedClass = c; + + selectedTests = new SelectedTests(treeView, projects.ToArray()); + } + + [Test] + public void SelectedTestsHasOneProject() + { + IProject[] expectedProjects = new IProject[] { project }; + List actualProjects = new List(selectedTests.Projects); + + Assert.AreEqual(expectedProjects, actualProjects.ToArray()); + } + + [Test] + public void ProjectPropertyReturnsSelectedProject() + { + Assert.AreEqual(project, selectedTests.Project); + } + + [Test] + public void ClassPropertyReturnsSelectedClass() + { + Assert.AreEqual(c, selectedTests.Class); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassWithNoRootNamespaceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassWithNoRootNamespaceTestFixture.cs index 900fabbf54..1872235a41 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassWithNoRootNamespaceTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/ClassWithNoRootNamespaceTestFixture.cs @@ -34,6 +34,7 @@ namespace UnitTesting.Tests.Tree ExtTreeNode testFixtureNode; TreeNodeCollection rootChildNodes; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() @@ -51,13 +52,12 @@ namespace UnitTesting.Tests.Tree // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - testClass = new MockClass("MyTestFixture"); + testClass = new MockClass(projectContent, "MyTestFixture"); testClass.Attributes.Add(new MockAttribute("TestFixture")); - testClass.ProjectContent = projectContent; projectContent.Classes.Add(testClass); - - // Init mock project content to be returned. - dummyTreeView = new DummyParserServiceTestTreeView(); + + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks); dummyTreeView.ProjectContentForProject = projectContent; // Load the projects into the test tree view. @@ -126,13 +126,12 @@ namespace UnitTesting.Tests.Tree [Test] public void AddNewClass() - { + { TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; - MockClass mockClass = new MockClass("MyNewTestFixture"); + MockClass mockClass = new MockClass(projectContent, "MyNewTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); - mockClass.ProjectContent = projectContent; - TestClass newTestClass = new TestClass(mockClass); + TestClass newTestClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(newTestClass); ExtTreeNode newTestClassNode = null; @@ -197,7 +196,8 @@ namespace UnitTesting.Tests.Tree // and make sure the disposed class node does // not add a new child node. Assert.AreEqual(0, testClassNode.Nodes.Count); - MockMethod mockMethod = new MockMethod("Method"); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod mockMethod = new MockMethod(c, "Method"); TestMethod testMethod = new TestMethod(mockMethod); testClass.TestMethods.Add(testMethod); @@ -295,8 +295,8 @@ namespace UnitTesting.Tests.Tree // Make sure the project node child nodes are // unaffected when the test class is removed. Assert.AreEqual(1, projectNode.Nodes.Count); - MockClass mockClass = new MockClass("MyNewTestClass"); - TestClass testClass = new TestClass(mockClass); + MockClass mockClass = new MockClass(projectContent, "MyNewTestClass"); + TestClass testClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(testClass); Assert.AreEqual(1, projectNode.Nodes.Count); } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GetProjectsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GetProjectsTestFixture.cs index 1a14c6ef9f..0446743d94 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/GetProjectsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GetProjectsTestFixture.cs @@ -26,6 +26,7 @@ namespace UnitTesting.Tests.Tree MSBuildBasedProject project2; IProject[] projects; DummyParserServiceTestTreeView treeView; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -46,7 +47,8 @@ namespace UnitTesting.Tests.Tree MockProjectContent projectContent = new MockProjectContent(); projectContent.Project = project1; - treeView = new DummyParserServiceTestTreeView(); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + treeView = new DummyParserServiceTestTreeView(testFrameworks); treeView.ProjectContentForProject = projectContent; treeView.AddSolution(solution); projects = treeView.GetProjects(); @@ -102,7 +104,7 @@ namespace UnitTesting.Tests.Tree foreach (IProject project in projects) { TestProject testProject = treeView.GetTestProject(project); MockClass mockClass = new MockClass("MyTestFixture"); - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); testClass.Result = TestResultType.Failure; testProject.TestClasses.Add(testClass); Assert.AreEqual(testProject.TestClasses.Result, TestResultType.Failure); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs new file mode 100644 index 0000000000..6eafda3b29 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedBaseClassMethodTestFixture.cs @@ -0,0 +1,57 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class GoToSelectedBaseClassMethodTestFixture + { + MockTestTreeView treeView; + GotoDefinitionCommand gotoDefinitionCommand; + MockFileService fileService; + MockMethod baseClassMethod; + + [SetUp] + public void Init() + { + baseClassMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); + baseClassMethod.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; + + MockClass derivedClass = MockClass.CreateMockClassWithoutAnyAttributes(); + derivedClass.CompilationUnit.FileName = @"d:\projects\myderivedtestclass.cs"; + + int methodBeginLine = 3; // 1 based. + int methodBeginColumn = 6; // 1 based. + baseClassMethod.Region = new DomRegion(methodBeginLine, methodBeginColumn); + + BaseTestMethod baseTestMethod = new BaseTestMethod(derivedClass, baseClassMethod); + + treeView = new MockTestTreeView(); + treeView.SelectedMethod = baseTestMethod; + fileService = new MockFileService(); + gotoDefinitionCommand = new GotoDefinitionCommand(fileService); + gotoDefinitionCommand.Owner = treeView; + gotoDefinitionCommand.Run(); + } + + [Test] + public void MethodIsJumpedTo() + { + int line = 2; // zero based. + int col = 5; // zero based. + FilePosition expectedFilePos = new FilePosition(@"c:\projects\mytest.cs", line, col); + + Assert.AreEqual(expectedFilePos, fileService.FilePositionJumpedTo); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassTestFixture.cs new file mode 100644 index 0000000000..9411e909a7 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassTestFixture.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class GoToSelectedClassTestFixture + { + MockTestTreeView treeView; + GotoDefinitionCommand gotoDefinitionCommand; + MockFileService fileService; + + [SetUp] + public void Init() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.CompilationUnit.FileName = @"c:\projects\mytest.cs"; + + int beginLine = 3; // 1 based. + int beginColumn = 6; // 1 based. + c.Region = new DomRegion(beginLine, beginColumn); + + treeView = new MockTestTreeView(); + treeView.SelectedClass = c; + fileService = new MockFileService(); + gotoDefinitionCommand = new GotoDefinitionCommand(fileService); + gotoDefinitionCommand.Owner = treeView; + gotoDefinitionCommand.Run(); + } + + [Test] + public void ClassIsJumpedTo() + { + int line = 2; // zero based. + int col = 5; // zero based. + FilePosition expectedFilePos = new FilePosition(@"c:\projects\mytest.cs", line, col); + + Assert.AreEqual(expectedFilePos, fileService.FilePositionJumpedTo); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassWithNoLocationTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassWithNoLocationTestFixture.cs new file mode 100644 index 0000000000..9012cc129f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedClassWithNoLocationTestFixture.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class GoToSelectedClassWithNoLocationTestFixture + { + MockTestTreeView treeView; + GotoDefinitionCommand gotoDefinitionCommand; + MockFileService fileService; + + [SetUp] + public void Init() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.CompilationUnit.FileName = @"c:\projects\mytest.cs"; + + treeView = new MockTestTreeView(); + treeView.SelectedClass = c; + fileService = new MockFileService(); + gotoDefinitionCommand = new GotoDefinitionCommand(fileService); + gotoDefinitionCommand.Owner = treeView; + gotoDefinitionCommand.Run(); + } + + [Test] + public void FileIsOpenedInsteadOfJumpingToFileLocation() + { + Assert.AreEqual(@"c:\projects\mytest.cs", fileService.FileOpened); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodTestFixture.cs new file mode 100644 index 0000000000..4ccf80c70d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodTestFixture.cs @@ -0,0 +1,66 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class GoToSelectedMethodTestFixture + { + MockTestTreeView treeView; + GotoDefinitionCommand gotoDefinitionCommand; + MockFileService fileService; + MockMethod method; + + [SetUp] + public void Init() + { + method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; + + int methodBeginLine = 3; // 1 based. + int methodBeginColumn = 6; // 1 based. + method.Region = new DomRegion(methodBeginLine, methodBeginColumn); + + treeView = new MockTestTreeView(); + treeView.SelectedMethod = method; + fileService = new MockFileService(); + gotoDefinitionCommand = new GotoDefinitionCommand(fileService); + gotoDefinitionCommand.Owner = treeView; + gotoDefinitionCommand.Run(); + } + + [Test] + public void MethodIsJumpedTo() + { + int line = 2; // zero based. + int col = 5; // zero based. + FilePosition expectedFilePos = new FilePosition(@"c:\projects\mytest.cs", line, col); + + Assert.AreEqual(expectedFilePos, fileService.FilePositionJumpedTo); + } + + [Test] + public void ExceptionNotThrownWhenSelectedTestTreeMethodIsNull() + { + treeView.SelectedMethod = null; + Assert.DoesNotThrow(delegate { gotoDefinitionCommand.Run(); }); + } + + [Test] + public void ExceptionNotThrownWhenCommandOwnerIsNull() + { + gotoDefinitionCommand.Owner = null; + Assert.DoesNotThrow(delegate { gotoDefinitionCommand.Run(); }); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodWithNoLocationTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodWithNoLocationTestFixture.cs new file mode 100644 index 0000000000..95ff346b36 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/GoToSelectedMethodWithNoLocationTestFixture.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class GoToSelectedMethodWithNoLocationTestFixture + { + MockTestTreeView treeView; + GotoDefinitionCommand gotoDefinitionCommand; + MockFileService fileService; + MockMethod method; + + [SetUp] + public void Init() + { + method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.DeclaringType.CompilationUnit.FileName = @"c:\projects\mytest.cs"; + + treeView = new MockTestTreeView(); + treeView.SelectedMethod = method; + fileService = new MockFileService(); + gotoDefinitionCommand = new GotoDefinitionCommand(fileService); + gotoDefinitionCommand.Owner = treeView; + gotoDefinitionCommand.Run(); + } + + [Test] + public void FileIsOpenedInsteadOfJumpingToFileLocation() + { + Assert.AreEqual(@"c:\projects\mytest.cs", fileService.FileOpened); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs new file mode 100644 index 0000000000..ebe9a5e624 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/MethodTestSelectedTestFixture.cs @@ -0,0 +1,79 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class MethodTestSelectedTestFixture + { + SelectedTests selectedTests; + List projects; + MockCSharpProject project; + MockMethod method; + MockClass c; + + [SetUp] + public void Init() + { + projects = new List(); + projects.Add(new MockCSharpProject()); + projects.Add(new MockCSharpProject()); + + project = new MockCSharpProject(); + + c = new MockClass(); + method = new MockMethod(c); + + MockTestTreeView treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedNamespace = "MyNamespace"; + treeView.SelectedMethod = method; + + selectedTests = new SelectedTests(treeView, projects.ToArray()); + } + + [Test] + public void SelectedTestsHasOneProject() + { + IProject[] expectedProjects = new IProject[] { project }; + List actualProjects = new List(selectedTests.Projects); + + Assert.AreEqual(expectedProjects, actualProjects.ToArray()); + } + + [Test] + public void ProjectPropertyReturnsSelectedProject() + { + Assert.AreEqual(project, selectedTests.Project); + } + + [Test] + public void NamespaceFilterIsMyNamespace() + { + Assert.AreEqual("MyNamespace", selectedTests.NamespaceFilter); + } + + [Test] + public void MethodPropertyReturnsSelectedMethod() + { + Assert.AreEqual(method, selectedTests.Method); + } + + [Test] + public void ClassPropertyReturnsMethodDeclaringType() + { + Assert.AreEqual(c, selectedTests.Class); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs index f2092c519d..0b5fa59f2c 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs @@ -28,11 +28,13 @@ namespace UnitTesting.Tests.Tree TestProject firstTestProject; TestProject secondTestProject; Solution solution; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() { - treeView = new DummyParserServiceTestTreeView(); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + treeView = new DummyParserServiceTestTreeView(testFrameworks); // Create a solution with two test projects. solution = new Solution(); @@ -115,7 +117,7 @@ namespace UnitTesting.Tests.Tree [Test] public void ProjectIgnoredTestResult() { - TestClass c = new TestClass(new MockClass("Tests.TestFixture")); + TestClass c = new TestClass(new MockClass("Tests.TestFixture"), testFrameworks); firstTestProject.TestClasses.Add(c); c.Result = TestResultType.Ignored; @@ -137,7 +139,7 @@ namespace UnitTesting.Tests.Tree ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem); // Add the project into a dummy project node. - TestProject testProject = new TestProject(project, new MockProjectContent()); + TestProject testProject = new TestProject(project, new MockProjectContent(), testFrameworks); DerivedTestProjectTreeNode projectNode = new DerivedTestProjectTreeNode(testProject); allTestsTreeNode.AddProjectNode(projectNode); @@ -154,7 +156,7 @@ namespace UnitTesting.Tests.Tree [Test] public void ProjectFailedTestResult() { - TestClass c = new TestClass(new MockClass("Tests.TestFixture")); + TestClass c = new TestClass(new MockClass("Tests.TestFixture"), testFrameworks); firstTestProject.TestClasses.Add(c); c.Result = TestResultType.Failure; @@ -164,7 +166,7 @@ namespace UnitTesting.Tests.Tree [Test] public void ProjectPassedTestResult() { - TestClass c = new TestClass(new MockClass("Tests.TestFixture")); + TestClass c = new TestClass(new MockClass("Tests.TestFixture"), testFrameworks); firstTestProject.TestClasses.Add(c); c.Result = TestResultType.Success; @@ -187,11 +189,11 @@ namespace UnitTesting.Tests.Tree [Test] public void AllTestProjectsPassed() { - TestClass c = new TestClass(new MockClass("Tests.TestFixture")); + TestClass c = new TestClass(new MockClass("Tests.TestFixture"), testFrameworks); firstTestProject.TestClasses.Add(c); c.Result = TestResultType.Success; - c = new TestClass(new MockClass("Tests.TestFixture")); + c = new TestClass(new MockClass("Tests.TestFixture"), testFrameworks); secondTestProject.TestClasses.Add(c); c.Result = TestResultType.Success; diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs new file mode 100644 index 0000000000..cf78ca72cf --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoOwnerForSelectedTestsTestFixture.cs @@ -0,0 +1,53 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class NoOwnerForSelectedTestsTestFixture + { + SelectedTests selectedTests; + List projects; + + [SetUp] + public void Init() + { + projects = new List(); + projects.Add(new MockCSharpProject()); + projects.Add(new MockCSharpProject()); + projects.Add(new MockCSharpProject()); + + selectedTests = new SelectedTests(null, projects.ToArray()); + } + + [Test] + public void SelectedTestsHaveThreeProjects() + { + Assert.AreEqual(3, selectedTests.Projects.Count); + } + + [Test] + public void SelectedProjectsMatchProjectsPassedToConstructor() + { + List actualProjects = new List(selectedTests.Projects); + Assert.AreEqual(projects.ToArray(), actualProjects.ToArray()); + } + + [Test] + public void ProjectPropertyReturnsFirstProject() + { + Assert.AreEqual(selectedTests.Project, projects[0]); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenNoTestsSelectedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenNoTestsSelectedTestFixture.cs new file mode 100644 index 0000000000..c27d735883 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenNoTestsSelectedTestFixture.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision$ +// + +using System; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class NoTestsRunWhenNoTestsSelectedTestFixture : RunTestCommandTestFixtureBase + { + [SetUp] + public void Init() + { + base.InitBase(); + runTestCommand.Run(); + } + + [Test] + public void OnBeforeRunIsNotCalled() + { + Assert.IsFalse(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenUnitTestPadNotCreatedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenUnitTestPadNotCreatedTestFixture.cs new file mode 100644 index 0000000000..d327f4ed96 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/NoTestsRunWhenUnitTestPadNotCreatedTestFixture.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class NoTestsRunWhenUnitTestPadNotCreatedTestFixture + { + DerivedRunTestCommand runTestCommand; + MockRunTestCommandContext runTestCommandContext; + + [SetUp] + public void Init() + { + runTestCommandContext = new MockRunTestCommandContext(); + runTestCommand = new DerivedRunTestCommand(runTestCommandContext); + } + + [Test] + public void RunTestCommandRunMethodDoesNotThrowNullReferenceException() + { + Assert.DoesNotThrow(delegate { runTestCommand.Run(); }); + } + + [Test] + public void OnBeforeRunIsNotCalled() + { + runTestCommand.Run(); + Assert.IsFalse(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/NonTestProjectNotAddedToTestTreeTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/NonTestProjectNotAddedToTestTreeTestFixture.cs new file mode 100644 index 0000000000..5f9ef704af --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/NonTestProjectNotAddedToTestTreeTestFixture.cs @@ -0,0 +1,81 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Windows.Forms; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + public class NonTestProjectNotAddedToTestTreeTestFixture + { + Solution solution; + MSBuildBasedProject testProject; + MSBuildBasedProject nonTestProject; + DummyParserServiceTestTreeView treeView; + IProject[] projects; + MockRegisteredTestFrameworks testFrameworks; + + [SetUp] + public void Init() + { + solution = new Solution(); + testProject = new MockCSharpProject(solution, "A"); + solution.Folders.Add(testProject); + + nonTestProject = new MockCSharpProject(solution, "Z"); + solution.Folders.Add(nonTestProject); + + MockProjectContent projectContent = new MockProjectContent(); + + testFrameworks = new MockRegisteredTestFrameworks(); + testFrameworks.AddTestProject(testProject); + + treeView = new DummyParserServiceTestTreeView(testFrameworks); + treeView.ProjectContentForProject = projectContent; + treeView.AddSolution(solution); + projects = treeView.GetProjects(); + } + + [TearDown] + public void TearDown() + { + if (treeView != null) { + treeView.Dispose(); + } + } + + [Test] + public void OneProjectInTestTree() + { + Assert.AreEqual(1, projects.Length); + } + + [Test] + public void TestProjectIsInTree() + { + bool found = false; + foreach (IProject project in projects) { + found = Object.ReferenceEquals(project, testProject); + if (found) { + break; + } + } + Assert.IsTrue(found); + } + + [Test] + public void asdfasdf() + { + Assert.IsNotNull(testFrameworks.IsTestProjectParameterUsed); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/OneTestClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/OneTestClassTestFixture.cs index e419f918cf..2c83a50c71 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/OneTestClassTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/OneTestClassTestFixture.cs @@ -41,6 +41,7 @@ namespace UnitTesting.Tests.Tree TreeNodeCollection testFixtureChildNodes; ExtTreeNode testNode; ReferenceProjectItem nunitFrameworkReferenceItem; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() @@ -60,27 +61,23 @@ namespace UnitTesting.Tests.Tree // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - testClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - testClass.Namespace = "RootNamespace.Tests"; + testClass = new MockClass(projectContent, "RootNamespace.Tests.MyTestFixture"); testClass.Attributes.Add(new MockAttribute("TestFixture")); - testClass.ProjectContent = projectContent; projectContent.Classes.Add(testClass); // Add two methods to the test class only // one of which has test attributes. - testMethod = new MockMethod("NameExists"); + testMethod = new MockMethod(testClass, "NameExists"); testMethod.Attributes.Add(new MockAttribute("Test")); - testMethod.DeclaringType = testClass; testClass.Methods.Add(testMethod); - testClass.Methods.Add(new MockMethod()); - + testClass.Methods.Add(new MockMethod(testClass)); + // Add a second class that has no test fixture attribute. - MockClass nonTestClass = new MockClass(); - nonTestClass.ProjectContent = projectContent; + MockClass nonTestClass = new MockClass(projectContent); projectContent.Classes.Add(nonTestClass); - // Init mock project content to be returned. - dummyTreeView = new DummyParserServiceTestTreeView(); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks); dummyTreeView.ProjectContentForProject = projectContent; // Load the projects into the test tree view. @@ -99,12 +96,12 @@ namespace UnitTesting.Tests.Tree rootNamespaceNode.Expanding(); rootNamespaceChildNodes = rootNamespaceNode.Nodes; testsNamespaceNode = (ExtTreeNode)rootNamespaceNode.Nodes[0]; - + // Expand the tests namespace node. testsNamespaceNode.Expanding(); testsNamespaceChildNodes = testsNamespaceNode.Nodes; testFixtureNode = (ExtTreeNode)testsNamespaceNode.Nodes[0]; - + // Expand the test node. testFixtureNode.Expanding(); testFixtureChildNodes = testFixtureNode.Nodes; @@ -316,7 +313,7 @@ namespace UnitTesting.Tests.Tree public void TestMethodFails() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.NameExists"); - result.IsFailure = true; + result.ResultType = TestResultType.Failure; TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; projectNode.TestProject.UpdateTestResult(result); @@ -331,7 +328,7 @@ namespace UnitTesting.Tests.Tree public void TestMethodPasses() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.NameExists"); - result.IsSuccess = true; + result.ResultType = TestResultType.Success; TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; projectNode.TestProject.UpdateTestResult(result); @@ -345,7 +342,7 @@ namespace UnitTesting.Tests.Tree public void TestMethodIgnored() { TestResult result = new TestResult("RootNamespace.Tests.MyTestFixture.NameExists"); - result.IsIgnored = true; + result.ResultType = TestResultType.Ignored; TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; projectNode.TestProject.UpdateTestResult(result); @@ -379,8 +376,7 @@ namespace UnitTesting.Tests.Tree TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; TestClass testClass = projectNode.TestProject.TestClasses["RootNamespace.Tests.MyTestFixture"]; - MockMethod method = new MockMethod("NewMethod"); - method.DeclaringType = testClass.Class; + MockMethod method = new MockMethod(testClass.Class, "NewMethod"); method.Attributes.Add(new MockAttribute("Test")); testClass.TestMethods.Add(new TestMethod(method)); @@ -391,7 +387,7 @@ namespace UnitTesting.Tests.Tree break; } } - + Assert.AreEqual(2, testFixtureNode.Nodes.Count); Assert.IsNotNull(newMethodNode); Assert.IsInstanceOf(typeof(TestMethodTreeNode), newMethodNode); @@ -469,7 +465,7 @@ namespace UnitTesting.Tests.Tree TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; ProjectService.RemoveProjectItem(projectNode.TestProject.Project, nunitFrameworkReferenceItem); - treeView.ProjectReferencesChanged(projectNode.TestProject.Project); + treeView.ProjectItemRemoved(nunitFrameworkReferenceItem); Assert.AreEqual(0, treeView.Nodes.Count); } @@ -478,7 +474,12 @@ namespace UnitTesting.Tests.Tree public void UnknownProjectHasReferenceRemoved() { IProject project = new MockCSharpProject(); - treeView.ProjectReferencesChanged(project); + ReferenceProjectItem refItem = new ReferenceProjectItem(project); + refItem.Include = "System"; + + ProjectService.AddProjectItem(project, refItem); + + treeView.ProjectItemRemoved(refItem); Assert.AreEqual(1, treeView.Nodes.Count); } @@ -492,17 +493,18 @@ namespace UnitTesting.Tests.Tree nunitFrameworkReferenceItem.Include = "NUnit.Framework"; ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem); - treeView.ProjectReferencesChanged(project); + treeView.ProjectItemAdded(nunitFrameworkReferenceItem); + ExtTreeNode allProjectsNode = treeView.Nodes[0] as ExtTreeNode; ExtTreeNode newProjectNode = null; - foreach (ExtTreeNode node in treeView.Nodes) { + foreach (ExtTreeNode node in allProjectsNode.Nodes) { if (node.Text == "NewProject") { newProjectNode = node; break; } } - Assert.AreEqual(2, treeView.Nodes.Count); + Assert.AreEqual(1, treeView.Nodes.Count); Assert.IsNotNull(newProjectNode); } @@ -548,7 +550,7 @@ namespace UnitTesting.Tests.Tree testsNamespaceNode.Remove(); TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; - + // Make sure the tests namespace node child nodes are // unaffected when the test class is removed. Assert.AreEqual(1, testsNamespaceNode.Nodes.Count); @@ -568,7 +570,7 @@ namespace UnitTesting.Tests.Tree testsNamespaceNode.Remove(); TestProjectTreeNode projectNode = (TestProjectTreeNode)rootNode; - + // Make sure the tests namespace node image index is // unaffected when the test class test result is changed. Assert.AreEqual(TestTreeViewImageListIndex.TestNotRun, (TestTreeViewImageListIndex)testsNamespaceNode.ImageIndex); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RemoveSolutionFolderTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RemoveSolutionFolderTestFixture.cs new file mode 100644 index 0000000000..62d545b551 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RemoveSolutionFolderTestFixture.cs @@ -0,0 +1,89 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RemoveSolutionFolderTestFixture + { + DummyParserServiceTestTreeView treeView; + MockCSharpProject project; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + + [SetUp] + public void Init() + { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + treeView = new DummyParserServiceTestTreeView(testFrameworks); + treeView.ProjectContentForProject = new MockProjectContent(); + + project = new MockCSharpProject(); + project.Name = "MyProject"; + + ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project); + refProjectItem.Include = "NUnit.Framework"; + ProjectService.AddProjectItem(project, refProjectItem); + + treeView.AddProject(project); + } + + [TearDown] + public void TearDown() + { + if (treeView != null) { + treeView.Dispose(); + } + } + + [Test] + public void TreeViewHasOneRootProjectNodeCalledMyProject() + { + TestProjectTreeNode node = treeView.Nodes[0] as TestProjectTreeNode; + Assert.AreEqual("MyProject", node.Text); + } + + [Test] + public void RemovingNullSolutionFolderDoesNotThrowNullReferenceException() + { + Assert.DoesNotThrow(delegate { treeView.RemoveSolutionFolder(null); }); + } + + [Test] + public void RemovingHeavilyNestedSolutionFoldersWithProjectAsChildRemovesProjectTreeNodeFromTreeView() + { + SolutionFolder childSolutionFolder = new SolutionFolder("child", "location", "guid"); + childSolutionFolder.Folders.Add(project); + + SolutionFolder parentSolutionFolder = new SolutionFolder("parent", "location", "guid"); + parentSolutionFolder.Folders.Add(childSolutionFolder); + + SolutionFolder grandParentSolutionFolder = new SolutionFolder("grandparent", "location", "guid"); + grandParentSolutionFolder.Folders.Add(parentSolutionFolder); + + treeView.RemoveSolutionFolder(grandParentSolutionFolder); + + Assert.AreEqual(0, treeView.Nodes.Count); + } + + [Test] + public void RemovingSolutionFolderContainingProjectRemovesProjectNodeFromTreeView() + { + SolutionFolder solutionFolder = new SolutionFolder("parent", "location", "guid"); + solutionFolder.Folders.Add(project); + + treeView.RemoveSolutionFolder(solutionFolder); + + Assert.AreEqual(0, treeView.Nodes.Count); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunAllTestsInPadTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunAllTestsInPadTestFixture.cs new file mode 100644 index 0000000000..8398dc271a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunAllTestsInPadTestFixture.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunAllTestsInPadTestFixture + { + RunAllTestsInPadCommand runAllTestsInPadCommand; + + [SetUp] + public void Init() + { + MockRunTestCommandContext context = new MockRunTestCommandContext(); + runAllTestsInPadCommand = new RunAllTestsInPadCommand(context); + runAllTestsInPadCommand.Owner = this; + runAllTestsInPadCommand.Run(); + } + + [Test] + public void OwnerIsSetToNullWhenRunMethodIsCalled() + { + Assert.IsNull(runAllTestsInPadCommand.Owner); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs new file mode 100644 index 0000000000..bb4366ab4e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsForMethodTestFixture.cs @@ -0,0 +1,221 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Util; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunNUnitTestsForMethodTestFixture + { + MockNUnitTestRunnerContext context; + SelectedTests selectedTests; + NUnitTestRunner testRunner; + + [SetUp] + public void Init() + { + selectedTests = SelectedTestsHelper.CreateSelectedTestMethod(); + context = new MockNUnitTestRunnerContext(); + FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; + + testRunner = context.CreateNUnitTestRunner(); + testRunner.Start(selectedTests); + } + + [Test] + public void StartMethodCallsTestResultsMonitorStartMethod() + { + Assert.IsTrue(context.MockTestResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void StopMethodCallsTestResultsMonitorStopMethod() + { + testRunner.Stop(); + Assert.IsTrue(context.MockTestResultsMonitor.IsStopMethodCalled); + } + + [Test] + public void DisposeMethodCallsTestResultsMonitorDisposeMethod() + { + testRunner.Dispose(); + Assert.IsTrue(context.MockTestResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void NUnitTestRunnerIsIDisposable() + { + Assert.IsNotNull(testRunner as IDisposable); + } + + [Test] + public void StopMethodCallsTestResultsReadMethodToEnsureAllTestsAreRead() + { + testRunner.Stop(); + Assert.IsTrue(context.MockTestResultsMonitor.IsReadMethodCalled); + } + + [Test] + public void StopMethodCallsProcessRunnerKillMethod() + { + testRunner.Stop(); + Assert.IsTrue(context.MockProcessRunner.IsKillMethodCalled); + } + + [Test] + public void FiringTestResultsMonitorTestFinishedEventFiresNUnitTestRunnerTestFinishedEvent() + { + TestResult testResultToFire = new TestResult("abc"); + TestResult resultFromEventHandler = FireTestResult(testResultToFire); + Assert.IsNotNull(resultFromEventHandler); + } + + TestResult FireTestResult(TestResult testResult) + { + TestResult resultFired = null; + testRunner.TestFinished += delegate(object source, TestFinishedEventArgs e) { + resultFired = e.Result; + }; + + context.MockTestResultsMonitor.FireTestFinishedEvent(testResult); + return resultFired; + } + + [Test] + public void FiringTestResultsMonitorTestFinishedCreatesNUnitTestResultWithCorrectNameFromNUnitTestRunnerTestFinishedEvent() + { + TestResult testResultToFire = new TestResult("abc"); + NUnitTestResult resultFromEventHandler = FireTestResult(testResultToFire) as NUnitTestResult; + Assert.AreEqual("abc", resultFromEventHandler.Name); + } + + [Test] + public void FiringTestResultsMonitorTestFinishedEventAfterDisposingTestRunnerDoesNotGenerateTestFinishedEvent() + { + bool fired = false; + testRunner.TestFinished += delegate(object source, TestFinishedEventArgs e) { + fired = true; + }; + + testRunner.Dispose(); + + TestResult result = new TestResult("abc"); + context.MockTestResultsMonitor.FireTestFinishedEvent(result); + Assert.IsFalse(fired); + } + + [Test] + public void NUnitTestRunnerImplementsITestRunner() + { + Assert.IsNotNull(testRunner as ITestRunner); + } + + [Test] + public void FiringProcessExitEventCausesTestRunnerAllTestsFinishedEventToFire() + { + bool fired = false; + testRunner.AllTestsFinished += delegate (object source, EventArgs e) { + fired = true; + }; + context.MockProcessRunner.FireProcessExitedEvent(); + + Assert.IsTrue(fired); + } + + [Test] + public void NUnitConsoleExeProcessIsStarted() + { + string expectedCommand = @"C:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + Assert.AreEqual(expectedCommand, context.MockProcessRunner.CommandPassedToStartMethod); + } + + [Test] + public void NUnitConsoleExeProcessIsStartedWithArgumentsToTestSingleMethod() + { + string expectedArgs = + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " + + "/results=\"c:\\temp\\tmp66.tmp\" " + + "/run=\"MyTests.MyTestClass.MyTestMethod\""; + Assert.AreEqual(expectedArgs, context.MockProcessRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void NUnitConsoleWorkingDirectoryIsUsedByProcessRunner() + { + string expectedDirectory = @"C:\SharpDevelop\bin\Tools\NUnit"; + Assert.AreEqual(expectedDirectory, context.MockProcessRunner.WorkingDirectory); + } + + [Test] + public void ProcessRunnerLogStandardOutputAndErrorIsFalse() + { + Assert.IsFalse(context.MockProcessRunner.LogStandardOutputAndError); + } + + [Test] + public void FiringProcessRunnerOutputLineReceivedEventFiresTestRunnerMessageReceivedEvent() + { + string message = null; + testRunner.MessageReceived += delegate (object o, MessageReceivedEventArgs e) { + message = e.Message; + }; + + string expectedMessage = "test"; + context.MockProcessRunner.FireOutputLineReceivedEvent(new LineReceivedEventArgs(expectedMessage)); + + Assert.AreEqual(expectedMessage, message); + } + + [Test] + public void FiringProcessRunnerErrorLineReceivedEventFiresTestRunnerMessageReceivedEvent() + { + string message = null; + testRunner.MessageReceived += delegate (object o, MessageReceivedEventArgs e) { + message = e.Message; + }; + + string expectedMessage = "test"; + context.MockProcessRunner.FireErrorLineReceivedEvent(new LineReceivedEventArgs(expectedMessage)); + + Assert.AreEqual(expectedMessage, message); + } + + [Test] + public void FiringProcessRunnerOutputLineReceivedEventAfterDisposingTestRunnerDoesNotMessageReceivedEvent() + { + string message = null; + testRunner.MessageReceived += delegate (object o, MessageReceivedEventArgs e) { + message = e.Message; + }; + + testRunner.Dispose(); + context.MockProcessRunner.FireOutputLineReceivedEvent(new LineReceivedEventArgs("Test")); + + Assert.IsNull(message); + } + + [Test] + public void FiringProcessRunnerErrorLineReceivedEventAfterDisposingTestRunnerDoesNotMessageReceivedEvent() + { + string message = null; + testRunner.MessageReceived += delegate (object o, MessageReceivedEventArgs e) { + message = e.Message; + }; + + testRunner.Dispose(); + context.MockProcessRunner.FireErrorLineReceivedEvent(new LineReceivedEventArgs("Test")); + + Assert.IsNull(message); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs new file mode 100644 index 0000000000..550e9d178d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunNUnitTestsWithDebuggerTestFixture.cs @@ -0,0 +1,303 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunNUnitTestsWithDebuggerTestFixture + { + MockTestResultsMonitor testResultsMonitor; + SelectedTests selectedTests; + NUnitTestDebugger testDebugger; + MockDebuggerService debuggerService; + MockDebugger debugger; + MockMessageService messageService; + UnitTestingOptions options; + + [SetUp] + public void Init() + { + selectedTests = SelectedTestsHelper.CreateSelectedTestMethod(); + FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; + + messageService = new MockMessageService(); + debuggerService = new MockDebuggerService(); + debugger = debuggerService.MockDebugger; + testResultsMonitor = new MockTestResultsMonitor(); + testResultsMonitor.FileName = @"c:\temp\tmp66.tmp"; + options = new UnitTestingOptions(new Properties()); + options.NoShadow = true; + testDebugger = new NUnitTestDebugger(debuggerService, messageService, testResultsMonitor, options); + } + + [Test] + public void DebuggerProcessStartInfoFileNameIsNUnitConsoleApp() + { + StartTestDebugger(); + string expectedCommandLine = + @"C:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + + Assert.AreEqual(expectedCommandLine, debugger.ProcessStartInfo.FileName); + } + + void StartTestDebugger() + { + testDebugger.Start(selectedTests); + } + + [Test] + public void DebuggerProcessStartInfoArgumentsIsNUnitConsoleCommandLineArguments() + { + StartTestDebugger(); + string expectedArguments = + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " + + "/noshadow " + + "/results=\"c:\\temp\\tmp66.tmp\" " + + "/run=\"MyTests.MyTestClass.MyTestMethod\""; + + Assert.AreEqual(expectedArguments, debugger.ProcessStartInfo.Arguments); + } + + [Test] + public void DebuggerProcessStartInfoWorkingDirectoryIsNUnitConsoleAppDirectory() + { + StartTestDebugger(); + string expectedDirectory = @"C:\SharpDevelop\bin\Tools\NUnit"; + + Assert.AreEqual(expectedDirectory, debugger.ProcessStartInfo.WorkingDirectory); + } + + [Test] + public void StopCallsDebuggerStopIfDebuggerIsDebugging() + { + StartTestDebugger(); + debugger.IsDebugging = true; + testDebugger.Stop(); + + Assert.IsTrue(debugger.IsStopCalled); + } + + [Test] + public void StopDoesNotCallDebuggerStopIfDebuggerIsNotDebugging() + { + StartTestDebugger(); + debugger.IsDebugging = false; + testDebugger.Stop(); + + Assert.IsFalse(debugger.IsStopCalled); + } + + [Test] + public void FiringDebuggerDebugStopEventFiresAllTestsFinishedEvent() + { + StartTestDebugger(); + + bool fired = false; + testDebugger.AllTestsFinished += delegate (object o, EventArgs e) { + fired = true; + }; + debugger.FireDebugStoppedEvent(); + + Assert.IsTrue(fired); + } + + [Test] + public void FiringDebuggerDebugStopEventTwiceFiresAllTestsFinishedEventOnlyOnce() + { + StartTestDebugger(); + + int eventFiredCount = 0; + testDebugger.AllTestsFinished += delegate (object o, EventArgs e) { + eventFiredCount++; + }; + debugger.FireDebugStoppedEvent(); + debugger.FireDebugStoppedEvent(); + + Assert.AreEqual(1, eventFiredCount); + } + + [Test] + public void FiringDebugStopEventAfterDebuggerThrowsExceptionOnStartDoesNotFireAllTestsFinishedEvent() + { + debugger.ThrowExceptionOnStart = new ApplicationException(); + try { + StartTestDebugger(); + } catch { + // Do nothing. + } + + bool fired = false; + testDebugger.AllTestsFinished += delegate (object o, EventArgs e) { + fired = true; + }; + debugger.FireDebugStoppedEvent(); + + Assert.IsFalse(fired); + } + + [Test] + public void FiringTestResultsMonitorEventFiresTestFinishedEventWithNUnitTestResult() + { + TestResult actualTestResult = null; + testDebugger.TestFinished += delegate (object o, TestFinishedEventArgs e) { + actualTestResult = e.Result; + }; + TestResult testResult = new TestResult("test"); + testResultsMonitor.FireTestFinishedEvent(testResult); + + TestResult nunitTestResult = actualTestResult as NUnitTestResult; + + Assert.AreEqual("test", nunitTestResult.Name); + } + + [Test] + public void MessageReceivedEventFiredShowingCommandLineWhenDebuggerStarted() + { + string message = null; + testDebugger.MessageReceived += delegate(object sender, MessageReceivedEventArgs e) { + message = e.Message; + }; + StartTestDebugger(); + + string commandLine = "\"C:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\" " + + "/noshadow " + + "/results=\"c:\\temp\\tmp66.tmp\" " + + "/run=\"MyTests.MyTestClass.MyTestMethod\""; + Assert.AreEqual(commandLine, message); + } + + [Test] + public void IfDebuggerIsRunningWhenStartMethodCalledUserIsPromptedToStopDebugger() + { + SetDebuggerIsLoadedToTrueAndDebuggingToTrue(); + StartTestDebugger(); + string expectedQuestion = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingQuestion}"; + + Assert.AreEqual(expectedQuestion, messageService.Question); + } + + void SetDebuggerIsLoadedToTrueAndDebuggingToTrue() + { + debuggerService.IsDebuggerLoaded = true; + debuggerService.MockDebugger.IsDebugging = true; + } + + [Test] + public void UserNotPromptedToStopDebuggerWhenDebuggerIsLoadedAndDebuggerIsNotDebugging() + { + debuggerService.IsDebuggerLoaded = true; + debuggerService.MockDebugger.IsDebugging = false; + StartTestDebugger(); + + Assert.IsNull(messageService.Question); + } + + [Test] + public void UserNotPromptedToStopDebuggerWhenDebuggerIsNotLoadedAndDebuggerIsDebugging() + { + debuggerService.IsDebuggerLoaded = false; + debuggerService.MockDebugger.IsDebugging = true; + StartTestDebugger(); + + Assert.IsNull(messageService.Question); + } + + [Test] + public void IfDebuggerIsRunningWhenStartMethodCalledUserIsPromptedToStopDebuggerWithCaption() + { + SetDebuggerIsLoadedToTrueAndDebuggingToTrue(); + StartTestDebugger(); + string expectedCaption = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingTitle}"; + + Assert.AreEqual(expectedCaption, messageService.Caption); + } + + [Test] + public void DebuggerStoppedIfUserClicksYesToStopDebuggerPrompt() + { + messageService.AskQuestionReturnValue = true; + SetDebuggerIsLoadedToTrueAndDebuggingToTrue(); + StartTestDebugger(); + + Assert.IsTrue(debugger.IsStopCalled); + } + + [Test] + public void DebuggerNotStoppedIfUserClicksNoToStopDebuggerPrompt() + { + UserClicksNoToStopDebuggerPrompt(); + + Assert.IsFalse(debugger.IsStopCalled); + } + + void UserClicksNoToStopDebuggerPrompt() + { + messageService.AskQuestionReturnValue = false; + SetDebuggerIsLoadedToTrueAndDebuggingToTrue(); + StartTestDebugger(); + } + + [Test] + public void DebuggerNotStartedIfUserClicksNoToStopDebuggerPrompt() + { + UserClicksNoToStopDebuggerPrompt(); + + Assert.IsNull(debugger.ProcessStartInfo); + } + + [Test] + public void IfUserSaysYesToStopDebuggingPromptThenDebuggerIsStarted() + { + SetDebuggerIsLoadedToTrueAndDebuggingToTrue(); + messageService.AskQuestionReturnValue = true; + StartTestDebugger(); + + Assert.IsNotNull(debugger.ProcessStartInfo); + } + + [Test] + public void TestResultsMonitorIsStartedWhenDebuggerIsStarted() + { + StartTestDebugger(); + Assert.IsTrue(testResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void StoppingDebuggerAlsoStopsTestResultsMonitor() + { + StartTestDebugger(); + testDebugger.Stop(); + + Assert.IsTrue(testResultsMonitor.IsStopMethodCalled); + } + + [Test] + public void StoppingDebuggerCausesTestResultsMonitorReadMethodToBeCalled() + { + StartTestDebugger(); + testDebugger.Stop(); + + Assert.IsTrue(testResultsMonitor.IsReadMethodCalled); + } + + [Test] + public void DisposingDebuggerDisposesTestResultsMonitor() + { + StartTestDebugger(); + testDebugger.Dispose(); + + Assert.IsTrue(testResultsMonitor.IsDisposeMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsInPadTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsInPadTestFixture.cs new file mode 100644 index 0000000000..27b7248463 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsInPadTestFixture.cs @@ -0,0 +1,64 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunProjectTestsInPadTestFixture + { + RunProjectTestsInPadCommand runProjectTestsInPadCommand; + + [SetUp] + public void Init() + { + MockRunTestCommandContext context = new MockRunTestCommandContext(); + runProjectTestsInPadCommand = new RunProjectTestsInPadCommand(context); + runProjectTestsInPadCommand.Owner = this; + runProjectTestsInPadCommand.Run(); + } + + [Test] + public void OwnerIsSetToCommandWhenRunMethodIsCalled() + { + Assert.AreEqual(runProjectTestsInPadCommand, runProjectTestsInPadCommand.Owner); + } + + [Test] + public void SelectedMethodIsNull() + { + Assert.IsNull(runProjectTestsInPadCommand.SelectedMethod); + } + + [Test] + public void SelectedClassIsNull() + { + Assert.IsNull(runProjectTestsInPadCommand.SelectedClass); + } + + [Test] + public void SelectedNamespaceIsNull() + { + Assert.IsNull(runProjectTestsInPadCommand.SelectedNamespace); + } + + [Test] + public void SelectedProjectMatchesProjectServiceCurrentProject() + { + MockCSharpProject project = new MockCSharpProject(); + ProjectService.CurrentProject = project; + + Assert.AreEqual(project, runProjectTestsInPadCommand.SelectedProject); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsTestFixture.cs new file mode 100644 index 0000000000..6a85703da2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunProjectTestsTestFixture.cs @@ -0,0 +1,201 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunProjectTestsTestFixture : RunTestCommandTestFixtureBase + { + MockCSharpProject project; + TestProject testProject; + TestResult errorTestResult; + TestMethod firstTestMethod; + TestResult warningTestResult; + TestMethod secondTestMethod; + TestResult successTestResult; + TestMethod thirdTestMethod; + MockTestFramework testFramework; + bool runningTestsBeforeTestsFinishedCalled; + + [SetUp] + public void Init() + { + base.InitBase(); + + project = new MockCSharpProject(); + context.MockUnitTestsPad.AddProject(project); + + string[] methodNames = new string[] { "FirstTest", "SecondTest", "ThirdTest" }; + + testProject = + TestProjectHelper.CreateTestProjectWithTestClassTestMethods(project, + "MyTests.MyTestClass", + methodNames); + + TestClass testClass = testProject.TestClasses[0]; + firstTestMethod = testClass.TestMethods[0]; + secondTestMethod = testClass.TestMethods[1]; + thirdTestMethod = testClass.TestMethods[2]; + + context.MockUnitTestsPad.AddTestProject(testProject); + + MockBuildProjectBeforeTestRun buildProjectBeforeTestRun = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProjectBeforeTestRun); + + context.UnitTestingOptions.NoThread = true; + context.UnitTestingOptions.NoShadow = true; + context.UnitTestingOptions.NoLogo = true; + context.UnitTestingOptions.NoDots = true; + context.UnitTestingOptions.Labels = true; + context.UnitTestingOptions.CreateXmlOutputFile = true; + + testFramework = new MockTestFramework(); + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project, testFramework); + + runTestCommand.Run(); + + buildProjectBeforeTestRun.FireBuildCompleteEvent(); + + errorTestResult = new TestResult("MyTests.MyTestClass.FirstTest"); + errorTestResult.ResultType = TestResultType.Failure; + + warningTestResult = new TestResult("MyTests.MyTestClass.SecondTest"); + warningTestResult.ResultType = TestResultType.Ignored; + + successTestResult = new TestResult("MyTests.MyTestClass.ThirdTest"); + successTestResult.ResultType = TestResultType.Success; + + context.MockUnitTestWorkbench.MakeSafeThreadAsyncMethodCallsWithArguments = true; + MockTestRunner testRunner = runTestCommand.TestRunnersCreated[0]; + testRunner.FireTestFinishedEvent(errorTestResult); + testRunner.FireTestFinishedEvent(warningTestResult); + testRunner.FireTestFinishedEvent(successTestResult); + + context.MockUnitTestsPad.IsUpdateToolbarMethodCalled = false; + runningTestsBeforeTestsFinishedCalled = AbstractRunTestCommand.IsRunningTest; + runTestCommand.CallTestsCompleted(); + } + + [Test] + public void RegisteredTestFrameworksReturnsTestFrameworkForProject() + { + Assert.AreEqual(testFramework, context.MockRegisteredTestFrameworks.GetTestFrameworkForProject(project)); + } + + [Test] + public void FirstSafeAsyncMethodCallWithArgsIsMadeOnRunTestCommandShowResultsMethod() + { + ActionArguments actionArgs = new ActionArguments(); + actionArgs.Action = runTestCommand.ShowResultAction; + actionArgs.Arg = errorTestResult; + + Assert.AreEqual(actionArgs, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCallsWithArguments[0]); + } + + [Test] + public void FirstTaskAddedToTaskServiceIsErrorTask() + { + Task expectedTask = TestResultTask.Create(errorTestResult, testProject); + TaskComparison taskComparison = new TaskComparison(expectedTask, context.MockTaskService.Tasks[0]); + Assert.IsTrue(taskComparison.IsMatch, taskComparison.MismatchReason); + } + + [Test] + public void FirstTaskMethodRegionIsTakenFromTestProject() + { + DomRegion expectedRegion = new DomRegion(4, 19); + Task task = context.MockTaskService.Tasks[0]; + DomRegion region = new DomRegion(task.Line, task.Column); + Assert.AreEqual(expectedRegion, region); + } + + [Test] + public void UnitTestsPadGetProjectReturnsTestProject() + { + Assert.AreEqual(testProject, context.MockUnitTestsPad.GetTestProject(testProject.Project)); + } + + [Test] + public void FirstTestMethodResultTypeIsFailure() + { + Assert.AreEqual(TestResultType.Failure, firstTestMethod.Result); + } + + [Test] + public void SecondTaskAddedToTaskServiceIsWarningTask() + { + Task expectedTask = TestResultTask.Create(warningTestResult, testProject); + TaskComparison taskComparison = new TaskComparison(expectedTask, context.MockTaskService.Tasks[1]); + Assert.IsTrue(taskComparison.IsMatch, taskComparison.MismatchReason); + } + + [Test] + public void SecondTestMethodResultTypeIsIgnored() + { + Assert.AreEqual(TestResultType.Ignored, secondTestMethod.Result); + } + + [Test] + public void TaskServiceOnlyHasTwoTasksSinceSuccessTestResultsDoNotCreateTasks() + { + Assert.AreEqual(2, context.MockTaskService.Tasks.Count); + } + + [Test] + public void ThirdTestMethodResultTypeIsSuccess() + { + Assert.AreEqual(TestResultType.Success, thirdTestMethod.Result); + } + + [Test] + public void IsRunningTestsReturnsTrueBeforeTestsFinishedMethodIsCalled() + { + Assert.IsTrue(runningTestsBeforeTestsFinishedCalled); + } + + [Test] + public void IsRunningTestsReturnsTrueAfterTestsFinishedMethodCalled() + { + Assert.IsFalse(AbstractRunTestCommand.IsRunningTest); + } + + [Test] + public void IsUnitTestsPadToolbarUpdatedAfterTestFinishedMethodCalled() + { + Assert.IsTrue(context.MockUnitTestsPad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void OnAfterRunTestsCalledAfterTestFinishedMethodCalled() + { + Assert.IsTrue(runTestCommand.IsOnAfterRunTestsMethodCalled); + } + + [Test] + public void ErrorListPadDescriptorExistsInWorkbench() + { + Assert.IsNotNull(context.MockUnitTestWorkbench.GetPad(typeof(ErrorListPad))); + } + + [Test] + public void ErrorListPadBroughtToFrontAfterTestsFinishedCalled() + { + Action expectedAction = context.MockUnitTestWorkbench.ErrorListPadDescriptor.BringPadToFront; + Assert.AreEqual(expectedAction, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls[1]); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandBeforeRunTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandBeforeRunTestFixture.cs new file mode 100644 index 0000000000..d1171a03c3 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandBeforeRunTestFixture.cs @@ -0,0 +1,166 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestCommandBeforeRunTestFixture : RunTestCommandTestFixtureBase + { + MockCSharpProject project; + MockBuildProjectBeforeTestRun buildProjectBeforeTestRun; + + [SetUp] + public void Init() + { + base.InitBase(); + project = new MockCSharpProject(); + context.MockUnitTestsPad.AddProject(project); + + buildProjectBeforeTestRun = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProjectBeforeTestRun); + + context.MockTaskService.BuildMessageViewCategory.SetText("Previous build text..."); + context.UnitTestCategory.SetText("Previous unit test run..."); + } + + [Test] + public void RunningTestCommandPropertyIsNullByDefault() + { + Assert.IsNull(AbstractRunTestCommand.RunningTestCommand); + } + + [Test] + public void IsRunningTestReturnsFalseByDefault() + { + Assert.IsFalse(AbstractRunTestCommand.IsRunningTest); + } + + [Test] + public void RunCallsOnBeforeRunTestsMethod() + { + runTestCommand.Run(); + Assert.IsTrue(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + + [Test] + public void TaskServiceClearExceptCommentTasksMethodIsCalled() + { + runTestCommand.Run(); + Assert.IsTrue(context.MockTaskService.IsClearExceptCommentTasksMethodCalled); + } + + [Test] + public void TaskServiceIsInUpdateWhilstClearExceptCommentTasksMethodIsCalled() + { + runTestCommand.Run(); + Assert.IsTrue(context.MockTaskService.IsInUpdateWhilstClearExceptCommentTasksMethodCalled); + } + + [Test] + public void TaskServiceInUpdateReturnsFalseAfterRunMethodCompletes() + { + runTestCommand.Run(); + Assert.IsFalse(context.MockTaskService.InUpdate); + } + + [Test] + public void TaskServiceBuildMessageViewCategoryHasTextBeforeRunMethodCalled() + { + Assert.IsTrue(context.MockTaskService.BuildMessageViewCategory.Text.Length > 0); + } + + [Test] + public void TaskServiceBuildMessageViewCategoryTextIsClearedAfterRunMethodCalled() + { + runTestCommand.Run(); + Assert.AreEqual(String.Empty, context.MockTaskService.BuildMessageViewCategory.Text); + } + + [Test] + public void TestRunnerMessageViewCategoryHasTextBeforeRunMethodCalled() + { + Assert.IsTrue(context.UnitTestCategory.Text.Length > 0); + } + + [Test] + public void TestRunnerMessageViewCategoryTextIsClearedAfterRunMethodCalled() + { + runTestCommand.Run(); + Assert.AreEqual(String.Empty, context.UnitTestCategory.Text); + } + + [Test] + public void UnitTestsPadToolbarUpdatedAfterRunMethodCalled() + { + runTestCommand.Run(); + Assert.IsTrue(context.MockUnitTestsPad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void UnitTestsPadBringToFrontMethodCalledAfterRunMethodCalled() + { + runTestCommand.Run(); + Assert.IsTrue(context.MockUnitTestsPad.IsBringToFrontMethodCalled); + } + + [Test] + public void CompilerMessageViewPadDescriptorExistsInWorkbench() + { + Assert.IsNotNull(context.MockUnitTestWorkbench.GetPad(typeof(CompilerMessageView))); + } + + [Test] + public void CompilerMessageViewPadBroughtToFrontAfterRunMethodCalled() + { + runTestCommand.Run(); + Action expectedAction = context.MockUnitTestWorkbench.CompilerMessageViewPadDescriptor.BringPadToFront; + Assert.AreEqual(expectedAction, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls[0]); + } + + [Test] + public void RunningTestCommandPropertyIsSetToRunningCommandWhenOnBeforeRunIsCalled() + { + runTestCommand.Run(); + Assert.AreEqual(runTestCommand, runTestCommand.RunningTestCommandPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void IsRunningTestPropertyReturnsTrueWhenOnBeforeRunIsCalled() + { + runTestCommand.Run(); + Assert.IsTrue(runTestCommand.IsRunningTestPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void IsUnitTestsPadResetTestResultsMethodCalled() + { + runTestCommand.Run(); + Assert.IsTrue(context.MockUnitTestsPad.IsResetTestResultsMethodCalled); + } + + [Test] + public void BuildProjectBeforeTestRunIsCreatedWhenRunMethodCalled() + { + runTestCommand.Run(); + Assert.AreEqual(project, buildProjectBeforeTestRun.Project); + } + + [Test] + public void BuildProjectBeforeTestRunHasRunMethodCalledWhenRunTestCommandRunMethodCalled() + { + runTestCommand.Run(); + Assert.IsTrue(buildProjectBeforeTestRun.IsRunMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandTestFixtureBase.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandTestFixtureBase.cs new file mode 100644 index 0000000000..1262e11929 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestCommandTestFixtureBase.cs @@ -0,0 +1,40 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + public class RunTestCommandTestFixtureBase + { + protected DerivedRunTestCommand runTestCommand; + protected PadDescriptor compilerMessageViewPadDescriptor; + protected PadDescriptor errorListPadDescriptor; + protected MockRunTestCommandContext context; + + public void InitBase() + { + if (!PropertyService.Initialized) { + PropertyService.InitializeService(String.Empty, String.Empty, String.Empty); + } + context = new MockRunTestCommandContext(); + runTestCommand = new DerivedRunTestCommand(context); + } + + [TearDown] + public void TearDownBase() + { + AbstractRunTestCommand.RunningTestCommand = null; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs new file mode 100644 index 0000000000..3d79c2af6c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestInPadCommandTestFixture.cs @@ -0,0 +1,173 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Util; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestInPadCommandTestFixture + { + string oldRootPath; + DerivedRunTestInPadCommand runCommand; + MockProcessRunner processRunner; + NUnitConsoleApplication helper; + MockRunTestCommandContext context; + MockNUnitTestFramework testFramework; + MockBuildProjectBeforeTestRun buildProject; + + [TestFixtureSetUp] + public void SetUpFixture() + { + oldRootPath = FileUtility.ApplicationRootPath; + FileUtility.ApplicationRootPath = @"D:\SharpDevelop"; + } + + [TestFixtureTearDown] + public void TearDownFixture() + { + FileUtility.ApplicationRootPath = oldRootPath; + } + + [SetUp] + public void Init() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests selectedTests = new SelectedTests(project); + helper = new NUnitConsoleApplication(selectedTests); + + context = new MockRunTestCommandContext(); + context.MockUnitTestsPad.AddProject(project); + + buildProject = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + processRunner = new MockProcessRunner(); + + testFramework = new MockNUnitTestFramework(processRunner, context.MockTestResultsMonitor, context.UnitTestingOptions); + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project, testFramework); + + runCommand = new DerivedRunTestInPadCommand(context); + } + + [Test] + public void LogStandardOutputAndErrorIsSetToFalse() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + Assert.IsFalse(processRunner.LogStandardOutputAndError); + } + + [Test] + public void RunTestsStartsProcessWithCommandForUnitTestApplication() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + string expectedCommand = @"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + + Assert.AreEqual(expectedCommand, processRunner.CommandPassedToStartMethod); + } + + [Test] + public void RunTestsStartsProcessWithCommandLineArgumentsForUnitTestApplication() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + string expectedArgs = "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedArgs, processRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void MessageCategoryDisplaysUnitTestApplicationCommandLine() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + string fullCommandLine = helper.GetCommandLine(); + string expectedCategoryText = fullCommandLine + "\r\n"; + + Assert.AreEqual(expectedCategoryText, context.UnitTestCategory.Text); + } + + [Test] + public void ProcessRunnerKillMethodCalledAfterStopMethodCalled() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + runCommand.Stop(); + Assert.IsTrue(processRunner.IsKillMethodCalled); + } + + [Test] + public void ProcessRunnerKillMethodIsNotCalledAfterStopMethodCalledTheSecondTime() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + runCommand.Stop(); + processRunner.IsKillMethodCalled = false; + runCommand.Stop(); + Assert.IsFalse(processRunner.IsKillMethodCalled); + } + + [Test] + public void TestRunnerIsDisposedAfterRunCommandStopMethodIsCalled() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + runCommand.Stop(); + Assert.IsTrue(context.MockTestResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void OutputLineTextReceivedFromProcessRunnerIsAddedToMessageCategoryText() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + context.UnitTestCategory.ClearText(); + + LineReceivedEventArgs firstLineReceived = new LineReceivedEventArgs("first"); + processRunner.FireOutputLineReceivedEvent(firstLineReceived); + LineReceivedEventArgs secondLineReceived = new LineReceivedEventArgs("second"); + processRunner.FireOutputLineReceivedEvent(secondLineReceived); + + string expectedCategoryText = + "first\r\n" + + "second\r\n"; + + Assert.AreEqual(expectedCategoryText, context.UnitTestCategory.Text); + } + + [Test] + public void TestCompletedMethodIsCalledSafelyAndAsynchronouslyAfterProcessExitEventFires() + { + runCommand.Run(); + context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Clear(); + buildProject.FireBuildCompleteEvent(); + processRunner.FireProcessExitedEvent(); + + Action callTestRunCompletedAction = runCommand.GetCallRunTestCompletedAction(); + Assert.AreEqual(callTestRunCompletedAction, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls[0]); + } + + [Test] + public void TestRunnerIsDisposedAfterAllTestsFinished() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + context.MockUnitTestWorkbench.MakeNonGenericSafeThreadAsyncMethodCalls = true; + processRunner.FireProcessExitedEvent(); + + Assert.IsTrue(context.MockTestResultsMonitor.IsDisposeMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWhenDebuggerRunningTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWhenDebuggerRunningTestFixture.cs new file mode 100644 index 0000000000..0087528740 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWhenDebuggerRunningTestFixture.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestWhenDebuggerRunningTestFixture : RunTestWithDebuggerCommandTestFixtureBase + { + [SetUp] + public void Init() + { + base.InitBase(); + } + + [Test] + public void IfDebuggerLoadedAndCurrentDebuggerIsDebuggingUserIsAskedToStopDebugging() + { + SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue(); + RunTests(); + + string expectedQuestion = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingQuestion}"; + string actualQuestion = context.MockMessageService.Question; + + Assert.AreEqual(expectedQuestion, actualQuestion); + } + + void SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue() + { + debuggerService.MockDebugger.IsDebugging = true; + debuggerService.IsDebuggerLoaded = true; + } + + void RunTests() + { + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + } + + [Test] + public void IfDebuggerLoadedAndCurrentDebuggerIsDebuggingUserMessageBoxHasStopDebuggingCaption() + { + SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue(); + RunTests(); + + string expectedCaption = "${res:XML.MainMenu.RunMenu.Compile.StopDebuggingTitle}"; + string actualCaption = context.MockMessageService.Caption; + + Assert.AreEqual(expectedCaption, actualCaption); + } + + [Test] + public void IfDebuggerLoadedAndCurrentDebuggerIsDebuggingAndUserSaysYesToDialogThenDebuggerIsStopped() + { + SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue(); + SetMessageServiceAskQuestionToReturnTrue(); + RunTests(); + + Assert.IsTrue(debuggerService.MockDebugger.IsStopCalled); + } + + void SetMessageServiceAskQuestionToReturnTrue() + { + context.MockMessageService.AskQuestionReturnValue = true; + } + + [Test] + public void IfUserSaysYesToStopDebuggingDialogThenDebuggerIsStarted() + { + SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue(); + SetMessageServiceAskQuestionToReturnTrue(); + RunTests(); + + string expectedCommand = + @"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + string actualCommand = debuggerService.MockDebugger.ProcessStartInfo.FileName; + + Assert.AreEqual(expectedCommand, actualCommand); + } + + [Test] + public void IfUserSaysNoToStopDebuggingDialogThenDebuggerIsNotStarted() + { + SetDebuggerIsLoadedAndCurrentDebuggerIsDebuggingToTrue(); + RunTests(); + + Assert.IsNull(debuggerService.MockDebugger.ProcessStartInfo); + } + + [Test] + public void IfDebuggerNotLoadedThenDebuggerIsNotStopped() + { + SetCurrentDebuggerIsDebuggingToTrue(); + SetMessageServiceAskQuestionToReturnTrue(); + RunTests(); + + Assert.IsFalse(debuggerService.MockDebugger.IsStopCalled); + } + + void SetCurrentDebuggerIsDebuggingToTrue() + { + debuggerService.MockDebugger.IsDebugging = true; + } + + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs new file mode 100644 index 0000000000..377b8578ad --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixture.cs @@ -0,0 +1,106 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestWithDebuggerCommandTestFixture : RunTestWithDebuggerCommandTestFixtureBase + { + [SetUp] + public void Init() + { + base.InitBase(); + runCommand.Run(); + buildProject.FireBuildCompleteEvent(); + } + + [Test] + public void DebuggerStartsUnitTestApplication() + { + string expectedFileName = + @"D:\SharpDevelop\bin\Tools\NUnit\nunit-console-x86.exe"; + string actualFileName = debuggerService.MockDebugger.ProcessStartInfo.FileName; + + Assert.AreEqual(expectedFileName, actualFileName); + } + + [Test] + public void DebuggerStartsUnitTestApplicationWithCorrectCommandLineArguments() + { + string expectedArguments = + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + string actualArguments = debuggerService.MockDebugger.ProcessStartInfo.Arguments; + + Assert.AreEqual(expectedArguments, actualArguments); + } + + [Test] + public void DebuggerStartsUnitTestApplicationInUnitTestApplicationWorkingDirectory() + { + string expectedWorkingDirectory = @"D:\SharpDevelop\bin\Tools\NUnit"; + string actualWorkingDirectory = debuggerService.MockDebugger.ProcessStartInfo.WorkingDirectory; + + Assert.AreEqual(expectedWorkingDirectory, actualWorkingDirectory); + } + + [Test] + public void UnitTestApplicationCommandLineWrittenToUnitTestCategory() + { + string expectedText = + "\"D:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\"\r\n"; + string actualText = context.UnitTestCategory.Text; + + Assert.AreEqual(expectedText, actualText); + } + + [Test] + public void TestRunCompletedCalledAsynchronouslyAfterDebugStoppedEventFires() + { + context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Clear(); + debuggerService.MockDebugger.FireDebugStoppedEvent(); + Action expectedAction = runCommand.GetCallRunTestCompletedAction(); + Action actualAction = context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls[0]; + + Assert.AreEqual(expectedAction, actualAction); + } + + [Test] + public void DebugStopEventHandlerRemovedAfterFirstDebugStopEventOccurs() + { + context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Clear(); + debuggerService.MockDebugger.FireDebugStoppedEvent(); + debuggerService.MockDebugger.FireDebugStoppedEvent(); + + Assert.AreEqual(1, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Count); + } + + [Test] + public void StopMethodStopsDebuggerIfDebuggerIsRunning() + { + debuggerService.MockDebugger.IsDebugging = true; + runCommand.Stop(); + + Assert.IsTrue(debuggerService.MockDebugger.IsStopCalled); + } + + [Test] + public void StopMethodDoesNotStopDebuggerIfDebuggerIsNotRunning() + { + debuggerService.MockDebugger.IsDebugging = false; + runCommand.Stop(); + + Assert.IsFalse(debuggerService.MockDebugger.IsStopCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixtureBase.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixtureBase.cs new file mode 100644 index 0000000000..9007b6c8eb --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestWithDebuggerCommandTestFixtureBase.cs @@ -0,0 +1,73 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + public class RunTestWithDebuggerCommandTestFixtureBase + { + string oldRootPath = String.Empty; + protected DerivedRunTestWithDebuggerCommand runCommand; + protected MockDebuggerService debuggerService; + protected MockRunTestCommandContext context; + protected MockCSharpProject project; + protected MockBuildProjectBeforeTestRun buildProject; + protected MockNUnitTestFramework testFramework; + + [TestFixtureSetUp] + public void SetUpFixture() + { + oldRootPath = FileUtility.ApplicationRootPath; + FileUtility.ApplicationRootPath = @"D:\SharpDevelop"; + } + + [TestFixtureTearDown] + public void TearDownFixture() + { + FileUtility.ApplicationRootPath = oldRootPath; + } + + public void InitBase() + { + project = new MockCSharpProject(); + buildProject = new MockBuildProjectBeforeTestRun(); + + context = new MockRunTestCommandContext(); + context.MockUnitTestsPad.AddProject(project); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + debuggerService = new MockDebuggerService(); + testFramework = + new MockNUnitTestFramework(debuggerService, + context.MockTestResultsMonitor, + context.UnitTestingOptions, + context.MessageService); + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project, testFramework); + + runCommand = new DerivedRunTestWithDebuggerCommand(context); + } + + [Test] + public void ExpectedBuildProjectReturnedFromBuildFactory() + { + InitBase(); + Assert.AreEqual(buildProject, context.MockBuildProjectFactory.CreateBuildProjectBeforeTestRun(null)); + } + + [Test] + public void ExpectedTestFrameworkReturnedFromRegisteredFrameworks() + { + InitBase(); + Assert.AreEqual(testFramework, context.MockRegisteredTestFrameworks.GetTestFrameworkForProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForClassTestFixture.cs new file mode 100644 index 0000000000..e2024c4fd4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForClassTestFixture.cs @@ -0,0 +1,73 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestsForClassTestFixture : RunTestCommandTestFixtureBase + { + MockTestTreeView treeView; + MockCSharpProject project; + MockClass classToTest; + + [SetUp] + public void Init() + { + base.InitBase(); + + project = new MockCSharpProject(); + MockBuildProjectBeforeTestRun buildProject = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + classToTest = MockClass.CreateMockClassWithoutAnyAttributes(); + classToTest.SetDotNetName("MyTestClass"); + + treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedClass = classToTest; + + runTestCommand.Owner = treeView; + + runTestCommand.Run(); + + buildProject.FireBuildCompleteEvent(); + + TestResult result = new TestResult("MyTestClass"); + result.ResultType = TestResultType.Success; + context.MockTestResultsMonitor.FireTestFinishedEvent(result); + + runTestCommand.CallTestsCompleted(); + } + + [Test] + public void TestableConditionGetClassReturnsClassToTest() + { + Assert.AreEqual(classToTest, TestableCondition.GetClass(treeView)); + } + + [Test] + public void SelectedTestsHasClassConfigured() + { + MockTestRunner testRunner = runTestCommand.TestRunnersCreated[0]; + SelectedTests tests = testRunner.SelectedTestsPassedToStartMethod; + Assert.AreEqual(classToTest, tests.Class); + } + + [Test] + public void ErrorListPadIsNotShownWhenAllTestsPassed() + { + Assert.IsFalse(context.MockUnitTestWorkbench.TypesPassedToGetPadMethod.Contains(typeof(ErrorListPad))); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForMethodTestFixture.cs new file mode 100644 index 0000000000..68ebb8eaf0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForMethodTestFixture.cs @@ -0,0 +1,86 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestsForMethodTestFixture : RunTestCommandTestFixtureBase + { + MockTestTreeView treeView; + MockCSharpProject project; + MockClass classToTest; + MockMethod methodToTest; + + [SetUp] + public void Init() + { + base.InitBase(); + + project = new MockCSharpProject(); + MockBuildProjectBeforeTestRun buildProject = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + methodToTest = MockMethod.CreateMockMethodWithoutAnyAttributes(); + methodToTest.FullyQualifiedName = "MyTests.MyTestClass.MyTestMethod"; + + classToTest = methodToTest.DeclaringType as MockClass; + classToTest.SetDotNetName("MyTests.MyTestClass"); + + treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedMethod = methodToTest; + + runTestCommand.Owner = treeView; + + runTestCommand.Run(); + + buildProject.FireBuildCompleteEvent(); + + context.MockUnitTestWorkbench.MakeSafeThreadAsyncMethodCallsWithArguments = true; + context.MockBuildOptions.ShowErrorListAfterBuild = false; + + TestResult result = new TestResult("MyTests.MyTestClass.MyTestMethod"); + result.ResultType = TestResultType.Failure; + context.MockTestResultsMonitor.FireTestFinishedEvent(result); + + runTestCommand.CallTestsCompleted(); + } + + [Test] + public void SelectedTestsHasTestMethodConfigured() + { + SelectedTests tests = runTestCommand.TestRunnersCreated[0].SelectedTestsPassedToStartMethod; + Assert.AreEqual(methodToTest, tests.Method); + } + + [Test] + public void TestableConditionGetMemberReturnsTestMethod() + { + Assert.AreEqual(methodToTest, TestableCondition.GetMember(treeView)); + } + + [Test] + public void SelectedTestsHasClassConfigured() + { + SelectedTests tests = runTestCommand.TestRunnersCreated[0].SelectedTestsPassedToStartMethod; + Assert.AreEqual(classToTest, tests.Class); + } + + [Test] + public void ErrorListPadNotDisplayedWhenShowErrorListPadAfterBuildIsFalse() + { + Assert.IsFalse(context.MockUnitTestWorkbench.TypesPassedToGetPadMethod.Contains(typeof(ErrorListPad))); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForNamespaceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForNamespaceTestFixture.cs new file mode 100644 index 0000000000..97d8796633 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsForNamespaceTestFixture.cs @@ -0,0 +1,53 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestsForNamespaceTestFixture : RunTestCommandTestFixtureBase + { + MockTestTreeView treeView; + MockCSharpProject project; + + [SetUp] + public void Init() + { + base.InitBase(); + + project = new MockCSharpProject(); + MockBuildProjectBeforeTestRun buildProject = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedNamespace = "MyNamespace"; + + runTestCommand.Owner = treeView; + runTestCommand.Run(); + buildProject.FireBuildCompleteEvent(); + } + + [Test] + public void TestableConditionGetNamespaceReturnsMyNamespace() + { + Assert.AreEqual("MyNamespace", TestableCondition.GetNamespace(treeView)); + } + + [Test] + public void SelectedTestsHasNamespaceFilter() + { + SelectedTests tests = runTestCommand.TestRunnersCreated[0].SelectedTestsPassedToStartMethod; + Assert.AreEqual("MyNamespace", tests.NamespaceFilter); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutBuildingProjectTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutBuildingProjectTestFixture.cs new file mode 100644 index 0000000000..23f772fb58 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutBuildingProjectTestFixture.cs @@ -0,0 +1,82 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestsWithoutBuildingProjectTestFixture : RunTestCommandTestFixtureBase + { + MockTestFramework testFramework; + MockBuildProjectBeforeTestRun buildProjectBeforeTestRun; + + [SetUp] + public void Init() + { + InitBase(); + + MockCSharpProject project1 = new MockCSharpProject(); + MockCSharpProject project2 = new MockCSharpProject(); + testFramework = new MockTestFramework(); + testFramework.IsBuildNeededBeforeTestRun = false; + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project1, testFramework); + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project2, testFramework); + + buildProjectBeforeTestRun = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProjectBeforeTestRun); + + context.MockUnitTestsPad.AddProject(project1); + context.MockUnitTestsPad.AddProject(project2); + + runTestCommand.Run(); + } + + [Test] + public void TestRunnerIsStarted() + { + Assert.IsTrue(runTestCommand.TestRunnersCreated[0].IsStartCalled); + } + + [Test] + public void ProjectIsNotBuiltBeforeTestRun() + { + Assert.IsFalse(buildProjectBeforeTestRun.IsRunMethodCalled); + } + + [Test] + public void SaveAllFilesCommandIsRun() + { + Assert.IsTrue(context.MockSaveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + + [Test] + public void WhenTestRunCompletedTheSecondProjectIsNotBuilt() + { + runTestCommand.CallTestsCompleted(); + Assert.IsFalse(buildProjectBeforeTestRun.IsRunMethodCalled); + } + + [Test] + public void WhenTestRunCompletedTheSecondTestRunnerIsStarted() + { + runTestCommand.CallTestsCompleted(); + Assert.IsTrue(runTestCommand.TestRunnersCreated[1].IsStartCalled); + } + + [Test] + public void WhenTestRunCompletedAllFilesAreSaved() + { + context.MockSaveAllFilesCommand.IsSaveAllFilesMethodCalled = false; + runTestCommand.CallTestsCompleted(); + Assert.IsTrue(context.MockSaveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutUnitTestsPadTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutUnitTestsPadTestFixture.cs new file mode 100644 index 0000000000..91f63cedcb --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTestsWithoutUnitTestsPadTestFixture.cs @@ -0,0 +1,57 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTestsWithoutUnitTestsPadTestFixture : RunTestCommandTestFixtureBase + { + MockTestTreeView treeView; + MockCSharpProject project; + + [SetUp] + public void Init() + { + base.InitBase(); + + project = new MockCSharpProject(); + MockBuildProjectBeforeTestRun buildProject = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject); + + treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + + runTestCommand.Owner = treeView; + + context.MockUnitTestsPad = null; + runTestCommand.Run(); + + context.MockUnitTestWorkbench.MakeSafeThreadAsyncMethodCallsWithArguments = true; + TestResult testResult = new TestResult("MyTests.MyTestClass.UnknownTestMethod"); + testResult.ResultType = TestResultType.Failure; + context.MockTestResultsMonitor.FireTestFinishedEvent(testResult); + } + + [Test] + public void TestableConditionGetProjectReturnsSelectedProjectFromTreeView() + { + Assert.AreEqual(project, TestableCondition.GetProject(treeView)); + } + + [Test] + public void OnBeforeTestsRunMethodIsCalled() + { + Assert.IsTrue(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTwoProjectsTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTwoProjectsTestsTestFixture.cs new file mode 100644 index 0000000000..ac8873f378 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/RunTwoProjectsTestsTestFixture.cs @@ -0,0 +1,74 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class RunTwoProjectsTestsTestFixture : RunTestCommandTestFixtureBase + { + TestProject testProject1; + MockCSharpProject project1; + TestProject testProject2; + MockCSharpProject project2; + MockBuildProjectBeforeTestRun buildProject1; + MockBuildProjectBeforeTestRun buildProject2; + + [SetUp] + public void Init() + { + base.InitBase(); + + project1 = new MockCSharpProject(); + testProject1 = + TestProjectHelper.CreateTestProjectWithTestClassAndSingleTestMethod(project1, "testClass1", "testMethod1"); + + project2 = new MockCSharpProject(); + testProject2 = + TestProjectHelper.CreateTestProjectWithTestClassAndSingleTestMethod(project1, "testClass2", "testMethod2"); + + context.MockUnitTestsPad.AddProject(project1); + context.MockUnitTestsPad.AddProject(project2); + context.MockUnitTestsPad.AddTestProject(testProject1); + context.MockUnitTestsPad.AddTestProject(testProject2); + + buildProject1 = new MockBuildProjectBeforeTestRun(); + buildProject2 = new MockBuildProjectBeforeTestRun(); + + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject1); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProject2); + + runTestCommand.Run(); + + buildProject1.FireBuildCompleteEvent(); + runTestCommand.CallTestsCompleted(); + } + + [Test] + public void IsRunningTestReturnsTrueSinceOneTestProject() + { + Assert.IsTrue(AbstractRunTestCommand.IsRunningTest); + } + + [Test] + public void SecondProjectIsBuilt() + { + Assert.IsTrue(buildProject2.IsRunMethodCalled); + } + + [Test] + public void IsRunningTestReturnsFalseAfterSecondProjectTestsHaveAllRun() + { + runTestCommand.CallTestsCompleted(); + Assert.IsFalse(AbstractRunTestCommand.IsRunningTest); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs new file mode 100644 index 0000000000..86aca135c7 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/SelectedTestsTestFixture.cs @@ -0,0 +1,95 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class SelectedTestsTestFixture + { + SelectedTests selectedTests; + MockCSharpProject project; + string namespaceFilter = "MyNamespace.Tests"; + MockClass c; + MockMethod method; + + [SetUp] + public void Init() + { + project = new MockCSharpProject(); + c = new MockClass(); + method = new MockMethod(c); + selectedTests = new SelectedTests(project, namespaceFilter, c, method); + } + + [Test] + public void ProjectPropertyMatchesProjectPassedToConstructor() + { + Assert.AreEqual(project, selectedTests.Project); + } + + [Test] + public void ClassPropertyMatchesClassPassedToConstructor() + { + Assert.AreEqual(c, selectedTests.Class); + } + + [Test] + public void MethodPropertyMatchesMethodPassedToConstructor() + { + Assert.AreEqual(method, selectedTests.Method); + } + + [Test] + public void ProjectsReturnsSingleItemContainingProjectPassedToConstructor() + { + List projects = new List(selectedTests.Projects); + IProject[] expectedProjects = new IProject[] { project }; + + Assert.AreEqual(expectedProjects, projects); + } + + [Test] + public void HasProjectsReturnsTrue() + { + Assert.IsTrue(selectedTests.HasProjects); + } + + [Test] + public void NamespaceFilterPropertyMatchesNamespaceFilterPassedToConstructor() + { + Assert.AreEqual(namespaceFilter, selectedTests.NamespaceFilter); + } + + [Test] + public void RemoveFirstProjectLeavesNoProjects() + { + selectedTests.RemoveFirstProject(); + Assert.AreEqual(0, selectedTests.Projects.Count); + } + + [Test] + public void HasProjectReturnsFalseAfterRemoveFirstProjectCalled() + { + selectedTests.RemoveFirstProject(); + Assert.IsFalse(selectedTests.HasProjects); + } + + [Test] + public void RemovingFirstProjectTwiceDoesNotThrowException() + { + selectedTests.RemoveFirstProject(); + Assert.DoesNotThrow(delegate { selectedTests.RemoveFirstProject(); }); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionLoadedAfterUnitTestsTreeDisposedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionLoadedAfterUnitTestsTreeDisposedTestFixture.cs new file mode 100644 index 0000000000..1bbb790d4c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionLoadedAfterUnitTestsTreeDisposedTestFixture.cs @@ -0,0 +1,35 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class SolutionLoadedAfterUnitTestsTreeDisposedTestFixture + { + DerivedUnitTestsPad pad; + + [SetUp] + public void Init() + { + pad = new DerivedUnitTestsPad(); + pad.Dispose(); + } + + [Test] + public void SolutionLoadedAfterTreeDisposedDoesNotThrowNullReferenceException() + { + Solution solution = new Solution(); + Assert.DoesNotThrow(delegate { pad.CallSolutionLoaded(solution); }); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs index 9a68d98c53..d4a519251d 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs @@ -27,6 +27,7 @@ namespace UnitTesting.Tests.Tree Solution solution; MSBuildBasedProject project; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [TestFixtureSetUp] public void SetUpFixture() @@ -37,6 +38,7 @@ namespace UnitTesting.Tests.Tree [SetUp] public void Init() { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); projectContent = new MockProjectContent(); pad.ProjectContent = projectContent; solution = new Solution(); @@ -166,10 +168,8 @@ namespace UnitTesting.Tests.Tree public void ParserInfoUpdated() { DefaultCompilationUnit newUnit = new DefaultCompilationUnit(pad.ProjectContent); - MockClass mockClass = new MockClass("MyTestFixture"); + MockClass mockClass = new MockClass(pad.ProjectContent, "MyTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); - mockClass.ProjectContent = pad.ProjectContent; - mockClass.SetCompoundClass(mockClass); newUnit.Classes.Add(mockClass); ExtTreeNode rootNode = (ExtTreeNode)pad.TestTreeView.Nodes[0]; @@ -211,7 +211,7 @@ namespace UnitTesting.Tests.Tree // Add a new class to a non-empty namespace so it gets // added to a new namespace node. MockClass mockClass = new MockClass("RootNamespace.MyTestFixture"); - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(testClass); Assert.AreEqual(1, projectNode.Nodes.Count, @@ -240,7 +240,7 @@ namespace UnitTesting.Tests.Tree // Add a new class to a namespace so it gets // added to a new namespace node. MockClass mockClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(testClass); // Get the newly added namespace node. @@ -275,7 +275,7 @@ namespace UnitTesting.Tests.Tree // Add a new class to a non-empty namespace so it gets // added to a new namespace node. MockClass mockClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(testClass); // Expand RootNamespace tree node. @@ -324,7 +324,7 @@ namespace UnitTesting.Tests.Tree // Add a new class to a non-empty namespace so it gets // added to a new namespace node. MockClass mockClass = new MockClass("RootNamespace.Tests.MyTestFixture"); - TestClass testClass = new TestClass(mockClass); + TestClass testClass = new TestClass(mockClass, testFrameworks); projectNode.TestProject.TestClasses.Add(testClass); // Get the root namespace node. diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/StartingDebuggerThrowsExceptionWhenStartingTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/StartingDebuggerThrowsExceptionWhenStartingTestsTestFixture.cs new file mode 100644 index 0000000000..ff5105c961 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/StartingDebuggerThrowsExceptionWhenStartingTestsTestFixture.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class StartingDebuggerThrowsExceptionWhenStartingTestsTestFixture : RunTestWithDebuggerCommandTestFixtureBase + { + [SetUp] + public void Init() + { + InitBase(); + + ApplicationException ex = new ApplicationException(); + debuggerService.MockDebugger.ThrowExceptionOnStart = ex; + runCommand.Run(); + + try { + Assert.Throws( + delegate { buildProject.FireBuildCompleteEvent(); }); + } catch { + // Do nothing. + } + } + + [Test] + public void FiringDebugStoppedEventDoesNotCallTestRunCompletedMethod() + { + context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Clear(); + debuggerService.MockDebugger.FireDebugStoppedEvent(); + + Assert.AreEqual(0, context.MockUnitTestWorkbench.SafeThreadAsyncMethodCalls.Count); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/StopRunningTestsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/StopRunningTestsTestFixture.cs new file mode 100644 index 0000000000..1f8d6a6097 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/StopRunningTestsTestFixture.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class StopRunningTestsTestFixture : RunTestCommandTestFixtureBase + { + bool isUpdatedToolbarMethodCalledBeforeStopMethodCalled; + MockBuildProjectBeforeTestRun buildProjectBeforeTestRun; + MockTestFramework testFramework; + + [SetUp] + public void Init() + { + base.InitBase(); + + MockCSharpProject project = new MockCSharpProject(); + context.MockUnitTestsPad.AddProject(project); + + buildProjectBeforeTestRun = new MockBuildProjectBeforeTestRun(); + context.MockBuildProjectFactory.AddBuildProjectBeforeTestRun(buildProjectBeforeTestRun); + + testFramework = new MockTestFramework(); + context.MockRegisteredTestFrameworks.AddTestFrameworkForProject(project, testFramework); + + runTestCommand.Run(); + + context.MockUnitTestsPad.IsUpdateToolbarMethodCalled = false; + isUpdatedToolbarMethodCalledBeforeStopMethodCalled = context.MockUnitTestsPad.IsUpdateToolbarMethodCalled; + runTestCommand.Stop(); + } + + [Test] + public void IsOnStopMethodCalledReturnsTrue() + { + Assert.IsTrue(runTestCommand.IsOnStopMethodCalled); + } + + [Test] + public void IsRunningTestReturnsFalseAfterStopMethodCalled() + { + Assert.IsFalse(AbstractRunTestCommand.IsRunningTest); + } + + [Test] + public void RunningTestCommandPropertyReturnsNullAfterStopMethodCalled() + { + Assert.IsNull(AbstractRunTestCommand.RunningTestCommand); + } + + [Test] + public void IsUpdatedToolbarMethodCalledIsResetBeforeStopMethodCalled() + { + Assert.IsFalse(isUpdatedToolbarMethodCalledBeforeStopMethodCalled); + } + + [Test] + public void IsUpdatedToolbarMethodCalledAfterStopMethodCalled() + { + Assert.IsTrue(context.MockUnitTestsPad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void BuildCompleteEventFiringDoesNotCauseTestsToRunAfterStopMethodCalled() + { + buildProjectBeforeTestRun.FireBuildCompleteEvent(); + Assert.AreEqual(0, runTestCommand.Helpers.Count); + } + + [Test] + public void ErrorListPadIsDisplayedWhenBuildCompleteEventIsFiredAfterStopMethodCalled() + { + FileName fileName = new FileName("test.cs"); + context.MockTaskService.Add(new Task(fileName, String.Empty, 1, 1, TaskType.Error)); + buildProjectBeforeTestRun.FireBuildCompleteEvent(); + Assert.IsTrue(context.MockUnitTestWorkbench.TypesPassedToGetPadMethod.Contains(typeof(ErrorListPad))); + } + + [Test] + public void StopMethodNotCalledAfterBuildCompleteEventFiresAfterStopMethodCalled() + { + context.MockTestResultsMonitor.IsStopMethodCalled = false; + buildProjectBeforeTestRun.FireBuildCompleteEvent(); + Assert.IsFalse(context.MockTestResultsMonitor.IsStopMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskTestFixture.cs new file mode 100644 index 0000000000..1861162cd4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskTestFixture.cs @@ -0,0 +1,68 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class TestResultFailureTaskTestFixture + { + Task task; + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyNamespace.MyTests"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "Test failed"; + testResult.StackTrace = + "Test Error : MyTest.Test\r\n" + + "at TestResultTask.Create() in c:\\projects\\SharpDevelop\\TestResultTask.cs:line 45\r\n" + + "at MyTest.Test() in c:\\myprojects\\test\\..\\test\\mytest.cs:line 28\r\n" + + ""; + testResult.StackTraceFilePosition = + new FilePosition("c:\\myprojects\\test\\..\\test\\mytest.cs", 28, 1); + task = TestResultTask.Create(testResult, null); + } + + [Test] + public void TaskTypeIsError() + { + Assert.AreEqual(TaskType.Error, task.TaskType); + } + + [Test] + public void TaskMessageEqualsTestResultMessage() + { + Assert.AreEqual("Test failed", task.Description); + } + + [Test] + public void TaskFileNameMatchesFileNameInStackTrace() + { + string expectedFileName = @"c:\myprojects\test\mytest.cs"; + Assert.AreEqual(expectedFileName, task.FileName.ToString()); + } + + [Test] + public void TaskLineNumberIs28WhichIsEqualToNUnitErrorLine() + { + Assert.AreEqual(28, task.Line); + } + + [Test] + public void TaskColumnNumberIsOne() + { + Assert.AreEqual(1, task.Column); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskWithNoMessageTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskWithNoMessageTestFixture.cs new file mode 100644 index 0000000000..cad417b723 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultFailureTaskWithNoMessageTestFixture.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class TestResultFailureTaskWithNoMessageTestFixture + { + Task task; + + [TestFixtureSetUp] + public void SetUpFixture() + { + ResourceManager.Initialize(); + } + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyNamespace.MyTests"); + testResult.ResultType = TestResultType.Failure; + task = TestResultTask.Create(testResult, null); + } + + [Test] + public void TaskMessageEqualsIsTakenFromStringResource() + { + Assert.AreEqual("Test case 'MyNamespace.MyTests' failed.", task.Description); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskTestFixture.cs new file mode 100644 index 0000000000..8e5e765706 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskTestFixture.cs @@ -0,0 +1,67 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class TestResultIgnoreTaskTestFixture + { + Task task; + + [SetUp] + public void Init() + { + string className = "MyNamespace.MyTests"; + TestProject testProject = + TestProjectHelper.CreateTestProjectWithTestClassAndSingleTestMethod(className, "MyTestMethod"); + + TestResult testResult = new TestResult("MyNamespace.MyTests.MyTestMethod"); + testResult.ResultType = TestResultType.Ignored; + testResult.Message = "Test ignored"; + + task = TestResultTask.Create(testResult, testProject); + } + + [Test] + public void TaskTypeIsWarning() + { + Assert.AreEqual(TaskType.Warning, task.TaskType); + } + + [Test] + public void TaskMessageEqualsTestResultMessage() + { + Assert.AreEqual("Test ignored", task.Description); + } + + [Test] + public void TaskFileNameMatchesCompilationUnitFileName() + { + string expectedFileName = @"c:\projects\tests\MyTests.cs"; + Assert.AreEqual(expectedFileName, task.FileName.ToString()); + } + + [Test] + public void TaskLineNumberIs4SameAsMethod() + { + Assert.AreEqual(4, task.Line); + } + + [Test] + public void TaskColumnNumberIs19SameAsMethod() + { + Assert.AreEqual(19, task.Column); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithNoMessageTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithNoMessageTestFixture.cs new file mode 100644 index 0000000000..04dd189cc0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithNoMessageTestFixture.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Resources; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class TestResultIgnoreTaskWithNoMessageTestFixture + { + Task task; + + [TestFixtureSetUp] + public void SetUpFixture() + { + ResourceManager rm = new ResourceManager("UnitTesting.Tests.Strings", GetType().Assembly); + ResourceService.RegisterNeutralStrings(rm); + } + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyNamespace.MyTests"); + testResult.ResultType = TestResultType.Ignored; + task = TestResultTask.Create(testResult, null); + } + + [Test] + public void TaskMessageEqualsIsTakenFromStringResource() + { + Assert.AreEqual("Test case 'MyNamespace.MyTests' was not executed.", task.Description); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithoutMatchingTestMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithoutMatchingTestMethodTestFixture.cs new file mode 100644 index 0000000000..0af7a95297 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestResultIgnoreTaskWithoutMatchingTestMethodTestFixture.cs @@ -0,0 +1,69 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Tree +{ + [TestFixture] + public class TestResultIgnoreTaskWithoutMatchingTestMethodTestFixture + { + Task task; + + [SetUp] + public void Init() + { + MockRegisteredTestFrameworks testFrameworks = new MockRegisteredTestFrameworks(); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + TestClass testClass = new TestClass(c, testFrameworks); + + TestProject testProject = new TestProject(c.Project, c.ProjectContent, testFrameworks); + testProject.TestClasses.Add(testClass); + + TestResult testResult = new TestResult("MyNamespace.MyTests.MyTestMethod"); + testResult.ResultType = TestResultType.Ignored; + testResult.Message = "Test ignored"; + + task = TestResultTask.Create(testResult, testProject); + } + + [Test] + public void TaskTypeIsWarning() + { + Assert.AreEqual(TaskType.Warning, task.TaskType); + } + + [Test] + public void TaskMessageEqualsTestResultMessage() + { + Assert.AreEqual("Test ignored", task.Description); + } + + [Test] + public void TaskFileNameIsNull() + { + Assert.IsNull(task.FileName); + } + + [Test] + public void TaskLineNumberIsZero() + { + Assert.AreEqual(0, task.Line); + } + + [Test] + public void TaskColumnNumberIsZero() + { + Assert.AreEqual(0, task.Column); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/TestableConditionTests.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestableConditionTests.cs similarity index 51% rename from src/AddIns/Analysis/UnitTesting/Test/TestableConditionTests.cs rename to src/AddIns/Analysis/UnitTesting/Test/Tree/TestableConditionTests.cs index b1b5d83dc5..3a7affb3e5 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/TestableConditionTests.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TestableConditionTests.cs @@ -12,19 +12,30 @@ using ICSharpCode.SharpDevelop.Project; using ICSharpCode.UnitTesting; using NUnit.Framework; using System; +using System.Collections.Generic; using UnitTesting.Tests.Utils; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Tree { [TestFixture] public class TestableConditionTests { - [SetUp] + TestableCondition testableCondition; + MockRegisteredTestFrameworks testFrameworks; + + [TestFixtureSetUp] public void SetUpFixture() { ResourceManager.Initialize(); } + [SetUp] + public void Init() + { + testFrameworks = new MockRegisteredTestFrameworks(); + testableCondition = new TestableCondition(testFrameworks); + } + [Test] public void GetMemberFromNullOwner() { @@ -52,7 +63,6 @@ namespace UnitTesting.Tests [Test] public void IsValidFromNullOwner() { - TestableCondition testableCondition = new TestableCondition(); Assert.IsFalse(testableCondition.IsValid(null, null)); } @@ -100,7 +110,7 @@ namespace UnitTesting.Tests [Test] public void GetMemberFromMemberNode() { - MockMethod mockMethod = new MockMethod(); + MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); MockMemberNode memberNode = new MockMemberNode(mockMethod); Assert.IsTrue(Object.ReferenceEquals(mockMethod, TestableCondition.GetMember(memberNode))); @@ -109,22 +119,20 @@ namespace UnitTesting.Tests [Test] public void GetProjectFromMemberNode() { - MockMethod mockMethod = new MockMethod(); MSBuildBasedProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); MockProjectContent mockProjectContent = new MockProjectContent(); mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; - mockMethod.DeclaringType = mockClass; + MockClass mockClass = new MockClass(mockProjectContent); + MockMethod mockMethod = new MockMethod(mockClass); MockMemberNode memberNode = new MockMemberNode(mockMethod); - + Assert.IsTrue(Object.ReferenceEquals(project, TestableCondition.GetProject(memberNode))); } [Test] public void GetClassFromClassNode() { - MockClass mockClass = new MockClass(); + MockClass mockClass = new MockClass(new MockProjectContent()); ClassNode classNode = new ClassNode(null, mockClass); Assert.IsTrue(Object.ReferenceEquals(mockClass, TestableCondition.GetClass(classNode))); @@ -134,20 +142,19 @@ namespace UnitTesting.Tests public void GetProjectFromClassNode() { MSBuildBasedProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); MockProjectContent mockProjectContent = new MockProjectContent(); mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; + MockClass mockClass = new MockClass(mockProjectContent); ClassNode classNode = new ClassNode(project, mockClass); - + Assert.IsTrue(Object.ReferenceEquals(project, TestableCondition.GetProject(classNode))); } [Test] public void GetMemberFromClassMemberBookmark() { - MockMethod mockMethod = new MockMethod(); - mockMethod.Region = new DomRegion(1,1); + MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); + mockMethod.Region = new DomRegion(1, 1); ClassMemberBookmark bookmark = new ClassMemberBookmark(mockMethod); Assert.IsTrue(Object.ReferenceEquals(mockMethod, TestableCondition.GetMember(bookmark))); @@ -157,7 +164,7 @@ namespace UnitTesting.Tests public void GetClassFromClassBookmark() { MockClass mockClass = new MockClass(); - mockClass.Region = new DomRegion(1,1); + mockClass.Region = new DomRegion(1, 1); ClassBookmark bookmark = new ClassBookmark(mockClass); Assert.IsTrue(Object.ReferenceEquals(mockClass, TestableCondition.GetClass(bookmark))); @@ -170,111 +177,10 @@ namespace UnitTesting.Tests [Test] public void GetProjectWhenProjectContentIsNull() { - MockClass mockClass = new MockClass(); + MockClass mockClass = new MockClass(new MockProjectContent()); ClassNode classNode = new ClassNode(null, mockClass); Assert.IsNull(TestableCondition.GetProject(classNode)); } - - /// - /// Tests references to class.ProjectContent when - /// it is null. - /// - [Test] - public void IsValidWhenProjectContentIsNull() - { - MockClass mockClass = new MockClass(); - ClassNode classNode = new ClassNode(null, mockClass); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsFalse(testableCondition.IsValid(classNode, null)); - } - - /// - /// When class.ProjectContent.Project == null the - /// TestableCondition.IsValid should return false. - /// - [Test] - public void IsValidWhenProjectIsNull() - { - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockClass.ProjectContent = mockProjectContent; - ClassNode classNode = new ClassNode(null, mockClass); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsFalse(testableCondition.IsValid(classNode, null)); - } - - /// - /// Tests what happens when the class.ProjectContent.Language - /// is null. - /// - [Test] - public void IsValidWhenLanguageIsNull() - { - MSBuildBasedProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockClass.ProjectContent = mockProjectContent; - ClassNode classNode = new ClassNode(project, mockClass); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsFalse(testableCondition.IsValid(classNode, null)); - } - - /// - /// Tests what happens when the - /// class.ProjectContent.Language.NameComparer is null. - /// - [Test] - public void IsValidWhenNameComparerIsNull() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = new LanguageProperties(null); - mockClass.ProjectContent = mockProjectContent; - ClassNode classNode = new ClassNode(project, mockClass); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsFalse(testableCondition.IsValid(classNode, null)); - } - - [Test] - public void IsValidWhenMethodHasTestAttribute() - { - MockMethod mockMethod = new MockMethod(); - mockMethod.Attributes.Add(new MockAttribute("Test")); - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = LanguageProperties.None; - mockClass.ProjectContent = mockProjectContent; - mockMethod.DeclaringType = mockClass; - MockMemberNode memberNode = new MockMemberNode(mockMethod); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsTrue(testableCondition.IsValid(memberNode, null)); - } - - [Test] - public void IsValidWhenClassHasTestFixtureAttribute() - { - IProject project = new MockCSharpProject(); - MockClass mockClass = new MockClass(); - mockClass.Attributes.Add(new MockAttribute("TestFixture")); - MockProjectContent mockProjectContent = new MockProjectContent(); - mockProjectContent.Project = project; - mockProjectContent.Language = LanguageProperties.None; - mockClass.ProjectContent = mockProjectContent; - ClassNode classNode = new ClassNode(project, mockClass); - - TestableCondition testableCondition = new TestableCondition(); - Assert.IsTrue(testableCondition.IsValid(classNode, null)); - } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeContextMenuTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeContextMenuTestFixture.cs index 9beb413944..3ad392ade6 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeContextMenuTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeContextMenuTestFixture.cs @@ -34,7 +34,7 @@ namespace UnitTesting.Tests.Tree treeView.ContextMenuStrip = menuStrip; // Add a root node to the tree. - TestProject project = new TestProject(new MockCSharpProject(), new MockProjectContent()); + TestProject project = new TestProject(new MockCSharpProject(), new MockProjectContent(), new MockTestFrameworksWithNUnitFrameworkSupport()); TestProjectTreeNode node = new TestProjectTreeNode(project); node.AddTo(treeView); diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeSortingTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeSortingTestFixture.cs index 2c25712b89..e0a0359bdd 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeSortingTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TreeNodeSortingTestFixture.cs @@ -33,6 +33,7 @@ namespace UnitTesting.Tests.Tree TestClassTreeNode testFixtureNode; MockProjectContent projectContent; TestProject testProject; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void Init() @@ -54,13 +55,12 @@ namespace UnitTesting.Tests.Tree // Add two methods to the test class only // one of which has test attributes. - MockMethod testMethod = new MockMethod("NameExists"); + MockMethod testMethod = new MockMethod(testClass.Class, "NameExists"); testMethod.Attributes.Add(new MockAttribute("Test")); - testMethod.DeclaringType = testClass.Class; testClass.Class.Methods.Add(testMethod); - - // Init mock project content to be returned. - treeView = new DummyParserServiceTestTreeView(); + + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + treeView = new DummyParserServiceTestTreeView(testFrameworks); treeView.ProjectContentForProject = projectContent; // Load the projects into the test tree view. @@ -224,9 +224,8 @@ namespace UnitTesting.Tests.Tree public void NewClassMethodAdded() { MockClass c = (MockClass)testFixtureNode.Class; - MockMethod method = new MockMethod("Apple"); + MockMethod method = new MockMethod(c, "Apple"); method.Attributes.Add(new MockAttribute("Test")); - method.DeclaringType = c; c.SetCompoundClass(c); c.Methods.Add(method); @@ -247,10 +246,9 @@ namespace UnitTesting.Tests.Tree /// TestClass CreateTestClass(string name) { - MockClass c = new MockClass(name); + MockClass c = new MockClass(projectContent, name); c.Attributes.Add(new MockAttribute("TestFixture")); - c.ProjectContent = projectContent; - return new TestClass(c); + return new TestClass(c, testFrameworks); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs index 64e0a28124..67dc974cf3 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Tree/TwoTestClassesInDifferentNamespacesTestFixture.cs @@ -36,11 +36,11 @@ namespace UnitTesting.Tests.Tree ExtTreeNode projectNamespaceNode; TestProject testProject; MockProjectContent projectContent; + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; [SetUp] public void SetUp() { - // Create solution. solution = new Solution(); // Create a project to display in the test tree view. @@ -52,18 +52,16 @@ namespace UnitTesting.Tests.Tree // Add a test class with a TestFixture attributes. projectContent = new MockProjectContent(); projectContent.Language = LanguageProperties.None; - testClass1 = new MockClass("Project.Tests.MyTestFixture"); + testClass1 = new MockClass(projectContent, "Project.Tests.MyTestFixture"); testClass1.Attributes.Add(new MockAttribute("TestFixture")); - testClass1.ProjectContent = projectContent; projectContent.Classes.Add(testClass1); - testClass2 = new MockClass("Project.MyTestFixture"); + testClass2 = new MockClass(projectContent, "Project.MyTestFixture"); testClass2.Attributes.Add(new MockAttribute("TestFixture")); - testClass2.ProjectContent = projectContent; projectContent.Classes.Add(testClass2); - // Init mock project content to be returned. - dummyTreeView = new DummyParserServiceTestTreeView(); + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks); dummyTreeView.ProjectContentForProject = projectContent; // Load the projects into the test tree view. @@ -128,7 +126,7 @@ namespace UnitTesting.Tests.Tree TestClass testClass2 = testProject.TestClasses["Project.MyTestFixture"]; testClass2.Result = TestResultType.Success; - + ExpandRootNode(); Assert.AreEqual(TestTreeViewImageListIndex.TestFailed, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); } @@ -139,10 +137,9 @@ namespace UnitTesting.Tests.Tree ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); - MockClass mockClass = new MockClass("Project.Tests.MyNewTestFixture"); + MockClass mockClass = new MockClass(projectContent, "Project.Tests.MyNewTestFixture"); mockClass.Attributes.Add(new MockAttribute("TestFixture")); - mockClass.ProjectContent = projectContent; - TestClass newTestClass = new TestClass(mockClass); + TestClass newTestClass = new TestClass(mockClass, testFrameworks); testProject.TestClasses.Add(newTestClass); ExtTreeNode newTestClassNode = null; @@ -153,7 +150,7 @@ namespace UnitTesting.Tests.Tree } } newTestClass.Result = TestResultType.Failure; - + // New test class node should be added to the test namespace node. Assert.AreEqual(2, testsNamespaceNode.Nodes.Count); Assert.IsNotNull(newTestClassNode); @@ -177,7 +174,7 @@ namespace UnitTesting.Tests.Tree ExtTreeNode projectNamespaceNode = ExpandProjectNamespaceNode(); ExtTreeNode testsNamespaceNode = ExpandTestsNamespaceNode(); - + // Reset the new TestClass result after it was modified // in the AddNewClass call. TestClass newTestClass = testProject.TestClasses["Project.Tests.MyNewTestFixture"]; @@ -195,14 +192,14 @@ namespace UnitTesting.Tests.Tree } } testClass.Result = TestResultType.Failure; - + Assert.AreEqual(1, testsNamespaceNode.Nodes.Count); Assert.IsNull(testClassNode); // Make sure the namespace node image index is NOT affected by the // test class just removed. Assert.AreEqual(TestTreeViewImageListIndex.TestNotRun, (TestTreeViewImageListIndex)testsNamespaceNode.SelectedImageIndex); - + // Check that the test class does not affect the project namespace node // image index either. Assert.AreEqual(TestTreeViewImageListIndex.TestNotRun, (TestTreeViewImageListIndex)projectNamespaceNode.ImageIndex); @@ -230,7 +227,7 @@ namespace UnitTesting.Tests.Tree } } Assert.IsNull(testClassNode); - + // Project namespace node should only have one child node. Assert.AreEqual(1, projectNamespaceNode.Nodes.Count); Assert.AreEqual("MyTestFixture", projectNamespaceNode.Nodes[0].Text); diff --git a/src/AddIns/Analysis/UnitTesting/Test/UnitTestCommandLineTests.cs b/src/AddIns/Analysis/UnitTesting/Test/UnitTestCommandLineTests.cs deleted file mode 100644 index a5eb622657..0000000000 --- a/src/AddIns/Analysis/UnitTesting/Test/UnitTestCommandLineTests.cs +++ /dev/null @@ -1,228 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.Core; -using ICSharpCode.SharpDevelop.Project; -using ICSharpCode.UnitTesting; -using NUnit.Framework; -using UnitTesting.Tests.Utils; - -namespace UnitTesting.Tests -{ - [TestFixture] - public class UnitTestCommandLineTests - { - CompilableProject project; - UnitTestApplicationStartHelper helper; - - [SetUp] - public void SetUp() - { - project = new MockCSharpProject(); - project.FileName = @"C:\Projects\MyTests\MyTests.csproj"; - project.AssemblyName = "MyTests"; - project.OutputType = OutputType.Library; - project.SetProperty("OutputPath", "."); // don't create bin/Debug - project.SetProperty("TargetFrameworkVersion", "v4.0"); - helper = new UnitTestApplicationStartHelper(); - } - - [Test] - public void TestResultsFile() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.Results = @"C:\results.txt"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /results=\"C:\\results.txt\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void NoLogo() - { - helper.Initialize(project, null, null); - helper.NoLogo = true; - helper.ShadowCopy = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nologo"; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void NoShadowCopy() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = false; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /noshadow"; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void NoThread() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.NoThread = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nothread"; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void NoDots() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.NoDots = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /nodots"; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void Labels() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.Labels = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /labels"; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void TestFixture() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.Fixture = "TestFixture"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void TestNamespace() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.NamespaceFilter = "TestFixture"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void XmlOutputFile() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.XmlOutputFile = @"C:\NUnit.xml"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /xml=\"C:\\NUnit.xml\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void TestMethod() - { - helper.Initialize(project, null, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.Fixture = "TestFixture"; - helper.Test = "Test"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void TestMethodSpecifiedInInitialize() - { - MockClass testFixture = new MockClass("TestFixture"); - MockMethod testMethod = new MockMethod("Test"); - helper.Initialize(project, testFixture, testMethod); - helper.NoLogo = false; - helper.ShadowCopy = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"TestFixture.Test\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void TestNamespaceSpecifiedInInitialize() - { - helper.Initialize(project, "Project.MyTests"); - helper.NoLogo = false; - helper.ShadowCopy = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"Project.MyTests\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void FullCommandLine() - { - helper.Initialize(project, null, null); - helper.NoLogo = true; - helper.ShadowCopy = true; - - FileUtility.ApplicationRootPath = @"C:\SharpDevelop"; - - string expectedFullCommandLine = "\"C:\\SharpDevelop\\bin\\Tools\\NUnit\\nunit-console-x86.exe\" \"C:\\Projects\\MyTests\\MyTests.dll\" /nologo"; - Assert.AreEqual(expectedFullCommandLine, helper.GetCommandLine()); - } - - /// - /// Tests that a space is appended between the items added - /// to the UnitTestApplicationStartHelper.Assemblies - /// when the command line is generated. - /// - [Test] - public void SecondAssemblySpecified() - { - helper.Initialize(project, null, null); - helper.Assemblies.Add("SecondAssembly.dll"); - helper.NoLogo = false; - helper.ShadowCopy = true; - helper.Results = @"C:\results.txt"; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" \"SecondAssembly.dll\" /results=\"C:\\results.txt\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - - [Test] - public void GetProject() - { - helper.Initialize(project, null, null); - Assert.AreSame(project, helper.Project); - } - - [Test] - public void TestInnerClassSpecifiedInInitialize() - { - MockClass testFixture = new MockClass("MyTests.TestFixture.InnerTest", "MyTests.TestFixture+InnerTest"); - helper.Initialize(project, testFixture, null); - helper.NoLogo = false; - helper.ShadowCopy = true; - - string expectedCommandLine = "\"C:\\Projects\\MyTests\\MyTests.dll\" /run=\"MyTests.TestFixture+InnerTest\""; - Assert.AreEqual(expectedCommandLine, helper.GetArguments()); - } - } -} diff --git a/src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj b/src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj index 029481fdc3..20212171c7 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj +++ b/src/AddIns/Analysis/UnitTesting/Test/UnitTesting.Tests.csproj @@ -60,7 +60,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -71,25 +89,131 @@ + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SharpDevelop.exe Always @@ -99,10 +223,7 @@ - - - @@ -112,8 +233,6 @@ - - @@ -128,6 +247,7 @@ + {1F261725-6318-4434-A1B1-6C70CE4CD324} UnitTesting @@ -144,6 +264,7 @@ {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} ICSharpCode.SharpDevelop.Dom + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestCommand.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestCommand.cs new file mode 100644 index 0000000000..cc42140a5b --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestCommand.cs @@ -0,0 +1,112 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class DerivedRunTestCommand : AbstractRunTestCommand + { + bool onBeforeRunTestsMethodCalled; + bool onAfterRunTestsMethodCalled; + AbstractRunTestCommand runningTestCommandWhenOnBeforeRunCalled; + bool runningTestWhenOnBeforeRunCalled; + bool onStopMethodCalled; + List helpers = new List(); + List testRunnersCreated = new List(); + + public DerivedRunTestCommand(IRunTestCommandContext context) + : base(context) + { + } + + public bool IsOnBeforeRunTestsMethodCalled { + get { return onBeforeRunTestsMethodCalled; } + } + + public void CallOnBeforeRunTestsMethod() + { + OnBeforeRunTests(); + } + + protected override void OnBeforeRunTests() + { + onBeforeRunTestsMethodCalled = true; + runningTestCommandWhenOnBeforeRunCalled = AbstractRunTestCommand.RunningTestCommand; + runningTestWhenOnBeforeRunCalled = AbstractRunTestCommand.IsRunningTest; + } + + protected override ITestRunner CreateTestRunner(IProject project) + { + MockTestRunner testRunner = new MockTestRunner(); + testRunnersCreated.Add(testRunner); + return testRunner; + } + + public List TestRunnersCreated { + get { return testRunnersCreated; } + } + + protected override void RunTests(NUnitConsoleApplication helper) + { + helpers.Add(helper); + } + + public List Helpers { + get { return helpers; } + } + + public AbstractRunTestCommand RunningTestCommandPropertyWhenOnBeforeRunCalled { + get { return runningTestCommandWhenOnBeforeRunCalled; } + } + + public bool IsRunningTestPropertyWhenOnBeforeRunCalled { + get { return runningTestWhenOnBeforeRunCalled; } + } + + public bool IsOnStopMethodCalled { + get { return onStopMethodCalled; } + } + + protected override void OnStop() + { + onStopMethodCalled = true; + } + + public Action ShowResultAction { + get { return ShowResult; } + } + + public void CallTestsCompleted() + { + base.TestRunCompleted(); + } + + public bool IsOnAfterRunTestsMethodCalled { + get { return onAfterRunTestsMethodCalled; } + } + + public void CallOnAfterRunTestsMethod() + { + OnAfterRunTests(); + } + + protected override void OnAfterRunTests() + { + onAfterRunTestsMethodCalled = true; + } + + public ITestRunner CallCreateTestRunner(IProject project) + { + return CreateTestRunner(project); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestInPadCommand.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestInPadCommand.cs new file mode 100644 index 0000000000..27a7f9310f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestInPadCommand.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class DerivedRunTestInPadCommand : RunTestInPadCommand + { + public DerivedRunTestInPadCommand(IRunTestCommandContext context) + : base(context) + { + } + + public Action GetCallRunTestCompletedAction() + { + Action action = base.TestRunCompleted; + return action; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestWithDebuggerCommand.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestWithDebuggerCommand.cs new file mode 100644 index 0000000000..b55a8b3e93 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedRunTestWithDebuggerCommand.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class DerivedRunTestWithDebuggerCommand : RunTestWithDebuggerCommand + { + public DerivedRunTestWithDebuggerCommand(IRunTestCommandContext context) + : base(context) + { + } + + public Action GetCallRunTestCompletedAction() + { + Action action = base.TestRunCompleted; + return action; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedTestTreeView.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedTestTreeView.cs index 767bdb125f..345988003c 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedTestTreeView.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedTestTreeView.cs @@ -17,6 +17,11 @@ namespace UnitTesting.Tests.Utils /// public class DerivedTestTreeView : TestTreeView { + public DerivedTestTreeView() + : base(new MockTestFrameworksWithNUnitFrameworkSupport()) + { + } + /// /// Calls the base class's OnBeforeSelect method. /// diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedUnitTestsPad.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedUnitTestsPad.cs index 57d2ceb250..480f442d06 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedUnitTestsPad.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DerivedUnitTestsPad.cs @@ -29,11 +29,13 @@ namespace UnitTesting.Tests.Utils DummyParserServiceTestTreeView treeView = new DummyParserServiceTestTreeView(); public DerivedUnitTestsPad(Solution openSolution) + : base(new MockTestFrameworksWithNUnitFrameworkSupport()) { this.openSolution = openSolution; } public DerivedUnitTestsPad() + : this(null) { } @@ -42,9 +44,7 @@ namespace UnitTesting.Tests.Utils /// derived test tree view. /// public MockProjectContent ProjectContent { - get { - return projectContent; - } + get { return projectContent; } set { projectContent = value; treeView.ProjectContentForProject = projectContent; @@ -52,15 +52,11 @@ namespace UnitTesting.Tests.Utils } public bool GetOpenSolutionCalled { - get { - return getOpenSolutionCalled; - } + get { return getOpenSolutionCalled; } } public bool IsParserLoadingSolutionCalled { - get { - return isParserLoadingSolutionCalled; - } + get { return isParserLoadingSolutionCalled; } } /// @@ -69,9 +65,7 @@ namespace UnitTesting.Tests.Utils /// called. This ensures we do not miss this event. /// public bool LoadSolutionProjectsThreadEndedHandled { - get { - return loadSolutionProjectsThreadEndedHandled; - } + get { return loadSolutionProjectsThreadEndedHandled; } } public void CallSolutionLoaded(Solution solution) @@ -133,7 +127,7 @@ namespace UnitTesting.Tests.Utils /// Returns a dummy tree view where we can mock the /// IProjectContent that will be used by the TestTreeView. /// - protected override TestTreeView CreateTestTreeView() + protected override TestTreeView CreateTestTreeView(IRegisteredTestFrameworks testFrameworks) { return treeView; } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/DummyParserServiceTestTreeView.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/DummyParserServiceTestTreeView.cs index 39f5544c88..ec5dcd7673 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/DummyParserServiceTestTreeView.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/DummyParserServiceTestTreeView.cs @@ -20,17 +20,23 @@ namespace UnitTesting.Tests.Utils { IProjectContent projectContent; + public DummyParserServiceTestTreeView(IRegisteredTestFrameworks testFrameworks) + : base(testFrameworks) + { + } + + public DummyParserServiceTestTreeView() + : this(new MockTestFrameworksWithNUnitFrameworkSupport()) + { + } + /// /// Gets or sets the project content that will be returned from the /// GetProjectContent method. /// public IProjectContent ProjectContentForProject { - get { - return projectContent; - } - set { - projectContent = value; - } + get { return projectContent; } + set { projectContent = value; } } public override IProjectContent GetProjectContent(IProject project) diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/JumpedToFile.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/JumpedToFile.cs new file mode 100644 index 0000000000..d251432cf5 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/JumpedToFile.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + + +using System; + +namespace UnitTesting.Tests.Utils +{ + public class JumpedToFile + { + string fileName = String.Empty; + int line = -2; + int col = -2; + + public JumpedToFile(string fileName, int line, int col) + { + this.fileName = fileName; + this.line = line; + this.col = col; + } + + public override string ToString() + { + return String.Format("File: {0} Line: {1} Col: {2}", fileName, line, col); + } + + public override bool Equals(object obj) + { + JumpedToFile rhs = obj as JumpedToFile; + if (rhs != null) { + return (fileName == rhs.fileName) && + (line == rhs.line) && + (col == rhs.col); + } + return false; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockAddInTree.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockAddInTree.cs new file mode 100644 index 0000000000..61cf7e1bbf --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockAddInTree.cs @@ -0,0 +1,37 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockAddInTree : IAddInTree + { + Dictionary treeItems = new Dictionary(); + + public MockAddInTree() + { + } + + public List BuildItems(string path, object caller) + { + object obj; + if (treeItems.TryGetValue(path, out obj)) { + return obj as List; + } + throw new TreePathNotFoundException(path); + } + + public void AddItems(string path, List items) + { + treeItems.Add(path, items); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildOptions.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildOptions.cs new file mode 100644 index 0000000000..4f8cf8d75e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildOptions.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockBuildOptions : IBuildOptions + { + bool showErrorListAfterBuild = true; + + public bool ShowErrorListAfterBuild { + get { return showErrorListAfterBuild; } + set { showErrorListAfterBuild = value; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectBeforeTestRun.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectBeforeTestRun.cs new file mode 100644 index 0000000000..5f02818ca4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectBeforeTestRun.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockBuildProjectBeforeTestRun : BuildProjectBeforeTestRun + { + IProject project; + bool runMethodCalled; + + public MockBuildProjectBeforeTestRun() + : base(null) + { + } + + public IProject Project { + get { return project; } + set { project = value; } + } + + public void FireBuildCompleteEvent() + { + base.OnBuildComplete(new EventArgs()); + } + + public override void Run() + { + runMethodCalled = true; + LastBuildResults = new BuildResults(); + } + + public bool IsRunMethodCalled { + get { return runMethodCalled; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectFactory.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectFactory.cs new file mode 100644 index 0000000000..5f922b745d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockBuildProjectFactory.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockBuildProjectFactory : IBuildProjectFactory + { + List buildProjectInstances = new List(); + + public BuildProjectBeforeTestRun CreateBuildProjectBeforeTestRun(IProject project) + { + MockBuildProjectBeforeTestRun buildProject = RemoveBuildProjectInstance(); + if (buildProject != null) { + buildProject.Project = project; + } + return buildProject; + } + + MockBuildProjectBeforeTestRun RemoveBuildProjectInstance() + { + if (buildProjectInstances.Count > 0) { + MockBuildProjectBeforeTestRun buildProject = buildProjectInstances[0]; + buildProjectInstances.RemoveAt(0); + return buildProject; + } + return null; + } + + public void AddBuildProjectBeforeTestRun(MockBuildProjectBeforeTestRun buildBeforeTestRun) + { + buildProjectInstances.Add(buildBeforeTestRun); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs index 25af46775b..3beebe6c3a 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockCSharpProject.cs @@ -5,34 +5,48 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Internal.Templates; using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Internal.Templates; using ICSharpCode.SharpDevelop.Project; namespace UnitTesting.Tests.Utils { public class MockCSharpProject : CompilableProject { + bool saved; + public MockCSharpProject() - : this(new Solution(), "Dummy") + : this(new Solution(), "MyTests") { } public MockCSharpProject(Solution solution, string name) : base(new ProjectCreateInformation { - Solution = solution, - ProjectName = name, - OutputProjectFileName = "c:\\temp\\" + name + ".csproj" - }) + Solution = solution, + ProjectName = name, + TargetFramework = "v4.0", + OutputProjectFileName = "c:\\projects\\" + name + "\\" + name + ".csproj" + }) { + OutputType = OutputType.Library; } public override string Language { get { return "C#"; } } - public override ICSharpCode.SharpDevelop.Dom.LanguageProperties LanguageProperties { - get { return ICSharpCode.SharpDevelop.Dom.LanguageProperties.CSharp; } + public override LanguageProperties LanguageProperties { + get { return LanguageProperties.CSharp; } + } + + public bool IsSaved { + get { return saved; } + } + + public override void Save(string fileName) + { + saved = true; } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockClass.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockClass.cs index ec4513653b..02f9752ed3 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockClass.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockClass.cs @@ -6,397 +6,131 @@ // using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; using System; using System.Collections.Generic; namespace UnitTesting.Tests.Utils { - public class MockClass : IClass + public class MockClass : DefaultClass { - IProjectContent projectContent; - DomRegion region = DomRegion.Empty; - IList attributes = new List(); - IList methods = new List(); - IList innerClasses = new List(); - string fullyQualifiedName = String.Empty; - string name = String.Empty; - string ns = String.Empty; + string dotNetName; IClass compoundClass; - IClass baseClass; - string dotNetName = String.Empty; - IClass declaringType; public MockClass() + : this(String.Empty) { } - public MockClass(string fullyQualifiedName) : this(fullyQualifiedName, fullyQualifiedName) + public MockClass(IProjectContent projectContent) + : this(projectContent, String.Empty) { } - public MockClass(string fullyQualifiedName, string dotNetName) + public MockClass(IProjectContent projectContent, string fullyQualifiedName) + : this(projectContent, fullyQualifiedName, null) { - FullyQualifiedName = fullyQualifiedName; - this.dotNetName = dotNetName; } - public override string ToString() + public MockClass(string fullyQualifiedName) + : this(fullyQualifiedName, fullyQualifiedName) { - return dotNetName; - } - - public string FullyQualifiedName { - get { return fullyQualifiedName; } - set { - fullyQualifiedName = value; - int index = fullyQualifiedName.LastIndexOf('.'); - if (index > 0) { - name = fullyQualifiedName.Substring(index + 1); - ns = fullyQualifiedName.Substring(0, index); - } else { - name = fullyQualifiedName; - } - } - } - - public string Name { - get { return name; } - set { name = value; } - } - - public string Namespace { - get { return ns; } - set { ns = value; } - } - - public ClassType ClassType { - get { return ClassType.Class; } - } - - public IProjectContent ProjectContent { - get { return projectContent; } - set { projectContent = value; } - } - - public DomRegion Region { - get { return region; } - set { region = value; } - } - - public IList Methods { - get { return methods; } - } - - public IClass BaseClass { - get { return baseClass; } - set { baseClass = value; } - } - - public ModifierEnum Modifiers { - get { return ModifierEnum.None; } - set { } } - public IList Attributes { - get { return attributes; } + public MockClass(string fullyQualifiedName, string dotNetName) + : this(fullyQualifiedName, dotNetName, null) + { } - public IClass GetCompoundClass() + public MockClass(string fullyQualifiedName, string dotNetName, IClass declaringType) + : this(new MockProjectContent(), fullyQualifiedName, dotNetName, declaringType) { - return compoundClass; } - public void SetCompoundClass(IClass c) + public MockClass(IProjectContent projectContent, string fullyQualifiedName, IClass declaringType) + : this(projectContent, fullyQualifiedName, fullyQualifiedName, declaringType) { - compoundClass = c; } - public IReturnType DefaultReturnType { - get { - throw new NotImplementedException(); + public MockClass(IProjectContent projectContent, string fullyQualifiedName, string dotNetName, IClass declaringType) + : base(new DefaultCompilationUnit(projectContent), declaringType) + { + this.FullyQualifiedName = fullyQualifiedName; + this.dotNetName = dotNetName; + + if (declaringType != null) { + declaringType.InnerClasses.Add(this); } } - public string DotNetName { + public override string DotNetName { get { return dotNetName; } } - public ICompilationUnit CompilationUnit { - get { - throw new NotImplementedException(); - } - } - - public IUsingScope UsingScope { - get { - throw new NotImplementedException(); - } - } - - public DomRegion BodyRegion { - get { - throw new NotImplementedException(); - } - } - - public IList BaseTypes { - get { - throw new NotImplementedException(); - } - } - - public IList InnerClasses { - get { return innerClasses; } - } - - public IList Fields { - get { - throw new NotImplementedException(); - } - } - - public IList Properties { - get { - throw new NotImplementedException(); - } - } - - public IList Events { - get { - throw new NotImplementedException(); - } - } - - public IList TypeParameters { - get { - throw new NotImplementedException(); - } - } - - public IEnumerable ClassInheritanceTree { - get { - throw new NotImplementedException(); - } - } - - public IEnumerable ClassInheritanceTreeClassesOnly { - get { - throw new NotImplementedException(); - } - } - - public IReturnType BaseType { - get { - throw new NotImplementedException(); - } - } - - public bool HasPublicOrInternalStaticMembers { - get { - throw new NotImplementedException(); - } - } - - public bool HasExtensionMethods { - get { - throw new NotImplementedException(); - } - } - - public bool IsPartial { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public IClass DeclaringType { - get { return declaringType; } - set { declaringType = value; } - } - - public string Documentation { - get { - throw new NotImplementedException(); - } - } - - public bool IsAbstract { - get { - throw new NotImplementedException(); - } - } - - public bool IsSealed { - get { - throw new NotImplementedException(); - } - } - - public bool IsStatic { - get { - throw new NotImplementedException(); - } - } - - public bool IsConst { - get { - throw new NotImplementedException(); - } - } - - public bool IsVirtual { - get { - throw new NotImplementedException(); - } - } - - public bool IsPublic { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtected { - get { - throw new NotImplementedException(); - } - } - - public bool IsPrivate { - get { - throw new NotImplementedException(); - } - } - - public bool IsInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsReadonly { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedAndInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedOrInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsOverride { - get { - throw new NotImplementedException(); - } - } - - public bool IsOverridable { - get { - throw new NotImplementedException(); - } - } - - public bool IsNew { - get { - throw new NotImplementedException(); - } - } - - public bool IsSynthetic { - get { - throw new NotImplementedException(); - } - } - - public object UserData { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public bool IsFrozen { - get { - throw new NotImplementedException(); - } - } - - public IReturnType GetBaseType(int index) + public void SetDotNetName(string name) { - throw new NotImplementedException(); + dotNetName = name; } - public IClass GetInnermostClass(int caretLine, int caretColumn) - { - throw new NotImplementedException(); + public MockProjectContent MockProjectContent { + get { return ProjectContent as MockProjectContent; } } - public List GetAccessibleTypes(IClass callingClass) - { - throw new NotImplementedException(); + public IProject Project { + get { return ProjectContent.Project as IProject; } } - public IMember SearchMember(string memberName, LanguageProperties language) + public static MockClass CreateMockClassWithoutAnyAttributes() { - throw new NotImplementedException(); + return CreateMockClassWithAttributes(new MockAttribute[0]); } - public bool IsTypeInInheritanceTree(IClass possibleBaseClass) + public static MockClass CreateMockClassWithAttributes(IList attributes) { - throw new NotImplementedException(); + MockClass mockClass = new MockClass(); + mockClass.MockProjectContent.Project = new MockCSharpProject(); + mockClass.MockProjectContent.Classes.Add(mockClass); + + foreach (MockAttribute attribute in attributes) { + mockClass.Attributes.Add(attribute); + } + return mockClass; } - public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree) + public static MockClass CreateMockClassWithAttribute(MockAttribute attribute) { - throw new NotImplementedException(); + List attributes = new List(); + attributes.Add(attribute); + + return CreateMockClassWithAttributes(attributes); } - public void Freeze() + public static MockClass CreateClassWithBaseType(string baseTypeName) { - throw new NotImplementedException(); + MockClass baseType = MockClass.CreateMockClassWithoutAnyAttributes(); + baseType.FullyQualifiedName = baseTypeName; + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.BaseTypes.Add(new DefaultReturnType(baseType)); + return c; } - public int CompareTo(object obj) + public void SetCompoundClass(IClass c) { - throw new NotImplementedException(); + this.compoundClass = c; } - public bool HasCompoundClass { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public IEnumerable AllMembers { - get { - throw new NotImplementedException(); + protected override IReturnType CreateDefaultReturnType() + { + if (compoundClass != null) { + return new DefaultReturnType(compoundClass); } + return base.CreateDefaultReturnType(); } - public EntityType EntityType { - get { return EntityType.Class; } - } - - public bool AddDefaultConstructorIfRequired { - get { - throw new NotImplementedException(); - } + public void AddBaseClass(IClass baseClass) + { + DefaultReturnType returnType = new DefaultReturnType(baseClass); + BaseTypes.Add(returnType); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebugger.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebugger.cs new file mode 100644 index 0000000000..ba0b420292 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebugger.cs @@ -0,0 +1,175 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.SharpDevelop.Debugging; +using ICSharpCode.SharpDevelop.Project; + +namespace UnitTesting.Tests.Utils +{ + public class MockDebugger : IDebugger + { + bool debugging; + bool stopCalled; + ProcessStartInfo processStartInfo; + Exception exceptionToThrowOnStart; + + public event EventHandler DebugStarting; + + protected virtual void OnDebugStarting(EventArgs e) + { + if (DebugStarting != null) { + DebugStarting(this, e); + } + } + + public event EventHandler DebugStarted; + + protected virtual void OnDebugStarted(EventArgs e) + { + if (DebugStarted != null) { + DebugStarted(this, e); + } + } + + public event EventHandler IsProcessRunningChanged; + + protected virtual void OnIsProcessRunningChanged(EventArgs e) + { + if (IsProcessRunningChanged != null) { + IsProcessRunningChanged(this, e); + } + } + + public event EventHandler DebugStopped; + + public void FireDebugStoppedEvent() + { + OnDebugStopped(new EventArgs()); + } + + protected virtual void OnDebugStopped(EventArgs e) + { + if (DebugStopped != null) { + DebugStopped(this, e); + } + } + + public bool IsDebugging { + get { return debugging; } + set { debugging = value; } + } + + public bool IsProcessRunning { + get { + throw new NotImplementedException(); + } + } + + public bool CanDebug(IProject project) + { + throw new NotImplementedException(); + } + + public void Start(ProcessStartInfo processStartInfo) + { + this.processStartInfo = processStartInfo; + if (exceptionToThrowOnStart != null) { + throw exceptionToThrowOnStart; + } + } + + public ProcessStartInfo ProcessStartInfo { + get { return processStartInfo; } + } + + public Exception ThrowExceptionOnStart { + get { return exceptionToThrowOnStart; } + set { exceptionToThrowOnStart = value; } + } + + public void StartWithoutDebugging(ProcessStartInfo processStartInfo) + { + throw new NotImplementedException(); + } + + public void Stop() + { + stopCalled = true; + } + + public bool IsStopCalled { + get { return stopCalled; } + } + + public void Break() + { + throw new NotImplementedException(); + } + + public void Continue() + { + throw new NotImplementedException(); + } + + public void StepInto() + { + throw new NotImplementedException(); + } + + public void StepOver() + { + throw new NotImplementedException(); + } + + public void StepOut() + { + throw new NotImplementedException(); + } + + public void ShowAttachDialog() + { + throw new NotImplementedException(); + } + + public void Attach(Process process) + { + throw new NotImplementedException(); + } + + public void Detach() + { + throw new NotImplementedException(); + } + + public string GetValueAsString(string variable) + { + throw new NotImplementedException(); + } + + public object GetTooltipControl(string variable) + { + throw new NotImplementedException(); + } + + public bool CanSetInstructionPointer(string filename, int line, int column) + { + throw new NotImplementedException(); + } + + public bool SetInstructionPointer(string filename, int line, int column) + { + throw new NotImplementedException(); + } + + public void Dispose() + { + throw new NotImplementedException(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebuggerService.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebuggerService.cs new file mode 100644 index 0000000000..564ac1152a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockDebuggerService.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Debugging; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockDebuggerService : IUnitTestDebuggerService + { + bool debuggerLoaded; + MockDebugger debugger = new MockDebugger(); + + public bool IsDebuggerLoaded { + get { return debuggerLoaded; } + set { debuggerLoaded = value; } + } + + public IDebugger CurrentDebugger { + get { return debugger; } + } + + public MockDebugger MockDebugger { + get { return debugger; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockFileService.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockFileService.cs new file mode 100644 index 0000000000..ad6176b443 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockFileService.cs @@ -0,0 +1,37 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockFileService : IUnitTestFileService + { + string fileOpened; + FilePosition? filePositionJumpedTo; + + public string FileOpened { + get { return fileOpened; } + } + + public FilePosition? FilePositionJumpedTo { + get { return filePositionJumpedTo; } + } + + public void OpenFile(string fileName) + { + fileOpened = fileName; + } + + public void JumpToFilePosition(string fileName, int line, int column) + { + filePositionJumpedTo = new FilePosition(fileName, line, column); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMessageService.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMessageService.cs new file mode 100644 index 0000000000..8ce577054c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMessageService.cs @@ -0,0 +1,39 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockMessageService : IUnitTestMessageService + { + string question; + string caption; + bool returnValue; + + public bool AskQuestionReturnValue { + get { return returnValue; } + set { returnValue = value; } + } + + public bool AskQuestion(string question, string caption) + { + this.question = question; + this.caption = caption; + return returnValue; + } + + public string Question { + get { return question; } + } + + public string Caption { + get { return caption; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMethod.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMethod.cs index 73ea1ed365..d2ba211307 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMethod.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockMethod.cs @@ -5,323 +5,62 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Dom; using System; using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; namespace UnitTesting.Tests.Utils { - public class MockMethod : IMethod + public class MockMethod : DefaultMethod { - IClass declaringType; - ModifierEnum modifiers; - DomRegion region = DomRegion.Empty; - DomRegion bodyRegion = DomRegion.Empty; - IList attributes = new List(); - string name = String.Empty; - IList parameters = new List(); - IReturnType returnType; - bool isVirtual; - bool isOverride; - - public MockMethod() : this(String.Empty) + public MockMethod() + : this(String.Empty) { } public MockMethod(string name) + : this(null, name) { - this.name = name; - } - - public DomRegion BodyRegion { - get { - return bodyRegion; - } - set { - bodyRegion = value; - } - } - - public IList Parameters { - get { - return parameters; - } - } - - public DomRegion Region { - get { - return region; - } - set { - region = value; - } - } - - public string Name { - get { - return name; - } - set { - name = value; - } - } - - public IReturnType ReturnType { - get { - return returnType; - } - set { - returnType = value; - } - } - - public IClass DeclaringType { - get { - return declaringType; - } - set { - declaringType = value; - } - } - - public ModifierEnum Modifiers { - get { - return modifiers; - } - set { - modifiers = value; - } - } - - public IList Attributes { - get { - return attributes; - } - } - - public IList TypeParameters { - get { - throw new NotImplementedException(); - } - } - - public bool IsConstructor { - get { - throw new NotImplementedException(); - } - } - - public bool IsOperator { - get { - return false; - } - } - - public IList HandlesClauses { - get { - throw new NotImplementedException(); - } - } - - public bool IsExtensionMethod { - get { - throw new NotImplementedException(); - } - } - - public string FullyQualifiedName { - get { - throw new NotImplementedException(); - } - } - - public IReturnType DeclaringTypeReference { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public IMember GenericMember { - get { - throw new NotImplementedException(); - } - } - - public string Namespace { - get { - throw new NotImplementedException(); - } - } - - public string DotNetName { - get { - throw new NotImplementedException(); - } - } - - public IList InterfaceImplementations { - get { - throw new NotImplementedException(); - } - } - - public string Documentation { - get { - throw new NotImplementedException(); - } - } - - public bool IsAbstract { - get { - throw new NotImplementedException(); - } - } - - public bool IsSealed { - get { - throw new NotImplementedException(); - } - } - - public bool IsStatic { - get { - throw new NotImplementedException(); - } - } - - public bool IsConst { - get { - throw new NotImplementedException(); - } - } - - public bool IsVirtual { - get { return isVirtual; } - set { isVirtual = value; } - } - - public bool IsPublic { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtected { - get { - throw new NotImplementedException(); - } - } - - public bool IsPrivate { - get { - throw new NotImplementedException(); - } - } - - public bool IsInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsReadonly { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedAndInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedOrInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsOverride { - get { return isOverride; } - set { isOverride = value; } - } - - public bool IsOverridable { - get { - throw new NotImplementedException(); - } - } - - public bool IsNew { - get { - throw new NotImplementedException(); - } - } - - public bool IsSynthetic { - get { - throw new NotImplementedException(); - } - } - - public object UserData { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public bool IsFrozen { - get { - throw new NotImplementedException(); - } - } - - public IMember CreateSpecializedMember() - { - throw new NotImplementedException(); } - public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree) + public MockMethod(IClass declaringType) + : this(declaringType, String.Empty) { - throw new NotImplementedException(); } - public void Freeze() + public MockMethod(IClass declaringType, string name) + : base(declaringType, name) { - throw new NotImplementedException(); } - public int CompareTo(object obj) + public static MockMethod CreateMockMethodWithoutAnyAttributes() { - throw new NotImplementedException(); + return CreateMockMethodWithAttributes(new MockAttribute[0]); } - public object Clone() + public static MockMethod CreateMockMethodWithAttributes(IList attributes) { - throw new NotImplementedException(); - } - - public ICompilationUnit CompilationUnit { - get { - return declaringType.CompilationUnit; + MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod mockMethod = new MockMethod(mockClass); + + foreach (MockAttribute attribute in attributes) { + mockMethod.Attributes.Add(attribute); } + + return mockMethod; } - public IProjectContent ProjectContent { - get { - return declaringType.ProjectContent; - } + public static MockMethod CreateMockMethodWithAttribute(MockAttribute attribute) + { + List attributes = new List(); + attributes.Add(attribute); + + return CreateMockMethodWithAttributes(attributes); } - public EntityType EntityType { - get { return EntityType.Method; } + public MockClass MockDeclaringType { + get { return DeclaringType as MockClass; } } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs new file mode 100644 index 0000000000..66c75e5b76 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestFramework.cs @@ -0,0 +1,97 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockNUnitTestFramework : ITestFramework + { + List testRunnersCreated = new List(); + List testDebuggersCreated = new List(); + IUnitTestProcessRunner processRunner; + ITestResultsMonitor testResultsMonitor; + UnitTestingOptions options; + IUnitTestDebuggerService debuggerService; + IUnitTestMessageService messageService; + + public MockNUnitTestFramework(IUnitTestProcessRunner processRunner, + ITestResultsMonitor testResultsMonitor, + UnitTestingOptions options) + : this(null, processRunner, testResultsMonitor, options, null) + { + } + + public MockNUnitTestFramework(IUnitTestDebuggerService debuggerService, + ITestResultsMonitor testResultsMonitor, + UnitTestingOptions options, + IUnitTestMessageService messageService) + : this(debuggerService, null, testResultsMonitor, options, messageService) + { + } + + public MockNUnitTestFramework(IUnitTestDebuggerService debuggerService, + IUnitTestProcessRunner processRunner, + ITestResultsMonitor testResultsMonitor, + UnitTestingOptions options, + IUnitTestMessageService messageService) + { + this.debuggerService = debuggerService; + this.processRunner = processRunner; + this.testResultsMonitor = testResultsMonitor; + this.options = options; + this.messageService = messageService; + } + + public bool IsTestMethod(IMember member) + { + throw new NotImplementedException(); + } + + public bool IsTestClass(IClass c) + { + throw new NotImplementedException(); + } + + public bool IsTestProject(IProject project) + { + throw new NotImplementedException(); + } + + public ITestRunner CreateTestRunner() + { + NUnitTestRunner testRunner = new NUnitTestRunner(processRunner, testResultsMonitor, options); + testRunnersCreated.Add(testRunner); + return testRunner; + } + + public List NUnitTestRunnersCreated { + get { return testRunnersCreated; } + } + + public ITestRunner CreateTestDebugger() + { + NUnitTestDebugger testDebugger = + new NUnitTestDebugger(debuggerService, messageService, testResultsMonitor, options); + testDebuggersCreated.Add(testDebugger); + return testDebugger; + } + + public List NUnitTestDebuggersCreated { + get { return testDebuggersCreated; } + } + + public bool IsBuildNeededBeforeTestRun { + get { return true; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestRunnerContext.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestRunnerContext.cs new file mode 100644 index 0000000000..84707d8827 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockNUnitTestRunnerContext.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockNUnitTestRunnerContext + { + MockProcessRunner processRunner = new MockProcessRunner(); + UnitTestingOptions options = new UnitTestingOptions(new Properties()); + MockTestResultsMonitor testResultsMonitor = new MockTestResultsMonitor(); + + public MockNUnitTestRunnerContext() + { + testResultsMonitor.FileName = @"c:\temp\tmp66.tmp"; + } + + public MockProcessRunner MockProcessRunner { + get { return processRunner; } + } + + public MockTestResultsMonitor MockTestResultsMonitor { + get { return testResultsMonitor; } + } + + public NUnitTestRunner CreateNUnitTestRunner() + { + return new NUnitTestRunner(processRunner, testResultsMonitor, options); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProcessRunner.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProcessRunner.cs new file mode 100644 index 0000000000..17756603f1 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProcessRunner.cs @@ -0,0 +1,81 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockProcessRunner : IUnitTestProcessRunner + { + bool logStandardOutputAndError = true; + string workingDirectory; + string commandPassedToStartMethod; + string commandArgumentsPassedToStartMethod; + bool killMethodCalled; + + public event EventHandler ProcessExited; + public event LineReceivedEventHandler OutputLineReceived; + public event LineReceivedEventHandler ErrorLineReceived; + + public bool LogStandardOutputAndError { + get { return logStandardOutputAndError; } + set { logStandardOutputAndError = value; } + } + + public string WorkingDirectory { + get { return workingDirectory; } + set { workingDirectory = value; } + } + + public void Start(string command, string arguments) + { + commandPassedToStartMethod = command; + commandArgumentsPassedToStartMethod = arguments; + } + + public string CommandPassedToStartMethod { + get { return commandPassedToStartMethod; } + } + + public string CommandArgumentsPassedToStartMethod { + get { return commandArgumentsPassedToStartMethod; } + } + + public void Kill() + { + killMethodCalled = true; + } + + public bool IsKillMethodCalled { + get { return killMethodCalled; } + set { killMethodCalled = value; } + } + + public void FireProcessExitedEvent() + { + if (ProcessExited != null) { + ProcessExited(this, new EventArgs()); + } + } + + public void FireOutputLineReceivedEvent(LineReceivedEventArgs e) + { + if (OutputLineReceived != null) { + OutputLineReceived(this, e); + } + } + + public void FireErrorLineReceivedEvent(LineReceivedEventArgs e) + { + if (ErrorLineReceived != null) { + ErrorLineReceived(this, e); + } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs index 2b4b301372..72cc37d01c 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockProjectContent.cs @@ -5,16 +5,18 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Dom; using System; using System.Collections; using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Editor.CodeCompletion; +using ICSharpCode.SharpDevelop.Project; namespace UnitTesting.Tests.Utils { public class MockProjectContent : IProjectContent { - LanguageProperties language; + LanguageProperties language = LanguageProperties.CSharp; List classes = new List(); object project; @@ -31,9 +33,7 @@ namespace UnitTesting.Tests.Utils } public ICollection Classes { - get { - return classes; - } + get { return classes; } } public ICollection NamespaceNames { @@ -49,12 +49,8 @@ namespace UnitTesting.Tests.Utils } public LanguageProperties Language { - get { - return language; - } - set { - language = value; - } + get { return language; } + set { language = value; } } public IUsing DefaultImports { @@ -64,18 +60,16 @@ namespace UnitTesting.Tests.Utils } public object Project { - get { - return project; - } - set { - project = value; - } + get { return project; } + set { project = value; } + } + + public IProject ProjectAsIProject { + get { return project as IProject; } } public SystemTypes SystemTypes { - get { - throw new NotImplementedException(); - } + get { return new SystemTypes(this); } } public string GetXmlDocumentation(string memberTag) @@ -105,7 +99,9 @@ namespace UnitTesting.Tests.Utils public IClass GetClass(string typeName, int typeParameterCount) { - throw new NotImplementedException(); + MockClass c = new MockClass(this); + c.FullyQualifiedName = typeName; + return c; } public bool NamespaceExists(string name) @@ -182,17 +178,15 @@ namespace UnitTesting.Tests.Utils } public string AssemblyName { - get { - throw new NotImplementedException(); - } + get { return String.Empty; } } - public List GetAllContents() + public void AddAllContents(List list, LanguageProperties language, bool lookInReferences) { throw new NotImplementedException(); } - public void AddAllContents(List list, LanguageProperties language, bool lookInReferences) + public List GetAllContents() { throw new NotImplementedException(); } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRegisteredTestFrameworks.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRegisteredTestFrameworks.cs new file mode 100644 index 0000000000..3e23933ed1 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRegisteredTestFrameworks.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockRegisteredTestFrameworks : MockTestFramework, IRegisteredTestFrameworks + { + Dictionary testFrameworks = + new Dictionary(); + + public void AddTestFrameworkForProject(IProject project, ITestFramework testFramework) + { + testFrameworks.Add(project, testFramework); + } + + public ITestFramework GetTestFrameworkForProject(IProject project) + { + ITestFramework testFramework = null; + if (testFrameworks.TryGetValue(project, out testFramework)) { + return testFramework; + } + return null; + } + + public ITestRunner CreateTestRunner(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.CreateTestRunner(); + } + return null; + } + + public ITestRunner CreateTestDebugger(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.CreateTestDebugger(); + } + return null; + } + + public bool IsBuildNeededBeforeTestRunForProject(IProject project) + { + ITestFramework testFramework = GetTestFrameworkForProject(project); + if (testFramework != null) { + return testFramework.IsBuildNeededBeforeTestRun; + } + return true; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRunTestCommandContext.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRunTestCommandContext.cs new file mode 100644 index 0000000000..ef246e526c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockRunTestCommandContext.cs @@ -0,0 +1,106 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockRunTestCommandContext : IRunTestCommandContext + { + UnitTestingOptions options = new UnitTestingOptions(new Properties()); + MockRegisteredTestFrameworks testFrameworks = new MockRegisteredTestFrameworks(); + MockTestResultsMonitor testResultsMonitor = new MockTestResultsMonitor(); + MockTaskService taskService = new MockTaskService(); + MockUnitTestWorkbench workbench = new MockUnitTestWorkbench(); + MockBuildProjectFactory buildProjectFactory = new MockBuildProjectFactory(); + MockBuildOptions buildOptions = new MockBuildOptions(); + MessageViewCategory unitTestCategory = new MessageViewCategory("Unit Tests"); + MockUnitTestsPad unitTestsPad = new MockUnitTestsPad(); + MockMessageService messageService = new MockMessageService(); + MockSaveAllFilesCommand saveAllFilesCommand = new MockSaveAllFilesCommand(); + + public UnitTestingOptions UnitTestingOptions { + get { return options; } + } + + public IRegisteredTestFrameworks RegisteredTestFrameworks { + get { return testFrameworks; } + } + + public MockRegisteredTestFrameworks MockRegisteredTestFrameworks { + get { return testFrameworks; } + } + + public MockTestResultsMonitor MockTestResultsMonitor { + get { return testResultsMonitor; } + } + + public IUnitTestTaskService TaskService { + get { return taskService; } + } + + public MockTaskService MockTaskService { + get { return taskService; } + } + + public IUnitTestWorkbench Workbench { + get { return workbench; } + } + + public MockUnitTestWorkbench MockUnitTestWorkbench { + get { return workbench; } + } + + public IBuildProjectFactory BuildProjectFactory { + get { return buildProjectFactory; } + } + + public MockBuildProjectFactory MockBuildProjectFactory { + get { return buildProjectFactory; } + } + + public IBuildOptions BuildOptions { + get { return buildOptions; } + } + + public MockBuildOptions MockBuildOptions { + get { return buildOptions; } + } + + public MessageViewCategory UnitTestCategory { + get { return unitTestCategory; } + } + + public IUnitTestsPad OpenUnitTestsPad { + get { return unitTestsPad; } + } + + public MockUnitTestsPad MockUnitTestsPad { + get { return unitTestsPad; } + set { unitTestsPad = value; } + } + + public IUnitTestMessageService MessageService { + get { return messageService; } + } + + public MockMessageService MockMessageService { + get { return messageService; } + } + + public IUnitTestSaveAllFilesCommand SaveAllFilesCommand { + get { return saveAllFilesCommand; } + } + + public MockSaveAllFilesCommand MockSaveAllFilesCommand { + get { return saveAllFilesCommand; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockSaveAllFilesCommand.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockSaveAllFilesCommand.cs new file mode 100644 index 0000000000..f8a2d1cf1e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockSaveAllFilesCommand.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockSaveAllFilesCommand : IUnitTestSaveAllFilesCommand + { + bool saveAllFilesMethodCalled; + + public bool IsSaveAllFilesMethodCalled { + get { return saveAllFilesMethodCalled; } + set { saveAllFilesMethodCalled = value; } + } + + public void SaveAllFiles() + { + saveAllFilesMethodCalled = true; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTaskService.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTaskService.cs new file mode 100644 index 0000000000..08476dce89 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTaskService.cs @@ -0,0 +1,64 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTaskService : IUnitTestTaskService + { + MessageViewCategory buildMessageViewCategory = new MessageViewCategory("Build"); + bool clearExceptCommentTasksMethodCalled; + bool isInUpdateWhilstClearExceptCommentTasksMethodCalled; + bool inUpdate; + bool somethingWentWrong; + List tasks = new List(); + + public bool IsClearExceptCommentTasksMethodCalled { + get { return clearExceptCommentTasksMethodCalled; } + } + + public void ClearExceptCommentTasks() + { + clearExceptCommentTasksMethodCalled = true; + isInUpdateWhilstClearExceptCommentTasksMethodCalled = inUpdate; + } + + public bool IsInUpdateWhilstClearExceptCommentTasksMethodCalled { + get { return isInUpdateWhilstClearExceptCommentTasksMethodCalled; } + } + + public bool InUpdate { + get { return inUpdate; } + set { inUpdate = value; } + } + + public MessageViewCategory BuildMessageViewCategory { + get { return buildMessageViewCategory; } + } + + public bool SomethingWentWrong { + get { return somethingWentWrong; } + } + + public List Tasks { + get { return tasks; } + } + + public void Add(Task task) + { + if ((task.TaskType == TaskType.Error) || (task.TaskType == TaskType.Warning)) { + somethingWentWrong = true; + } + tasks.Add(task); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs new file mode 100644 index 0000000000..86b81110b2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFramework.cs @@ -0,0 +1,109 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTestFramework : ITestFramework + { + IMember isTestMethodMemberParameterUsed; + List testMethods = new List(); + IClass isTestClassParameterUsed; + List testClasses = new List(); + IProject isTestProjectParameterUsed; + List testProjects = new List(); + List testRunnersCreated = new List(); + List testDebuggersCreated = new List(); + bool buildNeededBeforeTestRun = true; + + public MockTestFramework() + { + } + + public bool IsTestMethod(IMember member) + { + isTestMethodMemberParameterUsed = member; + return testMethods.Contains(member); + } + + public IMember IsTestMethodMemberParameterUsed { + get { return isTestMethodMemberParameterUsed; } + } + + public void AddTestMethod(IMember member) + { + testMethods.Add(member); + } + + public bool IsTestClass(IClass c) + { + isTestClassParameterUsed = c; + return testClasses.Contains(c); + } + + public IClass IsTestClassParameterUsed { + get { return isTestClassParameterUsed; } + } + + public void AddTestClass(IClass c) + { + testClasses.Add(c); + } + + public void RemoveTestClass(IClass c) + { + testClasses.Remove(c); + } + + public bool IsTestProject(IProject project) + { + isTestProjectParameterUsed = project; + return testProjects.Contains(project); + } + + public IProject IsTestProjectParameterUsed { + get { return isTestProjectParameterUsed; } + } + + public void AddTestProject(IProject project) + { + testProjects.Add(project); + } + + public ITestRunner CreateTestRunner() + { + MockTestRunner testRunner = new MockTestRunner(); + testRunnersCreated.Add(testRunner); + return testRunner; + } + + public List TestRunnersCreated { + get { return testRunnersCreated; } + } + + public ITestRunner CreateTestDebugger() + { + MockTestRunner testRunner = new MockTestRunner(); + testDebuggersCreated.Add(testRunner); + return testRunner; + } + + public List TestDebuggersCreated { + get { return testDebuggersCreated; } + } + + public bool IsBuildNeededBeforeTestRun { + get { return buildNeededBeforeTestRun; } + set { buildNeededBeforeTestRun = value; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworkFactory.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworkFactory.cs new file mode 100644 index 0000000000..ad0b4a2017 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworkFactory.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTestFrameworkFactory : ITestFrameworkFactory + { + Dictionary frameworks = new Dictionary(); + List classNames = new List(); + + public MockTestFrameworkFactory() + { + } + + public void Add(string className, ITestFramework framework) + { + frameworks.Add(className, framework); + } + + public ITestFramework Create(string className) + { + classNames.Add(className); + + ITestFramework framework; + if (frameworks.TryGetValue(className, out framework)) { + return framework; + } + return null; + } + + public List ClassNamesPassedToCreateMethod { + get { return classNames; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworksWithNUnitFrameworkSupport.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworksWithNUnitFrameworkSupport.cs new file mode 100644 index 0000000000..8e89aac8e0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestFrameworksWithNUnitFrameworkSupport.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTestFrameworksWithNUnitFrameworkSupport : NUnitTestFramework, IRegisteredTestFrameworks + { + public ITestFramework GetTestFrameworkForProject(IProject project) + { + throw new NotImplementedException(); + } + + public ITestRunner CreateTestRunner(IProject project) + { + throw new NotImplementedException(); + } + + public ITestRunner CreateTestDebugger(IProject project) + { + throw new NotImplementedException(); + } + + public bool IsBuildNeededBeforeTestRunForProject(IProject project) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestResultsMonitor.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestResultsMonitor.cs new file mode 100644 index 0000000000..13e3e94890 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestResultsMonitor.cs @@ -0,0 +1,81 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTestResultsMonitor : ITestResultsMonitor + { + bool startMethodCalled; + bool stopMethodCalled; + bool disposeMethodCalled; + bool readMethodCalled; + string fileName; + + public MockTestResultsMonitor() + { + } + + public event TestFinishedEventHandler TestFinished; + + public bool IsStartMethodCalled { + get { return startMethodCalled; } + } + + public void Start() + { + startMethodCalled = true; + } + + public bool IsStopMethodCalled { + get { return stopMethodCalled; } + set { stopMethodCalled = value; } + } + + public void Stop() + { + stopMethodCalled = true; + } + + public bool IsDisposeMethodCalled { + get { return disposeMethodCalled; } + } + + public void Dispose() + { + disposeMethodCalled = true; + } + + public bool IsReadMethodCalled { + get { return readMethodCalled; } + } + + public void Read() + { + readMethodCalled = true; + } + + public string FileName { + get { return fileName; } + set { fileName = value; } + } + + public void FireTestFinishedEvent(TestResult testResult) + { + OnTestFinished(new TestFinishedEventArgs(testResult)); + } + + protected virtual void OnTestFinished(TestFinishedEventArgs e) + { + if (TestFinished != null) { + TestFinished(this, e); + } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestRunner.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestRunner.cs new file mode 100644 index 0000000000..7e932d0b9c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestRunner.cs @@ -0,0 +1,78 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockTestRunner : ITestRunner + { + bool disposed = false; + bool stopped = false; + bool started = false; + SelectedTests selectedTests; + + public event TestFinishedEventHandler TestFinished; + public event EventHandler AllTestsFinished; + public event MessageReceivedEventHandler MessageReceived; + + public void Dispose() + { + disposed = true; + } + + public bool IsDisposeCalled { + get { return disposed; } + } + + public void Start(SelectedTests selectedTests) + { + started = true; + this.selectedTests = selectedTests; + } + + public bool IsStartCalled { + get { return started; } + } + + public SelectedTests SelectedTestsPassedToStartMethod { + get { return selectedTests; } + } + + public void Stop() + { + stopped = true; + } + + public bool IsStopCalled { + get { return stopped; } + } + + public void FireTestFinishedEvent(TestResult testResult) + { + if (TestFinished != null) { + TestFinished(this, new TestFinishedEventArgs(testResult)); + } + } + + public void FireAllTestsFinishedEvent() + { + if (AllTestsFinished != null) { + AllTestsFinished(this, new EventArgs()); + } + } + + public void FireMessageReceivedEvent(string message) + { + if (MessageReceived != null) { + MessageReceived(this, new MessageReceivedEventArgs(message)); + } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestTreeView.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestTreeView.cs index 03a99276d4..f6e1136a05 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestTreeView.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockTestTreeView.cs @@ -10,7 +10,7 @@ using ICSharpCode.SharpDevelop.Project; using ICSharpCode.UnitTesting; using System; -namespace UnitTesting.Tests +namespace UnitTesting.Tests.Utils { public class MockTestTreeView : ITestTreeView { @@ -19,44 +19,24 @@ namespace UnitTesting.Tests IProject selectedProject; string selectedNamespace; - public MockTestTreeView() - { - } - public IMember SelectedMethod { - get { - return selectedMethod; - } - set { - selectedMethod = value; - } + get { return selectedMethod; } + set { selectedMethod = value; } } public IClass SelectedClass { - get { - return selectedClass; - } - set { - selectedClass = value; - } + get { return selectedClass; } + set { selectedClass = value; } } public IProject SelectedProject { - get { - return selectedProject; - } - set { - selectedProject = value; - } + get { return selectedProject; } + set { selectedProject = value; } } public string SelectedNamespace { - get { - return selectedNamespace; - } - set { - selectedNamespace = value; - } + get { return selectedNamespace; } + set { selectedNamespace = value; } } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestWorkbench.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestWorkbench.cs new file mode 100644 index 0000000000..c48403987d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestWorkbench.cs @@ -0,0 +1,113 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop; + +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils +{ + public struct ActionArguments { + public Action Action; + public T Arg; + } + + public class MockUnitTestWorkbench : IUnitTestWorkbench + { + List padDescriptors = new List(); + List safeThreadAsyncMethodCalls = new List(); + List safeThreadAsyncMethodCallsWithArguments = + new List(); + bool makeSafeThreadAsyncMethodCallsWithArguments; + bool makeNonGenericSafeThreadAsyncMethodCalls; + List typesPassedToGetPadMethod = new List(); + PadDescriptor compilerMessageViewPadDescriptor; + PadDescriptor errorListPadDescriptor; + + public MockUnitTestWorkbench() + { + compilerMessageViewPadDescriptor = new PadDescriptor(typeof(CompilerMessageView), "Output", String.Empty); + AddPadDescriptor(compilerMessageViewPadDescriptor); + + errorListPadDescriptor = new PadDescriptor(typeof(ErrorListPad), "Errors", String.Empty); + AddPadDescriptor(errorListPadDescriptor); + } + + public PadDescriptor CompilerMessageViewPadDescriptor { + get { return compilerMessageViewPadDescriptor; } + } + + public PadDescriptor ErrorListPadDescriptor { + get { return errorListPadDescriptor; } + } + + public void AddPadDescriptor(PadDescriptor padDescriptor) + { + padDescriptors.Add(padDescriptor); + } + + public PadDescriptor GetPad(Type type) + { + typesPassedToGetPadMethod.Add(type); + + foreach (PadDescriptor padDescriptor in padDescriptors) { + if (padDescriptor.Class == type.FullName) { + return padDescriptor; + } + } + return null; + } + + public List TypesPassedToGetPadMethod { + get { return typesPassedToGetPadMethod; } + } + + public List SafeThreadAsyncMethodCalls { + get { return safeThreadAsyncMethodCalls; } + } + + public bool MakeNonGenericSafeThreadAsyncMethodCalls { + get { return makeNonGenericSafeThreadAsyncMethodCalls; } + set { makeNonGenericSafeThreadAsyncMethodCalls = value; } + } + + public void SafeThreadAsyncCall(Action method) + { + safeThreadAsyncMethodCalls.Add(method); + + if (makeNonGenericSafeThreadAsyncMethodCalls) { + method(); + } + } + + public bool MakeSafeThreadAsyncMethodCallsWithArguments { + get { return makeSafeThreadAsyncMethodCallsWithArguments; } + set { makeSafeThreadAsyncMethodCallsWithArguments = value; } + } + + public void SafeThreadAsyncCall(Action method, T arg) + { + ActionArguments actionArgs = new ActionArguments(); + actionArgs.Action = method; + actionArgs.Arg = arg; + + safeThreadAsyncMethodCallsWithArguments.Add(actionArgs); + + if (makeSafeThreadAsyncMethodCallsWithArguments) { + method(arg); + } + } + + public List SafeThreadAsyncMethodCallsWithArguments { + get { return safeThreadAsyncMethodCallsWithArguments; } + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestsPad.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestsPad.cs new file mode 100644 index 0000000000..5e25054058 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/MockUnitTestsPad.cs @@ -0,0 +1,76 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public class MockUnitTestsPad : IUnitTestsPad + { + bool updateToolbarMethodCalled; + bool bringToFrontMethodCalled; + bool resetTestResultsMethodCalled; + List projects = new List(); + List testProjects = new List(); + + public bool IsUpdateToolbarMethodCalled { + get { return updateToolbarMethodCalled; } + set { updateToolbarMethodCalled = value; } + } + + public void UpdateToolbar() + { + updateToolbarMethodCalled = true; + } + + public bool IsBringToFrontMethodCalled { + get { return bringToFrontMethodCalled; } + } + + public void BringToFront() + { + bringToFrontMethodCalled = true; + } + + public bool IsResetTestResultsMethodCalled { + get { return resetTestResultsMethodCalled; } + } + + public void ResetTestResults() + { + resetTestResultsMethodCalled = true; + } + + public void AddProject(IProject project) + { + projects.Add(project); + } + + public IProject[] GetProjects() + { + return projects.ToArray(); + } + + public TestProject GetTestProject(IProject project) + { + foreach (TestProject testProject in testProjects) { + if (testProject.Project == project) { + return testProject; + } + } + return null; + } + + public void AddTestProject(TestProject testProject) + { + testProjects.Add(testProject); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/ResourceManager.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/ResourceManager.cs index 613979906a..721c62b633 100644 --- a/src/AddIns/Analysis/UnitTesting/Test/Utils/ResourceManager.cs +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/ResourceManager.cs @@ -30,6 +30,7 @@ namespace UnitTesting.Tests.Utils initialized = true; Assembly exe = Assembly.Load("SharpDevelop"); ResourceService.RegisterNeutralImages(new System.Resources.ResourceManager("Resources.BitmapResources", exe)); + ResourceService.RegisterNeutralStrings(new System.Resources.ResourceManager("Resources.StringResources", exe)); } } } diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/SelectedTestsHelper.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/SelectedTestsHelper.cs new file mode 100644 index 0000000000..864e9b9821 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/SelectedTestsHelper.cs @@ -0,0 +1,33 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public static class SelectedTestsHelper + { + public static SelectedTests CreateSelectedTestMethod() + { + MockCSharpProject project = new MockCSharpProject(); + + MockMethod methodToTest = MockMethod.CreateMockMethodWithoutAnyAttributes(); + methodToTest.FullyQualifiedName = "MyTests.MyTestClass.MyTestMethod"; + + MockClass classToTest = methodToTest.DeclaringType as MockClass; + classToTest.SetDotNetName("MyTests.MyTestClass"); + + MockTestTreeView treeView = new MockTestTreeView(); + treeView.SelectedProject = project; + treeView.SelectedMethod = methodToTest; + + return new SelectedTests(treeView, null); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/TaskComparison.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/TaskComparison.cs new file mode 100644 index 0000000000..de237c0dc5 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/TaskComparison.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Text; +using ICSharpCode.SharpDevelop; + +namespace UnitTesting.Tests.Utils +{ + public class TaskComparison + { + bool match; + Task lhs; + Task rhs; + string shortMismatchReason = String.Empty; + StringBuilder mismatchReason = new StringBuilder(); + + public TaskComparison(Task lhs, Task rhs) + { + this.lhs = lhs; + this.rhs = rhs; + Compare(); + } + + void Compare() + { + match = false; + + if ((lhs == null) && (rhs == null)) { + match = true; + return; + } + + if ((lhs == null) || (rhs == null)) { + AddNullTaskMismatchReason(); + } else if (lhs.TaskType != rhs.TaskType) { + AddTaskTypeMismatchReason(); + } else if (lhs.FileName != rhs.FileName) { + AddFileNameMismatchReason(); + } else if (lhs.Description != rhs.Description) { + AddDescriptionMismatchReason(); + } else if (lhs.Column != rhs.Column) { + AddColumnMismatchReason(); + } else if (lhs.Line != rhs.Line) { + AddLineMismatchReason(); + } else { + match = true; + } + } + + public bool IsMatch { + get { return match; } + } + + public string MismatchReason { + get { return mismatchReason.ToString(); } + } + + void AddNullTaskMismatchReason() + { + shortMismatchReason = "One task is null."; + AddMismatchedExpectedAndActualValues(lhs, rhs); + } + + void AddTaskTypeMismatchReason() + { + shortMismatchReason = "TaskTypes are different."; + AddMismatchedExpectedAndActualValues(lhs.TaskType, rhs.TaskType); + } + + void AddMismatchedExpectedAndActualValues(object expected, object actual) + { + mismatchReason.AppendLine(shortMismatchReason); + mismatchReason.AppendLine("Expected: " + ObjectToString(expected)); + mismatchReason.AppendLine("But was: " + ObjectToString(actual)); + } + + static string ObjectToString(object obj) + { + if (obj != null) { + return obj.ToString(); + } + return "(null)"; + } + + void AddFileNameMismatchReason() + { + shortMismatchReason = "FileNames are different."; + AddMismatchedExpectedAndActualValues(lhs.FileName, rhs.FileName); + } + + void AddDescriptionMismatchReason() + { + shortMismatchReason = "Descriptions are different."; + AddMismatchedExpectedAndActualValues(lhs.Description, rhs.Description); + } + + void AddColumnMismatchReason() + { + shortMismatchReason = "Columns are different."; + AddMismatchedExpectedAndActualValues(lhs.Column, rhs.Column); + } + + void AddLineMismatchReason() + { + shortMismatchReason = "Lines are different."; + AddMismatchedExpectedAndActualValues(lhs.Line, rhs.Line); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/TestProjectHelper.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/TestProjectHelper.cs new file mode 100644 index 0000000000..a86a1465e2 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/TestProjectHelper.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace UnitTesting.Tests.Utils +{ + public static class TestProjectHelper + { + public static TestProject CreateTestProjectWithTestClassAndSingleTestMethod(IProject project, + string className, + string methodName) + { + string[] methodNames = new string[] { methodName }; + return CreateTestProjectWithTestClassTestMethods(project, className, methodNames); + } + + public static TestProject CreateTestProjectWithTestClassAndSingleTestMethod(string className, string methodName) + { + MockCSharpProject project = new MockCSharpProject(); + return CreateTestProjectWithTestClassAndSingleTestMethod(project, className, methodName); + } + + public static TestProject CreateTestProjectWithTestClassTestMethods(string className, string[] methodNames) + { + MockCSharpProject project = new MockCSharpProject(); + return CreateTestProjectWithTestClassTestMethods(project, className, methodNames); + } + + public static TestProject CreateTestProjectWithTestClassTestMethods(IProject project, string className, string[] methodNames) + { + MockRegisteredTestFrameworks testFrameworks = new MockRegisteredTestFrameworks(); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.MockProjectContent.Project = project; + c.SetDotNetName(className); + c.CompilationUnit.FileName = @"c:\projects\tests\MyTests.cs"; + TestClass testClass = new TestClass(c, testFrameworks); + + foreach (string methodName in methodNames) { + MockMethod method = new MockMethod(c, methodName); + method.Region = new DomRegion(4, 20); + c.Methods.Add(method); + + TestMethod testMethod = new TestMethod(method); + testClass.TestMethods.Add(testMethod); + } + + c.Project.Name = "TestProject"; + TestProject testProject = new TestProject(c.Project, c.ProjectContent, testFrameworks); + testProject.TestClasses.Add(testClass); + + return testProject; + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithAttributesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithAttributesTestFixture.cs new file mode 100644 index 0000000000..e4d25c993a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithAttributesTestFixture.cs @@ -0,0 +1,95 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockClassWithAttributesTestFixture + { + MockClass mockClass; + MockAttribute firstAttribute; + MockAttribute secondAttribute; + + [SetUp] + public void Init() + { + firstAttribute = new MockAttribute("first"); + secondAttribute = new MockAttribute("second"); + List attributes = new List(); + attributes.Add(firstAttribute); + attributes.Add(secondAttribute); + + mockClass = MockClass.CreateMockClassWithAttributes(attributes); + } + + [Test] + public void ProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockClass.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockClass.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void ClassHasTwoAttributes() + { + Assert.AreEqual(2, mockClass.Attributes.Count); + } + + [Test] + public void FirstClassAttributeHasAttributeTypeWithFullyQualifiedNameOfFirst() + { + Assert.AreEqual("first", mockClass.Attributes[0].AttributeType.FullyQualifiedName); + } + + [Test] + public void SecondClassAttributeHasAttributeTypeWithFullyQualifiedNameOfSeocnd() + { + Assert.AreEqual("second", mockClass.Attributes[1].AttributeType.FullyQualifiedName); + } + + [Test] + public void ProjectContentContainsMockClass() + { + Assert.IsTrue(mockClass.ProjectContent.Classes.Contains(mockClass)); + } + + [Test] + public void CompoundClassIsSameAsMockClass() + { + Assert.AreEqual(mockClass, mockClass.GetCompoundClass()); + } + + [Test] + public void MockClassHasDefaultReturnType() + { + Assert.AreEqual(mockClass, mockClass.DefaultReturnType.GetUnderlyingClass()); + } + + [Test] + public void ClassHasCompilationUnit() + { + Assert.IsNotNull(mockClass.CompilationUnit); + } + + [Test] + public void ClassCompilationUnitHasSameProjectContentAsClass() + { + Assert.AreEqual(mockClass.ProjectContent, mockClass.CompilationUnit.ProjectContent); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithSingleAttributeTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithSingleAttributeTestFixture.cs new file mode 100644 index 0000000000..3e0c878035 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithSingleAttributeTestFixture.cs @@ -0,0 +1,53 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockClassWithSingleAttributeTestFixture + { + MockClass mockClass; + MockAttribute firstAttribute; + + [SetUp] + public void Init() + { + firstAttribute = new MockAttribute("first"); + mockClass = MockClass.CreateMockClassWithAttribute(firstAttribute); + } + + [Test] + public void ProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockClass.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockClass.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void ClassHasOneAttribute() + { + Assert.AreEqual(1, mockClass.Attributes.Count); + } + + [Test] + public void FirstClassAttributeHasAttributeTypeWithFullyQualifiedNameOfFirst() + { + Assert.AreEqual("first", mockClass.Attributes[0].AttributeType.FullyQualifiedName); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithoutAnyAttributesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithoutAnyAttributesTestFixture.cs new file mode 100644 index 0000000000..8b474ff5c3 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockClassWithoutAnyAttributesTestFixture.cs @@ -0,0 +1,56 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockClassWithoutAnyAttributesTestFixture + { + MockClass mockClass; + + [SetUp] + public void Init() + { + mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + } + + [Test] + public void ProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockClass.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockClass.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void ClassHasNoAttributes() + { + Assert.AreEqual(0, mockClass.Attributes.Count); + } + + [Test] + public void ProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockClass.Project); + } + + [Test] + public void ProjectContentContainsMockClass() + { + Assert.IsTrue(mockClass.ProjectContent.Classes.Contains(mockClass)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithAttributesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithAttributesTestFixture.cs new file mode 100644 index 0000000000..722190e08d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithAttributesTestFixture.cs @@ -0,0 +1,71 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockMethodWithAttributesTestFixture + { + MockMethod mockMethod; + MockAttribute firstAttribute; + MockAttribute secondAttribute; + + [SetUp] + public void Init() + { + firstAttribute = new MockAttribute("first"); + secondAttribute = new MockAttribute("second"); + List attributes = new List(); + attributes.Add(firstAttribute); + attributes.Add(secondAttribute); + + mockMethod = MockMethod.CreateMockMethodWithAttributes(attributes); + } + + [Test] + public void DeclaringTypeProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockMethod.DeclaringType.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockMethod.DeclaringType.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void MethodHasTwoAttributes() + { + Assert.AreEqual(2, mockMethod.Attributes.Count); + } + + [Test] + public void FirstClassAttributeHasAttributeTypeWithFullyQualifiedNameOfFirst() + { + Assert.AreEqual("first", mockMethod.Attributes[0].AttributeType.FullyQualifiedName); + } + + [Test] + public void SecondClassAttributeHasAttributeTypeWithFullyQualifiedNameOfSeocnd() + { + Assert.AreEqual("second", mockMethod.Attributes[1].AttributeType.FullyQualifiedName); + } + + [Test] + public void MethodDeclaringTypeHasCompilationUnit() + { + Assert.IsNotNull(mockMethod.DeclaringType.CompilationUnit); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithSingleAttributeTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithSingleAttributeTestFixture.cs new file mode 100644 index 0000000000..75482c19c6 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithSingleAttributeTestFixture.cs @@ -0,0 +1,53 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockMethodWithSingleAttributeTestFixture + { + MockMethod mockMethod; + MockAttribute firstAttribute; + + [SetUp] + public void Init() + { + firstAttribute = new MockAttribute("first"); + mockMethod = MockMethod.CreateMockMethodWithAttribute(firstAttribute); + } + + [Test] + public void DeclaringTypeProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockMethod.DeclaringType.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockMethod.DeclaringType.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void MethodHasOneAttribute() + { + Assert.AreEqual(1, mockMethod.Attributes.Count); + } + + [Test] + public void FirstClassAttributeHasAttributeTypeWithFullyQualifiedNameOfFirst() + { + Assert.AreEqual("first", mockMethod.Attributes[0].AttributeType.FullyQualifiedName); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithoutAnyAttributesTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithoutAnyAttributesTestFixture.cs new file mode 100644 index 0000000000..434d3ff657 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateMockMethodWithoutAnyAttributesTestFixture.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateMockMethodWithoutAnyAttributesTestFixture + { + MockMethod mockMethod; + + [SetUp] + public void Init() + { + mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); + } + + [Test] + public void DeclaringTypeProjectContentLanguageIsCSharp() + { + Assert.AreEqual(LanguageProperties.CSharp, mockMethod.DeclaringType.ProjectContent.Language); + } + + [Test] + public void ProjectContentProjectIsMockCSharpProject() + { + Assert.IsNotNull(mockMethod.DeclaringType.ProjectContent.Project as MockCSharpProject); + } + + [Test] + public void MethodHasNoAttributes() + { + Assert.AreEqual(0, mockMethod.Attributes.Count); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateProjectWithOutputPathTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateProjectWithOutputPathTestFixture.cs new file mode 100644 index 0000000000..4261edeae9 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateProjectWithOutputPathTestFixture.cs @@ -0,0 +1,71 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateProjectWithOutputPathTestFixture + { + MockCSharpProject project; + + [SetUp] + public void Init() + { + project = new MockCSharpProject(); + } + + [Test] + public void ProjectOutputTypeIsLibrary() + { + Assert.AreEqual(OutputType.Library, project.OutputType); + } + + [Test] + public void ProjectFileNameIsProjectsMyTestsMyTestsCsproj() + { + string expectedFileName = @"c:\projects\MyTests\MyTests.csproj"; + Assert.AreEqual(expectedFileName, project.FileName); + } + + [Test] + public void ProjectAssemblyNameIsMyTests() + { + Assert.AreEqual("MyTests", project.AssemblyName); + } + + [Test] + public void ProjectOutputPathIsBinDebug() + { + Assert.AreEqual(@"bin\Debug\", project.GetProperty(null, null, "OutputPath")); + } + + [Test] + public void OutputAssemblyFullPathIsProjectsMyTestsMyTestsBinDebugMyTestsDll() + { + string expectedFileName = @"c:\projects\MyTests\bin\Debug\MyTests.dll"; + Assert.AreEqual(expectedFileName, project.OutputAssemblyFullPath); + } + + [Test] + public void TargetFrameworkVersionIsVersion40() + { + Assert.AreEqual("v4.0", project.TargetFrameworkVersion); + } + + [Test] + public void PlatformTargetIs32Bit() + { + Assert.AreEqual("x86", project.GetEvaluatedProperty("PlatformTarget")); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithOneTestMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithOneTestMethodTestFixture.cs new file mode 100644 index 0000000000..a0a757602c --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithOneTestMethodTestFixture.cs @@ -0,0 +1,113 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateTestProjectWithOneTestMethodTestFixture + { + TestProject testProject; + TestClass testClass; + TestMethod testMethod; + + [SetUp] + public void Init() + { + testProject = + TestProjectHelper.CreateTestProjectWithTestClassAndSingleTestMethod("MyNamespace.MyClass", "MyTestMethod"); + + if (testProject.TestClasses.Count > 0) { + testClass = testProject.TestClasses[0]; + if (testClass.TestMethods.Count > 0) { + testMethod = testClass.TestMethods[0]; + } + } + } + + [Test] + public void TestProjectNameIsTestProject() + { + string expectedName = "TestProject"; + Assert.AreEqual(expectedName, testProject.Name); + } + + [Test] + public void TestProjectNameMatchesProjectName() + { + Assert.AreEqual(testProject.Project.Name, testProject.Name); + } + + [Test] + public void TestProjectHasOneTestClass() + { + Assert.AreEqual(1, testProject.TestClasses.Count); + } + + [Test] + public void TestClassDotNetNameIsMyNamespaceMyClass() + { + string expectedName = "MyNamespace.MyClass"; + Assert.AreEqual(expectedName, testClass.Class.DotNetName); + } + + [Test] + public void TestClassCompilationUnitFileNameIsProjectsTestsMyTestsCs() + { + string fileName = @"c:\projects\tests\MyTests.cs"; + Assert.AreEqual(fileName, testClass.Class.CompilationUnit.FileName); + } + + [Test] + public void TestClassHasOneTestMethod() + { + Assert.AreEqual(1, testClass.TestMethods.Count); + } + + [Test] + public void TestMethodNameIsMyTestMethod() + { + Assert.AreEqual("MyTestMethod", testMethod.Name); + } + + [Test] + public void TestMethodDeclaringTypeIsNotNull() + { + Assert.IsNotNull(testMethod.Method.DeclaringType); + } + + [Test] + public void TestMethodDeclaringTypeEqualsTestClass() + { + Assert.AreEqual(testClass.Class, testMethod.Method.DeclaringType); + } + + [Test] + public void TestMethodRegionIsLine4Column20() + { + DomRegion expectedRegion = new DomRegion(4, 20); + Assert.AreEqual(expectedRegion, testMethod.Method.Region); + } + + [Test] + public void ClassHasOneMethod() + { + Assert.AreEqual(1, testClass.Class.Methods.Count); + } + + [Test] + public void ClassMethodMatchesTestMethodMethod() + { + Assert.AreEqual(testClass.Class.Methods[0], testMethod.Method); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithTwoTestMethodsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithTwoTestMethodsTestFixture.cs new file mode 100644 index 0000000000..c320052b01 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/CreateTestProjectWithTwoTestMethodsTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class CreateTestProjectWithTwoTestMethodsTestFixture + { + TestProject testProject; + TestClass testClass; + + [SetUp] + public void Init() + { + string[] methods = new string[] { "Foo", "Bar" }; + testProject = + TestProjectHelper.CreateTestProjectWithTestClassTestMethods("MyClass", methods); + + testClass = testProject.TestClasses[0]; + } + + [Test] + public void TestProjectWithTwoTestMethodsHasTwoMethods() + { + Assert.AreEqual(2, testClass.TestMethods.Count); + } + + [Test] + public void FirstTestMethodNameIsFoo() + { + Assert.AreEqual("Foo", testClass.TestMethods[0].Name); + } + + [Test] + public void SecondTestMethodNameIsBar() + { + Assert.AreEqual("Bar", testClass.TestMethods[1].Name); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/DerivedRunTestCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/DerivedRunTestCommandTestFixture.cs new file mode 100644 index 0000000000..8c37ad3864 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/DerivedRunTestCommandTestFixture.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class DerivedRunTestCommandTestFixture + { + DerivedRunTestCommand runTestCommand; + + [SetUp] + public void Init() + { + MockRunTestCommandContext context = new MockRunTestCommandContext(); + runTestCommand = new DerivedRunTestCommand(context); + } + + [TearDown] + public void TearDown() + { + AbstractRunTestCommand.RunningTestCommand = null; + } + + [Test] + public void IsOnBeforeRunTestsMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + + [Test] + public void IsOnBeforeRunTestsMethodCalledReturnsTrueAfterOnBeforeRunMethodCalled() + { + runTestCommand.CallOnBeforeRunTestsMethod(); + Assert.IsTrue(runTestCommand.IsOnBeforeRunTestsMethodCalled); + } + + [Test] + public void IsRunningTestPropertyWhenOnBeforeRunCalledReturnsFalseByDefault() + { + AbstractRunTestCommand.RunningTestCommand = null; + runTestCommand.CallOnBeforeRunTestsMethod(); + Assert.IsFalse(runTestCommand.IsRunningTestPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void IsRunningTestPropertyWhenOnBeforeRunCalledReturnsTrueWhenRunningTestCommandIsNonNullWhenOnBeforeRunMethodCalled() + { + AbstractRunTestCommand.RunningTestCommand = runTestCommand; + runTestCommand.CallOnBeforeRunTestsMethod(); + Assert.IsTrue(runTestCommand.IsRunningTestPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void RunningTestCommandPropertyWhenOnBeforeRunCalledReturnsNullByDefault() + { + AbstractRunTestCommand.RunningTestCommand = null; + runTestCommand.CallOnBeforeRunTestsMethod(); + Assert.IsNull(runTestCommand.RunningTestCommandPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void RunningTestCommandPropertyWhenOnBeforeRunCalledReturnsNonNullWhenRunningTestCommandIsNonNullWhenOnBeforeRunMethodCalled() + { + AbstractRunTestCommand.RunningTestCommand = runTestCommand; + runTestCommand.CallOnBeforeRunTestsMethod(); + Assert.AreEqual(runTestCommand, runTestCommand.RunningTestCommandPropertyWhenOnBeforeRunCalled); + } + + [Test] + public void IsOnAfterRunTestsMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(runTestCommand.IsOnAfterRunTestsMethodCalled); + } + + [Test] + public void IsOnAfterRunTestsMethodCalledReturnsTrueAfterOnBeforeRunMethodCalled() + { + runTestCommand.CallOnAfterRunTestsMethod(); + Assert.IsTrue(runTestCommand.IsOnAfterRunTestsMethodCalled); + } + + [Test] + public void TestRunnersCreatedAreSaved() + { + MockTestRunner testRunner = runTestCommand.CallCreateTestRunner(null) as MockTestRunner; + MockTestRunner[] expectedTestRunners = new MockTestRunner[] { testRunner }; + Assert.AreEqual(expectedTestRunners, runTestCommand.TestRunnersCreated.ToArray()); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockAddInTreeTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockAddInTreeTestFixture.cs new file mode 100644 index 0000000000..f21737f422 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockAddInTreeTestFixture.cs @@ -0,0 +1,45 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.Core; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockAddInTreeTestFixture + { + MockAddInTree addinTree; + List myItems; + + [SetUp] + public void Init() + { + myItems = new List(); + myItems.Add("a"); + myItems.Add("b"); + + addinTree = new MockAddInTree(); + addinTree.AddItems("MyItems", myItems); + } + + [Test] + public void BuildItemsReturnsMyItemsListWhenMyItemsPathNameUsedAsParameter() + { + Assert.AreEqual(myItems, addinTree.BuildItems("MyItems", null)); + } + + [Test] + public void BuildItemsThrowsExceptionWhenUnknownPathNamedUsedAsParameter() + { + Assert.Throws(delegate { addinTree.BuildItems("Unknown", null); }); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildOptionsTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildOptionsTestFixture.cs new file mode 100644 index 0000000000..30353ec103 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildOptionsTestFixture.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision$ +// + +using System; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockBuildOptionsTestFixture + { + MockBuildOptions buildOptions; + + [SetUp] + public void Init() + { + buildOptions = new MockBuildOptions(); + } + + [Test] + public void ShowErrorListAfterBuildReturnsTrueByDefault() + { + Assert.IsTrue(buildOptions.ShowErrorListAfterBuild); + } + + [Test] + public void ShowErrorListAfterBuildReturnsFalseWhenSetToFalse() + { + buildOptions.ShowErrorListAfterBuild = false; + Assert.IsFalse(buildOptions.ShowErrorListAfterBuild); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildProjectBeforeTestRunTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildProjectBeforeTestRunTestFixture.cs new file mode 100644 index 0000000000..dd801fc4db --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockBuildProjectBeforeTestRunTestFixture.cs @@ -0,0 +1,88 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockBuildProjectBeforeTestRunTestFixture + { + MockBuildProjectBeforeTestRun buildProject; + MockBuildProjectBeforeTestRun createdBuildProject; + MockCSharpProject project; + MockBuildProjectFactory factory; + + [SetUp] + public void Init() + { + factory = new MockBuildProjectFactory(); + project = new MockCSharpProject(); + buildProject = new MockBuildProjectBeforeTestRun(); + factory.AddBuildProjectBeforeTestRun(buildProject); + + createdBuildProject = factory.CreateBuildProjectBeforeTestRun(project) as MockBuildProjectBeforeTestRun; + } + + [Test] + public void CreateBuildProjectBeforeTestRunReturnsObjectPassedToAddBuildProjectBeforeTestRunMethod() + { + Assert.AreEqual(buildProject, createdBuildProject); + } + + [Test] + public void ProjectPassedToBuildProjectObject() + { + Assert.AreEqual(project, buildProject.Project); + } + + [Test] + public void CallingCreateBuildProjectBeforeTestRunAgainReturnsNull() + { + Assert.IsNull(factory.CreateBuildProjectBeforeTestRun(null)); + } + + [Test] + public void FireBuildCompleteEventFiresBuildCompleteEvent() + { + bool eventFired = false; + buildProject.BuildComplete += delegate { eventFired = true; }; + buildProject.FireBuildCompleteEvent(); + + Assert.IsTrue(eventFired); + } + + [Test] + public void IsRunMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(buildProject.IsRunMethodCalled); + } + + [Test] + public void IsRunMethodCalledReturnsTrueAfterRunMethodCalled() + { + buildProject.Run(); + Assert.IsTrue(buildProject.IsRunMethodCalled); + } + + [Test] + public void LastBuildResultsIsNull() + { + Assert.IsNull(buildProject.LastBuildResults); + } + + [Test] + public void LastBuildResultsIsNotNullAfterRun() + { + buildProject.Run(); + Assert.IsNotNull(buildProject.LastBuildResults); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockClassTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockClassTestFixture.cs new file mode 100644 index 0000000000..493beb571a --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockClassTestFixture.cs @@ -0,0 +1,167 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockClassTestFixture + { + MockClass outerClass; + MockClass innerClass; + + [Test] + public void ClassCreatedWithExpectedFullyQualifiedName() + { + string fullyQualifiedName = "MyNamespace.MyClass"; + MockClass c = new MockClass(fullyQualifiedName); + Assert.AreEqual(fullyQualifiedName, c.FullyQualifiedName); + } + + [Test] + public void ClassCreatedWithFullyQualifiedNameHasMatchingDotNetName() + { + string fullyQualifiedName = "MyNamespace.MyClass"; + MockClass c = new MockClass(fullyQualifiedName); + Assert.AreEqual(fullyQualifiedName, c.DotNetName); + } + + [Test] + public void ClassCreatedWithExpectedDotNetName() + { + string fullyQualifiedName = "MyNamespace.MyClass.InnerClass"; + string dotNetName = "MyNamespace.MyClass+InnerClass"; + MockClass c = new MockClass(fullyQualifiedName, dotNetName); + Assert.AreEqual(dotNetName, c.DotNetName); + } + + [Test] + public void ClassCreatedWithNamespaceTakenFromFullyQualifiedName() + { + string fullyQualifiedName = "MyNamespace.MySubNamespace.MyClass"; + MockClass c = new MockClass(fullyQualifiedName); + string expectedNamespace = "MyNamespace.MySubNamespace"; + Assert.AreEqual(expectedNamespace, c.Namespace); + } + + [Test] + public void ClassCreatedWithNameTakenFromFullyQualifiedName() + { + string fullyQualifiedName = "MyNamespace.MySubNamespace.MyClass"; + MockClass c = new MockClass(fullyQualifiedName); + string expectedName = "MyClass"; + Assert.AreEqual(expectedName, c.Name); + } + + [Test] + public void ClassCreatedWithNoNamespaceInFullyQualifiedNameHasNamespaceOfEmptyString() + { + string fullyQualifiedName = "MyClass"; + MockClass c = new MockClass(fullyQualifiedName); + string expectedNamespace = String.Empty; + Assert.AreEqual(expectedNamespace, c.Namespace); + } + + [Test] + public void ClassHasCompilationUnit() + { + MockClass c = new MockClass(); + Assert.IsNotNull(c.CompilationUnit); + } + + [Test] + public void ClassHasMockProjectContent() + { + MockClass c = new MockClass(); + Assert.IsNotNull(c.ProjectContent as MockProjectContent); + } + + [Test] + public void CompoundClassIsClassItself() + { + MockClass c = new MockClass(); + Assert.AreEqual(c, c.GetCompoundClass()); + } + + [Test] + public void ClassDefaultReturnTypeGetUnderlyingClassMatchesOriginalMockClass() + { + MockClass c = new MockClass(); + IReturnType returnType = c.DefaultReturnType; + Assert.AreEqual(c, returnType.GetUnderlyingClass()); + } + + [Test] + public void ClassWithInnerClassHasDeclaringTypeAsOuterClass() + { + CreateClassWithInnerClass(); + Assert.AreEqual(outerClass, innerClass.DeclaringType); + } + + void CreateClassWithInnerClass() + { + outerClass = new MockClass("MyTests.A"); + innerClass = new MockClass("MyTests.A.InnerATest", "MyTests.A+InnerATest", outerClass); + } + + [Test] + public void InnerClassGetCompoundClassReturnsInnerClass() + { + CreateClassWithInnerClass(); + Assert.AreEqual(innerClass, innerClass.GetCompoundClass()); + } + + [Test] + public void InnerClassAddedToOuterClassInnerClassCollection() + { + CreateClassWithInnerClass(); + Assert.AreEqual(innerClass, outerClass.InnerClasses[0]); + } + + [Test] + public void ClassAddedToBaseTypesBecomesBaseClass() + { + MockClass c = new MockClass(); + MockClass baseClass = new MockClass(); + DefaultReturnType returnType = new DefaultReturnType(baseClass); + c.BaseTypes.Add(returnType); + Assert.AreEqual(baseClass, c.BaseClass); + } + + [Test] + public void BaseClassPropertyReturnsClassAddedUsingAddBaseClassMethod() + { + MockClass c = new MockClass(); + MockClass baseClass = new MockClass(); + c.AddBaseClass(baseClass); + Assert.AreEqual(baseClass, c.BaseClass); + } + + [Test] + public void ClassWithProjectContentHasExpectedDotNetName() + { + MockProjectContent projectContent = new MockProjectContent(); + string expectedName = "MyNamespace.MyTests"; + MockClass c = new MockClass(projectContent, expectedName); + Assert.AreEqual(expectedName, c.DotNetName); + } + + [Test] + public void GetCompoundClassReturnsClassSetWithSetCompoundClass() + { + MockClass c = new MockClass(); + MockClass compoundClass = new MockClass(); + c.SetCompoundClass(compoundClass); + Assert.AreEqual(compoundClass, c.GetCompoundClass()); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockDebuggerServiceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockDebuggerServiceTestFixture.cs new file mode 100644 index 0000000000..750dab7b01 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockDebuggerServiceTestFixture.cs @@ -0,0 +1,113 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockDebuggerServiceTestFixture + { + MockDebuggerService debuggerService; + MockDebugger debugger; + + [SetUp] + public void Init() + { + debuggerService = new MockDebuggerService(); + debugger = debuggerService.CurrentDebugger as MockDebugger; + } + + [Test] + public void IsDebuggerLoadedReturnsFalseByDefault() + { + Assert.IsFalse(debuggerService.IsDebuggerLoaded); + } + + [Test] + public void IsDebuggerLoadedReturnsTrueAfterBeingSetToTrue() + { + debuggerService.IsDebuggerLoaded = true; + Assert.IsTrue(debuggerService.IsDebuggerLoaded); + } + + [Test] + public void DebuggerIsDebuggingReturnsFalseByDefault() + { + Assert.IsFalse(debugger.IsDebugging); + } + + [Test] + public void MockDebuggerIsSameAsCurrentDebugger() + { + Assert.AreEqual(debuggerService.CurrentDebugger, debuggerService.MockDebugger); + } + + [Test] + public void DebuggerIsDebuggingReturnsTrueAfterBeingSetToTrue() + { + debugger.IsDebugging = true; + Assert.IsTrue(debugger.IsDebugging); + } + + [Test] + public void DebuggerIsStopCalledReturnsFalseByDefault() + { + Assert.IsFalse(debugger.IsStopCalled); + } + + [Test] + public void DebuggerIsStopCalledReturnsTrueAfterStopMethodCalled() + { + debugger.Stop(); + Assert.IsTrue(debugger.IsStopCalled); + } + + [Test] + public void DebuggerFireDebugStoppedEventFiresDebugStoppedEvent() + { + bool fired = false; + debugger.DebugStopped += delegate { + fired = true; + }; + debugger.FireDebugStoppedEvent(); + + Assert.IsTrue(fired); + } + + [Test] + public void DebuggerProcessStartInfoReturnsNullByDefault() + { + Assert.IsNull(debugger.ProcessStartInfo); + } + + [Test] + public void DebuggerProcessStartInfoSavedAfterStartMethodCalled() + { + ProcessStartInfo startInfo = new ProcessStartInfo(); + debugger.Start(startInfo); + + Assert.AreEqual(startInfo, debugger.ProcessStartInfo); + } + + [Test] + public void DebuggerWillThrowExceptionIfConfiguredWhenStartMethodCalled() + { + ApplicationException expectedException = new ApplicationException(); + debugger.ThrowExceptionOnStart = expectedException; + + ProcessStartInfo processStartInfo = new ProcessStartInfo(); + ApplicationException actualException = + Assert.Throws(delegate { debugger.Start(processStartInfo); }); + Assert.AreEqual(expectedException, actualException); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockFileServiceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockFileServiceTestFixture.cs new file mode 100644 index 0000000000..c10a2fa8c0 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockFileServiceTestFixture.cs @@ -0,0 +1,101 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockFileServiceTestFixture + { + MockFileService fileService; + + [SetUp] + public void Init() + { + fileService = new MockFileService(); + } + + [Test] + public void FileOpenedReturnsNullByDefault() + { + Assert.IsNull(fileService.FileOpened); + } + + [Test] + public void FileOpenedReturnsFileNamePassedToOpenFileMethod() + { + fileService.OpenFile("test.cs"); + Assert.AreEqual("test.cs", fileService.FileOpened); + } + + [Test] + public void FilePositionsAreEqualWhenFileNameAndPositionAreEqual() + { + FilePosition lhs = new FilePosition("test.cs", 1, 2); + FilePosition rhs = new FilePosition("test.cs", 1, 2); + + Assert.AreEqual(lhs, rhs); + } + + [Test] + public void FilePositionEqualsReturnsFalseWhenNullPassed() + { + FilePosition lhs = new FilePosition("test.cs", 1, 2); + Assert.IsFalse(lhs.Equals(null)); + } + + [Test] + public void FilePositionsAreNotEqualWhenFileNamesAreNotEqual() + { + FilePosition lhs = new FilePosition("test1.cs", 1, 2); + FilePosition rhs = new FilePosition("test2.cs", 1, 2); + + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void FilePositionsAreNotEqualWhenLinesAreNotEqual() + { + FilePosition lhs = new FilePosition("test.cs", 500, 2); + FilePosition rhs = new FilePosition("test.cs", 1, 2); + + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void FilePositionsAreNotEqualWhenColumnsAreNotEqual() + { + FilePosition lhs = new FilePosition("test.cs", 1, 2000); + FilePosition rhs = new FilePosition("test.cs", 1, 2); + + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void FilePositionJumpedToIsNullByDefault() + { + Assert.IsNull(fileService.FilePositionJumpedTo); + } + + [Test] + public void FilePositionJumpedToReturnsParametersPassedToJumpToFilePositionMethod() + { + int line = 1; + int col = 10; + string fileName = "test.cs"; + fileService.JumpToFilePosition(fileName, line, col); + + FilePosition expectedFilePos = new FilePosition(fileName, line, col); + + Assert.AreEqual(expectedFilePos, fileService.FilePositionJumpedTo); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMessageServiceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMessageServiceTestFixture.cs new file mode 100644 index 0000000000..a85f91cf77 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMessageServiceTestFixture.cs @@ -0,0 +1,69 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockMessageServiceTestFixture + { + MockMessageService messageService; + + [SetUp] + public void Init() + { + messageService = new MockMessageService(); + } + + [Test] + public void CaptionIsNullByDefault() + { + Assert.IsNull(messageService.Caption); + } + + [Test] + public void QuestionIsNullByDefault() + { + Assert.IsNull(messageService.Question); + } + + [Test] + public void QuestionIsSavedAfterAskQuestionMethodIsCalled() + { + string expectedQuestion = "question"; + messageService.AskQuestion(expectedQuestion, null); + + Assert.AreEqual(expectedQuestion, messageService.Question); + } + + [Test] + public void CaptionIsSavedAfterAskQuestionMethodIsCalled() + { + string expectedCaption = "caption"; + messageService.AskQuestion(null, expectedCaption); + + Assert.AreEqual(expectedCaption, messageService.Caption); + } + + [Test] + public void AskQuestionMethodReturnsFalseByDefault() + { + Assert.IsFalse(messageService.AskQuestion(null, null)); + } + + [Test] + public void AskQuestionMethodReturnsTrueWhenConfigured() + { + messageService.AskQuestionReturnValue = true; + Assert.IsTrue(messageService.AskQuestion(null, null)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMethodTestFixture.cs new file mode 100644 index 0000000000..6526562205 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockMethodTestFixture.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockMethodTestFixture + { + [Test] + public void DeclaringTypeReturnsExpectedClassWhenMethodCreated() + { + MockClass declaringType = new MockClass(); + MockMethod method = new MockMethod(declaringType); + Assert.AreEqual(declaringType, method.DeclaringType); + } + + [Test] + public void NameReturnsExpectedMethodNameWhenMethodCreated() + { + MockClass declaringType = new MockClass(); + MockMethod method = new MockMethod(declaringType, "MyMethod"); + Assert.AreEqual("MyMethod", method.Name); + } + + [Test] + public void FullyQualifiedNameReturnsFullyQualifiedMethodName() + { + MockClass declaringType = new MockClass("MyNamespace.MyClass"); + MockMethod method = new MockMethod(declaringType, "MyMethod"); + string expectedName = "MyNamespace.MyClass.MyMethod"; + Assert.AreEqual(expectedName, method.FullyQualifiedName); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestFrameworkTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestFrameworkTestFixture.cs new file mode 100644 index 0000000000..7cc2ae9a66 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestFrameworkTestFixture.cs @@ -0,0 +1,139 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockNUnitTestFrameworkTestFixture + { + MockRunTestCommandContext context; + MockProcessRunner processRunner; + MockNUnitTestFramework testFramework; + NUnitTestRunner testRunner; + NUnitTestDebugger testDebugger; + MockDebuggerService debuggerService; + + [SetUp] + public void Init() + { + context = new MockRunTestCommandContext(); + processRunner = new MockProcessRunner(); + debuggerService = new MockDebuggerService(); + + testFramework = new MockNUnitTestFramework(debuggerService, + processRunner, + context.MockTestResultsMonitor, + context.UnitTestingOptions, + context.MessageService); + + testRunner = testFramework.CreateTestRunner() as NUnitTestRunner; + testDebugger = testFramework.CreateTestDebugger() as NUnitTestDebugger; + } + + [Test] + public void CreateTestRunnerCreatesNUnitTestRunner() + { + Assert.IsNotNull(testRunner); + } + + [Test] + public void NUnitTestRunnerAddedToTestRunnersCreatedList() + { + List expectedRunners = new List(); + expectedRunners.Add(testRunner); + + Assert.AreEqual(expectedRunners.ToArray(), testFramework.NUnitTestRunnersCreated.ToArray()); + } + + [Test] + public void NUnitTestRunnerCreatedWithMockProcessRunnerAndUnitTestingOptions() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + testRunner.Start(tests); + + NUnitConsoleApplication app = new NUnitConsoleApplication(tests, context.UnitTestingOptions); + string expectedArguments = app.GetArguments(); + Assert.AreEqual(expectedArguments, processRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void NUnitTestRunnerCreatedWithMockTestResultsMonitor() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + testRunner.Start(tests); + + Assert.IsTrue(context.MockTestResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void NUnitTestDebuggerCreated() + { + Assert.IsNotNull(testDebugger); + } + + [Test] + public void NUnitTestDebuggerAddedToTestDebuggersCreatedList() + { + List expectedDebuggers = new List(); + expectedDebuggers.Add(testDebugger); + + Assert.AreEqual(expectedDebuggers.ToArray(), testFramework.NUnitTestDebuggersCreated.ToArray()); + } + + [Test] + public void NUnitTestDebuggerCreatedWithMockTestResultsMonitor() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + testDebugger.Start(tests); + + Assert.IsTrue(context.MockTestResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void NUnitTestDebuggerCreatedWithDebuggerService() + { + context.UnitTestingOptions.NoShadow = true; + + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + testDebugger.Start(tests); + + NUnitConsoleApplication app = new NUnitConsoleApplication(tests, context.UnitTestingOptions); + string expectedArguments = app.GetArguments(); + Assert.AreEqual(expectedArguments, debuggerService.MockDebugger.ProcessStartInfo.Arguments); + } + + [Test] + public void NUnitTestDebuggerCreatedWithMessageService() + { + context.MockMessageService.AskQuestionReturnValue = true; + debuggerService.IsDebuggerLoaded = true; + debuggerService.MockDebugger.IsDebugging = true; + + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + testDebugger.Start(tests); + + Assert.IsNotNull(context.MockMessageService.Question); + } + + [Test] + public void IsBuildNeededBeforeTestRunReturnsTrue() + { + Assert.IsTrue(testFramework.IsBuildNeededBeforeTestRun); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestRunnerContextTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestRunnerContextTestFixture.cs new file mode 100644 index 0000000000..dd76a5de8e --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockNUnitTestRunnerContextTestFixture.cs @@ -0,0 +1,45 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockNUnitTestRunnerContextTestFixture + { + MockNUnitTestRunnerContext context; + + [SetUp] + public void Init() + { + context = new MockNUnitTestRunnerContext(); + } + + [Test] + public void MockProcessRunnerIsNotNull() + { + Assert.IsNotNull(context.MockProcessRunner); + } + + [Test] + public void MockTestResultsMonitorExists() + { + Assert.IsNotNull(context.MockTestResultsMonitor); + } + + [Test] + public void MockTestsResultsMonitorFileNameIsTmp66DotTmp() + { + string expectedFileName = @"c:\temp\tmp66.tmp"; + Assert.AreEqual(expectedFileName, context.MockTestResultsMonitor.FileName.ToString()); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProcessRunnerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProcessRunnerTestFixture.cs new file mode 100644 index 0000000000..946ed9c4d1 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProcessRunnerTestFixture.cs @@ -0,0 +1,121 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Util; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockProcessRunnerTestFixture + { + MockProcessRunner processRunner; + + [SetUp] + public void Init() + { + processRunner = new MockProcessRunner(); + } + + [Test] + public void LogStandardOutputAndErrorReturnsTrueByDefault() + { + Assert.IsTrue(processRunner.LogStandardOutputAndError); + } + + [Test] + public void LogStandardOutputAndErrorReturnsFalseIfSetToFalse() + { + processRunner.LogStandardOutputAndError = false; + Assert.IsFalse(processRunner.LogStandardOutputAndError); + } + + [Test] + public void CommandPassedToStartMethodReturnsNullByDefault() + { + Assert.IsNull(processRunner.CommandPassedToStartMethod); + } + + [Test] + public void CommandArgumentsPassedToStartMethodReturnsNullByDefault() + { + Assert.IsNull(processRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void CommandPassedToStartMethodIsNUnitConsoleExeAfterStartMethodIsCalled() + { + string command = "nunit-console.exe"; + processRunner.Start(command, null); + Assert.AreEqual(command, processRunner.CommandPassedToStartMethod); + } + + [Test] + public void CommandArgumentsPassedToStartMethodIsTestAfterStartMethodIsCalled() + { + string args = "test"; + processRunner.Start(null, args); + Assert.AreEqual(args, processRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void IsKillMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(processRunner.IsKillMethodCalled); + } + + [Test] + public void IsKillMethodCalledReturnsTrueAfterKillMethodCalled() + { + processRunner.Kill(); + Assert.IsTrue(processRunner.IsKillMethodCalled); + } + + [Test] + public void FireProcessExitedEventFiresEvent() + { + bool fired = false; + processRunner.ProcessExited += delegate (object o, EventArgs e) { + fired = true; + }; + processRunner.FireProcessExitedEvent(); + + Assert.IsTrue(fired); + } + + [Test] + public void FireOutputLineReceivedEventFiresEventAndReturnsExpectedLine() + { + LineReceivedEventArgs expectedEventArgs = null; + processRunner.OutputLineReceived += delegate (object o, LineReceivedEventArgs e) { + expectedEventArgs = e; + }; + string line = "test"; + LineReceivedEventArgs eventArgs = new LineReceivedEventArgs(line); + processRunner.FireOutputLineReceivedEvent(eventArgs); + + Assert.AreEqual(line, expectedEventArgs.Line); + } + + [Test] + public void FireErrorLineReceivedEventFiresEventAndReturnsExpectedLine() + { + LineReceivedEventArgs expectedEventArgs = null; + processRunner.ErrorLineReceived += delegate (object o, LineReceivedEventArgs e) { + expectedEventArgs = e; + }; + string line = "test"; + LineReceivedEventArgs eventArgs = new LineReceivedEventArgs(line); + processRunner.FireErrorLineReceivedEvent(eventArgs); + + Assert.AreEqual(line, expectedEventArgs.Line); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectContentTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectContentTestFixture.cs new file mode 100644 index 0000000000..adfccf2ff7 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectContentTestFixture.cs @@ -0,0 +1,55 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockProjectContentTestFixture + { + MockProjectContent projectContent; + + [SetUp] + public void Init() + { + projectContent = new MockProjectContent(); + } + + [Test] + public void LanguageIsCSharpLanguage() + { + Assert.AreEqual(LanguageProperties.CSharp, projectContent.Language); + } + + [Test] + public void SystemTypesIsNotNull() + { + Assert.IsNotNull(projectContent.SystemTypes); + } + + [Test] + public void SystemObjectReturnTypeReturnedFromSystemTypesHasSystemObjectFullyQualifiedName() + { + string expectedName = "System.Object"; + IReturnType returnType = projectContent.SystemTypes.Object; + Assert.AreEqual(expectedName, returnType.FullyQualifiedName); + } + + [Test] + public void GetClassWithTypeParameterCountReturnsMockClassWithSpecifiedName() + { + string expectedName = "MyNamespace.MyTestClass"; + MockClass c = projectContent.GetClass(expectedName, 0) as MockClass; + Assert.AreEqual(expectedName, c.FullyQualifiedName); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectSaveTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectSaveTestFixture.cs new file mode 100644 index 0000000000..2a0fa5df53 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockProjectSaveTestFixture.cs @@ -0,0 +1,41 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockProjectSaveTestFixture + { + MockCSharpProject project; + + [SetUp] + public void Init() + { + project = new MockCSharpProject(); + project.FileName = @"e:\projects\myproj.csproj"; + } + + [Test] + public void IsSavedReturnsFalseByDefault() + { + Assert.IsFalse(project.IsSaved); + } + + [Test] + public void IsSavedReturnsTrueAfterSaveMethodCalled() + { + project.Save(); + Assert.IsTrue(project.IsSaved); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRegisteredTestFrameworksTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRegisteredTestFrameworksTestFixture.cs new file mode 100644 index 0000000000..3dae682242 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRegisteredTestFrameworksTestFixture.cs @@ -0,0 +1,75 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockRegisteredTestFrameworksTestFixture + { + MockRegisteredTestFrameworks testFrameworks; + MockTestFramework testFramework; + MockCSharpProject project; + + [SetUp] + public void Init() + { + testFrameworks = new MockRegisteredTestFrameworks(); + + testFramework = new MockTestFramework(); + project = new MockCSharpProject(); + testFrameworks.AddTestFrameworkForProject(project, testFramework); + } + + [Test] + public void CreateTestRunnerForKnownProjectCreatesTestRunnerInKnownTestFramework() + { + ITestRunner testRunner = testFrameworks.CreateTestRunner(project); + ITestRunner expectedTestRunner = testFramework.TestRunnersCreated[0]; + Assert.AreEqual(expectedTestRunner, testRunner); + } + + [Test] + public void CreateTestRunnerReturnsNullForUnknownProject() + { + MockCSharpProject unknownProject = new MockCSharpProject(); + Assert.IsNull(testFrameworks.CreateTestRunner(unknownProject)); + } + + [Test] + public void GetTestFrameworkForProjectReturnsTestFrameworkForKnownProject() + { + Assert.AreEqual(testFramework, testFrameworks.GetTestFrameworkForProject(project)); + } + + [Test] + public void GetTestFrameworkForProjectReturnsTestFrameworkForUnknownProject() + { + MockCSharpProject unknownProject = new MockCSharpProject(); + Assert.IsNull(testFrameworks.GetTestFrameworkForProject(unknownProject)); + } + + [Test] + public void CreateTestDebuggerForKnownProjectCreatesTestDebuggerInKnownTestFramework() + { + ITestRunner testRunner = testFrameworks.CreateTestDebugger(project); + ITestRunner expectedTestRunner = testFramework.TestDebuggersCreated[0]; + Assert.AreEqual(expectedTestRunner, testRunner); + } + + [Test] + public void CreateTestDebuggerReturnsNullForUnknownProject() + { + MockCSharpProject unknownProject = new MockCSharpProject(); + Assert.IsNull(testFrameworks.CreateTestDebugger(unknownProject)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRunTestCommandContextTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRunTestCommandContextTestFixture.cs new file mode 100644 index 0000000000..5866245cae --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockRunTestCommandContextTestFixture.cs @@ -0,0 +1,80 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockRunTestCommandContextTestFixture + { + IRunTestCommandContext runTestCommandContext; + + [SetUp] + public void Init() + { + runTestCommandContext = new MockRunTestCommandContext(); + } + + [Test] + public void UnitTestingOptionsIsNotNull() + { + MockRunTestCommandContext context = new MockRunTestCommandContext(); + Assert.IsNotNull(context.UnitTestingOptions); + } + + [Test] + public void RegisteredTestFrameworksIsMockRegisteredTestFrameworks() + { + Assert.IsNotNull(runTestCommandContext.RegisteredTestFrameworks as MockRegisteredTestFrameworks); + } + + [Test] + public void TaskServiceIsMockTaskService() + { + Assert.IsNotNull(runTestCommandContext.TaskService as MockTaskService); + } + + [Test] + public void WorkbenchIsMockUnitTestWorkbench() + { + Assert.IsNotNull(runTestCommandContext.Workbench as MockUnitTestWorkbench); + } + + [Test] + public void BuildProjectFactoryIsMockBuildProjectFactory() + { + Assert.IsNotNull(runTestCommandContext.BuildProjectFactory as MockBuildProjectFactory); + } + + [Test] + public void BuildOptionsIsMockBuildOptions() + { + Assert.IsNotNull(runTestCommandContext.BuildOptions as MockBuildOptions); + } + + [Test] + public void UnitTestCategoryIsMessageViewWithCategoryNameUnitTests() + { + Assert.AreEqual("Unit Tests", runTestCommandContext.UnitTestCategory.Category); + } + + [Test] + public void UnitTestsPadIsMockUnitTestsPad() + { + Assert.IsNotNull(runTestCommandContext.OpenUnitTestsPad as MockUnitTestsPad); + } + + [Test] + public void MessageServiceIsMockMessageService() + { + Assert.IsNotNull(runTestCommandContext.MessageService as MockMessageService); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockSaveAllFilesCommandTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockSaveAllFilesCommandTestFixture.cs new file mode 100644 index 0000000000..cde4abc271 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockSaveAllFilesCommandTestFixture.cs @@ -0,0 +1,39 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockSaveAllFilesCommandTestFixture + { + MockSaveAllFilesCommand saveAllFilesCommand; + + [SetUp] + public void Init() + { + saveAllFilesCommand = new MockSaveAllFilesCommand(); + } + + [Test] + public void IsSaveAllFilesMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(saveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + + [Test] + public void IsSaveAllFilesMethodCalledReturnsTrueAfterMethodIsCalled() + { + saveAllFilesCommand.SaveAllFiles(); + Assert.IsTrue(saveAllFilesCommand.IsSaveAllFilesMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTaskServiceTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTaskServiceTestFixture.cs new file mode 100644 index 0000000000..b648a6a9ca --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTaskServiceTestFixture.cs @@ -0,0 +1,102 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockTaskServiceTestFixture + { + MockTaskService taskService; + + [SetUp] + public void Init() + { + taskService = new MockTaskService(); + } + + [Test] + public void IsClearExceptCommentTasksMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(taskService.IsClearExceptCommentTasksMethodCalled); + } + + [Test] + public void IsClearExceptCommentTasksMethodCalledReturnsTrueAfterClearExceptCommentTasksMethodCalled() + { + taskService.ClearExceptCommentTasks(); + Assert.IsTrue(taskService.IsClearExceptCommentTasksMethodCalled); + } + + [Test] + public void IsInUpdateWhilstClearExceptCommentTasksMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(taskService.IsInUpdateWhilstClearExceptCommentTasksMethodCalled); + } + + [Test] + public void IsInUpdateWhilstClearExceptCommentTasksMethodCalledReturnsFalseWhenIsInUpdateIsFalseDuringMethodCall() + { + taskService.ClearExceptCommentTasks(); + Assert.IsFalse(taskService.IsInUpdateWhilstClearExceptCommentTasksMethodCalled); + } + + [Test] + public void IsInUpdateWhilstClearExceptCommentTasksMethodCalledReturnsTrueWhenIsInUpdateIsTrueDuringMethodCall() + { + taskService.InUpdate = true; + taskService.ClearExceptCommentTasks(); + Assert.IsTrue(taskService.IsInUpdateWhilstClearExceptCommentTasksMethodCalled); + } + + [Test] + public void SomethingWentWrongReturnsFalseByDefault() + { + Assert.IsFalse(taskService.SomethingWentWrong); + } + + [Test] + public void SomethingWentWrongReturnsTrueWhenErrorTaskAddedToTaskService() + { + FileName fileName = new FileName("test.cs"); + Task task = new Task(fileName, String.Empty, 1, 2, TaskType.Error); + taskService.Add(task); + Assert.IsTrue(taskService.SomethingWentWrong); + } + + [Test] + public void SomethingWentWrongReturnsTrueWhenWarningTaskAddedToTaskService() + { + FileName fileName = new FileName("test.cs"); + Task task = new Task(fileName, String.Empty, 1, 2, TaskType.Warning); + taskService.Add(task); + Assert.IsTrue(taskService.SomethingWentWrong); + } + + [Test] + public void NoTasksAddedToTaskServiceByDefault() + { + Assert.AreEqual(0, taskService.Tasks.Count); + } + + [Test] + public void TasksAddedToTaskServiceAreSaved() + { + FileName fileName = new FileName("test.cs"); + Task task = new Task(fileName, "description", 1, 1, TaskType.Error); + taskService.Add(task); + + Task[] tasks = new Task[] { task }; + + Assert.AreEqual(tasks, taskService.Tasks.ToArray()); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkFactoryTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkFactoryTestFixture.cs new file mode 100644 index 0000000000..c779c5a86d --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkFactoryTestFixture.cs @@ -0,0 +1,55 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockObjectCreatorTestFixture + { + MockTestFrameworkFactory factory; + MockTestFramework myTestFramework; + + [SetUp] + public void Init() + { + factory = new MockTestFrameworkFactory(); + myTestFramework = new MockTestFramework(); + factory.Add("MyClass", myTestFramework); + } + + [Test] + public void CreateMethodPassedMyClassNameReturnsMyTestFramework() + { + Assert.AreSame(myTestFramework, factory.Create("MyClass")); + } + + [Test] + public void CreateMethodPassedUnknownClassNameReturnNull() + { + Assert.IsNull(factory.Create("Unknown")); + } + + [Test] + public void ClassNamesPassedToCreateAreRecorded() + { + List expectedClassNames = new List(); + expectedClassNames.Add("a"); + expectedClassNames.Add("b"); + expectedClassNames.Add("c"); + + factory.Create("a"); + factory.Create("b"); + factory.Create("c"); + + Assert.AreEqual(expectedClassNames, factory.ClassNamesPassedToCreateMethod); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkTestFixture.cs new file mode 100644 index 0000000000..dbb3b594e6 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworkTestFixture.cs @@ -0,0 +1,160 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestFrameworkTestFixture + { + MockTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new MockTestFramework(); + } + + [Test] + public void IsTestMethodReturnsFalseByDefault() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestMethod(method)); + } + + [Test] + public void IsTestMethodIMemberParameterIsInitiallyNull() + { + Assert.IsNull(testFramework.IsTestMethodMemberParameterUsed); + } + + [Test] + public void IsTestMethodCallRecorded() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + testFramework.IsTestMethod(method); + Assert.AreEqual(method, testFramework.IsTestMethodMemberParameterUsed); + } + + [Test] + public void IsTestMethodReturnsTrueIfMethodMatchesMethodPreviouslySpecified() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + testFramework.AddTestMethod(method); + + Assert.IsTrue(testFramework.IsTestMethod(method)); + } + + [Test] + public void IsTestClassReturnsFalseByDefault() + { + MockClass c = new MockClass(); + Assert.IsFalse(testFramework.IsTestClass(c)); + } + + [Test] + public void IsTestClassReturnsTrueIfClassMatchesClassPreviouslySpecified() + { + MockClass c = new MockClass(); + testFramework.AddTestClass(c); + + Assert.IsTrue(testFramework.IsTestClass(c)); + } + + [Test] + public void IsTestClassIClassParameterIsInitiallyNull() + { + Assert.IsNull(testFramework.IsTestClassParameterUsed); + } + + [Test] + public void IsTestClassCallRecorded() + { + MockClass c = new MockClass(); + testFramework.IsTestClass(c); + Assert.AreEqual(c, testFramework.IsTestClassParameterUsed); + } + + [Test] + public void IsTestProjectReturnsFalseByDefault() + { + MockCSharpProject project = new MockCSharpProject(); + Assert.IsFalse(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueIfProjectMatchesProjectPreviouslySpecified() + { + MockCSharpProject project = new MockCSharpProject(); + testFramework.AddTestProject(project); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectIProjectParameterIsInitiallyNull() + { + Assert.IsNull(testFramework.IsTestProjectParameterUsed); + } + + [Test] + public void IsTestProjectallRecorded() + { + MockCSharpProject project = new MockCSharpProject(); + testFramework.IsTestProject(project); + Assert.AreEqual(project, testFramework.IsTestProjectParameterUsed); + } + + [Test] + public void IsTestClassReturnsFalseAfterTestClassRemovedFromTestFramework() + { + MockClass c = new MockClass(); + testFramework.AddTestClass(c); + testFramework.RemoveTestClass(c); + + Assert.IsFalse(testFramework.IsTestClass(c)); + } + + [Test] + public void CreateTestRunnerReturnsNewMockTestRunner() + { + Assert.IsInstanceOf(typeof(MockTestRunner), testFramework.CreateTestRunner()); + } + + [Test] + public void TestRunnersCreatedReturnsTestRunnersCreatedByCallingCreateTestRunnerMethod() + { + List expectedRunners = new List(); + expectedRunners.Add(testFramework.CreateTestRunner()); + expectedRunners.Add(testFramework.CreateTestRunner()); + + Assert.AreEqual(expectedRunners.ToArray(), testFramework.TestRunnersCreated.ToArray()); + } + + [Test] + public void TestDebuggersCreatedReturnsTestRunnersCreatedByCallingCreateTestDebuggerMethod() + { + List expectedRunners = new List(); + expectedRunners.Add(testFramework.CreateTestDebugger()); + expectedRunners.Add(testFramework.CreateTestDebugger()); + + Assert.AreEqual(expectedRunners.ToArray(), testFramework.TestDebuggersCreated.ToArray()); + } + + [Test] + public void IsBuildNeededBeforeTestRunReturnsTrueByDefault() + { + Assert.IsTrue(testFramework.IsBuildNeededBeforeTestRun); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworksWithNUnitFrameworkSupportTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworksWithNUnitFrameworkSupportTestFixture.cs new file mode 100644 index 0000000000..7d76a40545 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestFrameworksWithNUnitFrameworkSupportTestFixture.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestFrameworksWithNUnitFrameworkSupportTestFixture + { + MockTestFrameworksWithNUnitFrameworkSupport testFrameworks; + + [SetUp] + public void Init() + { + testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport(); + } + + [Test] + public void ImplementsIRegisteredTestFrameworkInterface() + { + Assert.IsNotNull(testFrameworks as IRegisteredTestFrameworks); + } + + [Test] + public void IsNUnitTestFramework() + { + Assert.IsInstanceOf(typeof(NUnitTestFramework), testFrameworks); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestResultsMonitorTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestResultsMonitorTestFixture.cs new file mode 100644 index 0000000000..416bf54cee --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestResultsMonitorTestFixture.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestResultsMonitorTestFixture + { + MockTestResultsMonitor testResultsMonitor; + + [SetUp] + public void Init() + { + testResultsMonitor = new MockTestResultsMonitor(); + } + + [Test] + public void IsStopMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(testResultsMonitor.IsStopMethodCalled); + } + + [Test] + public void IsStopMethodCalledReturnsTrueAfterStopMethodCalled() + { + testResultsMonitor.Stop(); + Assert.IsTrue(testResultsMonitor.IsStopMethodCalled); + } + + [Test] + public void IsStopMethodCalledCanBeResetAfterStopMethodIsCalled() + { + testResultsMonitor.Stop(); + testResultsMonitor.IsStopMethodCalled = false; + Assert.IsFalse(testResultsMonitor.IsStopMethodCalled); + } + + [Test] + public void IsDisposeMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(testResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void IsDisposeMethodCalledReturnsTrueAfterStopMethodCalled() + { + testResultsMonitor.Dispose(); + Assert.IsTrue(testResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void IsStartMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(testResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void IsStopMethodCalledReturnsTrueAfterStartMethodCalled() + { + testResultsMonitor.Start(); + Assert.IsTrue(testResultsMonitor.IsStartMethodCalled); + } + + [Test] + public void FileNamePropertyReturnsNullByDefault() + { + Assert.IsNull(testResultsMonitor.FileName); + } + + [Test] + public void FileNamePropertyReturnsFileNameSet() + { + testResultsMonitor.FileName = "test.xml"; + Assert.AreEqual("test.xml", testResultsMonitor.FileName); + } + + [Test] + public void FireTestFinishedEventTriggersTestFinishedEvent() + { + TestResult expectedResult = new TestResult("abc"); + TestResult result = null; + testResultsMonitor.TestFinished += + delegate(object source, TestFinishedEventArgs e) { + result = e.Result; + }; + + testResultsMonitor.FireTestFinishedEvent(expectedResult); + + Assert.AreEqual(expectedResult, result); + } + + [Test] + public void IsReadMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(testResultsMonitor.IsReadMethodCalled); + } + + [Test] + public void IsReadMethodCalledReturnsTrueAfterReadMethodCalled() + { + testResultsMonitor.Read(); + Assert.IsTrue(testResultsMonitor.IsReadMethodCalled); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestRunnerTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestRunnerTestFixture.cs new file mode 100644 index 0000000000..4b8a365b75 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockTestRunnerTestFixture.cs @@ -0,0 +1,125 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestRunnerTestFixture + { + MockTestRunner testRunner; + + [SetUp] + public void Init() + { + testRunner = new MockTestRunner(); + } + + [Test] + public void IsDisposeCalledReturnsTrueAfterDisposeMethodCalled() + { + testRunner.Dispose(); + Assert.IsTrue(testRunner.IsDisposeCalled); + } + + [Test] + public void IsDisposeCalledReturnsFalseByDefault() + { + Assert.IsFalse(testRunner.IsDisposeCalled); + } + + [Test] + public void IsStartCalledReturnsTrueAfterStartMethodCalled() + { + SelectedTests selectedTests = new SelectedTests(null); + testRunner.Start(selectedTests); + Assert.IsTrue(testRunner.IsStartCalled); + } + + [Test] + public void IsStartCalledReturnsFalseByDefault() + { + Assert.IsFalse(testRunner.IsStartCalled); + } + + [Test] + public void IsStopCalledReturnsTrueAfterStartMethodCalled() + { + testRunner.Stop(); + Assert.IsTrue(testRunner.IsStopCalled); + } + + [Test] + public void IsStopCalledReturnsFalseByDefault() + { + Assert.IsFalse(testRunner.IsStopCalled); + } + + [Test] + public void FireTestFinishedEventTriggersTestFinishedEvent() + { + TestResult expectedResult = new TestResult("abc"); + TestResult result = null; + testRunner.TestFinished += + delegate(object source, TestFinishedEventArgs e) { + result = e.Result; + }; + + testRunner.FireTestFinishedEvent(expectedResult); + + Assert.AreEqual(expectedResult, result); + } + + [Test] + public void SelectedTestsPassedToStartMethodIsNullByDefault() + { + Assert.IsNull(testRunner.SelectedTestsPassedToStartMethod); + } + + [Test] + public void SelectedTestsPassedToStartMethodIsSaved() + { + SelectedTests expectedSelectedTests = new SelectedTests(null); + testRunner.Start(expectedSelectedTests); + + Assert.AreEqual(expectedSelectedTests, testRunner.SelectedTestsPassedToStartMethod); + } + + [Test] + public void FireAllTestFinishedsEventTriggersAllTestsFinishedEvent() + { + bool fired = false; + testRunner.AllTestsFinished += + delegate(object source, EventArgs e) { + fired = true; + }; + + testRunner.FireAllTestsFinishedEvent(); + + Assert.IsTrue(fired); + } + + [Test] + public void FireMessageReceivedEventTriggersMessageReceivedEvent() + { + string message = null; + testRunner.MessageReceived += + delegate(object source, MessageReceivedEventArgs e) { + message = e.Message; + }; + + string expectedMessage = "test"; + testRunner.FireMessageReceivedEvent(expectedMessage); + + Assert.AreEqual(expectedMessage, message); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestWorkbenchTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestWorkbenchTestFixture.cs new file mode 100644 index 0000000000..a1f268ea3f --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestWorkbenchTestFixture.cs @@ -0,0 +1,144 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockUnitTestWorkbenchTestFixture + { + MockUnitTestWorkbench workbench; + TestResult resultShown; + bool testAsyncMethodCalled; + + [SetUp] + public void Init() + { + workbench = new MockUnitTestWorkbench(); + } + + [Test] + public void GetPadReturnsNullForUnknownType() + { + Assert.IsNull(workbench.GetPad(typeof(String))); + } + + [Test] + public void NoActionsPassedToSafeThreadAsyncCallMethod() + { + Assert.AreEqual(0, workbench.SafeThreadAsyncMethodCalls.Count); + } + + [Test] + public void MethodStoredInSafeThreadAsyncMethodCallsCollectionAfterSafeThreadAsyncCallMethodCalled() + { + workbench.SafeThreadAsyncCall(this.MethodStoredInSafeThreadAsyncMethodCallsCollectionAfterSafeThreadAsyncCallMethodCalled); + + Action action = this.MethodStoredInSafeThreadAsyncMethodCallsCollectionAfterSafeThreadAsyncCallMethodCalled; + Assert.AreEqual(action, workbench.SafeThreadAsyncMethodCalls[0]); + } + + [Test] + public void MethodWithParameterStoredInSafeThreadAsyncMethodCallsCollectionAfterSafeThreadAsyncCallMethodCalled() + { + TestResult result = new TestResult("abc"); + workbench.SafeThreadAsyncCall(this.ShowResults, result); + + ActionArguments actionArgs = new ActionArguments(); + actionArgs.Action = this.ShowResults; + actionArgs.Arg = result; + + Assert.AreEqual(actionArgs, workbench.SafeThreadAsyncMethodCallsWithArguments[0]); + } + + void ShowResults(TestResult result) + { + resultShown = result; + } + + [Test] + public void SafeThreadAsyncCallWillCallActualMethodIfMakeMethodCallsSetToTrue() + { + TestResult result = new TestResult("abc"); + workbench.MakeSafeThreadAsyncMethodCallsWithArguments = true; + workbench.SafeThreadAsyncCall(this.ShowResults, result); + + Assert.AreEqual(result, resultShown); + } + + [Test] + public void NonGenericSafeThreadAsyncCallWillCallActualMethodIfMakeMethodCallsSetToTrue() + { + workbench.MakeNonGenericSafeThreadAsyncMethodCalls = true; + workbench.SafeThreadAsyncCall(this.TestAsyncCallMethod); + + Assert.IsTrue(testAsyncMethodCalled); + } + + void TestAsyncCallMethod() + { + testAsyncMethodCalled = true; + } + + [Test] + public void MakeMethodCallsIsFalseByDefault() + { + Assert.IsFalse(workbench.MakeSafeThreadAsyncMethodCallsWithArguments); + } + + [Test] + public void TypesPassedToGetPadMethodReturnsEmptyCollectionByDefault() + { + Assert.AreEqual(0, workbench.TypesPassedToGetPadMethod.Count); + } + + [Test] + public void ErrorListTypeStoredInTypesPassedToGetPadMethod() + { + workbench.GetPad(typeof(ErrorListPad)); + Type[] expectedTypes = new Type[] { typeof(ErrorListPad) }; + + Assert.AreEqual(expectedTypes, workbench.TypesPassedToGetPadMethod.ToArray()); + } + + [Test] + public void CompilerMessageViewPadExistsInWorkbench() + { + PadDescriptor actualPadDescriptor = workbench.GetPad(typeof(CompilerMessageView)); + Assert.IsNotNull(actualPadDescriptor); + } + + [Test] + public void ErrorListPadExistsInWorkbench() + { + PadDescriptor actualPadDescriptor = workbench.GetPad(typeof(ErrorListPad)); + Assert.IsNotNull(actualPadDescriptor); + } + + [Test] + public void ErrorListPadDescriptorPropertyReturnsErrorListPad() + { + string expectedTypeName = typeof(ErrorListPad).FullName; + string typeName = workbench.ErrorListPadDescriptor.Class; + Assert.AreEqual(expectedTypeName, typeName); + } + + [Test] + public void CompilerMessageViewPadDescriptorPropertyReturnsCompilerMessageViewPad() + { + string expectedTypeName = typeof(CompilerMessageView).FullName; + string typeName = workbench.CompilerMessageViewPadDescriptor.Class; + Assert.AreEqual(expectedTypeName, typeName); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestsPadTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestsPadTestFixture.cs new file mode 100644 index 0000000000..f5fca27531 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/MockUnitTestsPadTestFixture.cs @@ -0,0 +1,108 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class MockUnitTestsPadTestFixture + { + MockUnitTestsPad pad; + + [SetUp] + public void Init() + { + pad = new MockUnitTestsPad(); + } + + [Test] + public void IsUpdateToolbarMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(pad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void IsUpdateToolbarMethodCalledReturnsTrueAfterUpdateToolbarMethodIsCalled() + { + pad.UpdateToolbar(); + Assert.IsTrue(pad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void CanResetIsUpdateToolbarMethodAfterUpdateToolbarMethodIsCalled() + { + pad.UpdateToolbar(); + pad.IsUpdateToolbarMethodCalled = false; + Assert.IsFalse(pad.IsUpdateToolbarMethodCalled); + } + + [Test] + public void IsBringToFrontMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(pad.IsBringToFrontMethodCalled); + } + + [Test] + public void IsBringToFrontMethodCalledReturnsTrueAfterBringToFrontMethodIsCalled() + { + pad.BringToFront(); + Assert.IsTrue(pad.IsBringToFrontMethodCalled); + } + + [Test] + public void IsResetTestResultsMethodCalledReturnsFalseByDefault() + { + Assert.IsFalse(pad.IsResetTestResultsMethodCalled); + } + + [Test] + public void IsResetTestResultsMethodCalledReturnsTrueAfterResetTestResultsMethodIsCalled() + { + pad.ResetTestResults(); + Assert.IsTrue(pad.IsResetTestResultsMethodCalled); + } + + [Test] + public void GetProjectsReturnsNoProjectsByDefault() + { + Assert.AreEqual(0, pad.GetProjects().Length); + } + + [Test] + public void GetProjectsReturnsProjectsAddedToMockUnitTestsPad() + { + MockCSharpProject project = new MockCSharpProject(); + pad.AddProject(project); + + IProject[] expectedProjects = new IProject[] { project }; + + Assert.AreEqual(expectedProjects, pad.GetProjects()); + } + + [Test] + public void GetTestProjectReturnsNullForUnknownProject() + { + Assert.IsNull(pad.GetTestProject(new MockCSharpProject())); + } + + [Test] + public void GetTestProjectReturnsTestProjectForProject() + { + MockCSharpProject project = new MockCSharpProject(); + TestProject testProject = new TestProject(project, new MockProjectContent(), new MockRegisteredTestFrameworks()); + pad.AddTestProject(testProject); + + Assert.AreEqual(testProject, pad.GetTestProject(project)); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs new file mode 100644 index 0000000000..d5d3a996a4 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/SelectedTestsWithTestMethodTestFixture.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class SelectedTestsWithTestMethodTestFixture + { + SelectedTests selectedTestsWithTestMethod; + + [SetUp] + public void Init() + { + selectedTestsWithTestMethod = SelectedTestsHelper.CreateSelectedTestMethod(); + } + + [Test] + public void SelectedTestsHasProjectSelected() + { + Assert.IsNotNull(selectedTestsWithTestMethod.Project); + } + + [Test] + public void SelectedTestsHasOneProjectSelected() + { + Assert.AreEqual(1, selectedTestsWithTestMethod.Projects.Count); + } + + [Test] + public void SelectedTestsHasClassWithDotNetNameMyTestsMyTestClass() + { + Assert.AreEqual("MyTests.MyTestClass", selectedTestsWithTestMethod.Class.DotNetName); + } + + [Test] + public void SelectedTestsHasMethodWithNameMyTestMethod() + { + Assert.AreEqual("MyTestMethod", selectedTestsWithTestMethod.Method.Name); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/TaskComparisonTestFixture.cs b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/TaskComparisonTestFixture.cs new file mode 100644 index 0000000000..d7ce0148b1 --- /dev/null +++ b/src/AddIns/Analysis/UnitTesting/Test/Utils/Tests/TaskComparisonTestFixture.cs @@ -0,0 +1,211 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace UnitTesting.Tests.Utils.Tests +{ + [TestFixture] + public class TaskComparisonTestFixture + { + TaskComparison taskComparison; + Task lhs; + Task rhs; + int column = 20; + int line = 5; + string myTestFileName = @"c:\projects\tests\mytest.cs"; + string description = "description"; + + [SetUp] + public void Init() + { + FileName fileName = new FileName(myTestFileName); + lhs = new Task(fileName, description, column, line, TaskType.Error); + rhs = new Task(fileName, description, column, line, TaskType.Error); + } + + [Test] + public void IsMatchReturnsTrueWhenFileNameDescriptionColumnLineAndTaskTypeMatch() + { + CreateTaskComparison(); + Assert.IsTrue(taskComparison.IsMatch); + } + + void CreateTaskComparison() + { + taskComparison = new TaskComparison(lhs, rhs); + } + + [Test] + public void IsMatchReturnsFalseWhenTaskTypesAreDifferent() + { + FileName fileName = new FileName(myTestFileName); + lhs = new Task(fileName, description, column, line, TaskType.Warning); + CreateTaskComparison(); + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesTaskTypeMismatchWhenTaskTypesAreDifferent() + { + IsMatchReturnsFalseWhenTaskTypesAreDifferent(); + + string expectedMismatchReason = + "TaskTypes are different.\r\n" + + "Expected: Warning\r\n" + + "But was: Error\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void IsMatchReturnsFalseWhenFileNamesAreDifferent() + { + FileName fileName = new FileName(@"temp.cs"); + lhs = new Task(fileName, rhs.Description, rhs.Column, rhs.Line, rhs.TaskType); + CreateTaskComparison(); + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesFileNameMismatchWhenFileNamesAreDifferent() + { + IsMatchReturnsFalseWhenFileNamesAreDifferent(); + + string expectedMismatchReason = + "FileNames are different.\r\n" + + "Expected: temp.cs\r\n" + + "But was: c:\\projects\\tests\\mytest.cs\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void TaskComparisonIsMatchReturnsTrueWhenBothTasksAreNull() + { + lhs = null; + rhs = null; + CreateTaskComparison(); + + Assert.IsTrue(taskComparison.IsMatch); + } + + [Test] + public void IsMatchReturnsFalseWhenLhsTaskIsNull() + { + lhs = null; + CreateTaskComparison(); + + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesLhsTaskIsNullInComparison() + { + IsMatchReturnsFalseWhenLhsTaskIsNull(); + + string expectedMismatchReason = + "One task is null.\r\n" + + "Expected: (null)\r\n" + + "But was: " + rhs.ToString() + "\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void IsMatchReturnsFalseWhenRhsTaskIsNull() + { + rhs = null; + CreateTaskComparison(); + + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesRhsTaskIsNullInComparison() + { + IsMatchReturnsFalseWhenRhsTaskIsNull(); + + string expectedMismatchReason = + "One task is null.\r\n" + + "Expected: " + lhs.ToString() + "\r\n" + + "But was: (null)\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void IsMatchReturnsFalseWhenDescriptionsAreDifferent() + { + FileName fileName = new FileName(myTestFileName); + rhs = new Task(fileName, "different", column, line, TaskType.Error); + CreateTaskComparison(); + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesDescriptionMismatchWhenDescriptionsAreDifferent() + { + IsMatchReturnsFalseWhenDescriptionsAreDifferent(); + + string expectedMismatchReason = + "Descriptions are different.\r\n" + + "Expected: description\r\n" + + "But was: different\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void IsMatchReturnsFalseWhenColumnsAreDifferent() + { + FileName fileName = new FileName(myTestFileName); + rhs = new Task(fileName, description, 500, line, TaskType.Error); + CreateTaskComparison(); + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesColumnsMismatchWhenColumnsAreDifferent() + { + IsMatchReturnsFalseWhenColumnsAreDifferent(); + + string expectedMismatchReason = + "Columns are different.\r\n" + + "Expected: 20\r\n" + + "But was: 500\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + + [Test] + public void IsMatchReturnsFalseWhenLinesAreDifferent() + { + FileName fileName = new FileName(myTestFileName); + rhs = new Task(fileName, description, column, 66, TaskType.Error); + CreateTaskComparison(); + Assert.IsFalse(taskComparison.IsMatch); + } + + [Test] + public void MismatchReasonIndicatesLinesMismatchWhenColumnsAreDifferent() + { + IsMatchReturnsFalseWhenLinesAreDifferent(); + + string expectedMismatchReason = + "Lines are different.\r\n" + + "Expected: 5\r\n" + + "But was: 66\r\n"; + + Assert.AreEqual(expectedMismatchReason, taskComparison.MismatchReason); + } + } +} diff --git a/src/AddIns/Analysis/UnitTesting/UnitTesting.addin b/src/AddIns/Analysis/UnitTesting/UnitTesting.addin index 9596e8d66f..0c32fe92dc 100644 --- a/src/AddIns/Analysis/UnitTesting/UnitTesting.addin +++ b/src/AddIns/Analysis/UnitTesting/UnitTesting.addin @@ -1,41 +1,48 @@ - + - + - - - + + + + - - + + - - + + - - + + - - + + + + + + @@ -44,18 +51,18 @@ - + - + - - + + @@ -64,17 +71,17 @@ - + - + - + @@ -82,14 +89,14 @@ - + - + @@ -97,36 +104,36 @@ - - + + - + - - + + - + @@ -134,34 +141,27 @@ - + - + - + - + - @@ -173,10 +173,10 @@ - + @@ -186,28 +186,27 @@ - + - + - + label="${res:ICSharpCode.NUnitPad.NUnitPadContent.PadName}" + class="ICSharpCode.UnitTesting.UnitTestingOptionsPanel"/> diff --git a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj index 8cedcf9133..87c95e47a7 100644 --- a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj +++ b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj @@ -1,4 +1,5 @@ - + + Library ICSharpCode.UnitTesting @@ -56,6 +57,16 @@ + + + + + + + + + + @@ -63,13 +74,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + Configuration\GlobalAssemblyInfo.cs diff --git a/src/AddIns/Analysis/UnitTesting/UnitTesting.sln b/src/AddIns/Analysis/UnitTesting/UnitTesting.sln index 79a6a60a1f..67a98ff275 100644 --- a/src/AddIns/Analysis/UnitTesting/UnitTesting.sln +++ b/src/AddIns/Analysis/UnitTesting/UnitTesting.sln @@ -1,7 +1,7 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -# SharpDevelop 3.0.0.2745 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.0.0.5840 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" @@ -18,8 +18,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "..\..\..\Libr EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,9 +56,5 @@ Global {8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.Build.0 = Release|Any CPU {8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Release|Any CPU.Build.0 = Release|Any CPU - {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/FileLineReference.cs b/src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/FileLineReference.cs index af127e0990..8f4ac25767 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/FileLineReference.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/FileLineReference.cs @@ -27,19 +27,15 @@ namespace ICSharpCode.SharpDevelop.Gui /// /// The line column. /// - int column ; + int column; /// /// Gets or sets the filename. /// public string FileName { - get { - return fileName; - } - set { - fileName = value; - } + get { return fileName; } + set { fileName = value; } } /// @@ -47,12 +43,8 @@ namespace ICSharpCode.SharpDevelop.Gui /// The value '0' means that no line information is available. /// public int Line { - get { - return line; - } - set { - line = value; - } + get { return line; } + set { line = value; } } /// @@ -60,12 +52,8 @@ namespace ICSharpCode.SharpDevelop.Gui /// The value '0' means that no column information is available. /// public int Column { - get { - return column; - } - set { - column = value; - } + get { return column; } + set { column = value; } } /// /// Creates a new instance of the class. From 8bebbe33fc192eb397a75d5a1839548d4fa76efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Sun, 23 May 2010 18:09:11 +0000 Subject: [PATCH 14/79] CodeCompletion after dot shows only extension methods from imported namespaces. If Ctrl+Space is pressed, all extension methods from all referenced projects are shown. Original Ctrl+Space (types shown when user starts typing in the editor) still always shows types from all referenced projects. Maybe we could change this to show only items from imported namespaces by default, and all items for Ctrl+Space press, for consistency (ReSharper-like). If we want this, NRefactoryResolver.CtrlSpace() method is ready for this change. I am not sure yet, I quite like current state (all types shown in CC don't bother me), but it is a little inconsistent. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5845 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../CodeCompletionItemProvider.cs | 7 ++++- .../CtrlSpaceCompletionItemProvider.cs | 11 ++----- .../NRefactoryCodeCompletionBinding.cs | 2 ++ .../Project/Src/CtrlSpaceResolveHelper.cs | 11 ++++--- .../NRefactoryResolver/NRefactoryResolver.cs | 30 +++++++++++++------ .../Project/Src/ResolveResult.cs | 24 +++++++++++++-- 6 files changed, 60 insertions(+), 25 deletions(-) diff --git a/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs b/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs index 5108610f1c..45aeeaadb5 100644 --- a/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs +++ b/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs @@ -49,6 +49,11 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion /// public class CodeCompletionItemProvider : AbstractCompletionItemProvider { + /// + /// Gets/Sets whether items from all namespaces should be included in code completion, regardless of imports. + /// + public bool ShowItemsFromAllNamespaces { get; set; } + /// public override ICompletionItemList GenerateCompletionList(ITextEditor editor) { @@ -103,7 +108,7 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion if (rr == null) return null; IProjectContent callingContent = rr.CallingClass != null ? rr.CallingClass.ProjectContent : null; - List arr = rr.GetCompletionData(callingContent ?? ParserService.CurrentProjectContent); + List arr = rr.GetCompletionData(callingContent ?? ParserService.CurrentProjectContent, this.ShowItemsFromAllNamespaces); return GenerateCompletionListForCompletionData(arr, context); } diff --git a/src/Main/Base/Project/Src/Editor/CodeCompletion/CtrlSpaceCompletionItemProvider.cs b/src/Main/Base/Project/Src/Editor/CodeCompletion/CtrlSpaceCompletionItemProvider.cs index e454b67499..f4e4a88c6a 100644 --- a/src/Main/Base/Project/Src/Editor/CodeCompletion/CtrlSpaceCompletionItemProvider.cs +++ b/src/Main/Base/Project/Src/Editor/CodeCompletion/CtrlSpaceCompletionItemProvider.cs @@ -27,17 +27,12 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion ExpressionContext overrideContext; - bool allowCompleteExistingExpression; - /// /// Gets/Sets whether completing an old expression is allowed. /// You have to set this property to true to let the provider run FindExpression, when /// set to false it will use ExpressionContext.Default (unless the constructor with "overrideContext" was used). /// - public bool AllowCompleteExistingExpression { - get { return allowCompleteExistingExpression; } - set { allowCompleteExistingExpression = value; } - } + public bool AllowCompleteExistingExpression { get; set; } /// /// Gets/Sets whether code templates should be included in code completion. @@ -67,7 +62,7 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion ICompletionItemList GenerateCompletionListCore(ITextEditor editor) { preselectionLength = 0; - if (!allowCompleteExistingExpression) { + if (!AllowCompleteExistingExpression) { ExpressionContext context = overrideContext ?? ExpressionContext.Default; var ctrlSpace = CtrlSpace(editor, context); return GenerateCompletionListForCompletionData(ctrlSpace, context); @@ -128,7 +123,7 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion editor.Caret.Line, editor.Caret.Column, ParserService.GetParseInformation(editor.FileName), editor.Document.Text, - context); + context, this.ShowItemsFromAllNamespaces); } } } diff --git a/src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs b/src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs index 50a9ea0ab4..6b8a9f1c37 100644 --- a/src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs +++ b/src/Main/Base/Project/Src/Editor/CodeCompletion/NRefactoryCodeCompletionBinding.cs @@ -64,6 +64,8 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion { NRefactoryCtrlSpaceCompletionItemProvider provider = new NRefactoryCtrlSpaceCompletionItemProvider(languageProperties); provider.AllowCompleteExistingExpression = true; + // on Ctrl+Space, include members (e.g. extension methods) from all namespaces, regardless of imports + provider.ShowItemsFromAllNamespaces = true; provider.ShowCompletion(editor); return true; } diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CtrlSpaceResolveHelper.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CtrlSpaceResolveHelper.cs index d3714bf730..38b34b7f3a 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CtrlSpaceResolveHelper.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CtrlSpaceResolveHelper.cs @@ -235,7 +235,7 @@ namespace ICSharpCode.SharpDevelop.Dom return null; } - public static IList FindAllExtensions(LanguageProperties language, IClass callingClass) + public static IList FindAllExtensions(LanguageProperties language, IClass callingClass, bool searchInAllNamespaces = false) { if (language == null) throw new ArgumentNullException("language"); @@ -251,9 +251,12 @@ namespace ICSharpCode.SharpDevelop.Dom IMethod dummyMethod = new DefaultMethod("dummy", callingClass.ProjectContent.SystemTypes.Void, ModifierEnum.Static, DomRegion.Empty, DomRegion.Empty, callingClass); CtrlSpaceResolveHelper.AddContentsFromCalling(list, callingClass, dummyMethod); - CtrlSpaceResolveHelper.AddImportedNamespaceContents(list, callingClass.CompilationUnit, callingClass); - // search extension methods in all referenced projects, no matter the using section - //CtrlSpaceResolveHelper.AddReferencedProjectsContents(list, callingClass.CompilationUnit, callingClass); + if (searchInAllNamespaces) { + // search extension methods in all referenced projects, no matter the using section + CtrlSpaceResolveHelper.AddReferencedProjectsContents(list, callingClass.CompilationUnit, callingClass); + } else { + CtrlSpaceResolveHelper.AddImportedNamespaceContents(list, callingClass.CompilationUnit, callingClass); + } bool searchExtensionsInClasses = language.SearchExtensionsInClasses; foreach (object o in list) { diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs index 946d90167c..3bc4e0318f 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs @@ -1010,13 +1010,13 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver ReadOnlyCollection cachedExtensionMethods; IClass cachedExtensionMethods_LastClass; // invalidate cache when callingClass != LastClass - public ReadOnlyCollection SearchAllExtensionMethods() + public ReadOnlyCollection SearchAllExtensionMethods(bool searchInAllNamespaces = false) { if (callingClass == null) return EmptyList.Instance; if (callingClass != cachedExtensionMethods_LastClass) { cachedExtensionMethods_LastClass = callingClass; - cachedExtensionMethods = new ReadOnlyCollection(CtrlSpaceResolveHelper.FindAllExtensions(languageProperties, callingClass)); + cachedExtensionMethods = new ReadOnlyCollection(CtrlSpaceResolveHelper.FindAllExtensions(languageProperties, callingClass, searchInAllNamespaces)); } return cachedExtensionMethods; } @@ -1122,7 +1122,17 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver } } - public List CtrlSpace(int caretLine, int caretColumn, ParseInformation parseInfo, string fileContent, ExpressionContext context) + /// + /// Returns code completion entries for given context. + /// + /// + /// + /// + /// + /// + /// If true, returns entries from all namespaces, regardless of current imports. + /// + public List CtrlSpace(int caretLine, int caretColumn, ParseInformation parseInfo, string fileContent, ExpressionContext context, bool showEntriesFromAllNamespaces = false) { if (!Initialize(parseInfo, caretLine, caretColumn)) return null; @@ -1231,7 +1241,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver } } - void CtrlSpaceInternal(List result, string fileContent) + void CtrlSpaceInternal(List result, string fileContent, bool showEntriesFromAllNamespaces = true) { lookupTableVisitor = new LookupTableVisitor(language); @@ -1265,11 +1275,13 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver result.Add(new DefaultField.ParameterField(callingMember.ReturnType, "value", callingMember.Region, callingClass)); } - // CC contains contents of all imported namespaces - //CtrlSpaceResolveHelper.AddImportedNamespaceContents(result, cu, callingClass); // FindReferences to AddImportedNamespaceContents results in OutOfMemory - - // CC contains contents of all referenced assemblies - CtrlSpaceResolveHelper.AddReferencedProjectsContents(result, cu, callingClass); + if (showEntriesFromAllNamespaces) { + // CC contains contents of all referenced assemblies + CtrlSpaceResolveHelper.AddReferencedProjectsContents(result, cu, callingClass); + } else { + // CC contains contents of all imported namespaces + CtrlSpaceResolveHelper.AddImportedNamespaceContents(result, cu, callingClass); + } } sealed class CompareLambdaByLocation : IEqualityComparer diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ResolveResult.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ResolveResult.cs index d5e5b8fa1d..2289780acf 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ResolveResult.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ResolveResult.cs @@ -78,6 +78,24 @@ namespace ICSharpCode.SharpDevelop.Dom return this.Clone(); } + bool showAllNamespacesContentsInCC = false; + /// + /// Gets code completion data for this ResolveResult. + /// + /// + /// If true, items (e.g. extension methods) from all namespaces are returned, regardless current imports. Default is false. + /// + public List GetCompletionData(IProjectContent projectContent, bool showItemsFromAllNamespaces) + { + // Little hack - store value in a property to pass it to GetCompletionData(LanguageProperties language, bool showStatic) + // Otherwise we would have to add it as a parameter to GetCompletionData(IProjectContent projectContent), + // which would change signature in classes overriding this method as well. + this.showAllNamespacesContentsInCC = showItemsFromAllNamespaces; + var result = GetCompletionData(projectContent); + this.showAllNamespacesContentsInCC = false; + return result; + } + public virtual List GetCompletionData(IProjectContent projectContent) { return GetCompletionData(projectContent.Language, false); @@ -94,7 +112,7 @@ namespace ICSharpCode.SharpDevelop.Dom } if (!showStatic && callingClass != null) { - AddExtensions(language, res.Add, callingClass, resolvedType); + AddExtensions(language, res.Add, callingClass, resolvedType, this.showAllNamespacesContentsInCC); } return res; @@ -103,7 +121,7 @@ namespace ICSharpCode.SharpDevelop.Dom /// /// Adds extension methods to . /// - public static void AddExtensions(LanguageProperties language, Action methodFound, IClass callingClass, IReturnType resolvedType) + public static void AddExtensions(LanguageProperties language, Action methodFound, IClass callingClass, IReturnType resolvedType, bool searchInAllNamespaces = false) { if (language == null) throw new ArgumentNullException("language"); @@ -117,7 +135,7 @@ namespace ICSharpCode.SharpDevelop.Dom // convert resolvedType into direct type to speed up the IsApplicable lookups resolvedType = resolvedType.GetDirectReturnType(); - foreach (IMethodOrProperty mp in CtrlSpaceResolveHelper.FindAllExtensions(language, callingClass)) { + foreach (IMethodOrProperty mp in CtrlSpaceResolveHelper.FindAllExtensions(language, callingClass, searchInAllNamespaces)) { TryAddExtension(language, methodFound, mp, resolvedType); } } From 0990d2cac09b369906c34b72d599b6321fe27fd9 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Mon, 24 May 2010 15:07:55 +0000 Subject: [PATCH 15/79] included (with his permission) Sebastian Ullrich's code for the Contents pad git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5846 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 17 +++++++++++++++++ src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 5 +++++ src/AddIns/Misc/HelpViewer/HelpViewer.sln | 5 +++-- src/AddIns/Misc/HelpViewer/Source/Commands.cs | 10 ++++++++++ .../Misc/HelpViewer/Source/Core/DisplayHelp.cs | 3 +-- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index 6e615fb4b8..5f29de8d8c 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -23,4 +23,21 @@ + + + + + + + + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index e9c059e1b0..c5ca9cdc1f 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -65,6 +65,9 @@ + + + @@ -86,8 +89,10 @@ + + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.sln b/src/AddIns/Misc/HelpViewer/HelpViewer.sln index 43cffb0f03..5003caf52a 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.sln +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 + +Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5828 +# SharpDevelop 4.0.0.5845 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" EndProject Global diff --git a/src/AddIns/Misc/HelpViewer/Source/Commands.cs b/src/AddIns/Misc/HelpViewer/Source/Commands.cs index 940bd081bf..4761100e12 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Commands.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Commands.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using MSHelpSystem.Core; +using MSHelpSystem.Controls; using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Gui; @@ -36,4 +37,13 @@ namespace MSHelpSystem.Commands } } } + + public class DisplayContent : AbstractMenuCommand + { + public override void Run() + { + PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(Help3TocPad)); + if (toc != null) toc.BringPadToFront(); + } + } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index cdba04ac28..3e3792bfc5 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -120,8 +120,7 @@ namespace MSHelpSystem.Core static void DisplayLocalHelp(string arguments) { - // TODO: set "embedded" to TRUE if we have a TOC control or something similar - DisplayLocalHelp(arguments, false); + DisplayLocalHelp(arguments, true); } static void DisplayLocalHelp(string arguments, bool embedded) From 21366bc84fa002bacf8315d99b30d220ebde0814 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Mon, 24 May 2010 15:12:32 +0000 Subject: [PATCH 16/79] checking in the Contents control (again) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5847 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 5 +- .../Misc/HelpViewer/Source/Controls/Pads.cs | 20 +++++ .../HelpViewer/Source/Controls/TocEntry.cs | 80 +++++++++++++++++++ .../Source/Controls/TocPadControl.xaml | 22 +++++ .../Source/Controls/TocPadControl.xaml.cs | 52 ++++++++++++ 5 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index c5ca9cdc1f..9695dbb948 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -67,7 +67,10 @@ - + + TocPadControl.xaml + Code + diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs new file mode 100644 index 0000000000..3e87a3b2d1 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs @@ -0,0 +1,20 @@ +using System; +using ICSharpCode.SharpDevelop.Editor.CodeCompletion; +using ICSharpCode.SharpDevelop.Gui; + +namespace MSHelpSystem.Controls +{ + public class Help3TocPad : AbstractPadContent + { + public Help3TocPad() + { + } + + TocPadControl toc = new TocPadControl(); + + public override object Control + { + get { return toc; } + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs new file mode 100644 index 0000000000..53e01aa65e --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs @@ -0,0 +1,80 @@ +// +// +// +// +// $Revision: 5842 $ +// +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Media.Animation; +using System.Xml.Linq; +using System.Xml.XPath; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Gui; +using MSHelpSystem.Core; +using MSHelpSystem.Core.Native; + +namespace MSHelpSystem.Controls +{ + class TocEntry : INotifyPropertyChanged + { + const string url = "ms-xhelp://?method=children&id={3}&format=xml&product={0}&productVersion={1}&locale={2}"; + string id; + WebClient client = new WebClient(); + + public TocEntry(string id) + { + this.id = id; + + client.DownloadStringCompleted += (_, e) => + { + LoggingService.Debug(string.Format("Help 3.0: title \"{0}\"", Title)); + var children = XElement.Parse(e.Result); + Children = children.Elements("topic") + .Select(link => new TocEntry(link.Attribute("id").Value) { Title = link.Element("title").Value }) + .ToArray(); + client.Dispose(); + }; + RaisePropertyChanged("Children"); + } + + public string Title { get; set; } + public string Id { get { return id; } } + + static object[] defaultChild = new object[] { null }; + IEnumerable children; + + public IEnumerable Children + { + get + { + Help3Catalog catalog = Help3Service.ActiveCatalog; + if (children == null && !client.IsBusy) + client.DownloadStringAsync(new Uri(Help3Environment.GetHttpFromMsXHelp(string.Format(url, catalog.ProductCode, catalog.ProductVersion, catalog.Locale, id)))); + return children ?? defaultChild; + } + private set + { + children = value; + RaisePropertyChanged("Children"); + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string name) + { + System.ComponentModel.PropertyChangedEventHandler handler = PropertyChanged; + if (handler != null) handler(this, new System.ComponentModel.PropertyChangedEventArgs(name)); + } + } +} diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml new file mode 100644 index 0000000000..4be583f5c6 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs new file mode 100644 index 0000000000..a8c68ee40c --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision: 5842 $ +// +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using ICSharpCode.Core; +using MSHelpSystem.Core; + +namespace MSHelpSystem.Controls +{ + public partial class TocPadControl : UserControl + { + public TocPadControl() + { + InitializeComponent(); + LoadToc(); + Help3Service.ConfigurationUpdated += new EventHandler(Help3ServiceConfigurationUpdated); + } + + void LoadToc() + { + if (!Help3Environment.IsLocalHelp) DataContext = null; + // TODO: Needs a localization + else DataContext = new[] { new TocEntry("-1") { Title = "Help Library" } }; + } + + void Help3TocItemChanged(object sender, RoutedPropertyChangedEventArgs e) + { + string topicId = (string)tocTreeView.SelectedValue; + if (!string.IsNullOrEmpty(topicId)) { + LoggingService.Debug(string.Format("Help 3.0: [TOC] Calling page with Id \"{0}\"", topicId)); + DisplayHelp.Page(topicId); + } + } + + void Help3ServiceConfigurationUpdated(object sender, EventArgs e) + { + LoadToc(); + } + } +} \ No newline at end of file From c28d90af650a1390f656b06001b366f46bb841d3 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Mon, 24 May 2010 20:19:58 +0000 Subject: [PATCH 17/79] Added a custom unit test runner sample that supports running MbUnit tests with Gallio. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5848 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Gallio.Extension/Gallio.Extension.csproj | 60 ++++++ .../GallioTestStepConverter.cs | 78 ++++++++ .../Gallio.Extension/ITestResultsWriter.cs | 16 ++ .../ITestResultsWriterFactory.cs | 16 ++ .../MultiLineTestResultText.cs | 54 ++++++ .../Properties/AssemblyInfo.cs | 31 ++++ .../SharpDevelopTagFormatter.cs | 68 +++++++ .../SharpDevelopTestRunnerExtension.cs | 51 +++++ samples/Gallio/Gallio.Extension/TestResult.cs | 80 ++++++++ .../Gallio.Extension/TestResultsWriter.cs | 90 +++++++++ .../TestResultsWriterFactory.cs | 19 ++ .../Gallio.SharpDevelop.Tests.csproj | 99 ++++++++++ ...allioEchoApplicationFileNameTestFixture.cs | 62 +++++++ .../GallioEchoCommandLineTests.cs | 76 ++++++++ ...oEchoConsoleProcessStartInfoTestFixture.cs | 85 +++++++++ .../GallioTestFailureTestFixture.cs | 85 +++++++++ .../GallioTestFrameworkIsTestClassTests.cs | 91 +++++++++ .../GallioTestFrameworkIsTestMethodTests.cs | 127 +++++++++++++ .../GallioTestFrameworkIsTestProjectTests.cs | 97 ++++++++++ ...ToSharpDevelopTestResultConversionTests.cs | 155 ++++++++++++++++ .../TestResultsWriterTestFixture.cs | 126 +++++++++++++ .../TestRunnerExtensionTestFixture.cs | 71 +++++++ .../Utils/GallioBodyTagFactory.cs | 93 ++++++++++ .../GallioTestStepFinishedEventArgsFactory.cs | 52 ++++++ .../Utils/MockTestResultsWriter.cs | 52 ++++++ .../Utils/MockTestResultsWriterFactory.cs | 28 +++ .../Utils/MockTestRunnerEvents.cs | 76 ++++++++ ...reateAssertionFailureBodyTagTestFixture.cs | 175 ++++++++++++++++++ .../MockTestResultsWriterFactoryTests.cs | 82 ++++++++ .../Tests/MockTestRunnerEventsTestFixture.cs | 69 +++++++ samples/Gallio/Gallio.SharpDevelop.sln | 30 +++ .../Gallio.SharpDevelop.addin | 28 +++ .../Gallio.SharpDevelop.csproj | 87 +++++++++ .../GallioEchoConsoleApplication.cs | 96 ++++++++++ .../GallioEchoConsoleApplicationFactory.cs | 41 ++++ ...oEchoConsoleApplicationProcessStartInfo.cs | 32 ++++ .../Gallio.SharpDevelop/GallioTestDebugger.cs | 33 ++++ .../GallioTestFramework.cs | 111 +++++++++++ .../Gallio.SharpDevelop/GallioTestResult.cs | 54 ++++++ .../Gallio.SharpDevelop/GallioTestRunner.cs | 32 ++++ .../MbUnitTestAttributeName.cs | 47 +++++ .../Properties/AssemblyInfo.cs | 31 ++++ ...pTestRunnerExtensionCommandLineArgument.cs | 38 ++++ .../TestRunnerExtensionCommandLineArgument.cs | 51 +++++ samples/Gallio/readme.rtf | Bin 0 -> 771 bytes 45 files changed, 2975 insertions(+) create mode 100644 samples/Gallio/Gallio.Extension/Gallio.Extension.csproj create mode 100644 samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs create mode 100644 samples/Gallio/Gallio.Extension/ITestResultsWriter.cs create mode 100644 samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs create mode 100644 samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs create mode 100644 samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs create mode 100644 samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs create mode 100644 samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs create mode 100644 samples/Gallio/Gallio.Extension/TestResult.cs create mode 100644 samples/Gallio/Gallio.Extension/TestResultsWriter.cs create mode 100644 samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMethodTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop.sln create mode 100644 samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin create mode 100644 samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs create mode 100644 samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs create mode 100644 samples/Gallio/readme.rtf diff --git a/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj b/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj new file mode 100644 index 0000000000..7b379e1670 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/Gallio.Extension.csproj @@ -0,0 +1,60 @@ + + + + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} + Debug + x86 + Library + Gallio.Extension + Gallio.Extension + v3.5 + Properties + False + False + 4 + false + + + x86 + False + Auto + 4194304 + 4096 + + + bin\Debug\ + true + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + ..\Gallio\bin\Gallio.dll + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs b/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs new file mode 100644 index 0000000000..f15fec7329 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/GallioTestStepConverter.cs @@ -0,0 +1,78 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using Model = Gallio.Model; +using Gallio.Common.Markup; +using Gallio.Runner.Events; + +namespace Gallio.Extension +{ + public class GallioTestStepConverter + { + TestStepEventArgs eventArgs; + TestResult testResult; + SharpDevelopTagFormatter tagFormatter; + + public GallioTestStepConverter(TestStepEventArgs eventArgs) + { + this.eventArgs = eventArgs; + Convert(); + } + + void Convert() + { + CreateTestResult(); + ConvertTestOutcome(); + ConvertTestMessages(); + } + + void CreateTestResult() + { + string name = GetTestName(); + testResult = new TestResult(name); + } + + string GetTestName() + { + return eventArgs.Test.FullName.Replace('/', '.'); + } + + void ConvertTestOutcome() + { + testResult.ResultType = GetTestResultType(eventArgs.TestStepRun.Result.Outcome.Status); + } + + TestResultType GetTestResultType(Model.TestStatus status) + { + switch (status) { + case Model.TestStatus.Passed: + return TestResultType.Success; + case Model.TestStatus.Skipped: + case Model.TestStatus.Inconclusive: + return TestResultType.Ignored; + case Model.TestStatus.Failed: + return TestResultType.Failure; + } + return TestResultType.None; + } + + void ConvertTestMessages() + { + tagFormatter = new SharpDevelopTagFormatter(); + tagFormatter.Visit(eventArgs.TestStepRun); + testResult.Message = tagFormatter.TestResultMessage; + testResult.StackTrace = tagFormatter.GetStackTrace(); + } + + public TestResult GetTestResult() + { + return testResult; + } + } +} diff --git a/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs b/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs new file mode 100644 index 0000000000..1ed6c328ba --- /dev/null +++ b/samples/Gallio/Gallio.Extension/ITestResultsWriter.cs @@ -0,0 +1,16 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Gallio.Extension +{ + public interface ITestResultsWriter : IDisposable + { + void Write(TestResult testResult); + } +} diff --git a/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs b/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs new file mode 100644 index 0000000000..b72bbee632 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/ITestResultsWriterFactory.cs @@ -0,0 +1,16 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Gallio.Extension +{ + public interface ITestResultsWriterFactory + { + ITestResultsWriter Create(string fileName); + } +} diff --git a/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs b/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs new file mode 100644 index 0000000000..aec199e35b --- /dev/null +++ b/samples/Gallio/Gallio.Extension/MultiLineTestResultText.cs @@ -0,0 +1,54 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Text; + +namespace Gallio.Extension +{ + public class MultiLineTestResultText + { + StringBuilder textBuilder = new StringBuilder(); + + public MultiLineTestResultText(string text) + { + EncodeText(text); + } + + public override string ToString() + { + return textBuilder.ToString(); + } + + /// + /// Replaces the first character on each new line with a space. + /// The first line does not have the extra space added. + /// + void EncodeText(string text) + { + if (String.IsNullOrEmpty(text)) { + return; + } + + text = text.TrimEnd(Environment.NewLine.ToCharArray()); + + foreach (char ch in text) { + switch (ch) { + case '\n': + textBuilder.Append("\r\n "); + break; + case '\r': + // Ignore. + break; + default: + textBuilder.Append(ch); + break; + } + } + } + } +} diff --git a/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs b/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..d35a1df3c7 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Gallio.Extension")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Gallio.Extension")] +[assembly: AssemblyCopyright("Copyright 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs b/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs new file mode 100644 index 0000000000..edc68a3bd8 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/SharpDevelopTagFormatter.cs @@ -0,0 +1,68 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Text; +using Gallio.Common.Markup; +using Gallio.Common.Markup.Tags; +using Gallio.Runner.Reports.Schema; + +namespace Gallio.Extension +{ + public class SharpDevelopTagFormatter : ITagVisitor + { + StringBuilder textBuilder = new StringBuilder(); + string testResultMessage = String.Empty; + + public void Visit(TestStepRun testStepRun) + { + foreach (StructuredStream stream in testStepRun.TestLog.Streams) { + VisitBodyTag(stream.Body); + } + } + + public void VisitBodyTag(BodyTag tag) + { + foreach (Tag childTag in tag.Contents) { + childTag.Accept(this); + } + } + + public void VisitSectionTag(SectionTag tag) + { + textBuilder.Append(tag.Name + " "); + tag.AcceptContents(this); + } + + public void VisitMarkerTag(MarkerTag tag) + { + if (tag.Class == Marker.StackTraceClass) { + testResultMessage = textBuilder.ToString(); + textBuilder = new StringBuilder(); + } + tag.AcceptContents(this); + } + + public void VisitEmbedTag(EmbedTag tag) + { + } + + public void VisitTextTag(TextTag tag) + { + textBuilder.Append(tag.Text); + } + + public string TestResultMessage { + get { return testResultMessage; } + } + + public string GetStackTrace() + { + return textBuilder.ToString(); + } + } +} diff --git a/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs b/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs new file mode 100644 index 0000000000..48ee05e4fd --- /dev/null +++ b/samples/Gallio/Gallio.Extension/SharpDevelopTestRunnerExtension.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using Gallio.Runner.Events; +using Gallio.Runner.Extensions; + +namespace Gallio.Extension +{ + public class SharpDevelopTestRunnerExtension : TestRunnerExtension + { + ITestResultsWriterFactory factory; + ITestResultsWriter writer; + + public SharpDevelopTestRunnerExtension(ITestResultsWriterFactory factory) + { + this.factory = factory; + } + + public SharpDevelopTestRunnerExtension() + : this(new TestResultsWriterFactory()) + { + } + + protected override void Initialize() + { + writer = factory.Create(Parameters); + Events.TestStepFinished += TestStepFinished; + Events.DisposeStarted += DisposeStarted; + } + + void TestStepFinished(object source, TestStepFinishedEventArgs e) + { + if (e.Test.IsTestCase) { + GallioTestStepConverter testStep = new GallioTestStepConverter(e); + TestResult testResult = testStep.GetTestResult(); + writer.Write(testResult); + } + } + + void DisposeStarted(object source, DisposeStartedEventArgs e) + { + writer.Dispose(); + } + } +} \ No newline at end of file diff --git a/samples/Gallio/Gallio.Extension/TestResult.cs b/samples/Gallio/Gallio.Extension/TestResult.cs new file mode 100644 index 0000000000..fce1e5f28b --- /dev/null +++ b/samples/Gallio/Gallio.Extension/TestResult.cs @@ -0,0 +1,80 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Gallio.Extension +{ + public enum TestResultType { + /// + /// The test has not been run. + /// + None = 0, + + /// + /// The test passed. + /// + Success = 1, + + /// + /// The test failed. + /// + Failure = 2, + + /// + /// The test was ignored. + /// + Ignored = 3 + } + + /// + /// Holds the information about a single test result. + /// + public class TestResult + { + string name = String.Empty; + string message = String.Empty; + string stackTrace = String.Empty; + TestResultType resultType = TestResultType.None; + + public TestResult(string name) + { + this.name = name; + } + + public string Name { + get { return name; } + } + + public bool IsSuccess { + get { return resultType == TestResultType.Success; } + } + + public bool IsFailure { + get { return resultType == TestResultType.Failure; } + } + + public bool IsIgnored { + get { return resultType == TestResultType.Ignored; } + } + + public TestResultType ResultType { + get { return resultType; } + set { resultType = value; } + } + + public string Message { + get { return message; } + set { message = value; } + } + + public string StackTrace { + get { return stackTrace; } + set { stackTrace = value; } + } + } +} diff --git a/samples/Gallio/Gallio.Extension/TestResultsWriter.cs b/samples/Gallio/Gallio.Extension/TestResultsWriter.cs new file mode 100644 index 0000000000..735d497479 --- /dev/null +++ b/samples/Gallio/Gallio.Extension/TestResultsWriter.cs @@ -0,0 +1,90 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; + +namespace Gallio.Extension +{ + public class TestResultsWriter : ITestResultsWriter, IDisposable + { + TextWriter writer; + + public TestResultsWriter(string fileName) + : this(new StreamWriter(fileName, false, Encoding.UTF8)) + { + } + + public TestResultsWriter(TextWriter writer) + { + this.writer = writer; + } + + public void Write(TestResult testResult) + { + WriteTestName(testResult.Name); + WriteResult(testResult.ResultType); + + if (testResult.ResultType == TestResultType.Failure) { + WriteTestFailureResult(testResult); + } + } + + void WriteTestName(string name) + { + WriteNameAndValue("Name", name); + } + + void WriteResult(TestResultType resultType) + { + string result = GetResult(resultType); + WriteNameAndValue("Result", result); + } + + void WriteTestFailureResult(TestResult testResult) + { + WriteNameAndMultiLineValue("Message", testResult.Message); + WriteNameAndMultiLineValue("StackTrace", testResult.StackTrace); + } + + void WriteNameAndValue(string name, string value) + { + string nameAndValue = String.Format("{0}: {1}", name, value); + WriteLine(nameAndValue); + } + + string GetResult(TestResultType resultType) + { + switch (resultType) { + case TestResultType.Success: + return "Success"; + case TestResultType.Ignored: + return "Ignored"; + case TestResultType.Failure: + return "Failure"; + } + return String.Empty; + } + + void WriteNameAndMultiLineValue(string name, string value) + { + MultiLineTestResultText multiLineText = new MultiLineTestResultText(value); + WriteNameAndValue(name, multiLineText.ToString()); + } + + void WriteLine(string text) + { + writer.WriteLine(text); + } + + public void Dispose() + { + writer.Dispose(); + } + } +} diff --git a/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs b/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs new file mode 100644 index 0000000000..3c16b25ffb --- /dev/null +++ b/samples/Gallio/Gallio.Extension/TestResultsWriterFactory.cs @@ -0,0 +1,19 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Gallio.Extension +{ + public class TestResultsWriterFactory : ITestResultsWriterFactory + { + public ITestResultsWriter Create(string fileName) + { + return new TestResultsWriter(fileName); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj b/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj new file mode 100644 index 0000000000..3feaf83c68 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Gallio.SharpDevelop.Tests.csproj @@ -0,0 +1,99 @@ + + + + {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD} + Debug + x86 + Library + Gallio.SharpDevelop.Tests + Gallio.SharpDevelop.Tests + v4.0 + C:\Users\Matt\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis + False + False + 4 + false + + + x86 + False + Auto + 4194304 + 4096 + + + bin\Debug\ + true + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + + ..\Gallio\bin\Gallio.dll + + + ..\..\..\bin\ICSharpCode.Core.dll + + + ..\..\..\bin\ICSharpCode.SharpDevelop.dll + + + ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll + + + ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll + + + ..\..\..\bin\Tools\NUnit\nunit.framework.dll + + + + + ..\..\..\AddIns\AddIns\Misc\UnitTesting\UnitTesting.dll + + + ..\..\..\bin\UnitTests\UnitTesting.Tests.dll + + + + + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} + Gallio.Extension + + + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC} + Gallio.SharpDevelop + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs new file mode 100644 index 0000000000..a979d1eafa --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoApplicationFileNameTestFixture.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; +using Gallio.SharpDevelop; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioEchoApplicationFileNameTestFixture + { + GallioEchoConsoleApplication app; + string gallioEchoConsoleFileName; + MockAddInTree addinTree; + string addinTreePath; + + [SetUp] + public void Init() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests tests = new SelectedTests(project); + + gallioEchoConsoleFileName = @"d:\gallio\bin\Gallio.Echo.exe"; + addinTreePath = GallioEchoConsoleApplicationFactory.AddInTreePath; + + addinTree = new MockAddInTree(); + List items = new List(); + items.Add(gallioEchoConsoleFileName); + + addinTree.AddItems(addinTreePath, items); + + GallioEchoConsoleApplicationFactory factory = new GallioEchoConsoleApplicationFactory(addinTree); + app = factory.Create(tests); + } + + [Test] + public void AddInTreeBuildItemsReturnsGallioEchoConsoleFileName() + { + List items = addinTree.BuildItems(addinTreePath, null); + + List expectedItems = new List(); + expectedItems.Add(gallioEchoConsoleFileName); + + Assert.AreEqual(expectedItems.ToArray(), items.ToArray()); + } + + [Test] + public void ApplicationFileNameIsTakenFromAddInTree() + { + string expectedFileName = gallioEchoConsoleFileName; + Assert.AreEqual(expectedFileName, app.FileName); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs new file mode 100644 index 0000000000..8c7f50fc9a --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoCommandLineTests.cs @@ -0,0 +1,76 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioEchoCommandLineTests + { + MockCSharpProject project; + SelectedTests selectedTests; + + [SetUp] + public void Init() + { + project = new MockCSharpProject(); + selectedTests = new SelectedTests(project); + } + + [Test] + public void CommandLineIncludesProjectOutputAssembly() + { + GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); + + string expectedArgs = + "/rv:v4.0.30319 " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedArgs, app.GetArguments()); + } + + [Test] + public void SharpDevelopTestRunnerExtensionAddedToCommandLine() + { + SharpDevelopTestRunnerExtensionCommandLineArgument arg = + new SharpDevelopTestRunnerExtensionCommandLineArgument(); + arg.TestResultsFileName = @"c:\temp\tmp66.tmp"; + + GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); + app.TestRunnerExtensions.Add(arg); + + string expectedArgs = + "/rv:v4.0.30319 " + + "/re:\"Gallio.Extension.SharpDevelopTestRunnerExtension,Gallio.Extension.dll;c:\\temp\\tmp66.tmp\" " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedArgs, app.GetArguments()); + } + + [Test] + public void TestRunnerExtensionWithoutParametersAddedToCommandLine() + { + TestRunnerExtensionCommandLineArgument arg = + new TestRunnerExtensionCommandLineArgument("MyNamespace.MyTestExtension,MyTestRunner.dll"); + + GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests); + app.TestRunnerExtensions.Add(arg); + + string expectedArgs = + "/rv:v4.0.30319 " + + "/re:\"MyNamespace.MyTestExtension,MyTestRunner.dll\" " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedArgs, app.GetArguments()); + } + + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs new file mode 100644 index 0000000000..6885bafd47 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioEchoConsoleProcessStartInfoTestFixture.cs @@ -0,0 +1,85 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.IO; +using Gallio.SharpDevelop; +using Gallio.SharpDevelop.Tests.Utils; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioEchoConsoleProcessStartInfoTestFixture + { + ProcessStartInfo info; + + [TestFixtureSetUp] + public void SetUpFixture() + { + string xml = + "\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + ""; + AddIn addin = AddIn.Load(new StringReader(xml)); + addin.Enabled = false; + addin.FileName = @"d:\sharpdevelop\addins\gallio\Gallio.SharpDevelop.dll"; + AddInTree.InsertAddIn(addin); + } + + [SetUp] + public void Init() + { + MockCSharpProject project = new MockCSharpProject(); + SelectedTests selectedTests = new SelectedTests(project); + GallioEchoConsoleApplication app = new GallioEchoConsoleApplication(selectedTests, @"d:\gallio\Gallio.Echo.exe"); + info = app.GetProcessStartInfo(); + } + + [Test] + public void GallioAddInPathIsConvertedByStringParser() + { + string expectedDirectory = @"d:\sharpdevelop\addins\gallio"; + string actualDirectory = StringParser.Parse("${addinpath:ICSharpCode.Gallio}"); + Assert.AreEqual(expectedDirectory, actualDirectory); + } + + [Test] + public void WorkingDirectoryIsGallioAddInDirectory() + { + string expectedDirectory = @"d:\sharpdevelop\addins\gallio"; + Assert.AreEqual(expectedDirectory, info.WorkingDirectory); + } + + [Test] + public void FileNameIsNUnitConsoleExe() + { + string expectedFileName = @"d:\gallio\Gallio.Echo.exe"; + Assert.AreEqual(expectedFileName, info.FileName); + } + + [Test] + public void CommandLineArgumentsAreNUnitConsoleExeCommandLineArguments() + { + string expectedCommandLine = + "/rv:v4.0.30319 " + + "\"c:\\projects\\MyTests\\bin\\Debug\\MyTests.dll\""; + + Assert.AreEqual(expectedCommandLine, info.Arguments); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs new file mode 100644 index 0000000000..17f1959f1c --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFailureTestFixture.cs @@ -0,0 +1,85 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using Gallio.SharpDevelop; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioTestFailureTestFixture + { + GallioTestResult gallioTestResult; + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyNamespace.MyTests"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "Test failed"; + testResult.StackTrace = + @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46"; + gallioTestResult = new GallioTestResult(testResult); + } + + [Test] + public void TestResultTypeIsFailure() + { + Assert.AreEqual(TestResultType.Failure, gallioTestResult.ResultType); + } + + [Test] + public void TestResultMessageIsTestFailed() + { + Assert.AreEqual("Test failed", gallioTestResult.Message); + } + + [Test] + public void TestResultHasStackTrace() + { + string expectedStackTrace = + @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46"; + Assert.AreEqual(expectedStackTrace, gallioTestResult.StackTrace); + } + + [Test] + public void TestResultHasExpectedName() + { + Assert.AreEqual("MyNamespace.MyTests", gallioTestResult.Name); + } + + [Test] + public void StackTraceFilePositionFileNameMatchesLastFileNameInStackTrace() + { + string expectedFileName = @"d:\temp\GallioTest\MyClass.cs"; + Assert.AreEqual(expectedFileName, gallioTestResult.StackTraceFilePosition.FileName); + } + + [Test] + public void StackTraceFilePositionLineNumberIs46WhichIsEqualToReportedErrorLine() + { + Assert.AreEqual(46, gallioTestResult.StackTraceFilePosition.Line); + } + + [Test] + public void StackTraceFilePositionColumnNumberIsOne() + { + Assert.AreEqual(1, gallioTestResult.StackTraceFilePosition.Column); + } + + [Test] + public void ChangingStackTraceToEmptyStringSetsStackTraceFilePositionToEmpty() + { + gallioTestResult.StackTraceFilePosition = new FilePosition("test.cs", 10, 2); + gallioTestResult.StackTrace = String.Empty; + Assert.IsTrue(gallioTestResult.StackTraceFilePosition.IsEmpty); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs new file mode 100644 index 0000000000..5ce3a919a6 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestClassTests.cs @@ -0,0 +1,91 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using Gallio.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioTestFrameworkIsTestClassTests + { + GallioTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new GallioTestFramework(); + } + + [Test] + public void IsTestClassReturnsFalseHasClassHasNoAttributes() + { + MockClass mockClass = MockClass.CreateMockClassWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasTestFixtureAttributeMissingAttributePart() + { + MockAttribute testAttribute = new MockAttribute("TestFixture"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasTestFixtureAttribute() + { + MockAttribute testFixtureAttribute = new MockAttribute("TestFixtureAttribute"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsTrueHasClassHasFullyQualifiedNUnitTestFixtureAttribute() + { + MockAttribute testFixtureAttribute = new MockAttribute("MbUnit.Framework.TestFixtureAttribute"); + MockClass mockClass = MockClass.CreateMockClassWithAttribute(testFixtureAttribute); + Assert.IsTrue(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsFalseWhenClassIsNull() + { + Assert.IsFalse(testFramework.IsTestClass(null)); + } + + [Test] + public void IsTestClassReturnsFalseWhenProjectContentLanguageIsNull() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + MockClass mockClass = new MockClass(mockProjectContent); + + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + + [Test] + public void IsTestClassReturnsFalseWhenProjectContentLanguageNameComparerIsNull() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + mockProjectContent.Language = new LanguageProperties(null); + MockClass mockClass = new MockClass(mockProjectContent); + mockClass.Attributes.Add(new MockAttribute("Test")); + + Assert.IsFalse(testFramework.IsTestClass(mockClass)); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMethodTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMethodTests.cs new file mode 100644 index 0000000000..50c33d231b --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestMethodTests.cs @@ -0,0 +1,127 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using Gallio.SharpDevelop; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioTestFrameworkIsTestMethodTests + { + GallioTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new GallioTestFramework(); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasNoAttributes() + { + MockMethod mockMethod = MockMethod.CreateMockMethodWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasTestAttributeWithoutAttributePart() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasTestAttributeAttribute() + { + MockAttribute testAttribute = new MockAttribute("TestAttribute"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsTrueWhenMethodHasFullyQualifiedNUnitTestAttribute() + { + MockAttribute testAttribute = new MockAttribute("MbUnit.Framework.TestAttribute"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodIsNull() + { + Assert.IsFalse(testFramework.IsTestMethod(null)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenProjectContentLanguageHasNullNameComparer() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + mockProjectContent.Language = new LanguageProperties(null); + MockClass mockClass = new MockClass(mockProjectContent); + MockMethod mockMethod = new MockMethod(mockClass); + mockMethod.Attributes.Add(new MockAttribute("Test")); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + /// + /// Even if the project is null the method should be + /// flagged as a TestMethod. + /// + [Test] + public void IsTestMethodReturnsTrueWhenProjectIsNull() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + MockProjectContent mockProjectContent = (MockProjectContent)mockMethod.DeclaringType.ProjectContent; + mockProjectContent.Project = null; + + Assert.IsTrue(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasNullDeclaringType() + { + MockMethod mockMethod = new MockMethod(new MockClass()); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasNullLanguage() + { + IProject project = new MockCSharpProject(); + MockProjectContent mockProjectContent = new MockProjectContent(); + mockProjectContent.Project = project; + MockClass mockClass = new MockClass(mockProjectContent); + MockMethod mockMethod = new MockMethod(mockClass); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + + [Test] + public void IsTestMethodReturnsFalseWhenMethodHasHasParameters() + { + MockAttribute testAttribute = new MockAttribute("Test"); + MockMethod mockMethod = MockMethod.CreateMockMethodWithAttribute(testAttribute); + MockParameter mockParameter = new MockParameter(); + mockMethod.Parameters.Add(mockParameter); + + Assert.IsFalse(testFramework.IsTestMethod(mockMethod)); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs new file mode 100644 index 0000000000..b6314232ea --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestFrameworkIsTestProjectTests.cs @@ -0,0 +1,97 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.SharpDevelop; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using UnitTesting.Tests.Utils; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioTestFrameworkIsTestProjectTests + { + GallioTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new GallioTestFramework(); + } + + [Test] + public void GallioTestFrameworkImplementsITestFramework() + { + Assert.IsNotNull(testFramework as ITestFramework); + } + + [Test] + public void IsTestProjectReturnsFalseForNullProject() + { + Assert.IsFalse(testFramework.IsTestProject(null)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReference() + { + MockCSharpProject project = new MockCSharpProject(); + + ReferenceProjectItem systemRef = new ReferenceProjectItem(project, "System"); + ProjectService.AddProjectItem(project, systemRef); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "MbUnit"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsFalseForProjectWithoutMbUnitFrameworkAssemblyReference() + { + MockCSharpProject project = new MockCSharpProject(); + Assert.IsFalse(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceIgnoringCase() + { + MockCSharpProject project = new MockCSharpProject(); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "MBUNIT"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceIgnoringNonReferenceProjectItems() + { + MockCSharpProject project = new MockCSharpProject(); + + FileProjectItem fileItem = new FileProjectItem(project, ItemType.Compile, "test.cs"); + ProjectService.AddProjectItem(project, fileItem); + + ReferenceProjectItem nunitFrameworkRef = new ReferenceProjectItem(project, "mbunit"); + ProjectService.AddProjectItem(project, nunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsTrueForProjectWithMbUnitFrameworkAssemblyReferenceUsingFullName() + { + MockCSharpProject project = new MockCSharpProject(); + string assemblyName = "mbunit, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77"; + ReferenceProjectItem mbunitFrameworkRef = new ReferenceProjectItem(project, assemblyName); + ProjectService.AddProjectItem(project, mbunitFrameworkRef); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs new file mode 100644 index 0000000000..6c295880c6 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/GallioTestToSharpDevelopTestResultConversionTests.cs @@ -0,0 +1,155 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Model = Gallio.Model; +using Gallio.Extension; +using Gallio.Runner.Events; +using Gallio.SharpDevelop; +using Gallio.SharpDevelop.Tests.Utils; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class GallioTestToSharpDevelopTestResultConversionTests + { + GallioTestStepFinishedEventArgsFactory factory; + TestStepFinishedEventArgs testStepEventArgs; + GallioTestStepConverter converter; + TestResult testResult; + + [SetUp] + public void Init() + { + factory = new GallioTestStepFinishedEventArgsFactory(); + } + + [Test] + public void GallioTestNameIsConvertedToSharpDevelopTestName() + { + string gallioTestName = "MyNamespace/MyClass/MyTestMethod"; + CreateGallioTestStepEventArgs(gallioTestName); + ConvertToSharpDevelopTestResult(); + + string expectedTestName = "MyNamespace.MyClass.MyTestMethod"; + Assert.AreEqual(expectedTestName, testResult.Name); + } + + void CreateGallioTestStepEventArgs(string testName) + { + testStepEventArgs = factory.Create(testName); + } + + void ConvertToSharpDevelopTestResult() + { + converter = new GallioTestStepConverter(testStepEventArgs); + testResult = converter.GetTestResult(); + } + + [Test] + public void GallioTestOutcomePassedIsConvertedToSharpDevelopTestSuccess() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToPassed(); + ConvertToSharpDevelopTestResult(); + + Assert.AreEqual(TestResultType.Success, testResult.ResultType); + } + + void CreateGallioTestStepEventArgs() + { + CreateGallioTestStepEventArgs("MyNamespace.MyClass.MyTest"); + } + + void UpdateGallioTestOutcomeToPassed() + { + UpdateGallioTestOutcome(Model.TestOutcome.Passed); + } + + void UpdateGallioTestOutcome(Model.TestOutcome testOutcome) + { + testStepEventArgs.TestStepRun.Result.Outcome = testOutcome; + } + + [Test] + public void GallioTestOutcomeErrorIsConvertedToSharpDevelopTestFailure() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToError(); + ConvertToSharpDevelopTestResult(); + + Assert.AreEqual(TestResultType.Failure, testResult.ResultType); + } + + void UpdateGallioTestOutcomeToError() + { + UpdateGallioTestOutcome(Model.TestOutcome.Error); + } + + [Test] + public void GallioTestOutcomeSkippedIsConvertedToSharpDevelopTestIgnored() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToSkipped(); + ConvertToSharpDevelopTestResult(); + + Assert.AreEqual(TestResultType.Ignored, testResult.ResultType); + } + + void UpdateGallioTestOutcomeToSkipped() + { + UpdateGallioTestOutcome(Model.TestOutcome.Skipped); + } + + [Test] + public void GallioTestOutcomeInconclusiveIsConvertedToSharpDevelopTestIgnored() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToInconclusive(); + ConvertToSharpDevelopTestResult(); + + Assert.AreEqual(TestResultType.Ignored, testResult.ResultType); + } + + void UpdateGallioTestOutcomeToInconclusive() + { + UpdateGallioTestOutcome(Model.TestOutcome.Inconclusive); + } + + [Test] + public void GallioAssertionFailureMessageIsConvertedToSharpDevelopTestResultMessage() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToError(); + UpdateGallioTestLogWithAssertionFailure(); + ConvertToSharpDevelopTestResult(); + + string expectedMessage = "Expected value to be true. User assertion message."; + Assert.AreEqual(expectedMessage, testResult.Message); + } + + void UpdateGallioTestLogWithAssertionFailure() + { + GallioBodyTagFactory factory = new GallioBodyTagFactory(); + testStepEventArgs.TestStepRun.TestLog.Streams.Add(factory.CreateAssertionFailureStructuredStream()); + } + + [Test] + public void GallioAssertionFailureStackTraceIsConvertedToSharpDevelopTestResultStackTrace() + { + CreateGallioTestStepEventArgs(); + UpdateGallioTestOutcomeToError(); + UpdateGallioTestLogWithAssertionFailure(); + ConvertToSharpDevelopTestResult(); + + string expectedStackTrace = + @" at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\GallioTest\MyClass.cs:line 46 "; + Assert.AreEqual(expectedStackTrace, testResult.StackTrace); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs new file mode 100644 index 0000000000..505cd93e81 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/TestResultsWriterTestFixture.cs @@ -0,0 +1,126 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; +using Gallio.Extension; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class TestResultsWriterTestFixture + { + TestResultsWriter writer; + StringBuilder results; + + [SetUp] + public void Init() + { + results = new StringBuilder(); + StringWriter stringWriter = new StringWriter(results); + writer = new TestResultsWriter(stringWriter); + } + + [TearDown] + public void TearDown() + { + writer.Dispose(); + } + + [Test] + public void WriteSuccessTestResult() + { + TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); + testResult.ResultType = TestResultType.Success; + writer.Write(testResult); + + string expectedText = + "Name: MyTests.MyTestClass.MyTestMethod\r\n" + + "Result: Success\r\n"; + + Assert.AreEqual(expectedText, results.ToString()); + } + + [Test] + public void WriteIgnoredTestResult() + { + TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); + testResult.ResultType = TestResultType.Ignored; + writer.Write(testResult); + + string expectedText = + "Name: MyTests.MyTestClass.MyTestMethod\r\n" + + "Result: Ignored\r\n"; + + Assert.AreEqual(expectedText, results.ToString()); + } + + [Test] + public void WriteFailedTestResult() + { + TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "message"; + testResult.StackTrace = "stacktrace"; + writer.Write(testResult); + + string expectedText = + "Name: MyTests.MyTestClass.MyTestMethod\r\n" + + "Result: Failure\r\n" + + "Message: message\r\n" + + "StackTrace: stacktrace\r\n"; + + Assert.AreEqual(expectedText, results.ToString()); + } + + [Test] + public void WriteFailedTestResultWithTwoLineMessage() + { + TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "first\r\n" + + "second"; + testResult.StackTrace = "stacktrace"; + writer.Write(testResult); + + string expectedText = + "Name: MyTests.MyTestClass.MyTestMethod\r\n" + + "Result: Failure\r\n" + + "Message: first\r\n" + + " second\r\n" + + "StackTrace: stacktrace\r\n"; + + Assert.AreEqual(expectedText, results.ToString()); + } + + [Test] + public void WriteFailedTestResultWithThreeLineStackTrace() + { + TestResult testResult = new TestResult("MyTests.MyTestClass.MyTestMethod"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "first\r\n" + + "second\r\n"; + testResult.StackTrace = "first\r\n" + + "second\r\n" + + "third\r\n"; + writer.Write(testResult); + + string expectedText = + "Name: MyTests.MyTestClass.MyTestMethod\r\n" + + "Result: Failure\r\n" + + "Message: first\r\n" + + " second\r\n" + + "StackTrace: first\r\n" + + " second\r\n" + + " third\r\n"; + + Assert.AreEqual(expectedText, results.ToString()); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs new file mode 100644 index 0000000000..6719b90d35 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/TestRunnerExtensionTestFixture.cs @@ -0,0 +1,71 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Extension; +using Gallio.Runtime.Logging; +using Gallio.SharpDevelop.Tests.Utils; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests +{ + [TestFixture] + public class TestRunnerExtensionTestFixture + { + SharpDevelopTestRunnerExtension testRunnerExtension; + MockTestResultsWriterFactory factory; + MockTestRunnerEvents testRunnerEvents; + MockTestResultsWriter writer; + NullLogger logger; + + [SetUp] + public void Init() + { + testRunnerEvents = new MockTestRunnerEvents(); + logger = new NullLogger(); + factory = new MockTestResultsWriterFactory(); + + testRunnerExtension = new SharpDevelopTestRunnerExtension(factory); + testRunnerExtension.Parameters = @"c:\temp\tmp77.tmp"; + testRunnerExtension.Install(testRunnerEvents, logger); + + writer = factory.TestResultsWriter; + } + + [Test] + public void TestResultWriterCreatedWithFileNameTakenFromTestRunnerExtensionParameters() + { + string expectedFileName = @"c:\temp\tmp77.tmp"; + Assert.AreEqual(expectedFileName, writer.FileName); + } + + [Test] + public void FiringTestStepFinishedEventWritesTestResultNameToTestResultsWriter() + { + string testName = "MyNamespace.MyTests.MyTestMethod"; + testRunnerEvents.FireTestStepFinishedEvent("MyNamespace.MyTests.MyTestMethod"); + + Assert.AreEqual(testName, writer.FirstTestResult.Name); + } + + [Test] + public void TestRunnerEventsDisposeStartedEventCausesTestResultsWriterToBeDisposed() + { + testRunnerEvents.FireDisposeStartedEvent(); + Assert.IsTrue(writer.IsDisposed); + } + + [Test] + public void FiringTestStepFinishedEventWithNonTestCaseDoesNotWriteTestResultToTestResultsWriter() + { + testRunnerEvents.FireTestStepFinishedEventForNonTestCase("MyNamespace.MyTests.MyTestMethod"); + + Assert.AreEqual(0, writer.TestResults.Count); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs new file mode 100644 index 0000000000..bea5cdc90b --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioBodyTagFactory.cs @@ -0,0 +1,93 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Model; +using Gallio.Common.Markup; +using Gallio.Common.Markup.Tags; +using Gallio.Common.Reflection; + +namespace Gallio.SharpDevelop.Tests.Utils +{ + public class GallioBodyTagFactory + { + public StructuredStream CreateAssertionFailureStructuredStream() + { + StructuredStream stream = new StructuredStream("Failures"); + stream.Body = CreateAssertionFailure(); + return stream; + } + + public BodyTag CreateAssertionFailure() + { + BodyTag bodyTag = new BodyTag(); + bodyTag.Contents.Add(CreateAssertionFailureMarkerTag()); + return bodyTag; + } + + MarkerTag CreateAssertionFailureMarkerTag() + { + MarkerTag markerTag = new MarkerTag(Marker.AssertionFailure); + markerTag.Contents.Add(CreateAssertionFailureSectionTag()); + return markerTag; + } + + SectionTag CreateAssertionFailureSectionTag() + { + SectionTag sectionTag = new SectionTag("Expected value to be true."); + sectionTag.Contents.Add(CreateUserAssertionMessageTextTag()); + sectionTag.Contents.Add(CreateMonospaceMarkerTag()); + sectionTag.Contents.Add(CreateEmptyTextTag()); + sectionTag.Contents.Add(CreateStackTraceMarkerTag()); + return sectionTag; + } + + TextTag CreateUserAssertionMessageTextTag() + { + return new TextTag("User assertion message."); + } + + MarkerTag CreateMonospaceMarkerTag() + { + return new MarkerTag(Marker.Monospace); + } + + TextTag CreateEmptyTextTag() + { + return new TextTag(String.Empty); + } + + MarkerTag CreateStackTraceMarkerTag() + { + MarkerTag markerTag = new MarkerTag(Marker.StackTrace); + markerTag.Contents.Add(CreateStackTraceTextTag()); + markerTag.Contents.Add(CreateCodeLocationMarkerTag()); + return markerTag; + } + + TextTag CreateStackTraceTextTag() + { + string text = " at GallioTest.MyClass.AssertWithFailureMessage() in "; + return new TextTag(text); + } + + MarkerTag CreateCodeLocationMarkerTag() + { + CodeLocation location = new CodeLocation(); + Marker marker = Marker.CodeLocation(location); + MarkerTag markerTag = new MarkerTag(marker); + markerTag.Contents.Add(CreateCodeLocationTextTag()); + return markerTag; + } + + TextTag CreateCodeLocationTextTag() + { + string text = @"d:\temp\test\GallioTest\MyClass.cs:line 46 "; + return new TextTag(text); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs new file mode 100644 index 0000000000..0a3bc5856c --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/GallioTestStepFinishedEventArgsFactory.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using Gallio.Model.Schema; +using Gallio.Runner.Events; +using Gallio.Runner.Reports.Schema; + +namespace Gallio.SharpDevelop.Tests.Utils +{ + public class GallioTestStepFinishedEventArgsFactory + { + TestData gallioTest; + Report gallioReport = new Report(); + TestStepRun gallioTestStepRun; + + public TestStepFinishedEventArgs Create(string name) + { + CreateTestData(name); + CreateTestStepRun(); + return CreateTestStepFinishedEventArgs(); + } + + void CreateTestData(string name) + { + string gallioTestName = ConvertToGallioTestName(name); + gallioTest = new TestData("a", "b", gallioTestName); + gallioTest.IsTestCase = true; + } + + void CreateTestStepRun() + { + TestStepData testStepData = new TestStepData("a", "b", "c", "d"); + gallioTestStepRun = new TestStepRun(testStepData); + } + + string ConvertToGallioTestName(string name) + { + return name.Replace('.', '/'); + } + + TestStepFinishedEventArgs CreateTestStepFinishedEventArgs() + { + return new TestStepFinishedEventArgs(gallioReport, gallioTest, gallioTestStepRun); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs new file mode 100644 index 0000000000..a04455014e --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriter.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Extension; +using System.Collections.Generic; + +namespace Gallio.SharpDevelop.Tests.Utils +{ + public class MockTestResultsWriter : ITestResultsWriter + { + string fileName = String.Empty; + List testResults = new List(); + bool disposed; + + public MockTestResultsWriter(string fileName) + { + this.fileName = fileName; + } + + public string FileName { + get { return fileName; } + } + + public void Write(TestResult testResult) + { + testResults.Add(testResult); + } + + public List TestResults { + get { return testResults; } + } + + public TestResult FirstTestResult { + get { return testResults[0]; } + } + + public void Dispose() + { + disposed = true; + } + + public bool IsDisposed { + get { return disposed; } + set { disposed = value; } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs new file mode 100644 index 0000000000..7e519d69d9 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestResultsWriterFactory.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Extension; +using Gallio.SharpDevelop; + +namespace Gallio.SharpDevelop.Tests.Utils +{ + public class MockTestResultsWriterFactory : ITestResultsWriterFactory + { + MockTestResultsWriter testResultsWriter; + + public ITestResultsWriter Create(string fileName) + { + testResultsWriter = new MockTestResultsWriter(fileName); + return testResultsWriter; + } + + public MockTestResultsWriter TestResultsWriter { + get { return testResultsWriter; } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs new file mode 100644 index 0000000000..72dcb19efd --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/MockTestRunnerEvents.cs @@ -0,0 +1,76 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using Gallio.Runner.Events; + +namespace Gallio.SharpDevelop.Tests.Utils +{ + public class MockTestRunnerEvents : ITestRunnerEvents + { + #pragma warning disable 67 + + public event EventHandler LogEntrySubmitted; + public event EventHandler MessageReceived; + public event EventHandler InitializeStarted; + public event EventHandler InitializeFinished; + public event EventHandler DisposeStarted; + public event EventHandler DisposeFinished; + public event EventHandler ExploreStarted; + public event EventHandler ExploreFinished; + public event EventHandler RunStarted; + public event EventHandler RunFinished; + public event EventHandler TestDiscovered; + public event EventHandler AnnotationDiscovered; + public event EventHandler TestStepStarted; + public event EventHandler TestStepFinished; + public event EventHandler TestStepLifecyclePhaseChanged; + public event EventHandler TestStepMetadataAdded; + public event EventHandler TestStepLogAttach; + public event EventHandler TestStepLogStreamWrite; + public event EventHandler TestStepLogStreamEmbed; + public event EventHandler TestStepLogStreamBeginSectionBlock; + public event EventHandler TestStepLogStreamBeginMarkerBlock; + public event EventHandler TestStepLogStreamEndBlock; + + #pragma warning restore 67 + + public void FireTestStepFinishedEvent(string name) + { + TestStepFinishedEventArgs e = CreateTestStepFinishedEventArgs(name); + FireTestStepFinishedEvent(e); + } + + TestStepFinishedEventArgs CreateTestStepFinishedEventArgs(string testName) + { + GallioTestStepFinishedEventArgsFactory factory = new GallioTestStepFinishedEventArgsFactory(); + return factory.Create(testName); + } + + void FireTestStepFinishedEvent(TestStepFinishedEventArgs e) + { + if (TestStepFinished != null) { + TestStepFinished(this, e); + } + } + + public void FireTestStepFinishedEventForNonTestCase(string testName) + { + TestStepFinishedEventArgs e = CreateTestStepFinishedEventArgs(testName); + e.Test.IsTestCase = false; + FireTestStepFinishedEvent(e); + } + + public void FireDisposeStartedEvent() + { + if (DisposeStarted != null) { + DisposeStarted(this, new DisposeStartedEventArgs()); + } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs new file mode 100644 index 0000000000..1e0f85b3ad --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/CreateAssertionFailureBodyTagTestFixture.cs @@ -0,0 +1,175 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Common.Markup; +using Gallio.Common.Markup.Tags; +using Gallio.SharpDevelop.Tests.Utils; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests.Utils.Tests +{ + [TestFixture] + public class CreateAssertionFailureBodyTagTestFixture + { + StructuredStream structuredStream; + BodyTag bodyTag; + MarkerTag assertionFailureMarkerTag; + SectionTag expectedValueToBeTrueSectionTag; + TextTag expectedValueToBeTrueTextTag; + MarkerTag monoSpaceMarkerTag; + TextTag textTagAfterMonoSpaceMarkerTag; + MarkerTag stackTraceMarkerTag; + TextTag stackTraceTextTag; + MarkerTag codeLocationMarkerTag; + TextTag codeLocationTextTag; + + [SetUp] + public void Init() + { + GallioBodyTagFactory factory = new GallioBodyTagFactory(); + structuredStream = factory.CreateAssertionFailureStructuredStream(); + bodyTag = structuredStream.Body; + assertionFailureMarkerTag = GetFirstChildMarkerTag(bodyTag); + expectedValueToBeTrueSectionTag = GetFirstChildSectionTag(assertionFailureMarkerTag); + expectedValueToBeTrueTextTag = GetFirstChildTextTag(expectedValueToBeTrueSectionTag); + monoSpaceMarkerTag = GetSecondChildMarkerTag(expectedValueToBeTrueSectionTag); + textTagAfterMonoSpaceMarkerTag = GetThirdChildTextTag(expectedValueToBeTrueSectionTag); + stackTraceMarkerTag = GetFourthChildMarkerTag(expectedValueToBeTrueSectionTag); + stackTraceTextTag = GetFirstChildTextTag(stackTraceMarkerTag); + codeLocationMarkerTag = GetSecondChildMarkerTag(stackTraceMarkerTag); + codeLocationTextTag = GetFirstChildTextTag(codeLocationMarkerTag); + } + + MarkerTag GetFirstChildMarkerTag(ContainerTag parentTag) + { + return GetFirstChildTag(parentTag) as MarkerTag; + } + + Tag GetFirstChildTag(ContainerTag parentTag) + { + return GetChildTagAtPosition(parentTag, 1); + } + + Tag GetChildTagAtPosition(ContainerTag parentTag, int position) + { + if (TagHasChildTagAtPosition(parentTag, position)) { + int index = position - 1; + return parentTag.Contents[index]; + } + return null; + } + + bool TagHasChildTagAtPosition(ContainerTag tag, int position) + { + if (tag != null) { + return tag.Contents.Count >= position; + } + return false; + } + + SectionTag GetFirstChildSectionTag(ContainerTag parentTag) + { + return GetFirstChildTag(parentTag) as SectionTag; + } + + TextTag GetFirstChildTextTag(ContainerTag parentTag) + { + return GetFirstChildTag(parentTag) as TextTag; + } + + MarkerTag GetSecondChildMarkerTag(ContainerTag parentTag) + { + return GetSecondChildTag(parentTag) as MarkerTag; + } + + Tag GetSecondChildTag(ContainerTag parentTag) + { + return GetChildTagAtPosition(parentTag, 2); + } + + TextTag GetThirdChildTextTag(ContainerTag parentTag) + { + return GetChildTagAtPosition(parentTag, 3) as TextTag; + } + + MarkerTag GetFourthChildMarkerTag(ContainerTag parentTag) + { + return GetChildTagAtPosition(parentTag, 4) as MarkerTag; + } + + [Test] + public void StructuredStreamNameIsFailures() + { + Assert.AreEqual("Failures", structuredStream.Name); + } + + [Test] + public void BodyTagHasOneChildTag() + { + Assert.AreEqual(1, bodyTag.Contents.Count); + } + + [Test] + public void BodyTagChildIsMarkerTagWithClassSetToAssertionFailure() + { + Assert.AreEqual("AssertionFailure", assertionFailureMarkerTag.Class); + } + + [Test] + public void AssertionFailureMarkerTagHasSectionTagContentsWithTagNameEqualToExpectedValueToBeTrue() + { + string expectedName = "Expected value to be true."; + Assert.AreEqual(expectedName, expectedValueToBeTrueSectionTag.Name); + } + + [Test] + public void ExpectedValueToBeTrueSectionTagHasTextTagChildWithTextSetToUserAssertionMessage() + { + string expectedText = "User assertion message."; + Assert.AreEqual(expectedText, expectedValueToBeTrueTextTag.Text); + } + + [Test] + public void ExpectedValueToBeTrueSectionTagHasMarkerTagChildWithClassSetToMonospace() + { + Assert.AreEqual("Monospace", monoSpaceMarkerTag.Class); + } + + [Test] + public void ExpectedValueToBeTrueSectionTagHasTextTagChildAfterMonospaceTagChild() + { + Assert.IsNotNull(textTagAfterMonoSpaceMarkerTag); + } + + [Test] + public void ExpectedValueToBeTrueSectionTagHasMarkerTagWithClassSetToStackTrace() + { + Assert.AreEqual("StackTrace", stackTraceMarkerTag.Class); + } + + [Test] + public void StackTraceTagHasFirstChildTextTagWithFirstLineOfStackTrace() + { + string expectedText = " at GallioTest.MyClass.AssertWithFailureMessage() in "; + Assert.AreEqual(expectedText, stackTraceTextTag.Text); + } + + [Test] + public void StackTraceTagHasMarkerTagChildWithClassSetToCodeLocation() + { + Assert.AreEqual("CodeLocation", codeLocationMarkerTag.Class); + } + + [Test] + public void CodeLocationMarkerHasTextTagWithCodeLocationText() + { + string expectedText = @"d:\temp\test\GallioTest\MyClass.cs:line 46 "; + Assert.AreEqual(expectedText, codeLocationTextTag.Text); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs new file mode 100644 index 0000000000..42f1b70cfd --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestResultsWriterFactoryTests.cs @@ -0,0 +1,82 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Extension; +using Gallio.SharpDevelop.Tests.Utils; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestResultsWriterFactoryTests + { + MockTestResultsWriterFactory factory; + + [SetUp] + public void Init() + { + factory = new MockTestResultsWriterFactory(); + } + + [Test] + public void TestResultsWritersSavedByFactory() + { + ITestResultsWriter writer = factory.Create("testresults.txt"); + Assert.AreEqual(writer, factory.TestResultsWriter); + } + + [Test] + public void TestResultsWriterCreatedIsMockTestResultsWriter() + { + MockTestResultsWriter writer = factory.Create("abc.txt") as MockTestResultsWriter; + Assert.IsNotNull(writer); + } + + [Test] + public void TestResultsWriterCreatedWithFileNamePassedToFactoryCreateMethod() + { + MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; + Assert.AreEqual("testresults.txt", writer.FileName); + } + + [Test] + public void TestResultsWriterSavesTestResultsWritten() + { + TestResult firstResult = new TestResult("test1"); + TestResult secondResult = new TestResult("test2"); + MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; + writer.Write(firstResult); + writer.Write(secondResult); + + TestResult[] expectedTestResults = new TestResult[] { firstResult, secondResult }; + + Assert.AreEqual(expectedTestResults, writer.TestResults.ToArray()); + } + + [Test] + public void FirstTestResultsWriterReturnsFirstTestResultsWriter() + { + TestResult firstResult = new TestResult("test1"); + TestResult secondResult = new TestResult("test2"); + MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; + writer.Write(firstResult); + writer.Write(secondResult); + + Assert.AreEqual(firstResult, writer.FirstTestResult); + } + + [Test] + public void IsDisposedCalledReturnsTrueAfterDisposeMethodCalled() + { + MockTestResultsWriter writer = factory.Create("testresults.txt") as MockTestResultsWriter; + writer.IsDisposed = false; + writer.Dispose(); + Assert.IsTrue(writer.IsDisposed); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs new file mode 100644 index 0000000000..80ad46ae04 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.Tests/Utils/Tests/MockTestRunnerEventsTestFixture.cs @@ -0,0 +1,69 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.UnitTesting; +using Gallio.Runner.Events; +using Gallio.SharpDevelop.Tests.Utils; +using NUnit.Framework; + +namespace Gallio.SharpDevelop.Tests.Utils.Tests +{ + [TestFixture] + public class MockTestRunnerEventsTestFixture + { + MockTestRunnerEvents testRunnerEvents; + TestStepFinishedEventArgs testStepFinishedEventArgs; + + [SetUp] + public void Init() + { + testRunnerEvents = new MockTestRunnerEvents(); + testRunnerEvents.TestStepFinished += delegate (object source, TestStepFinishedEventArgs e) { + testStepFinishedEventArgs = e; + }; + } + + [Test] + public void FireTestStepFinishedEventWithTestResultCreatesGallioTestDataWithExpectedFullName() + { + testRunnerEvents.FireTestStepFinishedEvent("MyNamespace/MyTests/MyTestMethod"); + + string expectedFullName = "MyNamespace/MyTests/MyTestMethod"; + string actualFullName = testStepFinishedEventArgs.Test.FullName; + Assert.AreEqual(expectedFullName, actualFullName); + } + + [Test] + public void FireTestStepFinishedEventCreatesGallioTestDataWithIsTestCaseSetToTrue() + { + testRunnerEvents.FireTestStepFinishedEvent("testName"); + + Assert.IsTrue(testStepFinishedEventArgs.Test.IsTestCase); + } + + [Test] + public void FireTestStepFinishedEventForNonTestCaseCreatesGallioTestDataIsTestCaseSetToFalse() + { + testRunnerEvents.FireTestStepFinishedEventForNonTestCase("testName"); + + Assert.IsFalse(testStepFinishedEventArgs.Test.IsTestCase); + } + + [Test] + public void FireDisposeStartedEventTriggersEvent() + { + DisposeStartedEventArgs eventArgs = null; + testRunnerEvents.DisposeStarted += delegate(object sender, DisposeStartedEventArgs e) { + eventArgs = e; + }; + testRunnerEvents.FireDisposeStartedEvent(); + + Assert.IsNotNull(eventArgs); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop.sln b/samples/Gallio/Gallio.SharpDevelop.sln new file mode 100644 index 0000000000..6298d44b22 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.0.0.5840 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.SharpDevelop", "Gallio.SharpDevelop\Gallio.SharpDevelop.csproj", "{88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.SharpDevelop.Tests", "Gallio.SharpDevelop.Tests\Gallio.SharpDevelop.Tests.csproj", "{3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallio.Extension", "Gallio.Extension\Gallio.Extension.csproj", "{98030C86-7B0F-4813-AC4D-9FFCF00CF81F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Debug|x86.Build.0 = Debug|x86 + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Debug|x86.ActiveCfg = Debug|x86 + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Release|x86.Build.0 = Release|x86 + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC}.Release|x86.ActiveCfg = Release|x86 + {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Debug|x86.Build.0 = Debug|x86 + {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Debug|x86.ActiveCfg = Debug|x86 + {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Release|x86.Build.0 = Release|x86 + {3F6C539D-DB38-41B4-A5B3-B9A52AE607CD}.Release|x86.ActiveCfg = Release|x86 + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Debug|x86.Build.0 = Debug|x86 + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Debug|x86.ActiveCfg = Debug|x86 + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Release|x86.Build.0 = Release|x86 + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F}.Release|x86.ActiveCfg = Release|x86 + EndGlobalSection +EndGlobal diff --git a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin new file mode 100644 index 0000000000..a24ea7cf00 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.addin @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj new file mode 100644 index 0000000000..77fd1b60ec --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/Gallio.SharpDevelop.csproj @@ -0,0 +1,87 @@ + + + + {88D3DC5E-8A91-4DCE-A785-CC37DE0AA0EC} + Debug + x86 + Library + Gallio.SharpDevelop + Gallio.SharpDevelop + v4.0 + Properties + C:\Users\Matt\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis + False + False + 4 + false + + + x86 + False + Auto + 4194304 + 4096 + + + ..\..\..\AddIns\Samples\Gallio + true + Full + False + False + DEBUG;TRACE + + + ..\..\..\AddIns\Samples\Gallio + false + None + True + False + TRACE + + + + + ..\Gallio\bin\Gallio.dll + + + ..\..\..\bin\ICSharpCode.Core.dll + False + + + ..\..\..\bin\ICSharpCode.SharpDevelop.dll + False + + + ..\..\..\bin\ICSharpCode.SharpDevelop.Dom.dll + False + + + + + ..\..\..\AddIns\AddIns\Misc\UnitTesting\UnitTesting.dll + False + + + + + + + + + + + + + + + + Always + + + + + {98030C86-7B0F-4813-AC4D-9FFCF00CF81F} + Gallio.Extension + + + \ No newline at end of file diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs new file mode 100644 index 0000000000..e2ce0c5ff9 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplication.cs @@ -0,0 +1,96 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioEchoConsoleApplication + { + string fileName = String.Empty; + SelectedTests selectedTests; + StringBuilder commandLine = new StringBuilder(); + List testRunnerExtensions = + new List(); + + public GallioEchoConsoleApplication(SelectedTests selectedTests, string fileName) + { + this.selectedTests = selectedTests; + this.fileName = fileName; + } + + public GallioEchoConsoleApplication(SelectedTests selectedTests) + : this(selectedTests, String.Empty) + { + } + + public string FileName { + get { return fileName; } + } + + public List TestRunnerExtensions { + get { return testRunnerExtensions; } + } + + public string GetArguments() + { + AppendDotNet4Framework(); + AppendTestRunnerExtensions(); + AppendAssemblyToTest(); + + return commandLine.ToString().TrimEnd(); + } + + void AppendDotNet4Framework() + { + AppendArgument("/rv:v4.0.30319"); + + } + + void AppendTestRunnerExtensions() + { + foreach (TestRunnerExtensionCommandLineArgument arg in testRunnerExtensions) { + AppendArgument(arg.ToString()); + } + } + + void AppendArgument(string argument) + { + commandLine.Append(argument); + commandLine.Append(' '); + } + + void AppendAssemblyToTest() + { + AppendQuoted(selectedTests.Project.OutputAssemblyFullPath); + } + + void AppendQuoted(string argument) + { + commandLine.AppendFormat("\"{0}\"", argument); + } + + public ProcessStartInfo GetProcessStartInfo() + { + ProcessStartInfo startInfo = new ProcessStartInfo(); + startInfo.FileName = fileName; + startInfo.Arguments = GetArguments(); + startInfo.WorkingDirectory = GetWorkingDirectory(); + return startInfo; + } + + string GetWorkingDirectory() + { + return StringParser.Parse("${addinpath:ICSharpCode.Gallio}"); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs new file mode 100644 index 0000000000..ddfd79d674 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationFactory.cs @@ -0,0 +1,41 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioEchoConsoleApplicationFactory + { + public static readonly string AddInTreePath = "/SharpDevelop/UnitTesting/GallioEchoApplication"; + + string gallioEchoConsoleApplicationFileName = "Gallio.Echo.exe"; + + public GallioEchoConsoleApplicationFactory() + : this(new UnitTestAddInTree()) + { + } + + public GallioEchoConsoleApplicationFactory(IAddInTree addInTree) + { + ReadFileName(addInTree); + } + + void ReadFileName(IAddInTree addInTree) + { + List items = addInTree.BuildItems(AddInTreePath, this); + gallioEchoConsoleApplicationFileName = items[0]; + } + + public GallioEchoConsoleApplication Create(SelectedTests selectedTests) + { + return new GallioEchoConsoleApplication(selectedTests, gallioEchoConsoleApplicationFileName); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs new file mode 100644 index 0000000000..678e732e3a --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioEchoConsoleApplicationProcessStartInfo.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioEchoConsoleApplicationProcessStartInfo + { + ProcessStartInfo processStartInfo = new ProcessStartInfo(); + + public GallioEchoConsoleApplicationProcessStartInfo(SelectedTests selectedTests, string testResultsFileName) + { + GallioEchoConsoleApplicationFactory factory = new GallioEchoConsoleApplicationFactory(); + GallioEchoConsoleApplication app = factory.Create(selectedTests); + SharpDevelopTestRunnerExtensionCommandLineArgument argument = new SharpDevelopTestRunnerExtensionCommandLineArgument(); + argument.TestResultsFileName = testResultsFileName; + app.TestRunnerExtensions.Add(argument); + processStartInfo = app.GetProcessStartInfo(); + } + + public ProcessStartInfo ProcessStartInfo { + get { return processStartInfo; } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs new file mode 100644 index 0000000000..bc3762a7e6 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioTestDebugger.cs @@ -0,0 +1,33 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioTestDebugger : TestDebuggerBase + { + public GallioTestDebugger() + { + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + GallioEchoConsoleApplicationProcessStartInfo startInfo = + new GallioEchoConsoleApplicationProcessStartInfo(selectedTests, base.TestResultsMonitor.FileName); + startInfo.ProcessStartInfo.Arguments += " /d"; + return startInfo.ProcessStartInfo; + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new GallioTestResult(testResult); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs new file mode 100644 index 0000000000..b5db880dab --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioTestFramework.cs @@ -0,0 +1,111 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioTestFramework : ITestFramework + { + public GallioTestFramework() + { + } + + public bool IsTestProject(IProject project) + { + if (project != null) { + foreach (ProjectItem projectItem in project.Items) { + ReferenceProjectItem referenceProjectItem = projectItem as ReferenceProjectItem; + if (IsMbUnitFrameworkAssemblyReference(referenceProjectItem)) { + return true; + } + } + } + return false; + } + + bool IsMbUnitFrameworkAssemblyReference(ReferenceProjectItem referenceProjectItem) + { + if (referenceProjectItem != null) { + string name = referenceProjectItem.ShortName; + return name.Equals("MbUnit", StringComparison.OrdinalIgnoreCase); + } + return false; + } + + public ITestRunner CreateTestRunner() + { + return new GallioTestRunner(); + } + + public ITestRunner CreateTestDebugger() + { + return new GallioTestDebugger(); + } + + public bool IsTestClass(IClass c) + { + StringComparer nameComparer = GetNameComparer(c); + if (nameComparer != null) { + MbUnitTestAttributeName testAttributeName = new MbUnitTestAttributeName("TestFixture", nameComparer); + foreach (IAttribute attribute in c.Attributes) { + if (testAttributeName.IsEqual(attribute)) { + return true; + } + } + } + return false; + } + + StringComparer GetNameComparer(IClass c) + { + if (c != null) { + IProjectContent projectContent = c.ProjectContent; + if (projectContent != null) { + LanguageProperties language = projectContent.Language; + if (language != null) { + return language.NameComparer; + } + } + } + return null; + } + + /// + /// Determines whether the method is a test method. A method + /// is considered to be a test method if it contains the NUnit Test attribute. + /// If the method has parameters it cannot be a test method. + /// + public bool IsTestMethod(IMember member) + { + if (member == null) { + return false; + } + + StringComparer nameComparer = GetNameComparer(member.DeclaringType); + if (nameComparer != null) { + MbUnitTestAttributeName testAttribute = new MbUnitTestAttributeName("Test", nameComparer); + foreach (IAttribute attribute in member.Attributes) { + if (testAttribute.IsEqual(attribute)) { + IMethod method = (IMethod)member; + if (method.Parameters.Count == 0) { + return true; + } + } + } + } + return false; + } + + public bool IsBuildNeededBeforeTestRun { + get { return true; } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs new file mode 100644 index 0000000000..9d54a3b0ee --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioTestResult.cs @@ -0,0 +1,54 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Text.RegularExpressions; +using System.IO; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioTestResult : TestResult + { + public GallioTestResult(TestResult testResult) + : base(testResult.Name) + { + Message = testResult.Message; + ResultType = testResult.ResultType; + StackTrace = testResult.StackTrace; + } + + protected override void OnStackTraceChanged() + { + GetFilePositionFromStackTrace(); + } + + /// + /// Stack trace: + /// at GallioTest.MyClass.AssertWithFailureMessage() in d:\temp\test\..\GallioTest\MyClass.cs:line 46 + /// + void GetFilePositionFromStackTrace() + { + Match match = Regex.Match(StackTrace, @"\sin\s(.*?):line\s(\d+)", RegexOptions.Multiline); + if (match.Success) { + SetStackTraceFilePosition(match.Groups); + } else { + StackTraceFilePosition = FilePosition.Empty; + } + } + + void SetStackTraceFilePosition(GroupCollection groups) + { + string fileName = Path.GetFullPath(groups[1].Value); + int line = Convert.ToInt32(groups[2].Value); + int column = 1; + + StackTraceFilePosition = new FilePosition(fileName, line, column); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs b/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs new file mode 100644 index 0000000000..d8686673a3 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/GallioTestRunner.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.UnitTesting; + +namespace Gallio.SharpDevelop +{ + public class GallioTestRunner : TestProcessRunnerBase + { + public GallioTestRunner() + { + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + GallioEchoConsoleApplicationProcessStartInfo startInfo = + new GallioEchoConsoleApplicationProcessStartInfo(selectedTests, base.TestResultsMonitor.FileName); + return startInfo.ProcessStartInfo; + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new GallioTestResult(testResult); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs b/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs new file mode 100644 index 0000000000..5bcc36d6c6 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/MbUnitTestAttributeName.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; + +namespace Gallio.SharpDevelop +{ + public class MbUnitTestAttributeName + { + string name = String.Empty; + string qualifiedName = String.Empty; + string fullyQualifiedName = String.Empty; + StringComparer nameComparer; + + public MbUnitTestAttributeName(string name, StringComparer nameComparer) + { + this.name = name; + this.nameComparer = nameComparer; + qualifiedName = String.Concat(name, "Attribute"); + fullyQualifiedName = String.Concat("MbUnit.Framework.", name, "Attribute"); + } + + /// + /// Determines whether the specified attribute name is a + /// match to this attribute. + /// + public bool IsEqual(string attributeName) + { + if (nameComparer.Equals(attributeName, name) || + nameComparer.Equals(attributeName, qualifiedName) || + nameComparer.Equals(attributeName, fullyQualifiedName)) { + return true; + } + return false; + } + + public bool IsEqual(IAttribute attribute) + { + return IsEqual(attribute.AttributeType.FullyQualifiedName); + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs b/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1f2c22bb80 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Gallio.SharpDevelop")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Gallio.SharpDevelop")] +[assembly: AssemblyCopyright("Copyright 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("0.1")] diff --git a/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs b/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs new file mode 100644 index 0000000000..eebf2371b2 --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/SharpDevelopTestRunnerExtensionCommandLineArgument.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision$ +// + +using System; +using Gallio.Extension; + +namespace Gallio.SharpDevelop +{ + public class SharpDevelopTestRunnerExtensionCommandLineArgument : TestRunnerExtensionCommandLineArgument + { + string testResultsFileName = String.Empty; + + public SharpDevelopTestRunnerExtensionCommandLineArgument() + : base(GetFullyQualifiedTypeName()) + { + } + + static string GetFullyQualifiedTypeName() + { + Type type = typeof(SharpDevelopTestRunnerExtension); + string typeName = type.FullName; + string assemblyFileName = type.Assembly.ManifestModule.ScopeName; + return String.Format("{0},{1}", typeName, assemblyFileName); + } + + public string TestResultsFileName { + get { return testResultsFileName; } + set { + testResultsFileName = value; + Parameters = testResultsFileName; + } + } + } +} diff --git a/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs b/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs new file mode 100644 index 0000000000..6978b4c41f --- /dev/null +++ b/samples/Gallio/Gallio.SharpDevelop/TestRunnerExtensionCommandLineArgument.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision$ +// + +using System; + +namespace Gallio.SharpDevelop +{ + public class TestRunnerExtensionCommandLineArgument + { + string type; + string parameters = String.Empty; + + public TestRunnerExtensionCommandLineArgument(string type) + { + this.type = type; + } + + public string Type { + get { return type; } + } + + public string Parameters { + get { return parameters; } + set { parameters = value; } + } + + public override string ToString() + { + return String.Format("/re:\"{0}{1}\"", + GetTypeName(), + GetParameters()); + } + + string GetTypeName() + { + return type; + } + + string GetParameters() + { + if (String.IsNullOrEmpty(parameters)) { + return String.Empty; + } + return String.Format(";{0}", parameters); + } + } +} diff --git a/samples/Gallio/readme.rtf b/samples/Gallio/readme.rtf new file mode 100644 index 0000000000000000000000000000000000000000..c62ad1b501dd51d8f588d4b388045001c9aad74a GIT binary patch literal 771 zcmY*WON-ku5bim@V$MAn+ezq_JuS2>g|w75d(%a>Mz*LTsd^+SA^*KIjf)N(ETW5 z!d%1N95BHTJi#yi|9HKwF5;sY&|#F>NBEv}MrAT=t4&k2^lj^h$E!FRJpD0FZA9rC z5oA=t`IAw7wsaBQ#F;h^@GPx09$p+_>@j6{Qpz~dk)+htJh|d(GgVJexG!^`&_917YE}`8qbO2!6Uu4{Q>Iinw@KV=urp3ZLyt1z9Xgdxd#f7%)AL2 zlY=ylT+SYj>#Bj5pkzj9p)1BJSbzSsm=hiBOwT#Gfp<8qj}KPZdo^1pWl0`_rE3B^ a4G>##90lv#J^$P-QD0%+0N<+X>cfAD2oEO! literal 0 HcmV?d00001 From 181f2f0372764b144ee87db64d1d126fb1387b5b Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Wed, 26 May 2010 10:50:56 +0000 Subject: [PATCH 18/79] new properties for the Help3Catalog class and translatable messages and labels git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5850 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 8 +-- .../HelpViewer/Source/Controls/TocEntry.cs | 10 ++-- .../Source/Controls/TocPadControl.xaml.cs | 3 +- .../HelpViewer/Source/Core/DisplayHelp.cs | 52 ++++++++----------- .../HelpViewer/Source/Core/Help3Catalog.cs | 10 ++++ .../HelpViewer/Source/Core/Help3Service.cs | 5 -- .../Source/Core/HelpLibraryAgent.cs | 24 +++++++++ .../Source/Core/HelpLibraryManager.cs | 5 +- .../HelpViewer/Source/Help3OptionsPanel.xaml | 10 ++-- .../Source/Help3OptionsPanel.xaml.cs | 7 +-- 10 files changed, 76 insertions(+), 58 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index 5f29de8d8c..615c1b1be4 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -17,17 +17,17 @@ - + - + @@ -36,7 +36,7 @@ diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs index 53e01aa65e..a5e07799c6 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocEntry.cs @@ -27,7 +27,7 @@ namespace MSHelpSystem.Controls { class TocEntry : INotifyPropertyChanged { - const string url = "ms-xhelp://?method=children&id={3}&format=xml&product={0}&productVersion={1}&locale={2}"; + const string url = "ms-xhelp://?method=children&id={1}&format=xml&{0}"; string id; WebClient client = new WebClient(); @@ -57,9 +57,11 @@ namespace MSHelpSystem.Controls { get { - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (children == null && !client.IsBusy) - client.DownloadStringAsync(new Uri(Help3Environment.GetHttpFromMsXHelp(string.Format(url, catalog.ProductCode, catalog.ProductVersion, catalog.Locale, id)))); + if (Help3Service.ActiveCatalog != null) { + if (children == null && !client.IsBusy && HelpLibraryAgent.PortIsReady) { + client.DownloadStringAsync(new Uri(Help3Environment.GetHttpFromMsXHelp(string.Format(url, Help3Service.ActiveCatalog.AsMsXHelpParam, id)))); + } + } return children ?? defaultChild; } private set diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs index a8c68ee40c..c0ee8e6fe8 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/TocPadControl.xaml.cs @@ -31,8 +31,7 @@ namespace MSHelpSystem.Controls void LoadToc() { if (!Help3Environment.IsLocalHelp) DataContext = null; - // TODO: Needs a localization - else DataContext = new[] { new TocEntry("-1") { Title = "Help Library" } }; + else DataContext = new[] { new TocEntry("-1") { Title = StringParser.Parse("${res:AddIns.HelpViewer.HelpLibraryRootTitle}") } }; } void Help3TocItemChanged(object sender, RoutedPropertyChangedEventArgs e) diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 3e3792bfc5..4884e57a1e 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -19,18 +19,16 @@ namespace MSHelpSystem.Core public static void Catalog() { if (!Help3Environment.IsLocalHelp) { - MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", - "Help Viewer", + MessageBox.Show(StringParser.Parse("${res:AddIns.HelpViewer.OfflineFeatureRequestMsg}"), + StringParser.Parse("${res:AddIns.HelpViewer.MicrosoftHelpViewerTitle}"), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (catalog == null) { - throw new ArgumentNullException("c"); + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); } - string helpCatalogUrl = string.Format(@"ms-xhelp://?method=page&id=-1&product={0}&productVersion={1}&locale={2}", - catalog.ProductCode, catalog.ProductVersion, catalog.Locale); + string helpCatalogUrl = string.Format(@"ms-xhelp://?method=page&id=-1&{0}", Help3Service.ActiveCatalog.AsMsXHelpParam); LoggingService.Debug(string.Format("Help 3.0: {0}", helpCatalogUrl)); DisplayLocalHelp(helpCatalogUrl); } @@ -41,18 +39,16 @@ namespace MSHelpSystem.Core throw new ArgumentNullException("pageId"); } if (!Help3Environment.IsLocalHelp) { - MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", - "Help Viewer", + MessageBox.Show(StringParser.Parse("${res:AddIns.HelpViewer.OfflineFeatureRequestMsg}"), + StringParser.Parse("${res:AddIns.HelpViewer.MicrosoftHelpViewerTitle}"), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (catalog == null) { - throw new ArgumentNullException("c"); + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); } - string helpPageUrl = string.Format(@"ms-xhelp://?method=page&id={3}&product={0}&productVersion={1}&locale={2}", - catalog.ProductCode, catalog.ProductVersion, catalog.Locale, pageId); + string helpPageUrl = string.Format(@"ms-xhelp://?method=page&id={1}&{0}", Help3Service.ActiveCatalog.AsMsXHelpParam, pageId); LoggingService.Debug(string.Format("Help 3.0: {0}", helpPageUrl)); DisplayLocalHelp(helpPageUrl); } @@ -66,12 +62,10 @@ namespace MSHelpSystem.Core DisplayHelpOnMSDN(contextual); return; } - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (catalog == null) { - throw new ArgumentNullException("c"); + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); } - string helpContextualUrl = string.Format(@"ms-xhelp://?method=f1&query={3}&product={0}&productVersion={1}&locale={2}", - catalog.ProductCode, catalog.ProductVersion, catalog.Locale, contextual); + string helpContextualUrl = string.Format(@"ms-xhelp://?method=f1&query={1}&{0}", Help3Service.ActiveCatalog.AsMsXHelpParam, contextual); LoggingService.Debug(string.Format("Help 3.0: {0}", helpContextualUrl)); DisplayLocalHelp(helpContextualUrl); } @@ -85,12 +79,10 @@ namespace MSHelpSystem.Core DisplaySearchOnMSDN(searchWords); return; } - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (catalog == null) { - throw new ArgumentNullException("c"); + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); } - string helpSearchUrl = string.Format(@"ms-xhelp://?method=search&query={3}&product={0}&productVersion={1}&locale={2}", - catalog.ProductCode, catalog.ProductVersion, catalog.Locale, searchWords.Replace(" ", "+")); + string helpSearchUrl = string.Format(@"ms-xhelp://?method=search&query={1}&{0}", Help3Service.ActiveCatalog.AsMsXHelpParam, searchWords.Replace(" ", "+")); LoggingService.Debug(string.Format("Help 3.0: {0}", helpSearchUrl)); DisplayLocalHelp(helpSearchUrl); } @@ -101,18 +93,16 @@ namespace MSHelpSystem.Core throw new ArgumentNullException("keywords"); } if (!Help3Environment.IsLocalHelp) { - MessageBox.Show("You requested an offline feature in the online help mode. You have to change the mode in order to use this feature.", - "Help Viewer", + MessageBox.Show(StringParser.Parse("${res:AddIns.HelpViewer.OfflineFeatureRequestMsg}"), + StringParser.Parse("${res:AddIns.HelpViewer.MicrosoftHelpViewerTitle}"), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - Help3Catalog catalog = Help3Service.ActiveCatalog; - if (catalog == null) { - throw new ArgumentNullException("c"); + if (Help3Service.ActiveCatalog == null) { + throw new ArgumentNullException("Help3Service.ActiveCatalog"); } - string helpKeywordsUrl = string.Format(@"ms-xhelp://?method=keywords&query={3}&product={0}&productVersion={1}&locale={2}", - catalog.ProductCode, catalog.ProductVersion, catalog.Locale, keywords); + string helpKeywordsUrl = string.Format(@"ms-xhelp://?method=keywords&query={1}&{0}", Help3Service.ActiveCatalog.AsMsXHelpParam, keywords.Replace(" ", "+")); LoggingService.Debug(string.Format("Help 3.0: {0}", helpKeywordsUrl)); DisplayLocalHelp(helpKeywordsUrl); } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs index 259b85bd84..e14317953f 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Catalog.cs @@ -62,5 +62,15 @@ namespace MSHelpSystem.Core { get { return brandingPackage; } } + + public string AsMsXHelpParam + { + get { return string.Format("product={0}&productVersion={1}&locale={2}", productCode, productVersion, productLocale); } + } + + public string AsCmdLineParam + { + get { return string.Format("/product {0} /version {1} /locale {2}", productCode, productVersion, productLocale); } + } } } \ No newline at end of file diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs index 44be723831..58bd36eaee 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -94,11 +94,6 @@ namespace MSHelpSystem.Core #endregion - public static int Count - { - get { return catalogs.Count; } - } - public static ReadOnlyCollection Items { get diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs index 68627dca15..8ecd3cfdf1 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryAgent.cs @@ -1,6 +1,8 @@ using System; using System.Diagnostics; using System.IO; +using System.Net; +using System.Net.Sockets; using Microsoft.Win32; using ICSharpCode.Core; @@ -50,6 +52,28 @@ namespace MSHelpSystem.Core } } + public static bool PortIsReady + { + get + { + try { + Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); + socket.Connect(IPAddress.Parse("127.0.0.1"), PortNumber); + bool isReady = socket.Connected; + socket.Close(); + return isReady; + } + catch (SocketException ex) { + if (ex.ErrorCode == 10061) { + LoggingService.Debug("Help 3.0: Port is available but not ready"); + return true; + } + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + return false; + } + } + public static int ProcessId { get diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs index 856af88236..9bb71b8d7d 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/HelpLibraryManager.cs @@ -181,10 +181,7 @@ namespace MSHelpSystem.Core ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = Manager; psi.WorkingDirectory = Help3Environment.AppRoot; - psi.Arguments = string.Format("/product {0} /version {1} /locale {2}", - Help3Service.ActiveCatalog.ProductCode, - Help3Service.ActiveCatalog.ProductVersion, - Help3Service.ActiveCatalog.Locale); + psi.Arguments = Help3Service.ActiveCatalog.AsCmdLineParam; psi.UseShellExecute = true; psi.Verb = "runas"; psi.WindowStyle = ProcessWindowStyle.Normal; diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml index c15d45ca78..da665bac61 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml @@ -1,27 +1,27 @@  - + - + diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs index 6472351cb3..b3178d454c 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -24,10 +24,11 @@ namespace MSHelpSystem { HelpLibraryAgent.Start(); DataContext = Help3Service.Items; - // TODO: Needs a localization - groupBox1.Header = string.Format("{0} ({1})", "Installed Help catalogs", Help3Service.Count); + groupBox1.Header = string.Format("{0} ({1})", + StringParser.Parse("${res:AddIns.HelpViewer.InstalledHelpCatalogsLabel}"), + Help3Service.Items.Count); help3Catalogs.SelectedValue = Help3Service.ActiveCatalog.ShortName; - help3Catalogs.IsEnabled = (Help3Service.Count > 1 && Help3Service.Config.OfflineMode); + help3Catalogs.IsEnabled = (Help3Service.Items.Count > 1 && Help3Service.Config.OfflineMode); onlineMode.IsChecked = !Help3Service.Config.OfflineMode; } From cfe33a098a236ea09a937bee1327f4d401fa8316 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Wed, 26 May 2010 12:51:20 +0000 Subject: [PATCH 19/79] included external help option (to display the help in the default viewer/browser) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5851 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/Source/Commands.cs | 7 +++- .../HelpViewer/Source/Core/DisplayHelp.cs | 39 ++++++++++++++++++- .../HelpViewer/Source/Core/Help3Service.cs | 9 +---- .../HelpViewer/Source/Help3OptionsPanel.xaml | 6 ++- .../Source/Help3OptionsPanel.xaml.cs | 9 ++++- .../Source/Helper/Help3Configuration.cs | 8 ++++ 6 files changed, 66 insertions(+), 12 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/Source/Commands.cs b/src/AddIns/Misc/HelpViewer/Source/Commands.cs index 4761100e12..6784314de0 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Commands.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Commands.cs @@ -42,8 +42,11 @@ namespace MSHelpSystem.Commands { public override void Run() { - PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(Help3TocPad)); - if (toc != null) toc.BringPadToFront(); + if (Help3Service.Config.ExternalHelp) DisplayHelp.Catalog(); + else { + PadDescriptor toc = WorkbenchSingleton.Workbench.GetPad(typeof(Help3TocPad)); + if (toc != null) toc.BringPadToFront(); + } } } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs index 4884e57a1e..a3ec8127c1 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/DisplayHelp.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Globalization; using System.Threading; using System.Windows.Forms; @@ -110,11 +111,14 @@ namespace MSHelpSystem.Core static void DisplayLocalHelp(string arguments) { - DisplayLocalHelp(arguments, true); + DisplayLocalHelp(arguments, !Help3Service.Config.ExternalHelp); } static void DisplayLocalHelp(string arguments, bool embedded) { + if (string.IsNullOrEmpty(arguments)) { + throw new ArgumentNullException("arguments"); + } if (!Help3Environment.IsLocalHelp) { return; } if (!HelpLibraryAgent.IsRunning) { HelpLibraryAgent.Start(); @@ -123,6 +127,10 @@ namespace MSHelpSystem.Core string helpUrl = string.Format(@"{0}{1}{2}", arguments, ProjectLanguages.GetCurrentLanguageAsHttpParam(), (embedded)?"&embedded=true":string.Empty); + if (Help3Service.Config.ExternalHelp) { + DisplayHelpWithShellExecute(helpUrl); + return; + } BrowserPane browser = ActiveHelp3Browser(); if (browser != null) { LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", helpUrl)); @@ -131,9 +139,35 @@ namespace MSHelpSystem.Core } } + static void DisplayHelpWithShellExecute(string arguments) + { + if (string.IsNullOrEmpty(arguments)) { + throw new ArgumentNullException("arguments"); + } + ProcessStartInfo psi = new ProcessStartInfo(); + psi.FileName = arguments; + psi.UseShellExecute = true; + psi.WindowStyle = ProcessWindowStyle.Normal; + try { + Process p = Process.Start(psi); + p.WaitForInputIdle(); + } + catch (Exception ex) { + LoggingService.Error(string.Format("Help 3.0: {0}", ex.ToString())); + } + } + static void DisplayHelpOnMSDN(string keyword) { + if (string.IsNullOrEmpty(keyword)) { + throw new ArgumentNullException("keyword"); + } string msdnUrl = string.Format(@"http://msdn.microsoft.com/library/{0}.aspx", keyword); + + if (Help3Service.Config.ExternalHelp) { + DisplayHelpWithShellExecute(msdnUrl); + return; + } BrowserPane browser = ActiveHelp3Browser(); if (browser != null) { LoggingService.Info(string.Format("Help 3.0: Navigating to {0}", msdnUrl)); @@ -144,6 +178,9 @@ namespace MSHelpSystem.Core static void DisplaySearchOnMSDN(string searchWords) { + if (string.IsNullOrEmpty(searchWords)) { + throw new ArgumentNullException("searchWords"); + } string msdnUrl = string.Format(@"http://social.social.msdn.microsoft.com/Search/{0}/?query={1}&ac=3", CultureInfo.CurrentUICulture.ToString(), searchWords.Replace(" ", "+")); BrowserPane browser = ActiveHelp3Browser(); if (browser != null) { diff --git a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs index 58bd36eaee..659c70f538 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Core/Help3Service.cs @@ -82,13 +82,8 @@ namespace MSHelpSystem.Core static void Help3ConfigurationUpdated(object sender, EventArgs e) { - if (config.OfflineMode) { - HelpClientWatcher.EnableLocalHelp(); - } - else { - HelpClientWatcher.EnableOnlineHelp(); - HelpLibraryAgent.Stop(); - } + if (config.OfflineMode) HelpClientWatcher.EnableLocalHelp(); + else HelpClientWatcher.EnableOnlineHelp(); } #endregion diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml index da665bac61..cb113470d4 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml @@ -22,7 +22,11 @@ Margin="0,0,0,5"/> + Click="Help3OnlineModeClicked" + Margin="0,0,0,8" /> + diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs index b3178d454c..96f4e88405 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; -using System.Windows.Forms; +using System.Windows.Documents; using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Gui; @@ -30,6 +30,7 @@ namespace MSHelpSystem help3Catalogs.SelectedValue = Help3Service.ActiveCatalog.ShortName; help3Catalogs.IsEnabled = (Help3Service.Items.Count > 1 && Help3Service.Config.OfflineMode); onlineMode.IsChecked = !Help3Service.Config.OfflineMode; + externalHelp.IsChecked = Help3Service.Config.ExternalHelp; } void Help3CatalogsSelectionChanged(object sender, SelectionChangedEventArgs e) @@ -54,6 +55,12 @@ namespace MSHelpSystem help3Catalogs.IsEnabled = false; } + void Help3UseExternalHelpClicked(object sender, RoutedEventArgs e) + { + Help3Service.Config.ExternalHelp = (bool)externalHelp.IsChecked; + LoggingService.Info(string.Format("Help 3.0: {0} external help", (Help3Service.Config.ExternalHelp)?"Enabling":"Disabling")); + } + public override bool SaveOptions() { Help3Service.SaveHelpConfiguration(); diff --git a/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs b/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs index cd319fa8b6..5042f08c07 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Helper/Help3Configuration.cs @@ -13,6 +13,7 @@ namespace MSHelpSystem.Helper string activeCatalogId = string.Empty; bool offlineMode = true; + bool externalHelp = false; [XmlElement("activeCatalog")] public string ActiveCatalogId @@ -27,5 +28,12 @@ namespace MSHelpSystem.Helper get { return offlineMode; } set { offlineMode = value; } } + + [XmlElement("externalHelp")] + public bool ExternalHelp + { + get { return externalHelp; } + set { externalHelp = value; } + } } } From cb0c99a10e817fe961917952a4996d1f9d334b10 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 13:08:55 +0000 Subject: [PATCH 20/79] Report error code when deleting file fails. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5852 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/Main/Base/Project/Src/Util/NativeMethods.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/Base/Project/Src/Util/NativeMethods.cs b/src/Main/Base/Project/Src/Util/NativeMethods.cs index d2fbfd9381..fc87e98c03 100644 --- a/src/Main/Base/Project/Src/Util/NativeMethods.cs +++ b/src/Main/Base/Project/Src/Util/NativeMethods.cs @@ -94,7 +94,7 @@ namespace ICSharpCode.SharpDevelop info.pFrom = fileName + "\0"; // pFrom is double-null-terminated int result = SHFileOperation(ref info); if (result != 0) - throw new IOException("Could not delete file " + fileName + ". Error " + result); + throw new IOException("Could not delete file " + fileName + ". Error " + result, result); } #endregion From fcff1190af711cd5cdfef4f32ff5c8e60c7bc4cf Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 13:11:30 +0000 Subject: [PATCH 21/79] Suppress MSB3644: The reference assemblies for framework ... were not found. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5853 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- AddIns/ICSharpCode.SharpDevelop.addin | 6 ++ .../Project/ICSharpCode.SharpDevelop.csproj | 1 + .../MSBuildEngine/BuildWorkerManager.cs | 7 ++- .../Project/MSBuildEngine/MSBuildEngine.cs | 7 +++ .../TargetingPackWarningWorkaround.cs | 56 +++++++++++++++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 src/Main/Base/Project/Src/Project/MSBuildEngine/TargetingPackWarningWorkaround.cs diff --git a/AddIns/ICSharpCode.SharpDevelop.addin b/AddIns/ICSharpCode.SharpDevelop.addin index 5f925d093e..670c86c37e 100755 --- a/AddIns/ICSharpCode.SharpDevelop.addin +++ b/AddIns/ICSharpCode.SharpDevelop.addin @@ -2149,4 +2149,10 @@ description = "${res:ICSharpCode.SharpDevelop.Internal.Project.ProjectFile.LogicalName.Description}" /> + + + + diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 51581ee030..106705ef21 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -268,6 +268,7 @@ + diff --git a/src/Main/Base/Project/Src/Project/MSBuildEngine/BuildWorkerManager.cs b/src/Main/Base/Project/Src/Project/MSBuildEngine/BuildWorkerManager.cs index 6313e8c82f..d5a9d93b8c 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildEngine/BuildWorkerManager.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildEngine/BuildWorkerManager.cs @@ -33,6 +33,10 @@ namespace ICSharpCode.SharpDevelop.Project public void RunBuildJob(BuildJob job, IMSBuildChainedLoggerFilter loggerChain, Action reportWhenDone, CancellationToken cancellationToken) { + if (job == null) + throw new ArgumentNullException("job"); + if (loggerChain == null) + throw new ArgumentNullException("loggerChain"); BuildWorker worker = GetFreeWorker(); worker.RunJob(job, loggerChain, reportWhenDone, cancellationToken); } @@ -76,6 +80,7 @@ namespace ICSharpCode.SharpDevelop.Project public void RunJob(BuildJob job, IMSBuildChainedLoggerFilter loggerChain, Action reportWhenDone, CancellationToken cancellationToken) { + Debug.Assert(loggerChain != null); this.loggerChain = loggerChain; this.reportWhenDone = reportWhenDone; try { @@ -119,9 +124,9 @@ namespace ICSharpCode.SharpDevelop.Project void BuildDone(bool success) { lock (this) { + cancellationRegistration.Dispose(); if (reportWhenDone == null) return; - cancellationRegistration.Dispose(); reportWhenDone(success); reportWhenDone = null; } diff --git a/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs b/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs index 5b6f4146ab..6346fcd461 100755 --- a/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs @@ -177,6 +177,13 @@ namespace ICSharpCode.SharpDevelop.Project get { return projectFileName; } } + /// + /// Gets the minimum solution version (VS version) required to open the project. + /// + public int ProjectMinimumSolutionVersion { + get { return projectMinimumSolutionVersion; } + } + List interestingTasks = new List(); string temporaryFileName; diff --git a/src/Main/Base/Project/Src/Project/MSBuildEngine/TargetingPackWarningWorkaround.cs b/src/Main/Base/Project/Src/Project/MSBuildEngine/TargetingPackWarningWorkaround.cs new file mode 100644 index 0000000000..88876a97fb --- /dev/null +++ b/src/Main/Base/Project/Src/Project/MSBuildEngine/TargetingPackWarningWorkaround.cs @@ -0,0 +1,56 @@ +// +// +// +// +// $Revision$ +// +using System; + +namespace ICSharpCode.SharpDevelop.Project +{ + /// + /// Suppresses the warning MSB3644. + /// + public sealed class TargetingPackWarningWorkaround : IMSBuildLoggerFilter + { + /* + * Warning MSB3644: The reference assemblies for framework + * ".NETFramework,Version=v4.0,Profile=Client" were not found. To resolve this, + * install the SDK or Targeting Pack for this framework version or retarget + * your application to a version of the framework for which you have the SDK + * or Targeting Pack installed. Note that assemblies will be resolved from + * the Global Assembly Cache (GAC) and will be used in place of reference assemblies. + * Therefore your assembly may not be correctly targeted for the framework you intend. + */ + + public IMSBuildChainedLoggerFilter CreateFilter(MSBuildEngine engine, IMSBuildChainedLoggerFilter nextFilter) + { + if (engine.ProjectMinimumSolutionVersion >= Solution.SolutionVersionVS2010) { + return new TargetingPackWarningWorkaroundChainEntry(nextFilter); + } else { + return nextFilter; + } + } + + sealed class TargetingPackWarningWorkaroundChainEntry : IMSBuildChainedLoggerFilter + { + readonly IMSBuildChainedLoggerFilter nextFilter; + + public TargetingPackWarningWorkaroundChainEntry(IMSBuildChainedLoggerFilter nextFilter) + { + this.nextFilter = nextFilter; + } + + public void HandleError(BuildError error) + { + if (error.ErrorCode != "MSB3644") + nextFilter.HandleError(error); + } + + public void HandleBuildEvent(Microsoft.Build.Framework.BuildEventArgs e) + { + nextFilter.HandleBuildEvent(e); + } + } + } +} From 7092ebf5b0e3e139a5a9e91f0b5192130b926b0b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 13:11:49 +0000 Subject: [PATCH 22/79] Remove unused parameter "buildServices" from IBuildable.StartBuild. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5854 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../CSharpBinding/Project/Src/Project/CSharpProject.cs | 5 ++--- .../VBNetBinding/Project/Src/Project/VBNetProject.cs | 5 ++--- src/Main/Base/Project/Src/Project/AbstractProject.cs | 2 +- src/Main/Base/Project/Src/Project/BuildEngine.cs | 4 +--- src/Main/Base/Project/Src/Project/IProject.cs | 2 +- src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs | 4 ++-- .../Project/Src/Project/MSBuildEngine/MSBuildEngine.cs | 6 +----- src/Main/Base/Project/Src/Project/MSBuildFileProject.cs | 4 ++-- src/Main/Base/Project/Src/Project/Solution/Solution.cs | 2 +- .../ProjectService/CompileModifiedProjectsOnly.cs | 8 ++++---- 10 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs index dfae97e7e9..2290ebbc5f 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs @@ -79,17 +79,16 @@ namespace CSharpBinding return base.GetDefaultItemType(fileName); } - public override void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) + public override void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { if (this.MinimumSolutionVersion == Solution.SolutionVersionVS2005) { MSBuildEngine.StartBuild(this, - buildServices, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles.Concat( new [] { Path.Combine(MSBuildEngine.SharpDevelopBinPath, "SharpDevelop.CheckMSBuild35Features.targets") })); } else { - base.StartBuild(buildServices, options, feedbackSink); + base.StartBuild(options, feedbackSink); } } diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs index 807b2dec0e..7cda0da62c 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs @@ -101,17 +101,16 @@ namespace VBNetBinding return base.GetDefaultItemType(fileName); } - public override void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) + public override void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { if (this.MinimumSolutionVersion == Solution.SolutionVersionVS2005) { MSBuildEngine.StartBuild(this, - buildServices, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles.Concat( new [] { Path.Combine(MSBuildEngine.SharpDevelopBinPath, "SharpDevelop.CheckMSBuild35Features.targets") })); } else { - base.StartBuild(buildServices, options, feedbackSink); + base.StartBuild(options, feedbackSink); } } diff --git a/src/Main/Base/Project/Src/Project/AbstractProject.cs b/src/Main/Base/Project/Src/Project/AbstractProject.cs index 221e10c311..fccceed433 100644 --- a/src/Main/Base/Project/Src/Project/AbstractProject.cs +++ b/src/Main/Base/Project/Src/Project/AbstractProject.cs @@ -490,7 +490,7 @@ namespace ICSharpCode.SharpDevelop.Project { } - public virtual void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) + public virtual void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { feedbackSink.ReportError(new BuildError { ErrorText = "Building project " + Name + " is not supported.", IsWarning = true }); // we don't know how to build anything, report that we're done. diff --git a/src/Main/Base/Project/Src/Project/BuildEngine.cs b/src/Main/Base/Project/Src/Project/BuildEngine.cs index 9108095798..3947ea7ca5 100644 --- a/src/Main/Base/Project/Src/Project/BuildEngine.cs +++ b/src/Main/Base/Project/Src/Project/BuildEngine.cs @@ -272,7 +272,7 @@ namespace ICSharpCode.SharpDevelop.Project public void DoStartBuild(object state) { - project.StartBuild(engine.serviceContainer, options, this); + project.StartBuild(options, this); } public void ReportError(BuildError error) @@ -315,7 +315,6 @@ namespace ICSharpCode.SharpDevelop.Project BuildNode rootNode; readonly IBuildable rootProject; readonly BuildResults results = new BuildResults(); - readonly ThreadSafeServiceContainer serviceContainer = new ThreadSafeServiceContainer(); DateTime buildStart; readonly List projectsCurrentlyBuilding = new List(); @@ -538,7 +537,6 @@ namespace ICSharpCode.SharpDevelop.Project /// void ReportDone() { - serviceContainer.Dispose(); if (combinedBuildFeedbackSink != null) { if (combinedBuildFeedbackSink is MessageViewSink) { // Special case GUI-builds so that they have more information available: diff --git a/src/Main/Base/Project/Src/Project/IProject.cs b/src/Main/Base/Project/Src/Project/IProject.cs index 46b901ac77..6075991b94 100644 --- a/src/Main/Base/Project/Src/Project/IProject.cs +++ b/src/Main/Base/Project/Src/Project/IProject.cs @@ -274,7 +274,7 @@ namespace ICSharpCode.SharpDevelop.Project /// Starts building the project using the specified options. /// This member must be implemented thread-safe. /// - void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink); + void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink); /// /// Gets the name of the buildable item. diff --git a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs index 2e19c758b9..d9452b5dd3 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs @@ -1076,9 +1076,9 @@ namespace ICSharpCode.SharpDevelop.Project return result; } - public override void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) + public override void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { - MSBuildEngine.StartBuild(this, buildServices, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles); + MSBuildEngine.StartBuild(this, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles); } public override ProjectBuildOptions CreateProjectBuildOptions(BuildOptions options, bool isRootBuildable) diff --git a/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs b/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs index 6346fcd461..d5a1630b3c 100755 --- a/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildEngine/MSBuildEngine.cs @@ -93,12 +93,10 @@ namespace ICSharpCode.SharpDevelop.Project MSBuildLoggerFilters = AddInTree.BuildItems(LoggerFiltersPath, null, false); } - public static void StartBuild(IProject project, ThreadSafeServiceContainer serviceContainer, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IEnumerable additionalTargetFiles) + public static void StartBuild(IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IEnumerable additionalTargetFiles) { if (project == null) throw new ArgumentNullException("project"); - if (serviceContainer == null) - throw new ArgumentNullException("serviceContainer"); if (options == null) throw new ArgumentNullException("options"); if (feedbackSink == null) @@ -111,7 +109,6 @@ namespace ICSharpCode.SharpDevelop.Project if (project.MinimumSolutionVersion >= Solution.SolutionVersionVS2010) { engine.additionalTargetFiles.Add(Path.Combine(Path.GetDirectoryName(typeof(MSBuildEngine).Assembly.Location), "SharpDevelop.TargetingPack.targets")); } - engine.serviceContainer = serviceContainer; engine.StartBuild(); } @@ -120,7 +117,6 @@ namespace ICSharpCode.SharpDevelop.Project ProjectBuildOptions options; IBuildFeedbackSink feedbackSink; List additionalTargetFiles; - ThreadSafeServiceContainer serviceContainer; private MSBuildEngine(IProject project, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { diff --git a/src/Main/Base/Project/Src/Project/MSBuildFileProject.cs b/src/Main/Base/Project/Src/Project/MSBuildFileProject.cs index 233a300052..ccfe8feeab 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildFileProject.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildFileProject.cs @@ -22,9 +22,9 @@ namespace ICSharpCode.SharpDevelop.Project TypeGuid = "{00000000-0000-0000-0000-000000000000}"; } - public override void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) + public override void StartBuild(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink) { - MSBuildEngine.StartBuild(this, buildServices, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles); + MSBuildEngine.StartBuild(this, options, feedbackSink, MSBuildEngine.AdditionalTargetFiles); } } } diff --git a/src/Main/Base/Project/Src/Project/Solution/Solution.cs b/src/Main/Base/Project/Src/Project/Solution/Solution.cs index dae8dce496..1972ffc99f 100644 --- a/src/Main/Base/Project/Src/Project/Solution/Solution.cs +++ b/src/Main/Base/Project/Src/Project/Solution/Solution.cs @@ -1202,7 +1202,7 @@ namespace ICSharpCode.SharpDevelop.Project return result; } - void IBuildable.StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) + void IBuildable.StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) { // building a solution finishes immediately: we only care for the dependencies feedbackSink.Done(true); diff --git a/src/Main/Base/Project/Src/Services/ProjectService/CompileModifiedProjectsOnly.cs b/src/Main/Base/Project/Src/Services/ProjectService/CompileModifiedProjectsOnly.cs index be51dcc4aa..dd0ead90ef 100644 --- a/src/Main/Base/Project/Src/Services/ProjectService/CompileModifiedProjectsOnly.cs +++ b/src/Main/Base/Project/Src/Services/ProjectService/CompileModifiedProjectsOnly.cs @@ -151,7 +151,7 @@ namespace ICSharpCode.SharpDevelop.Project return new IBuildable[0]; } - public void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) + public void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) { } } @@ -245,11 +245,11 @@ namespace ICSharpCode.SharpDevelop.Project return lastCompilationPass.Index > comparisonPass.Index; } - public void StartBuild(ThreadSafeServiceContainer buildServices, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) + public void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) { IProject p = wrapped as IProject; if (p == null) { - wrapped.StartBuild(buildServices, buildOptions, feedbackSink); + wrapped.StartBuild(buildOptions, feedbackSink); } else { lock (unmodifiedProjects) { if (!unmodifiedProjects.TryGetValue(p, out lastCompilationPass)) { @@ -272,7 +272,7 @@ namespace ICSharpCode.SharpDevelop.Project feedbackSink.Done(true); } else { lastCompilationPass = factory.CurrentPass; - wrapped.StartBuild(buildServices, buildOptions, new BuildFeedbackSink(p, feedbackSink, factory.CurrentPass)); + wrapped.StartBuild(buildOptions, new BuildFeedbackSink(p, feedbackSink, factory.CurrentPass)); } } } From 6254ed2e6c5374aeb3d381eb3c57a5894c77764f Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 13:49:11 +0000 Subject: [PATCH 23/79] Fix build. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5855 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- SharpDevelop.Tests.sln | 12 ++++++++++++ SharpDevelop.sln | 9 +++++++++ .../Python/PythonBinding/Test/Utils/MockProject.cs | 2 +- .../Test/SharpRefactoring.Tests.csproj | 3 +-- .../StringTagProvider/MockProjectForTagProvider.cs | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln index cff182dfe0..18596020b1 100644 --- a/SharpDevelop.Tests.sln +++ b/SharpDevelop.Tests.sln @@ -391,10 +391,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\Add EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring.Tests", "src\AddIns\Misc\SharpRefactoring\Test\SharpRefactoring.Tests.csproj", "{A4AA51DE-A096-47EC-AA5D-D91457834ECF}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" ProjectSection(SolutionItems) = postProject @@ -420,6 +429,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Langua EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}" ProjectSection(ProjectDependencies) = postProject diff --git a/SharpDevelop.sln b/SharpDevelop.sln index bd2e7279a7..cdb498d6ff 100644 --- a/SharpDevelop.sln +++ b/SharpDevelop.sln @@ -341,8 +341,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\Add EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" ProjectSection(SolutionItems) = postProject @@ -363,6 +369,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Langua EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" ProjectSection(ProjectDependencies) = postProject diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs index 2f539513a0..2eda8dc834 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProject.cs @@ -292,7 +292,7 @@ namespace PythonBinding.Tests.Utils throw new NotImplementedException(); } - public void StartBuild(ThreadSafeServiceContainer serviceContainer, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) + public void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) { throw new NotImplementedException(); } diff --git a/src/AddIns/Misc/SharpRefactoring/Test/SharpRefactoring.Tests.csproj b/src/AddIns/Misc/SharpRefactoring/Test/SharpRefactoring.Tests.csproj index ca375c0694..2b09917433 100644 --- a/src/AddIns/Misc/SharpRefactoring/Test/SharpRefactoring.Tests.csproj +++ b/src/AddIns/Misc/SharpRefactoring/Test/SharpRefactoring.Tests.csproj @@ -13,6 +13,7 @@ False 4 false + ..\..\..\..\..\bin\UnitTests\ x86 @@ -22,7 +23,6 @@ 4096 - ..\..\..\..\..\bin\UnitTests\ true Full False @@ -30,7 +30,6 @@ DEBUG;TRACE - bin\Release\ False None True diff --git a/src/Main/Base/Test/StringTagProvider/MockProjectForTagProvider.cs b/src/Main/Base/Test/StringTagProvider/MockProjectForTagProvider.cs index c827fb1d04..e32ba4fc2e 100644 --- a/src/Main/Base/Test/StringTagProvider/MockProjectForTagProvider.cs +++ b/src/Main/Base/Test/StringTagProvider/MockProjectForTagProvider.cs @@ -255,7 +255,7 @@ namespace ICSharpCode.SharpDevelop.Tests.StringTagProvider throw new NotImplementedException(); } - public void StartBuild(ThreadSafeServiceContainer serviceContainer, ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) + public void StartBuild(ProjectBuildOptions buildOptions, IBuildFeedbackSink feedbackSink) { throw new NotImplementedException(); } From 3d04de009845ed4093ddfa154158b260eebda86b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 13:51:08 +0000 Subject: [PATCH 24/79] Fixed C# parser when casting the result of a default-expression "(int)default(short)". Code cleanup in OptionPanel. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5856 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Lexer/CSharp/Tokens.cs | 4 ++-- .../Src/Gui/Dialogs/AbstractOptionPanel.cs | 16 +++++----------- .../Base/Project/Src/Util/ExtensionMethods.cs | 9 +++++---- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs index e5f855f495..0ae3a3482b 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/CSharp/Tokens.cs @@ -172,7 +172,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp public static BitArray TypeKW = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal); public static BitArray UnaryHead = NewSet(Plus, Minus, Not, BitwiseComplement, Times, Increment, Decrement, BitwiseAnd); public static BitArray AssnStartOp = NewSet(Plus, Minus, Not, BitwiseComplement, Times); - public static BitArray CastFollower = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal, Identifier, Partial, Where, Get, Set, Add, Remove, Yield, Select, Group, By, Into, From, Ascending, Descending, Orderby, Let, Join, On, Equals, Void, Literal, OpenParenthesis, BitwiseComplement, Not, Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From); + public static BitArray CastFollower = NewSet(Char, Bool, Object, String, Sbyte, Byte, Short, Ushort, Int, Uint, Long, Ulong, Float, Double, Decimal, Identifier, Partial, Where, Get, Set, Add, Remove, Yield, Select, Group, By, Into, From, Ascending, Descending, Orderby, Let, Join, On, Equals, Void, Literal, OpenParenthesis, BitwiseComplement, Not, Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, Default); public static BitArray AssgnOps = NewSet(Assign, PlusAssign, MinusAssign, TimesAssign, DivAssign, ModAssign, BitwiseAndAssign, BitwiseOrAssign, ShiftLeftAssign); public static BitArray UnaryOp = NewSet(Plus, Minus, Not, BitwiseComplement, Times, Increment, Decrement, BitwiseAnd); public static BitArray TypeDeclarationKW = NewSet(Class, Interface, Struct, Enum, Delegate); @@ -187,7 +187,7 @@ namespace ICSharpCode.NRefactory.Parser.CSharp public static BitArray ExpressionContent = NewSet(As, Is, Out, Ref, In); public static BitArray InterfaceLevel = NewSet(Event); public static BitArray TypeLevel = NewSet(Public, Internal, Class, Interface, Struct, Enum, Delegate, Abstract, Sealed, Static, Unsafe, Partial, Protected, Private, Public, Internal, Const, Event, Explicit, Extern, Fixed, Implicit, New, Operator, Override, Readonly, Virtual, Volatile); - public static BitArray StatementStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, As, Is, Out, Ref, In, Break, Case, Catch, Checked, Unchecked, Const, Continue, Default, Do, Else, Finally, Fixed, For, Foreach, Goto, If, Lock, Return, Stackalloc, Switch, Throw, Try, Unsafe, Using, While, Yield); + public static BitArray StatementStart = NewSet(Base, Delegate, False, New, Null, Sizeof, This, True, Typeof, Checked, Unchecked, From, Default, As, Is, Out, Ref, In, Break, Case, Catch, Checked, Unchecked, Const, Continue, Default, Do, Else, Finally, Fixed, For, Foreach, Goto, If, Lock, Return, Stackalloc, Switch, Throw, Try, Unsafe, Using, While, Yield); public static BitArray QueryExpressionClauseStart = NewSet(From, Let, Where, Join, Orderby, Group, Select); public static BitArray InPropertyDeclaration = NewSet(Protected, Private, Public, Internal, Get, Set); public static BitArray InEventDeclaration = NewSet(Add, Remove); diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs b/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs index c0018cf33b..95789a1549 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/AbstractOptionPanel.cs @@ -29,12 +29,11 @@ namespace ICSharpCode.SharpDevelop.Gui public virtual object Owner { get; set; } - IList bindings = new List(); + readonly List bindings = new List(); - public IList Bindings { - get { - return bindings; - } + void IOptionBindingContainer.AddBinding(OptionBinding binding) + { + this.bindings.Add(binding); } public virtual object Control { @@ -49,17 +48,12 @@ namespace ICSharpCode.SharpDevelop.Gui public virtual bool SaveOptions() { - foreach (OptionBinding b in Bindings) { + foreach (OptionBinding b in bindings) { if (!b.Save()) return false; } return true; } - - public void AddBinding(OptionBinding binding) - { - this.bindings.Add(binding); - } } } diff --git a/src/Main/Base/Project/Src/Util/ExtensionMethods.cs b/src/Main/Base/Project/Src/Util/ExtensionMethods.cs index b937a32e78..0eb1a3d3ee 100644 --- a/src/Main/Base/Project/Src/Util/ExtensionMethods.cs +++ b/src/Main/Base/Project/Src/Util/ExtensionMethods.cs @@ -406,12 +406,13 @@ namespace ICSharpCode.SharpDevelop } /// - /// Returns the index of the first element for which constraint returns true. - /// If none of the items in the list fits the constraint -1 is returned. + /// Returns the index of the first element for which returns true. + /// If none of the items in the list fits the , -1 is returned. /// - public static int FindIndex(this IList list, Func constraint) { + public static int FindIndex(this IList list, Func predicate) + { for (int i = 0; i < list.Count; i++) { - if (constraint(list[i])) + if (predicate(list[i])) return i; } From 6bbcfb4a7f5dc090fc3f1dc7bc396fff50c18263 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 27 May 2010 14:08:49 +0000 Subject: [PATCH 25/79] Update Mono.Cecil to commit a9195cc682bece967677152d7d6bc433a58d746c. Should fix ArgumentException in Mono.Cecil.TypeParser.GetMetadataScope. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5858 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/Libraries/Mono.Cecil/Mono.Cecil.dll | Bin 261120 -> 263168 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/Libraries/Mono.Cecil/Mono.Cecil.dll b/src/Libraries/Mono.Cecil/Mono.Cecil.dll index b0609134d2de015d395d5779a8a5070718b17bbb..a64d7c7edfa46e66734ed4218441640cd4699bf8 100755 GIT binary patch literal 263168 zcmc${37izwxjtM|)m^>L(lbN%EHK@GK-oPrz#uq^3gV6%?lZUy;tDFI)u@rS5o3%= zR1~8oBJP@-{U$DP$-bDxYcygsMw1xLzTcR8vnTjH&-Z@y_+kHO^MQhC1hV-uWPichpy52v1){#ery&rCo5+%?tG zg@J!gaQX$MGfrQ(&R<_zeO4*BcwK4Dy3&D1A6L4-Kl7}?=H~QnM)ZnB(Bgq`d31127_vF20+mbI$DhWj){scMS=_lXPxhZk-A#YnQ36zWFG%pYFW$1 zZAxuoy5f(z*;d@T|C>$LfydZZO3?Agijrk*8n^yiYW=$w9rpav>wn(4>b*y7e=>LT zVTXS5p%=E?bL3D<+u;|!@Z6V2{_^WT|9Q#4WBZ*PU;MAwyy{18c=nB7y(|CeC3}vX zv~K+kKf3muk>4l2^|JSYHyn<8se)07;Od+58%D8TTMzwWsbe#|-%a!?B1PEJ&E*T|M)+v-(Os2fn%>Q!N2Jz-#d zwwFO*5|(Wh5LTRF37A$RlUP?Qt#;R~DucOMm^l<_-D z^U<-EfG2_QH|~ZU7|7c_9%?l7@Mgj8=Dpc4%F!ecBxCZ*BtU|BrLy3=A**katT{W$ zA`;5#)5H{6F^dhQmM@k%Rbca)1qr+0q13xZBP}uG#m?DgO9`=SEZg(5DC_jDC4IK- zJnwbDv&KDUtwk6pBPbJO>KX|{nV+z`-ZGTu5e(~4SnM;V*e9I6Gw7x&?^=cJ9wMekkq~R##l-titNTDz8_|W87K^sjPF(<~3-bSrpu8zPggHPTrJ#Wr()i zuGZkUDF28z+KFWdhkwfGM8j~j>`dqh-bP;B@>N_YPwM`-(5&qUqS{Nnoe%}%8ts8p zg7kN96?n%yTgFQ^)6DZwnbX>gy4rl&t~X87Hp;jATkyrLLBs{)8`Dpv-OX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z_e4z<5N%=-HL+Wg%7T4#Q~)tsB{%r=g7T5Fxw zOuIe1+E_n2+i0&%H#+l2SJ!7cozB{NYYxgZ=jIw~vyIktTlfHfz1=>uer9HFZgpm+ z-D%FXkFBqF&NQ3z$L5-6n(Ol*y54HGrvX3TXw4sOHD-vew%bQ%*PF-I+Ux7nGiRn( z+jFf>v$GC)X4{SFW9{|p(0G~e2LFu4KT#S-JW-%&5D?%5A-`LAiA1nmyzw{q{?P~e zK77kZ@9w$xV>V}k;QP<~`}GSV$&qp}`9CF&(=Fclne`{Wzw_2_f8g`;cYf<@ z@BR9(u`e2|y?y20dp`P+l{L-K6+ZC3!gq~3d~~vZ3Y}}OQZ#q~So!bs3Qy#*{rAWE z%DEgqi}umQ&CNSBz0ZDZ?VgWzI!D@@NCbYby*Zdzu+UHDQqW1v;BXLh_rnwQf&dBe zx^$IW;{U0Ma`2)fx{?SZT!Ie{}e>(J8 zwOFxte}~2G^rs(7pTKRA{{^7xEuru6@0HZM9rfl#{U!tG%ey4?j%9tRB7fVq-i+#g zUnnntYXO|xyJ_|IAiIp zfE&D-wZNNS^@S4E)LV4V@vcu{{9EL1QRek&6TxR;(it#l@ZE_C-Z$-H)5Ir&_d$yZ z##Qg#yxY@t2?M6UxH`B>Rckq&6tj0Q|44jWMql?9alLg^?>*h??HkjzX>{FR?^^2W zExrA;ZCRanGJ^V|QU1Q@3Ajs?&fjsYG235H Date: Thu, 27 May 2010 20:03:55 +0000 Subject: [PATCH 26/79] Added C# New file template for user Exception. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5859 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../file/CSharp/CSharp.Exception.xft | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 data/templates/file/CSharp/CSharp.Exception.xft diff --git a/data/templates/file/CSharp/CSharp.Exception.xft b/data/templates/file/CSharp/CSharp.Exception.xft new file mode 100644 index 0000000000..bb60841b79 --- /dev/null +++ b/data/templates/file/CSharp/CSharp.Exception.xft @@ -0,0 +1,66 @@ + + From da7842263ec05f7ad8c915f48b243042e566a613 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 28 May 2010 14:48:48 +0000 Subject: [PATCH 27/79] Store RecentOpen lists in array (instead of joining strings) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5860 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/RecentProjectsControl.xaml.cs | 1 + .../Project/Src/Services/File/RecentOpen.cs | 28 ++++++++----------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs b/src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs index 935a00ba6e..877064944a 100644 --- a/src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs +++ b/src/AddIns/Misc/StartPage/Project/Src/RecentProjectsControl.xaml.cs @@ -56,6 +56,7 @@ namespace ICSharpCode.StartPage { List items = new List(); foreach (string path in (string[])state) { + Core.LoggingService.Debug("RecentProjectsControl: Looking up path '" + path + "'"); FileInfo file = new FileInfo(path); if (file.Exists) { items.Add( diff --git a/src/Main/Base/Project/Src/Services/File/RecentOpen.cs b/src/Main/Base/Project/Src/Services/File/RecentOpen.cs index 2d420a1d15..75cc22da08 100644 --- a/src/Main/Base/Project/Src/Services/File/RecentOpen.cs +++ b/src/Main/Base/Project/Src/Services/File/RecentOpen.cs @@ -51,19 +51,21 @@ namespace ICSharpCode.SharpDevelop { // don't check whether files exist because that might be slow (e.g. if file is on network // drive that's unavailable) - if (p.Contains("Files")) { - lastfile.AddRange(p["Files"].Split(',')); + + // if one of these entries is a string, then it's from a previous SharpDevelop version - don't try loading it + if (p.Contains("Files") && !(p.Get("Files") is string)) { + lastfile.AddRange(p.Get("Files", new string[0])); } - if (p.Contains("Projects")) { - lastproject.AddRange(p["Projects"].Split(',')); + if (p.Contains("Projects") && !(p.Get("Files") is string)) { + lastproject.AddRange(p.Get("Projects", new string[0])); } } public void AddLastFile(string name) { for (int i = 0; i < lastfile.Count; ++i) { - if (lastfile[i].ToString().Equals(name, StringComparison.OrdinalIgnoreCase)) { + if (lastfile[i].Equals(name, StringComparison.OrdinalIgnoreCase)) { lastfile.RemoveAt(i); } } @@ -72,11 +74,7 @@ namespace ICSharpCode.SharpDevelop lastfile.RemoveAt(lastfile.Count - 1); } - if (lastfile.Count > 0) { - lastfile.Insert(0, name); - } else { - lastfile.Add(name); - } + lastfile.Insert(0, name); } public void ClearRecentFiles() @@ -101,11 +99,7 @@ namespace ICSharpCode.SharpDevelop lastproject.RemoveAt(lastproject.Count - 1); } - if (lastproject.Count > 0) { - lastproject.Insert(0, name); - } else { - lastproject.Add(name); - } + lastproject.Insert(0, name); JumpList.AddToRecentCategory(name); } @@ -117,8 +111,8 @@ namespace ICSharpCode.SharpDevelop public Properties ToProperties() { Properties p = new Properties(); - p["Files"] = String.Join(",", lastfile.ToArray()); - p["Projects"] = String.Join(",", lastproject.ToArray()); + p.Set("Files", lastfile.ToArray()); + p.Set("Projects", lastproject.ToArray()); return p; } From d9eb7f997e82d9d5f2e18b20d011ebd88b448c7b Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sat, 29 May 2010 13:08:58 +0000 Subject: [PATCH 28/79] Added support for integrated unit testing with IronPython. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5861 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../BackendBindings/Python/PythonBinding.sln | 14 +- .../PythonBinding/Project/PythonBinding.addin | 175 +++++----- .../Project/PythonBinding.csproj | 23 ++ .../Project/Resources/PythonOptionsPanel.xfrm | 14 + .../PythonBinding/Project/Src/AddInOptions.cs | 30 +- .../Project/Src/CreateTextWriterInfo.cs | 65 ++++ .../Project/Src/IPythonFileService.cs | 20 ++ .../Project/Src/PythonAstWalker.cs | 41 ++- .../Project/Src/PythonConsole.cs | 26 +- .../Project/Src/PythonConsoleApplication.cs | 109 ++++++ .../Project/Src/PythonFileService.cs | 31 ++ .../Project/Src/PythonOptionsPanel.cs | 7 +- .../Project/Src/PythonStandardLibraryPath.cs | 77 +++++ .../Project/Src/PythonTestDebugger.cs | 73 ++++ .../Project/Src/PythonTestFramework.cs | 63 ++++ .../Project/Src/PythonTestResult.cs | 66 ++++ .../Project/Src/PythonTestRunner.cs | 73 ++++ .../Src/PythonTestRunnerApplication.cs | 109 ++++++ .../Src/PythonTestRunnerResponseFile.cs | 122 +++++++ .../Project/Src/RunPythonCommand.cs | 34 +- .../Project/TestRunner/sdtest.py | 95 ++++++ .../Project/TestRunner/sdtestrunner.py | 106 ++++++ .../Test/AddInOptionsTestFixture.cs | 71 ---- ...nBindingFromImportCompletionTestFixture.cs | 52 --- ...etionBindingImportCompletionTestFixture.cs | 6 +- ...paceContentsAddedToCtrlSpaceTestFixture.cs | 5 +- .../AddInFileTestFixture.cs | 61 +++- .../Configuration/AddInOptionsTestFixture.cs | 94 ++++++ .../Converter/ForLoopConversionTestFixture.cs | 3 +- .../ProjectHasStartupObjectTestFixture.cs | 5 +- ...rgeFindsInitializeComponentsTestFixture.cs | 3 +- .../PythonDesignerLoaderTestFixture.cs | 2 - .../Designer/PythonGeneratorTestFixture.cs | 3 +- .../{ => Gui}/AppSettingsPanelTestFixture.cs | 2 +- .../CompilingOptionsPanelTestFixture.cs | 2 +- .../DebugPythonCommandTestFixture.cs | 6 +- .../FormsDesignerDisplayBindingTestFixture.cs | 9 +- .../Test/{ => Gui}/PythonIndentationTests.cs | 4 +- .../PythonOptionsPanelTestFixture.cs | 26 +- .../{ => Gui}/PythonSyntaxModeTestFixture.cs | 3 +- .../{ => Gui}/RunPythonCommandTestFixture.cs | 2 +- .../Parsing/ClassWithBaseClassTestFixture.cs | 1 - ...ParseClassNestedInsideMethodTestFixture.cs | 59 ++++ .../Test/Parsing/ParseTestClassTestFixture.cs | 52 +++ .../ParseTestClassWithBaseClassTestFixture.cs | 89 +++++ .../Test/PythonBinding.Tests.csproj | 69 +++- .../CreateNewPythonProjectTestFixture.cs | 0 .../ProjectBindingTestFixture.cs | 0 .../PythonLanguagePropertiesTests.cs | 0 ...onsoleFromSystemImportEverythingFixture.cs | 1 + .../ResolveConsoleWriteLineTestFixture.cs | 1 + ...temWindowsFormsImportedAsFooTestFixture.cs | 1 + .../ResolveLocalClassInstanceTestFixture.cs | 5 +- .../ResolveSystemConsoleTestFixture.cs | 7 +- ...emNamespaceWithMissingImportTestFixture.cs | 1 + ...temWindowsFormsImportTextBoxTestFixture.cs | 1 + ...dowsFormsImportedAsMyTextBoxTestFixture.cs | 1 + .../CreatePythonTestRunnerTestFixture.cs | 52 +++ ...iterFromCreateTextWriterInfoTestFixture.cs | 41 +++ .../CreateTextWriterInfoEqualsTestFixture.cs | 57 ++++ .../PythonConsoleApplicationTestFixture.cs | 95 ++++++ .../Testing/PythonStandardLibraryPathTests.cs | 82 +++++ ...buggerRunsSelectedTestMethodTestFixture.cs | 156 +++++++++ .../PythonTestFrameworkIsTestClassTests.cs | 75 +++++ .../PythonTestFrameworkIsTestMethodTests.cs | 49 +++ .../PythonTestFrameworkIsTestProjectTests.cs | 66 ++++ .../PythonTestResultFailureTestFixture.cs | 90 +++++ ...StackTraceLineNumberOverflowTestFixture.cs | 44 +++ ...PythonTestRunnerResponseFileTestFixture.cs | 206 ++++++++++++ ...RunnerRunsSelectedTestMethodTestFixture.cs | 225 +++++++++++++ .../Test/Utils/AddInPathHelper.cs | 60 ++++ .../Test/Utils/DerivedAddInOptions.cs | 52 --- .../Test/Utils/DerivedPythonDesignerLoader.cs | 6 - .../Test/Utils/DummyServiceManager.cs | 32 ++ .../Test/Utils/DummySynchronizeInvoke.cs | 38 +++ .../PythonBinding/Test/Utils/MockClass.cs | 31 -- .../Test/Utils/MockDesignerLoaderHost.cs | 6 +- .../PythonBinding/Test/Utils/MockMethod.cs | 297 ---------------- .../Test/Utils/MockPythonFileService.cs | 58 ++++ .../Test/Utils/MockTypeResolutionService.cs | 1 - .../PythonBinding/Test/Utils/MockWorkbench.cs | 17 +- .../{ => Utils}/PythonBindingAddInFile.cs | 2 +- .../Utils/Tests/AddInPathHelperTestFixture.cs | 50 +++ .../Utils/Tests/MockProjectContentTests.cs | 5 +- .../Tests/MockPythonFileServiceTestFixture.cs | 65 ++++ src/Setup/Files.wxs | 316 +++++++++--------- src/Setup/Setup.wxs | 8 +- 87 files changed, 3402 insertions(+), 900 deletions(-) create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/CreateTextWriterInfo.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IPythonFileService.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleApplication.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonFileService.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonStandardLibraryPath.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestDebugger.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestResult.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunner.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerApplication.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerResponseFile.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtest.py create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtestrunner.py delete mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInOptionsTestFixture.cs delete mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/CodeCompletionBindingFromImportCompletionTestFixture.cs rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Configuration}/AddInFileTestFixture.cs (93%) create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInOptionsTestFixture.cs rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/AppSettingsPanelTestFixture.cs (99%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/CompilingOptionsPanelTestFixture.cs (99%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/DebugPythonCommandTestFixture.cs (88%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/FormsDesignerDisplayBindingTestFixture.cs (95%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/PythonIndentationTests.cs (98%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/PythonOptionsPanelTestFixture.cs (67%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/PythonSyntaxModeTestFixture.cs (99%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Gui}/RunPythonCommandTestFixture.cs (98%) create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseClassNestedInsideMethodTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassWithBaseClassTestFixture.cs rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => PythonLanguage}/CreateNewPythonProjectTestFixture.cs (100%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => PythonLanguage}/ProjectBindingTestFixture.cs (100%) rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => PythonLanguage}/PythonLanguagePropertiesTests.cs (100%) create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreatePythonTestRunnerTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterFromCreateTextWriterInfoTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterInfoEqualsTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonConsoleApplicationTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonStandardLibraryPathTests.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestDebuggerRunsSelectedTestMethodTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestClassTests.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestMethodTests.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestProjectTests.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultFailureTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultStackTraceLineNumberOverflowTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerResponseFileTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerRunsSelectedTestMethodTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/AddInPathHelper.cs delete mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedAddInOptions.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummyServiceManager.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummySynchronizeInvoke.cs delete mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockClass.cs delete mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockMethod.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonFileService.cs rename src/AddIns/BackendBindings/Python/PythonBinding/Test/{ => Utils}/PythonBindingAddInFile.cs (96%) create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/AddInPathHelperTestFixture.cs create mode 100644 src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockPythonFileServiceTestFixture.cs diff --git a/src/AddIns/BackendBindings/Python/PythonBinding.sln b/src/AddIns/BackendBindings/Python/PythonBinding.sln index c0bb7b11c1..132066a9ec 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding.sln +++ b/src/AddIns/BackendBindings/Python/PythonBinding.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5293 +# SharpDevelop 4.0.0.5840 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" @@ -30,6 +30,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Wi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "..\..\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "..\..\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "..\..\Analysis\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -94,5 +98,13 @@ Global {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0162E499-42D0-409B-AA25-EED21F75336B}.Release|Any CPU.Build.0 = Release|Any CPU {0162E499-42D0-409B-AA25-EED21F75336B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F261725-6318-4434-A1B1-6C70CE4CD324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Any CPU.Build.0 = Release|Any CPU + {1F261725-6318-4434-A1B1-6C70CE4CD324}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}.Release|Any CPU.Build.0 = Release|Any CPU + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection EndGlobal diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin index 7559322692..1cfc29b3b3 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin @@ -1,7 +1,7 @@ - @@ -12,15 +12,16 @@ + + extensions=".py" + name="Python" + resource="ICSharpCode.PythonBinding.Resources.Python.xshd"/> @@ -30,19 +31,19 @@ + insertbefore="Resources" + insertafter="Icons" + name="${res:ICSharpCode.PythonBinding.PythonFiles} (*.py)" + extensions="*.py"/> - + + insertbefore="AllFiles" + name="${res:ICSharpCode.PythonBinding.PythonProjectFiles} (*.pyproj)" + class="ICSharpCode.SharpDevelop.Project.LoadProject" + extensions="*.pyproj"/> @@ -54,27 +55,27 @@ + insertafter="Search" + insertbefore="Tools" + label="&Python" + type="Menu"> + icon="Icons.16x16.RunProgramIcon" + class="ICSharpCode.PythonBinding.RunDebugPythonCommand" + label="${res:XML.MainMenu.RunMenu.Run}" + shortcut="Control|Shift|R"/> + icon="Icons.16x16.Debug.StartWithoutDebugging" + class="ICSharpCode.PythonBinding.RunPythonCommand" + label="${res:XML.MainMenu.DebugMenu.RunWithoutDebug}" + shortcut="Control|Shift|W"/> + icon="Icons.16x16.StopProcess" + class="ICSharpCode.SharpDevelop.Project.Commands.StopDebuggingCommand" + label="${res:XML.MainMenu.DebugMenu.Stop}"/> @@ -83,22 +84,22 @@ + supportedextensions=".py" + projectfileextension=".pyproj" + class="ICSharpCode.PythonBinding.PythonParser"/> + guid="{FD48973F-F585-4F70-812B-4D0503B36CE9}" + supportedextensions=".py" + projectfileextension=".pyproj" + class="ICSharpCode.PythonBinding.PythonProjectBinding" /> - + @@ -115,33 +116,33 @@ + label="Python" + class="ICSharpCode.PythonBinding.PythonOptionsPanel"/> + label="${res:Dialog.ProjectOptions.ApplicationSettings}" + class="ICSharpCode.PythonBinding.ApplicationSettingsPanel"/> + label="${res:Dialog.ProjectOptions.BuildEvents}" + class="ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents"/> + label="${res:Dialog.ProjectOptions.BuildOptions}" + class="ICSharpCode.PythonBinding.CompilingOptionsPanel"/> + label="${res:Dialog.ProjectOptions.DebugOptions}" + class="ICSharpCode.SharpDevelop.Gui.OptionPanels.DebugOptions"/> + type="Secondary" + fileNamePattern="\.py$" + languagePattern="^Python$" + class="ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding" /> @@ -151,43 +152,49 @@ + insertafter="CSharp" + insertbefore="VBNet" + label="Python" + class="ICSharpCode.PythonBinding.ConvertToPythonMenuCommand"/> - - - + + + - - + + - - - - - - - + + + + + + + + + + + diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj index 03ac606f0d..7f35aa139f 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj @@ -74,11 +74,15 @@ + + + + @@ -89,11 +93,18 @@ + + + + + + + @@ -178,9 +189,16 @@ Always + + Always + + + Always + + @@ -208,6 +226,11 @@ ICSharpCode.SharpDevelop.Dom False + + {1F261725-6318-4434-A1B1-6C70CE4CD324} + UnitTesting + False + {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} FormsDesigner diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Resources/PythonOptionsPanel.xfrm b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Resources/PythonOptionsPanel.xfrm index f0194f88e2..fe281e6870 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Resources/PythonOptionsPanel.xfrm +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Resources/PythonOptionsPanel.xfrm @@ -11,6 +11,20 @@ + + + + + + + + + + + + + + diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/AddInOptions.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/AddInOptions.cs index d4df5988ff..fd597347ab 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/AddInOptions.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/AddInOptions.cs @@ -29,6 +29,7 @@ namespace ICSharpCode.PythonBinding #region Property names public static readonly string PythonFileNameProperty = "PythonFileName"; + public static readonly string PythonLibraryPathProperty = "PythonLibraryPath"; #endregion Properties properties; @@ -47,13 +48,20 @@ namespace ICSharpCode.PythonBinding this.properties = properties; } + public string PythonLibraryPath { + get { return properties.Get(PythonLibraryPathProperty, String.Empty); } + set { properties.Set(PythonLibraryPathProperty, value); } + } + + public bool HasPythonLibraryPath { + get { return !String.IsNullOrEmpty(PythonLibraryPath); } + } + ///

    /// Gets or sets the python console filename. /// public string PythonFileName { - get { - return properties.Get(PythonFileNameProperty, GetDefaultPythonFileName()); - } + get { return properties.Get(PythonFileNameProperty, GetDefaultPythonFileName()); } set { if (String.IsNullOrEmpty(value)) { properties.Set(PythonFileNameProperty, GetDefaultPythonFileName()); @@ -63,23 +71,19 @@ namespace ICSharpCode.PythonBinding } } - /// - /// Gets the path to the specified addin. - /// - /// The addin name: "${addin:ICSharpCode.PythonBinding}" - protected virtual string GetAddInPath(string addIn) - { - return StringParser.Parse(addIn); - } - /// /// Returns the full path to ipyw.exe which is installed in the /// Python addin folder. /// string GetDefaultPythonFileName() { - string path = GetAddInPath("${addinpath:ICSharpCode.PythonBinding}"); + string path = GetPythonBindingAddInPath(); return Path.Combine(path, DefaultPythonFileName); } + + string GetPythonBindingAddInPath() + { + return StringParser.Parse("${addinpath:ICSharpCode.PythonBinding}"); + } } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/CreateTextWriterInfo.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/CreateTextWriterInfo.cs new file mode 100644 index 0000000000..264fe024d5 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/CreateTextWriterInfo.cs @@ -0,0 +1,65 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; + +namespace ICSharpCode.PythonBinding +{ + public class CreateTextWriterInfo + { + string fileName; + Encoding encoding; + bool append; + + public CreateTextWriterInfo(string fileName, Encoding encoding, bool append) + { + this.fileName = fileName; + this.encoding = encoding; + this.append = append; + } + + public string FileName { + get { return fileName; } + } + + public Encoding Encoding { + get { return encoding; } + } + + public bool Append { + get { return append; } + } + + public override bool Equals(object obj) + { + CreateTextWriterInfo rhs = obj as CreateTextWriterInfo; + if (rhs != null) { + return Equals(rhs); + } + return false; + } + + bool Equals(CreateTextWriterInfo rhs) + { + return (fileName == rhs.fileName) && + (encoding == rhs.encoding) && + (append == rhs.append); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public TextWriter CreateTextWriter() + { + return new StreamWriter(fileName, append, encoding); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IPythonFileService.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IPythonFileService.cs new file mode 100644 index 0000000000..822fa1adc3 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IPythonFileService.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; + +namespace ICSharpCode.PythonBinding +{ + public interface IPythonFileService + { + string GetTempFileName(); + TextWriter CreateTextWriter(CreateTextWriterInfo createTextWriterInfo); + void DeleteFile(string fileName); + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonAstWalker.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonAstWalker.cs index 3c276ddd91..f3dbe7d692 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonAstWalker.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonAstWalker.cs @@ -23,18 +23,30 @@ namespace ICSharpCode.PythonBinding public class PythonAstWalker : PythonWalker { DefaultCompilationUnit compilationUnit; - DefaultClass currentClass; - DefaultClass globalClass; - string currentNamespace; + IClass currentClass; + IClass globalClass; /// /// All classes in a file take the namespace of the filename. /// public PythonAstWalker(IProjectContent projectContent, string fileName) + { + CreateCompilationUnit(projectContent, fileName); + } + + void CreateCompilationUnit(IProjectContent projectContent, string fileName) { compilationUnit = new DefaultCompilationUnit(projectContent); compilationUnit.FileName = fileName; - currentNamespace = Path.GetFileNameWithoutExtension(fileName); + + CreateUsingScopeForCompilationUnit(fileName); + } + + void CreateUsingScopeForCompilationUnit(string fileName) + { + DefaultUsingScope usingScope = new DefaultUsingScope(); + usingScope.NamespaceName = Path.GetFileNameWithoutExtension(fileName); + compilationUnit.UsingScope = usingScope; } /// @@ -62,7 +74,7 @@ namespace ICSharpCode.PythonBinding c.Region = GetRegion(node); c.BodyRegion = GetBodyRegion(node.Body, node.Header); AddBaseTypes(c, node.Bases); - + // Save the class. compilationUnit.Classes.Add(c); @@ -80,7 +92,7 @@ namespace ICSharpCode.PythonBinding public override bool Walk(FunctionDefinition node) { if (node.Body == null) { - return true; + return false; } bool ignoreFirstMethodParameter = true; @@ -91,7 +103,7 @@ namespace ICSharpCode.PythonBinding c = globalClass; ignoreFirstMethodParameter = false; } - + // Create method. string methodName = node.Name; DomRegion bodyRegion = GetBodyRegion(node.Body, node.Header); @@ -107,7 +119,7 @@ namespace ICSharpCode.PythonBinding method.Parameters.Add(parameter); } c.Methods.Add(method); - return true; + return false; } /// @@ -120,7 +132,7 @@ namespace ICSharpCode.PythonBinding compilationUnit.UsingScope.Usings.Add(import); return false; } - + public override bool Walk(FromImportStatement node) { PythonFromImport import = new PythonFromImport(compilationUnit.ProjectContent, node); @@ -185,7 +197,12 @@ namespace ICSharpCode.PythonBinding /// void AddBaseType(IClass c, string name) { - c.BaseTypes.Add(new SearchClassReturnType(c.ProjectContent, c, 0, 0, name, 0)); + c.BaseTypes.Add(CreateSearchClassReturnType(c, name)); + } + + SearchClassReturnType CreateSearchClassReturnType(IClass c, string name) + { + return new SearchClassReturnType(c.ProjectContent, c, 0, 0, name, 0); } /// @@ -215,7 +232,7 @@ namespace ICSharpCode.PythonBinding /// string GetFullyQualifiedClassName(ClassDefinition classDef) { - return String.Concat(currentNamespace, ".", classDef.Name); + return String.Concat(compilationUnit.UsingScope.NamespaceName, ".", classDef.Name); } /// @@ -224,7 +241,7 @@ namespace ICSharpCode.PythonBinding void CreateGlobalClass() { if (globalClass == null) { - globalClass = new DefaultClass(compilationUnit, currentNamespace); + globalClass = new DefaultClass(compilationUnit, compilationUnit.UsingScope.NamespaceName); compilationUnit.Classes.Add(globalClass); } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsole.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsole.cs index 434394315b..3564feabfb 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsole.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsole.cs @@ -50,25 +50,15 @@ namespace ICSharpCode.PythonBinding //textArea.KeyEventHandler -= ProcessKeyPress; //textArea.DoProcessDialogKey -= ProcessDialogKey; } - + public TextWriter Output { - get { - Console.WriteLine("PythonConsole.Output get"); - return null; - } - set { - Console.WriteLine("PythonConsole.Output set"); - } + get { return null; } + set { } } public TextWriter ErrorOutput { - get { - Console.WriteLine("PythonConsole.ErrorOutput get"); - return null; - } - set { - Console.WriteLine("PythonConsole.ErrorOutput get"); - } + get { return null; } + set { } } /// @@ -90,8 +80,6 @@ namespace ICSharpCode.PythonBinding /// public string ReadLine(int autoIndentSize) { - Console.WriteLine("PythonConsole.ReadLine(): autoIndentSize: " + autoIndentSize); - string indent = String.Empty; if (autoIndentSize > 0) { indent = String.Empty.PadLeft(autoIndentSize); @@ -100,7 +88,6 @@ namespace ICSharpCode.PythonBinding string line = ReadLineFromTextEditor(); if (line != null) { - Console.WriteLine("ReadLine: " + indent + line); return indent + line; } return null; @@ -111,10 +98,7 @@ namespace ICSharpCode.PythonBinding /// public void Write(string text, Style style) { - Console.WriteLine("PythonConsole.Write(text, style): " + text); - textEditor.Write(text); - if (style == Style.Prompt) { promptLength = text.Length; textEditor.MakeCurrentContentReadOnly(); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleApplication.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleApplication.cs new file mode 100644 index 0000000000..eff8b57007 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleApplication.cs @@ -0,0 +1,109 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.Text; + +namespace ICSharpCode.PythonBinding +{ + public class PythonConsoleApplication + { + string fileName = String.Empty; + StringBuilder arguments; + bool debug; + string pythonScriptFileName = String.Empty; + string pythonScriptCommandLineArguments = String.Empty; + string workingDirectory = String.Empty; + + public PythonConsoleApplication(AddInOptions options) + : this(options.PythonFileName) + { + } + + public PythonConsoleApplication(string fileName) + { + this.fileName = fileName; + } + + public string FileName { + get { return fileName; } + } + + public bool Debug { + get { return debug; } + set { debug = value; } + } + + public string PythonScriptFileName { + get { return pythonScriptFileName; } + set { pythonScriptFileName = value; } + } + + public string PythonScriptCommandLineArguments { + get { return pythonScriptCommandLineArguments; } + set { pythonScriptCommandLineArguments = value; } + } + + public string WorkingDirectory { + get { return workingDirectory; } + set { workingDirectory = value; } + } + + public ProcessStartInfo GetProcessStartInfo() + { + ProcessStartInfo processStartInfo = new ProcessStartInfo(); + processStartInfo.FileName = fileName; + processStartInfo.Arguments = GetArguments(); + processStartInfo.WorkingDirectory = workingDirectory; + return processStartInfo; + } + + public string GetArguments() + { + arguments = new StringBuilder(); + + AppendBooleanOptionIfTrue("-X:Debug", debug); + AppendQuotedStringIfNotEmpty(pythonScriptFileName); + AppendStringIfNotEmpty(pythonScriptCommandLineArguments); + + return arguments.ToString().TrimEnd(); + } + + void AppendBooleanOptionIfTrue(string option, bool flag) + { + if (flag) { + AppendOption(option); + } + } + + void AppendOption(string option) + { + arguments.Append(option + " "); + } + + void AppendQuotedStringIfNotEmpty(string option) + { + if (!String.IsNullOrEmpty(option)) { + AppendQuotedString(option); + } + } + + void AppendQuotedString(string option) + { + string quotedOption = String.Format("\"{0}\"", option); + AppendOption(quotedOption); + } + + void AppendStringIfNotEmpty(string option) + { + if (!String.IsNullOrEmpty(option)) { + AppendOption(option); + } + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonFileService.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonFileService.cs new file mode 100644 index 0000000000..afca45eb89 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonFileService.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; + +namespace ICSharpCode.PythonBinding +{ + public class PythonFileService : IPythonFileService + { + public string GetTempFileName() + { + return Path.GetTempFileName(); + } + + public TextWriter CreateTextWriter(CreateTextWriterInfo createTextWriterInfo) + { + return createTextWriterInfo.CreateTextWriter(); + } + + public void DeleteFile(string fileName) + { + File.Delete(fileName); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.cs index 21f899a422..01c979f66d 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonOptionsPanel.cs @@ -5,11 +5,11 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Gui.OptionPanels; using System; using System.Drawing; using System.Windows.Forms; using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Gui.OptionPanels; using ICSharpCode.SharpDevelop.Project; namespace ICSharpCode.PythonBinding @@ -21,6 +21,7 @@ namespace ICSharpCode.PythonBinding { AddInOptions options; TextBox pythonFileNameTextBox; + TextBox pythonLibraryPathTextBox; public PythonOptionsPanel() : this(new AddInOptions()) { @@ -38,12 +39,16 @@ namespace ICSharpCode.PythonBinding pythonFileNameTextBox = (TextBox)ControlDictionary["pythonFileNameTextBox"]; pythonFileNameTextBox.Text = options.PythonFileName; + pythonLibraryPathTextBox = (TextBox)ControlDictionary["pythonLibraryPathTextBox"]; + pythonLibraryPathTextBox.Text = options.PythonLibraryPath; + ConnectBrowseButton("browseButton", "pythonFileNameTextBox", "${res:SharpDevelop.FileFilter.ExecutableFiles}|*.exe", TextBoxEditMode.EditRawProperty); } public override bool StorePanelContents() { options.PythonFileName = pythonFileNameTextBox.Text; + options.PythonLibraryPath = pythonLibraryPathTextBox.Text; return true; } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonStandardLibraryPath.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonStandardLibraryPath.cs new file mode 100644 index 0000000000..36da59f78a --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonStandardLibraryPath.cs @@ -0,0 +1,77 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using System.IO; +using System.Security; +using Microsoft.Win32; + +namespace ICSharpCode.PythonBinding +{ + public class PythonStandardLibraryPath + { + List directories = new List(); + string path = String.Empty; + + public PythonStandardLibraryPath(string path) + { + Path = path; + } + + public PythonStandardLibraryPath() + { + ReadPathFromRegistry(); + } + + void ReadPathFromRegistry() + { + try { + using (RegistryKey registryKey = GetPythonLibraryRegistryKey()) { + if (registryKey != null) { + Path = (string)registryKey.GetValue(String.Empty, String.Empty); + } + } + } catch (SecurityException) { + } catch (UnauthorizedAccessException) { + } catch (IOException) { + } + } + + RegistryKey GetPythonLibraryRegistryKey() + { + return Registry.LocalMachine.OpenSubKey(@"Software\Python\PythonCore\2.6\PythonPath"); + } + + public string[] Directories { + get { return directories.ToArray(); } + } + + public string Path { + get { return path; } + set { + path = value; + ReadDirectories(); + } + } + + void ReadDirectories() + { + directories.Clear(); + foreach (string item in path.Split(';')) { + string directory = item.Trim(); + if (!String.IsNullOrEmpty(directory)) { + directories.Add(directory); + } + } + } + + public bool HasPath { + get { return directories.Count > 0; } + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestDebugger.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestDebugger.cs new file mode 100644 index 0000000000..3e9e6b31f8 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestDebugger.cs @@ -0,0 +1,73 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestDebugger : TestDebuggerBase + { + AddInOptions options; + IPythonFileService fileService; + PythonTestRunnerApplication testRunnerApplication; + PythonStandardLibraryPath pythonStandardLibraryPath; + + public PythonTestDebugger() + : this(new UnitTestDebuggerService(), + new UnitTestMessageService(), + new TestResultsMonitor(), + new AddInOptions(), + new PythonStandardLibraryPath(), + new PythonFileService()) + { + } + + public PythonTestDebugger(IUnitTestDebuggerService debuggerService, + IUnitTestMessageService messageService, + ITestResultsMonitor testResultsMonitor, + AddInOptions options, + PythonStandardLibraryPath pythonStandardLibraryPath, + IPythonFileService fileService) + : base(debuggerService, messageService, testResultsMonitor) + { + this.options = options; + this.pythonStandardLibraryPath = pythonStandardLibraryPath; + this.fileService = fileService; + } + + public override void Start(SelectedTests selectedTests) + { + CreateTestRunnerApplication(); + testRunnerApplication.CreateResponseFile(selectedTests); + base.Start(selectedTests); + } + + void CreateTestRunnerApplication() + { + testRunnerApplication = new PythonTestRunnerApplication(base.TestResultsMonitor.FileName, options, pythonStandardLibraryPath, fileService); + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + testRunnerApplication.Debug = true; + return testRunnerApplication.CreateProcessStartInfo(selectedTests); + } + + public override void Dispose() + { + testRunnerApplication.Dispose(); + base.Dispose(); + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new PythonTestResult(testResult); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs new file mode 100644 index 0000000000..9670f44d76 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestFramework.cs @@ -0,0 +1,63 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestFramework : ITestFramework + { + public bool IsTestMethod(IMember member) + { + if (member != null) { + return member.Name.StartsWith("test"); + } + return false; + } + + public bool IsTestClass(IClass c) + { + while (c != null) { + if (HasTestCaseBaseType(c)) { + return true; + } + c = c.BaseClass; + } + return false; + } + + bool HasTestCaseBaseType(IClass c) + { + if (c.BaseTypes.Count > 0) { + return c.BaseTypes[0].FullyQualifiedName == "unittest.TestCase"; + } + return false; + } + + public bool IsTestProject(IProject project) + { + return project is PythonProject; + } + + public ITestRunner CreateTestRunner() + { + return new PythonTestRunner(); + } + + public ITestRunner CreateTestDebugger() + { + return new PythonTestDebugger(); + } + + public bool IsBuildNeededBeforeTestRun { + get { return false; } + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestResult.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestResult.cs new file mode 100644 index 0000000000..62fc443a6b --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestResult.cs @@ -0,0 +1,66 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using System.Text.RegularExpressions; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestResult : TestResult + { + public PythonTestResult(TestResult testResult) + : base(testResult.Name) + { + ResultType = testResult.ResultType; + Message = testResult.Message; + StackTrace = testResult.StackTrace; + } + + protected override void OnStackTraceChanged() + { + if (String.IsNullOrEmpty(StackTrace)) { + ResetStackTraceFilePosition(); + } else { + GetFilePositionFromStackTrace(); + } + } + + void ResetStackTraceFilePosition() + { + StackTraceFilePosition = FilePosition.Empty; + } + + /// + /// Stack trace: + /// Traceback (most recent call last): + /// File "d:\temp\test\PyTests\Tests\MyClassTest.py", line 19, in testRaiseException + /// raise 'abc' + /// + void GetFilePositionFromStackTrace() + { + Match match = Regex.Match(StackTrace, "\\sFile\\s\"(.*?)\",\\sline\\s(\\d+),", RegexOptions.Multiline); + if (match.Success) { + try { + SetStackTraceFilePosition(match.Groups); + } catch (OverflowException) { + // Ignore. + } + } + } + + void SetStackTraceFilePosition(GroupCollection groups) + { + string fileName = groups[1].Value; + int line = Convert.ToInt32(groups[2].Value); + int column = 1; + + StackTraceFilePosition = new FilePosition(fileName, line, column); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunner.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunner.cs new file mode 100644 index 0000000000..461a203135 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunner.cs @@ -0,0 +1,73 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestRunner : TestProcessRunnerBase + { + AddInOptions options; + PythonStandardLibraryPath pythonStandardLibraryPath; + IPythonFileService fileService; + PythonTestRunnerApplication testRunnerApplication; + + public PythonTestRunner() + : this(new UnitTestProcessRunner(), + new TestResultsMonitor(), + new AddInOptions(), + new PythonStandardLibraryPath(), + new PythonFileService()) + { + } + + public PythonTestRunner(IUnitTestProcessRunner processRunner, + ITestResultsMonitor testResultsMonitor, + AddInOptions options, + PythonStandardLibraryPath pythonStandardLibraryPath, + IPythonFileService fileService) + : base(processRunner, testResultsMonitor) + { + this.options = options; + this.pythonStandardLibraryPath = pythonStandardLibraryPath; + this.fileService = fileService; + } + + public override void Start(SelectedTests selectedTests) + { + CreateTestRunnerApplication(); + testRunnerApplication.CreateResponseFile(selectedTests); + base.Start(selectedTests); + } + + void CreateTestRunnerApplication() + { + testRunnerApplication = new PythonTestRunnerApplication(base.TestResultsMonitor.FileName, options, pythonStandardLibraryPath, fileService); + } + + protected override ProcessStartInfo GetProcessStartInfo(SelectedTests selectedTests) + { + return testRunnerApplication.CreateProcessStartInfo(selectedTests); + } + + public override void Dispose() + { + testRunnerApplication.Dispose(); + base.Dispose(); + } + + protected override TestResult CreateTestResultForTestFramework(TestResult testResult) + { + return new PythonTestResult(testResult); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerApplication.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerApplication.cs new file mode 100644 index 0000000000..5414ecf030 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerApplication.cs @@ -0,0 +1,109 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using ICSharpCode.Core; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestRunnerApplication + { + string testResultsFileName = String.Empty; + AddInOptions options; + PythonStandardLibraryPath pythonStandardLibraryPath; + PythonTestRunnerResponseFile responseFile; + IPythonFileService fileService; + CreateTextWriterInfo textWriterInfo; + PythonConsoleApplication consoleApplication; + + public PythonTestRunnerApplication(string testResultsFileName, + AddInOptions options, + PythonStandardLibraryPath pythonStandardLibraryPath, + IPythonFileService fileService) + { + this.testResultsFileName = testResultsFileName; + this.options = options; + this.pythonStandardLibraryPath = pythonStandardLibraryPath; + this.fileService = fileService; + consoleApplication = new PythonConsoleApplication(options); + } + + public bool Debug { + get { return consoleApplication.Debug; } + set { consoleApplication.Debug = value; } + } + + public void CreateResponseFile(SelectedTests selectedTests) + { + CreateResponseFile(); + using (responseFile) { + WritePythonSystemPaths(); + WriteTestsResultsFileName(); + WriteTests(selectedTests); + } + } + + void CreateResponseFile() + { + TextWriter writer = CreateTextWriter(); + responseFile = new PythonTestRunnerResponseFile(writer); + } + + TextWriter CreateTextWriter() + { + string fileName = fileService.GetTempFileName(); + textWriterInfo = new CreateTextWriterInfo(fileName, Encoding.UTF8, false); + return fileService.CreateTextWriter(textWriterInfo); + } + + void WritePythonSystemPaths() + { + if (options.HasPythonLibraryPath) { + responseFile.WritePath(options.PythonLibraryPath); + } else if (pythonStandardLibraryPath.HasPath) { + responseFile.WritePaths(pythonStandardLibraryPath.Directories); + } + } + + void WriteTestsResultsFileName() + { + responseFile.WriteResultsFileName(testResultsFileName); + } + + void WriteTests(SelectedTests selectedTests) + { + responseFile.WriteTests(selectedTests); + } + + public ProcessStartInfo CreateProcessStartInfo(SelectedTests selectedTests) + { + consoleApplication.PythonScriptFileName = GetSharpDevelopTestPythonScriptFileName(); + consoleApplication.PythonScriptCommandLineArguments = GetResponseFileNameCommandLineArgument(); + consoleApplication.WorkingDirectory = selectedTests.Project.Directory; + return consoleApplication.GetProcessStartInfo(); + } + + string GetSharpDevelopTestPythonScriptFileName() + { + return StringParser.Parse(@"${addinpath:ICSharpCode.PythonBinding}\TestRunner\sdtest.py"); + } + + string GetResponseFileNameCommandLineArgument() + { + return String.Format("\"@{0}\"", textWriterInfo.FileName); + } + + public void Dispose() + { + fileService.DeleteFile(textWriterInfo.FileName); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerResponseFile.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerResponseFile.cs new file mode 100644 index 0000000000..9e526a0d00 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTestRunnerResponseFile.cs @@ -0,0 +1,122 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.ObjectModel; +using System.IO; +using System.Text; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; + +namespace ICSharpCode.PythonBinding +{ + public class PythonTestRunnerResponseFile : IDisposable + { + TextWriter writer; + + public PythonTestRunnerResponseFile(string fileName) + : this(new StreamWriter(fileName, false, Encoding.UTF8)) + { + } + + public PythonTestRunnerResponseFile(TextWriter writer) + { + this.writer = writer; + } + + public void WriteTest(string testName) + { + writer.WriteLine(testName); + } + + public void WritePaths(string[] paths) + { + foreach (string path in paths) { + WritePath(path); + } + } + + public void WritePathIfNotEmpty(string path) + { + if (!String.IsNullOrEmpty(path)) { + WritePath(path); + } + } + + public void WritePath(string path) + { + WriteQuotedArgument("p", path); + } + + void WriteQuotedArgument(string option, string value) + { + writer.WriteLine("/{0}:\"{1}\"", option, value); + } + + public void WriteResultsFileName(string fileName) + { + WriteQuotedArgument("r", fileName); + } + + public void Dispose() + { + writer.Dispose(); + } + + public void WriteTests(SelectedTests selectedTests) + { + WritePathsForReferencedProjects(selectedTests.Project); + + if (selectedTests.Method != null) { + WriteTest(selectedTests.Method.FullyQualifiedName); + } else if (selectedTests.Class != null) { + WriteTest(selectedTests.Class.FullyQualifiedName); + } else if (!String.IsNullOrEmpty(selectedTests.NamespaceFilter)) { + WriteTest(selectedTests.NamespaceFilter); + } else { + WriteProjectTests(selectedTests.Project); + } + + } + + void WriteProjectTests(IProject project) + { + if (project != null) { + WriteProjectFileItems(project.Items); + } + } + + void WritePathsForReferencedProjects(IProject project) + { + if (project != null) { + foreach (ProjectItem item in project.Items) { + ProjectReferenceProjectItem projectRef = item as ProjectReferenceProjectItem; + if (projectRef != null) { + string directory = Path.GetDirectoryName(projectRef.FileName); + WritePathIfNotEmpty(directory); + } + } + } + } + + void WriteProjectFileItems(ReadOnlyCollection items) + { + foreach (ProjectItem item in items) { + FileProjectItem fileItem = item as FileProjectItem; + if (fileItem != null) { + WriteFileNameWithoutExtension(fileItem.FileName); + } + } + } + + void WriteFileNameWithoutExtension(string fileName) + { + string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName); + WriteTest(fileNameWithoutExtension); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/RunPythonCommand.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/RunPythonCommand.cs index b962b15407..2f53fced95 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/RunPythonCommand.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/RunPythonCommand.cs @@ -23,7 +23,7 @@ namespace ICSharpCode.PythonBinding IDebugger debugger; AddInOptions options; IWorkbench workbench; - bool debug; + PythonConsoleApplication ipy; public RunPythonCommand() : this(WorkbenchSingleton.Workbench, new AddInOptions(), DebuggerService.CurrentDebugger) @@ -35,40 +35,28 @@ namespace ICSharpCode.PythonBinding this.workbench = workbench; this.debugger = debugger; this.options = options; + ipy = new PythonConsoleApplication(options); } public bool Debug { - get { return debug; } - set { debug = value; } + get { return ipy.Debug; } + set { ipy.Debug = value; } } public override void Run() { - if (debug) { - debugger.Start(CreateProcessStartInfo()); + ProcessStartInfo processStartInfo = GetProcessStartInfo(); + if (Debug) { + debugger.Start(processStartInfo); } else { - debugger.StartWithoutDebugging(CreateProcessStartInfo()); + debugger.StartWithoutDebugging(processStartInfo); } } - ProcessStartInfo CreateProcessStartInfo() - { - ProcessStartInfo info = new ProcessStartInfo(); - info.FileName = options.PythonFileName; - info.Arguments = GetArguments(); - - return info; - } - - string GetArguments() + ProcessStartInfo GetProcessStartInfo() { - // Get the python script filename. - string pythonScriptFileName = "\"" + workbench.ActiveWorkbenchWindow.ActiveViewContent.PrimaryFileName + "\""; - - if (Debug) { - return "-D " + pythonScriptFileName; - } - return pythonScriptFileName; + ipy.PythonScriptFileName = workbench.ActiveWorkbenchWindow.ActiveViewContent.PrimaryFileName; + return ipy.GetProcessStartInfo(); } } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtest.py b/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtest.py new file mode 100644 index 0000000000..3510f6fcfa --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtest.py @@ -0,0 +1,95 @@ + +import sys +import System.IO + +class SharpDevelopTestProgram: + + def __init__(self): + self._sysPaths = [] + self._testNames = [] + + def run(self): + if self._validateCommandLineArgs(): + self._runTests() + return + + print 'Usage: sdunittest.py test-names-file sys-paths-file test-results-file' + print 'Usage: sdunittest.py @response-file' + print '' + print 'Example response file content: ' + print '/p:"sys/path/1"' + print '/p:"sys/path/2"' + print '/r:"path/to/results-file"' + print 'test-name1' + print 'test-name2' + print 'test-name3' + + def _validateCommandLineArgs(self): + if len(sys.argv) == 4: + self._testNamesFile = sys.argv[1] + self._sysPathFile = sys.argv[2] + self._testResultsFile = sys.argv[3] + self._responseFile = '' + return True + if len(sys.argv) == 2: + return self._getResponseFileName(sys.argv[1]) + return False + + def _getResponseFileName(self, fileName): + if len(fileName) > 0: + if fileName[0] == '@': + self._responseFile = fileName[1:] + return True + return False + + def _runTests(self): + if len(self._responseFile) > 0: + self._readResponseFile() + else: + self._readSysPathsFromFile() + self._readTestNames() + + self._addSysPaths() + + import unittest + import sdtestrunner + + suite = unittest.TestLoader().loadTestsFromNames(self._testNames) + sdtestrunner.SharpDevelopTestRunner(resultsFileName=self._testResultsFile, verbosity=2).run(suite) + + def _readResponseFile(self): + for line in self._readLinesFromFile(self._responseFile): + self._readResponseFileArgument(line) + + def _readResponseFileArgument(self, line): + if line.startswith('/r:'): + line = self._removeQuotes(line[3:]) + self._testResultsFile = line + elif line.startswith('/p:'): + line = self._removeQuotes(line[3:]) + self._sysPaths.append(line) + else: + self._testNames.append(line) + + def _removeQuotes(self, line): + return line.strip('\"') + + def _readLinesFromFile(self, fileName): + #f = codecs.open(fileName, 'rb', 'utf-8') + #return f.readall().splitlines() + return System.IO.File.ReadAllLines(fileName) + + def _readTestNames(self): + self._testNames = self._readLinesFromFile(self._testNamesFile) + + def _readSysPathsFromFile(self): + self._sysPaths = self._readLinesFromFile(self._sysPathFile) + + def _addSysPaths(self): + for path in self._sysPaths: + sys.path.append(path) + + +if __name__ == '__main__': + program = SharpDevelopTestProgram() + program.run() diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtestrunner.py b/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtestrunner.py new file mode 100644 index 0000000000..9fa36d46c3 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/TestRunner/sdtestrunner.py @@ -0,0 +1,106 @@ + +import codecs +import sys +import time +from unittest import TestResult +from unittest import TextTestRunner +from unittest import _TextTestResult +from unittest import _WritelnDecorator + +class _SharpDevelopTestResultWriter: + def __init__(self, resultsFileName): + self.stream = codecs.open(resultsFileName, "w+", "utf-8-sig") + + def _writeln(self, arg): + self.stream.write(arg) + self.stream.write('\r\n') + + def _writeTestName(self, test): + self._writeln("Name: " + test.id()) + + def _writeTestResult(self, result): + self._writeln("Result: " + result) + + def _writeTestSuccess(self): + self._writeTestResult("Success") + + def _writeTestFailure(self, test, err, testResult): + self._writeTestResult("Failure") + + exctype, value, tb = err + if value != None: + message = self._prefixLinesWithSpaceChar(str(value)) + self._writeln("Message: " + message) + + excInfoString = testResult._exc_info_to_string(err, test) + excInfoString = self._prefixLinesWithSpaceChar(excInfoString) + self._writeln("StackTrace: " + excInfoString) + + def _prefixLinesWithSpaceChar(self, text): + lines = [] + originalLines = text.splitlines() + if len(originalLines) == 0: + return text + + lines.append(originalLines[0] + '\r\n') + + for line in originalLines[1:]: + lines.append(' ' + line + '\r\n') + return ''.join(lines).rstrip() + + def addSuccess(self, test): + self._writeTestName(test) + self._writeTestSuccess() + + def addError(self, test, err, testResult): + self._writeTestName(test) + self._writeTestFailure(test, err, testResult) + + def addFailure(self, test, err, testResult): + self._writeTestName(test) + self._writeTestFailure(test, err, testResult) + +class _SharpDevelopNullTestResultWriter: + def __init__(self): + pass + + def addSuccess(self, test): + pass + + def addError(self, test, err, testResult): + pass + + def addFailure(self, test, err, testResult): + pass + + +class _SharpDevelopTestResult(_TextTestResult): + def __init__(self, stream, descriptions, verbosity, resultWriter): + _TextTestResult.__init__(self, stream, descriptions, verbosity) + self.resultWriter = resultWriter + + def addSuccess(self, test): + self.resultWriter.addSuccess(test) + _TextTestResult.addSuccess(self, test) + + def addError(self, test, err): + self.resultWriter.addError(test, err, self) + _TextTestResult.addError(self, test, err) + + def addFailure(self, test, err): + self.resultWriter.addFailure(test, err, self) + _TextTestResult.addFailure(self, test, err) + + +class SharpDevelopTestRunner(TextTestRunner): + def __init__(self, stream=sys.stderr, resultsFileName=None, descriptions=1, verbosity=1): + self.stream = _WritelnDecorator(stream) + self.descriptions = descriptions + self.verbosity = verbosity + if resultsFileName is None: + self.resultWriter = _SharpDevelopNullTestResultWriter() + else: + self.resultWriter = _SharpDevelopTestResultWriter(resultsFileName) + + def _makeResult(self): + return _SharpDevelopTestResult(self.stream, self.descriptions, self.verbosity, self.resultWriter) diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInOptionsTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInOptionsTestFixture.cs deleted file mode 100644 index 7306089ba7..0000000000 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInOptionsTestFixture.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using ICSharpCode.Core; -using ICSharpCode.PythonBinding; -using NUnit.Framework; -using PythonBinding.Tests.Utils; - -namespace PythonBinding.Tests -{ - /// - /// Tests the AddInOptions class. - /// - [TestFixture] - public class AddInOptionsTestFixture - { - [Test] - public void DefaultPythonConsoleFileName() - { - Properties p = new Properties(); - DerivedAddInOptions options = new DerivedAddInOptions(p); - options.AddInPath = @"C:\Projects\SD\AddIns\Python"; - - string expectedFileName = Path.Combine(options.AddInPath, "ipy.exe"); - Assert.AreEqual(expectedFileName, options.PythonFileName); - Assert.AreEqual("${addinpath:ICSharpCode.PythonBinding}", options.AddInPathRequested); - } - - [Test] - public void SetPythonConsoleFileNameToNull() - { - Properties p = new Properties(); - DerivedAddInOptions options = new DerivedAddInOptions(p); - options.AddInPath = @"C:\Projects\SD\AddIns\Python"; - options.PythonFileName = null; - - string expectedFileName = Path.Combine(options.AddInPath, "ipy.exe"); - Assert.AreEqual(expectedFileName, options.PythonFileName); - } - - [Test] - public void SetPythonConsoleFileNameToEmptyString() - { - Properties p = new Properties(); - DerivedAddInOptions options = new DerivedAddInOptions(p); - options.AddInPath = @"C:\Projects\SD\AddIns\Python"; - options.PythonFileName = String.Empty; - - string expectedFileName = Path.Combine(options.AddInPath, "ipy.exe"); - Assert.AreEqual(expectedFileName, options.PythonFileName); - } - - [Test] - public void SetPythonConsoleFileName() - { - Properties p = new Properties(); - AddInOptions options = new AddInOptions(p); - string fileName = @"C:\IronPython\ipy.exe"; - options.PythonFileName = fileName; - - Assert.AreEqual(fileName, options.PythonFileName); - Assert.AreEqual(fileName, p["PythonFileName"]); - } - } -} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/CodeCompletionBindingFromImportCompletionTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/CodeCompletionBindingFromImportCompletionTestFixture.cs deleted file mode 100644 index 8d560b5fb5..0000000000 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/CodeCompletionBindingFromImportCompletionTestFixture.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.Core; -using ICSharpCode.PythonBinding; -using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; -using ICSharpCode.SharpDevelop.Dom; -using NUnit.Framework; -using PythonBinding.Tests.Utils; - -namespace PythonBinding.Tests -{ - /// - /// Tests that the From keyword is correctly identified as a - /// importable code completion keyword. - /// - [TestFixture] - public class FromImportCompletionTestFixture - { - DerivedPythonCodeCompletionBinding codeCompletionBinding; - bool handlesImportKeyword; - SharpDevelopTextAreaControl textAreaControl; - - [TestFixtureSetUp] - public void SetUpFixture() - { - if (!PropertyService.Initialized) { - PropertyService.InitializeService(String.Empty, String.Empty, String.Empty); - } - textAreaControl = new SharpDevelopTextAreaControl(); - codeCompletionBinding = new DerivedPythonCodeCompletionBinding(); - handlesImportKeyword = codeCompletionBinding.HandleKeyword(textAreaControl, "from"); - } - - [Test] - public void HandlesImportKeyWord() - { - Assert.IsTrue(handlesImportKeyword); - } - - [Test] - public void ExpressionContextIsImportable() - { - Assert.AreEqual(ExpressionContext.Importable, codeCompletionBinding.ExpressionContext); - } - } -} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/CodeCompletionBindingImportCompletionTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/CodeCompletionBindingImportCompletionTestFixture.cs index e50567742b..49d26d4e59 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/CodeCompletionBindingImportCompletionTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/CodeCompletionBindingImportCompletionTestFixture.cs @@ -8,12 +8,12 @@ using System; using ICSharpCode.Core; using ICSharpCode.PythonBinding; -using ICSharpCode.SharpDevelop.Editor.AvalonEdit; using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Editor.AvalonEdit; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Completion { /// /// Tests the code completion after an "import" statement. @@ -48,7 +48,7 @@ namespace PythonBinding.Tests Assert.IsFalse(codeCompletionBinding.HandleKeyword(textEditor, "Unknown")); } - [Test] + [Test] public void HandlesUppercaseImportKeyword() { Assert.IsTrue(codeCompletionBinding.HandleKeyword(textEditor, "IMPORT")); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/NamespaceContentsAddedToCtrlSpaceTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/NamespaceContentsAddedToCtrlSpaceTestFixture.cs index 258b9df69a..fb803ad45f 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/NamespaceContentsAddedToCtrlSpaceTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Completion/NamespaceContentsAddedToCtrlSpaceTestFixture.cs @@ -12,6 +12,7 @@ using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { @@ -25,14 +26,14 @@ namespace PythonBinding.Tests.Resolver { List results; PythonResolver resolver; - MockProjectContent mockProjectContent; + PythonBinding.Tests.Utils.MockProjectContent mockProjectContent; MockClass myTestClass; [TestFixtureSetUp] public void SetUpFixture() { resolver = new PythonResolver(); - mockProjectContent = new MockProjectContent(); + mockProjectContent = new PythonBinding.Tests.Utils.MockProjectContent(); mockProjectContent.NamespacesToAdd.Add("Test"); myTestClass = new MockClass(mockProjectContent, "MyTestClass"); List namespaceItems = new List(); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInFileTestFixture.cs similarity index 93% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInFileTestFixture.cs index 6548db301f..34bd86cf24 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInFileTestFixture.cs @@ -15,7 +15,7 @@ using ICSharpCode.TextEditor.Document; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Configuration { /// /// Basic PythonBinding.addin file tests. @@ -50,6 +50,10 @@ namespace PythonBinding.Tests Codon convertCSharpProjectCodon; Codon convertVBNetProjectCodon; Codon formattingStrategyCodon; + Runtime sharpdevelopRuntime; + Runtime ironpythonModulesRuntime; + Runtime unitTestingRuntime; + Codon testFrameworkCodon; [TestFixtureSetUp] public void SetupFixture() @@ -83,13 +87,20 @@ namespace PythonBinding.Tests convertCSharpProjectCodon = GetCodon("/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectActions/Convert", "CSharpProjectToPythonProjectConverter"); convertVBNetProjectCodon = GetCodon("/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectActions/Convert", "VBNetProjectToPythonProjectConverter"); formattingStrategyCodon = GetCodon("/AddIns/DefaultTextEditor/Formatter/Python", "PythonFormatter"); - + testFrameworkCodon = GetCodon("/SharpDevelop/UnitTesting/TestFrameworks", "pyunit"); + // Get the PythonBinding runtime. foreach (Runtime runtime in addin.Runtimes) { if (runtime.Assembly == "PythonBinding.dll") { - pythonBindingRuntime = runtime; + pythonBindingRuntime = runtime; } else if (runtime.Assembly == "$ICSharpCode.FormsDesigner/FormsDesigner.dll") { formsDesignerRuntime = runtime; + } else if (runtime.Assembly == "IronPython.Modules.dll") { + ironpythonModulesRuntime = runtime; + } else if (runtime.Assembly == ":ICSharpCode.SharpDevelop") { + sharpdevelopRuntime = runtime; + } else if (runtime.Assembly == "$ICSharpCode.UnitTesting/UnitTesting.dll") { + unitTestingRuntime = runtime; } } @@ -128,11 +139,29 @@ namespace PythonBinding.Tests } [Test] - public void RuntimeExists() + public void PythonBindingRuntimeExists() { Assert.IsNotNull(pythonBindingRuntime); } + [Test] + public void ICSharpCodeSharpDevelopRuntimeExists() + { + Assert.IsNotNull(sharpdevelopRuntime); + } + + [Test] + public void IronPythonModulesRuntimeExists() + { + Assert.IsNotNull(ironpythonModulesRuntime); + } + + [Test] + public void UnitTestingRuntimeExists() + { + Assert.IsNotNull(unitTestingRuntime); + } + [Test] public void FileFilterExists() { @@ -725,22 +754,40 @@ namespace PythonBinding.Tests { Assert.AreEqual(1, pythonWithoutDebuggerRunMenuItemCodon.Conditions.Length); } - + [Test] public void PythonDebugRunConditionIsSameAsPythonRunCondition() { Assert.AreEqual(pythonWithoutDebuggerRunMenuItemCodon.Conditions[0], pythonRunMenuItemCodon.Conditions[0]); } - + [Test] public void PythonFormatterClass() { Assert.AreEqual("ICSharpCode.PythonBinding.PythonFormattingStrategy", formattingStrategyCodon["class"]); } + [Test] + public void TestFrameworkCodonExists() + { + Assert.IsNotNull(testFrameworkCodon); + } + + [Test] + public void TestFrameworkClassIsPythonTestFrameworks() + { + Assert.AreEqual("ICSharpCode.PythonBinding.PythonTestFramework", testFrameworkCodon["class"]); + } + + [Test] + public void TestFrameworkSupportedProjectsIsPythonProject() + { + Assert.AreEqual(".pyproj", testFrameworkCodon["supportedProjects"]); + } + Codon GetCodon(string name, string extensionPath) { return AddInHelper.GetCodon(addin, name, extensionPath); - } + } } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInOptionsTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInOptionsTestFixture.cs new file mode 100644 index 0000000000..3ebb9d18e3 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Configuration/AddInOptionsTestFixture.cs @@ -0,0 +1,94 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using ICSharpCode.Core; +using ICSharpCode.PythonBinding; +using NUnit.Framework; +using PythonBinding.Tests.Utils; + +namespace PythonBinding.Tests.Configuration +{ + /// + /// Tests the AddInOptions class. + /// + [TestFixture] + public class AddInOptionsTestFixture + { + AddInOptions options; + Properties properties; + AddIn addin; + + [TestFixtureSetUp] + public void SetUpFixture() + { + addin = AddInPathHelper.CreateDummyPythonAddInInsideAddInTree(); + addin.FileName = @"C:\Projects\SD\AddIns\Python\pythonbinding.addin"; + } + + [SetUp] + public void Init() + { + properties = new Properties(); + options = new AddInOptions(properties); + } + + [Test] + public void DefaultPythonConsoleFileNameIsPythonAddInPathCombinedWithIpyExe() + { + string expectedFileName = @"C:\Projects\SD\AddIns\Python\ipy.exe"; + Assert.AreEqual(expectedFileName, options.PythonFileName); + } + + [Test] + public void RequestingPythonFileNameWhenPythonConsoleFileNameSetToNullReturnsDefaultPythonConsoleFileName() + { + options.PythonFileName = null; + string expectedFileName = @"C:\Projects\SD\AddIns\Python\ipy.exe"; + Assert.AreEqual(expectedFileName, options.PythonFileName); + } + + [Test] + public void RequestingPythonFileNameWhenPythonConsoleFileNameToEmptyStringReturnsDefaultPythonConsoleFileName() + { + options.PythonFileName = String.Empty; + string expectedFileName = @"C:\Projects\SD\AddIns\Python\ipy.exe"; + Assert.AreEqual(expectedFileName, options.PythonFileName); + } + + [Test] + public void SetPythonConsoleFileNameUpdatesAddInOptionsPythonFileName() + { + string fileName = @"C:\IronPython\ipy.exe"; + options.PythonFileName = fileName; + Assert.AreEqual(fileName, options.PythonFileName); + } + + [Test] + public void SetPythonConsoleFileNameUpdatesProperties() + { + string fileName = @"C:\IronPython\ipy.exe"; + options.PythonFileName = fileName; + Assert.AreEqual(fileName, properties["PythonFileName"]); + } + + [Test] + public void PythonLibraryPathTakenFromProperties() + { + string expectedPythonLibraryPath = @"c:\python26\lib;c:\python26\lib\lib-tk"; + properties["PythonLibraryPath"] = expectedPythonLibraryPath; + Assert.AreEqual(expectedPythonLibraryPath, options.PythonLibraryPath); + } + + [Test] + public void DefaultPythonLibraryPathIsEmptyString() + { + Assert.AreEqual(String.Empty, options.PythonLibraryPath); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ForLoopConversionTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ForLoopConversionTestFixture.cs index 32e2f86734..0939669caf 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ForLoopConversionTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ForLoopConversionTestFixture.cs @@ -51,7 +51,6 @@ namespace PythonBinding.Tests.Converter { NRefactoryToPythonConverter converter = new NRefactoryToPythonConverter(SupportedLanguage.CSharp); string code = converter.Convert(csharp); - System.Console.WriteLine(code); string expectedCode = "class Foo(object):\r\n" + "\tdef GetCount(self):\r\n" + "\t\tcount = 0\r\n" + @@ -60,7 +59,7 @@ namespace PythonBinding.Tests.Converter "\t\t\tcount += 1\r\n" + "\t\t\ti = i + 1\r\n" + "\t\treturn count"; - + Assert.AreEqual(expectedCode, code); } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ProjectHasStartupObjectTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ProjectHasStartupObjectTestFixture.cs index bf5770363e..66d959d2e8 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ProjectHasStartupObjectTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Converter/ProjectHasStartupObjectTestFixture.cs @@ -17,6 +17,7 @@ using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Project; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Converter { @@ -31,7 +32,7 @@ namespace PythonBinding.Tests.Converter MSBuildBasedProject sourceProject; PythonProject targetProject; MockTextEditorProperties mockTextEditorProperties; - MockProjectContent mockProjectContent; + PythonBinding.Tests.Utils.MockProjectContent mockProjectContent; string startupObject = "RootNamespace.Main"; @@ -64,7 +65,7 @@ namespace PythonBinding.Tests.Converter // Set up IProjectContent so the ConvertProjectToPythonProjectCommand can // locate the startup object and determine it's filename. - mockProjectContent = new MockProjectContent(); + mockProjectContent = new PythonBinding.Tests.Utils.MockProjectContent(); MockClass mainClass = new MockClass(mockProjectContent, startupObject); mainClass.CompilationUnit.FileName = @"d:\projects\test\src\Main2.cs"; mockProjectContent.ClassToReturnFromGetClass = mainClass; diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs index 723eff78d7..8e1e8e9e64 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs @@ -20,6 +20,7 @@ using ICSharpCode.FormsDesigner; using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Designer { @@ -71,7 +72,7 @@ namespace PythonBinding.Tests.Designer [Test] public void GetDomRegion() { - MockMethod method = new MockMethod(); + MockMethod method = new MockMethod(MockClass.CreateMockClassWithoutAnyAttributes()); DomRegion bodyRegion = new DomRegion(0, 4, 1, 4); method.BodyRegion = bodyRegion; DomRegion expectedRegion = new DomRegion(bodyRegion.BeginLine + 1, 1, bodyRegion.EndLine + 1, 1); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs index 6e6d37d7f7..bc4b6948c9 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonDesignerLoaderTestFixture.cs @@ -68,9 +68,7 @@ namespace PythonBinding.Tests.Designer serializationManager = new DesignerSerializationManager(mockDesignerLoaderHost); - System.Console.WriteLine("Before BeginLoad"); loader.BeginLoad(mockDesignerLoaderHost); - System.Console.WriteLine("After BeginLoad"); rootComponent = mockDesignerLoaderHost.RootComponent; designedForm = new Form(); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonGeneratorTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonGeneratorTestFixture.cs index 8c82afa474..e414ac077f 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonGeneratorTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/PythonGeneratorTestFixture.cs @@ -17,6 +17,7 @@ using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Designer { @@ -26,7 +27,7 @@ namespace PythonBinding.Tests.Designer [Test] public void GetMethodReplaceRegion() { - MockMethod method = new MockMethod(); + MockMethod method = new MockMethod(MockClass.CreateMockClassWithoutAnyAttributes()); DomRegion bodyRegion = new DomRegion(0, 4, 1, 4); method.BodyRegion = bodyRegion; DomRegion expectedRegion = new DomRegion(bodyRegion.BeginLine + 1, 1, bodyRegion.EndLine + 1, 1); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AppSettingsPanelTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/AppSettingsPanelTestFixture.cs similarity index 99% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/AppSettingsPanelTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/AppSettingsPanelTestFixture.cs index 2c911e6355..77c59a6125 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/AppSettingsPanelTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/AppSettingsPanelTestFixture.cs @@ -16,7 +16,7 @@ using ICSharpCode.SharpDevelop.Project; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests the ApplicationSettingsPanel class. diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/CompilingOptionsPanelTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/CompilingOptionsPanelTestFixture.cs similarity index 99% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/CompilingOptionsPanelTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/CompilingOptionsPanelTestFixture.cs index 1d10376d14..7e6b51e07f 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/CompilingOptionsPanelTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/CompilingOptionsPanelTestFixture.cs @@ -16,7 +16,7 @@ using ICSharpCode.SharpDevelop.Project; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests the CompilingOptionsPanel. diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/DebugPythonCommandTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/DebugPythonCommandTestFixture.cs similarity index 88% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/DebugPythonCommandTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/DebugPythonCommandTestFixture.cs index ed886eb6cc..eff903c3e9 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/DebugPythonCommandTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/DebugPythonCommandTestFixture.cs @@ -13,7 +13,7 @@ using ICSharpCode.PythonBinding; using PythonBinding.Tests.Utils; using NUnit.Framework; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { [TestFixture] public class DebugPythonCommandTestFixture @@ -26,7 +26,7 @@ namespace PythonBinding.Tests { // Create dummy view content with the Python script. MockViewContent viewContent = new MockViewContent(); - viewContent.PrimaryFileName = new FileName(@"C:\Projects\test.py"); + viewContent.PrimaryFileName = new FileName(@"C:\Projects\test.py"); MockWorkbenchWindow workbenchWindow = new MockWorkbenchWindow(); workbenchWindow.ActiveViewContent = viewContent; MockWorkbench workbench = new MockWorkbench(); @@ -57,7 +57,7 @@ namespace PythonBinding.Tests [Test] public void ProcessInfoArgs() { - Assert.AreEqual("-D \"C:\\Projects\\test.py\"", debugger.ProcessStartInfo.Arguments); + Assert.AreEqual("-X:Debug \"C:\\Projects\\test.py\"", debugger.ProcessStartInfo.Arguments); } } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/FormsDesignerDisplayBindingTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/FormsDesignerDisplayBindingTestFixture.cs similarity index 95% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/FormsDesignerDisplayBindingTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/FormsDesignerDisplayBindingTestFixture.cs index ae257c9c6a..6580488bc6 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/FormsDesignerDisplayBindingTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/FormsDesignerDisplayBindingTestFixture.cs @@ -8,12 +8,13 @@ using System; using ICSharpCode.FormsDesigner; using ICSharpCode.PythonBinding; +using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Gui; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests the PythonFormsDesignerDisplayBinding. @@ -23,8 +24,8 @@ namespace PythonBinding.Tests { DerivedPythonFormsDesignerDisplayBinding displayBinding; MockTextEditorViewContent viewContent; - ParseInformation parseInfo; bool canAttachToDesignableClass; + ParseInformation parseInfo; [SetUp] public void SetUp() @@ -32,7 +33,7 @@ namespace PythonBinding.Tests displayBinding = new DerivedPythonFormsDesignerDisplayBinding(); viewContent = new MockTextEditorViewContent(); parseInfo = new ParseInformation(new DefaultCompilationUnit(new DefaultProjectContent())); - viewContent.PrimaryFileName = new ICSharpCode.Core.FileName("test.py"); + viewContent.PrimaryFileName = new FileName("test.py"); viewContent.TextEditor.Document.Text = "text content"; displayBinding.ParseServiceParseInfoToReturn = parseInfo; displayBinding.IsParseInfoDesignable = true; @@ -99,7 +100,7 @@ namespace PythonBinding.Tests [Test] public void NonPythonFileNameCannotBeAttachedTo() { - viewContent.PrimaryFileName = new ICSharpCode.Core.FileName("test.cs"); + viewContent.PrimaryFileName = new FileName("test.cs"); Assert.IsFalse(displayBinding.CanAttachTo(viewContent)); } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonIndentationTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonIndentationTests.cs similarity index 98% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonIndentationTests.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonIndentationTests.cs index 866a632a5b..9bcfc0f973 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonIndentationTests.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonIndentationTests.cs @@ -13,13 +13,13 @@ using ICSharpCode.TextEditor.Actions; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests.Indentation +namespace PythonBinding.Tests { /// /// Tests that the PythonFormattingStrategy indents the new line added after pressing the ':' character. /// [TestFixture] - public class PythonNewMethodIndentationTestFixture + public class PythonIndentationTestFixture { TextEditorControl textEditor; PythonFormattingStrategy formattingStrategy; diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonOptionsPanelTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonOptionsPanelTestFixture.cs similarity index 67% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonOptionsPanelTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonOptionsPanelTestFixture.cs index c02b17827e..e5d645ff59 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonOptionsPanelTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonOptionsPanelTestFixture.cs @@ -5,16 +5,16 @@ // $Revision$ // -using ICSharpCode.SharpDevelop.Gui.OptionPanels; using System; using System.Windows.Forms; using ICSharpCode.Core; using ICSharpCode.PythonBinding; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Gui.OptionPanels; using NUnit.Framework; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests the PythonOptionsPanel. @@ -26,6 +26,7 @@ namespace PythonBinding.Tests Properties properties; AddInOptions options; TextBox fileNameTextBox; + TextBox pythonLibraryPathTextBox; [SetUp] public void SetUp() @@ -33,9 +34,11 @@ namespace PythonBinding.Tests properties = new Properties(); options = new AddInOptions(properties); options.PythonFileName = @"C:\Python\ipy.exe"; + options.PythonLibraryPath = @"C:\Python26\lib"; optionsPanel = new PythonOptionsPanel(options); optionsPanel.LoadPanelContents(); fileNameTextBox = (TextBox)optionsPanel.ControlDictionary["pythonFileNameTextBox"]; + pythonLibraryPathTextBox = (TextBox)optionsPanel.ControlDictionary["pythonLibraryPathTextBox"]; } [TearDown] @@ -47,7 +50,13 @@ namespace PythonBinding.Tests [Test] public void PythonFileNameDisplayed() { - Assert.AreEqual(options.PythonFileName, fileNameTextBox.Text); + Assert.AreEqual(@"C:\Python\ipy.exe", fileNameTextBox.Text); + } + + [Test] + public void PythonLibraryPathIsDisplayed() + { + Assert.AreEqual(@"C:\Python26\lib", pythonLibraryPathTextBox.Text); } [Test] @@ -57,12 +66,21 @@ namespace PythonBinding.Tests } [Test] - public void SaveOptions() + public void SavingOptionsUpdatesIronPythonFileName() { string fileName = @"C:\Program Files\IronPython\ipy.exe"; fileNameTextBox.Text = fileName; optionsPanel.StorePanelContents(); Assert.AreEqual(fileName, options.PythonFileName); } + + [Test] + public void SavingOptionsUpdatesIronPythonLibraryPath() + { + string path = @"c:\Program Files\Python\lib"; + pythonLibraryPathTextBox.Text = path; + optionsPanel.StorePanelContents(); + Assert.AreEqual(path, options.PythonLibraryPath); + } } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonSyntaxModeTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonSyntaxModeTestFixture.cs similarity index 99% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonSyntaxModeTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonSyntaxModeTestFixture.cs index 261749e7e6..64209fb9eb 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonSyntaxModeTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/PythonSyntaxModeTestFixture.cs @@ -16,8 +16,9 @@ using ICSharpCode.AvalonEdit.AddIn; using ICSharpCode.Core; using ICSharpCode.TextEditor.Document; using NUnit.Framework; +using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests the Python.xshd syntax mode information. diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/RunPythonCommandTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/RunPythonCommandTestFixture.cs similarity index 98% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/RunPythonCommandTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/RunPythonCommandTestFixture.cs index 1e5cf87015..97a148f5f5 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/RunPythonCommandTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Gui/RunPythonCommandTestFixture.cs @@ -13,7 +13,7 @@ using ICSharpCode.SharpDevelop.Gui; using NUnit.Framework; using PythonBinding.Tests.Utils; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Gui { /// /// Tests that the RunPythonCommand class runs the Python console diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ClassWithBaseClassTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ClassWithBaseClassTestFixture.cs index df26c3a68d..58d3c03080 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ClassWithBaseClassTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ClassWithBaseClassTestFixture.cs @@ -52,6 +52,5 @@ namespace PythonBinding.Tests.Parsing } Assert.IsNotNull(matchedBaseType); } - } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseClassNestedInsideMethodTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseClassNestedInsideMethodTestFixture.cs new file mode 100644 index 0000000000..5d479b83da --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseClassNestedInsideMethodTestFixture.cs @@ -0,0 +1,59 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.TextEditor.Document; +using NUnit.Framework; +using PythonBinding.Tests; + +namespace PythonBinding.Tests.Parsing +{ + [TestFixture] + public class ParseClassNestedInsideMethodTestFixture + { + ICompilationUnit compilationUnit; + IClass c; + + [SetUp] + public void SetUpFixture() + { + string python = + "class MyClass:\r\n" + + " def firstMethod(self):\r\n" + + " class NestedClass:\r\n" + + " def firstNestedClassMethod(self):\r\n" + + " pass\r\n" + + "\r\n" + + " def secondMethod(self):\r\n" + + " pass\r\n" + + "\r\n"; + + DefaultProjectContent projectContent = new DefaultProjectContent(); + PythonParser parser = new PythonParser(); + compilationUnit = parser.Parse(projectContent, @"C:\test.py", python); + if (compilationUnit.Classes.Count > 0) { + c = compilationUnit.Classes[0]; + } + } + + [Test] + public void CompilationUnitHasOneClass() + { + Assert.AreEqual(1, compilationUnit.Classes.Count); + } + + [Test] + public void MyClassHasTwoMethods() + { + Assert.AreEqual(2, c.Methods.Count); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassTestFixture.cs new file mode 100644 index 0000000000..76415f2318 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassTestFixture.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace PythonBinding.Tests.Parsing +{ + [TestFixture] + public class ParseTestClassTestFixture + { + ICompilationUnit compilationUnit; + IClass c; + + [TestFixtureSetUp] + public void SetUpFixture() + { + string python = + "import unittest\r\n" + + "\r\n" + + "class simpleTest(unittest.TestCase):\r\n" + + " def testSuccess(self):\r\n" + + " assert True\r\n" + + "\r\n" + + " def testFailure(self):\r\n" + + " assert False\r\n" + + "\r\n"; + + DefaultProjectContent projectContent = new DefaultProjectContent(); + PythonParser parser = new PythonParser(); + compilationUnit = parser.Parse(projectContent, @"C:\test.py", python); + if (compilationUnit.Classes.Count > 0) { + c = compilationUnit.Classes[0]; + } + } + + [Test] + public void SimpleTestFirstBaseTypeIsUnitTestTestCase() + { + IReturnType baseType = c.BaseTypes[0]; + string actualBaseTypeName = baseType.FullyQualifiedName; + string expectedBaseTypeName = "unittest.TestCase"; + Assert.AreEqual(expectedBaseTypeName, actualBaseTypeName); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassWithBaseClassTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassWithBaseClassTestFixture.cs new file mode 100644 index 0000000000..2fe65b4a3b --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/ParseTestClassWithBaseClassTestFixture.cs @@ -0,0 +1,89 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; + +namespace PythonBinding.Tests.Parsing +{ + [TestFixture] + public class ParseTestClassWithBaseClassTestFixture + { + ICompilationUnit compilationUnit; + IClass c; + DefaultProjectContent projectContent; + + [TestFixtureSetUp] + public void SetUpFixture() + { + string python = + "import unittest\r\n" + + "\r\n" + + "class BaseTest(unittest.TestCase):\r\n" + + " def testSuccess(self):\r\n" + + " assert True\r\n" + + "\r\n" + + "class DerivedTest(BaseTest):\r\n" + + " pass\r\n" + + "\r\n"; + + projectContent = new DefaultProjectContent(); + PythonParser parser = new PythonParser(); + string fileName = @"C:\test.py"; + compilationUnit = parser.Parse(projectContent, fileName, python); + projectContent.UpdateCompilationUnit(null, compilationUnit, fileName); + if (compilationUnit.Classes.Count > 1) { + c = compilationUnit.Classes[1]; + } + } + + [Test] + public void DerivedTestFirstBaseTypeIsBaseTestTestCase() + { + IReturnType baseType = c.BaseTypes[0]; + string actualBaseTypeName = baseType.FullyQualifiedName; + string expectedBaseTypeName = "test.BaseTest"; + Assert.AreEqual(expectedBaseTypeName, actualBaseTypeName); + } + + [Test] + public void DerivedTestBaseClassNameIsBaseTest() + { + IClass baseClass = c.BaseClass; + string actualName = baseClass.FullyQualifiedName; + string expectedName = "test.BaseTest"; + Assert.AreEqual(expectedName, actualName); + } + + [Test] + public void ProjectContentGetClassReturnsBaseTest() + { + IClass c = projectContent.GetClass("test.BaseTest", 0); + Assert.AreEqual("test.BaseTest", c.FullyQualifiedName); + } + + [Test] + public void CompilationUnitUsingScopeNamespaceNameIsNamespaceTakenFromFileName() + { + string expectedNamespace = "test"; + Assert.AreEqual(expectedNamespace, compilationUnit.UsingScope.NamespaceName); + } + + [Test] + public void DerivedTestBaseClassHasTestCaseBaseClass() + { + IReturnType baseType = c.BaseTypes[0]; + IClass baseClass = baseType.GetUnderlyingClass(); + IReturnType baseBaseType = baseClass.BaseTypes[0]; + string actualBaseTypeName = baseBaseType.FullyQualifiedName; + string expectedBaseTypeName = "unittest.TestCase"; + Assert.AreEqual(expectedBaseTypeName, actualBaseTypeName); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj index 69ef73d933..a872c44704 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj @@ -79,11 +79,7 @@ - - - - @@ -104,6 +100,8 @@ + + @@ -199,7 +197,6 @@ - @@ -342,12 +339,19 @@ - - + + + + + + + + + @@ -364,12 +368,11 @@ - - - - - - + + + + + @@ -416,9 +419,22 @@ - + + + + + + + + + + + + + + @@ -426,7 +442,6 @@ - @@ -437,8 +452,9 @@ + + - @@ -447,12 +463,12 @@ - + @@ -463,6 +479,7 @@ + PythonBinding.addin @@ -472,11 +489,13 @@ + + @@ -504,6 +523,10 @@ {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} ICSharpCode.Core + + {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} + ICSharpCode.Core.WinForms + {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} ICSharpCode.SharpDevelop.Dom @@ -512,6 +535,14 @@ {8035765F-D51F-4A0C-A746-2FD100E19419} ICSharpCode.SharpDevelop.Widgets + + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} + UnitTesting.Tests + + + {1F261725-6318-4434-A1B1-6C70CE4CD324} + UnitTesting + {0162E499-42D0-409B-AA25-EED21F75336B} AvalonEdit.AddIn @@ -529,6 +560,10 @@ + + + + diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/CreateNewPythonProjectTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/CreateNewPythonProjectTestFixture.cs similarity index 100% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/CreateNewPythonProjectTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/CreateNewPythonProjectTestFixture.cs diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/ProjectBindingTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/ProjectBindingTestFixture.cs similarity index 100% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/ProjectBindingTestFixture.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/ProjectBindingTestFixture.cs diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguagePropertiesTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/PythonLanguagePropertiesTests.cs similarity index 100% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguagePropertiesTests.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonLanguage/PythonLanguagePropertiesTests.cs diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleFromSystemImportEverythingFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleFromSystemImportEverythingFixture.cs index 09f4654490..a73cc401d6 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleFromSystemImportEverythingFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleFromSystemImportEverythingFixture.cs @@ -13,6 +13,7 @@ using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom.CSharp; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleWriteLineTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleWriteLineTestFixture.cs index 9cea39b099..d02815eb21 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleWriteLineTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveConsoleWriteLineTestFixture.cs @@ -12,6 +12,7 @@ using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveFooTextBoxFromSystemWindowsFormsImportedAsFooTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveFooTextBoxFromSystemWindowsFormsImportedAsFooTestFixture.cs index 1ffbca464d..108ba743e3 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveFooTextBoxFromSystemWindowsFormsImportedAsFooTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveFooTextBoxFromSystemWindowsFormsImportedAsFooTestFixture.cs @@ -13,6 +13,7 @@ using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom.CSharp; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveLocalClassInstanceTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveLocalClassInstanceTestFixture.cs index 0db59b8a0c..9f5c872712 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveLocalClassInstanceTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveLocalClassInstanceTestFixture.cs @@ -12,6 +12,7 @@ using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { @@ -27,7 +28,7 @@ namespace PythonBinding.Tests.Resolver public class ResolveLocalClassInstanceTestFixture { PythonResolver resolver; - MockProjectContent mockProjectContent; + PythonBinding.Tests.Utils.MockProjectContent mockProjectContent; LocalResolveResult resolveResult; MockClass testClass; ICompilationUnit compilationUnit; @@ -37,7 +38,7 @@ namespace PythonBinding.Tests.Resolver { resolver = new PythonResolver(); - mockProjectContent = new MockProjectContent(); + mockProjectContent = new PythonBinding.Tests.Utils.MockProjectContent(); testClass = new MockClass(mockProjectContent, "Test.Test1"); mockProjectContent.ClassesInProjectContent.Add(testClass); mockProjectContent.ClassToReturnFromGetClass = testClass; diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemConsoleTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemConsoleTestFixture.cs index 626bb6455b..0e014b791c 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemConsoleTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemConsoleTestFixture.cs @@ -12,6 +12,7 @@ using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { @@ -23,7 +24,7 @@ namespace PythonBinding.Tests.Resolver public class ResolveSystemConsoleTestFixture { PythonResolver resolver; - MockProjectContent mockProjectContent; + PythonBinding.Tests.Utils.MockProjectContent mockProjectContent; ResolveResult resolveResult; MockClass testClass; ICompilationUnit compilationUnit; @@ -34,7 +35,7 @@ namespace PythonBinding.Tests.Resolver public void SetUpFixture() { resolver = new PythonResolver(); - mockProjectContent = new MockProjectContent(); + mockProjectContent = new PythonBinding.Tests.Utils.MockProjectContent(); systemConsoleClass = new MockClass(mockProjectContent, "System.Console"); mockProjectContent.ClassToReturnFromGetClass = systemConsoleClass; @@ -106,7 +107,7 @@ namespace PythonBinding.Tests.Resolver protected virtual ICompilationUnit CreateCompilationUnit(IProjectContent projectContent) { ICompilationUnit compilationUnit = new DefaultCompilationUnit(projectContent); - testClass = new MockClass(compilationUnit, "Test"); + testClass = new MockClass(projectContent, "Test"); compilationUnit.Classes.Add(testClass); return compilationUnit; } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemNamespaceWithMissingImportTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemNamespaceWithMissingImportTestFixture.cs index bb7a50a2f1..7a30fb97a4 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemNamespaceWithMissingImportTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveSystemNamespaceWithMissingImportTestFixture.cs @@ -11,6 +11,7 @@ using ICSharpCode.PythonBinding; using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportTextBoxTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportTextBoxTestFixture.cs index 2f5d3448ff..6fe5b03465 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportTextBoxTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportTextBoxTestFixture.cs @@ -13,6 +13,7 @@ using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom.CSharp; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportedAsMyTextBoxTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportedAsMyTextBoxTestFixture.cs index 3157cd7283..304ad0fe38 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportedAsMyTextBoxTestFixture.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Resolver/ResolveTextBoxFromSystemWindowsFormsImportedAsMyTextBoxTestFixture.cs @@ -13,6 +13,7 @@ using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom.CSharp; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Resolver { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreatePythonTestRunnerTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreatePythonTestRunnerTestFixture.cs new file mode 100644 index 0000000000..09846b1aa3 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreatePythonTestRunnerTestFixture.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using ICSharpCode.PythonBinding; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class CreatePythonTestRunnerTestFixture + { + PythonTestFramework testFramework; + + [TestFixtureSetUp] + public void SetUpFixture() + { + if (!PropertyService.Initialized) { + PropertyService.InitializeService(String.Empty, String.Empty, String.Empty); + } + } + + [SetUp] + public void Init() + { + testFramework = new PythonTestFramework(); + } + + [Test] + public void PythonTestFrameworkCreateTestRunnerReturnsPythonTestRunner() + { + Assert.IsInstanceOf(typeof(PythonTestRunner), testFramework.CreateTestRunner()); + } + + [Test] + public void PythonTestFrameworkCreateTestDebuggerReturnsPythonTestDebugger() + { + Assert.IsInstanceOf(typeof(PythonTestDebugger), testFramework.CreateTestDebugger()); + } + + [Test] + public void PythonTestFrameworkIsBuildNeededBeforeTestRunReturnsFalse() + { + Assert.IsFalse(testFramework.IsBuildNeededBeforeTestRun); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterFromCreateTextWriterInfoTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterFromCreateTextWriterInfoTestFixture.cs new file mode 100644 index 0000000000..a0f36b8026 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterFromCreateTextWriterInfoTestFixture.cs @@ -0,0 +1,41 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; +using ICSharpCode.PythonBinding; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class CreateTextWriterFromCreateTextWriterInfoTestFixture + { + TextWriter textWriter; + + [TestFixtureSetUp] + public void SetUpFixture() + { + string fileName = Path.GetTempFileName(); + CreateTextWriterInfo info = new CreateTextWriterInfo(fileName, Encoding.UTF8, false); + textWriter = info.CreateTextWriter(); + } + + [TestFixtureTearDown] + public void TearDownFixture() + { + textWriter.Dispose(); + } + + [Test] + public void CreatedTextWriterEncodingIsUtf8() + { + Assert.AreEqual(Encoding.UTF8, textWriter.Encoding); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterInfoEqualsTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterInfoEqualsTestFixture.cs new file mode 100644 index 0000000000..3c8e19c2f1 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/CreateTextWriterInfoEqualsTestFixture.cs @@ -0,0 +1,57 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Text; +using ICSharpCode.PythonBinding; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class CreateTextWriterInfoEqualsTestFixture + { + [Test] + public void CreateTextWriterInfosAreEqualWhenFileNameAndEncodingAndAppendAreEqual() + { + CreateTextWriterInfo lhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + CreateTextWriterInfo rhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + Assert.AreEqual(lhs, rhs); + } + + [Test] + public void CreateTextWriterInfosAreNotEqualWhenFileNamesAreDifferent() + { + CreateTextWriterInfo lhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + CreateTextWriterInfo rhs = new CreateTextWriterInfo("different-filename.txt", Encoding.UTF8, true); + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void CreateTextWriterInfosAreNotEqualWhenEncodingsAreDifferent() + { + CreateTextWriterInfo lhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + CreateTextWriterInfo rhs = new CreateTextWriterInfo("test.txt", Encoding.ASCII, true); + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void CreateTextWriterInfosAreNotEqualWhenAppendIsDifferent() + { + CreateTextWriterInfo lhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + CreateTextWriterInfo rhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, false); + Assert.AreNotEqual(lhs, rhs); + } + + [Test] + public void CreateTextWriterInfoEqualsReturnsFalseWhenNullPassedAsParameter() + { + CreateTextWriterInfo lhs = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + Assert.IsFalse(lhs.Equals(null)); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonConsoleApplicationTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonConsoleApplicationTestFixture.cs new file mode 100644 index 0000000000..be81d28ebd --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonConsoleApplicationTestFixture.cs @@ -0,0 +1,95 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using ICSharpCode.Core; +using ICSharpCode.PythonBinding; +using NUnit.Framework; +using PythonBinding.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonConsoleApplicationTestFixture + { + PythonConsoleApplication app; + AddInOptions options; + + [SetUp] + public void Init() + { + options = new AddInOptions(new Properties()); + options.PythonFileName = @"C:\IronPython\ipy.exe"; + app = new PythonConsoleApplication(options); + } + + [Test] + public void FileNameIsPythonFileNameFromAddInOptions() + { + string expectedFileName = @"C:\IronPython\ipy.exe"; + Assert.AreEqual(expectedFileName, app.FileName); + } + + [Test] + public void GetArgumentsReturnsDebugOptionWhenDebugIsTrue() + { + app.Debug = true; + string expectedCommandLine = "-X:Debug"; + + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void GetArgumentsReturnsQuotedPythonScriptFileName() + { + app.PythonScriptFileName = @"d:\projects\my ipy\test.py"; + string expectedCommandLine = "\"d:\\projects\\my ipy\\test.py\""; + + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void GetArgumentsReturnsQuotedPythonScriptFileNameAndItsCommandLineArguments() + { + app.Debug = true; + app.PythonScriptFileName = @"d:\projects\my ipy\test.py"; + app.PythonScriptCommandLineArguments = "@responseFile.txt -def"; + string expectedCommandLine = + "-X:Debug \"d:\\projects\\my ipy\\test.py\" @responseFile.txt -def"; + + Assert.AreEqual(expectedCommandLine, app.GetArguments()); + } + + [Test] + public void GetProcessStartInfoHasFileNameThatEqualsIronPythonConsoleApplicationExeFileName() + { + ProcessStartInfo startInfo = app.GetProcessStartInfo(); + string expectedFileName = @"C:\IronPython\ipy.exe"; + + Assert.AreEqual(expectedFileName, startInfo.FileName); + } + + [Test] + public void GetProcessStartInfoHasDebugFlagSetInArguments() + { + app.Debug = true; + ProcessStartInfo startInfo = app.GetProcessStartInfo(); + string expectedCommandLine = "-X:Debug"; + + Assert.AreEqual(expectedCommandLine, startInfo.Arguments); + } + + [Test] + public void GetProcessStartInfoHasWorkingDirectoryIfSet() + { + app.WorkingDirectory = @"d:\temp"; + ProcessStartInfo startInfo = app.GetProcessStartInfo(); + Assert.AreEqual(@"d:\temp", startInfo.WorkingDirectory); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonStandardLibraryPathTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonStandardLibraryPathTests.cs new file mode 100644 index 0000000000..53835dd60f --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonStandardLibraryPathTests.cs @@ -0,0 +1,82 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Collections.Generic; +using ICSharpCode.PythonBinding; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonStandardLibraryPathTests + { + [Test] + public void PathsPropertyReturnsPython26LibDirectory() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\python26\lib"); + string[] expectedPaths = new string[] { @"c:\python26\lib" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + + [Test] + public void HasPathReturnsTrueForNonEmptyPathString() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\python26\lib"); + Assert.IsTrue(path.HasPath); + } + + [Test] + public void HasPathReturnsFalseForEmptyPathString() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(String.Empty); + Assert.IsFalse(path.HasPath); + } + + [Test] + public void DirectoryPropertyReturnsPython26LibDirectoryAndPython26LibTkDirectory() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\python26\lib;c:\python26\lib\lib-tk"); + string[] expectedPaths = new string[] { @"c:\python26\lib", @"c:\python26\lib\lib-tk" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + + [Test] + public void DirectoryPropertyReturnsPython26LibDirectoryAndPython26LibTkDirectorySetInPathProperty() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(String.Empty); + path.Path = @"c:\python26\lib;c:\python26\lib\lib-tk"; + string[] expectedPaths = new string[] { @"c:\python26\lib", @"c:\python26\lib\lib-tk" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + + [Test] + public void DirectoriesAreClearedWhenPathIsSetToDifferentValue() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\temp"); + path.Path = @"c:\python26\lib;c:\python26\lib\lib-tk"; + string[] expectedPaths = new string[] { @"c:\python26\lib", @"c:\python26\lib\lib-tk" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + + [Test] + public void EmptyDirectoryInPathNotAddedToDirectories() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\temp;;c:\python\lib"); + string[] expectedPaths = new string[] { @"c:\temp", @"c:\python\lib" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + + [Test] + public void DirectoryWithJustWhitespaceIsNotAddedToPath() + { + PythonStandardLibraryPath path = new PythonStandardLibraryPath(@"c:\temp; ;c:\python\lib"); + string[] expectedPaths = new string[] { @"c:\temp", @"c:\python\lib" }; + Assert.AreEqual(expectedPaths, path.Directories); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestDebuggerRunsSelectedTestMethodTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestDebuggerRunsSelectedTestMethodTestFixture.cs new file mode 100644 index 0000000000..23a00b7809 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestDebuggerRunsSelectedTestMethodTestFixture.cs @@ -0,0 +1,156 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using ICSharpCode.Core; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestDebuggerRunsSelectedTestMethodTestFixture + { + MockDebuggerService debuggerService; + UnitTesting.Tests.Utils.MockDebugger debugger; + MockMessageService messageService; + MockCSharpProject project; + PythonTestDebugger testDebugger; + MockTestResultsMonitor testResultsMonitor; + SelectedTests selectedTests; + MockMethod methodToTest; + AddInOptions options; + MockPythonFileService fileService; + StringBuilder responseFileText; + StringWriter responseFileStringWriter; + PythonStandardLibraryPath standardLibraryPath; + + [SetUp] + public void Init() + { + CreateTestDebugger(); + CreateTestMethod(); + } + + void CreateTestDebugger() + { + debuggerService = new MockDebuggerService(); + debugger = debuggerService.MockDebugger; + messageService = new MockMessageService(); + testResultsMonitor = new MockTestResultsMonitor(); + options = new AddInOptions(new Properties()); + options.PythonFileName = @"c:\ironpython\ipy.exe"; + standardLibraryPath = new PythonStandardLibraryPath(@"c:\python\lib"); + fileService = new MockPythonFileService(); + testDebugger = new PythonTestDebugger(debuggerService, messageService, testResultsMonitor, options, standardLibraryPath, fileService); + } + + void CreateTestMethod() + { + project = new MockCSharpProject(); + MockClass c = new MockClass("MyNamespace.MyTestClass"); + methodToTest = new MockMethod(c, "MyTestMethod"); + } + + void RunTestsOnSelectedTestMethod() + { + fileService.SetTempFileName(@"d:\temp\tmp66.tmp"); + CreateTemporaryResponseFileWriter(); + + selectedTests = new SelectedTests(project, null, null, methodToTest); + testDebugger.Start(selectedTests); + } + + void CreateTemporaryResponseFileWriter() + { + responseFileText = new StringBuilder(); + responseFileStringWriter = new StringWriter(responseFileText); + fileService.SetTextWriter(responseFileStringWriter); + } + + [Test] + public void TestDebuggerProcessFileNameIsIronPythonConsoleExeTakenFromAddInOptions() + { + RunTestsOnSelectedTestMethod(); + + string expectedFileName = @"c:\ironpython\ipy.exe"; + Assert.AreEqual(expectedFileName, debugger.ProcessStartInfo.FileName); + } + + [Test] + public void DisposingTestRunnerDeletesTemporaryResponseFile() + { + fileService.FileNameDeleted = null; + RunTestsOnSelectedTestMethod(); + testDebugger.Dispose(); + + string expectedFileName = @"d:\temp\tmp66.tmp"; + Assert.AreEqual(expectedFileName, fileService.FileNameDeleted); + } + + [Test] + public void DisposingTestRunnerDisposesTestResultsMonitor() + { + RunTestsOnSelectedTestMethod(); + testDebugger.Dispose(); + Assert.IsTrue(testResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void CommandLineArgumentHasSharpDevelopTestPythonScriptAndResponseFileName() + { + AddIn addin = AddInPathHelper.CreateDummyPythonAddInInsideAddInTree(); + addin.FileName = @"c:\sharpdevelop\addins\pythonbinding\pythonbinding.addin"; + + RunTestsOnSelectedTestMethod(); + + string expectedCommandLine = + "-X:Debug " + + "\"c:\\sharpdevelop\\addins\\pythonbinding\\TestRunner\\sdtest.py\" " + + "\"@d:\\temp\\tmp66.tmp\""; + + Assert.AreEqual(expectedCommandLine, debugger.ProcessStartInfo.Arguments); + } + + [Test] + public void PythonTestResultReturnedFromTestFinishedEvent() + { + TestResult testResult = null; + testDebugger.TestFinished += delegate(object source, TestFinishedEventArgs e) { + testResult = e.Result; + }; + TestResult testResultToFire = new TestResult("test"); + testResultsMonitor.FireTestFinishedEvent(testResultToFire); + + Assert.IsInstanceOf(typeof(PythonTestResult), testResult); + } + + [Test] + public void ResponseFileTextContainsPythonLibraryPathFromPythonStandardLibraryPathObjectIfNotDefinedInAddInOptions() + { + standardLibraryPath.Path = @"c:\python\lib;c:\python\lib\lib-tk"; + options.PythonLibraryPath = String.Empty; + testResultsMonitor.FileName = @"c:\temp\test-results.txt"; + RunTestsOnSelectedTestMethod(); + + string expectedText = + "/p:\"c:\\python\\lib\"\r\n" + + "/p:\"c:\\python\\lib\\lib-tk\"\r\n" + + "/r:\"c:\\temp\\test-results.txt\"\r\n" + + "MyNamespace.MyTestClass.MyTestMethod\r\n"; + + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestClassTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestClassTests.cs new file mode 100644 index 0000000000..4723afc598 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestClassTests.cs @@ -0,0 +1,75 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestFrameworkIsTestClassTests + { + PythonTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new PythonTestFramework(); + } + + [Test] + public void CreateClassWithUnitTestTestCaseBaseTypeReturnsClassWithFirstBaseTypeEqualToTestCase() + { + IClass c = MockClass.CreateClassWithBaseType("unittest.TestCase"); + string name = c.BaseTypes[0].FullyQualifiedName; + string expectedName = "unittest.TestCase"; + Assert.AreEqual(expectedName, name); + } + + [Test] + public void IsTestClassReturnsTrueWhenClassFirstBaseTypeIsUnitTestTestCase() + { + MockClass c = MockClass.CreateClassWithBaseType("unittest.TestCase"); + Assert.IsTrue(testFramework.IsTestClass(c)); + } + + [Test] + public void IsTestClassReturnsFalseWhenClassHasNoBaseTypes() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + Assert.IsFalse(testFramework.IsTestClass(c)); + } + + [Test] + public void IsTestClassReturnsFalseForNull() + { + Assert.IsFalse(testFramework.IsTestClass(null)); + } + + [Test] + public void IsTestClassReturnsFalseWhenFirstBaseTypeIsSystemWindowsFormsForm() + { + MockClass c = MockClass.CreateClassWithBaseType("System.Windows.Forms.Form"); + Assert.IsFalse(testFramework.IsTestClass(c)); + } + + [Test] + public void IsTestClassReturnsTrueWhenDerivedClassHasBaseClassDerivedFromTestCase() + { + MockClass baseClass = MockClass.CreateClassWithBaseType("unittest.TestCase"); + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + DefaultReturnType returnType = new DefaultReturnType(baseClass); + c.BaseTypes.Add(returnType); + + Assert.IsTrue(testFramework.IsTestClass(c)); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestMethodTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestMethodTests.cs new file mode 100644 index 0000000000..1ec715060d --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestMethodTests.cs @@ -0,0 +1,49 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestFrameworkIsTestMethodTests + { + PythonTestFramework testFramework; + + [SetUp] + public void Init() + { + testFramework = new PythonTestFramework(); + } + + [Test] + public void IsTestMethodReturnsTrueForMethodThatStartsWithTest() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod method = new MockMethod(c, "testRunThis"); + Assert.IsTrue(testFramework.IsTestMethod(method)); + } + + [Test] + public void IsTestMethodReturnsFalseForNull() + { + Assert.IsFalse(testFramework.IsTestMethod(null)); + } + + [Test] + public void IsTestMethodReturnsFalseForMethodThatDoesNotStartWithTest() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + MockMethod method = new MockMethod(c, "RunThis"); + Assert.IsFalse(testFramework.IsTestMethod(method)); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestProjectTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestProjectTests.cs new file mode 100644 index 0000000000..f6a0a979ae --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestFrameworkIsTestProjectTests.cs @@ -0,0 +1,66 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Internal.Templates; +using ICSharpCode.SharpDevelop.Project; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestFrameworkIsTestProjectTests + { + PythonTestFramework testFramework; + + [TestFixtureSetUp] + public void SetUpFixture() + { + MSBuildEngineHelper.InitMSBuildEngine(); + } + + [SetUp] + public void Init() + { + testFramework = new PythonTestFramework(); + } + + [Test] + public void IsTestProjectReturnsFalseForNull() + { + Assert.IsFalse(testFramework.IsTestProject(null)); + } + + [Test] + public void IsTestProjectReturnsTrueForPythonProject() + { + ProjectCreateInformation createInfo = new ProjectCreateInformation(); + createInfo.Solution = new Solution(); + createInfo.OutputProjectFileName = @"C:\projects\test.pyproj"; + PythonProject project = new PythonProject(createInfo); + + Assert.IsTrue(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsFalseForNonPythonProject() + { + MockProject project = new MockProject(); + Assert.IsFalse(testFramework.IsTestProject(project)); + } + + [Test] + public void IsTestProjectReturnsFalseForNullPythonProject() + { + PythonProject project = null; + Assert.IsFalse(testFramework.IsTestProject(project)); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultFailureTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultFailureTestFixture.cs new file mode 100644 index 0000000000..24770b8d89 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultFailureTestFixture.cs @@ -0,0 +1,90 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.PythonBinding; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestResultFailureTestFixture + { + PythonTestResult pythonTestResult; + string stackTraceText; + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyTest"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "test failed"; + + stackTraceText = + "Traceback (most recent call last):\r\n" + + " File \"d:\\temp\\test\\PyTests\\Tests\\MyClassTest.py\", line 16, in testAssertEquals\r\n" + + " self.assertEqual(10, 15, 'wrong size after resize')\r\n" + + "AssertionError: wrong size after resize"; + + testResult.StackTrace = stackTraceText; + pythonTestResult = new PythonTestResult(testResult); + } + + [Test] + public void TestResultNameIsMyTest() + { + Assert.AreEqual("MyTest", pythonTestResult.Name); + } + + [Test] + public void TestResultTypeIsFailure() + { + Assert.AreEqual(TestResultType.Failure, pythonTestResult.ResultType); + } + + [Test] + public void TestResultMessageIsTestFailed() + { + Assert.AreEqual("test failed", pythonTestResult.Message); + } + + [Test] + public void PythonTestResultHasStackTraceFromOriginalTestResult() + { + Assert.AreEqual(stackTraceText, pythonTestResult.StackTrace); + } + + [Test] + public void StackTraceFilePositionHasExpectedFileName() + { + string expectedFileName = "d:\\temp\\test\\PyTests\\Tests\\MyClassTest.py"; + Assert.AreEqual(expectedFileName, pythonTestResult.StackTraceFilePosition.FileName); + } + + [Test] + public void StackTraceFilePositionLineIs16() + { + Assert.AreEqual(16, pythonTestResult.StackTraceFilePosition.Line); + } + + [Test] + public void StackTraceFilePositionColumnIsOne() + { + Assert.AreEqual(1, pythonTestResult.StackTraceFilePosition.Column); + } + + [Test] + public void ChangingStackTraceToEmptyStringSetsStackTraceFilePositionToEmpty() + { + pythonTestResult.StackTraceFilePosition = new FilePosition("test.cs", 10, 2); + pythonTestResult.StackTrace = String.Empty; + Assert.IsTrue(pythonTestResult.StackTraceFilePosition.IsEmpty); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultStackTraceLineNumberOverflowTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultStackTraceLineNumberOverflowTestFixture.cs new file mode 100644 index 0000000000..3dcfd3dd04 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestResultStackTraceLineNumberOverflowTestFixture.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.UnitTesting; +using NUnit.Framework; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestResultLineNumberOverflowTestFixture + { + PythonTestResult pythonTestResult; + string stackTraceText; + + [SetUp] + public void Init() + { + TestResult testResult = new TestResult("MyTest"); + testResult.ResultType = TestResultType.Failure; + testResult.Message = "test failed"; + + stackTraceText = + "Traceback (most recent call last):\r\n" + + " File \"d:\\temp\\test\\PyTests\\Tests\\MyClassTest.py\", line 4294967296, in testAssertEquals\r\n" + + " self.assertEqual(10, 15, 'wrong size after resize')\r\n" + + "AssertionError: wrong size after resize"; + + testResult.StackTrace = stackTraceText; + pythonTestResult = new PythonTestResult(testResult); + } + + [Test] + public void StackTraceFilePositionIsEmpty() + { + Assert.IsTrue(pythonTestResult.StackTraceFilePosition.IsEmpty); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerResponseFileTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerResponseFileTestFixture.cs new file mode 100644 index 0000000000..57b1ff8486 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerResponseFileTestFixture.cs @@ -0,0 +1,206 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; +using ICSharpCode.Core.Services; +using ICSharpCode.PythonBinding; +using ICSharpCode.Core; +using ICSharpCode.SharpDevelop; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.SharpDevelop.Project; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestRunnerResponseFileTestFixture + { + PythonTestRunnerResponseFile responseFile; + StringBuilder responseFileText; + StringWriter writer; + + [SetUp] + public void Init() + { + responseFileText = new StringBuilder(); + writer = new StringWriter(responseFileText); + responseFile = new PythonTestRunnerResponseFile(writer); + } + + [Test] + public void WriteTestAddsTestNameToResponseFile() + { + responseFile.WriteTest("MyTests"); + + Assert.AreEqual("MyTests\r\n", responseFileText.ToString()); + } + + [Test] + public void WritePathAddsQuotedSysPathCommandLineArgument() + { + responseFile.WritePath(@"c:\mytests"); + + string expectedText = "/p:\"c:\\mytests\"\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteResultsFileNameAddsQuotedResultsFileNameCommandLineArgument() + { + responseFile.WriteResultsFileName(@"c:\temp\tmp66.tmp"); + + string expectedText = "/r:\"c:\\temp\\tmp66.tmp\"\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void DisposeMethodDisposesTextWriterPassedInConstructor() + { + responseFile.Dispose(); + Assert.Throws(delegate { writer.Write("test"); }); + } + + [Test] + public void WriteTestsWritesSelectedTestMethodNameWhenMethodSelected() + { + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.FullyQualifiedName = "MyNamespace.MyTests.MyTestMethod"; + SelectedTests tests = new SelectedTests(new MockCSharpProject(), null, null, method); + + responseFile.WriteTests(tests); + + string expectedText = "MyNamespace.MyTests.MyTestMethod\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteTestsWritesSelectedTestClassNameWhenOnlyClassSelected() + { + MockClass c = MockClass.CreateMockClassWithoutAnyAttributes(); + c.FullyQualifiedName = "MyNamespace.MyTests"; + SelectedTests tests = new SelectedTests(new MockCSharpProject(), null, c, null); + + responseFile.WriteTests(tests); + + string expectedText = "MyNamespace.MyTests\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteTestsWritesSelectedTestNamespaceWhenOnlyNamespaceSelected() + { + SelectedTests tests = new SelectedTests(new MockCSharpProject(), "MyNamespace", null, null); + responseFile.WriteTests(tests); + + string expectedText = "MyNamespace\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteTestsWritesNamespacesForAllFilesInProjectWhenOnlyProjectSelected() + { + MockCSharpProject project = new MockCSharpProject(); + + FileProjectItem item = new FileProjectItem(project, ItemType.Compile); + item.FileName = @"c:\projects\mytests\nonTestClass.py"; + ProjectService.AddProjectItem(project, item); + + item = new FileProjectItem(project, ItemType.Compile); + item.FileName = @"c:\projects\mytests\TestClass.py"; + ProjectService.AddProjectItem(project, item); + + SelectedTests tests = new SelectedTests(project); + + responseFile.WriteTests(tests); + + string expectedText = + "nonTestClass\r\n" + + "TestClass\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteTestsWritesNothingToResponseFileWhenMethodAndClassAndNamespaceAndProjectIsNull() + { + SelectedTests tests = new SelectedTests(null); + responseFile.WriteTests(tests); + Assert.AreEqual(String.Empty, responseFileText.ToString()); + } + + [Test] + public void WriteTestsDoesNotThrowNullReferenceExceptionWhenNonFileProjectItemInProject() + { + MockCSharpProject project = new MockCSharpProject(); + WebReferenceUrl webRef = new WebReferenceUrl(project); + webRef.Include = "test"; + ProjectService.AddProjectItem(project, webRef); + + FileProjectItem item = new FileProjectItem(project, ItemType.Compile); + item.FileName = @"c:\projects\mytests\myTests.py"; + ProjectService.AddProjectItem(project, item); + + SelectedTests tests = new SelectedTests(project); + responseFile.WriteTests(tests); + + string expectedText = "myTests\r\n"; + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void WriteTestsWritesDirectoriesForReferencedProjectsToSysPathCommandLineArguments() + { + // Have to initialize the workbench since ProjectReferenceProjectItem has a dependency on + // WorkbenchSingleton. + InitializeWorkbench(); + + MockCSharpProject referencedProject = new MockCSharpProject(); + referencedProject.FileName = @"c:\projects\pyproject\pyproject.pyproj"; + + MockCSharpProject unitTestProject = new MockCSharpProject(); + ProjectReferenceProjectItem projectRef = new ProjectReferenceProjectItem(unitTestProject, referencedProject); + projectRef.FileName = @"c:\projects\pyproject\pyproject.pyproj"; + ProjectService.AddProjectItem(unitTestProject, projectRef); + + MockMethod method = MockMethod.CreateMockMethodWithoutAnyAttributes(); + method.FullyQualifiedName = "MyNamespace.MyTests.MyTestMethod"; + + SelectedTests tests = new SelectedTests(unitTestProject, null, null, method); + responseFile.WriteTests(tests); + + string expectedText = + "/p:\"c:\\projects\\pyproject\"\r\n" + + "MyNamespace.MyTests.MyTestMethod\r\n"; + + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + void InitializeWorkbench() + { + string addInXml = + "\r\n" + + "\r\n" + + " \r\n" + + "\r\n" + + "\r\n " + + ""; + AddIn addin = AddIn.Load(new StringReader(addInXml)); + addin.Enabled = true; + AddInTree.InsertAddIn(addin); + if (!PropertyService.Initialized) { + PropertyService.InitializeService(String.Empty, String.Empty, String.Empty); + } + DummyServiceManager serviceManager = new DummyServiceManager(); + ServiceManager.Instance = serviceManager; + WorkbenchSingleton.InitializeWorkbench(new MockWorkbench(), null); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerRunsSelectedTestMethodTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerRunsSelectedTestMethodTestFixture.cs new file mode 100644 index 0000000000..38fce06d8d --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Testing/PythonTestRunnerRunsSelectedTestMethodTestFixture.cs @@ -0,0 +1,225 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using ICSharpCode.Core; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using ICSharpCode.SharpDevelop.Gui; +using ICSharpCode.UnitTesting; +using NUnit.Framework; +using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; + +namespace PythonBinding.Tests.Testing +{ + [TestFixture] + public class PythonTestRunnerRunsSelectedTestMethodTestFixture + { + MockCSharpProject project; + PythonTestRunner testRunner; + MockProcessRunner processRunner; + MockTestResultsMonitor testResultsMonitor; + SelectedTests selectedTests; + MockMethod methodToTest; + AddInOptions options; + MockPythonFileService fileService; + StringBuilder responseFileText; + StringWriter responseFileStringWriter; + PythonStandardLibraryPath standardLibraryPath; + + [SetUp] + public void Init() + { + CreateTestRunner(); + CreateTestMethod(); + } + + void CreateTestRunner() + { + processRunner = new MockProcessRunner(); + testResultsMonitor = new MockTestResultsMonitor(); + options = new AddInOptions(new Properties()); + options.PythonFileName = @"c:\ironpython\ipy.exe"; + fileService = new MockPythonFileService(); + standardLibraryPath = new PythonStandardLibraryPath(@"c:\python\lib"); + + testRunner = new PythonTestRunner(processRunner, testResultsMonitor, options, standardLibraryPath, fileService); + } + + void CreateTestMethod() + { + project = new MockCSharpProject(); + MockClass c = new MockClass("MyNamespace.MyTestClass"); + methodToTest = new MockMethod(c, "MyTestMethod"); + } + + void RunTestsOnSelectedTestMethod() + { + fileService.SetTempFileName(@"d:\temp\tmp66.tmp"); + CreateTemporaryResponseFileWriter(); + + selectedTests = new SelectedTests(project, null, null, methodToTest); + testRunner.Start(selectedTests); + } + + void CreateTemporaryResponseFileWriter() + { + responseFileText = new StringBuilder(); + responseFileStringWriter = new StringWriter(responseFileText); + fileService.SetTextWriter(responseFileStringWriter); + } + + [Test] + public void TestRunnerProcessFileNameIsIronPythonConsoleExeTakenFromAddInOptions() + { + RunTestsOnSelectedTestMethod(); + + string expectedFileName = @"c:\ironpython\ipy.exe"; + Assert.AreEqual(expectedFileName, processRunner.CommandPassedToStartMethod); + } + + [Test] + public void CommandLineArgumentHasSharpDevelopTestPythonScriptAndResponseFileName() + { + AddIn addin = AddInPathHelper.CreateDummyPythonAddInInsideAddInTree(); + addin.FileName = @"c:\sharpdevelop\addins\pythonbinding\pythonbinding.addin"; + + RunTestsOnSelectedTestMethod(); + + string expectedCommandLine = + "\"c:\\sharpdevelop\\addins\\pythonbinding\\TestRunner\\sdtest.py\" " + + "\"@d:\\temp\\tmp66.tmp\""; + + Assert.AreEqual(expectedCommandLine, processRunner.CommandArgumentsPassedToStartMethod); + } + + [Test] + public void ResponseFileCreatedUsingTempFileName() + { + RunTestsOnSelectedTestMethod(); + + Assert.AreEqual(@"d:\temp\tmp66.tmp", fileService.CreateTextWriterInfoPassedToCreateTextWriter.FileName); + } + + [Test] + public void ResponseFileCreatedWithUtf8Encoding() + { + RunTestsOnSelectedTestMethod(); + + Assert.AreEqual(Encoding.UTF8, fileService.CreateTextWriterInfoPassedToCreateTextWriter.Encoding); + } + + [Test] + public void ResponseFileCreatedWithAppendSetToFalse() + { + RunTestsOnSelectedTestMethod(); + + Assert.IsFalse(fileService.CreateTextWriterInfoPassedToCreateTextWriter.Append); + } + + [Test] + public void DisposingTestRunnerDeletesTemporaryResponseFile() + { + fileService.FileNameDeleted = null; + RunTestsOnSelectedTestMethod(); + testRunner.Dispose(); + + string expectedFileName = @"d:\temp\tmp66.tmp"; + Assert.AreEqual(expectedFileName, fileService.FileNameDeleted); + } + + [Test] + public void DisposingTestRunnerDisposesTestResultsMonitor() + { + RunTestsOnSelectedTestMethod(); + testRunner.Dispose(); + Assert.IsTrue(testResultsMonitor.IsDisposeMethodCalled); + } + + [Test] + public void ResponseFileTextContainsPythonLibraryPathAndTestResultsFileNameAndFullyQualifiedTestMethod() + { + standardLibraryPath.Path = String.Empty; + options.PythonLibraryPath = @"c:\python26\lib"; + testResultsMonitor.FileName = @"c:\temp\test-results.txt"; + RunTestsOnSelectedTestMethod(); + + string expectedText = + "/p:\"c:\\python26\\lib\"\r\n" + + "/r:\"c:\\temp\\test-results.txt\"\r\n" + + "MyNamespace.MyTestClass.MyTestMethod\r\n"; + + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void ResponseFileTextDoesNotContainPythonLibraryPathIfItIsAnEmptyString() + { + options.PythonLibraryPath = String.Empty; + standardLibraryPath.Path = String.Empty; + testResultsMonitor.FileName = @"c:\temp\test-results.txt"; + RunTestsOnSelectedTestMethod(); + + string expectedText = + "/r:\"c:\\temp\\test-results.txt\"\r\n" + + "MyNamespace.MyTestClass.MyTestMethod\r\n"; + + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void ResponseFileTextContainsPythonLibraryPathFromPythonStandardLibraryPathObjectIfNotDefinedInAddInOptions() + { + standardLibraryPath.Path = @"c:\python\lib"; + options.PythonLibraryPath = String.Empty; + testResultsMonitor.FileName = @"c:\temp\test-results.txt"; + RunTestsOnSelectedTestMethod(); + + string expectedText = + "/p:\"c:\\python\\lib\"\r\n" + + "/r:\"c:\\temp\\test-results.txt\"\r\n" + + "MyNamespace.MyTestClass.MyTestMethod\r\n"; + + Assert.AreEqual(expectedText, responseFileText.ToString()); + } + + [Test] + public void ResponseFileTextWriterDisposedAfterTestsRun() + { + RunTestsOnSelectedTestMethod(); + Assert.Throws(delegate { responseFileStringWriter.Write("test"); }); + } + + [Test] + public void ProcessRunnerWorkingDirectoryIsDirectoryContainingProject() + { + RunTestsOnSelectedTestMethod(); + + string expectedDirectory = @"c:\projects\MyTests"; + string actualDirectory = processRunner.WorkingDirectory; + + Assert.AreEqual(expectedDirectory, actualDirectory); + } + + [Test] + public void PythonTestResultReturnedFromTestFinishedEvent() + { + TestResult testResult = null; + testRunner.TestFinished += delegate(object source, TestFinishedEventArgs e) { + testResult = e.Result; + }; + TestResult testResultToFire = new TestResult("test"); + testResultsMonitor.FireTestFinishedEvent(testResultToFire); + + Assert.IsInstanceOf(typeof(PythonTestResult), testResult); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/AddInPathHelper.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/AddInPathHelper.cs new file mode 100644 index 0000000000..3b2722db3c --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/AddInPathHelper.cs @@ -0,0 +1,60 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using ICSharpCode.Core; + +namespace PythonBinding.Tests.Utils +{ + public static class AddInPathHelper + { + public static AddIn CreateDummyPythonAddInInsideAddInTree() + { + RemoveOldAddIn(); + AddIn addin = CreateAddIn(); + AddInTree.InsertAddIn(addin); + return addin; + } + + static void RemoveOldAddIn() + { + AddIn oldAddin = FindOldAddIn(); + if (oldAddin != null) { + AddInTree.RemoveAddIn(oldAddin); + } + } + + static AddIn FindOldAddIn() + { + foreach (AddIn addin in AddInTree.AddIns) { + if (addin.Manifest.PrimaryIdentity == "ICSharpCode.PythonBinding") { + return addin; + } + } + return null; + } + + static AddIn CreateAddIn() + { + string xml = GetAddInXml(); + AddIn addin = AddIn.Load(new StringReader(xml)); + addin.FileName = @"C:\SharpDevelop\AddIns\PythonBinding\PythonBinding.addin"; + return addin; + } + + static string GetAddInXml() + { + return + "\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + ""; + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedAddInOptions.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedAddInOptions.cs deleted file mode 100644 index 00f3dee1ec..0000000000 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedAddInOptions.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using ICSharpCode.Core; -using ICSharpCode.PythonBinding; - -namespace PythonBinding.Tests.Utils -{ - /// - /// Overrides the AddInOptions GetAddInPath method to return - /// some dummy data used for testing. - /// - public class DerivedAddInOptions : AddInOptions - { - string addInPath = String.Empty; - string addInPathRequested = String.Empty; - - public DerivedAddInOptions(Properties properties) : base(properties) - { - } - - /// - /// Gets the addin path string passed to the GetAddInPath method. - /// - public string AddInPathRequested { - get { return addInPathRequested; } - } - - /// - /// Gets or sets the addin path that should be returned from the - /// GetAddInPath method. - /// - public string AddInPath { - get { return addInPath; } - set { addInPath = value; } - } - - /// - /// Returns our dummy AddInPath. - /// - protected override string GetAddInPath(string addIn) - { - addInPathRequested = addIn; - return addInPath; - } - } -} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedPythonDesignerLoader.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedPythonDesignerLoader.cs index 9847bb2e27..66a14d1bbe 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedPythonDesignerLoader.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DerivedPythonDesignerLoader.cs @@ -35,7 +35,6 @@ namespace PythonBinding.Tests.Utils protected override void OnEndLoad(bool successful, ICollection errors) { - System.Console.WriteLine("DesignerLoader.OnEndLoad: successful: " + successful); if (errors != null) { foreach (object o in errors) { Exception ex = o as Exception; @@ -49,22 +48,17 @@ namespace PythonBinding.Tests.Utils protected override void OnBeginLoad() { - System.Console.WriteLine("DesignerLoader.OnBeginLoad"); base.OnBeginLoad(); } protected override void Initialize() { - System.Console.WriteLine("DesignerLoader.Initialize"); base.Initialize(); } protected override void PerformLoad(IDesignerSerializationManager manager) { - System.Console.WriteLine("DesignerLoader.PerformLoad Before"); base.PerformLoad(manager); - System.Console.WriteLine("DesignerLoader.PerformLoad After"); } - } } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummyServiceManager.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummyServiceManager.cs new file mode 100644 index 0000000000..a63456cfc9 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummyServiceManager.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.Windows.Forms; +using ICSharpCode.Core.Services; +using ICSharpCode.Core.WinForms; + +namespace PythonBinding.Tests.Utils +{ + public class DummyServiceManager : ServiceManager + { + WinFormsMessageService messageService = new WinFormsMessageService(); + + public DummyServiceManager() + { + } + + public override IMessageService MessageService { + get { return messageService; } + } + + public override object GetService(Type serviceType) + { + return null; + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummySynchronizeInvoke.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummySynchronizeInvoke.cs new file mode 100644 index 0000000000..07a4dbf4fc --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummySynchronizeInvoke.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.ComponentModel; + +namespace PythonBinding.Tests.Utils +{ + public class DummySynchronizeInvoke : ISynchronizeInvoke + { + public DummySynchronizeInvoke() + { + } + + public bool InvokeRequired { + get { return false; } + } + + public IAsyncResult BeginInvoke(Delegate method, object[] args) + { + return null; + } + + public object EndInvoke(IAsyncResult result) + { + return null; + } + + public object Invoke(Delegate method, object[] args) + { + return null; + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockClass.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockClass.cs deleted file mode 100644 index f3dce124e0..0000000000 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockClass.cs +++ /dev/null @@ -1,31 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using ICSharpCode.SharpDevelop.Dom; - -namespace PythonBinding.Tests.Utils -{ - /// - /// Mock implementation of the IClass interface - /// - public class MockClass : DefaultClass - { - // derive from real DefaultClass. The resolver is free to access any information from the class, - // and I don't want to have to adjust the mock whenever something in SharpDevelop.Dom changes. - public MockClass(ICompilationUnit cu, string name) - : base(cu, name) - { - } - - public MockClass(IProjectContent pc, string name) - : base(new DefaultCompilationUnit(pc), name) - { - } - } -} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs index 4c3ccf4f85..d50bc05ed6 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerLoaderHost.cs @@ -86,7 +86,6 @@ namespace PythonBinding.Tests.Utils public void EndLoad(string baseClassName, bool successful, ICollection errorCollection) { - System.Console.WriteLine("DesignerLoaderHost.EndLoad"); } public void Reload() @@ -133,13 +132,11 @@ namespace PythonBinding.Tests.Utils public Type GetType(string typeName) { - System.Console.WriteLine("DesignerLoaderHost.GetType: " + typeName); return typeResolutionService.GetType(typeName); } public void AddService(Type serviceType, object serviceInstance) { - System.Console.WriteLine("DesignerLoaderHost.AddService: " + serviceType.Name + " IsNull: " + (serviceInstance == null)); serviceContainer.AddService(serviceType, serviceInstance); } @@ -165,7 +162,6 @@ namespace PythonBinding.Tests.Utils public object GetService(Type serviceType) { - System.Console.WriteLine("DesignerLoaderHost.GetService: " + serviceType.Name); return serviceContainer.GetService(serviceType); } @@ -203,7 +199,7 @@ namespace PythonBinding.Tests.Utils TransactionOpened(this, e); } } - + protected virtual void OnTransactionOpening(EventArgs e) { if (TransactionOpening != null) { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockMethod.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockMethod.cs deleted file mode 100644 index 6e4bd60dcd..0000000000 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockMethod.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using ICSharpCode.SharpDevelop.Dom; - -namespace PythonBinding.Tests.Utils -{ - /// - /// Mock IMethod implementation. - /// - public class MockMethod : IMethod - { - public MockMethod() - { - } - - public DomRegion BodyRegion { get; set; } - - public IList TypeParameters { - get { - throw new NotImplementedException(); - } - } - - public bool IsConstructor { - get { - throw new NotImplementedException(); - } - } - - public bool IsOperator { - get { - throw new NotImplementedException(); - } - } - - public IList HandlesClauses { - get { - throw new NotImplementedException(); - } - } - - public IList Parameters { - get { - throw new NotImplementedException(); - } - } - - public bool IsExtensionMethod { - get { - throw new NotImplementedException(); - } - } - - public string FullyQualifiedName { - get { - throw new NotImplementedException(); - } - } - - public IReturnType DeclaringTypeReference { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public IMember GenericMember { - get { - throw new NotImplementedException(); - } - } - - public DomRegion Region { - get { - throw new NotImplementedException(); - } - } - - public string Name { - get { - throw new NotImplementedException(); - } - } - - public string Namespace { - get { - throw new NotImplementedException(); - } - } - - public string DotNetName { - get { - throw new NotImplementedException(); - } - } - - public IReturnType ReturnType { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public IList InterfaceImplementations { - get { - throw new NotImplementedException(); - } - } - - public IClass DeclaringType { - get { - throw new NotImplementedException(); - } - } - - public ModifierEnum Modifiers { - get { - throw new NotImplementedException(); - } - } - - public IList Attributes { - get { - throw new NotImplementedException(); - } - } - - public string Documentation { - get { - throw new NotImplementedException(); - } - } - - public bool IsAbstract { - get { - throw new NotImplementedException(); - } - } - - public bool IsSealed { - get { - throw new NotImplementedException(); - } - } - - public bool IsStatic { - get { - throw new NotImplementedException(); - } - } - - public bool IsConst { - get { - throw new NotImplementedException(); - } - } - - public bool IsVirtual { - get { - throw new NotImplementedException(); - } - } - - public bool IsPublic { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtected { - get { - throw new NotImplementedException(); - } - } - - public bool IsPrivate { - get { - throw new NotImplementedException(); - } - } - - public bool IsInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsReadonly { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedAndInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsProtectedOrInternal { - get { - throw new NotImplementedException(); - } - } - - public bool IsOverride { - get { - throw new NotImplementedException(); - } - } - - public bool IsOverridable { - get { - throw new NotImplementedException(); - } - } - - public bool IsNew { - get { - throw new NotImplementedException(); - } - } - - public bool IsSynthetic { - get { - throw new NotImplementedException(); - } - } - - public object UserData { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } - } - - public bool IsFrozen { - get { - throw new NotImplementedException(); - } - } - - public IMember CreateSpecializedMember() - { - throw new NotImplementedException(); - } - - public bool IsAccessible(IClass callingClass, bool isClassInInheritanceTree) - { - throw new NotImplementedException(); - } - - public void Freeze() - { - throw new NotImplementedException(); - } - - public int CompareTo(object obj) - { - throw new NotImplementedException(); - } - - public object Clone() - { - throw new NotImplementedException(); - } - - public ICompilationUnit CompilationUnit { - get { - throw new NotImplementedException(); - } - } - - public IProjectContent ProjectContent { - get { - throw new NotImplementedException(); - } - } - - public EntityType EntityType { - get { return EntityType.Method; } - } - } -} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonFileService.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonFileService.cs new file mode 100644 index 0000000000..27a1998081 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonFileService.cs @@ -0,0 +1,58 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; +using ICSharpCode.PythonBinding; + +namespace PythonBinding.Tests.Utils +{ + public class MockPythonFileService : IPythonFileService + { + CreateTextWriterInfo createTextWriterInfoPassedToCreateTextWriter; + string tempFileName; + TextWriter textWriter; + string fileNameDeleted; + + public void SetTempFileName(string fileName) + { + this.tempFileName = fileName; + } + + public string GetTempFileName() + { + return tempFileName; + } + + public void SetTextWriter(TextWriter writer) + { + this.textWriter = writer; + } + + public TextWriter CreateTextWriter(CreateTextWriterInfo textWriterInfo) + { + createTextWriterInfoPassedToCreateTextWriter = textWriterInfo; + return textWriter; + } + + public CreateTextWriterInfo CreateTextWriterInfoPassedToCreateTextWriter { + get { return createTextWriterInfoPassedToCreateTextWriter; } + set { createTextWriterInfoPassedToCreateTextWriter = value; } + } + + public void DeleteFile(string fileName) + { + fileNameDeleted = fileName; + } + + public string FileNameDeleted { + get { return fileNameDeleted; } + set { fileNameDeleted = value; } + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs index cf9ffde229..d52e52cf7b 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockTypeResolutionService.cs @@ -43,7 +43,6 @@ namespace PythonBinding.Tests.Utils public Type GetType(string name) { - System.Console.WriteLine("TypeResolutionService.GetType: " + name); lastTypeNameResolved = name; if (name == "Form") { return typeof(Form); diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbench.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbench.cs index 6310d8b40f..a461e47415 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbench.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbench.cs @@ -19,6 +19,9 @@ namespace PythonBinding.Tests.Utils /// public class MockWorkbench : IWorkbench { + DummySynchronizeInvoke synchronizeInvoke = new DummySynchronizeInvoke(); + Form form = new Form(); + public event EventHandler ActiveWorkbenchWindowChanged { add {} remove {} } public event EventHandler ActiveViewContentChanged { add {} remove {} } public event EventHandler ActiveContentChanged { add {} remove {} } @@ -26,11 +29,11 @@ namespace PythonBinding.Tests.Utils public event ViewContentEventHandler ViewClosed { add {} remove {} } public IWin32Window MainWin32Window { - get { return null; } + get { return form; } } public System.ComponentModel.ISynchronizeInvoke SynchronizingObject { - get { return null; } + get { return synchronizeInvoke; } } public System.Windows.Window MainWindow { @@ -90,12 +93,8 @@ namespace PythonBinding.Tests.Utils } public IWorkbenchLayout WorkbenchLayout { - get { - throw new NotImplementedException(); - } - set { - throw new NotImplementedException(); - } + get { return null; } + set { } } public bool IsActiveWindow { @@ -106,7 +105,6 @@ namespace PythonBinding.Tests.Utils public void Initialize() { - throw new NotImplementedException(); } public void ShowView(IViewContent content) @@ -156,7 +154,6 @@ namespace PythonBinding.Tests.Utils public void SetMemento(Properties memento) { - throw new NotImplementedException(); } public bool FullScreen { diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBindingAddInFile.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/PythonBindingAddInFile.cs similarity index 96% rename from src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBindingAddInFile.cs rename to src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/PythonBindingAddInFile.cs index bedd439175..c41cc5fc74 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBindingAddInFile.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/PythonBindingAddInFile.cs @@ -10,7 +10,7 @@ using System.IO; using System.Reflection; using System.Xml; -namespace PythonBinding.Tests +namespace PythonBinding.Tests.Utils { /// /// Utility class that reads the PythonBinding.addin file diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/AddInPathHelperTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/AddInPathHelperTestFixture.cs new file mode 100644 index 0000000000..ceeb152e46 --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/AddInPathHelperTestFixture.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.Core; +using NUnit.Framework; +using PythonBinding.Tests.Utils; + +namespace PythonBinding.Tests.Utils.Tests +{ + [TestFixture] + public class AddInPathHelperTestFixture + { + AddIn pythonAddIn; + + [SetUp] + public void Init() + { + pythonAddIn = AddInPathHelper.CreateDummyPythonAddInInsideAddInTree(); + } + + [Test] + public void AddInFileNameIsCDriveSharpDevelopAddInsPythonBindingPythonBindingAddIn() + { + string expectedFileName = @"C:\SharpDevelop\AddIns\PythonBinding\PythonBinding.addin"; + Assert.AreEqual(expectedFileName, pythonAddIn.FileName); + } + + [Test] + public void StringParserAddInPathIsCDriveSharpDevelopAddInsPythonBindingForPythonBindingAddIn() + { + string directory = StringParser.Parse("${addinpath:ICSharpCode.PythonBinding}"); + string expectedDirectory = @"C:\SharpDevelop\AddIns\PythonBinding"; + Assert.AreEqual(expectedDirectory, directory); + } + + [Test] + public void ChangingAddInFileNameReturnsExpectedFileNameFromStringParserAddInPath() + { + pythonAddIn.FileName = @"c:\def\pythonbinding.addin"; + string expectedDirectory = @"c:\def"; + string actualDirectory = StringParser.Parse("${addinpath:ICSharpCode.PythonBinding}"); + Assert.AreEqual(expectedDirectory, actualDirectory); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockProjectContentTests.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockProjectContentTests.cs index f3e04c8f35..bd3b3e4339 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockProjectContentTests.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockProjectContentTests.cs @@ -11,19 +11,20 @@ using ICSharpCode.PythonBinding; using ICSharpCode.SharpDevelop.Dom; using NUnit.Framework; using PythonBinding.Tests.Utils; +using UnitTesting.Tests.Utils; namespace PythonBinding.Tests.Utils.Tests { [TestFixture] public class MockProjectContentTests { - MockProjectContent projectContent; + PythonBinding.Tests.Utils.MockProjectContent projectContent; List items; [SetUp] public void Init() { - projectContent = new MockProjectContent(); + projectContent = new PythonBinding.Tests.Utils.MockProjectContent(); items = new List(); } diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockPythonFileServiceTestFixture.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockPythonFileServiceTestFixture.cs new file mode 100644 index 0000000000..0b068bd50a --- /dev/null +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockPythonFileServiceTestFixture.cs @@ -0,0 +1,65 @@ +// +// +// +// +// $Revision$ +// + +using System; +using System.IO; +using System.Text; +using ICSharpCode.PythonBinding; +using NUnit.Framework; + +namespace PythonBinding.Tests.Utils.Tests +{ + [TestFixture] + public class MockPythonFileServiceTestFixture + { + MockPythonFileService fileService; + + [SetUp] + public void Init() + { + fileService = new MockPythonFileService(); + } + + [Test] + public void GetTempFileNameReturnsReturnsTemporaryFileName() + { + string expectedFileName = @"c:\temp\tmp1.tmp"; + fileService.SetTempFileName(expectedFileName); + string tempFileName = fileService.GetTempFileName(); + Assert.AreEqual(expectedFileName, tempFileName); + } + + [Test] + public void TextWriterReturnedFromCreateTextWriter() + { + using (StringWriter stringWriter = new StringWriter(new StringBuilder())) { + fileService.SetTextWriter(stringWriter); + CreateTextWriterInfo info = new CreateTextWriterInfo(@"test.tmp", Encoding.UTF8, true); + Assert.AreEqual(stringWriter, fileService.CreateTextWriter(info)); + } + } + + [Test] + public void CreateTextWriterInfoIsSavedWhenCreateTextWriterMethodIsCalled() + { + fileService.CreateTextWriterInfoPassedToCreateTextWriter = null; + CreateTextWriterInfo info = new CreateTextWriterInfo("test.txt", Encoding.UTF8, true); + fileService.CreateTextWriter(info); + Assert.AreEqual(info, fileService.CreateTextWriterInfoPassedToCreateTextWriter); + } + + [Test] + public void DeleteFileSavesFileNameDeleted() + { + fileService.FileNameDeleted = null; + string expectedFileName = @"c:\temp\tmp66.tmp"; + fileService.DeleteFile(expectedFileName); + + Assert.AreEqual(expectedFileName, fileService.FileNameDeleted); + } + } +} diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs index 8d3bfa351b..e07cf623b6 100644 --- a/src/Setup/Files.wxs +++ b/src/Setup/Files.wxs @@ -10,72 +10,72 @@ + NGens SharpDevelop.exe. Needs the NetFx extension (WixNetFxExtension.dll), + library (netfx.wixlib) and custom actions (netfxca.dll). + + Priority=0 means the image generation occurs during + setup. Other values defer the generation. + + Default Platform value is 32bit which tries to generate images + for 32 bitversions of the .NET framework on the + target machine. This will fail on a machine with + 64 bit version of .NET. Cannot use Platform=all + since this runs NGen for both 32 and 64 bit versions + regardless of whether they exist on the target + machine. + --> + Get several ICE33 warnings using the ProgId element + but these apparently can safely be ignored + according to a post on the wix-users list by + Rob Mencshing. Also using the ProgId element + does not create the ProgId table. The current installer + no longer uses the ProgId but instead uses Registry + keys instead. It still creates the same entries in the + msi. + + http://sourceforge.net/mailarchive/message.php?msg_id=9075241 + + Note that the Target of the form [#FileId] expands out to the + full path of the file. A target of the form [!FileId] + expands to the short name of the file (i.e. it includes ~ + characters). We need the full path otherwise the exe name + will be something like SharpDev~1.exe and the + SharpDevelop.exe.manifest file will not be found when + running the application so it does not use XP visual styles. + Unfortunately using [#FileId] generates lots of ICE69 + warnings for the icon and the SharpDevelop.exe target + if they are in a different component. + Not sure why [!FileId] does not produce an error since + the problem seems to be similar, basically the registry + key generated by the ProgId element belongs to one + component whilst we are referencing another component + containing the SharpDevelop.exe and another + containing the icon. + + http://msdn.microsoft.com/library/en-us/msi/setup/ice69.asp + + The ICE69 errors can be ignored for now since the component + being referenced by the file associations will always be installed + even though it is in a different feature. If the FileTypeRegister + addin is an optional install then the ICE69 errors would need to + be resolved. + + We are not using the ProgId element which sets up the + file association registry keys for us, but are specifying them + directly as registry keys. This allows us to use one of the keys + as a key path instead of having to use the parent component's + directory as the key path. The key path is what is used + by the installer to detect whether the component is installed. + Using the component's parent directory (i.e. the Bin folder) + is not feasible since the file associations may not be installed + if the user does not install them in the feature tree. + --> @@ -947,13 +947,13 @@ + + + + + + + --> @@ -1037,6 +1037,14 @@ + + + + + + + + @@ -1182,35 +1190,35 @@ - + + + --> + @@ -1458,80 +1466,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + --> + The choice here is to either useW the IniFile element to + generate the two website shortcuts or create a + SharpDevelop.url file on disk and use a File element and + link to the file instead. We will use a file otherwise an + upgrade will not remove the existing website shortcut. + --> + ICE18 - Force the empty folder to be created. Even though it + has sub folders the validator flags this as an error. + + http://msdn.microsoft.com/library/en-us/msi/setup/ice18.asp + --> + App Path registry setting lives in HKLM so only add it if the + user has admin rights. + --> Privileged + Dummy components that are empty. These are used so + the feature tree does not show the Network installation + as an option. + --> + Fix ICE18 error. The validator thinks that the install folder + could be empty so we have to use CreateFolder in this component. + + http://msdn.microsoft.com/library/en-us/msi/setup/ice18.asp + --> + Fix ICE18 error. The validator thinks that the install folder + could be empty so we have to use CreateFolder in this component. + + http://msdn.microsoft.com/library/en-us/msi/setup/ice18.asp + --> @@ -1541,9 +1549,9 @@ + Fix ICE 38 by adding a dummy registry key that is the key for this shortcut. + http://msdn.microsoft.com/library/en-us/msi/setup/ice38.asp + --> @@ -1552,9 +1560,9 @@ + Fix ICE 38 by adding a dummy registry key that is the key for this shortcut. + http://msdn.microsoft.com/library/en-us/msi/setup/ice38.asp + --> diff --git a/src/Setup/Setup.wxs b/src/Setup/Setup.wxs index e1091fbe15..964bb2d1e0 100644 --- a/src/Setup/Setup.wxs +++ b/src/Setup/Setup.wxs @@ -376,9 +376,9 @@ - - - + + + @@ -398,6 +398,8 @@ + + From eeb136c17e81be5e5134c3aee680db31b2078627 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sat, 29 May 2010 18:27:58 +0000 Subject: [PATCH 29/79] Fixed null reference when compiling IronPython projects or projects that explicitly do not reference mscorlib. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5862 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/CopyLocalWorkaround.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Libraries/ICSharpCode.Build.Tasks/Project/CopyLocalWorkaround.cs b/src/Libraries/ICSharpCode.Build.Tasks/Project/CopyLocalWorkaround.cs index 06d421de2b..fd8519d72b 100644 --- a/src/Libraries/ICSharpCode.Build.Tasks/Project/CopyLocalWorkaround.cs +++ b/src/Libraries/ICSharpCode.Build.Tasks/Project/CopyLocalWorkaround.cs @@ -23,7 +23,6 @@ namespace ICSharpCode.Build.Tasks [Output] public ITaskItem[] OutputAssemblies { get; set; } - public ITaskItem[] AssemblyFiles { get; set; } [Output] @@ -52,11 +51,13 @@ namespace ICSharpCode.Build.Tasks // mark mscorlib as copy local=false List outputAssemblyFiles = new List(); - foreach (ITaskItem item in this.AssemblyFiles) { - if (string.IsNullOrEmpty(item.GetMetadata("Private"))) { - if (item.ItemSpec.EndsWith("\\mscorlib.dll", StringComparison.OrdinalIgnoreCase)) { - item.SetMetadata("Private", "False"); - outputAssemblyFiles.Add(item); + if (this.AssemblyFiles != null) { + foreach (ITaskItem item in this.AssemblyFiles) { + if (string.IsNullOrEmpty(item.GetMetadata("Private"))) { + if (item.ItemSpec.EndsWith("\\mscorlib.dll", StringComparison.OrdinalIgnoreCase)) { + item.SetMetadata("Private", "False"); + outputAssemblyFiles.Add(item); + } } } } From 6261fba028928617d5819bac5639ca36acefd788 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Sun, 30 May 2010 15:32:17 +0000 Subject: [PATCH 30/79] Update setup solution and project to use MSBuild 4.0 so it can be built inside SharpDevelop 4.0. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5865 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/Setup/SharpDevelop.Setup.sln | 6 ++++-- src/Setup/SharpDevelop.Setup.wixproj | 4 +++- src/Setup/SharpDevelop.Setup.wixproj.user | 4 ++-- src/Setup/SharpDevelop.Setup.wixproj.user.template | 2 +- src/Setup/buildSetup.bat | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/Setup/SharpDevelop.Setup.sln b/src/Setup/SharpDevelop.Setup.sln index 720faf1dc7..bad5c47864 100644 --- a/src/Setup/SharpDevelop.Setup.sln +++ b/src/Setup/SharpDevelop.Setup.sln @@ -1,5 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# SharpDevelop 2.1.0.1668 + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.0.0.5860 Project("{CFEE4113-1246-4D54-95CB-156813CB8593}") = "SharpDevelop.Setup", "SharpDevelop.Setup.wixproj", "{FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}" EndProject Global diff --git a/src/Setup/SharpDevelop.Setup.wixproj b/src/Setup/SharpDevelop.Setup.wixproj index 169d714d37..e4859d7d57 100644 --- a/src/Setup/SharpDevelop.Setup.wixproj +++ b/src/Setup/SharpDevelop.Setup.wixproj @@ -1,4 +1,5 @@ - + + Package $(SharpDevelopBinPath)\Tools\Wix @@ -13,6 +14,7 @@ False ICE45;ICE69 WixUIDialogBmp=Bitmaps\dlgbmp.bmp;WixUILicenseRtf=License.rtf + v4.0 obj\ diff --git a/src/Setup/SharpDevelop.Setup.wixproj.user b/src/Setup/SharpDevelop.Setup.wixproj.user index 1a3a2553bb..cef0184e86 100644 --- a/src/Setup/SharpDevelop.Setup.wixproj.user +++ b/src/Setup/SharpDevelop.Setup.wixproj.user @@ -1,6 +1,6 @@ - + - 4289 + 1 PRODUCTBUILDVERSION=$(SetupProductBuildVersion) \ No newline at end of file diff --git a/src/Setup/SharpDevelop.Setup.wixproj.user.template b/src/Setup/SharpDevelop.Setup.wixproj.user.template index 1fcf036d2f..16d4aba082 100644 --- a/src/Setup/SharpDevelop.Setup.wixproj.user.template +++ b/src/Setup/SharpDevelop.Setup.wixproj.user.template @@ -1,4 +1,4 @@ - + $INSERTPRODUCTBUILDVERSION$ PRODUCTBUILDVERSION=$(SetupProductBuildVersion) diff --git a/src/Setup/buildSetup.bat b/src/Setup/buildSetup.bat index d057bcd6bc..12bccf1461 100755 --- a/src/Setup/buildSetup.bat +++ b/src/Setup/buildSetup.bat @@ -1,4 +1,4 @@ del "bin\SharpDevelop.msi" "..\Tools\UpdateSetupInfo\bin\UpdateSetupInfo.exe" -%windir%\microsoft.net\framework\v2.0.50727\msbuild SharpDevelop.Setup.sln "/p:SharpDevelopBinPath=%CD%\..\..\bin" +%windir%\microsoft.net\framework\v4.0.30319\msbuild SharpDevelop.Setup.sln "/p:SharpDevelopBinPath=%CD%\..\..\bin" @IF %ERRORLEVEL% NEQ 0 PAUSE \ No newline at end of file From 837f5a277019cb81bd34986fb6354f348d63eaf8 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Sun, 30 May 2010 15:53:12 +0000 Subject: [PATCH 31/79] simple Search pad for the Help system included git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5866 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/HelpViewer/HelpViewer.addin | 11 +++++ src/AddIns/Misc/HelpViewer/HelpViewer.csproj | 5 +++ src/AddIns/Misc/HelpViewer/Source/Commands.cs | 11 ++++- .../Misc/HelpViewer/Source/Controls/Pads.cs | 14 +++++++ .../Source/Controls/SearchPadControl.xaml | 10 +++++ .../Source/Controls/SearchPadControl.xaml.cs | 42 +++++++++++++++++++ 6 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/SearchPadControl.xaml create mode 100644 src/AddIns/Misc/HelpViewer/Source/Controls/SearchPadControl.xaml.cs diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.addin b/src/AddIns/Misc/HelpViewer/HelpViewer.addin index 615c1b1be4..42010555e6 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.addin +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.addin @@ -31,6 +31,12 @@ icon = "HtmlHelp2.16x16.Toc" class = "MSHelpSystem.Controls.Help3TocPad" defaultPosition = "Right, Hidden" /> + @@ -39,5 +45,10 @@ label = "${res:AddIns.HelpViewer.DisplayContentsCommand}" shortcut = "Control|Alt|F1" insertbefore = "Separator1" /> + diff --git a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj index 9695dbb948..05a8da4af0 100644 --- a/src/AddIns/Misc/HelpViewer/HelpViewer.csproj +++ b/src/AddIns/Misc/HelpViewer/HelpViewer.csproj @@ -66,6 +66,10 @@ + + SearchPadControl.xaml + Code + TocPadControl.xaml @@ -95,6 +99,7 @@ + diff --git a/src/AddIns/Misc/HelpViewer/Source/Commands.cs b/src/AddIns/Misc/HelpViewer/Source/Commands.cs index 6784314de0..9b46df5fbb 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Commands.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Commands.cs @@ -48,5 +48,14 @@ namespace MSHelpSystem.Commands if (toc != null) toc.BringPadToFront(); } } - } + } + + public class DisplaySearch : AbstractMenuCommand + { + public override void Run() + { + PadDescriptor search = WorkbenchSingleton.Workbench.GetPad(typeof(Help3SearchPad)); + if (search != null) search.BringPadToFront(); + } + } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs b/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs index 3e87a3b2d1..649e94d7df 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/Pads.cs @@ -17,4 +17,18 @@ namespace MSHelpSystem.Controls get { return toc; } } } + + public class Help3SearchPad : AbstractPadContent + { + public Help3SearchPad() + { + } + + SearchPadControl search = new SearchPadControl(); + + public override object Control + { + get { return search; } + } + } } diff --git a/src/AddIns/Misc/HelpViewer/Source/Controls/SearchPadControl.xaml b/src/AddIns/Misc/HelpViewer/Source/Controls/SearchPadControl.xaml new file mode 100644 index 0000000000..43e507d862 --- /dev/null +++ b/src/AddIns/Misc/HelpViewer/Source/Controls/SearchPadControl.xaml @@ -0,0 +1,10 @@ + + + + + - /// for example: "aero.normalcolor" (default style) - public static void ChangeTheme(string theme) - { - ResourceDictionary rd = new ResourceDictionary(); - rd.Source = new Uri("/AvalonDock;component/themes/" + theme + ".xaml", UriKind.RelativeOrAbsolute); - - // first search and remove old one - ResetColors(); - - Application.Current.Resources.MergedDictionaries.Add(rd); - } - - /// - /// Change the colors based on the aero-theme from AvalonDock. - /// - /// Example: ChangeColors(Colors.DarkGreen) - /// - /// - /// the new Color - public static void ChangeColors(Color color) - { - ChangeColors("aero.normalcolor", color); - } - - /// - /// Change the colors based on a theme-name from AvalonDock. - /// - /// Example: ChangeColors("classic", Colors.DarkGreen) - /// - /// - /// the string of the base theme we want to change - /// the new Color - public static void ChangeColors(string baseTheme, Color color) - { - ResourceDictionary rd = new ResourceDictionary(); - rd.Source = new Uri("/AvalonDock;component/themes/" + baseTheme + ".xaml", UriKind.RelativeOrAbsolute); - - ChangeKeysInResourceDictionary(rd, color); - foreach (ResourceDictionary rd2 in rd.MergedDictionaries) - { - ChangeKeysInResourceDictionary(rd2, color); - } - - //ResourceDictionary parent = Application.Current.Resources; - // first search and remove old one - //foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries) - //{ - // string source = res.Source.ToString(); - // if (source.Contains("/AvalonDock;component/themes/")) - // { - // Application.Current.Resources.MergedDictionaries.Remove(res); - // break; - // } - //} - ResetColors(); - - Application.Current.Resources.MergedDictionaries.Add(rd); - } - - /// - /// Reset custom colors to theme defaults - /// - public static void ResetColors() - { -//- foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries) - ResourceDictionary res = GetActualResourceDictionary(); - if (res != null) - Application.Current.Resources.MergedDictionaries.Remove(res); - } - - /// - /// Change a specified brush inside the actual theme. - /// Look at AvalonDockBrushes.cs for possible values. - /// - /// an AvalonDockBrushes value - /// The new brush. It can be every brush type that is derived from Brush-class. - public static void ChangeBrush(AvalonDockBrushes brushName, Brush brush) - { - ChangeBrush(brushName.ToString(), brush); - } - - /// - /// Change a specified brush inside the actual theme. - /// - /// a brush name - /// The new brush. It can be every brush type that is derived from Brush-class. - public static void ChangeBrush(string brushName, Brush brush) - { - // get the actual ResourceDictionary - ResourceDictionary rd = GetActualResourceDictionary(); - if (rd == null) - { -//- string source = res.Source.ToString(); -//- if (source.Contains("/AvalonDock;component/themes/")) - ChangeTheme("aero.normalcolor"); - rd = GetActualResourceDictionary(); - } - - if (rd != null) - { - foreach (ResourceDictionary rd2 in rd.MergedDictionaries) - { -//- Application.Current.Resources.MergedDictionaries.Remove(res); -//- break; - foreach (object key in rd2.Keys) - { - object item = rd2[key]; - string keyTypeName = key.GetType().Name; - - string str = ""; - switch (keyTypeName) - { - case "ComponentResourceKey": - str = ((ComponentResourceKey)key).ResourceId.ToString(); - break; - case "String": - str = (string)key; - break; - } - if (str == brushName) - { - rd[key] = brush; - return; - } - } - } - } - } - - - // { - // string source = res.Source.ToString(); - // if (source.Contains("/AvalonDock;component/themes/")) - // { - // Application.Current.Resources.MergedDictionaries.Remove(res); - // break; - // } - // } - //} - - - /// - /// Searches for keys in the ResourceDictionary for brushes and changes the color-values - /// - /// the ResourceDictionary - /// the new Color - static void ChangeKeysInResourceDictionary(ResourceDictionary rd, Color color) - { - foreach (object key in rd.Keys) - { - object item = rd[key]; - - if (item is SolidColorBrush) - { - SolidColorBrush sb = item as SolidColorBrush; - sb.Color = GetColor(sb.Color, color); - } - else if (item is LinearGradientBrush) - { - LinearGradientBrush lg = item as LinearGradientBrush; - foreach (GradientStop gs in lg.GradientStops) - { - gs.Color = GetColor(gs.Color, color); - } - } - else if (item is RadialGradientBrush) - { - RadialGradientBrush rb = item as RadialGradientBrush; - foreach (GradientStop gs in rb.GradientStops) - { - gs.Color = GetColor(gs.Color, color); - } - } - } - } - - static ResourceDictionary GetActualResourceDictionary() - { - // get the actual ResourceDictionary - foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries) - { - if (res.Source != null) - { - string source = res.Source.ToString(); - if (source.Contains("/AvalonDock;component/themes/")) - { - return res; - } - } - } - return null; - } - - static Color GetColor(Color c, Color newCol) - { - if (c.A == 0) return c; - - // get brightness for RGB values - byte brighness = (byte)(c.R * 0.2126 + c.G * 0.7152 + c.B * 0.0722); - - return Color.FromArgb(c.A, - GetSmoothColor(brighness, newCol.R), - GetSmoothColor(brighness, newCol.G), - GetSmoothColor(brighness, newCol.B)); - } - - static byte GetSmoothColor(int a, int b) - { - int c = a * b / 255; - return (byte)(c + a * (255 - ((255 - a) * (255 - b) / 255) - c) / 255); - } - - static Color GetSmoothColor(Color c, Color light) - { - return Color.FromArgb(c.A, GetSmoothColor(c.R, light.R), GetSmoothColor(c.G, light.G), GetSmoothColor(c.B, light.B)); - } - } -} diff --git a/src/Libraries/AvalonDock/ContextMenuElement.cs b/src/Libraries/AvalonDock/ContextMenuElement.cs deleted file mode 100644 index 8644d57305..0000000000 --- a/src/Libraries/AvalonDock/ContextMenuElement.cs +++ /dev/null @@ -1,53 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace AvalonDock -{ - /// - /// Defines a list of context menu resources - /// - public enum ContextMenuElement - { - /// - /// Context menu related to a - /// - DockablePane, - - /// - /// Context menu related to a - /// - DocumentPane, - - /// - /// Context menu related to a - /// - FloatingWindow, - - } -} diff --git a/src/Libraries/AvalonDock/Converters.cs b/src/Libraries/AvalonDock/Converters.cs deleted file mode 100644 index 8f9e498234..0000000000 --- a/src/Libraries/AvalonDock/Converters.cs +++ /dev/null @@ -1,99 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Data; -using System.IO; -using System.Reflection; -using System.Windows.Media; -using System.Windows; - -namespace AvalonDock -{ - public class FindResourcePathConverter : IValueConverter - { - - #region IValueConverter Members - - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - if (value == null) - { - return null; - //return new Uri(@"DocumentHS.png", UriKind.Relative); - } - - return value; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotImplementedException(); - } - - #endregion - } - - /// - /// Converter from boolean values to visibility (inverse mode) - /// - [ValueConversion(typeof(object), typeof(Visibility))] - public class BoolToVisibilityConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, - System.Globalization.CultureInfo culture) - { - return System.Convert.ToBoolean(value) ? Visibility.Visible : - (parameter != null && ((string)parameter) == "Hidden" ? Visibility.Hidden : Visibility.Collapsed); - } - - public object ConvertBack(object value, Type targetType, object parameter, - System.Globalization.CultureInfo culture) - { - return null; - } - } - - - public static class Converters - { - static BoolToVisibilityConverter _BoolToVisibilityConverter = null; - - public static BoolToVisibilityConverter BoolToVisibilityConverter - { - get - { - if (_BoolToVisibilityConverter == null) - _BoolToVisibilityConverter = new BoolToVisibilityConverter(); - - - return _BoolToVisibilityConverter; - } - } - - } -} diff --git a/src/Libraries/AvalonDock/DeserializationCallbackEventArgs.cs b/src/Libraries/AvalonDock/DeserializationCallbackEventArgs.cs deleted file mode 100644 index cc8acf2248..0000000000 --- a/src/Libraries/AvalonDock/DeserializationCallbackEventArgs.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AvalonDock -{ - public class DeserializationCallbackEventArgs : EventArgs - { - public DeserializationCallbackEventArgs(string contentName) - { - Name = contentName; - } - - /// - /// Gets the name of the content to deserialize - /// - public string Name { get; protected set; } - - /// - /// Gets/Sets the content manually deserialized - /// - public DockableContent Content { get; set; } - } -} diff --git a/src/Libraries/AvalonDock/DockableContent.cs b/src/Libraries/AvalonDock/DockableContent.cs deleted file mode 100644 index ee17967fc6..0000000000 --- a/src/Libraries/AvalonDock/DockableContent.cs +++ /dev/null @@ -1,581 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; -using System.Xml; - -namespace AvalonDock -{ - /// - /// Enumerates all the possible states of - /// - public enum DockableContentState - { - /// - /// Content is docked to a border of a within as control - /// - Docked, - - /// - /// Content is hosted by a flyout window and is visible only when user move mouse over an anchor thumb located to a controlo border - /// - AutoHide, - - /// - /// Content is hosted by a floating window and user can redock is on its container control - /// - DockableWindow, - - /// - /// Content is hosted by a floating window that can't be docked to a its container control - /// - FloatingWindow, - - /// - /// Content is hosted into a - /// - Document, - - /// - /// Content is hidden - /// - Hidden, - } - - - /// - /// Defines how a dockable content can be dragged over a docking manager - /// - /// This style can be composed with the 'or' operator. - public enum DockableStyle : uint - { - /// - /// Content is not dockable at all - /// - None = 0x0000, - - /// - /// Dockable as document - /// - Document = 0x0001, - - /// - /// Dockable to the left border of - /// - LeftBorder = 0x0002, - - /// - /// Dockable to the right border of - /// - RightBorder = 0x0004, - - /// - /// Dockable to the top border of - /// - TopBorder = 0x0008, - - /// - /// Dockable to the bottom border of - /// - BottomBorder= 0x0010, - - /// - /// A with this style can be hosted in a - /// - Floating = 0x0020, - - /// - /// A with this style can be the only one content in a pane (NOT YET SUPPORTED) - /// - /// This style is not compatible with style - Single = 0x0040, - - /// - /// A with this style can be autohidden. - /// - AutoHide = 0x0080, - - /// - /// Dockable only to a border of a - /// - DockableToBorders = LeftBorder | RightBorder | TopBorder | BottomBorder | AutoHide, - - /// - /// Dockable to a border of a and into a - /// - Dockable = DockableToBorders | Document | Floating, - - /// - /// Dockable to a border of a and into a but not in autohidden mode (WinForms controls) - /// - DockableButNotAutoHidden = Dockable & ~AutoHide - } - - - /// - /// Represent a state of a dockable content that can be used to restore it after it's hidden - /// - internal class DockableContentStateAndPosition - { - public readonly Pane ContainerPane = null; - public readonly int ChildIndex = -1; - public readonly double Width; - public readonly double Height; - public readonly DockableContentState State; - public readonly AnchorStyle Anchor = AnchorStyle.None; - - public DockableContentStateAndPosition( - Pane containerPane, - int childIndex, - double width, - double height, - AnchorStyle anchor, - DockableContentState state) - { - ContainerPane = containerPane; - ChildIndex = childIndex; - Width = Math.Max(width, 100.0); - Height = Math.Max(height, 100.0); - Anchor = anchor; - State = state; - } - - public DockableContentStateAndPosition( - DockableContent cntToSave) - { - ContainerPane = cntToSave.ContainerPane; - ChildIndex = ContainerPane.Items.IndexOf(cntToSave); - Width = Math.Max(ContainerPane.ActualWidth, 100.0); - Height = Math.Max(ContainerPane.ActualHeight, 100.0); - State = cntToSave.State; - - DockablePane dockablePane = ContainerPane as DockablePane; - if (dockablePane != null) - { - Anchor = dockablePane.Anchor; - } - } - } - - /// - /// Identifies a content that can be drag over a control or hosted by a window floating over it (). - /// - public class DockableContent : ManagedContent - { - static DockableContent() - { - //DefaultStyleKeyProperty.OverrideMetadata(typeof(DockableContent), new FrameworkPropertyMetadata(typeof(DockableContent))); - } - - public DockableContent() - { - } - - #region Drag content - protected override void OnDragMouseMove(object sender, MouseEventArgs e) - { - base.OnDragMouseMove(sender, e); - } - - protected override void OnDragStart(Point ptMouse, Point ptRelativeMouse) - { - if (DockableStyle != DockableStyle.None && - State != DockableContentState.AutoHide) - { - Manager.Drag(this, HelperFunc.PointToScreenWithoutFlowDirection(this, ptMouse), ptRelativeMouse); - } - - base.OnDragStart(ptMouse, ptRelativeMouse); - } - - #endregion - - #region State Properties & Events - - public delegate void DockableContentStateHandler(object sender, DockableContentState state); - public event DockableContentStateHandler StateChanged; - - public DockableContentState State - { - get { return (DockableContentState)GetValue(StatePropertyKey.DependencyProperty); } - //protected set { SetValue(StatePropertyKey, value); } - protected set - { - SetValue(StatePropertyKey, value); - if (StateChanged != null) - StateChanged(this, value); - } - } - - // Using a DependencyProperty as the backing store for State. This enables animation, styling, binding, etc... - public static readonly DependencyPropertyKey StatePropertyKey = - DependencyProperty.RegisterReadOnly("State", typeof(DockableContentState), typeof(DockableContent), new UIPropertyMetadata(DockableContentState.Docked)); - - DockableStyle _dockableStyle = DockableStyle.Dockable; - - /// - /// Get or sets a value that indicates how a dockable content can be dragged over and docked to a - /// - public DockableStyle DockableStyle - { - get { return _dockableStyle; } - set { _dockableStyle = value; } - } - - - - #endregion - - #region StateMachine - - internal void SetStateToAutoHide() - { - State = DockableContentState.AutoHide; - } - - internal void SetStateToDock() - { - State = DockableContentState.Docked; - } - - internal void SetStateToDockableWindow() - { - if (State == DockableContentState.DockableWindow) - return; - - Debug.Assert( - State == DockableContentState.Document || - State == DockableContentState.Docked || - State == DockableContentState.FloatingWindow); - - State = DockableContentState.DockableWindow; - } - - internal void SetStateToFloatingWindow() - { - if (State == DockableContentState.FloatingWindow) - return; - - Debug.Assert( - State == DockableContentState.Document || - State == DockableContentState.Docked || - State == DockableContentState.DockableWindow); - - State = DockableContentState.FloatingWindow; - } - - internal void SetStateToHidden() - { - State = DockableContentState.Hidden; - } - - internal void SetStateToDocument() - { - State = DockableContentState.Document; - } - #endregion - - #region HideOnClose - public static DependencyProperty HideOnCloseKey = DependencyProperty.Register("HideOnClose", typeof(bool), typeof(DockableContent), new PropertyMetadata(true)); - - public bool HideOnClose - { - get { return (bool)GetValue(HideOnCloseKey); } - set { SetValue(HideOnCloseKey, value); } - } - #endregion - - - - - - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - this.CommandBindings.Add( - new CommandBinding(FloatingCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(DockableCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(ShowAsDocumentCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(DockablePane.ToggleAutoHideCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(HideCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - } - - #region Commands - - static object syncRoot = new object(); - - - private static RoutedUICommand documentCommand = null; - public static RoutedUICommand ShowAsDocumentCommand - { - get - { - lock (syncRoot) - { - if (null == documentCommand) - { - documentCommand = new RoutedUICommand("Tabbed Document", "Document", typeof(DockableContent)); - } - } - return documentCommand; - } - } - - private static RoutedUICommand dockableCommand = null; - public static RoutedUICommand DockableCommand - { - get - { - lock (syncRoot) - { - if (null == dockableCommand) - { - dockableCommand = new RoutedUICommand("Dockable", "Dockable", typeof(DockablePane)); - } - } - return dockableCommand; - } - } - - private static RoutedUICommand floatingCommand = null; - public static RoutedUICommand FloatingCommand - { - get - { - lock (syncRoot) - { - if (null == floatingCommand) - { - floatingCommand = new RoutedUICommand("F_loating", "Floating", typeof(DockableContent)); - } - } - return floatingCommand; - } - } - - private static RoutedUICommand hideCommand = null; - public static RoutedUICommand HideCommand - { - get - { - lock (syncRoot) - { - if (null == hideCommand) - { - hideCommand = new RoutedUICommand("H_ide", "Hide", typeof(DockableContent)); - } - } - return hideCommand; - } - } - - internal virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (!e.Handled && - e.Command == DockablePane.ToggleAutoHideCommand) - { - if ((DockableStyle & DockableStyle.AutoHide) > 0) - { - ((ContainerPane as DockablePane)).ToggleAutoHide(); - e.Handled = true; - } - } - else if (!e.Handled && e.Command == DockableContent.HideCommand) - { - Manager.Hide(this); - - e.Handled = true; - } - else if (!e.Handled && e.Command == DockableContent.FloatingCommand) - { - Manager.Show(this, DockableContentState.FloatingWindow); - e.Handled = true; - } - else if (!e.Handled && e.Command == DockableContent.DockableCommand) - { - Manager.Show(this, DockableContentState.DockableWindow); - e.Handled = true; - } - else if (!e.Handled && e.Command == DockableContent.ShowAsDocumentCommand) - { - Manager.Show(this, DockableContentState.Document); - e.Handled = true; - } - - } - - protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) - { - if (State == DockableContentState.AutoHide) - { - if (e.Command == DockablePane.ToggleAutoHideCommand || - e.Command == DockablePane.CloseCommand || - e.Command == DockableContent.HideCommand) - e.CanExecute = true; - else - e.CanExecute = false; - } - else - e.CanExecute = true; - } - - #endregion - - #region Operations on content - - - /// - /// Remove this content from its parent container pane - /// - /// - internal DockableContent DetachFromContainerPane() - { - if (ContainerPane != null) - { - int indexOfContent = ContainerPane.Items.IndexOf(this); - return ContainerPane.RemoveContent(indexOfContent) as DockableContent; - } - - return null; - } - - DockableContentStateAndPosition _savedStateAndPosition = null; - - internal DockableContentStateAndPosition SavedStateAndPosition - { - get { return _savedStateAndPosition; } - } - - internal void SaveCurrentStateAndPosition() - { - //if (State == DockableContentState.Docked) - //{ - _savedStateAndPosition = new DockableContentStateAndPosition( - this); - //} - //else - //{ - // _savedStateAndPosition = null; - //} - } - - /// - /// Reset internal state and position of the content - /// - /// After a is hidden AvalonDock save its state and position in order to - /// restore it correctly when user wants to reshow it calling function. Call this method - /// if you want to reset these data and provide your state and anchor style calling one of the overloads of the function - /// . - public void ResetSavedStateAndPosition() - { - _savedStateAndPosition = null; - } - - #endregion - - #region Save/Restore Content Layout - /// - /// Save content specific layout settings - /// - /// Backend store writer - /// Custom derived class can overloads this method to handle custom layout persistence. - public virtual void SaveLayout(XmlWriter storeWriter) - { - if (!FloatingWindowSize.IsEmpty) - { - storeWriter.WriteAttributeString( - "FloatingWindowSize", new SizeConverter().ConvertToInvariantString(FloatingWindowSize)); - } - - if (SavedStateAndPosition != null) - { - storeWriter.WriteAttributeString( - "ChildIndex", SavedStateAndPosition.ChildIndex.ToString()); - storeWriter.WriteAttributeString( - "Width", SavedStateAndPosition.Width.ToString()); - storeWriter.WriteAttributeString( - "Height", SavedStateAndPosition.Height.ToString()); - storeWriter.WriteAttributeString( - "Anchor", SavedStateAndPosition.Anchor.ToString()); - storeWriter.WriteAttributeString( - "State", SavedStateAndPosition.State.ToString()); - } - - } - - /// - /// Restore content specific layout settings - /// - /// Saved xml element containg content layout settings - /// Custom derived class must overload this method to restore custom layout settings previously saved trought . - public virtual void RestoreLayout(XmlElement contentElement) - { - if (contentElement.HasAttribute("FloatingWindowSize")) - FloatingWindowSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("FloatingWindowSize")); - - - Size effectiveSize = new Size(0d, 0d); - if (contentElement.HasAttribute("EffectiveSize")) - { - // Store - effectiveSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("EffectiveSize")); - } - - ResizingPanel.SetEffectiveSize(this, effectiveSize); - - if (contentElement.HasAttribute("ChildIndex")) - { - _savedStateAndPosition = new DockableContentStateAndPosition( - ContainerPane, - int.Parse(contentElement.GetAttribute("ChildIndex")), - double.Parse(contentElement.GetAttribute("Width")), - double.Parse(contentElement.GetAttribute("Height")), - (AnchorStyle) Enum.Parse(typeof(AnchorStyle), contentElement.GetAttribute("Anchor")), - (DockableContentState) Enum.Parse(typeof(DockableContentState), contentElement.GetAttribute("State")) - ); - //contentElement.HasAttribute("State") ? (DockableContentState)Enum.Parse(typeof(DockableContentState), contentElement.GetAttribute("State") ); - } - } - #endregion - } -} diff --git a/src/Libraries/AvalonDock/DockableFloatingWindow.cs b/src/Libraries/AvalonDock/DockableFloatingWindow.cs deleted file mode 100644 index dc6663b3bd..0000000000 --- a/src/Libraries/AvalonDock/DockableFloatingWindow.cs +++ /dev/null @@ -1,279 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Windows.Markup; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Interop; - -namespace AvalonDock -{ - public class DockableFloatingWindow : FloatingWindow - { - static DockableFloatingWindow() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DockableFloatingWindow), new FrameworkPropertyMetadata(typeof(DockableFloatingWindow))); - } - - - public DockableFloatingWindow(DockingManager manager) - : base(manager) - { - } - - - Pane _previousPane = null; - - int _arrayIndexPreviousPane = -1; - - - public DockableFloatingWindow(DockingManager manager, DockableContent content) - : this(manager) - { - - //create a new temporary pane - FloatingDockablePane pane = new FloatingDockablePane(this); - - //setup window size - //Width = content.ContainerPane.ActualWidth; - //Height = content.ContainerPane.ActualHeight; - - if (content.FloatingWindowSize.IsEmpty) - content.FloatingWindowSize = new Size(content.ContainerPane.ActualWidth, content.ContainerPane.ActualHeight); - - Width = content.FloatingWindowSize.Width; - Height = content.FloatingWindowSize.Height; - - //save current content position in container pane - _previousPane = content.ContainerPane; - _arrayIndexPreviousPane = _previousPane.Items.IndexOf(content); - - pane.Style = content.ContainerPane.Style; - - //remove content from container pane - content.ContainerPane.RemoveContent(_arrayIndexPreviousPane); - - //add content to my temporary pane - pane.Items.Add(content); - - //let templates access this pane - HostedPane = pane; - - //Change state on contents - IsDockableWindow = true; - - DocumentPane originalDocumentPane = _previousPane as DocumentPane; - if (originalDocumentPane != null) - originalDocumentPane.CheckContentsEmpty(); - } - - public DockableFloatingWindow(DockingManager manager, DockablePane dockablePane) - : this(manager) - { - //create a new temporary pane - FloatingDockablePane pane = new FloatingDockablePane(this); - - //setup window size - ManagedContent selectedContent = dockablePane.SelectedItem as ManagedContent; - - if (selectedContent != null && selectedContent.FloatingWindowSize.IsEmpty) - selectedContent.FloatingWindowSize = new Size(dockablePane.ActualWidth, dockablePane.ActualHeight); - - if (selectedContent != null) - { - Width = selectedContent.FloatingWindowSize.Width; - Height = selectedContent.FloatingWindowSize.Height; - this.ResizeMode = selectedContent.FloatingResizeMode; - } - else - { - Width = dockablePane.ActualWidth; - Height = dockablePane.ActualHeight; - } - - //transfer the style from the original dockablepane - pane.Style = dockablePane.Style; - - //Width = dockablePane.ActualWidth; - //Height = dockablePane.ActualHeight; - - ////save current content position in container pane - //pane.SetValue(ResizingPanel.ResizeWidthProperty, dockablePane.GetValue(ResizingPanel.ResizeWidthProperty)); - //pane.SetValue(ResizingPanel.ResizeHeightProperty, dockablePane.GetValue(ResizingPanel.ResizeHeightProperty)); - - int selectedIndex = dockablePane.SelectedIndex; - - //remove contents from container pane and insert in hosted pane - while (dockablePane.Items.Count > 0) - { - ManagedContent content = dockablePane.RemoveContent(0); - - //add content to my temporary pane - pane.Items.Add(content); - } - - //let templates access this pane - HostedPane = pane; - HostedPane.SelectedIndex = selectedIndex; - - //Change state on contents - IsDockableWindow = true; - } - - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - if (HostedPane == null) - HostedPane = Content as FloatingDockablePane; - - if (HostedPane != null) - { - Content = HostedPane; - } - } - - - - protected override void OnClosed(EventArgs e) - { - base.OnClosed(e); - - DockableContent[] cntsToClose = new DockableContent[HostedPane.Items.Count]; - HostedPane.Items.CopyTo(cntsToClose, 0); - - foreach (DockableContent cntToClose in cntsToClose) - { - HostedPane.CloseOrHide(HostedPane.Items[0] as DockableContent, ForcedClosing); - } - - Manager.UnregisterFloatingWindow(this); - } - - public override Pane ClonePane() - { - DockablePane paneToAnchor = new DockablePane(); - - ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height)); - - if (HostedPane.Style != null) - paneToAnchor.Style = HostedPane.Style; - - int selectedIndex = HostedPane.SelectedIndex; - - //transfer contents from hosted pane in the floating window and - //the new created dockable pane - while (HostedPane.Items.Count > 0) - { - paneToAnchor.Items.Add( - HostedPane.RemoveContent(0)); - } - - paneToAnchor.SelectedIndex = selectedIndex; - - return paneToAnchor; - } - - protected override void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == TabbedDocumentCommand) - { - DockableContent currentContent = HostedPane.SelectedItem as DockableContent; - - Manager.MainDocumentPane.Items.Insert(0, HostedPane.RemoveContent(HostedPane.SelectedIndex)); - Manager.MainDocumentPane.SelectedIndex = 0; - - currentContent.SetStateToDocument(); - - if (HostedPane.Items.Count == 0) - this.Close(); - e.Handled = true; - } - else if (e.Command == CloseCommand) - { - //DockableContent currentContent = HostedPane.SelectedItem as DockableContent; - //Manager.Hide(currentContent); - HostedPane.CloseOrHide(); - if (HostedPane.Items.Count == 0) - this.Close(); - e.Handled = true; - } - - base.OnExecuteCommand(sender, e); - } - - protected override void Redock() - { - if (_previousPane != null) - { - if (_previousPane.GetManager() == null) - { - DockablePane newContainerPane = new DockablePane(); - newContainerPane.Items.Add(HostedPane.RemoveContent(0)); - newContainerPane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); - newContainerPane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); - - if (_previousPane.Style != null) - newContainerPane.Style = _previousPane.Style; - - Manager.Anchor(newContainerPane, ((DockablePane)_previousPane).Anchor); - } - else - { - if (_arrayIndexPreviousPane > _previousPane.Items.Count) - _arrayIndexPreviousPane = _previousPane.Items.Count; - - DockableContent currentContent = HostedPane.Items[0] as DockableContent; - _previousPane.Items.Insert(_arrayIndexPreviousPane, HostedPane.RemoveContent(0)); - _previousPane.SelectedIndex = _arrayIndexPreviousPane; - currentContent.SetStateToDock(); - - } - this.Close(); - } - - base.Redock(); - } - - - } -} diff --git a/src/Libraries/AvalonDock/DockablePane.cs b/src/Libraries/AvalonDock/DockablePane.cs deleted file mode 100644 index d0188c7d57..0000000000 --- a/src/Libraries/AvalonDock/DockablePane.cs +++ /dev/null @@ -1,501 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; -using System.ComponentModel; -using System.Collections; - - -namespace AvalonDock -{ - /// - /// Anchor types - /// - public enum AnchorStyle - { - /// - /// No anchor style, while content is hosted in a or a - /// - None, - /// - /// Top border anchor - /// - Top, - /// - /// Left border anchor - /// - Left, - /// - /// Bottom border anchor - /// - Bottom, - /// - /// Right border anchor - /// - Right - } - - - public class DockablePane : Pane - { - static DockablePane() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePane), new FrameworkPropertyMetadata(typeof(DockablePane))); - } - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - this.CommandBindings.Add( - new CommandBinding(ShowOptionsCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(ToggleAutoHideCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(CloseCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - } - - public DockablePane() - { - this.Loaded += new RoutedEventHandler(DockablePane_Loaded); - this.Unloaded += new RoutedEventHandler(DockablePane_Unloaded); - } - - void DockablePane_Loaded(object sender, RoutedEventArgs e) - { - - } - void DockablePane_Unloaded(object sender, RoutedEventArgs e) - { - UnloadOptionsContextMenu(); - } - - - #region Dependency properties - - public bool ShowHeader - { - get { return (bool)GetValue(ShowHeaderProperty); } - set { SetValue(ShowHeaderProperty, value); } - } - - // Using a DependencyProperty as the backing store for ActiveContent. This enables animation, styling, binding, etc... - public static readonly DependencyProperty ShowHeaderProperty = - DependencyProperty.Register("ShowHeader", typeof(bool), typeof(DockablePane), new UIPropertyMetadata(true)); - - - public bool ShowTabs - { - get { return (bool)GetValue(ShowTabsProperty); } - set { SetValue(ShowTabsProperty, value); } - } - - // Using a DependencyProperty as the backing store for ShowTabs. This enables animation, styling, binding, etc... - public static readonly DependencyProperty ShowTabsProperty = - DependencyProperty.Register("ShowTabs", typeof(bool), typeof(DockablePane), new UIPropertyMetadata(true)); - - - public AnchorStyle Anchor - { - get { return (AnchorStyle)GetValue(AnchorPropertyKey.DependencyProperty); } - internal set { SetValue(AnchorPropertyKey, value); } - } - - // Using a DependencyProperty as the backing store for Anchor. This enables animation, styling, binding, etc... - public static readonly DependencyPropertyKey AnchorPropertyKey = - DependencyProperty.RegisterAttachedReadOnly("Anchor", typeof(AnchorStyle), typeof(DockablePane), new UIPropertyMetadata(AnchorStyle.None)); - - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - if (_partHeader != null) - { - _partHeader.MouseDown += new MouseButtonEventHandler(OnHeaderMouseDown); - _partHeader.MouseMove += new MouseEventHandler(OnHeaderMouseMove); - _partHeader.MouseUp += new MouseButtonEventHandler(OnHeaderMouseUp); - _partHeader.MouseEnter += new MouseEventHandler(OnHeaderMouseEnter); - _partHeader.MouseLeave += new MouseEventHandler(OnHeaderMouseLeave); - } - - _optionsContextMenuPlacementTarget = GetTemplateChild("PART_ShowContextMenuButton") as UIElement; - } - - - - - #endregion - - - public override bool IsSurfaceVisible - { - get - { - foreach (ManagedContent managedContent in Items) - { - if (managedContent is DocumentContent) - continue; - - if (((DockableContent)managedContent).State == DockableContentState.Docked) - return true; - } - - return false; - } - } - - - #region OptionsContextMenu - ContextMenu cxOptions = null; - - UIElement _optionsContextMenuPlacementTarget = null; - - void LoadOptionsContextMenu() - { - Debug.Assert(cxOptions == null); - cxOptions = FindResource(new ComponentResourceKey(typeof(DockingManager), ContextMenuElement.DockablePane)) as ContextMenu; - cxOptions.Opened += new RoutedEventHandler(cxOptions_RefreshOpenState); - cxOptions.Closed += new RoutedEventHandler(cxOptions_RefreshOpenState); - } - - void UnloadOptionsContextMenu() - { - if (cxOptions != null) - { - cxOptions.Opened -= new RoutedEventHandler(cxOptions_RefreshOpenState); - cxOptions.Closed -= new RoutedEventHandler(cxOptions_RefreshOpenState); - cxOptions = null; - } - } - - - protected virtual void OpenOptionsContextMenu() - { - if (cxOptions == null) - { - LoadOptionsContextMenu(); - } - - if (cxOptions != null) - { - cxOptions.DataContext = this.SelectedItem as DockableContent; - - foreach (MenuItem menuItem in cxOptions.Items) - menuItem.CommandTarget = this.SelectedItem as DockableContent; - - if (_optionsContextMenuPlacementTarget != null) - { - cxOptions.Placement = PlacementMode.Bottom; - cxOptions.PlacementTarget = _optionsContextMenuPlacementTarget; - } - else - { - cxOptions.Placement = PlacementMode.MousePoint; - cxOptions.PlacementTarget = this; - } - - cxOptions.IsOpen = true; - } - } - - void cxOptions_RefreshOpenState(object sender, RoutedEventArgs e) - { - NotifyPropertyChanged("IsOptionsMenuOpened"); - } - - public bool IsOptionsMenuOpened - { - get - { - return cxOptions != null && cxOptions.IsOpen && ( - _optionsContextMenuPlacementTarget != null ? - cxOptions.PlacementTarget == _optionsContextMenuPlacementTarget : - cxOptions.PlacementTarget == this); - } - } - - #endregion - - #region Mouse management - - void FocusContent() - { - ManagedContent selectedContent = SelectedItem as ManagedContent; - if (selectedContent != null && selectedContent.Content is UIElement) - { - //UIElement internalContent = selectedContent.Content as UIElement; - //bool res = internalContent.Focus(); - selectedContent.SetAsActive(); - } - } - - Point ptStartDrag; - bool isMouseDown = false; - protected virtual void OnHeaderMouseDown(object sender, MouseButtonEventArgs e) - { - if (!e.Handled) - { - FocusContent(); - - if (((DockableContent)SelectedItem).State != DockableContentState.AutoHide) - { - ptStartDrag = e.MouseDevice.GetPosition(this); - isMouseDown = true; - } - } - } - - protected virtual void OnHeaderMouseMove(object sender, MouseEventArgs e) - { - Point ptMouseMove = e.GetPosition(this); - - if (!e.Handled && isMouseDown) - { - if (_partHeader != null && - _partHeader.IsMouseOver) - { - if (!IsMouseCaptured) - { - if (Math.Abs(ptMouseMove.X - ptStartDrag.X) > SystemParameters.MinimumHorizontalDragDistance || - Math.Abs(ptMouseMove.Y - ptStartDrag.Y) > SystemParameters.MinimumVerticalDragDistance) - { - isMouseDown = false; - ReleaseMouseCapture(); - DockingManager manager = GetManager(); - manager.Drag(this, this.PointToScreenDPI(e.GetPosition(this)), e.GetPosition(this)); - e.Handled = true; - } - } - } - } - - } - - protected virtual void OnHeaderMouseUp(object sender, MouseButtonEventArgs e) - { - isMouseDown = false; - ReleaseMouseCapture(); - } - - protected virtual void OnHeaderMouseEnter(object sender, MouseEventArgs e) - { - isMouseDown = false; - - } - protected virtual void OnHeaderMouseLeave(object sender, MouseEventArgs e) - { - isMouseDown = false; - - } - #endregion - - #region Commands - private static object syncRoot = new object(); - - - private static RoutedUICommand optionsCommand = null; - public static RoutedUICommand ShowOptionsCommand - { - get - { - lock (syncRoot) - { - if (null == optionsCommand) - { - optionsCommand = new RoutedUICommand("S_how options", "Options", typeof(DockablePane)); - } - } - return optionsCommand; - } - } - - private static RoutedUICommand autoHideCommand = null; - public static RoutedUICommand ToggleAutoHideCommand - { - get - { - lock (syncRoot) - { - if (null == autoHideCommand) - { - autoHideCommand = new RoutedUICommand("A_utohide", "AutoHide", typeof(DockablePane)); - } - } - return autoHideCommand; - } - } - - private static RoutedUICommand closeCommand = null; - public static RoutedUICommand CloseCommand - { - get - { - lock (syncRoot) - { - if (null == closeCommand) - { - closeCommand = new RoutedUICommand("C_lose", "Close", typeof(DockablePane)); - } - } - return closeCommand; - } - } - - - internal virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == ToggleAutoHideCommand) - { - ToggleAutoHide(); - e.Handled = true; - } - else if (e.Command == CloseCommand) - { - CloseOrHide(); - e.Handled = true; - } - else if (e.Command == ShowOptionsCommand) - { - OpenOptionsContextMenu(); - e.Handled = true; - } - - } - - protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) - { - e.CanExecute = true; - } - - #endregion - - - public override bool IsDocked - { - get { return IsSurfaceVisible; } - } - - - public DockableStyle GetCumulativeDockableStyle() - { - DockableStyle style = DockableStyle.Dockable; - - if (Items.Count == 1 && - Items[0] is DocumentContent) - style = DockableStyle.Document; - else - { - foreach (DockableContent content in this.Items) - { - style &= content.DockableStyle; - } - } - - return style; - } - - public override ManagedContent RemoveContent(int index) - { - ManagedContent content = base.RemoveContent(index); - - if (Items.Count == 0) - { - ResizingPanel containerPanel = Parent as ResizingPanel; - if (containerPanel != null) - containerPanel.RemoveChild(this); - } - - return content; - } - - protected virtual void CheckItems(IList newItems) - { - foreach (object newItem in newItems) - { - if (!(newItem is DockableContent)) - throw new InvalidOperationException("DockablePane can contain only DockableContents!"); - } - } - - protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) - { - if (e.NewItems != null) - CheckItems(e.NewItems); - - base.OnItemsChanged(e); - } - - - - #region Dockable Pane operations - /// - /// Show/Hide a flyout window containing this pane - /// - internal virtual void ToggleAutoHide() - { - bool flag = true; - foreach (DockableContent cnt in this.Items) - { - if ((cnt.DockableStyle & DockableStyle.AutoHide) == 0) - { - flag = false; - break; - } - } - if (flag && GetManager() != null) - GetManager().ToggleAutoHide(this); - } - - - /// - /// Closes or hides current content depending on HideOnClose property - /// - internal void CloseOrHide() - { - CloseOrHide(SelectedItem as DockableContent, false); - } - - - - - #endregion - - } -} diff --git a/src/Libraries/AvalonDock/DockablePaneAnchorTab.cs b/src/Libraries/AvalonDock/DockablePaneAnchorTab.cs deleted file mode 100644 index 50362b6a13..0000000000 --- a/src/Libraries/AvalonDock/DockablePaneAnchorTab.cs +++ /dev/null @@ -1,117 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Diagnostics; - -namespace AvalonDock -{ - [EditorBrowsable(EditorBrowsableState.Never)] - public class DockablePaneAnchorTab : System.Windows.Controls.Control, INotifyPropertyChanged - { - static DockablePaneAnchorTab() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePaneAnchorTab), new FrameworkPropertyMetadata(typeof(DockablePaneAnchorTab))); - } - - public DockableContent ReferencedContent - { - get { return (DockableContent)GetValue(ReferencedContentPropertyKey.DependencyProperty); } - set { SetValue(ReferencedContentPropertyKey, value); } - } - - // Using a DependencyProperty as the backing store for DockableContent. This enables animation, styling, binding, etc... - public static readonly DependencyPropertyKey ReferencedContentPropertyKey = - DependencyProperty.RegisterReadOnly("ReferencedContent", typeof(DockableContent), typeof(DockablePaneAnchorTab), new UIPropertyMetadata(null, new PropertyChangedCallback(OnPaneAttached))); - - - static void OnPaneAttached(DependencyObject depObj, DependencyPropertyChangedEventArgs e) - { - if (e.Property == ReferencedContentPropertyKey.DependencyProperty) - { - DockablePaneAnchorTab _this = depObj as DockablePaneAnchorTab; - if (_this.PropertyChanged != null) - { - _this.PropertyChanged(depObj, new PropertyChangedEventArgs("Anchor")); - _this.PropertyChanged(depObj, new PropertyChangedEventArgs("Icon")); - _this.PropertyChanged(depObj, new PropertyChangedEventArgs("ReferencedContent")); - } - } - - } - - public AnchorStyle Anchor - { - get { return (AnchorStyle)GetValue(AnchorPropertyKey.DependencyProperty); } - internal set { SetValue(AnchorPropertyKey, value); } - } - - // Using a DependencyProperty as the backing store for IsSelected. This enables animation, styling, binding, etc... - public static readonly DependencyPropertyKey AnchorPropertyKey = - DependencyProperty.RegisterAttachedReadOnly("Anchor", typeof(AnchorStyle), typeof(DockablePaneAnchorTab), new PropertyMetadata(AnchorStyle.Left)); - - protected override void OnMouseMove(MouseEventArgs e) - { - if (ReferencedContent != null) - ReferencedContent.Manager.ShowFlyoutWindow(ReferencedContent); - - base.OnMouseMove(e); - } - - - - public object Icon - { - get { return (object)GetValue(IconProperty); } - set { SetValue(IconProperty, value); } - } - - // Using a DependencyProperty as the backing store for Icon. This enables animation, styling, binding, etc... - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(object), typeof(DockablePaneAnchorTab)); - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - #endregion - - - } -} diff --git a/src/Libraries/AvalonDock/DockablePaneAnchorTabGroup.cs b/src/Libraries/AvalonDock/DockablePaneAnchorTabGroup.cs deleted file mode 100644 index 31bec6929b..0000000000 --- a/src/Libraries/AvalonDock/DockablePaneAnchorTabGroup.cs +++ /dev/null @@ -1,64 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace AvalonDock -{ - public class DockablePaneAnchorTabGroup : System.Windows.Controls.StackPanel - { - static DockablePaneAnchorTabGroup() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePaneAnchorTabGroup), new FrameworkPropertyMetadata(typeof(DockablePaneAnchorTabGroup))); - } - - DockablePane _pane = null; - - internal DockablePane ReferencedPane - { - get - { return _pane; } - set { _pane = value; } - } - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - base.OnVisualChildrenChanged(visualAdded, visualRemoved); - } - } -} diff --git a/src/Libraries/AvalonDock/DockableTabPanel.cs b/src/Libraries/AvalonDock/DockableTabPanel.cs deleted file mode 100644 index 5c684a74d3..0000000000 --- a/src/Libraries/AvalonDock/DockableTabPanel.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace AvalonDock -{ - public class DockableTabPanel : PaneTabPanel - { - protected override Size MeasureOverride(Size availableSize) - { - double totWidth = 0; - //double maxHeight = 0; - - if (Children.Count == 0) - return base.MeasureOverride(availableSize); - - - List childsOrderedByWidth = new List(); - - foreach (FrameworkElement child in Children) - { - child.Width = double.NaN; - child.Height = double.NaN; - - child.Measure(new Size(double.PositiveInfinity, availableSize.Height)); - totWidth += child.DesiredSize.Width; - childsOrderedByWidth.Add(child); - } - - if (totWidth > availableSize.Width) - { - childsOrderedByWidth.Sort(delegate(UIElement elem1, UIElement elem2) { return elem2.DesiredSize.Width.CompareTo(elem1.DesiredSize.Width); }); - - - int i = childsOrderedByWidth.Count - 1; - double sumWidth = 0; - - while (childsOrderedByWidth[i].DesiredSize.Width * (i + 1) + sumWidth < availableSize.Width) - { - sumWidth += childsOrderedByWidth[i].DesiredSize.Width; - - i--; - - if (i < 0) - break; - - } - - double shWidth = (availableSize.Width - sumWidth) / (i + 1); - - - foreach (UIElement child in Children) - { - if (shWidth < child.DesiredSize.Width) - child.Measure(new Size(shWidth, availableSize.Height)); - } - - } - - return base.MeasureOverride(availableSize); - } - - protected override Size ArrangeOverride(Size finalSize) - { - double offsetX = 0; - - foreach (FrameworkElement child in Children) - { - double childFinalWidth = child.DesiredSize.Width; - child.Arrange(new Rect(offsetX, 0, childFinalWidth, finalSize.Height)); - - offsetX += childFinalWidth; - } - - return base.ArrangeOverride(finalSize); - } - - } -} diff --git a/src/Libraries/AvalonDock/DockingManager.cs b/src/Libraries/AvalonDock/DockingManager.cs deleted file mode 100644 index 30e4a7807e..0000000000 --- a/src/Libraries/AvalonDock/DockingManager.cs +++ /dev/null @@ -1,3243 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; -using System.Windows.Interop; -using System.ComponentModel; -using System.IO; -using System.Xml; -using System.Linq; -using System.Collections; -using System.Collections.Specialized; -using System.Collections.ObjectModel; - -namespace AvalonDock -{ - - /// - /// Represents a control which manages a dockable layout for its children - /// - public class DockingManager : System.Windows.Controls.ContentControl, IDropSurface, INotifyPropertyChanged, IDisposable - { - static DockingManager() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DockingManager), new FrameworkPropertyMetadata(typeof(DockingManager))); - } - - - public DockingManager() - { - DragPaneServices.Register(this); - this.Unloaded += new RoutedEventHandler(DockingManager_Unloaded); - this.Loaded += new RoutedEventHandler(DockingManager_Loaded); - } - - - #region Control lifetime management - ~DockingManager() - { - Dispose(false); - } - - bool _isControlLoaded = false; - - void DockingManager_Loaded(object sender, RoutedEventArgs e) - { - foreach (FloatingWindow floatingWindow in _floatingWindows) - { - floatingWindow.Owner = Window.GetWindow(this); - - floatingWindow.Show(); - } - - DragPaneServices.Register(this); - - _isControlLoaded = true; - } - - void DockingManager_Unloaded(object sender, RoutedEventArgs e) - { - //cleanup pending resources - HideAutoHideWindow(); - - - if (_wndInteropWrapper != null) - { - _wndInteropWrapper.OnWindowPosChanging -= new EventHandler(_wndInteropWrapper_OnWindowPosChanging); - _wndInteropWrapper.Dispose(); - _wndInteropWrapper = null; - } - - if (_overlayWindow != null) - { - _overlayWindow.Close(); - _overlayWindow = null; - } - - foreach (FloatingWindow floatingWindow in _floatingWindows) - floatingWindow.Hide(); - - //navigator windows are now automatically disposed when - //no longer used. In this way we avoid WPF bug: - //http://social.msdn.microsoft.com/forums/en/wpf/thread/f3fc5b7e-e035-4821-908c-b6c07e5c7042/ - //if (navigatorWindow != null) - //{ - // navigatorWindow.Close(); - // navigatorWindow = null; - //} - - //if (documentNavigatorWindow != null) - //{ - // documentNavigatorWindow.Close(); - // documentNavigatorWindow = null; - //} - - DragPaneServices.Unregister(this); - - _isControlLoaded = false; - } - - /// - /// Call this function if you want to deallocate external floating windows, that otherwise are closed when main window is closed. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - bool _disposed = false; - protected virtual void Dispose(bool disposing) - { - if (_disposed) - return; - - if (disposing) - { - while (_floatingWindows.Count > 0) - { - _floatingWindows[0].Owner = null; - _floatingWindows[0].Close(); - } - } - - _disposed = true; - } - - #endregion - - Panel _leftAnchorTabPanel; - Panel _rightAnchorTabPanel; - Panel _topAnchorTabPanel; - Panel _bottomAnchorTabPanel; - - List _anchorTabPanels = new List(); - - bool _OnApplyTemplateFlag = false; - - - Panel ReplaceAnchorTabPanel(Panel oldPanel, Panel newPanel) - { - if (oldPanel == null) - { - _anchorTabPanels.Add(newPanel); - return newPanel; - } - else - { - _anchorTabPanels.Remove(oldPanel); - while (oldPanel.Children.Count > 0) - { - UIElement tabToTransfer = oldPanel.Children[0]; - oldPanel.Children.RemoveAt(0); - - newPanel.Children.Add(tabToTransfer); - } - _anchorTabPanels.Add(newPanel); - - return newPanel; - } - } - - /// - /// Overriden to get a reference to underlying template elements - /// - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - Panel leftPanel = GetTemplateChild("PART_LeftAnchorTabPanel") as Panel; - if (leftPanel == null) - throw new ArgumentException("PART_LeftAnchorTabPanel template child element not fount!"); - - Panel rightPanel = GetTemplateChild("PART_RightAnchorTabPanel") as Panel; - if (rightPanel == null) - throw new ArgumentException("PART_RightAnchorTabPanel template child element not fount!"); - - Panel topPanel = GetTemplateChild("PART_TopAnchorTabPanel") as Panel; - if (topPanel == null) - throw new ArgumentException("PART_TopAnchorTabPanel template child element not fount!"); - - Panel bottomPanel = GetTemplateChild("PART_BottomAnchorTabPanel") as Panel; - if (bottomPanel == null) - throw new ArgumentException("PART_BottomAnchorTabPanel template child element not fount!"); - - - _leftAnchorTabPanel = ReplaceAnchorTabPanel(_leftAnchorTabPanel, leftPanel); - _rightAnchorTabPanel = ReplaceAnchorTabPanel(_rightAnchorTabPanel, rightPanel); - _topAnchorTabPanel = ReplaceAnchorTabPanel(_topAnchorTabPanel, topPanel); - _bottomAnchorTabPanel = ReplaceAnchorTabPanel(_bottomAnchorTabPanel, bottomPanel); - - _OnApplyTemplateFlag = true; - } - - - #region Access to contents and pane - ManagedContent _activeDocument = null; - - /// - /// Get or set the active document - /// - /// The active document not neessary receive keyboard focus. To set keyboard focus on a content see - public ManagedContent ActiveDocument - { - get - { - return _activeDocument; - } - set - { - //Debug.WriteLine(string.Format("SetActiveDocument to '{0}'", value != null ? value.Name : "null")); - - if (_activeDocument != value/* && - value.ContainerPane is DocumentPane*/) - { - if (value != null && - (value.FindVisualAncestor(false) == null && - !(value is DocumentContent)) - ) - { - //value is not contained in a document pane/ documentfloatingwindow so cant be the active document! - return; - } - - - List listOfAllDocuments = FindContents(); - listOfAllDocuments.ForEach((ManagedContent cnt) => - { - cnt.IsActiveDocument = cnt == value; - }); - - _activeDocument = value; - NotifyPropertyChanged("ActiveDocument"); - - if (ActiveContent == null) - ActiveContent = value; - } - } - } - - ManagedContent _activeContent = null; - - /// - /// Get or set the active content - /// - /// An activated content is automatically selected in its container pane and receive logical as well keyboard focus. - public ManagedContent ActiveContent - { - get - { - return _activeContent; - } - internal set - { - //Debug.WriteLine(string.Format("SetActiveContent to '{0}'", value != null ? value.Name : "null")); - ActiveDocument = value; - - if (_activeContent != value) - { - List listOfAllContents = FindContents(); - listOfAllContents.ForEach((ManagedContent cnt) => - { - cnt.IsActiveContent = (value == cnt); - }); - - _floatingWindows.ForEach((DockableFloatingWindow fw) => - { - foreach (DockableContent cnt in fw.HostedPane.Items) - { - cnt.IsActiveContent = (value == cnt); - } - }); - if (_flyoutWindow != null) - { - foreach (DockableContent cnt in _flyoutWindow.ReferencedPane.Items) - { - cnt.IsActiveContent = (value == cnt); - } - } - - - _activeContent = value; - NotifyPropertyChanged("ActiveContent"); - } - - } - } - - /// - /// Gets the active dockable content - /// - /// If no dockbale content us active at the moment returns null. - public DockableContent ActiveDockableContent - { - get - { - IInputElement focusedElement = FocusManager.GetFocusedElement(this); - - return focusedElement as DockableContent; - } - } - - /// - /// Gets an array of all dockable contents currenty managed - /// - public DockableContent[] DockableContents - { - get - { - List contents = FindContents(); - - //FindContents already returns contents from FloatingWindows (sg #68987) - //foreach (FloatingWindow flWindow in _floatingWindows) - //{ - // foreach (DockableContent content in flWindow.HostedPane.Items) - // contents.Add(content); - //} - - foreach (DockableContent content in _hiddenContents) - contents.Add(content); - - return contents.ToArray(); - } - } - - /// - /// Gets an array of all document contents - /// - public DocumentContent[] Documents - { - get - { - return FindContents().ToArray(); - } - } - - - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Bindable(true)] - public IEnumerable DocumentsSource - { - get { return (IEnumerable)GetValue(DocumentsSourceProperty); } - set { SetValue(DocumentsSourceProperty, value); } - } - - // Using a DependencyProperty as the backing store for DocumentsSource. This enables animation, styling, binding, etc... - public static readonly DependencyProperty DocumentsSourceProperty = - DependencyProperty.Register("DocumentsSource", typeof(IEnumerable), typeof(DockingManager), new UIPropertyMetadata(null, new PropertyChangedCallback((s, e) => ((DockingManager)s).OnDocumentsSourceChanged(e.OldValue as IEnumerable, e.NewValue as IEnumerable)))); - - - void OnDocumentsSourceChanged(IEnumerable oldSource, IEnumerable newSource) - { - if (oldSource != null) - { - INotifyCollectionChanged oldSourceNotityIntf = oldSource as INotifyCollectionChanged; - if (oldSourceNotityIntf != null) - oldSourceNotityIntf.CollectionChanged -= new NotifyCollectionChangedEventHandler(DocumentsSourceCollectionChanged); - } - - if (newSource != null) - { - INotifyCollectionChanged newSourceNotityIntf = newSource as INotifyCollectionChanged; - if (newSourceNotityIntf != null) - newSourceNotityIntf.CollectionChanged += new NotifyCollectionChangedEventHandler(DocumentsSourceCollectionChanged); - } - } - - void DocumentsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - if (e.Action == NotifyCollectionChangedAction.Reset) - { - DocumentContent[] docs = this.Documents; - ObservableCollection documentsToClose = new ObservableCollection(); - - foreach (DocumentContent doc in docs) - { - if (doc.Parent is DocumentPane) - { - if ((doc.Parent as DocumentPane).IsMainDocumentPane == false) - { - documentsToClose.Add(doc); - } - } - } - - foreach (DocumentContent doc in documentsToClose) - { - doc.InternalClose(); - } - - foreach (DocumentContent doc in docs) - doc.InternalClose(); - } - - if (MainDocumentPane == null) - return; - - if (e.Action == NotifyCollectionChangedAction.Remove || - e.Action == NotifyCollectionChangedAction.Replace) - { - foreach (object newDoc in e.OldItems) - { - if (newDoc is DocumentContent) - (newDoc as DocumentContent).InternalClose(); - else if (newDoc is FrameworkElement) - { - DocumentContent docContainer = ((FrameworkElement)newDoc).Parent as DocumentContent; - if (docContainer != null) - docContainer.InternalClose(); - } - } - } - - if (e.Action == NotifyCollectionChangedAction.Add || - e.Action == NotifyCollectionChangedAction.Replace) - { - foreach (object newDoc in e.NewItems) - { - if (newDoc is DocumentContent) - MainDocumentPane.Items.Add(newDoc); - else if (newDoc is FrameworkElement) //limit objects to be at least framework elements - { - DocumentContent docContainer = new DocumentContent(); - docContainer.Content = newDoc; - - MainDocumentPane.Items.Add(docContainer); - } - } - } - } - - - - /// - /// Returns the main document pane - /// - /// - /// - internal static DocumentPane GetMainDocumentPane(ResizingPanel parentPanel) - { - foreach (UIElement child in parentPanel.Children) - { - if (child is DocumentPane) - return child as DocumentPane; - //if (child is DockablePane) - //{ - // DocumentPane doc = new DocumentPane(); - // DockablePane dockablePane = child as DockablePane; - // while (dockablePane.Items.Count > 0) - // { - // doc.Items.Add((dockablePane.Items[0] as DockableContent).DetachFromContainerPane()); - // } - // return doc; - //} - if (child is ResizingPanel) - { - DocumentPane foundDocPane = GetMainDocumentPane(child as ResizingPanel); - if (foundDocPane != null) - return foundDocPane; - } - } - - return null; - } - - internal static bool IsPanelContainingDocumentPane(ResizingPanel parentPanel) - { - foreach (UIElement child in parentPanel.Children) - { - if (child is DocumentPane) - return true; - if (child is ResizingPanel) - { - bool foundDocPane = IsPanelContainingDocumentPane(child as ResizingPanel); - if (foundDocPane) - return foundDocPane; - } - } - - return false; - } - - internal void EnsurePanePositionIsValid(DocumentPane pane) - { - if (pane == MainDocumentPane) - return; - - //A document pane must be at maindocument pane level or deeper - if (MainDocumentPane.Parent == this) - { - throw new InvalidOperationException("A document pane can't be positioned at this level!"); - } - } - - bool? FindPaneInPanel(ResizingPanel panel, Pane paneToFind) - { - foreach (UIElement child in panel.Children) - { - if (child == paneToFind) - return true; - else if (child is DockablePane) - return null; - else if (child is ResizingPanel) - { - bool? found = FindPaneInPanel(child as ResizingPanel, paneToFind); - if (found.HasValue && found.Value) - return true; - } - } - - return false; - } - - DocumentPane _mainDocumentPane; - - /// - /// Gets the main that can be used to add new document - /// - public DocumentPane MainDocumentPane - { - get { return _mainDocumentPane; } - internal set - { - if (_mainDocumentPane == null) - { - _mainDocumentPane = value; - - if (DocumentsSource != null) - { - foreach (object newDoc in DocumentsSource) - { - if (newDoc is DocumentContent) - MainDocumentPane.Items.Add(newDoc); - else if (newDoc is FrameworkElement) //limit objects to be at least framework elements - { - DocumentContent docContainer = new DocumentContent(); - docContainer.Content = newDoc; - - MainDocumentPane.Items.Add(docContainer); - } - } - } - } - else - { - _mainDocumentPane = value; - } - - } - } - - internal List FindContents() where T : ManagedContent - { - List resList = new List(); - - - if (Content is Pane) - { - foreach (ManagedContent c in ((Pane)Content).Items) - { - if (c is T) - { - resList.Add((T)c); - } - } - } - else if (Content is ResizingPanel) - { - FindContents(resList, Content as ResizingPanel); - } - - foreach (FloatingWindow flWindow in _floatingWindows) - { - foreach (ManagedContent c in flWindow.HostedPane.Items) - { - if (c is T) - resList.Add(c as T); - } - } - - if (_flyoutWindow != null && _flyoutWindow.ReferencedPane != null) - { - foreach (ManagedContent c in _flyoutWindow.ReferencedPane.Items) - { - if (c is T) - resList.Add(c as T); - } - } - - - return resList; - } - - - void FindContents(List listOfFoundContents, ResizingPanel parentPanel) where T : ManagedContent - { - foreach (UIElement child in parentPanel.Children) - { - if (child is Pane) - { - foreach (ManagedContent c in ((Pane)child).Items) - { - if (c is T) - { - listOfFoundContents.Add((T)c); - } - } - } - else if (child is ResizingPanel) - { - FindContents(listOfFoundContents, child as ResizingPanel); - } - } - } - - #endregion - - #region Floating windows management - List _floatingWindows = new List(); - - public DockableFloatingWindow[] FloatingWindows - { - get - { - if (_floatingWindows == null || - _floatingWindows.Count == 0) - return new DockableFloatingWindow[0]; - - return _floatingWindows.ToArray(); - } - } - - internal void RegisterFloatingWindow(DockableFloatingWindow floatingWindow) - { - if (_floatingWindows != null) - { - floatingWindow.FlowDirection = this.FlowDirection; - _floatingWindows.Add(floatingWindow); - } - } - - internal void UnregisterFloatingWindow(DockableFloatingWindow floatingWindow) - { - if (_floatingWindows != null) - _floatingWindows.Remove(floatingWindow); - } - - - - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - this.CommandBindings.Clear(); - //this.CommandBindings.Add(new CommandBinding(ShowNavigatorWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); - //this.CommandBindings.Add(new CommandBinding(ShowDocumentNavigatorWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); - } - - protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) - { - if (e.Property == FlowDirectionProperty) - { - _floatingWindows.ForEach((DockableFloatingWindow fl) => - { - fl.FlowDirection = FlowDirection; - }); - - if (_flyoutWindow != null) - { - _flyoutWindow.FlowDirection = FlowDirection; - } - } - - base.OnPropertyChanged(e); - } - #endregion - - #region Commands - - private static object syncRoot = new object(); - - - private static RoutedUICommand showNavigatorCommand = null; - - /// - /// Get the command to show navigator window - /// - public static RoutedUICommand ShowNavigatorWindowCommand - { - get - { - lock (syncRoot) - { - if (null == showNavigatorCommand) - { - showNavigatorCommand = new RoutedUICommand("S_how navigator window", "Navigator", typeof(DockingManager)); - showNavigatorCommand.InputGestures.Add(new KeyGesture(Key.Tab, ModifierKeys.Control)); - } - - } - return showNavigatorCommand; - } - } - - NavigatorWindow navigatorWindow = null; - - void ShowNavigatorWindow() - { - HideNavigatorWindow(); - - if (navigatorWindow == null) - { - navigatorWindow = new NavigatorWindow(this); - navigatorWindow.Owner = Window.GetWindow(this); - } - - Point locDockingManager = this.PointToScreenDPI(new Point()); - navigatorWindow.Left = locDockingManager.X; - navigatorWindow.Top = locDockingManager.Y; - navigatorWindow.Width = this.ActualWidth; - navigatorWindow.Height = this.ActualHeight; - navigatorWindow.Show(); - navigatorWindow.Focus(); - } - - void HideNavigatorWindow() - { - if (navigatorWindow != null) - { - navigatorWindow.Close(); - navigatorWindow = null; - } - } - - - void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == ShowNavigatorWindowCommand && ((Keyboard.Modifiers & ModifierKeys.Control)>0) ) - { - ShowNavigatorWindow(); - e.Handled = true; - } - else if (e.Command == ShowDocumentNavigatorWindowCommand && ((Keyboard.Modifiers & ModifierKeys.Shift) > 0)) - { - ShowDocumentNavigatorWindow(); - e.Handled = true; - } - - } - - void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) - { - e.CanExecute = true; - } - - - private static RoutedUICommand showDocumentNavigatorCommand = null; - - /// - /// Get the command to show document navigator window - /// - public static RoutedUICommand ShowDocumentNavigatorWindowCommand - { - get - { - lock (syncRoot) - { - if (null == showDocumentNavigatorCommand) - { - showDocumentNavigatorCommand = new RoutedUICommand("S_how document navigator window", "DocumentNavigator", typeof(DockingManager)); - showDocumentNavigatorCommand.InputGestures.Add(new KeyGesture(Key.Tab, ModifierKeys.Shift)); - } - - } - return showDocumentNavigatorCommand; - } - } - - DocumentNavigatorWindow documentNavigatorWindow = null; - - void ShowDocumentNavigatorWindow() - { - HideDocumentNavigatorWindow(); - - //if (documentNavigatorWindow == null) - { - documentNavigatorWindow = new DocumentNavigatorWindow(this); - documentNavigatorWindow.Owner = Window.GetWindow(this); - } - - if (MainDocumentPane == null) - return; - - Point locMainDocumentPane = MainDocumentPane.PointToScreenDPI(new Point()); - documentNavigatorWindow.Left = locMainDocumentPane.X; - documentNavigatorWindow.Top = locMainDocumentPane.Y; - documentNavigatorWindow.Width = MainDocumentPane.ActualWidth; - documentNavigatorWindow.Height = MainDocumentPane.ActualHeight; - documentNavigatorWindow.Show(); - documentNavigatorWindow.Focus(); - } - - void HideDocumentNavigatorWindow() - { - //if (documentNavigatorWindow != null) - //{ - // documentNavigatorWindow.Hide(); - - // //don't close this window to be more responsive - // documentNavigatorWindow.Close(); - // documentNavigatorWindow = null; - //} - } - - - #endregion - - - #region DockablePane operations - /// - /// Anchor a dockable pane to a border - /// - /// - /// - public void Anchor(Pane paneToAnchor, AnchorStyle anchor) - { - //remove the pane from its original children collection - FrameworkElement parentElement = paneToAnchor.Parent as FrameworkElement; - - if (anchor == AnchorStyle.None) - anchor = AnchorStyle.Right; - - //Change anchor border according to FlowDirection - if (FlowDirection == FlowDirection.RightToLeft) - { - if (anchor == AnchorStyle.Right) - anchor = AnchorStyle.Left; - else if (anchor == AnchorStyle.Left) - anchor = AnchorStyle.Right; - } - - //parentElement should be a DockingManager or a ResizingPanel - if (parentElement is ContentControl) - { - ((ContentControl)parentElement).Content = null; - } - - //and insert in the top level panel if exist - ResizingPanel toplevelPanel = Content as ResizingPanel; - - Orientation requestedOrientation = - (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; - - //if toplevel panel contains only one child then just override the orientation - //as requested - if (toplevelPanel != null && toplevelPanel.Children.Count == 1) - toplevelPanel.Orientation = requestedOrientation; - - if (toplevelPanel == null || - toplevelPanel.Orientation != requestedOrientation) - { - //if toplevel panel doesn't exist or it has not the correct orientation - //we have to create a new one and set it as content of docking manager - toplevelPanel = new ResizingPanel(); - toplevelPanel.Orientation = requestedOrientation; - - FrameworkElement contentElement = Content as FrameworkElement; - Content = toplevelPanel; - - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Top) - { - toplevelPanel.Children.Add(paneToAnchor); - toplevelPanel.InsertChildRelativeTo(contentElement, paneToAnchor, true); - } - else - { - toplevelPanel.Children.Add(paneToAnchor); - toplevelPanel.InsertChildRelativeTo(contentElement, paneToAnchor, false); - } - } - else - { - - //here we have a docking manager content with the right orientation - //so we have only to insert new child at correct position - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Top) - { - //add new child before first one (prepend) - toplevelPanel.InsertChildRelativeTo(paneToAnchor, toplevelPanel.Children[0] as FrameworkElement, false); - } - else - { - //add new child after last one (append) - toplevelPanel.InsertChildRelativeTo(paneToAnchor, toplevelPanel.Children[toplevelPanel.Children.Count - 1] as FrameworkElement, true); - } - } - - //Refresh anchor style - DockablePane paneToAnchorAsDockablePane = paneToAnchor as DockablePane; - - if (paneToAnchorAsDockablePane != null) - { - paneToAnchorAsDockablePane.Anchor = anchor; - } - - - - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Right) - { - double w = Math.Min( - ActualWidth / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Width); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - } - else - { - double h = Math.Min( - ActualHeight / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Height); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); - } - - //refresh contents state - foreach (ManagedContent content in paneToAnchor.Items) - { - if (content is DockableContent) - { - ((DockableContent)content).SetStateToDock(); - } - } - - - paneToAnchor.Focus(); - } - - /// - /// Anchor a dockable pane () to a border of a docked pane - /// - /// Pane to anchor - /// Pane relative - /// - public void Anchor(Pane paneToAnchor, Pane relativePane, AnchorStyle anchor) - { - if (anchor == AnchorStyle.None) - anchor = AnchorStyle.Right; - - //Change anchor border according to FlowDirection - if (FlowDirection == FlowDirection.RightToLeft) - { - if (anchor == AnchorStyle.Right) - anchor = AnchorStyle.Left; - else if (anchor == AnchorStyle.Left) - anchor = AnchorStyle.Right; - } - - if (paneToAnchor is DockablePane && - relativePane is DockablePane) - Anchor(paneToAnchor as DockablePane, relativePane as DockablePane, anchor); - else if (paneToAnchor is DockablePane && - relativePane is DocumentPane) - Anchor(paneToAnchor as DockablePane, relativePane as DocumentPane, anchor); - else if (paneToAnchor is DocumentPane && - relativePane is DocumentPane) - Anchor(paneToAnchor as DocumentPane, relativePane as DocumentPane, anchor); - else - Debug.Assert(false); - } - - - /// - /// Anchor a dockable pane () to a border of a document pane - /// - /// Pane to anchor - /// Pane relative - /// - public void Anchor(DockablePane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor) - { - if (anchor == AnchorStyle.None) - anchor = AnchorStyle.Right; - - //get a reference to the resizingpanel container of relativePane - ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; - DocumentPaneResizingPanel relativeDocumentPaneContainer = relativePane.GetParentDocumentPaneResizingPanel(); - Orientation requestedOrientation = - (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; - - if (relativePaneContainer == null) - { - Debug.Assert(relativePane.Parent == this); - - this.Content = null; - - relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); - relativeDocumentPaneContainer.Children.Add(relativePane); - - relativePaneContainer = new ResizingPanel(); - relativePaneContainer.Orientation = requestedOrientation; - - this.Content = relativePaneContainer; - - relativePaneContainer.Children.Add(relativeDocumentPaneContainer); - } - - if (relativeDocumentPaneContainer == null) - { - relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); - relativeDocumentPaneContainer.Orientation = requestedOrientation; - - - int indexOfPaneToReplace = relativePaneContainer.Children.IndexOf(relativePane); - relativePaneContainer.Children.RemoveAt(indexOfPaneToReplace); - - relativeDocumentPaneContainer.Children.Add(relativePane); - - relativePaneContainer.Children.Insert(indexOfPaneToReplace, relativeDocumentPaneContainer); - } - - relativePaneContainer = LogicalTreeHelper.GetParent(relativeDocumentPaneContainer) as ResizingPanel; - - //Debug.Assert(relativePaneContainer is DocumentPaneResizingPanel, "By now we can't have a pane without a resizing panel containing it"); - if (relativePaneContainer == null) - { - Debug.Assert(relativeDocumentPaneContainer.Parent == this); - - this.Content = null; - - relativePaneContainer = new ResizingPanel(); - relativePaneContainer.Orientation = requestedOrientation; - - this.Content = relativePaneContainer; - - relativePaneContainer.Children.Add(relativeDocumentPaneContainer); - } - - #region Create and setup container panel - if (relativePaneContainer != null) - { - //check if orientation is right - if (relativePaneContainer.Orientation != requestedOrientation) - { - //if the existing panel is not oriented as we want - //create a new one - ResizingPanel newPanel = new ResizingPanel(); - newPanel.Orientation = requestedOrientation; - - - if (newPanel.Orientation == Orientation.Horizontal) - ResizingPanel.SetResizeHeight(newPanel, ResizingPanel.GetResizeHeight(relativePane)); - else - ResizingPanel.SetResizeWidth(newPanel, ResizingPanel.GetResizeWidth(relativePane)); - - - //replace relative pane in its' container panel - //with this new panel - int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativeDocumentPaneContainer); - relativePaneContainer.Children.Remove(relativeDocumentPaneContainer); - relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); - - //now we have a panel correctly placed in the tree - newPanel.Children.Add(relativeDocumentPaneContainer); - - //use InsertChildRelativeTo function to add a resizingsplitter between - //the two children - newPanel.InsertChildRelativeTo( - paneToAnchor, relativeDocumentPaneContainer, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); - } - else - { - - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Top) - { - //add new child before first (prepend) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativeDocumentPaneContainer, false); - } - else - { - //add new child after last (append) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativeDocumentPaneContainer, true); - } - } - - } - #endregion - - - - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Right) - { - double w = Math.Min( - ResizingPanel.GetEffectiveSize(relativePane).Width / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Width); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - } - else - { - double h = Math.Min( - ResizingPanel.GetEffectiveSize(relativePane).Height / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Height); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); - } - - //refresh contents state - foreach (DockableContent draggedContent in paneToAnchor.Items) - { - draggedContent.SetStateToDock(); - } - - - //than set the new anchor style for the pane - paneToAnchor.Anchor = anchor; - paneToAnchor.Focus(); - } - - - - /// - /// Anchor a document pane () to a border of an other document pane - /// - /// Pane to anchor - /// Pane relative - /// - public void Anchor(DocumentPane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor) - { - if (anchor == AnchorStyle.None) - anchor = AnchorStyle.Right; - - //get a reference to the resizingpanel container of relativePane - ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; - DocumentPaneResizingPanel relativeDocumentPaneContainer = relativePane.GetParentDocumentPaneResizingPanel(); - Orientation requestedOrientation = - (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; - - if (relativePaneContainer == null) - { - Debug.Assert(relativePane.Parent == this); - - - relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); - relativePaneContainer = relativeDocumentPaneContainer; - - relativeDocumentPaneContainer.Orientation = requestedOrientation; - this.Content = relativePaneContainer; - - relativePaneContainer.Children.Add(relativePane); - - } - - if (relativeDocumentPaneContainer == null) - { - relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); - relativeDocumentPaneContainer.Orientation = requestedOrientation; - - - int indexOfPaneToReplace = relativePaneContainer.Children.IndexOf(relativePane); - relativePaneContainer.Children.RemoveAt(indexOfPaneToReplace); - - relativeDocumentPaneContainer.Children.Add(relativePane); - - relativePaneContainer.Children.Insert(indexOfPaneToReplace, relativeDocumentPaneContainer); - - relativePaneContainer = relativeDocumentPaneContainer; - } - - Debug.Assert(relativePaneContainer != null, "By now we can't have a pane without a resizing panel containing it"); - - #region Create and setup container panel - if (relativePaneContainer != null) - { - //check if orientation is right - if (relativePaneContainer.Orientation != requestedOrientation) - { - //if the existing panel is not oriented as we want - //create a new one - DocumentPaneResizingPanel newPanel = new DocumentPaneResizingPanel(); - newPanel.Orientation = requestedOrientation; - - //replace relative pane in its' container panel - //with this new panel - int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativePane); - relativePaneContainer.Children.Remove(relativePane); - relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); - - //now we have a panel correctly placed in the tree - newPanel.Children.Add(relativePane); - - //use InsertChildRelativeTo function to add a resizingsplitter between - //the two children - newPanel.InsertChildRelativeTo( - paneToAnchor, relativePane, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); - - relativePaneContainer = newPanel; - } - else - { - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Top) - { - //add new child before first (prepend) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativePane, false); - } - else - { - //add new child after last (append) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativePane, true); - } - } - - } - #endregion - - paneToAnchor.Focus(); - - (paneToAnchor.SelectedItem as ManagedContent).SetAsActive(); - if (paneToAnchor.SelectedItem is DocumentContent) - ActiveDocument = paneToAnchor.SelectedItem as DocumentContent; - - } - - /// - /// Anchor a dockable pane () to a border of an other dockable pane - /// - /// Pane to anchor - /// Pane relative - /// - public void Anchor(DockablePane paneToAnchor, DockablePane relativePane, AnchorStyle anchor) - { - if (anchor == AnchorStyle.None) - anchor = AnchorStyle.Right; - - //get a refernce to the resizingpanel container of relativePane - ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; - Orientation requestedOrientation = - (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; - - if (relativePaneContainer == null) - { - Debug.Assert(relativePane.Parent == this); - - relativePaneContainer = new ResizingPanel(); - relativePaneContainer.Orientation = requestedOrientation; - this.Content = relativePaneContainer; - relativePaneContainer.Children.Add(relativePane); - } - - Debug.Assert(relativePaneContainer != null, "By now we can't have a pane without a resizing panel containing it"); - - #region Create and setup container panel - if (relativePaneContainer != null) - { - //check if orientation is right - if (relativePaneContainer.Orientation != requestedOrientation) - { - //if the existing panel is not oriented as we want - //create a new one - ResizingPanel newPanel = new ResizingPanel(); - newPanel.Orientation = requestedOrientation; - - if (newPanel.Orientation == Orientation.Horizontal) - ResizingPanel.SetResizeHeight(newPanel, ResizingPanel.GetResizeHeight(relativePane)); - else - ResizingPanel.SetResizeWidth(newPanel, ResizingPanel.GetResizeWidth(relativePane)); - - //replace relative pane in its' container panel - //with this new panel - int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativePane); - relativePaneContainer.Children.Remove(relativePane); - relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); - - //now we have a panel correctly placed in the tree - newPanel.Children.Add(relativePane); - newPanel.InsertChildRelativeTo( - paneToAnchor, relativePane, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); - - relativePaneContainer = newPanel; - } - else - { - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Top) - { - //add new child before first (prepend) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativePane, false); - } - else - { - //add new child after last (append) - relativePaneContainer.InsertChildRelativeTo(paneToAnchor, - relativePane, true); - } - } - - } - #endregion - - //than set the new anchor style for the pane - paneToAnchor.Anchor = relativePane.Anchor; - - if (anchor == AnchorStyle.Left || - anchor == AnchorStyle.Right) - { - double w = Math.Min( - ResizingPanel.GetEffectiveSize(relativePane).Width / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Width); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - } - else - { - double h = Math.Min( - ResizingPanel.GetEffectiveSize(relativePane).Height / 2.0, - ResizingPanel.GetEffectiveSize(paneToAnchor).Height); - ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); - ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); - } - - //refresh contents state - foreach (DockableContent draggedContent in paneToAnchor.Items) - { - draggedContent.SetStateToDock(); - } - - if (relativePaneContainer != null) - relativePaneContainer.AdjustPanelSizes(); - - paneToAnchor.Focus(); - } - - - public void DropInto(Pane paneDragged, Pane paneToDropInto) - { - if (paneDragged is DockablePane && - paneToDropInto is DockablePane) - DropInto(paneDragged as DockablePane, paneToDropInto as DockablePane); - else if (paneDragged is DockablePane && - paneToDropInto is DocumentPane) - DropInto(paneDragged as DockablePane, paneToDropInto as DocumentPane); - else if (paneDragged is DocumentPane && - paneToDropInto is DocumentPane) - DropInto(paneDragged as DocumentPane, paneToDropInto as DocumentPane); - else - Debug.Assert(false); - } - - - public void DropInto(DocumentPane paneDragged, DocumentPane paneToDropInto) - { - //transfer tha contents of dragged pane (conatined in a FloatingWindow) - //to the pane which user select - ManagedContent contentToFocus = null; - while (paneDragged.Items.Count > 0) - { - ManagedContent contentToTransfer = paneDragged.RemoveContent(0); - paneToDropInto.Items.Insert(0, contentToTransfer); - contentToFocus = contentToTransfer; - } - - - paneToDropInto.SelectedIndex = 0; - paneToDropInto.Focus(); - if (contentToFocus != null) - contentToFocus.SetAsActive(); - } - - public void DropInto(DockablePane paneDragged, DocumentPane paneToDropInto) - { - if (paneToDropInto != MainDocumentPane) - paneToDropInto = MainDocumentPane; - - //transfer contents of dragged pane (contained in a FloatingWindow) - //to the pane which user select, taking care of setting contents state - //to Dock (using Dock() method of class DockablePane). - while (paneDragged.Items.Count > 0) - { - ManagedContent contentToTransfer = paneDragged.RemoveContent(0); - paneToDropInto.Items.Add(contentToTransfer); - - - DockableContent dockContentToTransfer = contentToTransfer as DockableContent; - - if (dockContentToTransfer != null) - dockContentToTransfer.SetStateToDocument(); - } - - paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1; - paneToDropInto.Focus(); - } - - public void DropInto(DockablePane paneDragged, DockablePane paneToDropInto) - { - //transfer tha contents of dragged pane (conatined in a FloatingWindow) - //to the pane which user select, taking care of setting contents state - //to Dock (using Dock() method of class DockablePane). - while (paneDragged.Items.Count > 0) - { - ManagedContent contentToTransfer = paneDragged.RemoveContent(0); - paneToDropInto.Items.Add(contentToTransfer); - - - DockableContent dockContentToTransfer = contentToTransfer as DockableContent; - - if (dockContentToTransfer != null) - dockContentToTransfer.SetStateToDock(); - } - - - paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1; - paneToDropInto.Focus(); - } - - bool RemoveContentFromTabGroup(DockableContent contentToRemove) - { - foreach (Panel anchorTabPanel in _anchorTabPanels) - { - foreach (DockablePaneAnchorTabGroup group in anchorTabPanel.Children) - { - foreach (DockablePaneAnchorTab tab in group.Children) - { - if (tab.ReferencedContent == contentToRemove) - { - group.Children.Remove(tab); - if (group.Children.Count == 0) - anchorTabPanel.Children.Remove(group); - - return true; - } - } - } - } - - return false; - } - - /// - /// Remove a pane from border tab groups - /// - /// Pane to remove - /// True if pane was removed, false otherwise - bool RemovePaneFromTabGroups(DockablePane paneToRemove) - { - foreach (Panel anchorTabPanel in _anchorTabPanels) - { - foreach (DockablePaneAnchorTabGroup group in anchorTabPanel.Children) - { - if (group.ReferencedPane == paneToRemove) - { - //foreach (DockablePaneAnchorTab tab in group.Children) - //{ - // tab.ReferencedContent.Icon = tab.Icon; - // tab.Icon = null; - //} - - anchorTabPanel.Children.Remove(group); - return true; - } - } - } - - - return false; - } - - /// - /// Autohides/redock a dockable pane - /// - /// Pane to auto hide/redock - public void ToggleAutoHide(DockablePane pane) - { - if (!_OnApplyTemplateFlag) - { - Debug.WriteLine("Layout has been restored before creating DockingManager object: force WPF to apply the template..."); - ApplyTemplate(); - } - - - //if pane is in auto hide state then is found - //referenced by a DockablePaneAnchorTabGroup - //if so redock it in its original position - if (RemovePaneFromTabGroups(pane)) - { - #region Pane is present in tab anchor panels - DockableContent selectedContent = - _flyoutWindow != null && - _flyoutWindow.ReferencedPane != null && - _flyoutWindow.ReferencedPane.Items.Count > 0 ? _flyoutWindow.ReferencedPane.Items[0] as DockableContent : - pane.Items[0] as DockableContent; - - HideAutoHideWindow(); - - ResizingPanel parentPanel = pane.Parent as ResizingPanel; - if (parentPanel != null && parentPanel.Children.Count >= 3) - { - parentPanel.AdjustPanelSizes(); - } - - //reset content state to docked - foreach (DockableContent content in pane.Items) - { - content.SetStateToDock(); - } - - pane.Focus(); - pane.SelectedItem = selectedContent; - ActiveContent = selectedContent; - #endregion - } - else - { - #region Pane is not auto hidden - //Create e new group - DockablePaneAnchorTabGroup group = new DockablePaneAnchorTabGroup(); - - //associate it to the pane - group.ReferencedPane = pane; - - DockableContent selectedContent = pane.SelectedItem as DockableContent; - - //add contents to it - foreach (DockableContent content in pane.Items) - { - DockablePaneAnchorTab tab = new DockablePaneAnchorTab(); - tab.ReferencedContent = content; - tab.Anchor = pane.Anchor; - tab.Icon = content.Icon; - - - group.Children.Add(tab); - content.SetStateToAutoHide(); - } - - //place group under correct anchor tabpanel - switch (pane.Anchor) - { - case AnchorStyle.Left: - if (_leftAnchorTabPanel != null) - _leftAnchorTabPanel.Children.Add(group); - break; - case AnchorStyle.Top: - if (_topAnchorTabPanel != null) - _topAnchorTabPanel.Children.Add(group); - break; - case AnchorStyle.Right: - if (_rightAnchorTabPanel != null) - _rightAnchorTabPanel.Children.Add(group); - break; - case AnchorStyle.Bottom: - if (_bottomAnchorTabPanel != null) - _bottomAnchorTabPanel.Children.Add(group); - break; - } - - #endregion - } - - //refresh arrangements traversing bottom-up visual tree - FrameworkElement parentElement = pane.Parent as FrameworkElement; - - while (parentElement != null) - { - parentElement.InvalidateMeasure(); - parentElement = parentElement.Parent as FrameworkElement; - } - - - } - - #endregion - - - #region Hide/Show contents - - List _hiddenContents = new List(); - -#if DEBUG - internal void CheckHiddenState(DockableContent contentToCheck) - { - if (contentToCheck.State == DockableContentState.Hidden) - Debug.Assert(_hiddenContents.Contains(contentToCheck)); - else - Debug.Assert(!_hiddenContents.Contains(contentToCheck)); - } -#endif - /// - /// Hide a dockable content removing it from its container - /// - /// Content to hide - /// Note that if you simply remove a content from its container without calling this method, the - /// layout serializer component can't managed correctly the removed content. - public void Hide(DockableContent content) - { - if (content.State == DockableContentState.Hidden) - return; - - if (!content.IsCloseable) - return; - - content.SaveCurrentStateAndPosition(); - - if (content.State == DockableContentState.AutoHide) - { - HideAutoHideWindow(); - RemoveContentFromTabGroup(content); - } - - if (content.State == DockableContentState.FloatingWindow || - content.State == DockableContentState.DockableWindow) - { - DockableFloatingWindow floatingWindow = Window.GetWindow(content) as DockableFloatingWindow; - - if (floatingWindow != null && - floatingWindow.HostedPane.HasSingleItem) - { - floatingWindow.Close(); - } - - content.DetachFromContainerPane(); - } - else - { - content.DetachFromContainerPane(); - } - - - if (content.State != DockableContentState.Hidden) - { - content.SetStateToHidden(); - - Debug.Assert(!_hiddenContents.Contains(content)); - _hiddenContents.Add(content); - } - - if (ActiveDocument == content) - ActiveDocument = null; - - if (ActiveContent == content) - ActiveContent = null; - } - - /// - /// Show or add a document in AvalonDock - /// - /// Document to show/add. - /// If document provided is not present in the list, this method inserts it in first position of collection. - /// In both cases select it in the container . - public void Show(DocumentContent document) - { - bool found = false; - foreach (DocumentContent doc in Documents) - { - if (doc == document) - { - found = true; - break; - } - } - - if (!found && MainDocumentPane != null) - { - if (document.Parent is DocumentPane) - { - ((DocumentPane)document.Parent).Items.Clear(); - } - //if (document.Parent != null) - //{ - // throw new InvalidProgramException( - // string.Format("Disconnnect first the document from its logical parent ({0})", - // document.Parent.GetType())); - //} - - MainDocumentPane.Items.Insert(0, document); - } - - //DocumentPane docPane = document.ContainerPane as DocumentPane; - - //if (docPane != null) - //{ - // docPane.SelectedItem = document; - // if (document.Content is IInputElement) - // Keyboard.Focus(document.Content as IInputElement); - //} - document.SetAsActive(); - } - - /// - /// Show a dockable content in its container - /// - /// Content to show - public void Show(DockableContent content) - { - if (content.SavedStateAndPosition != null) - Show(content, content.SavedStateAndPosition.State); - else - Show(content, DockableContentState.Docked); - } - - /// - /// Show a dockable content in its container with a desidered state - /// - /// Content to show - /// State desidered - public void Show(DockableContent content, DockableContentState desideredState) - { - Show(content, desideredState, AnchorStyle.None); - } - - /// - /// Show a dockable content in its container with a desidered state - /// - /// Content to show - /// State desidered - /// Border to which anchor the newly created container pane - /// - public void Show(DockableContent content, DockableContentState desideredState, AnchorStyle desideredAnchor) - { - #region Dockable content - - if (desideredState == DockableContentState.Hidden)//??!!show hidden? - Hide(content); - - if (content.State == DockableContentState.AutoHide) - { - ShowFlyoutWindow(content); - } - else if (content.State == DockableContentState.Docked || - content.State == DockableContentState.Document) - { - if (content.ContainerPane == null) - { - //Problem!? try to rescue - if (content.State == DockableContentState.Docked) - { - //find the the pane which the desidered anchor style - DockablePane foundPane = this.FindChildDockablePane(desideredAnchor); - if (foundPane != null) - foundPane.Items.Add(content); - else - { - //if no suitable pane was found create e new one on the fly - DockablePane pane = new DockablePane(); - pane.Items.Add(content); - Anchor(pane, desideredAnchor); - } - } - else - { - //add to main document pane - MainDocumentPane.Items.Add(content); - } - - } - - if (content.ContainerPane.GetManager() == null) - { - //disconnect the parent pane from previous panel - //((Panel)content.ContainerPane.Parent).Children.Remove(content.ContainerPane); - if (content.ContainerPane.Parent != null) - { - ((Panel)content.ContainerPane.Parent).Children.Remove(content.ContainerPane); - } - Anchor(content.ContainerPane, desideredAnchor); - } - - if (desideredState == DockableContentState.DockableWindow || - desideredState == DockableContentState.FloatingWindow) - { - DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this, content); - floatingWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; - floatingWindow.Owner = Window.GetWindow(this); - //if (content.Content != null) - //{ - // floatingWindow.Width = Math.Min(((FrameworkElement)content.Content).ActualWidth, ResizingPanel.GetResizeWidth(content.ContainerPane)); - // floatingWindow.Height = Math.Min(((FrameworkElement)content.Content).ActualHeight, ResizingPanel.GetResizeHeight(content.ContainerPane)); - //} - //else - //{ - floatingWindow.Width = 400; - floatingWindow.Height = 400; - //} - RegisterFloatingWindow(floatingWindow); - floatingWindow.Show(); - - } - else if (desideredState == DockableContentState.AutoHide) - { - if (content.ContainerPane != null) - content.ContainerPane.SelectedItem = this; - //content.FocusContent(); - //if (content.Content is IInputElement) - // Keyboard.Focus(content.Content as IInputElement); - content.SetAsActive(); - - DockablePane.ToggleAutoHideCommand.Execute(null, content.ContainerPane); - } - else if (desideredState == DockableContentState.Document) - { - DocumentPane docPane = MainDocumentPane; - if (docPane != null) - { - docPane.Items.Add(content.DetachFromContainerPane()); - docPane.SelectedItem = content; - content.SetStateToDocument(); - } - } - else - { - content.ContainerPane.SelectedItem = content; - content.SetAsActive(); - - DockablePane dockParent = content.ContainerPane as DockablePane; - if (content.ActualWidth == 0.0 && ( - dockParent.Anchor == AnchorStyle.Left || dockParent.Anchor == AnchorStyle.Right)) - { - ResizingPanel.SetResizeWidth(dockParent, new GridLength(200)); - ResizingPanel.SetEffectiveSize(dockParent, new Size(200, 0.0)); - } - else if (content.ActualWidth == 0.0 && ( - dockParent.Anchor == AnchorStyle.Left || dockParent.Anchor == AnchorStyle.Right)) - { - ResizingPanel.SetResizeWidth(dockParent, new GridLength(200)); - ResizingPanel.SetEffectiveSize(dockParent, new Size(200, 0.0)); - } - - - - //ActiveContent = content; - ////content.FocusContent(); - //if (content.Content is IInputElement) - // Keyboard.Focus(content.Content as IInputElement); - } - } - else if ( - content.State == DockableContentState.DockableWindow || - content.State == DockableContentState.FloatingWindow) - { - FloatingDockablePane containerPane = content.ContainerPane as FloatingDockablePane; - - if (containerPane != null) - { - //check if visible on the primary screen - if (containerPane.FloatingWindow.Left > System.Windows.SystemParameters.PrimaryScreenWidth) - containerPane.FloatingWindow.Left = System.Windows.SystemParameters.PrimaryScreenWidth - containerPane.FloatingWindow.Width; - if (containerPane.FloatingWindow.Top > System.Windows.SystemParameters.PrimaryScreenHeight) - containerPane.FloatingWindow.Top = System.Windows.SystemParameters.PrimaryScreenHeight - containerPane.FloatingWindow.Height; - - - containerPane.FloatingWindow.Activate(); - } - - } - else if (content.State == DockableContentState.Document) - { - if (content.ContainerPane != null) - content.ContainerPane.SelectedItem = this; - //content.FocusContent(); - //if (content.Content is IInputElement) - // Keyboard.Focus(content.Content as IInputElement); - content.SetAsActive(); - } - else if (content.State == DockableContentState.Hidden) - { - Debug.Assert(_hiddenContents.Contains(content)); - - _hiddenContents.Remove(content); - - if (desideredState == DockableContentState.Docked || - desideredState == DockableContentState.AutoHide) - { - - if (content.SavedStateAndPosition != null && - content.SavedStateAndPosition.ContainerPane != null && - content.SavedStateAndPosition.ChildIndex >= 0 && - content.SavedStateAndPosition.ContainerPane.GetManager() == this && - desideredState == DockableContentState.Docked) - { - //ok previous container pane is here.. - Pane prevPane = content.SavedStateAndPosition.ContainerPane; - if (content.SavedStateAndPosition.ChildIndex < prevPane.Items.Count) - { - prevPane.Items.Insert(content.SavedStateAndPosition.ChildIndex, content); - } - else - { - prevPane.Items.Add(content); - } - - prevPane.SelectedItem = content; - content.SetStateToDock(); - } - else - { - DockablePane newHostpane = new DockablePane(); - newHostpane.Items.Add(content); - - if (desideredAnchor == AnchorStyle.None && - content.SavedStateAndPosition != null && - content.SavedStateAndPosition.Anchor != AnchorStyle.None) - desideredAnchor = content.SavedStateAndPosition.Anchor; - - if (desideredAnchor == AnchorStyle.None) - desideredAnchor = AnchorStyle.Right; - - if (desideredAnchor == AnchorStyle.Left || - desideredAnchor == AnchorStyle.Right) - { - double w = 200; - if (content.SavedStateAndPosition != null && - !double.IsInfinity(content.SavedStateAndPosition.Width) && - !double.IsNaN(content.SavedStateAndPosition.Width)) - w = content.SavedStateAndPosition.Width; - - ResizingPanel.SetResizeWidth(newHostpane, new GridLength(w)); - ResizingPanel.SetEffectiveSize(newHostpane, new Size(w, 0.0)); - } - else - { - double h = 200; - if (content.SavedStateAndPosition != null && - !double.IsInfinity(content.SavedStateAndPosition.Height) && - !double.IsNaN(content.SavedStateAndPosition.Height)) - h = content.SavedStateAndPosition.Height; - - ResizingPanel.SetResizeHeight(newHostpane, new GridLength(h)); - ResizingPanel.SetEffectiveSize(newHostpane, new Size(0.0, h)); - } - - Anchor(newHostpane, desideredAnchor); - - if (desideredState == DockableContentState.AutoHide) - { - DockablePane.ToggleAutoHideCommand.Execute(null, newHostpane); - } - - } - - ActiveContent = content; - } - else if (desideredState == DockableContentState.DockableWindow || - desideredState == DockableContentState.FloatingWindow) - { - DockablePane newHostpane = null; - FloatingDockablePane prevHostpane = null; - if (content.SavedStateAndPosition != null && content.SavedStateAndPosition.ContainerPane != null && content.SavedStateAndPosition.ContainerPane is FloatingDockablePane) - { - prevHostpane = content.SavedStateAndPosition.ContainerPane as FloatingDockablePane; - if (!prevHostpane.Items.Contains(content)) - prevHostpane.Items.Add(content); - } - else - { - newHostpane = new DockablePane(); - newHostpane.Items.Add(content); - } - - content.SetStateToDock(); - - if (prevHostpane != null) - { - DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this, content); - floatingWindow.WindowStartupLocation = WindowStartupLocation.Manual; - floatingWindow.Top = prevHostpane.FloatingWindow.Top; - floatingWindow.Left = prevHostpane.FloatingWindow.Left; - floatingWindow.Width = prevHostpane.FloatingWindow.Width; - floatingWindow.Height = prevHostpane.FloatingWindow.Height; - floatingWindow.Owner = Window.GetWindow(this); - RegisterFloatingWindow(floatingWindow); - floatingWindow.Show(); - } - else if (newHostpane != null) - { - DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this, newHostpane); - floatingWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; - floatingWindow.Width = 200; - floatingWindow.Height = 500; - floatingWindow.Owner = Window.GetWindow(this); - RegisterFloatingWindow(floatingWindow); - floatingWindow.Show(); - } - - } - else if (desideredState == DockableContentState.Document) - { - DocumentPane docPane = MainDocumentPane; - if (docPane != null) - { - docPane.Items.Add(content); - docPane.SelectedItem = content; - content.SetStateToDocument(); - } - } - } - - #endregion - -#if DEBUG - CheckHiddenState(content); -#endif - } - #endregion - - - #region Anchor Style Update routines - protected override Size ArrangeOverride(Size arrangeBounds) - { - //at the moment this is the easy way to get anchor properties always updated - if (this.Content as ResizingPanel != null) - UpdateAnchorStyle(); - - return base.ArrangeOverride(arrangeBounds); - } - - internal void UpdateAnchorStyle() - { - ResizingPanel mainPanel = this.Content as ResizingPanel; - Debug.Assert(mainPanel != null); - - - UpdateAnchorStyle(mainPanel); - } - - /// - /// Update the property relative to the object - /// - /// - /// - /// Traverse the logical tree starting from root and set property of dockable pane found. - void UpdateAnchorStyle(ResizingPanel panel) - { - AnchorStyle currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Left : AnchorStyle.Top; - bool foundDocumentContent = false; - - foreach (FrameworkElement child in panel.Children) - { - if (child is ResizingPanel) - { - if (!foundDocumentContent && - GetMainDocumentPane(child as ResizingPanel) != null) - { - foundDocumentContent = true; - currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Right : AnchorStyle.Bottom; - UpdateAnchorStyle(child as ResizingPanel); - } - else - ForceAnchorStyle(child as ResizingPanel, currentAnchor); - } - else if (child is DocumentPane) - { - foundDocumentContent = true; - currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Right : AnchorStyle.Bottom; - } - else if (child is DockablePane) - { - (child as DockablePane).Anchor = currentAnchor; - } - } - } - - /// - /// Called by whene a object has been found - /// - /// - /// - void ForceAnchorStyle(ResizingPanel panel, AnchorStyle forcedAnchor) - { - foreach (FrameworkElement child in panel.Children) - { - if (child is ResizingPanel) - { - ForceAnchorStyle((child as ResizingPanel), forcedAnchor); - } - else if ((child is DockablePane)) - { - ((DockablePane)child).Anchor = forcedAnchor; - } - } - } - - #endregion - - - #region Flyout window - FlyoutPaneWindow _flyoutWindow = null; - WindowInteropWrapper _wndInteropWrapper = null; - - void HideAutoHideWindow() - { - if (_flyoutWindow != null) - { - _flyoutWindow.Height = 0.0; - _flyoutWindow.Width = 0.0; - _flyoutWindow.Close(); - _flyoutWindow = null; - } - } - - - internal void ShowFlyoutWindow(DockableContent content) - { - //check if parent window is Active - Window parentWindow = Window.GetWindow(this); - if (parentWindow == null) - return; - - if (!parentWindow.IsActive && (_flyoutWindow == null || !_flyoutWindow.IsActive)) - return; - - - //check if content is already visible in a flyout window - if (_flyoutWindow != null && - _flyoutWindow.ReferencedPane.Items.Contains(content)) - return; - - //hide previous create window - HideAutoHideWindow(); - - //select this content in the referenced pane - content.ContainerPane.SelectedItem = content; - - - if (_wndInteropWrapper == null) - { - _wndInteropWrapper = new WindowInteropWrapper(); - _wndInteropWrapper.OnWindowPosChanging+=new EventHandler(_wndInteropWrapper_OnWindowPosChanging); - } - _wndInteropWrapper.AttachedObject = parentWindow; - - //create e new window - _flyoutWindow = new FlyoutPaneWindow(this, content); - _flyoutWindow.Owner = parentWindow; - _flyoutWindow.FlowDirection = this.FlowDirection; - - UpdateFlyoutWindowPosition(true); - - _flyoutWindow.Closing += new System.ComponentModel.CancelEventHandler(_flyoutWindow_Closing); - _flyoutWindow.Show(); - - //this.Focus(); - } - - protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) - { - UpdateFlyoutWindowPosition(); - base.OnRenderSizeChanged(sizeInfo); - } - - - void _flyoutWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) - { - _flyoutWindow.Closing -= new System.ComponentModel.CancelEventHandler(_flyoutWindow_Closing); - _flyoutWindow.Owner = null; - _wndInteropWrapper.AttachedObject = null; - } - - void UpdateFlyoutWindowPosition() - { - UpdateFlyoutWindowPosition(false); - } - - void UpdateFlyoutWindowPosition(bool initialSetup) - { - if (_flyoutWindow == null) - return; - - Debug.WriteLine("_leftAnchorTabPanel " + _leftAnchorTabPanel.ActualWidth + " - " + _leftAnchorTabPanel.Children.Count); - - double leftTabsWidth = FlowDirection == FlowDirection.LeftToRight ? _leftAnchorTabPanel.ActualWidth : _rightAnchorTabPanel.ActualWidth; - double rightTabsWidth = FlowDirection == FlowDirection.LeftToRight ? _rightAnchorTabPanel.ActualWidth : _leftAnchorTabPanel.ActualWidth; - double topTabsHeight = _topAnchorTabPanel.ActualHeight; - double bottomTabsHeight = _bottomAnchorTabPanel.ActualHeight; - - Point locDockingManager = HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()); - double resWidth = initialSetup ? ResizingPanel.GetResizeWidth(_flyoutWindow.ReferencedPane).Value : _flyoutWindow.Width; - double resHeight = initialSetup ? ResizingPanel.GetResizeHeight(_flyoutWindow.ReferencedPane).Value : _flyoutWindow.Height; - //double resWidth = initialSetup ? ResizingPanel.GetEffectiveSize(_flyoutWindow.ReferencedPane).Width : _flyoutWindow.Width; - //double resHeight = initialSetup ? ResizingPanel.GetEffectiveSize(_flyoutWindow.ReferencedPane).Height : _flyoutWindow.Height; - - _flyoutWindow.MinLeft = locDockingManager.X; - _flyoutWindow.MinTop = locDockingManager.Y; - - if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Right) - { - _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; - _flyoutWindow.Height = this.ActualHeight - topTabsHeight - bottomTabsHeight; - - _flyoutWindow.MaxWidth = ActualWidth - rightTabsWidth; - _flyoutWindow.MaxHeight = ActualHeight; - - if (initialSetup) - { - _flyoutWindow.Left = FlowDirection == FlowDirection.LeftToRight ? locDockingManager.X + this.ActualWidth - rightTabsWidth : locDockingManager.X + leftTabsWidth; - _flyoutWindow.Width = 0.0; - _flyoutWindow.TargetWidth = resWidth; - } - else - { - if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) - _flyoutWindow.Left = FlowDirection == FlowDirection.LeftToRight ? locDockingManager.X + this.ActualWidth - rightTabsWidth - _flyoutWindow.Width : locDockingManager.X + leftTabsWidth; - } - } - if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Left) - { - _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; - _flyoutWindow.Height = this.ActualHeight - topTabsHeight - bottomTabsHeight; - - _flyoutWindow.MaxWidth = ActualWidth - leftTabsWidth; - _flyoutWindow.MaxHeight = ActualHeight; - - if (initialSetup) - { - _flyoutWindow.Left = FlowDirection == FlowDirection.RightToLeft ? locDockingManager.X + this.ActualWidth - rightTabsWidth : locDockingManager.X + leftTabsWidth; - _flyoutWindow.Width = 0.0; - _flyoutWindow.TargetWidth = resWidth; - } - else - { - if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) - _flyoutWindow.Left = FlowDirection == FlowDirection.RightToLeft ? locDockingManager.X + this.ActualWidth - rightTabsWidth - _flyoutWindow.Width : locDockingManager.X + leftTabsWidth; - } - } - if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Top) - { - _flyoutWindow.Left = locDockingManager.X + leftTabsWidth; - _flyoutWindow.Width = this.ActualWidth - rightTabsWidth -leftTabsWidth; - - _flyoutWindow.MaxWidth = ActualWidth; - _flyoutWindow.MaxHeight = ActualHeight - topTabsHeight; - - if (initialSetup) - { - _flyoutWindow.Height = 0.0; - _flyoutWindow.TargetHeight = resHeight; - } - else - { - if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) - _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; - } - } - if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Bottom) - { - _flyoutWindow.Left = locDockingManager.X + leftTabsWidth; - _flyoutWindow.Width = this.ActualWidth - rightTabsWidth - leftTabsWidth; - - _flyoutWindow.MaxWidth = ActualWidth; - _flyoutWindow.MaxHeight = ActualHeight - bottomTabsHeight; - - if (initialSetup) - { - _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight; - _flyoutWindow.Height = 0.0; - _flyoutWindow.TargetHeight = resHeight; - } - else - { - if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) - _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight - _flyoutWindow.Height; - if (_flyoutWindow.IsClosing) - _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight - _flyoutWindow.Height; - } - } - - if (_flyoutWindow != null && !_flyoutWindow.IsClosing) - _flyoutWindow.UpdateClipRegion(); - } - - void _wndInteropWrapper_OnWindowPosChanging(object sender, EventArgs e) - { - UpdateFlyoutWindowPosition(); - } - - #endregion - - - #region DragDrop Operations - /// - /// Begins dragging operations - /// - /// Floating window containing pane which is dragged by user - /// Current mouse position - /// Offset to be use to set floating window screen position - /// Retruns True is drag is completed, false otherwise - internal bool Drag(FloatingWindow floatingWindow, Point point, Point offset) - { - bool mouseCaptured = IsMouseCaptured; - - if (!mouseCaptured) - mouseCaptured = CaptureMouse(); - - if (mouseCaptured) - { - floatingWindow.Owner = Window.GetWindow(this); - - DragPaneServices.StartDrag(floatingWindow, point, offset); - return true; - } - - return false; - } - - internal void Drag(DocumentContent documentContent, Point point, Point offset) - { - if (CaptureMouse()) - { - DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this, documentContent); - Drag(floatingWindow, point, offset); - } - - } - - - internal void Drag(DockableContent dockableContent, Point point, Point offset) - { - if (CaptureMouse()) - { - DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this, dockableContent); - floatingWindow.Owner = Window.GetWindow(this); - RegisterFloatingWindow(floatingWindow); - Drag(floatingWindow, point, offset); - } - } - - - internal void Drag(DockablePane dockablePane, Point point, Point offset) - { - if (CaptureMouse()) - { - DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this, dockablePane); - floatingWindow.Owner = Window.GetWindow(this); - RegisterFloatingWindow(floatingWindow); - Drag(floatingWindow, point, offset); - } - } - - - protected override void OnMouseMove(MouseEventArgs e) - { - if (IsMouseCaptured) - { - DragPaneServices.MoveDrag(this.PointToScreenDPI(e.GetPosition(this))); - - if (_flyoutWindow != null) - _flyoutWindow.UpdateClipRegion(); - } - - base.OnMouseMove(e); - } - - - protected override void OnMouseUp(MouseButtonEventArgs e) - { - CompleteDragging(e.GetPosition(this)); - base.OnMouseUp(e); - } - - protected override void OnMouseLeave(MouseEventArgs e) - { - CompleteDragging(e.GetPosition(this)); - base.OnMouseLeave(e); - } - - /// - /// Ends all previously initiated dragging operations - /// - /// - void CompleteDragging(Point ptEndDrag) - { - if (IsMouseCaptured) - { - DragPaneServices.EndDrag(this.PointToScreenDPI(ptEndDrag)); - ReleaseMouseCapture(); - } - } - - DragPaneServices _dragPaneServices; - - internal DragPaneServices DragPaneServices - { - get - { - if (_dragPaneServices == null) - _dragPaneServices = new DragPaneServices(this); - - return _dragPaneServices; - } - } - #endregion - - - #region IDropSurface - public bool IsSurfaceVisible - { - get - { - //a DockingManager is always visible for drop a pane - return true; - } - } - - /// - /// Returns a rectangle where this surface is active - /// - public Rect SurfaceRectangle - { - get - { - if (PresentationSource.FromVisual(this) != null) - return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(this, new Point(0, 0)), new Size(ActualWidth, ActualHeight)); - return Rect.Empty; - } - } - - /// - /// Overlay window which shows docking placeholders - /// - OverlayWindow _overlayWindow; - - /// - /// Returns current overlay window - /// - internal OverlayWindow OverlayWindow - { - get - { - if (_overlayWindow == null) - _overlayWindow = new OverlayWindow(this); - - return _overlayWindow; - } - } - - /// - /// Handles this sourface mouse entering (show current overlay window) - /// - /// Current mouse position - public void OnDragEnter(Point point) - { - if (OverlayWindow.IsVisible) - return; - - OverlayWindow.Owner = DragPaneServices.FloatingWindow; - //OverlayWindow.Left = PointToScreen(new Point(0, 0)).X; - //OverlayWindow.Top = PointToScreen(new Point(0, 0)).Y; - Point origPoint = HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()); - OverlayWindow.Left = origPoint.X; - OverlayWindow.Top = origPoint.Y; - OverlayWindow.Width = ActualWidth; - OverlayWindow.Height = ActualHeight; - - OverlayWindow.Show(); - } - - /// - /// Handles mouse overing this surface - /// - /// - public void OnDragOver(Point point) - { - - } - - /// - /// Handles mouse leave event during drag (hide overlay window) - /// - /// - public void OnDragLeave(Point point) - { - OverlayWindow.Owner = null; - OverlayWindow.Hide(); - Window mainWindow = Window.GetWindow(this); - if (mainWindow != null) - mainWindow.Activate(); - } - - /// - /// Handler drop events - /// - /// Current mouse position - /// Returns alwasy false because this surface doesn't support direct drop - public bool OnDrop(Point point) - { - return false; - } - - #endregion - - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - - - #region Persistence - - void SaveLayout(XmlWriter xmlWriter, DockablePane pane) - { - if (pane.Items.Count > 0) - { - xmlWriter.WriteStartElement("DockablePane"); - - //if (!double.IsInfinity(ResizingPanel.GetResizeWidth(pane))) - // xmlWriter.WriteAttributeString("ResizeWidth", XmlConvert.ToString(ResizingPanel.GetResizeWidth(pane))); - ////if (!double.IsInfinity(ResizingPanel.GetResizeHeight(pane))) - // xmlWriter.WriteAttributeString("ResizeHeight", XmlConvert.ToString(ResizingPanel.GetResizeHeight(pane))); - xmlWriter.WriteAttributeString("ResizeWidth", ResizingPanel.GetResizeWidth(pane).ToString()); - xmlWriter.WriteAttributeString("ResizeHeight", ResizingPanel.GetResizeHeight(pane).ToString()); - xmlWriter.WriteAttributeString("EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(pane))); - - xmlWriter.WriteAttributeString("Anchor", pane.Anchor.ToString()); - - Debug.Assert(pane.Items.Count > 0); - - foreach (DockableContent content in pane.Items) - { - SaveLayout(xmlWriter, content); - } - - - xmlWriter.WriteEndElement(); - } - } - - void SaveLayout(XmlWriter xmlWriter, DockableFloatingWindow flWindow) - { - xmlWriter.WriteStartElement("FloatingWindow"); - xmlWriter.WriteAttributeString("IsDockableWindow", XmlConvert.ToString(flWindow.IsDockableWindow)); - - xmlWriter.WriteAttributeString("Top", XmlConvert.ToString(flWindow.Top)); - xmlWriter.WriteAttributeString("Left", XmlConvert.ToString(flWindow.Left)); - xmlWriter.WriteAttributeString("Width", XmlConvert.ToString(flWindow.Width)); - xmlWriter.WriteAttributeString("Height", XmlConvert.ToString(flWindow.Height)); - - - SaveLayout(xmlWriter, flWindow.HostedPane); - - xmlWriter.WriteEndElement(); - } - - void SaveLayout(XmlWriter xmlWriter, DockableContent content) - { - Debug.Assert(!string.IsNullOrEmpty(content.Name), - "DockableContent must have a Name to save its content.\n" + - "Click Ignore to skip this element and continue with save." - ); - - if (!string.IsNullOrEmpty(content.Name)) - { - xmlWriter.WriteStartElement("DockableContent"); - - xmlWriter.WriteAttributeString("Name", content.Name); - xmlWriter.WriteAttributeString("AutoHide", XmlConvert.ToString(content.State == DockableContentState.AutoHide)); - - content.SaveLayout(xmlWriter); - - xmlWriter.WriteEndElement(); - } - } - - void SaveLayout(XmlWriter xmlWriter, DocumentPane pane) - { - xmlWriter.WriteStartElement("DocumentPanePlaceHolder"); - - foreach (ManagedContent content in pane.Items) - { - if (content is DockableContent) - { - DockableContent dockableContent = content as DockableContent; - SaveLayout(xmlWriter, dockableContent); - } - } - - xmlWriter.WriteEndElement(); - } - - void SaveLayout(XmlWriter xmlWriter, DocumentPaneResizingPanel panelToSerialize) - { - xmlWriter.WriteStartElement("DocumentPanePlaceHolder"); - - List listOfFoundContents = new List(); - FindContents(listOfFoundContents, panelToSerialize); - - foreach (DockableContent content in listOfFoundContents) - { - SaveLayout(xmlWriter, content); - } - - - xmlWriter.WriteEndElement(); - } - - void SaveLayout(XmlWriter xmlWriter, ResizingPanel panelToSerialize) - { - xmlWriter.WriteStartElement("ResizingPanel"); - - //if (!double.IsInfinity(ResizingPanel.GetResizeWidth(panelToSerialize))) - // xmlWriter.WriteAttributeString("ResizeWidth", XmlConvert.ToString(ResizingPanel.GetResizeWidth(panelToSerialize))); - //if (!double.IsInfinity(ResizingPanel.GetResizeHeight(panelToSerialize))) - // xmlWriter.WriteAttributeString("ResizeHeight", XmlConvert.ToString(ResizingPanel.GetResizeHeight(panelToSerialize))); - - xmlWriter.WriteAttributeString("ResizeWidth", ResizingPanel.GetResizeWidth(panelToSerialize).ToString()); - xmlWriter.WriteAttributeString("ResizeHeight", ResizingPanel.GetResizeHeight(panelToSerialize).ToString()); - xmlWriter.WriteAttributeString("EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(panelToSerialize))); - - xmlWriter.WriteAttributeString("Orientation", Convert.ToString(panelToSerialize.Orientation)); - - - foreach (UIElement child in panelToSerialize.Children) - { - if (child is DockablePane) - SaveLayout(xmlWriter, child as DockablePane); - else if (child is DocumentPane) - SaveLayout(xmlWriter, child as DocumentPane); - else if (child is DocumentPaneResizingPanel) - SaveLayout(xmlWriter, child as DocumentPaneResizingPanel); - else if (child is ResizingPanel) - SaveLayout(xmlWriter, child as ResizingPanel); - } - - xmlWriter.WriteEndElement(); - } - - /// - /// Save layout as xml to a - /// - /// Text writter object which receive the xml text - /// The writer is not closed. - public void SaveLayout(TextWriter textWriter) - { - XmlTextWriter sw = new XmlTextWriter(textWriter); - - sw.Formatting = Formatting.Indented; - sw.Indentation = 4; - - SaveLayout(sw); - - } - - /// - /// Save layout as xml to generic stream - /// - /// Stream receiving the xml string - /// The stream is not closed - public void SaveLayout(Stream backendStream) - { - XmlTextWriter sw = new XmlTextWriter(backendStream, Encoding.Default); - - sw.Formatting = Formatting.Indented; - sw.Indentation = 4; - - SaveLayout(sw); - } - - /// - /// Save layout as xml text into a file - /// - /// Path to the file - /// The file is created as new or overwritten is already exist a file with same name. - public void SaveLayout(string filename) - { - using (FileStream stream = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite)) - SaveLayout(stream); - } - - const string layoutFileVersion = "1.2.1"; - - /// - /// Send layout configuration to a object - /// - /// Object which stores the xml - /// The writer is not closed. - public void SaveLayout(XmlWriter sw) - { - if (!_isControlLoaded) - throw new InvalidOperationException("Unable to serialize docking layout while DockingManager control is unloaded"); - - sw.WriteStartElement("DockingManager"); - sw.WriteAttributeString("version", layoutFileVersion); - - if (Content is ResizingPanel) - SaveLayout(sw, Content as ResizingPanel); - else if (Content is DocumentPane) - SaveLayout(sw, Content as DocumentPane); - else if (Content is DocumentPaneResizingPanel) - SaveLayout(sw, Content as DocumentPaneResizingPanel); - - sw.WriteStartElement("Hidden"); - foreach (DockableContent content in _hiddenContents) - { - SaveLayout(sw, content); - } - sw.WriteEndElement(); - - sw.WriteStartElement("Windows"); - foreach (DockableFloatingWindow flWindow in _floatingWindows) - { - SaveLayout(sw, flWindow); - } - sw.WriteEndElement(); - - sw.WriteEndElement();//dockingmanager - - sw.Flush(); - } - - - void DetachContentFromDockingManager(DockableContent content) - { - if (content.State == DockableContentState.AutoHide) - { - DockablePane parentContainer = content.Parent as DockablePane; - if (parentContainer != null && - parentContainer.Items.Count == 1) - ToggleAutoHide(content.Parent as DockablePane); - } - if (content.State == DockableContentState.DockableWindow || - content.State == DockableContentState.FloatingWindow) - { - DockablePane parentContainer = content.Parent as DockablePane; - - if (parentContainer != null && - parentContainer.Items.Count == 1) - { - FloatingWindow floatingWindow = Window.GetWindow(content) as FloatingWindow; - floatingWindow.Close(true); - } - } - //this content can be hidden also if was contained in closed floating window - if (content.State == DockableContentState.Hidden) - Show(content); - - content.DetachFromContainerPane(); - } - - - public delegate void DeserializationCallbackHandler(object sender, DeserializationCallbackEventArgs e); - public DeserializationCallbackHandler DeserializationCallback { get; set; } - - - void ShowAllHiddenContents() - { - while (_hiddenContents.Count > 0) - { - Debug.Assert(_hiddenContents[0].State == DockableContentState.Hidden); - Show(_hiddenContents[0]); - } - } - - void RestoreDocumentPaneLayout(XmlElement childElement, out DocumentPane mainExistingDocumentPane, out DocumentPaneResizingPanel existingDocumentPanel, DockableContent[] dockableContents) - { - mainExistingDocumentPane = (Content is DocumentPane) ? Content as DocumentPane : GetMainDocumentPane(Content as ResizingPanel); - if (mainExistingDocumentPane != null) - { - existingDocumentPanel = mainExistingDocumentPane.GetParentDocumentPaneResizingPanel(); - } - else - { - existingDocumentPanel = null; - } - - if (existingDocumentPanel != null) - { - if (existingDocumentPanel.Parent is ResizingPanel) - { - ((ResizingPanel)existingDocumentPanel.Parent).RemoveChild(existingDocumentPanel); - } - else if (existingDocumentPanel.Parent is DockingManager) - { - ((DockingManager)existingDocumentPanel.Parent).Content = null; - } - } - else if (mainExistingDocumentPane != null) - { - if (mainExistingDocumentPane.Parent is ResizingPanel) - { - ((ResizingPanel)mainExistingDocumentPane.Parent).RemoveChild(mainExistingDocumentPane); - } - else if (mainExistingDocumentPane.Parent is DockingManager) - { - ((DockingManager)mainExistingDocumentPane.Parent).Content = null; - } - } - - foreach (XmlElement contentElement in childElement.ChildNodes) - { - if (contentElement.HasAttribute("Name")) - { - DockableContent foundContent = null; - string contentName = contentElement.GetAttribute("Name"); - foreach (DockableContent content in dockableContents) - { - if (content.Name == contentName) - { - foundContent = content; - break; - } - } - - if (foundContent == null && - DeserializationCallback != null) - { - DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); - DeserializationCallback(this, e); - - foundContent = e.Content; - } - - - if (foundContent != null) - { - DetachContentFromDockingManager(foundContent); - mainExistingDocumentPane.Items.Add(foundContent); - foundContent.SetStateToDocument(); - - //call custom layout persistence method - foundContent.RestoreLayout(contentElement); - } - } - } - } - - ResizingPanel RestoreLayout(XmlElement panelElement, DockableContent[] dockableContents) - { - ResizingPanel panel = new ResizingPanel(); - - if (panelElement.HasAttribute("Orientation")) - panel.Orientation = (Orientation)Enum.Parse(typeof(Orientation), panelElement.GetAttribute("Orientation")); - - - foreach (XmlElement childElement in panelElement.ChildNodes) - { - if (childElement.Name == "ResizingPanel") - { - ResizingPanel childPanel = RestoreLayout(childElement, dockableContents); - if (childElement.HasAttribute("ResizeWidth")) - ResizingPanel.SetResizeWidth(childPanel, (GridLength)GLConverter.ConvertFromInvariantString(childElement.GetAttribute("ResizeWidth"))); - if (childElement.HasAttribute("ResizeHeight")) - ResizingPanel.SetResizeHeight(childPanel, (GridLength)GLConverter.ConvertFromInvariantString(childElement.GetAttribute("ResizeHeight"))); - if (childElement.HasAttribute("EffectiveSize")) - ResizingPanel.SetEffectiveSize(childPanel, (Size)(new SizeConverter()).ConvertFromInvariantString(childElement.GetAttribute("EffectiveSize"))); - - panel.Children.Add(childPanel); - } - #region Restore DockablePane - else if (childElement.Name == "DockablePane") - { - DockablePane pane = new DockablePane(); - - if (childElement.HasAttribute("Anchor")) - pane.Anchor = (AnchorStyle)Enum.Parse(typeof(AnchorStyle), childElement.GetAttribute("Anchor")); - if (childElement.HasAttribute("ResizeWidth")) - ResizingPanel.SetResizeWidth(pane, (GridLength)GLConverter.ConvertFromInvariantString(childElement.GetAttribute("ResizeWidth"))); - if (childElement.HasAttribute("ResizeHeight")) - ResizingPanel.SetResizeHeight(pane, (GridLength)GLConverter.ConvertFromInvariantString(childElement.GetAttribute("ResizeHeight"))); - if (childElement.HasAttribute("EffectiveSize")) - ResizingPanel.SetEffectiveSize(pane, (Size)(new SizeConverter()).ConvertFromInvariantString(childElement.GetAttribute("EffectiveSize"))); - - //storeWriter.WriteAttributeString( - // "EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(ContainerPane))); - - bool toggleAutoHide = false; - foreach (XmlElement contentElement in childElement.ChildNodes) - { - if (contentElement.HasAttribute("Name")) - { - DockableContent foundContent = null; - string contentName = contentElement.GetAttribute("Name"); - foreach (DockableContent content in dockableContents) - { - if (content.Name == contentName) - { - foundContent = content; - break; - } - } - - if (foundContent == null && - DeserializationCallback != null) - { - DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); - DeserializationCallback(this, e); - - foundContent = e.Content; - } - - - if (foundContent != null) - { - DetachContentFromDockingManager(foundContent); - pane.Items.Add(foundContent); - foundContent.SetStateToDock(); - if (contentElement.HasAttribute("AutoHide") && - XmlConvert.ToBoolean(contentElement.GetAttribute("AutoHide")) && - pane.Items.Count == 1) - toggleAutoHide = true; - - //call custom layout persistence method - foundContent.RestoreLayout(contentElement); - } - } - } - if (pane.Items.Count > 0) - { - if (toggleAutoHide) - ToggleAutoHide(pane); - - if (pane.Items.Count > 0) - panel.Children.Add(pane); - } - } - #endregion - #region Restore Contents inside a DocumentPane - else if (childElement.Name == "DocumentPanePlaceHolder") - { - DocumentPaneResizingPanel existingDocumentPanel = null; - DocumentPane mainExistingDocumentPane = null; - - RestoreDocumentPaneLayout(childElement, out mainExistingDocumentPane, out existingDocumentPanel, dockableContents); - - if (existingDocumentPanel != null) - { - panel.Children.Add(existingDocumentPanel); - } - else if (mainExistingDocumentPane != null) - { - panel.Children.Add(mainExistingDocumentPane); - } - } - - #endregion - } - - return panel; - } - - - public void RestoreLayout(Stream backendStream) - { - XmlDocument doc = new XmlDocument(); - - doc.Load(backendStream); - - RestoreLayout(doc); - } - - public void RestoreLayout(XmlReader reader) - { - XmlDocument doc = new XmlDocument(); - - doc.Load(reader); - - RestoreLayout(doc); - } - - public void RestoreLayout(string filename) - { - XmlDocument doc = new XmlDocument(); - - doc.Load(filename); - - RestoreLayout(doc); - } - - public void RestoreLayout(TextReader reader) - { - XmlDocument doc = new XmlDocument(); - - doc.Load(reader); - - RestoreLayout(doc); - } - - - - void RestoreLayout(XmlDocument doc) - { - if (!_isControlLoaded) - throw new InvalidOperationException("Unable to deserialize a docking layout while DockingManager control is unloaded"); - - if (doc.DocumentElement == null || - doc.DocumentElement.Name != "DockingManager") - { - Debug.Assert(false, "Layout file hasn't a valid structure!"); - throw new InvalidOperationException("Layout file had not a valid structure!"); - } - - if (doc.DocumentElement.GetAttribute("version") != layoutFileVersion) - throw new FileFormatException("Unsupported layout file version"); - - if (doc.DocumentElement.ChildNodes.Count != 3 || - (doc.DocumentElement.ChildNodes[0].Name != "ResizingPanel" && doc.DocumentElement.ChildNodes[0].Name != "DocumentPanePlaceHolder") || - doc.DocumentElement.ChildNodes[1].Name != "Hidden" || - doc.DocumentElement.ChildNodes[2].Name != "Windows") - { - Debug.Assert(false, "Layout file hasn't a valid structure!"); - throw new InvalidOperationException("Layout file hasn't a valid structure!"); - } - - //Hide temp windows - HideAutoHideWindow(); - HideNavigatorWindow(); - HideDocumentNavigatorWindow(); - - DockableContent[] actualContents = DockableContents; - - - //show all hidden contents - ShowAllHiddenContents(); - - //restore main panel - XmlElement rootElement = doc.DocumentElement.ChildNodes[0] as XmlElement; - if (rootElement.Name == "ResizingPanel") - { - this.Content = RestoreLayout(rootElement, actualContents); - } - else if (rootElement.Name == "DocumentPanePlaceHolder") - { - DocumentPaneResizingPanel existingDocumentPanel = null; - DocumentPane mainExistingDocumentPane = null; - - RestoreDocumentPaneLayout(rootElement, out mainExistingDocumentPane, out existingDocumentPanel, actualContents); - - if (existingDocumentPanel != null) - { - this.Content = existingDocumentPanel; - } - else if (mainExistingDocumentPane != null) - { - this.Content = mainExistingDocumentPane; - } - } - - //restore hidden contents - foreach (XmlElement hiddenContentElement in doc.DocumentElement.ChildNodes[1].ChildNodes) - { - foreach (DockableContent hiddenContent in actualContents) - { - if (hiddenContentElement.GetAttribute("Name") == hiddenContent.Name - && hiddenContent.State != DockableContentState.Hidden) - { - Hide(hiddenContent); - hiddenContent.RestoreLayout(hiddenContentElement); - } - } - } - - //restore floating windows - foreach (XmlElement flWindowElement in doc.DocumentElement.ChildNodes[2].ChildNodes) - { - if (flWindowElement.ChildNodes.Count != 1) - continue;//handles invalid layouts structures - - bool isDockableWindow = XmlConvert.ToBoolean(flWindowElement.GetAttribute("IsDockableWindow")); - Point location = new Point(XmlConvert.ToDouble(flWindowElement.GetAttribute("Left")), XmlConvert.ToDouble(flWindowElement.GetAttribute("Top"))); - Size size = new Size(XmlConvert.ToDouble(flWindowElement.GetAttribute("Width")), XmlConvert.ToDouble(flWindowElement.GetAttribute("Height"))); - - DockableFloatingWindow flWindow = new DockableFloatingWindow(this); - flWindow.Left = location.X; - flWindow.Top = location.Y; - flWindow.Width = size.Width; - flWindow.Height = size.Height; - flWindow.Owner = Window.GetWindow(this); - - XmlElement paneElement = flWindowElement.ChildNodes[0] as XmlElement; - - FloatingDockablePane paneForFloatingWindow = new FloatingDockablePane(flWindow); - if (paneElement.HasAttribute("ResizingWidth")) - ResizingPanel.SetResizeWidth(paneForFloatingWindow, (GridLength)GLConverter.ConvertFromInvariantString(paneElement.GetAttribute("ResizeWidth"))); - if (paneElement.HasAttribute("ResizingHeight")) - ResizingPanel.SetResizeHeight(paneForFloatingWindow, (GridLength)GLConverter.ConvertFromInvariantString(paneElement.GetAttribute("ResizeHeight"))); - paneForFloatingWindow.Anchor = (AnchorStyle)Enum.Parse(typeof(AnchorStyle), paneElement.GetAttribute("Anchor")); - - - DockableContent contentToTransfer = null; - foreach (XmlElement contentElement in paneElement.ChildNodes) - { - #region Find the content to transfer - string contentToFindName = contentElement.GetAttribute("Name"); - foreach (DockableContent content in actualContents) - { - if (contentToFindName == content.Name) - { - contentToTransfer = content; - break; - } - } - - if (contentToTransfer == null && - DeserializationCallback != null) - { - DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentToFindName); - DeserializationCallback(this, e); - - contentToTransfer = e.Content; - } - #endregion - - - if (contentToTransfer != null) - { - DetachContentFromDockingManager(contentToTransfer); - paneForFloatingWindow.Items.Add(contentToTransfer); - contentToTransfer.RestoreLayout(contentElement); - } - } - - flWindow.HostedPane = paneForFloatingWindow; - flWindow.IsDockableWindow = isDockableWindow; - - RegisterFloatingWindow(flWindow); - - flWindow.ApplyTemplate(); - flWindow.Show(); - - } - } - - /// - /// Static converter used to convert GridLength from/to string - /// - static GridLengthConverter GLConverter = new GridLengthConverter(); - - #endregion - - - #region OnClosing/OnClosedDocument events - - /// - /// Event fired when the document is about to be closed - /// - public event EventHandler DocumentClosing; - - /// - /// Event fired when a document has been closed - /// - /// Note that when a document is closed, property like or returns null. - public event EventHandler DocumentClosed; - - /// - /// Ovveride this method to handle event. - /// - protected virtual void OnDocumentClosing(CancelEventArgs e) - { - if (DocumentClosing != null && !e.Cancel) - { - DocumentClosing(this, e); - } - } - - /// - /// Ovveride this method to handle event. - /// - protected virtual void OnDocumentClosed() - { - if (DocumentClosed != null) - DocumentClosed(this, EventArgs.Empty); - } - - internal void FireDocumentClosingEvent(CancelEventArgs e) - { - OnDocumentClosing(e); - } - - internal void FireDocumentClosedEvent() - { - OnDocumentClosed(); - } - - - public event EventHandler RequestDocumentClose; - - internal bool FireRequestDocumentCloseEvent(DocumentContent doc) - { - bool res = false; - - if (RequestDocumentClose != null) - { - RequestDocumentCloseEventArgs args = new RequestDocumentCloseEventArgs(doc); - RequestDocumentClose(this, args); - res = !args.Cancel; - } - - return res; - } - - - #endregion - - - } -} diff --git a/src/Libraries/AvalonDock/DocumentContent.cs b/src/Libraries/AvalonDock/DocumentContent.cs deleted file mode 100644 index 8b143cae7e..0000000000 --- a/src/Libraries/AvalonDock/DocumentContent.cs +++ /dev/null @@ -1,298 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Diagnostics; - - -namespace AvalonDock -{ - /// - /// Represent a document which can be host by a . - /// - /// A document is always hosted by a usually in the central area of . - /// It has limited dragging features becaus it can be only moved to an other and can't float as a separate window. - /// You can access all documents within with property . - public class DocumentContent : ManagedContent - { - - static DocumentContent() - { - //DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentContent), new FrameworkPropertyMetadata(typeof(DocumentContent))); - - //Control.WidthProperty.OverrideMetadata(typeof(DocumentContent), - // new FrameworkPropertyMetadata(new PropertyChangedCallback(OnSizePropertyChanged), new CoerceValueCallback(CourceSizeToNaN))); - //Control.HeightProperty.OverrideMetadata(typeof(DocumentContent), - // new FrameworkPropertyMetadata(new PropertyChangedCallback(OnSizePropertyChanged), new CoerceValueCallback(CourceSizeToNaN))); - } - - public DocumentContent() - { - base.PropertyChanged += new PropertyChangedEventHandler(DocumentContent_PropertyChanged); - } - - - - DateTime _lastActivation = DateTime.MinValue; - - internal DateTime LastActivation - { - get { return _lastActivation; } - } - - void DocumentContent_PropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == "IsActiveContent") - { - if (IsActiveContent) - _lastActivation = DateTime.Now; - } - } - - static void OnSizePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) - { } - - static object CourceSizeToNaN(DependencyObject sender, object value) - { - //return double.NaN; - return value; - } - - string _infoTip; - - /// - /// Gets or sets the information text attached to the document content. - /// - /// This text is usually displayed when users switch between documents and helps them to choose the right one. - public string InfoTip - { - get { return _infoTip; } - set - { - _infoTip = value; - NotifyPropertyChanged("InfoTip"); - } - } - - string _contentTypeDescription; - - /// - /// Gets or sets a text which describes the type of content contained in this document. - /// - public string ContentTypeDescription - { - get { return _contentTypeDescription; } - set - { - _contentTypeDescription = value; - NotifyPropertyChanged("ContentTypeDescription"); - } - } - - bool _isFloatingAllowed; - - /// - /// Gets or sets a value indicating if this document can float over main window (VS2010 Feature). - /// - public bool IsFloatingAllowed - { - get { return _isFloatingAllowed; } - set - { - _isFloatingAllowed = value; - NotifyPropertyChanged("IsFloatingAllowed"); - } - } - - protected override void OnDragStart(Point ptMouse, Point ptRelativeMouse) - { - //Manager.Drag(this, this.PointToScreenDPI(ptMouse), ptRelativeMouse); - Manager.Drag(this, HelperFunc.PointToScreenWithoutFlowDirection(this, ptMouse), ptRelativeMouse); - - - base.OnDragStart(ptMouse, ptRelativeMouse); - } - - protected override void OnDragMouseMove(object sender, MouseEventArgs e) - { - base.OnDragMouseMove(sender, e); - } - - protected override void OnDragMouseLeave(object sender, MouseEventArgs e) - { - - base.OnDragMouseLeave(sender, e); - } - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - if (DragEnabledArea != null) - { - DragEnabledArea.InputBindings.Add(new InputBinding(ApplicationCommands.Close, new MouseGesture(MouseAction.MiddleClick))); - } - } - - /// - /// Event fired when the document is about to be closed - /// - public event EventHandler Closing; - - /// - /// Event fired when the document has been closed - /// - /// Note that when a document is closed property like or returns null. - public event EventHandler Closed; - - /// - /// Ovveride this method to handle event. - /// - protected virtual void OnClosing(CancelEventArgs e) - { - if (Closing != null && !e.Cancel) - { - Closing(this, e); - } - } - - /// - /// Ovveride this method to handle event. - /// - protected virtual void OnClosed() - { - if (Closed != null) - Closed(this, EventArgs.Empty); - } - - /// - /// Close this content without notifications - /// - internal void InternalClose() - { - - - DocumentPane parentPane = ContainerPane as DocumentPane; - DockingManager manager = Manager; - - if (manager != null) - { - if (manager.ActiveContent == this) - manager.ActiveContent = null; - - if (manager.ActiveDocument == this) - manager.ActiveDocument = null; - } - - if (parentPane != null) - { - parentPane.Items.Remove(this); - - parentPane.CheckContentsEmpty(); - } - else - { - FloatingDockablePane floatingParentPane = ContainerPane as FloatingDockablePane; - if (floatingParentPane != null) - { - floatingParentPane.RemoveContent(0); - if (floatingParentPane.FloatingWindow != null && - !floatingParentPane.FloatingWindow.IsClosing) - floatingParentPane.FloatingWindow.Close(); - } - } - - - - - } - - /// - /// Close this document removing it from its parent container - /// - /// Use this function to close a document and remove it from its parent container. Please note - /// that if you simply remove it from its parent without call this method, events like - /// / are not called. - /// - /// Note: cannot be closed: AvalonDock simply hide a removing all the reference to it. - /// - /// - public bool Close() - { - if (!IsCloseable) - return false; - - //if documents are attached to an external source via DockingManager.DocumentsSource - //let application host handle the document closing by itself - if (Manager.DocumentsSource != null) - { - return Manager.FireRequestDocumentCloseEvent(this); - } - - - CancelEventArgs e = new CancelEventArgs(false); - OnClosing(e); - - if (e.Cancel) - return false; - - DockingManager oldManager = Manager; - - if (Manager != null) - Manager.FireDocumentClosingEvent(e); - - if (e.Cancel) - return false; - - InternalClose(); - - OnClosed(); - - if (oldManager != null) - oldManager.FireDocumentClosedEvent(); - - - //if (Parent != null) - // throw new InvalidOperationException(); - Debug.Assert(Parent == null, "Parent MUST bu null after Doc is closed"); - return true; - } - - - - } -} diff --git a/src/Libraries/AvalonDock/DocumentFloatingWindow.cs b/src/Libraries/AvalonDock/DocumentFloatingWindow.cs deleted file mode 100644 index da060daa99..0000000000 --- a/src/Libraries/AvalonDock/DocumentFloatingWindow.cs +++ /dev/null @@ -1,357 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Windows.Markup; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Interop; - -namespace AvalonDock -{ - public class DocumentFloatingWindow : FloatingWindow - { - static DocumentFloatingWindow() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentFloatingWindow), new FrameworkPropertyMetadata(typeof(DocumentFloatingWindow))); - - Window.AllowsTransparencyProperty.OverrideMetadata(typeof(DocumentFloatingWindow), new FrameworkPropertyMetadata(true)); - Window.WindowStyleProperty.OverrideMetadata(typeof(DocumentFloatingWindow), new FrameworkPropertyMetadata(WindowStyle.None)); - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(DocumentFloatingWindow), new FrameworkPropertyMetadata(false)); - } - - - public DocumentFloatingWindow(DockingManager manager) - :base(manager) - { - } - - Pane _previousPane = null; - - int _arrayIndexPreviousPane = -1; - - public DocumentFloatingWindow(DockingManager manager, DocumentContent content) - : this(manager) - { - //create a new temporary pane - FloatingDockablePane pane = new FloatingDockablePane(this); - - //setup window size - Width = content.ContainerPane.ActualWidth; - Height = content.ContainerPane.ActualHeight; - - //save current content position in container pane - _previousPane = content.ContainerPane; - _arrayIndexPreviousPane = _previousPane.Items.IndexOf(content); - pane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); - pane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); - - //remove content from container pane - content.ContainerPane.RemoveContent(_arrayIndexPreviousPane); - - //add content to my temporary pane - pane.Items.Add(content); - - //let templates access this pane - HostedPane = pane; - - if (IsDocumentFloatingAllowed) - { - AllowsTransparency = false; - WindowStyle = WindowStyle.ToolWindow; - NotifyPropertyChanged("IsDocumentFloatingAllowed"); - } - } - - public bool IsDocumentFloatingAllowed - { - get - { - if (HostedPane != null && - HostedPane.Items.Count > 0) - return ((DocumentContent)HostedPane.Items[0]).IsFloatingAllowed; - - return false; - } - } - - - internal override void OnEndDrag() - { - if (HostedPane.Items.Count > 0) - { - DocumentContent content = HostedPane.Items[0] as DocumentContent; - if (!content.IsFloatingAllowed) - { - HostedPane.Items.RemoveAt(0); - _previousPane.Items.Insert(_arrayIndexPreviousPane, content); - _previousPane.SelectedItem = content; - Close(); - } - else - { - DocumentPane originalDocumentPane = _previousPane as DocumentPane; - originalDocumentPane.CheckContentsEmpty(); - } - } - else - { - DocumentPane originalDocumentPane = _previousPane as DocumentPane; - originalDocumentPane.CheckContentsEmpty(); - Close(); - } - - - base.OnEndDrag(); - } - - - public override Pane ClonePane() - { - DocumentPane paneToAnchor = new DocumentPane(); - - ////transfer the resizing panel sizes - //paneToAnchor.SetValue(ResizingPanel.ResizeWidthProperty, - // HostedPane.GetValue(ResizingPanel.ResizeWidthProperty)); - //paneToAnchor.SetValue(ResizingPanel.ResizeHeightProperty, - // HostedPane.GetValue(ResizingPanel.ResizeHeightProperty)); - - ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height)); - - //transfer contents from hosted pane in the floating window and - //the new created dockable pane - while (HostedPane.Items.Count > 0) - { - paneToAnchor.Items.Add( - HostedPane.RemoveContent(0)); - } - - return paneToAnchor; - } - - - protected override void OnInitialized(EventArgs e) - { - - if (IsDocumentFloatingAllowed) - { - if (HostedPane != null) - { - Content = HostedPane; - } - } - - base.OnInitialized(e); - } - - internal override void OnShowSelectionBox() - { - this.Visibility = Visibility.Hidden; - base.OnShowSelectionBox(); - } - - internal override void OnHideSelectionBox() - { - this.Visibility = Visibility.Visible; - base.OnHideSelectionBox(); - } - #region Commands - - protected override void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == TabbedDocumentCommand) - { - DocumentContent currentContent = HostedPane.SelectedItem as DocumentContent; - - _previousPane.Items.Insert(0, HostedPane.RemoveContent(HostedPane.SelectedIndex)); - _previousPane.SelectedIndex = 0; - - if (HostedPane.Items.Count == 0) - this.Close(); - e.Handled = true; - } - else if (e.Command == CloseCommand) - { - DocumentContent docContent = this.HostedPane.Items[0] as DocumentContent; - e.Handled = docContent.Close(); - } - - base.OnExecuteCommand(sender, e); - } - - - #endregion - //#region Drag - //protected override IntPtr FilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) - //{ - // handled = false; - - // if (!IsDocumentFloatingAllowed) - // return IntPtr.Zero; - - // switch (msg) - // { - // case WM_SIZE: - // case WM_MOVE: - // //HostedPane.ReferencedPane.SaveFloatingWindowSizeAndPosition(this); - // break; - // case WM_NCLBUTTONDOWN: - // if (IsDockableWindow && wParam.ToInt32() == HTCAPTION) - // { - // short x = (short)((lParam.ToInt32() & 0xFFFF)); - // short y = (short)((lParam.ToInt32() >> 16)); - - // Point clickPoint = this.TransformToDeviceDPI(new Point(x, y)); - // Manager.Drag(this, clickPoint, new Point(clickPoint.X - Left, clickPoint.Y - Top)); - - // handled = true; - // } - // break; - // case WM_NCLBUTTONDBLCLK: - // if (IsDockableWindow && wParam.ToInt32() == HTCAPTION) - // { - // if (IsDockableWindow) - // { - // if (_previousPane != null) - // { - // if (_previousPane.GetManager() == null) - // { - // DockablePane newContainerPane = new DockablePane(); - // newContainerPane.Items.Add(HostedPane.RemoveContent(0)); - // newContainerPane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); - // newContainerPane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); - // Manager.Anchor(newContainerPane, ((DockablePane)_previousPane).Anchor); - // } - // else - // { - // if (_arrayIndexPreviousPane > _previousPane.Items.Count) - // _arrayIndexPreviousPane = _previousPane.Items.Count; - - // DockableContent currentContent = HostedPane.Items[0] as DockableContent; - // _previousPane.Items.Insert(_arrayIndexPreviousPane, HostedPane.RemoveContent(0)); - // _previousPane.SelectedIndex = _arrayIndexPreviousPane; - // currentContent.SetStateToDock(); - - // } - // this.Close(); - // } - - // handled = true; - // } - // } - // break; - // case WM_NCRBUTTONDOWN: - // if (wParam.ToInt32() == HTCAPTION) - // { - // short x = (short)((lParam.ToInt32() & 0xFFFF)); - // short y = (short)((lParam.ToInt32() >> 16)); - - // ContextMenu cxMenu = FindResource(new ComponentResourceKey(typeof(DockingManager), ContextMenuElement.FloatingWindow)) as ContextMenu; - // if (cxMenu != null) - // { - // foreach (MenuItem menuItem in cxMenu.Items) - // menuItem.CommandTarget = this; - - // cxMenu.Placement = PlacementMode.AbsolutePoint; - // cxMenu.PlacementRectangle = new Rect(new Point(x, y), new Size(0, 0)); - // cxMenu.PlacementTarget = this; - // cxMenu.IsOpen = true; - // } - - // handled = true; - // } - // break; - // case WM_NCRBUTTONUP: - // if (wParam.ToInt32() == HTCAPTION) - // { - - // handled = true; - // } - // break; - - // } - - - // return IntPtr.Zero; - //} - //#endregion - - protected override void Redock() - { - if (_previousPane != null) - { - if (_previousPane.GetManager() == null) - { - Manager.MainDocumentPane.Items.Insert(0, HostedPane.RemoveContent(0)); - } - else - { - if (_arrayIndexPreviousPane > _previousPane.Items.Count) - _arrayIndexPreviousPane = _previousPane.Items.Count; - - _previousPane.Items.Insert(_arrayIndexPreviousPane, HostedPane.RemoveContent(0)); - _previousPane.SelectedIndex = _arrayIndexPreviousPane; - } - this.Close(); - } - - base.Redock(); - } - - - protected override void OnClosing(CancelEventArgs e) - { - base.OnClosing(e); - - if (e.Cancel) - return; - - if (this.HostedPane.Items.Count > 0) - { - DocumentContent docContent = this.HostedPane.Items[0] as DocumentContent; - if (!docContent.Close()) - e.Cancel = true; - else - this.HostedPane.Items.Remove(docContent); - } - - } - } -} diff --git a/src/Libraries/AvalonDock/DocumentNavigator.cs b/src/Libraries/AvalonDock/DocumentNavigator.cs deleted file mode 100644 index 5150241baf..0000000000 --- a/src/Libraries/AvalonDock/DocumentNavigator.cs +++ /dev/null @@ -1,252 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Input; -using System.Windows.Controls.Primitives; - -namespace AvalonDock -{ - public class DocumentNavigatorWindow : Window, INotifyPropertyChanged - { - static DocumentNavigatorWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(typeof(DocumentNavigatorWindow))); - - - Window.AllowsTransparencyProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(true)); - Window.WindowStyleProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(WindowStyle.None)); - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(false)); - Control.BackgroundProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); - } - - public DocumentNavigatorWindow() - { - } - - void OnKeyUp(object sender, KeyEventArgs e) - { - if (e.Key != Key.Tab) - CloseThisWindow();//Hide(); - else - { - e.Handled = true; - MoveNextSelectedContent(); - } - } - - void OnKeyDown(object sender, KeyEventArgs e) - { - if (e.Key != Key.Tab) - CloseThisWindow();//Hide(); - else - { - e.Handled = true; - } - } - - void CloseThisWindow() - { - Window wndParent = this.Owner; - Close(); - wndParent.Activate(); - } - - DockingManager _manager; - public DocumentNavigatorWindow(DockingManager manager) - :this() - { - _manager = manager; - Keyboard.AddKeyUpHandler(this, new KeyEventHandler(this.OnKeyUp)); - Keyboard.AddKeyDownHandler(this, new KeyEventHandler(this.OnKeyDown)); - } - - - protected override void OnActivated(EventArgs e) - { - base.OnActivated(e); - - List listOfDocuments = _manager.FindContents(); - List docs = new List(); - listOfDocuments.ForEach((DocumentContent doc) => - { - docs.Add(new NavigatorWindowDocumentItem(doc)); - }); - - //docs.Sort((NavigatorWindowDocumentItem item1, NavigatorWindowDocumentItem item2) => - //{ - // if (item1 == item2 || - // item1.LastActivation == item2.LastActivation) - // return 0; - // return (item1.LastActivation < item2.LastActivation) ? 1 : -1; - //}); - - Documents = docs; - - _internalSelect = true; - - SelectedContent = Documents.Find((NavigatorWindowDocumentItem docItem) => - { - return docItem.ItemContent == _manager.ActiveDocument; - }); - - _internalSelect = false; - } - - protected override void OnDeactivated(EventArgs e) - { - if (_manager != null) - { - Window mainWindow = Window.GetWindow(_manager); - if (mainWindow != null) - { - mainWindow.Activate(); - if (SelectedContent != null) - { - _manager.Show(SelectedContent.ItemContent as DocumentContent); - SelectedContent.ItemContent.SetAsActive(); - } - } - } - - if (!_isClosing) - CloseThisWindow();// Hide(); - - base.OnDeactivated(e); - } - - - - ListBox _itemsControl; - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _itemsControl = GetTemplateChild("PART_ScrollingPanel") as ListBox; - } - - List _documents = new List(); - - public List Documents - { - get { return _documents; } - private - set - { - _documents = value; - NotifyPropertyChanged("Documents"); - } - } - - NavigatorWindowDocumentItem _selectedContent; - - bool _internalSelect = false; - - public NavigatorWindowDocumentItem SelectedContent - { - get - { - return _selectedContent; - } - set - { - if (_selectedContent != value) - { - _selectedContent = value; - NotifyPropertyChanged("SelectedContent"); - - if (!_internalSelect && _selectedContent != null) - CloseThisWindow();//Hide(); - - if (_internalSelect && _itemsControl != null) - _itemsControl.ScrollIntoView(_selectedContent); - } - } - } - - - public void MoveNextSelectedContent() - { - if (_selectedContent == null) - return; - - if (Documents.Contains(SelectedContent)) - { - int indexOfSelecteContent = Documents.IndexOf(_selectedContent); - - if (indexOfSelecteContent == Documents.Count - 1) - { - indexOfSelecteContent = 0; - } - else - indexOfSelecteContent++; - - _internalSelect = true; - SelectedContent = Documents[indexOfSelecteContent]; - _internalSelect = false; - } - } - - bool _isClosing = false; - protected override void OnClosing(CancelEventArgs e) - { - _isClosing = true; - - base.OnClosing(e); - } - - protected override void OnClosed(EventArgs e) - { - //reset documents list to avoid WPF Bug: - //http://social.msdn.microsoft.com/forums/en/wpf/thread/f3fc5b7e-e035-4821-908c-b6c07e5c7042/ - //http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321955 - Documents = new List(); - - base.OnClosed(e); - } - - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - } - -} diff --git a/src/Libraries/AvalonDock/DocumentPane.cs b/src/Libraries/AvalonDock/DocumentPane.cs deleted file mode 100644 index 47379a056a..0000000000 --- a/src/Libraries/AvalonDock/DocumentPane.cs +++ /dev/null @@ -1,520 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; - -namespace AvalonDock -{ - public class DocumentPane : Pane - { - static DocumentPane() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentPane), new FrameworkPropertyMetadata(typeof(DocumentPane))); - } - - public DocumentPane() - { - this.Loaded += new RoutedEventHandler(DocumentPane_Loaded); - } - - void DocumentPane_Loaded(object sender, RoutedEventArgs e) - { - if (Parent == null) - return; - - if (GetManager() == null) - throw new InvalidOperationException("DocumentPane must be put under a DockingManager!"); - - //try to set this as main document pane - if (GetManager().MainDocumentPane == null) - { - GetManager().MainDocumentPane = this; - NotifyPropertyChanged("IsMainDocumentPane"); - } - else - { - //or ensure that this document pane is under or at the same level of the MainDocumentPane - GetManager().EnsurePanePositionIsValid(this); - } - } - - public bool? IsMainDocumentPane - { - get - { - if (GetManager() == null) - return null; - - return GetManager().MainDocumentPane == this; - } - } - - protected override void OnInitialized(EventArgs e) - { - this.CommandBindings.Add( - new CommandBinding(ShowDocumentsListMenuCommand, ExecutedShowDocumentsListMenuCommand, CanExecuteShowDocumentsListMenuCommand)); - this.CommandBindings.Add( - new CommandBinding(ApplicationCommands.Close, ExecutedCloseCommand, CanExecuteCloseCommand)); - this.CommandBindings.Add( - new CommandBinding(CloseCommand, ExecutedCloseCommand, CanExecuteCloseCommand)); - - this.CommandBindings.Add( - new CommandBinding(CloseAllButThisCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(NewHorizontalTabGroupCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - this.CommandBindings.Add( - new CommandBinding(NewVerticalTabGroupCommand, this.OnExecuteCommand, this.OnCanExecuteCommand)); - - - base.OnInitialized(e); - } - - #region DocumentPane Commands - - - #region Show Document Window List Command - - public static RoutedCommand ShowDocumentsListMenuCommand = new RoutedCommand(); - - public void ExecutedShowDocumentsListMenuCommand(object sender, - ExecutedRoutedEventArgs e) - { - //MessageBox.Show("ShowOptionsMenu"); - ShowDocumentsListMenu(this, null); - } - - - public void CanExecuteShowDocumentsListMenuCommand(object sender, - CanExecuteRoutedEventArgs e) - { - e.CanExecute = true; - } - - #endregion - - - #region Close Command - - //ApplicationCommands.Close command.... - - public void ExecutedCloseCommand(object sender, - ExecutedRoutedEventArgs e) - { - if (GetManager() == null) - return; - - ManagedContent contentToClose = SelectedItem as ManagedContent; - - if (e.Parameter is ManagedContent) - contentToClose = e.Parameter as ManagedContent; - - DockableContent dockableContent = contentToClose as DockableContent; - - if (dockableContent != null) - CloseOrHide(dockableContent); - else - { - DocumentContent documentContent = contentToClose as DocumentContent; - documentContent.Close(); - - //if (documentContent != null) - // Items.Remove(documentContent); - - //CheckContentsEmpty(); - } - - } - - - public void CanExecuteCloseCommand(object sender, - CanExecuteRoutedEventArgs e) - { - e.CanExecute = true; - } - - #endregion - - #region Activate Document Command - public static RoutedCommand ActivateDocumentCommand = new RoutedCommand(); - - public void ExecutedActivateDocumentCommand(object sender, - ExecutedRoutedEventArgs e) - { - ManagedContent doc = e.Parameter as ManagedContent; - if (doc != null) - { - if (!DocumentTabPanel.GetIsHeaderVisible(doc)) - { - DocumentPane parentPane = doc.ContainerPane as DocumentPane; - parentPane.Items.Remove(doc); - parentPane.Items.Insert(0, doc); - } - ////doc.IsSelected = true; - ////Selector.SetIsSelected(doc, true); - //if (this.GetManager() != null) - // this.GetManager().ActiveContent = doc; - doc.SetAsActive(); - } - } - - public void CanExecuteActivateDocumentCommand(object sender, - CanExecuteRoutedEventArgs e) - { - //ManagedContent doc = e.Parameter as ManagedContent; - //if (doc != null && !doc.IsSelected) - e.CanExecute = true; - } - - #endregion - - - #region Commands - private static object syncRoot = new object(); - - - private static RoutedUICommand closeAllButThisCommand = null; - public static RoutedUICommand CloseAllButThisCommand - { - get - { - lock (syncRoot) - { - if (null == closeAllButThisCommand) - { - closeAllButThisCommand = new RoutedUICommand("Close All But This", "CloseAllButThis", typeof(DocumentPane)); - } - } - return closeAllButThisCommand; - } - } - - private static RoutedUICommand closeCommand = null; - public static RoutedUICommand CloseCommand - { - get - { - lock (syncRoot) - { - if (null == closeCommand) - { - closeCommand = new RoutedUICommand("C_lose", "Close", typeof(DocumentPane)); - } - } - return closeCommand; - } - } - - private static RoutedUICommand newHTabGroupCommand = null; - public static RoutedUICommand NewHorizontalTabGroupCommand - { - get - { - lock (syncRoot) - { - if (null == newHTabGroupCommand) - { - newHTabGroupCommand = new RoutedUICommand("New Horizontal Tab Group", "NewHorizontalTabGroup", typeof(DocumentPane)); - } - } - return newHTabGroupCommand; - } - } - - private static RoutedUICommand newVTabGroupCommand = null; - public static RoutedUICommand NewVerticalTabGroupCommand - { - get - { - lock (syncRoot) - { - if (null == newVTabGroupCommand) - { - newVTabGroupCommand = new RoutedUICommand("New Vertical Tab Group", "NewVerticalTabGroup", typeof(DocumentPane)); - } - } - return newVTabGroupCommand; - } - } - - - - internal virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == CloseAllButThisCommand) - { - CloseAllButThis(); - e.Handled = true; - } - else if (e.Command == NewHorizontalTabGroupCommand) - { - NewHorizontalTabGroup(); - e.Handled = true; - } - else if (e.Command == NewVerticalTabGroupCommand) - { - NewVerticalTabGroup(); - e.Handled = true; - } - - } - - protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) - { - e.CanExecute = this.GetManager() != null; - - if (e.CanExecute) - { - if (e.Command == NewHorizontalTabGroupCommand || - e.Command == NewVerticalTabGroupCommand) - { - if (this.Items.Count <= 1) - e.CanExecute = false; - } - } - } - - void CloseAllButThis() - { - DocumentContent activeContent = GetManager().ActiveDocument as DocumentContent; - foreach (DocumentContent cnt in this.GetManager().Documents) - { - if (cnt != activeContent) - cnt.Close(); - } - } - void NewHorizontalTabGroup() - { - ManagedContent activeContent = SelectedItem as ManagedContent; - DocumentPane newContainerPane = new DocumentPane(); - - int indexOfDocumentInItsContainer = activeContent.ContainerPane.Items.IndexOf(activeContent); - activeContent.ContainerPane.RemoveContent(indexOfDocumentInItsContainer); - newContainerPane.Items.Add(activeContent); - - GetManager().Anchor(newContainerPane, this, AnchorStyle.Bottom); - - } - void NewVerticalTabGroup() - { - ManagedContent activeContent = SelectedItem as ManagedContent; - DocumentPane newContainerPane = new DocumentPane(); - - int indexOfDocumentInItsContainer = activeContent.ContainerPane.Items.IndexOf(activeContent); - activeContent.ContainerPane.RemoveContent(indexOfDocumentInItsContainer); - newContainerPane.Items.Add(activeContent); - - GetManager().Anchor(newContainerPane, this, AnchorStyle.Right); - } - - #endregion - - #endregion - - UIElement _optionsContextMenuPlacementTarget; - - public override void OnApplyTemplate() - { - _optionsContextMenuPlacementTarget = GetTemplateChild("PART_ShowContextMenuButton") as UIElement; - - - - base.OnApplyTemplate(); - } - - void ShowDocumentsListMenu(object sender, RoutedEventArgs e) - { - if (Items.Count == 0) - return; //nothings to show - - ContextMenu cxMenuDocuments = (ContextMenu)FindResource("DocumentsListMenu"); - if (cxMenuDocuments != null) - { - cxMenuDocuments.ItemsSource = Items; - cxMenuDocuments.CommandBindings.Add(new CommandBinding(ActivateDocumentCommand, new ExecutedRoutedEventHandler(this.ExecutedActivateDocumentCommand), new CanExecuteRoutedEventHandler(CanExecuteActivateDocumentCommand))); - - if (_optionsContextMenuPlacementTarget != null) - { - cxMenuDocuments.Placement = PlacementMode.Bottom; - cxMenuDocuments.PlacementTarget = _optionsContextMenuPlacementTarget; - } - else - { - cxMenuDocuments.Placement = PlacementMode.MousePoint; - cxMenuDocuments.PlacementTarget = this; - } - - cxMenuDocuments.IsOpen = true; - } - } - - public override bool IsSurfaceVisible - { - get - { - if (IsMainDocumentPane.HasValue && - !IsMainDocumentPane.Value && - Items.Count == 0) - return false; - - return true; - } - } - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - - if (!e.Handled) - { - if (_partHeader != null && - !_partHeader.IsMouseOver) - { - //prevent document content to start dragging when it is clicked outside of the header area - e.Handled = true; - } - } - } - - internal void CheckContentsEmpty() - { - if (Items.Count == 0) - { - bool isMainDocPaneToBeClose = IsMainDocumentPane.HasValue && - IsMainDocumentPane.Value; - - if (isMainDocPaneToBeClose) - { - DockingManager manager = GetManager(); - DocumentPane candidateNewMainDocPane = manager.FindAnotherLogicalChildContained(this); - if (candidateNewMainDocPane != null) - { - ResizingPanel containerPanel = Parent as ResizingPanel; - if (containerPanel != null) - containerPanel.RemoveChild(this); - - manager.MainDocumentPane = candidateNewMainDocPane; - candidateNewMainDocPane.NotifyPropertyChanged("IsMainDocumentPane"); - } - } - else - { - ResizingPanel containerPanel = Parent as ResizingPanel; - if (containerPanel != null) - containerPanel.RemoveChild(this); - } - } - - } - - - internal override ResizingPanel GetContainerPanel() - { - return GetParentDocumentPaneResizingPanel(); - } - - internal DocumentPaneResizingPanel GetParentDocumentPaneResizingPanel() - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(this) as ResizingPanel; - - if (parentPanel == null) - return null; - - while (!(parentPanel is DocumentPaneResizingPanel)) - { - parentPanel = LogicalTreeHelper.GetParent(parentPanel) as ResizingPanel; - - if (parentPanel == null) - return null; - } - - return parentPanel as DocumentPaneResizingPanel; - } - - public override Rect SurfaceRectangle - { - get - { - //it is dragging a document let drop in this document pane - if (GetManager().DragPaneServices.FloatingWindow is DocumentFloatingWindow) - return base.SurfaceRectangle; - - //otherwise we should provide a drop surface for all the DocumentPaneResizingPanel - DocumentPaneResizingPanel parentPanel = GetParentDocumentPaneResizingPanel(); - - if (parentPanel == null) - return base.SurfaceRectangle; - - return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(parentPanel, new Point(0, 0)), new Size(parentPanel.ActualWidth, parentPanel.ActualHeight)); - //return new Rect(parentPanel.PointToScreen(new Point(0, 0)), new Size(parentPanel.ActualWidth, parentPanel.ActualHeight)); - } - } - - protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) - { - if (e.NewItems != null) - { - foreach (object newItem in e.NewItems) - { - if (!(newItem is DockableContent) && - !(newItem is DocumentContent)) - throw new InvalidOperationException("DocumentPane can contain only DockableContents or DocumentContents!"); - - if (newItem is DockableContent && - (((DockableContent)newItem).DockableStyle & DockableStyle.Document) == 0) - { - ((DockableContent)newItem).DockableStyle |= DockableStyle.Document; - } - - } - } - - base.OnItemsChanged(e); - } - - protected override void OnSelectionChanged(SelectionChangedEventArgs e) - { - ManagedContent selectedContent = this.SelectedItem as ManagedContent; - if (selectedContent != null && GetManager() != null) - GetManager().ActiveDocument = selectedContent; - - base.OnSelectionChanged(e); - } - - } -} diff --git a/src/Libraries/AvalonDock/DocumentPaneResizingPanel.cs b/src/Libraries/AvalonDock/DocumentPaneResizingPanel.cs deleted file mode 100644 index 2eeb3c6988..0000000000 --- a/src/Libraries/AvalonDock/DocumentPaneResizingPanel.cs +++ /dev/null @@ -1,55 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Windows.Markup; -using System.Diagnostics; - -namespace AvalonDock -{ - public class DocumentPaneResizingPanel : ResizingPanel - { - -//#if DEBUG -// static int inst = 0; -// public DocumentPaneResizingPanel() -// { -// inst++; -// Debug.Assert(inst < 2); -// } -//#endif - } -} diff --git a/src/Libraries/AvalonDock/DocumentTabPanel.cs b/src/Libraries/AvalonDock/DocumentTabPanel.cs deleted file mode 100644 index 036691b0f2..0000000000 --- a/src/Libraries/AvalonDock/DocumentTabPanel.cs +++ /dev/null @@ -1,105 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; -using System.ComponentModel; - -namespace AvalonDock -{ - [EditorBrowsable(EditorBrowsableState.Never)] - public class DocumentTabPanel : PaneTabPanel - { - public static bool GetIsHeaderVisible(DependencyObject obj) - { - return (bool)obj.GetValue(IsHeaderVisibleProperty); - } - - public static void SetIsHeaderVisible(DependencyObject obj, bool value) - { - obj.SetValue(IsHeaderVisibleProperty, value); - } - - // Using a DependencyProperty as the backing store for IsHeaderVisible. This enables animation, styling, binding, etc... - public static readonly DependencyProperty IsHeaderVisibleProperty = - DependencyProperty.RegisterAttached("IsHeaderVisible", typeof(bool), typeof(DocumentTabPanel), new UIPropertyMetadata(false)); - - - protected override Size MeasureOverride(Size availableSize) - { - Size desideredSize = new Size(0, availableSize.Height); - int i = 1; - - foreach (ManagedContent child in Children) - { - Panel.SetZIndex(child, Selector.GetIsSelected(child)?1:-i); - i++; - child.Width = double.NaN; - child.Height = double.NaN; - child.Measure(new Size(double.PositiveInfinity, availableSize.Height)); - desideredSize.Width += child.DesiredSize.Width; - } - - return base.MeasureOverride(availableSize); - //return desideredSize; - } - - protected override Size ArrangeOverride(Size finalSize) - { - double offset = 0.0; - bool skipAllOthers = false; - foreach (ManagedContent doc in Children) - { - if (skipAllOthers || offset + doc.DesiredSize.Width > finalSize.Width) - { - SetIsHeaderVisible(doc, false); - doc.Arrange(new Rect()); - skipAllOthers = true; - } - else - { - SetIsHeaderVisible(doc, true); - doc.Arrange(new Rect(offset, 0.0, doc.DesiredSize.Width, finalSize.Height)); - offset += doc.ActualWidth; - } - } - - return finalSize; - - } - } -} diff --git a/src/Libraries/AvalonDock/DrWPF/ConceptualPanel.cs b/src/Libraries/AvalonDock/DrWPF/ConceptualPanel.cs deleted file mode 100644 index 05684dfa86..0000000000 --- a/src/Libraries/AvalonDock/DrWPF/ConceptualPanel.cs +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2008, Dr. WPF - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * The name Dr. WPF may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Dr. WPF ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Dr. WPF BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Controls; -using System.Windows; -using System.Collections.Specialized; -using System.Windows.Media; - -namespace DrWPF.Windows.Controls -{ - /// - /// This panel maintains a collection of conceptual children that are neither logical - /// children nor visual children of the panel. This allows those visuals to be connected - /// to other parts of the UI, if necessary, or even to remain disconnected. - /// - public abstract class ConceptualPanel : Panel - { - public ConceptualPanel() - { - Loaded += OnLoaded; - } - - void OnLoaded(object sender, RoutedEventArgs e) - { - Loaded -= OnLoaded; - (Children as DisconnectedUIElementCollection).Initialize(); - } - - protected override sealed UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent) - { - DisconnectedUIElementCollection children = new DisconnectedUIElementCollection(this); - children.CollectionChanged += new NotifyCollectionChangedEventHandler(OnChildrenCollectionChanged); - return children; - } - - protected virtual void OnChildAdded(UIElement child) - { - } - - protected virtual void OnChildRemoved(UIElement child) - { - } - - /// - /// For simplicity, this class will listen to change notifications on the DisconnectedUIElementCollection - /// and provide them to descendants through the OnChildAdded and OnChildRemoved members. - /// - private void OnChildrenCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - switch (e.Action) - { - case NotifyCollectionChangedAction.Add: - OnChildAdded(e.NewItems[0] as UIElement); - break; - - case NotifyCollectionChangedAction.Remove: - OnChildRemoved(e.OldItems[0] as UIElement); - break; - } - } - - protected override int VisualChildrenCount - { - get { return VisualChildren.Count; } - } - - protected override Visual GetVisualChild(int index) - { - if (index < 0 || index >= VisualChildren.Count) - throw new ArgumentOutOfRangeException(); - return VisualChildren[index]; - } - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - if (visualAdded is Visual) - { - VisualChildren.Add(visualAdded as Visual); - } - - if (visualRemoved is Visual) - { - VisualChildren.Remove(visualRemoved as Visual); - } - - base.OnVisualChildrenChanged(visualAdded, visualRemoved); - } - - protected readonly List VisualChildren = new List(); - } -} diff --git a/src/Libraries/AvalonDock/DrWPF/DisconnectedUIElementCollection.cs b/src/Libraries/AvalonDock/DrWPF/DisconnectedUIElementCollection.cs deleted file mode 100644 index 840fb45e7a..0000000000 --- a/src/Libraries/AvalonDock/DrWPF/DisconnectedUIElementCollection.cs +++ /dev/null @@ -1,367 +0,0 @@ -/* Copyright (c) 2008, Dr. WPF - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * The name Dr. WPF may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Dr. WPF ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Dr. WPF BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Controls; -using System.Windows; -using System.Collections.ObjectModel; -using System.Collections; -using System.Windows.Media; -using System.Diagnostics; -using System.Collections.Specialized; - -namespace DrWPF.Windows.Controls -{ - public class DisconnectedUIElementCollection : UIElementCollection, INotifyCollectionChanged - { - #region constructors - - /// - /// This collection can be used by a panel to maintain a collection of child elements - /// that are *not* connected to their owner as visual children or logical children. - /// - public DisconnectedUIElementCollection(UIElement owner) - : this(owner, new SurrogateVisualParent()) - { - } - - private DisconnectedUIElementCollection(UIElement owner, SurrogateVisualParent surrogateVisualParent) - : base(surrogateVisualParent, null) - { - _ownerPanel = owner as Panel; - _surrogateVisualParent = surrogateVisualParent; - _surrogateVisualParent.InitializeOwner(this); - _elements = new Collection(); - } - - #endregion - - #region UIElementCollection overrides - - /// - /// Adds the element to the DisconnectedUIElementCollection - /// - public override int Add(UIElement element) - { - VerifyWriteAccess(); - return base.Add(element); - } - - public override int Capacity - { - get { return base.Capacity; } - set - { - VerifyWriteAccess(); - base.Capacity = value; - } - } - - /// - /// Removes all elements from the DisconnectedUIElementCollection - /// - public override void Clear() - { - VerifyWriteAccess(); - base.Clear(); - } - - /// - /// Determines whether an element is in the DisconnectedUIElementCollection - /// - public override bool Contains(UIElement element) - { - return _elements.Contains(element); - } - - /// - /// Copies the collection into the Array - /// - public override void CopyTo(Array array, int index) - { - ((ICollection)_elements).CopyTo(array, index); - } - - /// - /// Strongly typed version of CopyTo - /// - public override void CopyTo(UIElement[] array, int index) - { - _elements.CopyTo(array, index); - } - - /// - /// Gets the number of elements in the collection. - /// - public override int Count - { - get { return _elements.Count; } - } - - /// - /// Returns an enumerator that can iterate through the collection. - /// - public override IEnumerator GetEnumerator() - { - return (_elements as ICollection).GetEnumerator(); - } - - /// - /// Returns the index of the element in the DisconnectedUIElementCollection - /// - public override int IndexOf(UIElement element) - { - return _elements.IndexOf(element); - } - - /// - /// Inserts an element into the DisconnectedUIElementCollection at the specified index - /// - public override void Insert(int index, UIElement element) - { - VerifyWriteAccess(); - base.Insert(index, element); - } - - /// - /// Removes the specified element from the DisconnectedUIElementCollection - /// - public override void Remove(UIElement element) - { - VerifyWriteAccess(); - base.Remove(_degenerateSiblings[element]); - } - - /// - /// Removes the element at the specified index from the DisconnectedUIElementCollection - /// - public override void RemoveAt(int index) - { - VerifyWriteAccess(); - base.RemoveAt(index); - } - - /// - /// Removes the specified number of elements starting at the specified index from the DisconnectedUIElementCollection - /// - public override void RemoveRange(int index, int count) - { - VerifyWriteAccess(); - base.RemoveRange(index, count); - } - - public override UIElement this[int index] - { - get { return _elements[index] as UIElement; } - set - { - VerifyWriteAccess(); - base[index] = value; - } - } - - #endregion - - #region public methods - - /// - /// The Initialize method is simply exposed as an accessible member that can - /// be called from the ConceptualPanel's Loaded event. Accessing this member - /// via the Children property will implicitly cause CreateUIElementCollection - /// to be called to create the disconnected collection. This method exists - /// because simple access of a property like Count might be optimized away by - /// an aggressive compiler. - /// - public void Initialize() - { - // do nothing - } - - #endregion - - #region private methods - - private int BaseIndexOf(UIElement element) - { - return base.IndexOf(element); - } - - private void BaseInsert(int index, UIElement element) - { - base.Insert(index, element); - } - - private void BaseRemoveAt(int index) - { - base.RemoveAt(index); - } - - private UIElement EnsureUIElement(object value) - { - if (value == null) - throw new ArgumentException("Cannot add a null value to a DisconnectedUIElementCollection"); - - if (!(value is UIElement)) - throw new ArgumentException("Only objects of type UIElement can be added to a DisconnectedUIElementCollection"); - - return value as UIElement; - } - - /// - /// If the owner is an items host, we need to enforce the rule that elements - /// cannot be explicitly added to the disconnected collection. However, it is still - /// possible to modify the visual or logical "connected" children of a ConceptualPanel - /// while it is an items host by simply calling the AddVisualChild, RemoveVisualChild, - /// AddLogicalChild, or RemoveLogicalChild methods. Logic within ConceptualPanel - /// ensures that any visual children added in this manner will be returned within - /// a GetVisualChild() enumeration. - /// - private void VerifyWriteAccess() - { - // if the owner is not a panel, just return - if (_ownerPanel == null) return; - - // check whether the owner is an items host for an ItemsControl - if (_ownerPanel.IsItemsHost && ItemsControl.GetItemsOwner(_ownerPanel) != null) - throw new InvalidOperationException("Disconnected children cannot be explicitly added to this " - + "collection while the panel is serving as an items host. However, visual children can " - + "be added by simply calling the AddVisualChild method."); - } - - #endregion - - #region INotifyCollectionChanged Members - - /// - /// Since the owner of the collection is not the parent of the elements, it needs - /// a mechanism by which to monitor its collection of child visuals. - /// This class provides such notifications via INotifyCollectionChanged. - /// - public event NotifyCollectionChangedEventHandler CollectionChanged; - private void RaiseCollectionChanged(NotifyCollectionChangedAction action, object changedItem, int index) - { - if (CollectionChanged != null) - CollectionChanged(this, new NotifyCollectionChangedEventArgs(action, changedItem, index)); - } - - #endregion - - #region private supporting classes - - #region DegenerateSibling - - private class DegenerateSibling : UIElement - { - public DegenerateSibling(UIElement element) - { - _element = element; - } - - public UIElement Element - { - get { return _element; } - } - - private UIElement _element; - } - - #endregion - - #region SurrogateVisualParent - - private class SurrogateVisualParent : UIElement - { - internal void InitializeOwner(DisconnectedUIElementCollection owner) - { - _owner = owner; - } - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - // avoid reentrancy during internal updates - if (_internalUpdate) return; - - _internalUpdate = true; - try - { - // when a UIElement is added, replace it with its degenerate sibling - if (visualAdded != null) - { - Debug.Assert(!(visualAdded is DegenerateSibling), - "Unexpected addition of degenerate... All degenerates should be added during internal updates."); - - UIElement element = visualAdded as UIElement; - DegenerateSibling sibling = new DegenerateSibling(element); - int index = _owner.BaseIndexOf(element); - _owner.BaseRemoveAt(index); - _owner.BaseInsert(index, sibling); - _owner._degenerateSiblings[element] = sibling; - _owner._elements.Insert(index, element); - _owner.RaiseCollectionChanged(NotifyCollectionChangedAction.Add, element, index); - } - - // when a degenerate sibling is removed, remove its corresponding element - if (visualRemoved != null) - { - Debug.Assert(visualRemoved is DegenerateSibling, - "Unexpected removal of UIElement... All non degenerates should be removed during internal updates."); - - DegenerateSibling sibling = visualRemoved as DegenerateSibling; - int index = _owner._elements.IndexOf(sibling.Element); - _owner._elements.RemoveAt(index); - _owner.RaiseCollectionChanged(NotifyCollectionChangedAction.Remove, sibling.Element, index); - _owner._degenerateSiblings.Remove(sibling.Element); - } - } - finally - { - _internalUpdate = false; - } - } - - private DisconnectedUIElementCollection _owner; - private bool _internalUpdate = false; - } - - #endregion - - #endregion - - #region fields - - private Dictionary _degenerateSiblings = new Dictionary(); - private Collection _elements = new Collection(); - private Panel _ownerPanel; - private SurrogateVisualParent _surrogateVisualParent; - - #endregion - } -} diff --git a/src/Libraries/AvalonDock/DrWPF/LogicalPanel.cs b/src/Libraries/AvalonDock/DrWPF/LogicalPanel.cs deleted file mode 100644 index fa90f0c5c0..0000000000 --- a/src/Libraries/AvalonDock/DrWPF/LogicalPanel.cs +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (c) 2008, Dr. WPF - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * The name Dr. WPF may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY Dr. WPF ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL Dr. WPF BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Controls; -using System.Windows; -using System.Collections.Specialized; - -namespace DrWPF.Windows.Controls -{ - /// - /// This panel extends ConceptualPanel by ensuring that its conceptual children are also "logical" children. - /// Because certain things like property inheritance and resource resolution work through the logical - /// tree, this allows the disconnected visuals to be connected to the panel's ancestor tree - /// in a logical manner without being part of it's visual tree. - /// - public abstract class LogicalPanel : ConceptualPanel - { - protected sealed override void OnChildAdded(UIElement child) - { - // if the child does not have a logical parent, assume the role - if (LogicalTreeHelper.GetParent(child) == null) - { - AddLogicalChild(child); - } - OnLogicalChildrenChanged(child, null); - } - - protected sealed override void OnChildRemoved(UIElement child) - { - // if this panel is the logical parent, remove that relationship - if (LogicalTreeHelper.GetParent(child) == this) - { - RemoveLogicalChild(child); - } - OnLogicalChildrenChanged(null, child); - } - - /// - /// This class uses the OnLogicalChildrenChanged method to provide notification to descendants - /// when its logical children change. Note that this is intentionally - /// similar to the OnVisualChildrenChanged approach supported by all visuals. - /// - /// - /// - protected virtual void OnLogicalChildrenChanged(UIElement childAdded, UIElement childRemoved) - { - } - } -} diff --git a/src/Libraries/AvalonDock/DragPaneServices.cs b/src/Libraries/AvalonDock/DragPaneServices.cs deleted file mode 100644 index e9b936a3d4..0000000000 --- a/src/Libraries/AvalonDock/DragPaneServices.cs +++ /dev/null @@ -1,177 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Diagnostics; - -namespace AvalonDock -{ - /// - /// Provides drag-drop functionalities for dockable panes - /// - internal sealed class DragPaneServices - { - List Surfaces = new List(); - List SurfacesWithDragOver = new List(); - - DockingManager _owner; - - public DockingManager DockManager - { - get { return _owner; } - } - - public DragPaneServices(DockingManager owner) - { - _owner = owner; - } - - public void Register(IDropSurface surface) - { - if (!Surfaces.Contains(surface)) - Surfaces.Add(surface); - } - - public void Unregister(IDropSurface surface) - { - Surfaces.Remove(surface); - } - - Point Offset; - - - public void StartDrag(FloatingWindow wnd, Point point, Point offset) - { - Offset = offset; - - _wnd = wnd; - - if (Offset.X >= _wnd.Width) - Offset.X = _wnd.Width / 2; - - - _wnd.Left = point.X - Offset.X; - _wnd.Top = point.Y - Offset.Y; - _wnd.Show(); - - int surfaceCount = 0; - restart: - surfaceCount = Surfaces.Count; - foreach (IDropSurface surface in Surfaces) - { - if (surface.SurfaceRectangle.Contains(point)) - { - SurfacesWithDragOver.Add(surface); - surface.OnDragEnter(point); - Debug.WriteLine("Enter " + surface.ToString()); - if (surfaceCount != Surfaces.Count) - { - //Surfaces list has been changed restart cycle - SurfacesWithDragOver.Clear(); - goto restart; - } - } - } - - } - - public void MoveDrag(Point point) - { - if (_wnd == null) - return; - - _wnd.Left = point.X - Offset.X; - _wnd.Top = point.Y - Offset.Y; - - List enteringSurfaces = new List(); - foreach (IDropSurface surface in Surfaces) - { - if (surface.SurfaceRectangle.Contains(point)) - { - if (!SurfacesWithDragOver.Contains(surface)) - enteringSurfaces.Add(surface); - else - surface.OnDragOver(point); - } - else if (SurfacesWithDragOver.Contains(surface)) - { - SurfacesWithDragOver.Remove(surface); - surface.OnDragLeave(point); - } - } - - foreach (IDropSurface surface in enteringSurfaces) - { - SurfacesWithDragOver.Add(surface); - surface.OnDragEnter(point); - } - } - - public void EndDrag(Point point) - { - IDropSurface dropSufrace = null; - foreach (IDropSurface surface in Surfaces) - { - if (surface.SurfaceRectangle.Contains(point)) - { - if (surface.OnDrop(point)) - { - dropSufrace = surface; - break; - } - } - } - - foreach (IDropSurface surface in SurfacesWithDragOver) - { - if (surface != dropSufrace) - { - surface.OnDragLeave(point); - } - } - - SurfacesWithDragOver.Clear(); - - _wnd.OnEndDrag();//notify floating window that drag operation is coming to end - - if (dropSufrace != null) - _wnd.Close(); - else - _wnd.Activate(); - - _wnd = null; - } - - FloatingWindow _wnd; - public FloatingWindow FloatingWindow - { - get { return _wnd; } - } - - } -} diff --git a/src/Libraries/AvalonDock/FloatingDockablePane.cs b/src/Libraries/AvalonDock/FloatingDockablePane.cs deleted file mode 100644 index 9b4bc9baa7..0000000000 --- a/src/Libraries/AvalonDock/FloatingDockablePane.cs +++ /dev/null @@ -1,68 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; - -namespace AvalonDock -{ - public class FloatingDockablePane : DockablePane - { - static FloatingDockablePane() - { - //DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(typeof(FloatingDockablePane))); - DockablePane.ShowHeaderProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(false)); - } - - public FloatingDockablePane(FloatingWindow floatingWindow) - { - _floatingWindow = floatingWindow; - } - - FloatingWindow _floatingWindow = null; - - public FloatingWindow FloatingWindow - { - get { return _floatingWindow; } - } - - public override DockingManager GetManager() - { - return _floatingWindow.Manager; - } - - protected override void CheckItems(System.Collections.IList newItems) - { - foreach (object newItem in newItems) - { - if (!(newItem is DockableContent) && !(newItem is DocumentContent)) - throw new InvalidOperationException("FloatingDockablePane can contain only DockableContents and DocumentContents!"); - } - } - - } -} diff --git a/src/Libraries/AvalonDock/FloatingWindow.cs b/src/Libraries/AvalonDock/FloatingWindow.cs deleted file mode 100644 index 4b76cee13a..0000000000 --- a/src/Libraries/AvalonDock/FloatingWindow.cs +++ /dev/null @@ -1,502 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Windows.Markup; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Interop; -using System.Runtime.InteropServices; - -namespace AvalonDock -{ - public abstract class FloatingWindow : Window, INotifyPropertyChanged - { - static FloatingWindow() - { - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(false)); - Window.WindowStyleProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(WindowStyle.ToolWindow)); - } - - - public FloatingWindow() - { - this.Loaded += new RoutedEventHandler(OnLoaded); - this.Unloaded += new RoutedEventHandler(OnUnloaded); - - this.SizeChanged += new SizeChangedEventHandler(FloatingWindow_SizeChanged); - - this.CommandBindings.Add(new CommandBinding(SetAsDockableWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); - this.CommandBindings.Add(new CommandBinding(SetAsFloatingWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); - this.CommandBindings.Add(new CommandBinding(TabbedDocumentCommand, OnExecuteCommand, OnCanExecuteCommand)); - this.CommandBindings.Add(new CommandBinding(CloseCommand, OnExecuteCommand, OnCanExecuteCommand)); - } - - void FloatingWindow_SizeChanged(object sender, SizeChangedEventArgs e) - { - if (HostedPane != null) - { - foreach (ManagedContent c in HostedPane.Items) - c.FloatingWindowSize = new Size(Width, Height); - - ResizingPanel.SetEffectiveSize(HostedPane, new Size(Width, Height)); - } - } - - public FloatingWindow(DockingManager manager) - : this() - { - //save manager ref - _manager = manager; - } - - DockingManager _manager = null; - - internal DockingManager Manager - { - get { return _manager; } - } - - - public FloatingDockablePane HostedPane - { - get { return (FloatingDockablePane)GetValue(ReferencedPaneProperty); } - set { SetValue(ReferencedPaneProperty, value); } - } - - // Using a DependencyProperty as the backing store for HostedPane. This enables animation, styling, binding, etc... - public static readonly DependencyProperty ReferencedPaneProperty = - DependencyProperty.Register("HostedPane", typeof(FloatingDockablePane), typeof(FlyoutPaneWindow)); - - - internal virtual void OnEndDrag() - { - } - - internal virtual void OnShowSelectionBox() - { - - } - - internal virtual void OnHideSelectionBox() - { - - } - - #region Active Content Management - ManagedContent lastActiveContent = null; - - protected override void OnActivated(EventArgs e) - { - if (Manager != null) - { - lastActiveContent = Manager.ActiveContent; - Manager.ActiveContent = HostedPane.SelectedItem as ManagedContent; - } - - base.OnActivated(e); - } - - protected override void OnDeactivated(EventArgs e) - { - if (Manager != null && lastActiveContent != null) - { - Manager.ActiveContent = lastActiveContent; - } - base.OnDeactivated(e); - } - #endregion - - #region IsClosing Flag Management - public void Close(bool force) - { - ForcedClosing = force; - base.Close(); - } - - protected bool ForcedClosing { get; private set; } - - - internal bool IsClosing { get; private set; } - - protected override void OnClosing(CancelEventArgs e) - { - if (HostedPane.Items.Count > 0 && !ForcedClosing) - { - ManagedContent cntToClose = HostedPane.Items[0] as ManagedContent; - if (!cntToClose.IsCloseable) - { - e.Cancel = true; - base.OnClosing(e); - return; - } - } - - IsClosing = true; - base.OnClosing(e); - } - - protected override void OnClosed(EventArgs e) - { - IsClosing = false; - base.OnClosed(e); - } - #endregion - - public abstract Pane ClonePane(); - - - #region Enable/Disable window Close Button - [DllImport("User32.dll", CharSet = CharSet.Auto)] - private static extern IntPtr GetSystemMenu( - IntPtr hWnd, - Int32 bRevert - ); - - [DllImport("User32.dll", CharSet = CharSet.Auto)] - private static extern int GetMenuItemCount( - IntPtr hMenu - ); - - [DllImport("User32.dll", CharSet = CharSet.Auto)] - private static extern int DrawMenuBar( - IntPtr hWnd - ); - - [DllImport("User32.dll", CharSet = CharSet.Auto)] - private static extern bool EnableMenuItem( - IntPtr hMenu, - Int32 uIDEnableItem, - Int32 uEnable - ); - - private const Int32 MF_BYPOSITION = 0x400; - private const Int32 MF_ENABLED = 0x0000; - private const Int32 MF_GRAYED = 0x0001; - private const Int32 MF_DISABLED = 0x0002; - - void EnableXButton() - { - WindowInteropHelper helper = new WindowInteropHelper(this); - IntPtr hMenu = GetSystemMenu(helper.Handle, 0); - - int menuItemCount = GetMenuItemCount(hMenu); - - EnableMenuItem(hMenu, menuItemCount - 1, MF_BYPOSITION | MF_ENABLED); - DrawMenuBar(helper.Handle); - } - - void DisableXButton() - { - WindowInteropHelper helper = new WindowInteropHelper(this); - IntPtr hMenu = GetSystemMenu(helper.Handle, 0); - - int menuItemCount = GetMenuItemCount(hMenu); - - EnableMenuItem(hMenu, menuItemCount - 1, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); - DrawMenuBar(helper.Handle); - } - - #endregion - - #region Non-Client area management - - protected const int WM_MOVE = 0x0003; - protected const int WM_SIZE = 0x0005; - protected const int WM_NCMOUSEMOVE = 0xa0; - protected const int WM_NCLBUTTONDOWN = 0xA1; - protected const int WM_NCLBUTTONUP = 0xA2; - protected const int WM_NCLBUTTONDBLCLK = 0xA3; - protected const int WM_NCRBUTTONDOWN = 0xA4; - protected const int WM_NCRBUTTONUP = 0xA5; - protected const int HTCAPTION = 2; - protected const int SC_MOVE = 0xF010; - protected const int WM_SYSCOMMAND = 0x0112; - - - - #region Load/Unload window events - HwndSource _hwndSource; - HwndSourceHook _wndProcHandler; - - protected void OnLoaded(object sender, EventArgs e) - { - WindowInteropHelper helper = new WindowInteropHelper(this); - _hwndSource = HwndSource.FromHwnd(helper.Handle); - _wndProcHandler = new HwndSourceHook(FilterMessage); - _hwndSource.AddHook(_wndProcHandler); - - if (HostedPane.Items.Count > 0) - { - ManagedContent cntHosted = HostedPane.Items[0] as ManagedContent; - if (!cntHosted.IsCloseable) - { - DisableXButton(); - } - } - } - protected void OnUnloaded(object sender, EventArgs e) - { - if (_hwndSource != null) - _hwndSource.RemoveHook(_wndProcHandler); - } - #endregion - - - protected virtual IntPtr FilterMessage( - IntPtr hwnd, - int msg, - IntPtr wParam, - IntPtr lParam, - ref bool handled - ) - { - handled = false; - - if (Manager == null) - return IntPtr.Zero; - - switch (msg) - { - case WM_SIZE: - case WM_MOVE: - //HostedPane.ReferencedPane.SaveFloatingWindowSizeAndPosition(this); - break; - case WM_NCLBUTTONDOWN: - if (IsDockableWindow && wParam.ToInt32() == HTCAPTION) - { - short x = (short)((lParam.ToInt32() & 0xFFFF)); - short y = (short)((lParam.ToInt32() >> 16)); - - Point clickPoint = this.TransformToDeviceDPI(new Point(x, y)); - Manager.Drag(this, clickPoint, new Point(clickPoint.X - Left, clickPoint.Y - Top)); - - handled = true; - } - break; - case WM_NCLBUTTONDBLCLK: - if (IsDockableWindow && wParam.ToInt32() == HTCAPTION) - { - if (IsDockableWindow) - { - Redock(); - handled = true; - } - } - break; - case WM_NCRBUTTONDOWN: - if (wParam.ToInt32() == HTCAPTION) - { - short x = (short)((lParam.ToInt32() & 0xFFFF)); - short y = (short)((lParam.ToInt32() >> 16)); - - ContextMenu cxMenu = FindResource(new ComponentResourceKey(typeof(DockingManager), ContextMenuElement.FloatingWindow)) as ContextMenu; - if (cxMenu != null) - { - foreach (MenuItem menuItem in cxMenu.Items) - menuItem.CommandTarget = this; - - cxMenu.Placement = PlacementMode.AbsolutePoint; - cxMenu.PlacementRectangle = new Rect(new Point(x, y), new Size(0, 0)); - cxMenu.PlacementTarget = this; - cxMenu.IsOpen = true; - } - - handled = true; - } - break; - case WM_NCRBUTTONUP: - if (wParam.ToInt32() == HTCAPTION) - { - - handled = true; - } - break; - - } - - - return IntPtr.Zero; - } - #endregion - - #region Floating/dockable window state - bool _dockableWindow = true; - - public bool IsDockableWindow - { - get { return _dockableWindow; } - set - { - _dockableWindow = value; - - if (_dockableWindow) - { - foreach (ManagedContent content in HostedPane.Items) - if (content is DockableContent) - ((DockableContent)content).SetStateToDockableWindow(); - } - else - { - foreach (ManagedContent content in HostedPane.Items) - if (content is DockableContent) - ((DockableContent)content).SetStateToFloatingWindow(); - } - } - } - - public bool IsFloatingWindow - { - get { return !IsDockableWindow; } - set { IsDockableWindow = !value; } - } - - protected virtual void Redock() - { - - } - #endregion - - #region Commands - private static object syncRoot = new object(); - - private static RoutedUICommand tabbedDocumentCommand = null; - public static RoutedUICommand TabbedDocumentCommand - { - get - { - lock (syncRoot) - { - if (null == tabbedDocumentCommand) - { - tabbedDocumentCommand = new RoutedUICommand("T_abbed Document", "TabbedDocument", typeof(FloatingWindow)); - } - - } - return tabbedDocumentCommand; - } - } - - private static RoutedUICommand dockableCommand = null; - public static RoutedUICommand SetAsDockableWindowCommand - { - get - { - lock (syncRoot) - { - if (null == dockableCommand) - { - dockableCommand = new RoutedUICommand("D_ockable", "Dockable", typeof(FloatingWindow)); - } - - } - return dockableCommand; - } - } - - private static RoutedUICommand floatingCommand = null; - public static RoutedUICommand SetAsFloatingWindowCommand - { - get - { - lock (syncRoot) - { - if (null == floatingCommand) - { - floatingCommand = new RoutedUICommand("F_loating", "Floating", typeof(FloatingWindow)); - } - - } - return floatingCommand; - } - } - - private static RoutedUICommand closeCommand = null; - public static RoutedUICommand CloseCommand - { - get - { - lock (syncRoot) - { - if (null == closeCommand) - { - closeCommand = new RoutedUICommand("Close", "Close", typeof(FloatingWindow)); - } - - } - return closeCommand; - } - } - - protected virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) - { - if (e.Command == SetAsDockableWindowCommand) - { - IsDockableWindow = true; - e.Handled = true; - } - else if (e.Command == SetAsFloatingWindowCommand) - { - IsFloatingWindow = true; - e.Handled = true; - } - } - - protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) - { - if (e.Command == SetAsDockableWindowCommand) - e.CanExecute = IsFloatingWindow; - else if (e.Command == SetAsFloatingWindowCommand) - e.CanExecute = IsDockableWindow; - else - e.CanExecute = true; - } - #endregion - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - protected void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - } -} diff --git a/src/Libraries/AvalonDock/FlyoutDockablePane.cs b/src/Libraries/AvalonDock/FlyoutDockablePane.cs deleted file mode 100644 index 6b75057884..0000000000 --- a/src/Libraries/AvalonDock/FlyoutDockablePane.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Input; - -namespace AvalonDock -{ - internal class FlyoutDockablePane : DockablePane - { - static FlyoutDockablePane() - { - DockablePane.ShowTabsProperty.AddOwner(typeof(FlyoutDockablePane), new FrameworkPropertyMetadata(false)); - } - - int _arrayIndexPreviousPane = -1; - - - public FlyoutDockablePane() - { } - - public FlyoutDockablePane(DockableContent content) - { - _referencedPane = content.ContainerPane as DockablePane; - _manager = _referencedPane.GetManager(); - - //save current content position in container pane - _arrayIndexPreviousPane = _referencedPane.Items.IndexOf(content); - Anchor = _referencedPane.Anchor; - - SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(ResizingPanel.GetEffectiveSize(_referencedPane).Width)); - SetValue(ResizingPanel.ResizeHeightProperty, new GridLength(ResizingPanel.GetEffectiveSize(_referencedPane).Height)); - - - //if (double.IsInfinity(ResizingPanel.GetResizeWidth(this))) - // ResizingPanel.SetResizeWidth(this, 200); - //if (double.IsInfinity(ResizingPanel.GetResizeHeight(this))) - // ResizingPanel.SetResizeHeight(this, 200); - - this.Style = _referencedPane.Style; - - //remove content from container pane - //and add content to my temporary pane - _referencedPane.Items.RemoveAt(_arrayIndexPreviousPane); - this.Items.Add(content); - - - //select the single content in this pane - SelectedItem = this.Items[0]; - } - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - } - - internal void RestoreOriginalPane() - { - if (this.Items.Count == 1) - { - _referencedPane.Items.Insert(_arrayIndexPreviousPane, RemoveContent(0)); - ResizingPanel.SetResizeWidth(_referencedPane, ResizingPanel.GetResizeWidth(this)); - ResizingPanel.SetResizeHeight(_referencedPane, ResizingPanel.GetResizeHeight(this)); - } - } - - - DockablePane _referencedPane = null; - - DockingManager _manager = null; - - public override DockingManager GetManager() - { - return _manager; - } - - internal override void ToggleAutoHide() - { - GetManager().ToggleAutoHide(_referencedPane); - } - //internal override void Close() - //{ - // DockingManager manager = GetManager(); - // if (manager != null) - // Manager.Hide(SelectedItem as DockableContent); - //} - } -} diff --git a/src/Libraries/AvalonDock/FlyoutPaneWindow.cs b/src/Libraries/AvalonDock/FlyoutPaneWindow.cs deleted file mode 100644 index 8651c3d76c..0000000000 --- a/src/Libraries/AvalonDock/FlyoutPaneWindow.cs +++ /dev/null @@ -1,923 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Windows.Markup; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Media.Animation; -using System.Windows.Forms.Integration; -using System.Runtime.InteropServices; -using System.Windows.Interop; -using System.Threading; - -namespace AvalonDock -{ - [ContentPropertyAttribute("ReferencedPane")] - public class FlyoutPaneWindow : System.Windows.Window - { - static FlyoutPaneWindow() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(typeof(FlyoutPaneWindow))); - - //AllowsTransparency slow down perfomance under XP/VISTA because rendering is enterely perfomed using CPU - //Window.AllowsTransparencyProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(true)); - - Window.WindowStyleProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(WindowStyle.None)); - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(false)); - Window.ResizeModeProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(ResizeMode.NoResize)); - Control.BackgroundProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); - } - - public FlyoutPaneWindow() - { - Title = "AvalonDock_FlyoutPaneWindow"; - } - - - WindowsFormsHost _winFormsHost = null; - double _targetWidth; - double _targetHeight; - - internal double TargetWidth - { - get { return _targetWidth; } - set { _targetWidth = value; } - } - - internal double TargetHeight - { - get { return _targetHeight; } - set { _targetHeight = value; } - } - - double _minLeft; - double _minTop; - - internal double MinLeft - { - get { return _minLeft; } - set { _minLeft = value; } - } - - internal double MinTop - { - get { return _minTop; } - set { _minTop = value; } - } - - DockingManager _dockingManager = null; - - public FlyoutPaneWindow(DockingManager manager, DockableContent content) - : this() - { - //create a new temporary pane - _refPane = new FlyoutDockablePane(content); - _dockingManager = manager; - - _winFormsHost = ReferencedPane.GetLogicalChildContained(); - - if (_winFormsHost != null) - { - AllowsTransparency = false; - } - - this.Loaded += new RoutedEventHandler(FlyoutPaneWindow_Loaded); - } - - - void FlyoutPaneWindow_Loaded(object sender, RoutedEventArgs e) - { - StartOpenAnimation(); - //Storyboard storyBoard = new Storyboard(); - //double originalLeft = this.Left; - //double originalTop = this.Top; - - //AnchorStyle CorrectedAnchor = Anchor; - - //if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) - // CorrectedAnchor = AnchorStyle.Right; - //else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) - // CorrectedAnchor = AnchorStyle.Left; - - - //if (CorrectedAnchor == AnchorStyle.Left || CorrectedAnchor == AnchorStyle.Right) - //{ - // DoubleAnimation anim = new DoubleAnimation(0.0, _targetWidth, new Duration(TimeSpan.FromMilliseconds(200))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Width")); - // this.Width = _targetWidth; - // //storyBoard.Children.Add(anim); - //} - //if (CorrectedAnchor == AnchorStyle.Right) - //{ - // //DoubleAnimation anim = new DoubleAnimation(this.Left, this.Left + this.ActualWidth, new Duration(TimeSpan.FromMilliseconds(500))); - - // DoubleAnimation anim = new DoubleAnimation(this.Left, Left - _targetWidth, new Duration(TimeSpan.FromMilliseconds(200))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Left")); - // storyBoard.Children.Add(anim); - //} - - //if (CorrectedAnchor == AnchorStyle.Top || CorrectedAnchor == AnchorStyle.Bottom) - //{ - // DoubleAnimation anim = new DoubleAnimation(0.0, _targetHeight, new Duration(TimeSpan.FromMilliseconds(200))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Height")); - // storyBoard.Children.Add(anim); - //} - //if (CorrectedAnchor == AnchorStyle.Bottom) - //{ - // DoubleAnimation anim = new DoubleAnimation(originalTop, originalTop - _targetHeight, new Duration(TimeSpan.FromMilliseconds(200))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Top")); - // storyBoard.Children.Add(anim); - //} - - //{ - // DoubleAnimation anim = new DoubleAnimation(0.0, 1.0, new Duration(TimeSpan.FromMilliseconds(100))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Opacity")); - // //AllowsTransparency slow down perfomance under XP/VISTA because rendering is enterely perfomed using CPU - // //storyBoard.Children.Add(anim); - //} - - //storyBoard.Completed += (anim, eventargs) => - // { - // if (CorrectedAnchor == AnchorStyle.Left) - // { - // this.Left = originalLeft; - // this.Width = _targetWidth; - // } - // if (CorrectedAnchor == AnchorStyle.Right) - // { - // this.Left = originalLeft - _targetWidth; - // this.Width = _targetWidth; - // } - // if (CorrectedAnchor == AnchorStyle.Top) - // { - // this.Top = originalTop; - // this.Height = _targetHeight; - // } - // if (CorrectedAnchor == AnchorStyle.Bottom) - // { - // this.Top = originalTop - _targetHeight; - // this.Height = _targetHeight; - // } - // }; - - //foreach (AnimationTimeline animTimeLine in storyBoard.Children) - //{ - // animTimeLine.FillBehavior = FillBehavior.Stop; - //} - - //storyBoard.Begin(this); - } - - protected override void OnClosed(EventArgs e) - { - ReferencedPane.RestoreOriginalPane(); - - base.OnClosed(e); - - _closed = true; - } - - bool _closed = false; - - internal bool IsClosed - { - get { return _closed; } - } - - //public AnchorStyle Anchor - //{ - // get { return (AnchorStyle)GetValue(AnchorPropertyKey.DependencyProperty); } - // protected set { SetValue(AnchorPropertyKey, value); } - //} - - //// Using a DependencyProperty as the backing store for Anchor. This enables animation, styling, binding, etc... - //public static readonly DependencyPropertyKey AnchorPropertyKey = - // DependencyProperty.RegisterReadOnly("Anchor", typeof(AnchorStyle), typeof(FlyoutPaneWindow), new UIPropertyMetadata(AnchorStyle.Right)); - - //public FlyoutDockablePane ReferencedPane - //{ - // get { return (FlyoutDockablePane)GetValue(ReferencedPaneProperty); } - // set { SetValue(ReferencedPaneProperty, value); } - //} - - //// Using a DependencyProperty as the backing store for EmbeddedPane. This enables animation, styling, binding, etc... - //public static readonly DependencyProperty ReferencedPaneProperty = - // DependencyProperty.Register("ReferencedPane", typeof(FlyoutDockablePane), typeof(FlyoutPaneWindow)); - - //AnchorStyle _anchor = AnchorStyle.Top; - //public AnchorStyle Anchor - //{ - // get { return _anchor; } - // set { _anchor = value; } - //} - - public AnchorStyle Anchor - { - get { return ReferencedPane.Anchor; } - } - - FlyoutDockablePane _refPane; - - internal FlyoutDockablePane ReferencedPane - { - get { return _refPane; } - //set - //{ - // _refPane = value; - //} - } - - - protected override void OnInitialized(EventArgs e) - { - base.OnInitialized(e); - - if (ReferencedPane == null) - _refPane = this.Content as FlyoutDockablePane; - - if (ReferencedPane != null) - { - - Content = ReferencedPane; - - _closingTimer = new DispatcherTimer( - new TimeSpan(0, 0, 2), - DispatcherPriority.Normal, - new EventHandler(OnCloseWindow), - Dispatcher.CurrentDispatcher); - } - - - } - - UIElement _resizer = null; - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _resizer = GetTemplateChild("INT_Resizer") as UIElement; - - if (_resizer != null) - { - _resizer.MouseDown += new MouseButtonEventHandler(_resizer_MouseDown); - _resizer.MouseMove += new MouseEventHandler(_resizer_MouseMove); - _resizer.MouseUp += new MouseButtonEventHandler(_resizer_MouseUp); - } - } - - - #region Resize management - double originalWidth = 0.0; - double originalHeight = 0.0; - double originalLeft = 0.0; - double originalTop = 0.0; - Point ptStartDrag; - - private void _resizer_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) - { - UIElement dragElement = sender as UIElement; - - originalLeft = Left; - originalTop = Top; - originalWidth = Width; - originalHeight = Height; - - ptStartDrag = e.GetPosition(dragElement); - dragElement.CaptureMouse(); - } - - private void _resizer_MouseMove(object sender, System.Windows.Input.MouseEventArgs e) - { - UIElement dragElement = sender as UIElement; - - if (dragElement.IsMouseCaptured) - { - Point ptMoveDrag = e.GetPosition(dragElement); - AnchorStyle CorrectedAnchor = Anchor; - - if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Right; - else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Left; - - double deltaX = FlowDirection == FlowDirection.LeftToRight ? ptMoveDrag.X - ptStartDrag.X : ptStartDrag.X - ptMoveDrag.X; - - double newWidth = Width; - double newHeight = Height; - - double newLeft = Left; - double newTop = Top; - - if (CorrectedAnchor == AnchorStyle.Left) - { - if (newWidth + deltaX < 4.0) - newWidth = 4.0; - else - newWidth += deltaX; - - } - else if (CorrectedAnchor == AnchorStyle.Top) - { - if (newHeight + (ptMoveDrag.Y - ptStartDrag.Y) < 4.0) - newHeight = 4.0; - else - newHeight += ptMoveDrag.Y - ptStartDrag.Y; - - } - else if (CorrectedAnchor == AnchorStyle.Right) - { - if (newWidth - (deltaX) < 4) - { - newLeft = originalLeft + originalWidth - 4; - newWidth = 4; - } - else - { - newLeft += deltaX; - newWidth -= deltaX; - } - - } - else if (CorrectedAnchor == AnchorStyle.Bottom) - { - if (newHeight - (ptMoveDrag.Y - ptStartDrag.Y) < 4) - { - newTop = originalTop + originalHeight - 4; - newHeight = 4; - } - else - { - newTop += ptMoveDrag.Y - ptStartDrag.Y; - newHeight -= ptMoveDrag.Y - ptStartDrag.Y; - } - } - - //ResizingPanel.SetResizeHeight(ReferencedPane, ReferencedPane.ActualHeight); - //ResizingPanel.SetResizeWidth(ReferencedPane, ReferencedPane.ActualWidth); - - Width = Math.Min(newWidth, MaxWidth); - Height = Math.Min(newHeight, MaxHeight); - - Left = Math.Max(newLeft, MinLeft); - Top = Math.Max(newTop, MinTop); - - ApplyRegion(new Rect(0, 0, this.Width, this.Height)); - } - } - - private void _resizer_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) - { - UIElement dragElement = sender as UIElement; - dragElement.ReleaseMouseCapture(); - - } - - #endregion - - #region Closing window strategies - - - DispatcherTimer _closingTimer = null; - - protected override void OnMouseLeave(MouseEventArgs e) - { - base.OnMouseLeave(e); - - if (!IsFocused && !IsKeyboardFocusWithin && !ReferencedPane.IsOptionsMenuOpened) - _closingTimer.Start(); - } - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - - _closingTimer.Stop(); - } - - protected override void OnLostFocus(RoutedEventArgs e) - { - base.OnLostFocus(e); - - if (!IsMouseOver && !ReferencedPane.IsOptionsMenuOpened) - _closingTimer.Start(); - } - - protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e) - { - base.OnLostKeyboardFocus(e); - - if (!IsMouseOver) - _closingTimer.Start(); - } - - protected override void OnGotFocus(RoutedEventArgs e) - { - base.OnGotFocus(e); - _closingTimer.Stop(); - } - - protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) - { - base.OnGotKeyboardFocus(e); - - _closingTimer.Stop(); - } - - internal void StartCloseWindow() - { - _closingTimer.Start(); - } - - void OnCloseWindow(object sender, EventArgs e) - { - //options menu is open don't close the flyout window - if (ReferencedPane.IsOptionsMenuOpened || - IsMouseDirectlyOver || - (_winFormsHost != null && _winFormsHost.IsFocused && _refPane.Items.Count > 0 && ((ManagedContent)_refPane.Items[0]).IsActiveContent)) - { - _closingTimer.Start(); - return; - } - - _closingTimer.Stop(); - - if (IsClosed) - return; - - StartCloseAnimation(); - } - - [DllImport("user32.dll")] - static extern int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw); - - [DllImport("gdi32.dll")] - static extern IntPtr CreateRectRgn(int left, int top, int right, int bottom); - - - [DllImport("gdi32.dll")] - static extern int CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, int fnCombineMode); - - enum CombineRgnStyles : int - { - RGN_AND = 1, - RGN_OR = 2, - RGN_XOR = 3, - RGN_DIFF = 4, - RGN_COPY = 5, - RGN_MIN = RGN_AND, - RGN_MAX = RGN_COPY - } - - - public bool IsClosing { get; private set; } - - internal void StartCloseAnimation() - { - AnchorStyle CorrectedAnchor = Anchor; - - if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Right; - else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Left; - - double wnd_Width = this.ActualWidth; - double wnd_Height = this.ActualHeight; - double wnd_Left = this.Left; - double wnd_Top = this.Top; - - int wnd_TrimWidth = (int)wnd_Width; - int wnd_TrimHeight = (int)wnd_Height; - - int stepWidth = (int)(wnd_Width / 20); - int stepHeight = (int)(wnd_Height / 20); - - DispatcherTimer animTimer = new DispatcherTimer(); - animTimer.Interval = TimeSpan.FromMilliseconds(1); - - animTimer.Tick += (sender, eventArgs) => - { - bool stopTimer = false; - double newLeft = 0.0; - double newTop = 0.0; - switch (CorrectedAnchor) - { - case AnchorStyle.Right: - newLeft = this.Left; - if (this.Left + stepWidth >= wnd_Left + wnd_Width) - { - newLeft = wnd_Left + wnd_Width; - wnd_TrimWidth = 0; - stopTimer = true; - } - else - { - newLeft += stepWidth; - wnd_TrimWidth -= stepWidth; - wnd_TrimWidth = Math.Max(wnd_TrimWidth, 0); - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, wnd_TrimWidth, wnd_TrimHeight), true); - ApplyRegion(new Rect(0, 0, wnd_TrimWidth, wnd_TrimHeight)); - this.Left = newLeft; - break; - case AnchorStyle.Left: - newLeft = this.Left; - if (this.Left - stepWidth <= wnd_Left - wnd_Width) - { - newLeft = wnd_Left - wnd_Width; - wnd_TrimWidth = 0; - stopTimer = true; - } - else - { - newLeft -= stepWidth; - wnd_TrimWidth -= stepWidth; - wnd_TrimWidth = Math.Max(wnd_TrimWidth, 0); - } - - this.Left = newLeft; - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), wnd_TrimHeight), true); - ApplyRegion( - new Rect((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), wnd_TrimHeight)); - break; - case AnchorStyle.Bottom: - newTop = this.Top; - if (this.Top + stepHeight >= wnd_Top + wnd_Height) - { - newTop = wnd_Top + wnd_Height; - wnd_TrimHeight = 0; - stopTimer = true; - } - else - { - newTop += stepHeight; - wnd_TrimHeight -= stepHeight; - wnd_TrimHeight = Math.Max(wnd_TrimHeight, 0); - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, wnd_TrimWidth, wnd_TrimHeight), true); - ApplyRegion( - new Rect(0, 0, wnd_TrimWidth, wnd_TrimHeight)); - this.Top = newTop; - break; - case AnchorStyle.Top: - newTop = this.Top; - if (this.Top - stepHeight <= wnd_Top - wnd_Height) - { - newTop = wnd_Top - wnd_Height; - wnd_TrimHeight = 0; - stopTimer = true; - } - else - { - newTop -= stepHeight; - wnd_TrimHeight -= stepHeight; - wnd_TrimHeight = Math.Max(wnd_TrimWidth, 0); - } - - this.Top = newTop; - ApplyRegion( - new Rect(0, (int)(wnd_Top - this.Top), wnd_TrimWidth, (int)(wnd_Height))); - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, (int)(wnd_Top - this.Top), wnd_TrimWidth, (int)(wnd_Height)), true); - break; - } - - if (stopTimer) - { - //window is being closed - Width = 0.0; - Height = 0.0; - animTimer.Stop(); - if (!IsClosed) - Close(); - IsClosing = false; - } - }; - - IsClosing = true; - animTimer.Start(); - } - - public bool IsOpening { get; private set; } - - internal void StartOpenAnimation() - { - AnchorStyle CorrectedAnchor = Anchor; - - if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Right; - else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) - CorrectedAnchor = AnchorStyle.Left; - - double wnd_Width = this._targetWidth > 0.0 ? this._targetWidth : this.ActualWidth; - double wnd_Height = this._targetHeight > 0.0 ? this._targetHeight : this.ActualHeight; - double wnd_Left = this.Left; - double wnd_Top = this.Top; - - - int wnd_TrimWidth = 0; - int wnd_TrimHeight = 0; - - int stepWidth = (int)(wnd_Width / 8); - int stepHeight = (int)(wnd_Height / 8); - - if (CorrectedAnchor == AnchorStyle.Left) - { - SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, 0, (int)wnd_Height - wnd_TrimHeight), true); - this.Left = wnd_Left - wnd_Width; - } - else if (CorrectedAnchor == AnchorStyle.Top) - { - SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, (int)wnd_Width - wnd_TrimWidth, 0), true); - this.Top = wnd_Top - wnd_Height; - } - - DispatcherTimer animTimer = new DispatcherTimer(); - animTimer.Interval = TimeSpan.FromMilliseconds(2); - - animTimer.Tick += (sender, eventArgs) => - { - bool stopTimer = false; - switch (CorrectedAnchor) - { - case AnchorStyle.Right: - double newLeft = this.Left; - if (this.Left - stepWidth <= wnd_Left - wnd_Width) - { - newLeft = wnd_Left - wnd_Width; - wnd_TrimWidth = (int)wnd_Width; - stopTimer = true; - } - else - { - newLeft -= stepWidth; - wnd_TrimWidth += stepWidth; - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, wnd_TrimWidth, (int)wnd_Height - wnd_TrimHeight), true); - Width = _targetWidth; - this.Left = newLeft; - ApplyRegion(new Rect(0, 0, wnd_TrimWidth, (int)wnd_Height - wnd_TrimHeight)); - break; - case AnchorStyle.Left: - if (this.Left + stepWidth >= wnd_Left) - { - this.Left = wnd_Left; - wnd_TrimWidth = (int)wnd_Width; - stopTimer = true; - } - else - { - this.Left += stepWidth; - wnd_TrimWidth += stepWidth; - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), (int)wnd_Height - wnd_TrimHeight), true); - ApplyRegion( - new Rect((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), (int)wnd_Height - wnd_TrimHeight)); - Width = _targetWidth; - break; - case AnchorStyle.Bottom: - double newTop = this.Top; - if (this.Top - stepHeight <= wnd_Top - wnd_Height) - { - newTop = wnd_Top - wnd_Height; - wnd_TrimHeight = (int)wnd_Height; - stopTimer = true; - } - else - { - newTop -= stepHeight; - wnd_TrimHeight += stepHeight; - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, (int)wnd_Width - wnd_TrimWidth, wnd_TrimHeight), true); - ApplyRegion( - new Rect(0, 0, (int)wnd_Width - wnd_TrimWidth, wnd_TrimHeight)); - - Height = _targetHeight; - this.Top = newTop; - break; - case AnchorStyle.Top: - if (this.Top + stepHeight >= wnd_Top) - { - this.Top = wnd_Top; - wnd_TrimHeight = (int)wnd_Height; - stopTimer = true; - } - else - { - this.Top += stepHeight; - wnd_TrimHeight += stepHeight; - } - - //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, (int)(wnd_Top - this.Top), (int)wnd_Width - wnd_TrimWidth, (int)(wnd_Height)), true); - ApplyRegion( - new Rect(0, (int)(wnd_Top - this.Top), (int)wnd_Width - wnd_TrimWidth, (int)(wnd_Height))); - - Height = _targetHeight; - break; - } - - if (stopTimer) - { - //SetWindowRgn(new WindowInteropHelper(this).Handle, IntPtr.Zero, false); - UpdateClipRegion(); - animTimer.Stop(); - IsOpening = false; - } - }; - - IsOpening = true; - animTimer.Start(); - - - } - - //internal void StartCloseAnimation() - //{ - // AnchorStyle CorrectedAnchor = Anchor; - - // if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) - // CorrectedAnchor = AnchorStyle.Right; - // else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) - // CorrectedAnchor = AnchorStyle.Left; - - - // //Let closing animation to occur - // //Here we get a reference to a storyboard resource with a name ClosingStoryboard and - // //wait that it completes before closing the window - // FrameworkElement targetElement = GetTemplateChild("INT_pane") as FrameworkElement; - // if (targetElement != null) - // { - // Storyboard storyBoard = new Storyboard(); - - // if (CorrectedAnchor == AnchorStyle.Left || CorrectedAnchor == AnchorStyle.Right) - // { - // DoubleAnimation anim = new DoubleAnimation(this.ActualWidth, 0.0, new Duration(TimeSpan.FromMilliseconds(500))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Width")); - // //storyBoard.Children.Add(anim); - // } - // if (CorrectedAnchor == AnchorStyle.Right) - // { - // DoubleAnimation anim = new DoubleAnimation(this.Left, this.Left + this.ActualWidth, new Duration(TimeSpan.FromMilliseconds(500))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Left")); - // storyBoard.Children.Add(anim); - // } - // if (CorrectedAnchor == AnchorStyle.Top || CorrectedAnchor == AnchorStyle.Bottom) - // { - // DoubleAnimation anim = new DoubleAnimation(this.Height, 0.0, new Duration(TimeSpan.FromMilliseconds(500))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Height")); - // storyBoard.Children.Add(anim); - // } - // if (CorrectedAnchor == AnchorStyle.Bottom) - // { - // DoubleAnimation anim = new DoubleAnimation(this.Top, this.Top + this.Height, new Duration(TimeSpan.FromMilliseconds(500))); - // Storyboard.SetTargetProperty(anim, new PropertyPath("Top")); - // storyBoard.Children.Add(anim); - // } - - // { - // //DoubleAnimation anim = new DoubleAnimation(1.0, 0.0, new Duration(TimeSpan.FromMilliseconds(500))); - // //Storyboard.SetTargetProperty(anim, new PropertyPath("Opacity")); - // //AllowsTransparency slow down perfomance under XP/VISTA because rendering is enterely perfomed using CPU - // //storyBoard.Children.Add(anim); - // } - - // storyBoard.Completed += (animation, eventArgs) => - // { - // if (!IsClosed) - // Close(); - // }; - - // foreach (AnimationTimeline animTimeLine in storyBoard.Children) - // { - // animTimeLine.FillBehavior = FillBehavior.Stop; - // } - - // storyBoard.Begin(this); - // } - - //} - - - - #endregion - - - #region Clipping Region - - protected override void OnActivated(EventArgs e) - { - if (!IsOpening && !IsClosing) - UpdateClipRegion(); - - base.OnActivated(e); - } - - internal void UpdateClipRegion() - { - //ApplyRegion(_lastApplyRect.IsEmpty ? new Rect(0, 0, this.Width, this.Height) : _lastApplyRect); - ApplyRegion(new Rect(0, 0, Width, Height)); - } - - Rect _lastApplyRect = Rect.Empty; - - void ApplyRegion(Rect wndRect) - { - if (!this.CanTransform()) - return; - - wndRect = new Rect( - this.TransformFromDeviceDPI(wndRect.TopLeft), - this.TransformFromDeviceDPI(wndRect.Size)); - - _lastApplyRect = wndRect; - - if (PresentationSource.FromVisual(this) == null) - return; - - - if (_dockingManager != null) - { - List otherRects = new List(); - - foreach (Window fl in Window.GetWindow(_dockingManager).OwnedWindows) - { - //not with myself! - if (fl == this) - continue; - - if (!fl.IsVisible) - continue; - - Rect flRect = new Rect( - PointFromScreen(new Point(fl.Left, fl.Top)), - PointFromScreen(new Point(fl.Left + fl.Width, fl.Top + fl.Height))); - - if (flRect.IntersectsWith(wndRect)) - otherRects.Add(Rect.Intersect(flRect, wndRect)); - } - - IntPtr hDestRegn = CreateRectRgn( - (int)wndRect.Left, - (int)wndRect.Top, - (int)wndRect.Right, - (int)wndRect.Bottom); - - foreach (Rect otherRect in otherRects) - { - IntPtr otherWin32Rect = CreateRectRgn( - (int)otherRect.Left, - (int)otherRect.Top, - (int)otherRect.Right, - (int)otherRect.Bottom); - - CombineRgn(hDestRegn, hDestRegn, otherWin32Rect, (int)CombineRgnStyles.RGN_DIFF); - } - - - SetWindowRgn(new WindowInteropHelper(this).Handle, hDestRegn, true); - } - } - - #endregion - } -} diff --git a/src/Libraries/AvalonDock/GreyableImage/GreyableImage.cs b/src/Libraries/AvalonDock/GreyableImage/GreyableImage.cs deleted file mode 100644 index 0910cd40d5..0000000000 --- a/src/Libraries/AvalonDock/GreyableImage/GreyableImage.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; - -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.ComponentModel; - - -namespace AvalonDock -{ - /// - /// Image control that get's greyed out when disabled. - /// This control is intended to be used for toolbar, menu or button icons where ability of an icon to - /// grey itself out when disabled is essential. - /// - /// 1) Greyscale image is created using FormatConvertedBitmap class. Unfortunately when converting the - /// image to greyscale this class does n0t preserve transparency information. To overcome that, there is - /// an opacity mask created from original image that is applied to greyscale image in order to preserve - /// transparency information. Because of that if an OpacityMask is applied to original image that mask - /// has to be combined with that special opacity mask of greyscale image in order to make a proper - /// greyscale image look. If you know how to combine two opacity masks please let me know. - /// 2) DrawingImage source is not supported at the moment. - /// 3) Have not tried to use any BitmapSource derived sources accept for BitmapImage so it may not be - /// able to convert some of them to greyscale. - /// 4) When specifying source Uri from XAML try to use Absolute Uri otherwise the greyscale image - /// may not be created in some scenarious. There is some code to improve the situation but I cannot - /// guarantee it will work in all possible scenarious. - /// 5) In case the greyscaled version cannot be created for whatever reason the original image with - /// 60% opacity (i.e. dull colours) will be used instead (that will work even with the DrawingImage - /// source). - /// - /// - public class GreyableImage : Image - { - // these are holding references to original and greyscale ImageSources - private ImageSource _sourceC, _sourceG; - // these are holding original and greyscale opacity masks - private Brush _opacityMaskC, _opacityMaskG; - - static GreyableImage() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(GreyableImage), new FrameworkPropertyMetadata(typeof(GreyableImage))); - } - - /// - /// Overwritten to handle changes of IsEnabled, Source and OpacityMask properties - /// - /// - protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) - { - if (e.Property.Name.Equals("IsEnabled")) - { - if ((e.NewValue as bool?) == false) - { - Source = _sourceG; - OpacityMask = _opacityMaskG; - } - else if ((e.NewValue as bool?) == true) - { - Source = _sourceC; - OpacityMask = _opacityMaskC; - } - } - else if (e.Property.Name.Equals("Source") && - !object.ReferenceEquals(Source, _sourceC) && - !object.ReferenceEquals(Source, _sourceG)) // only recache Source if it's the new one from outside - { - SetSources(); - } - else if (e.Property.Name.Equals("OpacityMask") && - !object.ReferenceEquals(OpacityMask, _opacityMaskC) && - !object.ReferenceEquals(OpacityMask, _opacityMaskG)) // only recache opacityMask if it's the new one from outside - { - _opacityMaskC = OpacityMask; - } - - base.OnPropertyChanged(e); - } - - /// - /// Cashes original ImageSource, creates and caches greyscale ImageSource and greyscale opacity mask - /// - private void SetSources() - { - // in case greyscale image cannot be created set greyscale source to original Source first - _sourceG = _sourceC = Source; - - // create Opacity Mask for greyscale image as FormatConvertedBitmap does not keep transparency info - _opacityMaskG = new ImageBrush(_sourceC); - _opacityMaskG.Opacity = 0.6; - - try - { - // get the string Uri for the original image source first - String stringUri = TypeDescriptor.GetConverter(Source).ConvertTo(Source, typeof(string)) as string; - Uri uri = null; - // try to resolve it as an absolute Uri (if it is relative and used it as is - // it is likely to point in a wrong direction) - if (!Uri.TryCreate(stringUri, UriKind.Absolute, out uri)) - { - // it seems that the Uri is relative, at this stage we can only assume that - // the image requested is in the same assembly as this oblect, - // so we modify the string Uri to make it absolute ... - stringUri = "pack://application:,,,/" + stringUri.TrimStart(new char[2] { System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar }); - - // ... and try to resolve again - uri = new Uri(stringUri); - } - - // create and cache greyscale ImageSource - _sourceG = new FormatConvertedBitmap(new BitmapImage(uri), PixelFormats.Gray8, null, 0); - } - catch (Exception e) - { - System.Diagnostics.Debug.Fail("The Image used cannot be greyed out.", - "Use BitmapImage or URI as a Source in order to allow greyscaling. Make sure the absolute Uri is used as relative Uri may sometimes resolve incorrectly.\n\nException: " + e.Message); - } - } - } -} diff --git a/src/Libraries/AvalonDock/HelperFunc.cs b/src/Libraries/AvalonDock/HelperFunc.cs deleted file mode 100644 index 3d8373bb48..0000000000 --- a/src/Libraries/AvalonDock/HelperFunc.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Media; -using System.Windows.Controls; -using System.Windows.Threading; -using System.Threading; - -namespace AvalonDock -{ - internal static class HelperFunc - { - //public static bool AreVeryClose(double v1, double v2) - //{ - // if (Math.Abs(v1 - v2) < 0.000001) - // return true; - - // return false; - //} - public static bool AreClose(double v1, double v2) - { - if (v1 == v2) - { - return true; - } - double num = ((Math.Abs(v1) + Math.Abs(v2)) + 10.0) * 2.2204460492503131E-16; - double num2 = v1 - v2; - return ((-num < num2) && (num > num2)); - } - - public static double MultiplyCheckNaN(double v1, double v2) - { - //inf * 0 = 1 - if (double.IsInfinity(v1) && - v2 == 0.0) - return 1.0; - if (double.IsInfinity(v2) && - v1 == 0.0) - return 1.0; - - return v1 * v2; - } - - - public static bool IsLessThen(double v1, double v2) - { - if (AreClose(v1, v2)) - return false; - - return v1 < v2; - } - - public static Point PointToScreenWithoutFlowDirection(FrameworkElement element, Point point) - { - if (FrameworkElement.GetFlowDirection(element) == FlowDirection.RightToLeft) - { - Point leftToRightPoint = new Point( - element.ActualWidth - point.X, - point.Y); - return element.PointToScreenDPI(leftToRightPoint); - } - - return element.PointToScreenDPI(point); - } - - public static T FindVisualAncestor(this DependencyObject obj, bool includeThis) where T : DependencyObject - { - if (!includeThis) - obj = VisualTreeHelper.GetParent(obj); - - while (obj != null && (!(obj is T))) - { - obj = VisualTreeHelper.GetParent(obj); - } - - return obj as T; - } - - public static bool IsLogicalChildContained(this DependencyObject obj) where T : DependencyObject - { - foreach (object child in LogicalTreeHelper.GetChildren(obj)) - { - if (child is T) - return true; - - if (child is DependencyObject) - { - - bool res = (child as DependencyObject).IsLogicalChildContained(); - if (res) - return true; - } - } - - return false; - } - - public static T GetLogicalChildContained(this DependencyObject obj) where T : DependencyObject - { - foreach (object child in LogicalTreeHelper.GetChildren(obj)) - { - if (child is T) - return child as T; - - if (child is DependencyObject) - { - T childFound = (child as DependencyObject).GetLogicalChildContained(); - if (childFound != null) - return childFound; - } - } - - return null; - } - - public static T FindAnotherLogicalChildContained(this DependencyObject obj, UIElement childToExclude) where T : DependencyObject - { - foreach (object child in LogicalTreeHelper.GetChildren(obj)) - { - if (child is T && child != childToExclude) - return child as T; - - if (child is DependencyObject) - { - T childFound = (child as DependencyObject).FindAnotherLogicalChildContained(childToExclude); - if (childFound != null) - return childFound; - } - } - - return null; - } - - public static DockablePane FindChildDockablePane(this DockingManager manager, AnchorStyle desideredAnchor) - { - foreach (UIElement childObject in LogicalTreeHelper.GetChildren(manager)) - { - DockablePane foundPane = FindChildDockablePane(childObject, desideredAnchor); - if (foundPane != null) - return foundPane; - } - - return null; - } - - static DockablePane FindChildDockablePane(UIElement parent, AnchorStyle desideredAnchor) - { - if (parent is DockablePane && ((DockablePane)parent).Anchor == desideredAnchor) - return parent as DockablePane; - - if (parent is ResizingPanel) - { - foreach (UIElement childObject in ((ResizingPanel)parent).Children) - { - DockablePane foundPane = FindChildDockablePane(childObject, desideredAnchor); - if (foundPane != null) - return foundPane; - } - } - - return null; - } - - - public static Point PointToScreenDPI(this Visual visual, Point pt) - { - Point resultPt = visual.PointToScreen(pt); - return TransformToDeviceDPI(visual, resultPt); - } - - public static Point TransformToDeviceDPI(this Visual visual, Point pt) - { - Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; - return new Point(pt.X / m.M11, pt.Y /m.M22); - } - - public static Size TransformFromDeviceDPI(this Visual visual, Size size) - { - Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; - return new Size(size.Width * m.M11, size.Height * m.M22); - } - - public static Point TransformFromDeviceDPI(this Visual visual, Point pt) - { - Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; - return new Point(pt.X * m.M11, pt.Y * m.M22); - } - - public static bool CanTransform(this Visual visual) - { - return PresentationSource.FromVisual(visual) != null; - } - - - public static void CallMethod(this object o, string methodName, object[] args) - { - o.GetType().GetMethod(methodName).Invoke(o, null); - } - - public static T GetPropertyValue(this object o, string propertyName) - { - return (T)o.GetType().GetProperty(propertyName).GetValue(o, null); - } - } -} diff --git a/src/Libraries/AvalonDock/IDockableControl.cs b/src/Libraries/AvalonDock/IDockableControl.cs deleted file mode 100644 index 428fc143fb..0000000000 --- a/src/Libraries/AvalonDock/IDockableControl.cs +++ /dev/null @@ -1,36 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; - -namespace AvalonDock -{ - interface IDockableControl - { - bool IsDocked { get; } - } -} diff --git a/src/Libraries/AvalonDock/IDropSurface.cs b/src/Libraries/AvalonDock/IDropSurface.cs deleted file mode 100644 index c6ce35139e..0000000000 --- a/src/Libraries/AvalonDock/IDropSurface.cs +++ /dev/null @@ -1,72 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; - -namespace AvalonDock -{ - /// - /// Defines an interface that must be implemented by objects that can host dragged panes - /// - interface IDropSurface - { - /// - /// Gets a value indicating if this area is avilable for drop a dockable pane - /// - bool IsSurfaceVisible { get; } - - /// - /// Gets the sensible area for drop a pane - /// - Rect SurfaceRectangle { get; } - - /// - /// Called by when user dragged pane enter this surface - /// - /// Location of the mouse - void OnDragEnter(Point point); - - /// - /// Called by when user dragged pane is over this surface - /// - /// Location of the mouse - void OnDragOver(Point point); - - /// - /// Called by when user dragged pane leave this surface - /// - /// Location of the mouse - void OnDragLeave(Point point); - - /// - /// Called by when user drops a pane to this surface - /// - /// Location of the mouse - bool OnDrop(Point point); - } -} diff --git a/src/Libraries/AvalonDock/ManagedContent.cs b/src/Libraries/AvalonDock/ManagedContent.cs deleted file mode 100644 index 204ec3e3db..0000000000 --- a/src/Libraries/AvalonDock/ManagedContent.cs +++ /dev/null @@ -1,534 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Xml; -using System.Windows.Forms.Integration; -using System.Diagnostics; -using System.Windows.Threading; -using System.Threading; -using System.Reflection; - - -namespace AvalonDock -{ - - public abstract class ManagedContent : ContentControl, INotifyPropertyChanged - { - static ManagedContent() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - //DefaultStyleKeyProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(typeof(ManagedContent))); - FocusableProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(true)); - } - - public ManagedContent() - { - this.Loaded += new RoutedEventHandler(ManagedContent_Loaded); - this.Unloaded += new RoutedEventHandler(ManagedContent_Unloaded); - } - - void ManagedContent_Loaded(object sender, RoutedEventArgs e) - { - } - - void ManagedContent_Unloaded(object sender, RoutedEventArgs e) - { - } - - - public string Title - { - get { return (string)GetValue(TitleProperty); } - set { SetValue(TitleProperty, value); } - } - - // Using a DependencyProperty as the backing store for Title. This enables animation, styling, binding, etc... - public static readonly DependencyProperty TitleProperty = - DependencyProperty.Register("Title", typeof(string), typeof(ManagedContent)); - - //public string IconSource - //{ - // get { return (string)GetValue(IconSourceProperty); } - // set { SetValue(IconSourceProperty, value); } - //} - - //// Using a DependencyProperty as the backing store for Icon. This enables animation, styling, binding, etc... - //public static readonly DependencyProperty IconSourceProperty = - // DependencyProperty.Register("IconSource", typeof(string), typeof(ManagedContent)); - - /// - /// Access to dependency property - /// - public object Icon - { - get { return (object)GetValue(IconProperty); } - set { SetValue(IconProperty, value); } - } - - /// - /// Select an icon object for the content - /// - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(object), typeof(ManagedContent), - new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerce_Icon))); - - private static object OnCoerce_Icon(DependencyObject o, object value) - { - if (value is string) - { - Uri iconUri; - // try to resolve given value as an absolute URI - if (Uri.TryCreate(value as String, UriKind.RelativeOrAbsolute, out iconUri)) - { - ImageSource img = new BitmapImage(iconUri); - if (null != img) - { - GreyableImage icon = (o as ManagedContent).Icon as GreyableImage; - if (null == icon) - icon = new GreyableImage(); - - icon.Source = img; - icon.Stretch = Stretch.None; - icon.SnapsToDevicePixels = true; - - return icon; - } - } - } - return value; - } - - /// - /// Access to - /// - public IInputElement DefaultElement - { - - get { return (IInputElement)GetValue(DefaultFocusedElementProperty); } - - set { SetValue(DefaultFocusedElementProperty, value); } - - } - - /// - /// Gets or sets an element which is focused by default when content is activated - /// - public static readonly DependencyProperty DefaultFocusedElementProperty = DependencyProperty.Register("DefaultElement", typeof(IInputElement), typeof(ManagedContent)); - - - FrameworkElement _dragEnabledArea; - - protected FrameworkElement DragEnabledArea - { - get { return _dragEnabledArea; } - } - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - _dragEnabledArea = GetTemplateChild("PART_DragArea") as FrameworkElement; - - if (_dragEnabledArea != null) - { - _dragEnabledArea.MouseDown += new MouseButtonEventHandler(OnDragMouseDown); - _dragEnabledArea.MouseMove += new MouseEventHandler(OnDragMouseMove); - _dragEnabledArea.MouseUp += new MouseButtonEventHandler(OnDragMouseUp); - _dragEnabledArea.MouseLeave += new MouseEventHandler(OnDragMouseLeave); - } - } - - - #region Mouse management - - protected virtual void OnDragStart(Point ptMouse, Point ptrelativeMouse) - { - - } - - Point ptStartDrag; - bool isMouseDown = false; - - protected Point StartDragPoint - { - get { return ptStartDrag; } - } - - protected bool IsMouseDown - { - get { return isMouseDown; } - } - - protected void ResetIsMouseDownFlag() - { - isMouseDown = false; - } - - protected virtual void OnDragMouseDown(object sender, MouseButtonEventArgs e) - { - if (!e.Handled && Manager != null)// && State != DockableContentState.AutoHide) - { - isMouseDown = true; - ptStartDrag = e.GetPosition((IInputElement)System.Windows.Media.VisualTreeHelper.GetParent(this)); - } - } - - protected virtual void OnDragMouseMove(object sender, MouseEventArgs e) - { - } - - protected virtual void OnDragMouseUp(object sender, MouseButtonEventArgs e) - { - isMouseDown = false; - } - - Point ptRelativePosition; - - protected virtual void OnDragMouseLeave(object sender, MouseEventArgs e) - { - if (!e.Handled && IsMouseDown && Manager != null) - { - if (!IsMouseCaptured) - { - Point ptMouseMove = e.GetPosition(this); - ManagedContent contentToSwap = null; - if (ContainerPane != null) - { - foreach (ManagedContent content in ContainerPane.Items) - { - if (content == this) - continue; - - HitTestResult res = VisualTreeHelper.HitTest(content, e.GetPosition(content)); - if (res != null) - { - contentToSwap = content; - break; - } - } - } - - - - if (contentToSwap != null) - { - Pane containerPane = ContainerPane; - int myIndex = containerPane.Items.IndexOf(this); - - ContainerPane.Items.RemoveAt(myIndex); - - int otherIndex = containerPane.Items.IndexOf(contentToSwap); - containerPane.Items.RemoveAt(otherIndex); - - containerPane.Items.Insert(otherIndex, this); - - containerPane.Items.Insert(myIndex, contentToSwap); - - containerPane.SelectedItem = this; - - e.Handled = false; - return; - } - else if (Math.Abs(ptMouseMove.X - StartDragPoint.X) > SystemParameters.MinimumHorizontalDragDistance || - Math.Abs(ptMouseMove.Y - StartDragPoint.Y) > SystemParameters.MinimumVerticalDragDistance) - { - ptRelativePosition = e.GetPosition(DragEnabledArea); - - ResetIsMouseDownFlag(); - OnDragStart(StartDragPoint, ptRelativePosition); - e.Handled = true; - } - } - } - - isMouseDown = false; - } - - - #endregion - - protected override void OnMouseDown(MouseButtonEventArgs e) - { - base.OnMouseDown(e); - - if (!e.Handled) - { - SetAsActive(); - IInputElement focusedElement = e.Source as IInputElement; - if (focusedElement != null) Keyboard.Focus(focusedElement); - } - - } - - - protected override void OnKeyDown(KeyEventArgs e) - { - if (e.Key == Key.Enter) - { - if (ContainerPane != null) - ContainerPane.SelectedItem = this; - } - - base.OnKeyDown(e); - } - - public Pane ContainerPane - { - get - { - Pane containerPane = Parent as Pane; - if (containerPane != null) - return containerPane; - - return this.FindVisualAncestor(false); - } - } - - internal DockingManager Manager - { - get - { - if (ContainerPane != null) - return ContainerPane.GetManager(); - - return null; - } - } - - protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) - { - base.OnGotKeyboardFocus(e); - - Debug.WriteLine(string.Format("[{0}].OnGotKeyboardFocus() Source={1} NewFocus={2} OldFocus={3}", this.Name, e.Source.GetType().ToString(), e.NewFocus.GetType().ToString(), e.OldFocus == null ? "" : e.OldFocus.GetType().ToString())); - - if (Manager != null && this.IsKeyboardFocusWithin)// && Manager.ActiveContent != this) - { - Manager.ActiveContent = this; - } - } - - protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e) - { - Debug.WriteLine(string.Format("[{0}].OnLostKeyboardFocus() Source={1} NewFocus={2} OldFocus={3}", this.Name, e.Source.GetType().ToString(), e.NewFocus == null ? "" : e.NewFocus.GetType().ToString(), e.OldFocus == null ? "" : e.OldFocus.GetType().ToString())); - base.OnLostKeyboardFocus(e); - } - - bool _isActiveContent = false; - - /// - /// Returns true if the content is the currently active content. - /// - /// Use method to set a content as active. - public bool IsActiveContent - { - get - { - return _isActiveContent; - } - internal set - { - if (_isActiveContent != value) - { - _isActiveContent = value; - NotifyPropertyChanged("IsActiveContent"); - if (IsActiveContentChanged != null) - IsActiveContentChanged(this, EventArgs.Empty); - - if (_isActiveContent && !IsKeyboardFocused) - { - Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(delegate - { - if (_isActiveContent && !IsKeyboardFocused) - { - if (this.Content is WindowsFormsHost) - { - //Use reflection in order to remove WinForms assembly reference - WindowsFormsHost contentHost = this.Content as WindowsFormsHost; - - object childCtrl = contentHost.GetType().GetProperty("Child").GetValue(contentHost, null); - - if (childCtrl != null) - { - if (!childCtrl.GetPropertyValue("Focused")) - { - childCtrl.CallMethod("Focus", null); - } - } - } - else if (DefaultElement != null) - { - Debug.WriteLine("Try to set kb focus to " + DefaultElement); - - IInputElement kbFocused = Keyboard.Focus(DefaultElement); - - if (kbFocused != null) - Debug.WriteLine("Focused element " + kbFocused); - else - Debug.WriteLine("No focused element"); - - } - else if (this.Content is IInputElement) - { - //Debug.WriteLine("Try to set kb focus to " + this.Content.ToString()); - //IInputElement kbFocused = Keyboard.Focus(this.Content as IInputElement); - //if (kbFocused != null) - // Debug.WriteLine("Focused element " + kbFocused); - //else - // Debug.WriteLine("No focused element"); - } - } - })); - } - } - - } - } - - public event EventHandler IsActiveContentChanged; - - /// - /// Set the content as the active content - /// - /// After this method returns property returns true. - public void SetAsActive() - { - if (ContainerPane != null && Manager != null)// && Manager.ActiveContent != this) - { - ContainerPane.SelectedItem = this; - FocusContent(); - if (Manager != null) - Manager.ActiveContent = this; - } - } - - protected virtual void FocusContent() - { - } - - bool _isActiveDocument = false; - - /// - /// Returns true if the document is the currently active document. - /// - /// Use method to set a content as active. - public bool IsActiveDocument - { - get - { - return _isActiveDocument; - } - internal set - { - if (_isActiveDocument != value) - { - if (value) - { - if (ContainerPane != null) - ContainerPane.SelectedItem = this; - } - - _isActiveDocument = value; - NotifyPropertyChanged("IsActiveDocument"); - } - } - } - - bool _isLocked; - - /// - /// Gets or sets a value indicating if this content is locked (readonly). - /// - public bool IsLocked - { - get { return _isLocked; } - set - { - _isLocked = value; - NotifyPropertyChanged("IsLocked"); - } - } - - Size _floatingWindowSize = Size.Empty; - - /// - /// Gets or sets the size of the floating window which hosts this content - /// - public Size FloatingWindowSize - { - get - { return _floatingWindowSize; } - set - { _floatingWindowSize = value; } - } - - - ResizeMode _floatingResizeMode = ResizeMode.CanResize; - public ResizeMode FloatingResizeMode - { - get - { return _floatingResizeMode; } - set - { _floatingResizeMode = value; } - } - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - protected void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - - - public bool IsCloseable - { - get { return (bool)GetValue(IsCloseableProperty); } - set { SetValue(IsCloseableProperty, value); } - } - - // Using a DependencyProperty as the backing store for IsCloseable. This enables animation, styling, binding, etc... - public static readonly DependencyProperty IsCloseableProperty = - DependencyProperty.Register("IsCloseable", typeof(bool), typeof(ManagedContent), new UIPropertyMetadata(true)); - - - } -} diff --git a/src/Libraries/AvalonDock/NavigatorWindow.cs b/src/Libraries/AvalonDock/NavigatorWindow.cs deleted file mode 100644 index b5c911ec01..0000000000 --- a/src/Libraries/AvalonDock/NavigatorWindow.cs +++ /dev/null @@ -1,358 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.ComponentModel; - -namespace AvalonDock -{ - - public class NavigatorWindowItem - { - private string _title; - - public string Title - { - get - { - return _title; - } - } - - private object _icon; - - public object Icon - { - get - { - return _icon; - } - } - - protected ManagedContent _content; - - public ManagedContent ItemContent - { - get { return _content; } - } - - internal NavigatorWindowItem(ManagedContent content) - { - _title = content.Title; - _icon = content.Icon; - _content = content; - } - } - - public class NavigatorWindowDocumentItem : NavigatorWindowItem - { - private string _infoTip; - - public string InfoTip - { - get - { - return _infoTip; - } - } - - private string _contentTypeDescription; - - public string ContentTypeDescription - { - get - { - return _contentTypeDescription; - } - } - - private DateTime _lastActivation; - - public DateTime LastActivation - { - get { return _lastActivation; } - } - - - internal NavigatorWindowDocumentItem(DocumentContent document) - : base(document) - { - _infoTip = document.InfoTip; - if (_infoTip == null && document.ToolTip != null && document.ToolTip is string) - _infoTip = document.ToolTip.ToString(); - - _contentTypeDescription = document.ContentTypeDescription; - _lastActivation = document.LastActivation; - } - - - } - - public class NavigatorWindow : Window, INotifyPropertyChanged - { - static NavigatorWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(typeof(NavigatorWindow))); - - - Window.AllowsTransparencyProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(true)); - Window.WindowStyleProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(WindowStyle.None)); - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(false)); - Control.BackgroundProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); - } - - public NavigatorWindow() - { - } - - void OnKeyUp(object sender, KeyEventArgs e) - { - if (e.Key != Key.Tab) - CloseThisWindow();//Hide(); - else - { - e.Handled = true; - MoveNextSelectedContent(); - } - } - - void OnKeyDown(object sender, KeyEventArgs e) - { - if (e.Key != Key.Tab) - CloseThisWindow();//Hide(); - else - { - e.Handled = true; - } - } - - DockingManager _manager; - public NavigatorWindow(DockingManager manager) - { - _manager = manager; - Keyboard.AddKeyUpHandler(this, new KeyEventHandler(this.OnKeyUp)); - Keyboard.AddKeyDownHandler(this, new KeyEventHandler(this.OnKeyDown)); - } - - - protected override void OnActivated(EventArgs e) - { - base.OnActivated(e); - - List listOfDocuments = _manager.FindContents(); - List docs = new List(); - listOfDocuments.ForEach((DocumentContent doc) => - { - docs.Add(new NavigatorWindowDocumentItem(doc)); - }); - - docs.Sort((NavigatorWindowDocumentItem item1, NavigatorWindowDocumentItem item2) => - { - if (item1 == item2 || - item1.LastActivation == item2.LastActivation) - return 0; - return (item1.LastActivation < item2.LastActivation) ? 1 : -1; - }); - - Documents = docs; - - List listOfContents = _manager.FindContents(); - List cnts = new List(); - listOfContents.ForEach((DockableContent cnt) => - { - cnts.Add(new NavigatorWindowItem(cnt)); - }); - - DockableContents = cnts; - - - SelectedContent = Documents.Find((NavigatorWindowDocumentItem docItem) => - { - return docItem.ItemContent == _manager.ActiveDocument; - }); - - SelectedToolWindow = null; - } - - protected override void OnDeactivated(EventArgs e) - { - if (_manager != null) - { - Window mainWindow = Window.GetWindow(_manager); - if (mainWindow != null) - { - mainWindow.Activate(); - if (SelectedContent != null) - { - _manager.Show(SelectedContent.ItemContent as DocumentContent); - SelectedContent.ItemContent.SetAsActive(); - } - else if (SelectedToolWindow != null) - { - _manager.Show(SelectedToolWindow.ItemContent as DockableContent); - SelectedToolWindow.ItemContent.SetAsActive(); - } - } - } - - if (!_isClosing) - CloseThisWindow();//Hide(); - - base.OnDeactivated(e); - } - - void CloseThisWindow() - { - Window wndParent = this.Owner; - Close(); - wndParent.Activate(); - } - - List _documents = new List(); - - public List Documents - { - get { return _documents; } - private - set - { - _documents = value; - NotifyPropertyChanged("Documents"); - } - } - - List _tools = new List(); - - public List DockableContents - { - get { return _tools; } - private set - { - _tools = value; - NotifyPropertyChanged("DockableContents"); - } - } - - NavigatorWindowDocumentItem _selectedContent; - - public NavigatorWindowDocumentItem SelectedContent - { - get - { - return _selectedContent; - } - set - { - if (_selectedContent != value) - { - _selectedContent = value; - NotifyPropertyChanged("SelectedContent"); - } - } - } - - NavigatorWindowItem _toolContent; - - public NavigatorWindowItem SelectedToolWindow - { - get - { - return _toolContent; - } - set - { - if (_toolContent != value) - { - _toolContent = value; - - NotifyPropertyChanged("SelectedToolWindow"); - - SelectedContent = null; - Close();// Hide(); - } - } - } - - public void MoveNextSelectedContent() - { - if (_selectedContent == null) - return; - - if (Documents.Contains(SelectedContent)) - { - int indexOfSelecteContent = Documents.IndexOf(_selectedContent); - - if (indexOfSelecteContent == Documents.Count - 1) - { - indexOfSelecteContent = 0; - } - else - indexOfSelecteContent++; - - SelectedContent = Documents[indexOfSelecteContent]; - } - } - - bool _isClosing = false; - protected override void OnClosing(CancelEventArgs e) - { - _isClosing = true; - - base.OnClosing(e); - } - - protected override void OnClosed(EventArgs e) - { - //reset documents list to avoid WPF Bug: - //http://social.msdn.microsoft.com/forums/en/wpf/thread/f3fc5b7e-e035-4821-908c-b6c07e5c7042/ - //http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321955 - Documents = new List(); - - base.OnClosed(e); - } - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - } -} diff --git a/src/Libraries/AvalonDock/OverlayWindow.cs b/src/Libraries/AvalonDock/OverlayWindow.cs deleted file mode 100644 index 00af4da30f..0000000000 --- a/src/Libraries/AvalonDock/OverlayWindow.cs +++ /dev/null @@ -1,383 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.ComponentModel; -using System.Windows.Markup; -using System.Diagnostics; -using System.Windows.Threading; -using System.Windows.Media.Animation; - -namespace AvalonDock -{ - public enum OverlayButtonHover - { - None, - DropPaneInto, - DropPaneLeft, - DropPaneRight, - DropPaneTop, - DropPaneBottom, - DropBorderLeft, - DropBorderRight, - DropBorderTop, - DropBorderBottom, - } - - public class OverlayWindow : Window, INotifyPropertyChanged - { - static OverlayWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(typeof(OverlayWindow))); - - Window.AllowsTransparencyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(true)); - Window.WindowStyleProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(WindowStyle.None)); - Window.ShowInTaskbarProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(false)); - } - - public OverlayWindow() - { } - - DockingManager _manager = null; - - public OverlayWindow(DockingManager manager) - { - _manager = manager; - } - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - gridPaneRelativeDockingOptions = GetTemplateChild("PART_gridPaneRelativeDockingOptions") as FrameworkElement; - selectionBox = GetTemplateChild("PART_SelectionBox") as FrameworkElement; - - owdBottom = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockBottom") as FrameworkElement, this); - owdTop = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockTop") as FrameworkElement, this); - owdLeft = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockLeft") as FrameworkElement, this); - owdRight = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockRight") as FrameworkElement, this); - - owdPaneBottom = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneBottom") as FrameworkElement, this); - owdPaneTop = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneTop") as FrameworkElement, this); - owdPaneLeft = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneLeft") as FrameworkElement, this); - owdPaneRight = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneRight") as FrameworkElement, this); - owdPaneInto = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneInto") as FrameworkElement, this); - - _manager.DragPaneServices.Register(owdBottom); - _manager.DragPaneServices.Register(owdTop); - _manager.DragPaneServices.Register(owdLeft); - _manager.DragPaneServices.Register(owdRight); - _manager.DragPaneServices.Register(owdPaneBottom); - _manager.DragPaneServices.Register(owdPaneTop); - _manager.DragPaneServices.Register(owdPaneLeft); - _manager.DragPaneServices.Register(owdPaneRight); - _manager.DragPaneServices.Register(owdPaneInto); - } - - FrameworkElement gridPaneRelativeDockingOptions; - FrameworkElement selectionBox; - - OverlayWindowDockingButton owdBottom; - OverlayWindowDockingButton owdTop; - OverlayWindowDockingButton owdLeft; - OverlayWindowDockingButton owdRight; - OverlayWindowDockingButton owdPaneBottom; - OverlayWindowDockingButton owdPaneTop; - OverlayWindowDockingButton owdPaneLeft; - OverlayWindowDockingButton owdPaneRight; - OverlayWindowDockingButton owdPaneInto; - - - internal bool OnDrop(OverlayWindowDockingButton owdDock, Point point) - { - //user has dropped the floating window over a anchor button - //create a new dockable pane to insert in the main layout - Pane paneToAnchor = _manager.DragPaneServices.FloatingWindow.ClonePane(); - - //floating window is going to be closed.. - - if (owdDock == owdBottom) - _manager.Anchor(paneToAnchor, AnchorStyle.Bottom); - else if (owdDock == owdLeft) - _manager.Anchor(paneToAnchor, AnchorStyle.Left); - else if (owdDock == owdRight) - _manager.Anchor(paneToAnchor, AnchorStyle.Right); - else if (owdDock == owdTop) - _manager.Anchor(paneToAnchor, AnchorStyle.Top); - else if (owdDock == owdPaneTop) - _manager.Anchor(paneToAnchor, CurrentDropPane, AnchorStyle.Top); - else if (owdDock == owdPaneBottom) - _manager.Anchor(paneToAnchor, CurrentDropPane, AnchorStyle.Bottom); - else if (owdDock == owdPaneLeft) - _manager.Anchor(paneToAnchor, CurrentDropPane, AnchorStyle.Left); - else if (owdDock == owdPaneRight) - _manager.Anchor(paneToAnchor, CurrentDropPane, AnchorStyle.Right); - else if (owdDock == owdPaneInto) - _manager.DropInto(paneToAnchor, CurrentDropPane); - - selectionBox.Visibility = Visibility.Hidden; - - return true; - } - - Pane CurrentDropPane = null; - - public void ShowOverlayPaneDockingOptions(Pane pane) - { - - HideOverlayPaneDockingOptions(pane); - - //check if dockable on a document pane - DockableStyle currentPaneDockableStyle = - _manager.DragPaneServices.FloatingWindow.HostedPane.GetCumulativeDockableStyle(); - - //if current drop pane is a DocumentPane ... - if (pane is DocumentPane && - (currentPaneDockableStyle & DockableStyle.Document) == 0) - return; - if (pane is DockablePane && - (currentPaneDockableStyle & DockableStyle.Dockable) == 0) - return; - - - Rect rectPane = pane.SurfaceRectangle; - - Point myScreenTopLeft = this.PointToScreenDPI(new Point(0, 0)); - rectPane.Offset(-myScreenTopLeft.X, -myScreenTopLeft.Y);//relative to me - gridPaneRelativeDockingOptions.SetValue(Canvas.LeftProperty, rectPane.Left + rectPane.Width / 2 - gridPaneRelativeDockingOptions.Width / 2); - gridPaneRelativeDockingOptions.SetValue(Canvas.TopProperty, rectPane.Top + rectPane.Height / 2 - gridPaneRelativeDockingOptions.Height / 2); - - if (pane is DocumentPane) - gridPaneRelativeDockingOptions.Visibility = Visibility.Visible; - else - { - gridPaneRelativeDockingOptions.Visibility = !(_manager.DragPaneServices.FloatingWindow is DocumentFloatingWindow) ? Visibility.Visible : Visibility.Hidden; - } - - - owdBottom.Enabled = ((currentPaneDockableStyle & DockableStyle.BottomBorder) > 0); - owdTop.Enabled = ((currentPaneDockableStyle & DockableStyle.TopBorder) > 0); - owdLeft.Enabled = ((currentPaneDockableStyle & DockableStyle.LeftBorder) > 0); - owdRight.Enabled = ((currentPaneDockableStyle & DockableStyle.RightBorder) > 0); - - - if (pane is DocumentPane) - owdPaneInto.Enabled = true; - else - owdPaneInto.Enabled = !(_manager.DragPaneServices.FloatingWindow is DocumentFloatingWindow); - - int destPaneChildCount = pane.Items.Count; - - owdPaneBottom.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; - owdPaneTop.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; - owdPaneLeft.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; - owdPaneRight.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; - - CurrentDropPane = pane; - } - - public void HideOverlayPaneDockingOptions(Pane surfaceElement) - { - - owdPaneBottom.Enabled = false; - owdPaneTop.Enabled = false; - owdPaneLeft.Enabled = false; - owdPaneRight.Enabled = false; - owdPaneInto.Enabled = false; - - gridPaneRelativeDockingOptions.Visibility = Visibility.Collapsed; - CurrentDropPane = null; - OverlayButtonHover = OverlayButtonHover.None; - } - - protected override void OnDeactivated(EventArgs e) - { - selectionBox.Visibility = Visibility.Hidden; - - base.OnDeactivated(e); - } - - protected override void OnActivated(EventArgs e) - { - base.OnActivated(e); - - - DockableStyle currentPaneDockableStyle = - _manager.DragPaneServices.FloatingWindow.HostedPane.GetCumulativeDockableStyle(); - - selectionBox.Visibility = Visibility.Hidden; - - owdBottom.Enabled = (currentPaneDockableStyle & DockableStyle.BottomBorder) > 0; - owdTop.Enabled = (currentPaneDockableStyle & DockableStyle.TopBorder) > 0; - owdLeft.Enabled = (currentPaneDockableStyle & DockableStyle.LeftBorder) > 0; - owdRight.Enabled = (currentPaneDockableStyle & DockableStyle.RightBorder) > 0; - } - - /// - /// Shows a highlighting rectangle - /// - /// - /// - /// - internal void OnDragEnter(OverlayWindowDockingButton owdDock, Point point) - { - OnDragOver(owdDock, point); - } - - /// - /// Hides the highlighting rectangle - /// - /// - /// - /// - internal void OnDragLeave(OverlayWindowDockingButton owdDock, Point point) - { - selectionBox.Visibility = Visibility.Hidden; - _manager.DragPaneServices.FloatingWindow.OnHideSelectionBox(); - OverlayButtonHover = OverlayButtonHover.None; - } - - internal void OnDragOver(OverlayWindowDockingButton owdDock, Point point) - { - if (selectionBox == null) - return; - - Rect rectPane; - - if (owdDock == owdBottom || - owdDock == owdLeft || - owdDock == owdTop || - owdDock == owdRight) - rectPane = _manager.SurfaceRectangle; - else - rectPane = CurrentDropPane.SurfaceRectangle; - - double selectionBoxWidth = Math.Min( - rectPane.Width / 2.0, - ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Width); - double selectionBoxHeight = Math.Min( - rectPane.Height / 2.0, - ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Height); - - - Point myScreenTopLeft = this.PointToScreenDPI(new Point()); - rectPane.Offset(-myScreenTopLeft.X, -myScreenTopLeft.Y);//relative to me - - if (owdDock == owdBottom || owdDock == owdPaneBottom) - { - selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); - selectionBox.SetValue(Canvas.TopProperty, rectPane.Top + rectPane.Height - selectionBoxHeight); - selectionBox.Width = rectPane.Width; - selectionBox.Height = selectionBoxHeight; - } - if (owdDock == owdLeft || owdDock == owdPaneLeft) - { - selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); - selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); - selectionBox.Width = selectionBoxWidth; - selectionBox.Height = rectPane.Height; - } - if (owdDock == owdRight || owdDock == owdPaneRight) - { - selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left + rectPane.Width - selectionBoxWidth); - selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); - selectionBox.Width = selectionBoxWidth; - selectionBox.Height = rectPane.Height; - } - if (owdDock == owdTop || owdDock == owdPaneTop) - { - selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); - selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); - selectionBox.Width = rectPane.Width; - selectionBox.Height = selectionBoxHeight; - } - if (owdDock == owdPaneInto) - { - selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); - selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); - selectionBox.Width = rectPane.Width; - selectionBox.Height = rectPane.Height; - } - - if (owdDock == owdLeft) - OverlayButtonHover = OverlayButtonHover.DropBorderLeft; - else if (owdDock == owdRight) - OverlayButtonHover = OverlayButtonHover.DropBorderRight; - else if (owdDock == owdTop) - OverlayButtonHover = OverlayButtonHover.DropBorderTop; - else if (owdDock == owdBottom) - OverlayButtonHover = OverlayButtonHover.DropBorderBottom; - else if (owdDock == owdPaneInto) - OverlayButtonHover = OverlayButtonHover.DropPaneInto; - else if (owdDock == owdPaneRight) - OverlayButtonHover = OverlayButtonHover.DropPaneRight; - else if (owdDock == owdPaneTop) - OverlayButtonHover = OverlayButtonHover.DropPaneTop; - else if (owdDock == owdPaneLeft) - OverlayButtonHover = OverlayButtonHover.DropPaneLeft; - else if (owdDock == owdPaneBottom) - OverlayButtonHover = OverlayButtonHover.DropPaneBottom; - else - OverlayButtonHover = OverlayButtonHover.None; - - - selectionBox.Visibility = Visibility.Visible; - - _manager.DragPaneServices.FloatingWindow.OnShowSelectionBox(); - - } - - OverlayButtonHover _overlayButtonHover = OverlayButtonHover.None; - - public OverlayButtonHover OverlayButtonHover - { - get - { return _overlayButtonHover; } - set - { - _overlayButtonHover = value; - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs("OverlayButtonHover")); - } - } - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - #endregion - } -} diff --git a/src/Libraries/AvalonDock/OverlayWindowAnchorButton.cs b/src/Libraries/AvalonDock/OverlayWindowAnchorButton.cs deleted file mode 100644 index ee07a4aa09..0000000000 --- a/src/Libraries/AvalonDock/OverlayWindowAnchorButton.cs +++ /dev/null @@ -1,125 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; - -namespace AvalonDock -{ - class OverlayWindowDockingButton : IDropSurface - { - OverlayWindow _owner; - FrameworkElement _btnDock; - - public OverlayWindowDockingButton(FrameworkElement btnDock, OverlayWindow owner) - : this(btnDock, owner, true) - { - - } - public OverlayWindowDockingButton(FrameworkElement btnDock, OverlayWindow owner, bool enabled) - { - _btnDock = btnDock; - _owner = owner; - Enabled = enabled; - } - - bool _enabled = true; - - public bool Enabled - { - get { return _enabled; } - set - { - _enabled = value; - - if (_enabled) - _btnDock.Visibility = Visibility.Visible; - else - _btnDock.Visibility = Visibility.Hidden; - } - } - - - - #region IDropSurface Membri di - - - - public Rect SurfaceRectangle - { - get - { - if (!IsSurfaceVisible) - return Rect.Empty; - - if (PresentationSource.FromVisual(_btnDock) == null) - return Rect.Empty; - - return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(_btnDock, new Point()), new Size(_btnDock.ActualWidth, _btnDock.ActualHeight)); - } - } - - public void OnDragEnter(Point point) - { - if (!Enabled) - return; - - _owner.OnDragEnter(this, point); - } - - public void OnDragOver(Point point) - { - if (!Enabled) - return; - - _owner.OnDragOver(this, point); - } - - public void OnDragLeave(Point point) - { - if (!Enabled) - return; - - _owner.OnDragLeave(this, point); - } - - public bool OnDrop(Point point) - { - if (!Enabled) - return false; - - return _owner.OnDrop(this, point); - } - - public bool IsSurfaceVisible - { - get { return (_owner.IsLoaded && _btnDock != null); } - } - - #endregion - } -} diff --git a/src/Libraries/AvalonDock/Pane.cs b/src/Libraries/AvalonDock/Pane.cs deleted file mode 100644 index e2fce0e78e..0000000000 --- a/src/Libraries/AvalonDock/Pane.cs +++ /dev/null @@ -1,300 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Diagnostics; -using System.Collections.Specialized; -using System.ComponentModel; - -namespace AvalonDock -{ - public abstract class Pane : - System.Windows.Controls.Primitives.Selector, - IDropSurface, - IDockableControl, - INotifyPropertyChanged - { - - public Pane() - { - this.Loaded += new RoutedEventHandler(Pane_Loaded); - this.Unloaded += new RoutedEventHandler(Pane_Unloaded); - } - - void Pane_Loaded(object sender, RoutedEventArgs e) - { - //if (GetManager() == null && Parent != null) - // throw new InvalidOperationException("Pane must be put under a DockingManager!"); - - AddDragPaneReferences(); - } - - void Pane_Unloaded(object sender, RoutedEventArgs e) - { - RemoveDragPaneReferences(); - } - - - - #region Contents management - public bool HasSingleItem - { - get - { - return (bool)GetValue(HasSingleItemProperty); - } - protected set { SetValue(HasSingleItemPropertyKey, value); } - } - - // Using a DependencyProperty as the backing store for HasSingleItem. This enables animation, styling, binding, etc... - private static readonly DependencyPropertyKey HasSingleItemPropertyKey = - DependencyProperty.RegisterReadOnly("HasSingleItem", typeof(bool), typeof(Pane), new PropertyMetadata(false)); - - public static readonly DependencyProperty HasSingleItemProperty = HasSingleItemPropertyKey.DependencyProperty; - - - protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) - { - HasSingleItem = (Items.Count == 1); - - if (Items.Count > 0) - { - int currentIndex = SelectedIndex; - SelectedIndex = -1; - - if (currentIndex < 0 || - currentIndex >= Items.Count) - currentIndex = Items.Count - 1; - - SelectedIndex = currentIndex; - } - //else - // RemoveDragPaneReferences(); - - base.OnItemsChanged(e); - } - - //void RefreshContentsSelectedProperty() - //{ - // //foreach (ManagedContent mc in Items) - // //{ - // // //mc.IsSelected = (mc == SelectedItem); - // // //Selector.SetIsSelected(mc - - // // if (Selector.GetIsSelected(mc)) - // // mc.FocusContent(); - // //} - //} - - //protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) - //{ - // if (e.Property == SelectedItemProperty) - // RefreshContentsSelectedProperty(); - // // SetValue(ActiveContentProperty, SelectedItem); - - // //if (e.Property == ActiveContentProperty) - // //{ - // // //SetValue(SelectedItemProperty, ActiveContent); - - // //} - - // base.OnPropertyChanged(e); - //} - #endregion - - #region IDockableControl Members - - public virtual bool IsDocked - { - get { return true; } - } - - #endregion - - public virtual DockingManager GetManager() - { - DependencyObject parent = LogicalTreeHelper.GetParent(this); - - while (parent != null && - (!(parent is DockingManager))) - parent = LogicalTreeHelper.GetParent(parent); - - return parent as DockingManager; - } - - - - - #region IDockableControl Members - - #endregion - - #region Membri di IDropSurface - #region Drag pane services - - DockingManager _oldManager = null; - //protected override void OnVisualParentChanged(DependencyObject oldParent) - //{ - // base.OnVisualParentChanged(oldParent); - - // RemoveDragPaneReferences(); - - // AddDragPaneReferences(); - //} - - protected void RemoveDragPaneReferences() - { - if (_oldManager != null) - { - _oldManager.DragPaneServices.Unregister(this); - _oldManager = null; - } - - } - - protected void AddDragPaneReferences() - { - { - _oldManager = GetManager(); - if (_oldManager != null) - _oldManager.DragPaneServices.Register(this); - } - } - #endregion - - - public abstract bool IsSurfaceVisible {get;} - - public virtual Rect SurfaceRectangle - { - get - { - if (!IsSurfaceVisible) - return new Rect(); - - if (PresentationSource.FromVisual(this) == null) - return new Rect(); - - return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()), new Size(ActualWidth, ActualHeight)); - } - } - - public virtual void OnDragEnter(Point point) - { - GetManager().OverlayWindow.ShowOverlayPaneDockingOptions(this); - } - - public virtual void OnDragOver(Point point) - { - - } - - public virtual void OnDragLeave(Point point) - { - GetManager().OverlayWindow.HideOverlayPaneDockingOptions(this); - } - - public virtual bool OnDrop(Point point) - { - return false; - } - - #endregion - - - public virtual ManagedContent RemoveContent(int index) - { - ManagedContent contentToRemove = Items[index] as ManagedContent; - - Items.RemoveAt(index); - - return contentToRemove; - } - - protected FrameworkElement _partHeader = null; - - public override void OnApplyTemplate() - { - base.OnApplyTemplate(); - - //gets a reference to the header for the pane - _partHeader = GetTemplateChild("PART_Header") as FrameworkElement; - } - - - internal virtual ResizingPanel GetContainerPanel() - { - return LogicalTreeHelper.GetParent(this) as ResizingPanel; - } - - /// - /// Closes or hides provided content depending on HideOnClose property - /// - internal virtual void CloseOrHide(DockableContent cntToCloseOrHide) - { - CloseOrHide(cntToCloseOrHide, false); - } - - /// - /// Closes or hides provided content depending on HideOnClose property - /// - internal virtual void CloseOrHide(DockableContent cntToCloseOrHide, bool force) - { - Debug.Assert(cntToCloseOrHide != null); - - if (!force && !cntToCloseOrHide.IsCloseable) - return; - - DockingManager manager = GetManager(); - if (cntToCloseOrHide.HideOnClose && manager != null) - manager.Hide(cntToCloseOrHide); - else - RemoveContent(Items.IndexOf(cntToCloseOrHide)); - } - - - #region INotifyPropertyChanged Members - - public event PropertyChangedEventHandler PropertyChanged; - - protected void NotifyPropertyChanged(string propertyName) - { - if (PropertyChanged != null) - PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); - } - #endregion - } -} diff --git a/src/Libraries/AvalonDock/PaneTabPanel.cs b/src/Libraries/AvalonDock/PaneTabPanel.cs deleted file mode 100644 index 75c10b190a..0000000000 --- a/src/Libraries/AvalonDock/PaneTabPanel.cs +++ /dev/null @@ -1,77 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - - -namespace AvalonDock -{ - public abstract class PaneTabPanel : System.Windows.Controls.Panel - { - //static PaneTabPanel() - //{ - // //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - // //This style is defined in themes\generic.xaml - // DefaultStyleKeyProperty.OverrideMetadata(typeof(PaneTabPanel), new FrameworkPropertyMetadata(typeof(PaneTabPanel))); - //} - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - base.OnVisualChildrenChanged(visualAdded, visualRemoved); - - ManagedContent mc = visualAdded as ManagedContent; - if (mc != null) - { - mc.Style = null; - mc.Style = TabItemStyle; - } - - } - - - - - public Style TabItemStyle - { - get { return (Style)GetValue(TabItemStyleProperty); } - set { SetValue(TabItemStyleProperty, value); } - } - - // Using a DependencyProperty as the backing store for TabStyle. This enables animation, styling, binding, etc... - public static readonly DependencyProperty TabItemStyleProperty = - DependencyProperty.Register("TabItemStyle", typeof(Style), typeof(PaneTabPanel)); - } -} diff --git a/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs b/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs deleted file mode 100644 index 6b9b29848c..0000000000 --- a/src/Libraries/AvalonDock/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -#region Using directives - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Resources; -using System.Globalization; -using System.Windows; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AvalonDock")] -[assembly: AssemblyDescription("WPF docking library")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AvalonDock")] -[assembly: AssemblyCopyright("Copyright @ Adolfo Marinucci 2007-2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -// Specifies the location in which theme dictionaries are stored for types in an assembly. -[assembly: ThemeInfo( - // Specifies the location of system theme-specific resource dictionaries for this project. - // The default setting in this project is "None" since this default project does not - // include these user-defined theme files: - // Themes\Aero.NormalColor.xaml - // Themes\Classic.xaml - // Themes\Luna.Homestead.xaml - // Themes\Luna.Metallic.xaml - // Themes\Luna.NormalColor.xaml - // Themes\Royale.NormalColor.xaml - ResourceDictionaryLocation.SourceAssembly, - - // Specifies the location of the system non-theme specific resource dictionary: - // Themes\generic.xaml - ResourceDictionaryLocation.SourceAssembly)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.2.2702")] diff --git a/src/Libraries/AvalonDock/Properties/Resources.Designer.cs b/src/Libraries/AvalonDock/Properties/Resources.Designer.cs deleted file mode 100644 index 6204034140..0000000000 --- a/src/Libraries/AvalonDock/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.1433 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AvalonDock.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AvalonDock.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/src/Libraries/AvalonDock/Properties/Resources.resx b/src/Libraries/AvalonDock/Properties/Resources.resx deleted file mode 100644 index 3e18af958a..0000000000 --- a/src/Libraries/AvalonDock/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Properties/Settings.Designer.cs b/src/Libraries/AvalonDock/Properties/Settings.Designer.cs deleted file mode 100644 index f67dbf13f4..0000000000 --- a/src/Libraries/AvalonDock/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.1433 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AvalonDock.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/src/Libraries/AvalonDock/Properties/Settings.settings b/src/Libraries/AvalonDock/Properties/Settings.settings deleted file mode 100644 index 4024694778..0000000000 --- a/src/Libraries/AvalonDock/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/RequestDocumentCloseEventArgs.cs b/src/Libraries/AvalonDock/RequestDocumentCloseEventArgs.cs deleted file mode 100644 index 447c19db0e..0000000000 --- a/src/Libraries/AvalonDock/RequestDocumentCloseEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; - -namespace AvalonDock -{ - public class RequestDocumentCloseEventArgs : CancelEventArgs - { - public RequestDocumentCloseEventArgs(DocumentContent doc) - { - DocumentToClose = doc; - } - - /// - /// Document content that user wants to close - /// - public DocumentContent DocumentToClose { get; private set; } - } -} diff --git a/src/Libraries/AvalonDock/ResizingPanel.cs b/src/Libraries/AvalonDock/ResizingPanel.cs deleted file mode 100644 index 06c8e9caa6..0000000000 --- a/src/Libraries/AvalonDock/ResizingPanel.cs +++ /dev/null @@ -1,1307 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; -using System.Windows.Markup; -using System.Diagnostics; -using System.Linq; - - -namespace AvalonDock -{ - public class ResizingPanel : Panel, IDockableControl - { - /// - /// Gets or sets the orientation of the panel - /// - /// If horizontal oriented children are positioned from left to right and width of each child is computed according to attached property value. When vertical oriented children are arranged from top to bottom, according to of each child. - public Orientation Orientation - { - get { return (Orientation)GetValue(OrientationProperty); } - set { SetValue(OrientationProperty, value); } - } - - /// - /// Give access to Orientation attached property - /// - /// If horizontal oriented children are positioned from left to right and width of each child is computed according to attached property value. When vertical oriented children are arranged from top to bottom, according to of each child. - public static readonly DependencyProperty OrientationProperty = - DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ResizingPanel), new FrameworkPropertyMetadata(Orientation.Horizontal, FrameworkPropertyMetadataOptions.AffectsMeasure, OnOrientationChanged)); - - static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((ResizingPanel)d).splitterListIsDirty = true; - } - - public static GridLength GetResizeWidth(DependencyObject obj) - { - return (GridLength)obj.GetValue(ResizeWidthProperty); - } - - public static void SetResizeWidth(DependencyObject obj, GridLength value) - { - obj.SetValue(ResizeWidthProperty, value); - } - - - public static readonly DependencyProperty ResizeWidthProperty = - DependencyProperty.RegisterAttached("ResizeWidth", - typeof(GridLength), - typeof(ResizingPanel), - new FrameworkPropertyMetadata(new GridLength(1.0, GridUnitType.Star), - OnSplitSizeChanged, - OnCoerceSplitSize), - new ValidateValueCallback(IsSplitSizeValid)); - - public static GridLength GetResizeHeight(DependencyObject obj) - { - return (GridLength)obj.GetValue(ResizeHeightProperty); - } - - public static void SetResizeHeight(DependencyObject obj, GridLength value) - { - obj.SetValue(ResizeHeightProperty, value); - } - - - public static readonly DependencyProperty ResizeHeightProperty = - DependencyProperty.RegisterAttached("ResizeHeight", - typeof(GridLength), - typeof(ResizingPanel), - new FrameworkPropertyMetadata(new GridLength(1.0, GridUnitType.Star), - OnSplitSizeChanged, - OnCoerceSplitSize), - new ValidateValueCallback(IsSplitSizeValid)); - - static void OnSplitSizeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(sender) as ResizingPanel; - if (parentPanel != null) - parentPanel.InvalidateMeasure(); - } - - static object OnCoerceSplitSize(DependencyObject sender, object value) - { - GridLength gd = (GridLength)value; - - if (gd.Value < 0.0) - gd = new GridLength(0.0, gd.GridUnitType); - - return gd; - } - - static bool IsSplitSizeValid(object value) - { - GridLength v = (GridLength)value; - return v.IsStar || v.IsAbsolute;//at the moment auto is not supported - } - - - - public static Size GetEffectiveSize(DependencyObject obj) - { - return (Size)obj.GetValue(EffectiveSizeProperty); - } - - public static void SetEffectiveSize(DependencyObject obj, Size value) - { - obj.SetValue(EffectiveSizeProperty, value); - } - - public static readonly DependencyProperty EffectiveSizeProperty = - DependencyProperty.RegisterAttached("EffectiveSize", typeof(Size), typeof(ResizingPanel), new FrameworkPropertyMetadata(new Size())); - - - List _splitterList = new List(); - - /// - /// Correct sizes of children if all of them are set to absolutes - /// - void CorrectSizes() - { - IEnumerable children = Children.OfType().Where(c => !(c is ResizingPanelSplitter)); - - if (children.All(c => c.IsAbsolute())) - { - double totSum = children.Sum(f => f.GetAbsoluteValue()); - foreach (var c in children) - { - if (Orientation == Orientation.Horizontal) - SetResizeWidth(c, new GridLength(c.GetAbsoluteValue() / totSum, GridUnitType.Star)); - else - SetResizeHeight(c, new GridLength(c.GetAbsoluteValue() / totSum, GridUnitType.Star)); - } - } - } - - /// - /// Helper funcs which correct elements size of a resizing panel - /// - internal void AdjustPanelSizes() - { - IEnumerable children = Children.OfType().Where(c => !(c is ResizingPanelSplitter)); - - if (!this.IsLogicalChildContained()) - { - //if no document pane is contained in this panel - //adjust elements so that any child will get a proportional star size - if (Orientation == Orientation.Horizontal) - { - double totSum = children.Sum(f => f.IsAbsolute() ? f.GetAbsoluteValue() : GetEffectiveSize(f).Width); - foreach (var c in children) - SetResizeWidth(c, new GridLength((c.IsAbsolute() ? c.GetAbsoluteValue() : GetEffectiveSize(c).Width) / totSum, GridUnitType.Star)); - } - else - { - double totSum = children.Sum(f => f.IsAbsolute() ? f.GetAbsoluteValue() : GetEffectiveSize(f).Height); - foreach (var c in children) - SetResizeHeight(c, new GridLength((c.IsAbsolute() ? c.GetAbsoluteValue() : GetEffectiveSize(c).Height) / totSum, GridUnitType.Star)); - } - } - - } - - - /// - /// Compute the desidered size of the panel - /// - /// - /// - protected override Size MeasureOverride(Size availableSize) - { - SetupSplitters(); - - CorrectSizes(); - - //Compute the list of visible children - List visibleChildren = new List(); - for (int i = 0; i < VisualChildrenCount; i++) - { - FrameworkElement child = GetVisualChild(i) as FrameworkElement; - - IDockableControl dockableControl = child as IDockableControl; - if (dockableControl != null && - !dockableControl.IsDocked) - { - child.Measure(Size.Empty); - - if (i == VisualChildrenCount - 1 && - i > 0) - { - child = GetVisualChild(i - 1) as FrameworkElement; - Debug.Assert(child is ResizingPanelSplitter); - - child.Measure(Size.Empty); - - if (visibleChildren.Count > 0) - { - Debug.Assert(visibleChildren[visibleChildren.Count - 1] is ResizingPanelSplitter); - visibleChildren[visibleChildren.Count - 1].Measure(Size.Empty); - visibleChildren.RemoveAt(visibleChildren.Count - 1); - } - } - else if (i < VisualChildrenCount - 1) - { - i++; - child = GetVisualChild(i) as FrameworkElement; - Debug.Assert(child is ResizingPanelSplitter); - child.Measure(Size.Empty); - } - - continue; - } - - visibleChildren.Add(child); - } - - - //with no children no space needed - if (visibleChildren.Count == 0) - return new Size(); - - Debug.Assert(!(visibleChildren.Last() is ResizingPanelSplitter)); - - if (availableSize.Width == double.PositiveInfinity && - Orientation == Orientation.Horizontal) - { - Size newAvailSize = new Size(); - foreach (FrameworkElement child in visibleChildren) - { - child.Measure(availableSize); - newAvailSize.Width += child.DesiredSize.Width; - newAvailSize.Height = Math.Max(child.DesiredSize.Height, newAvailSize.Height); - } - availableSize = newAvailSize; - } - //Thx to TMx - else if (availableSize.Height == double.PositiveInfinity && - Orientation == Orientation.Vertical) - { - Size newAvailSize = new Size(); - foreach (FrameworkElement child in visibleChildren) - { - child.Measure(newAvailSize); - newAvailSize.Width = Math.Max(child.DesiredSize.Width, newAvailSize.Width); - newAvailSize.Height += child.DesiredSize.Height; - } - availableSize = newAvailSize; - } - - var splitters = from FrameworkElement child in visibleChildren - where child is ResizingPanelSplitter - select child; - var childStars = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsStar() - select child; - - var childAbsolutes = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsAbsolute() - select child; - - var childAutoSizes = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsAuto() - select child; - - //calculate the size of the splitters - Size splitterSize = new Size(); - foreach (ResizingPanelSplitter splitter in splitters) - { - splitterSize.Width += splitter.MinWidth; - splitterSize.Height += splitter.MinHeight; - } - - Size minimumSize = new Size(splitterSize.Width, splitterSize.Height); - foreach (FrameworkElement child in childStars) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - foreach (FrameworkElement child in childAbsolutes) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - foreach (FrameworkElement child in childAutoSizes) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - - - Size minimumPrefferedSize = new Size(minimumSize.Width, minimumSize.Height); - foreach (FrameworkElement child in childAbsolutes) - { - minimumPrefferedSize.Width += child.GetAbsoluteValue() - child.MinWidth; - minimumPrefferedSize.Height += child.GetAbsoluteValue() - child.MinHeight; - } - foreach (FrameworkElement child in childAutoSizes) - { - minimumPrefferedSize.Width += child.DesiredSize.Width - child.MinWidth; - minimumPrefferedSize.Height += child.DesiredSize.Height - child.MinHeight; - } - - if (Orientation == Orientation.Horizontal) - { - #region Horizontal Orientation - - //if finalSize is not sufficient... - double offset = 0.0; - double maxHeight = 0.0; - if (minimumSize.Width >= availableSize.Width) - { - foreach (FrameworkElement child in visibleChildren) - { - child.Measure(new Size(child.MinWidth, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.MinWidth; - } - } - else if (minimumPrefferedSize.Width >= availableSize.Width) - { - double delta = (minimumPrefferedSize.Width - availableSize.Width) / childAbsolutes.Count(); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - { - child.Measure(new Size(child.MinWidth, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.MinWidth; - } - else if (child.IsAbsolute()) - { - child.Measure(new Size(Math.Max(child.GetAbsoluteValue() - delta, child.MinWidth), availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.GetAbsoluteValue() - delta; - } - else - { - child.Measure(new Size(child.MinWidth, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.MinWidth; - } - } - } - else - { - double starsSum = childStars.Sum(v => v.GetStarValue()); - double starsFinalWidth = - availableSize.Width - - splitters.Sum(s => s.MinWidth) - - childAbsolutes.Sum(a => a.GetAbsoluteValue()) - - childAutoSizes.Sum(a => a.DesiredSize.Width); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - { - child.Measure(new Size(child.MinWidth, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.MinWidth; - } - else if (child.IsAbsolute()) - { - child.Measure(new Size(child.GetAbsoluteValue(), availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.GetAbsoluteValue(); - } - else if (child.IsStar()) - { - double w = child.GetStarValue() / starsSum * starsFinalWidth; - child.Measure(new Size(w, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += w; - } - else - { - child.Measure(new Size(child.DesiredSize.Width, availableSize.Height)); - maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); - offset += child.DesiredSize.Width; - } - } - } - - return new Size(offset, maxHeight); - - #endregion - } - else - { - #region Vertical Orientation - - //if finalSize is not sufficient... - double offset = 0.0; - double maxWidth = 0.0; - if (minimumSize.Height >= availableSize.Height) - { - foreach (FrameworkElement child in visibleChildren) - { - child.Measure(new Size(availableSize.Width, child.MinHeight)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.MinHeight; - } - } - else if (minimumPrefferedSize.Height >= availableSize.Height) - { - double delta = (minimumPrefferedSize.Height - availableSize.Height) / childAbsolutes.Count(); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - { - child.Measure(new Size(availableSize.Width, child.MinHeight)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.MinHeight; - } - else if (child.IsAbsolute()) - { - child.Measure(new Size(availableSize.Width, Math.Max(child.GetAbsoluteValue() - delta, child.MinHeight))); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.GetAbsoluteValue() - delta; - } - else - { - child.Measure(new Size(availableSize.Width, child.MinHeight)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.MinWidth; - } - } - } - else - { - double starsSum = childStars.Sum(v => v.GetStarValue()); - double starsFinalHeight = - availableSize.Height - - splitters.Sum(s => s.MinHeight) - - childAbsolutes.Sum(a => a.GetAbsoluteValue()) - - childAutoSizes.Sum(a => a.DesiredSize.Height); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - { - child.Measure(new Size(availableSize.Width, child.MinHeight)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.MinWidth; - } - else if (child.IsAbsolute()) - { - child.Measure(new Size(availableSize.Width, child.GetAbsoluteValue())); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.GetAbsoluteValue(); - } - else if (child.IsStar()) - { - double w = child.GetStarValue() / starsSum * starsFinalHeight; - child.Measure(new Size(availableSize.Width, w)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += w; - } - else - { - child.Measure(new Size(availableSize.Width, child.DesiredSize.Height)); - maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); - offset += child.DesiredSize.Width; - } - } - } - - return new Size(maxWidth, offset); - - #endregion - - } - } - - Size[] _childrenFinalSizes = null; - - /// - /// Arranges children giving them a proportional space according to their attached property value - /// - /// - /// - protected override Size ArrangeOverride(Size finalSize) - { - //Compute the list of visible children - List visibleChildren = new List(); - for (int i = 0; i < VisualChildrenCount; i++) - { - FrameworkElement child = GetVisualChild(i) as FrameworkElement; - - IDockableControl dockableControl = child as IDockableControl; - if (dockableControl != null && - !dockableControl.IsDocked) - { - child.Arrange(new Rect()); - - if (i == VisualChildrenCount - 1 && - i > 0) - { - child = GetVisualChild(i - 1) as FrameworkElement; - Debug.Assert(child is ResizingPanelSplitter); - - child.Arrange(new Rect()); - - if (visibleChildren.Count > 0) - { - Debug.Assert(visibleChildren[visibleChildren.Count - 1] is ResizingPanelSplitter); - visibleChildren[visibleChildren.Count - 1].Arrange(new Rect()); - visibleChildren.RemoveAt(visibleChildren.Count - 1); - } - - } - else if (i < VisualChildrenCount - 1) - { - i++; - child = GetVisualChild(i) as FrameworkElement; - child.Arrange(new Rect()); - Debug.Assert(child is ResizingPanelSplitter); - } - - continue; - } - - visibleChildren.Add(child); - } - - //with no children fill the space - if (visibleChildren.Count == 0) - { - _childrenFinalSizes = new Size[] { }; - return new Size(); - } - - Debug.Assert(!(visibleChildren.Last() is ResizingPanelSplitter)); - - - _childrenFinalSizes = new Size[visibleChildren.Count]; - - var splitters = from FrameworkElement child in visibleChildren - where child is ResizingPanelSplitter - select child; - var childStars = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsStar() - select child; - - var childAbsolutes = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsAbsolute() - select child; - - var childAutoSizes = from FrameworkElement child in visibleChildren - where (!(child is ResizingPanelSplitter)) && child.IsAuto() - select child; - - //calculate the size of the splitters - Size splitterSize = new Size(); - foreach (ResizingPanelSplitter splitter in splitters) - { - splitterSize.Width += splitter.MinWidth; - splitterSize.Height += splitter.MinHeight; - } - - Size minimumSize = new Size(splitterSize.Width, splitterSize.Height); - foreach (FrameworkElement child in childStars) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - foreach (FrameworkElement child in childAbsolutes) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - foreach (FrameworkElement child in childAutoSizes) - { - minimumSize.Width += child.MinWidth; - minimumSize.Height += child.MinHeight; - } - - - Size minimumPrefferedSize = new Size(minimumSize.Width, minimumSize.Height); - foreach (FrameworkElement child in childAbsolutes) - { - minimumPrefferedSize.Width += child.GetAbsoluteValue() - child.MinWidth; - minimumPrefferedSize.Height += child.GetAbsoluteValue() - child.MinHeight; - } - foreach (FrameworkElement child in childAutoSizes) - { - minimumPrefferedSize.Width += child.DesiredSize.Width - child.MinWidth; - minimumPrefferedSize.Height += child.DesiredSize.Height - child.MinHeight; - } - - int iChild = 0; - - if (Orientation == Orientation.Horizontal) - { - #region Horizontal Orientation - - //if finalSize is not sufficient... - if (minimumSize.Width >= finalSize.Width) - { - foreach (FrameworkElement child in visibleChildren) - { - _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); - } - } - else if (minimumPrefferedSize.Width >= finalSize.Width) - { - double delta = (minimumPrefferedSize.Width - finalSize.Width) / childAbsolutes.Count(); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); - else if (child.IsAbsolute()) - _childrenFinalSizes[iChild++] = new Size(Math.Max(child.GetAbsoluteValue() - delta, 0.0), finalSize.Height); - else - _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); - } - } - else - { - double starsSum = childStars.Sum(v => v.GetStarValue()); - double starsFinalWidth = - finalSize.Width - - splitters.Sum(s => s.MinWidth) - - childAbsolutes.Sum(a => a.GetAbsoluteValue()) - - childAutoSizes.Sum(a => a.DesiredSize.Width); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); - else if (child.IsAbsolute()) - _childrenFinalSizes[iChild++] = new Size(child.GetAbsoluteValue(), finalSize.Height); - else if (child.IsStar()) - _childrenFinalSizes[iChild++] = new Size(child.GetStarValue() / starsSum * starsFinalWidth, finalSize.Height); - else - _childrenFinalSizes[iChild++] = new Size(child.DesiredSize.Width, finalSize.Height); - } - - } - - double offset = 0.0; - - for (int i = 0; i < visibleChildren.Count; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - child.Arrange(new Rect(offset, 0.0, _childrenFinalSizes[i].Width, finalSize.Height)); - offset += _childrenFinalSizes[i].Width; - - SetEffectiveSize(child, new Size(_childrenFinalSizes[i].Width, finalSize.Height)); - } - - return new Size(offset, finalSize.Height); - #endregion - } - else - { - #region Vertical Orientation - - //if finalSize is not sufficient... - if (minimumSize.Height >= finalSize.Height) - { - foreach (FrameworkElement child in visibleChildren) - { - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); - } - } - else if (minimumPrefferedSize.Height >= finalSize.Height) - { - double delta = (minimumPrefferedSize.Height - finalSize.Height) / childAbsolutes.Count(); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); - else if (child.IsAbsolute()) - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, Math.Max(child.GetAbsoluteValue() - delta, 0.0)); - else - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); - } - } - else - { - double starsSum = childStars.Sum(v => v.GetStarValue()); - double starsFinalHeight = - finalSize.Height - - splitters.Sum(s => s.MinHeight) - - childAbsolutes.Sum(a => a.GetAbsoluteValue()) - - childAutoSizes.Sum(a => a.DesiredSize.Height); - - foreach (FrameworkElement child in visibleChildren) - { - if (child is ResizingPanelSplitter) - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); - else if (child.IsAbsolute()) - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.GetAbsoluteValue()); - else if (child.IsStar()) - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.GetStarValue() / starsSum * starsFinalHeight); - else - _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.DesiredSize.Height); - } - - } - - double offset = 0.0; - - for (int i = 0; i < visibleChildren.Count; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - child.Arrange(new Rect(0.0, offset, finalSize.Width, _childrenFinalSizes[i].Height)); - offset += _childrenFinalSizes[i].Height; - SetEffectiveSize(child, new Size(finalSize.Width, _childrenFinalSizes[i].Height)); - } - - return new Size(finalSize.Width, offset); - #endregion - } - - - } - - bool setupSplitters = false; - bool splitterListIsDirty = false; - - void SetupSplitters() - { - if (!splitterListIsDirty) - return; - - if (setupSplitters) - return; - - setupSplitters = true; - - while (_splitterList.Count > 0) - { - ResizingPanelSplitter splitter = _splitterList[0]; - splitter.DragStarted -= new DragStartedEventHandler(splitter_DragStarted); - splitter.DragDelta -= new DragDeltaEventHandler(splitter_DragDelta); - splitter.DragCompleted -= new DragCompletedEventHandler(splitter_DragCompleted); - _splitterList.Remove(splitter); - Children.Remove(splitter); - } - - int i = 0;//child index - int j = 0;//splitter index - - while (i < Children.Count - 1) - { - if (j == _splitterList.Count) - { - ResizingPanelSplitter splitter = new ResizingPanelSplitter(); - _splitterList.Add(splitter); - splitter.DragStarted += new DragStartedEventHandler(splitter_DragStarted); - splitter.DragDelta += new DragDeltaEventHandler(splitter_DragDelta); - splitter.DragCompleted += new DragCompletedEventHandler(splitter_DragCompleted); - Children.Insert(i + 1, splitter); - } - - i += 2; - j++; - } - - for (j = 0; j < _splitterList.Count; j++) - { - _splitterList[j].Width = (Orientation == Orientation.Horizontal) ? 4 : double.NaN; - _splitterList[j].Height = (Orientation == Orientation.Vertical) ? 4 : double.NaN; - } - -#if DEBUG - Debug.Assert(_splitterList.Count == Children.Count / 2); - i = 0; - while (Children.Count > 0) - { - Debug.Assert(Children[i] != null); - Debug.Assert(!(Children[i] is ResizingPanelSplitter)); - i++; - if (i >= Children.Count) - break; - - Debug.Assert((Children[i] is ResizingPanelSplitter)); - i++; - - } -#endif - splitterListIsDirty = false; - setupSplitters = false; - } - - protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) - { - base.OnVisualChildrenChanged(visualAdded, visualRemoved); - - splitterListIsDirty = true; - } - - void splitter_DragCompleted(object sender, DragCompletedEventArgs e) - { - Cursor = Cursors.Arrow; - } - - /// - /// This method is called by a splitter when it is dragged - /// - /// Dragged splitter - /// - void splitter_DragDelta(object sender, DragDeltaEventArgs e) - { - ResizingPanelSplitter splitter = e.Source as ResizingPanelSplitter; - int i = 0; - - //Compute the list of visible children - List visibleChildren = new List(); - for (i = 0; i < VisualChildrenCount; i++) - { - FrameworkElement child = GetVisualChild(i) as FrameworkElement; - - IDockableControl dockableControl = child as IDockableControl; - if (dockableControl != null && - !dockableControl.IsDocked) - { - if (i == VisualChildrenCount - 1 && - i > 0) - { - //remove the last splitter added - if (visibleChildren.Count > 0 && - visibleChildren.Last() is ResizingPanelSplitter) - visibleChildren.RemoveAt(visibleChildren.Count - 1); - } - else if (i < VisualChildrenCount - 1) - { - //discard the next splitter - i++; - } - - continue; - } - - visibleChildren.Add(child); - } - - if (visibleChildren.Count == 0) - return; - - if (visibleChildren.Last() is ResizingPanelSplitter) - visibleChildren.RemoveAt(visibleChildren.Count - 1); - - Size[] currentSizes = new Size[visibleChildren.Count]; - double delta = Orientation == Orientation.Horizontal ? e.HorizontalChange : e.VerticalChange; - - if (_childrenFinalSizes == null) - return; - - _childrenFinalSizes.CopyTo(currentSizes, 0); - - int iSplitter = visibleChildren.IndexOf(splitter); - - Debug.Assert(iSplitter > -1); - - List prevChildren = new List(); - for (i = iSplitter - 1; i >= 0; i--) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - if (child is ResizingPanelSplitter) - continue; - if (child.IsAbsolute() || child.IsAuto()) - { - if (prevChildren.Count == 0) - { - prevChildren.Add(child); - } - break; - } - if (child.IsStar()) - { - prevChildren.Add(child); - } - } - - List nextChildren = new List(); - - for (i = iSplitter + 1; i < visibleChildren.Count; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - if (child is ResizingPanelSplitter) - continue; - if (child.IsAbsolute() || child.IsAuto()) - { - if (nextChildren.Count == 0) - nextChildren.Add(child); - break; - } - if (child.IsStar()) - { - nextChildren.Add(child); - } - } - - - double prevMinSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); - double nextMinSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); - double prevMaxSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); - double nextMaxSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); - - double prevSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); - double nextSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); - - if (prevSize + delta < prevMinSize) - delta = prevMinSize - prevSize; - if (nextSize - delta < nextMinSize) - delta = -(nextMinSize - nextSize); - - double remDelta = delta * 2; - - while (!HelperFunc.AreClose(delta, 0.0)) - { - int prevChildrenCountWithNoMinLen = - prevChildren.Count(c => delta > 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); - int nextChildrenCountWithNoMinLen = - nextChildren.Count(c => delta < 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); - - delta = remDelta / 2.0; - - for (i = 0; i < currentSizes.Length; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - if (child is ResizingPanelSplitter) - continue; - - if (Orientation == Orientation.Horizontal) - { - if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) - { - double s = delta / prevChildrenCountWithNoMinLen; - if (currentSizes[i].Width + s < child.MinWidth) - s = child.MinWidth - currentSizes[i].Width; - - currentSizes[i].Width += s; - remDelta -= s; - } - if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) - { - double s = delta / nextChildrenCountWithNoMinLen; - if (currentSizes[i].Width - s < child.MinWidth) - s = currentSizes[i].Width - child.MinWidth; - - currentSizes[i].Width -= s; - remDelta -= s; - } - } - else - { - if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) - { - double s = delta / prevChildrenCountWithNoMinLen; - if (currentSizes[i].Height + s < child.MinHeight) - s = child.MinHeight - currentSizes[i].Height; - - currentSizes[i].Height += s; - remDelta -= s; - } - if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) - { - double s = delta / nextChildrenCountWithNoMinLen; - if (currentSizes[i].Height - s < child.MinHeight) - s = currentSizes[i].Height - child.MinHeight; - - currentSizes[i].Height -= s; - remDelta -= s; - } - } - } - } - - Debug.Assert(HelperFunc.AreClose(delta, 0.0)); - - double totalStartsSum = 0.0; - double totalSizeForStarts = 0.0; - - for (i = 0; i < visibleChildren.Count; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - if (child is ResizingPanelSplitter) - continue; - if (child.IsStar()) - { - totalStartsSum += child.GetStarValue(); - totalSizeForStarts += Orientation == Orientation.Horizontal ? currentSizes[i].Width : currentSizes[i].Height; - } - } - - - double starsScaleFactor = totalStartsSum / totalSizeForStarts; - - for (i = 0; i < currentSizes.Length; i++) - { - FrameworkElement child = visibleChildren[i] as FrameworkElement; - - if (child is ResizingPanelSplitter) - continue; - - if (child.IsStar()) - { - if (Orientation == Orientation.Horizontal) - { - SetResizeWidth(child, - new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Width, starsScaleFactor), GridUnitType.Star)); - } - else - { - SetResizeHeight(child, - new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Height, starsScaleFactor), GridUnitType.Star)); - } - } - else if (child.IsAbsolute()) - { - if (Orientation == Orientation.Horizontal) - { - SetResizeWidth(child, - new GridLength(currentSizes[i].Width, GridUnitType.Pixel)); - } - else - { - SetResizeHeight(child, - new GridLength(currentSizes[i].Height, GridUnitType.Pixel)); - } - } - } - - InvalidateMeasure(); - - //ResizingPanelSplitter splitter = e.Source as ResizingPanelSplitter; - //int iSplitter = Children.IndexOf(splitter); - - //UIElement childPrev = null; - //UIElement childNext = null; - - ////int posInc = ResizingDirection == ResizingDirection.Direct ? 2 : -2; - //int posInc = 2;// FlowDirection == FlowDirection.LeftToRight ? 2 : -2; - //int negInc = -posInc; - //int i = iSplitter; - - //while (i >= 0 || - // i < Children.Count - 1) - //{ - // if (NextChildIsVisible(i)) - // { - // //childNext = Children[ResizingDirection == ResizingDirection.Direct ? i + 1 : i - 1]; - // childNext = Children[i + 1];//FlowDirection == FlowDirection.LeftToRight ? i + 1 : i - 1]; - // break; - // } - - // i += posInc; - //} - - //i = iSplitter; - - //while (i >= 0 || - // i < Children.Count - 1) - //{ - // if (PrevChildIsVisible(i)) - // { - // //childPrev = Children[ResizingDirection == ResizingDirection.Direct ? i - 1 : i + 1]; - // childPrev = Children[i - 1];//FlowDirection == FlowDirection.LeftToRight ? i - 1 : i + 1]; - // break; - // } - - // i -= posInc; - //} - - //Size resExtPrev = new Size((double)childPrev.GetValue(ResizeWidthProperty), (double)childPrev.GetValue(ResizeHeightProperty)); - //Size resExtNext = new Size((double)childNext.GetValue(ResizeWidthProperty), (double)childNext.GetValue(ResizeHeightProperty)); - - - //#region Orientation == Horizontal - //if (Orientation == Orientation.Horizontal) - //{ - // double delta = e.HorizontalChange; - - // if (!double.IsPositiveInfinity(resExtPrev.Width) && - // (resExtPrev.Width + delta < 0)) - // delta = -resExtPrev.Width; - - // if (!double.IsPositiveInfinity(resExtNext.Width) && - // resExtNext.Width - delta < 0) - // delta = resExtNext.Width; - - - // if (!double.IsPositiveInfinity(resExtPrev.Width)) - // childPrev.SetValue(ResizeWidthProperty, resExtPrev.Width + delta); - // if (!double.IsPositiveInfinity(resExtNext.Width)) - // childNext.SetValue(ResizeWidthProperty, resExtNext.Width - delta); - //} - //#endregion - //#region Orientation == Vertical - //else //if (Orientation == Orientation.Vertical) - //{ - // double delta = e.VerticalChange; - - // if (!double.IsPositiveInfinity(resExtPrev.Height) && - // (resExtPrev.Height + delta < 0)) - // delta = -resExtPrev.Height; - - // if (!double.IsPositiveInfinity(resExtNext.Height) && - // resExtNext.Height - delta < 0) - // delta = resExtNext.Height; - - - // if (!double.IsPositiveInfinity(resExtPrev.Height)) - // childPrev.SetValue(ResizeHeightProperty, resExtPrev.Height + delta); - - // if (!double.IsPositiveInfinity(resExtNext.Height)) - // childNext.SetValue(ResizeHeightProperty, resExtNext.Height - delta); - //} - //#endregion - - } - - void splitter_DragStarted(object sender, DragStartedEventArgs e) - { - Cursor = Orientation == Orientation.Horizontal ? Cursors.SizeWE : Cursors.SizeNS; - } - - #region IDockableControl Membri di - - public bool IsDocked - { - get - { - foreach (UIElement child in this.Children) - { - if (child is IDockableControl) - if (((IDockableControl)child).IsDocked) - return true; - } - - return false; - } - } - - #endregion - - - /// - /// Remove a child from children collection - /// - /// - internal void RemoveChild(FrameworkElement childToRemove) - { - int indexOfChildToRemove = Children.IndexOf(childToRemove); - - Debug.Assert(indexOfChildToRemove != -1); - - Children.RemoveAt(indexOfChildToRemove); - - if (Children.Count > 0) - { - SetupSplitters(); - - if (Children.Count == 1) - { - UIElement singleChild = this.Children[0]; - - if (Parent is ResizingPanel) - { - ResizingPanel parentPanel = Parent as ResizingPanel; - if (parentPanel != null) - { - int indexOfThisPanel = parentPanel.Children.IndexOf(this); - parentPanel.Children.RemoveAt(indexOfThisPanel); - this.Children.Remove(singleChild); - parentPanel.Children.Insert(indexOfThisPanel, singleChild); - - if (parentPanel.Orientation == Orientation.Horizontal) - { - SetResizeWidth(singleChild, GetResizeWidth(this)); - } - else - { - SetResizeHeight(singleChild, GetResizeHeight(this)); - } - } - } - else if (Parent is DockingManager) - { - DockingManager manager = Parent as DockingManager; - if (manager != null) - { - this.Children.Remove(singleChild); - manager.Content = singleChild; - } - } - - } - } - else - { - ResizingPanel parentPanel = Parent as ResizingPanel; - if (parentPanel != null) - { - parentPanel.RemoveChild(this); - } - } - } - - /// - /// Insert a new child element into the children collection. - /// - /// New child element to insert. - /// Child after or before which element must be insert. - /// True if new child must be insert after the element. False otherwise. - internal void InsertChildRelativeTo(FrameworkElement childToInsert, FrameworkElement relativeChild, bool next) - { - int childRelativeIndex = Children.IndexOf(relativeChild); - - Debug.Assert(childRelativeIndex != -1); - - Children.Insert( - next ? childRelativeIndex + 1 : childRelativeIndex, childToInsert); - - SetupSplitters(); - } - - - } - - - internal static class ResizingPanelExFuncs - { - public static double GetAbsoluteValue(this FrameworkElement child) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; - GridLength len = parentPanel.Orientation == Orientation.Horizontal ? ResizingPanel.GetResizeWidth(child) : ResizingPanel.GetResizeHeight(child); - if (!len.IsAbsolute) - throw new InvalidOperationException(); - return len.Value; - } - - public static double GetStarValue(this FrameworkElement child) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; - GridLength len = parentPanel.Orientation == Orientation.Horizontal ? ResizingPanel.GetResizeWidth(child) : ResizingPanel.GetResizeHeight(child); - if (!len.IsStar) - throw new InvalidOperationException(); - return len.Value; - } - - public static bool IsStar(this FrameworkElement child) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; - return parentPanel.Orientation == Orientation.Horizontal ? - ResizingPanel.GetResizeWidth(child).IsStar : - ResizingPanel.GetResizeHeight(child).IsStar; - } - public static bool IsAbsolute(this FrameworkElement child) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; - return parentPanel.Orientation == Orientation.Horizontal ? - ResizingPanel.GetResizeWidth(child).IsAbsolute : - ResizingPanel.GetResizeHeight(child).IsAbsolute; - } - - public static bool IsAuto(this FrameworkElement child) - { - ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; - return parentPanel.Orientation == Orientation.Horizontal ? - ResizingPanel.GetResizeWidth(child).IsAuto : - ResizingPanel.GetResizeHeight(child).IsAuto; - } - - } - -} diff --git a/src/Libraries/AvalonDock/ResizingPanelSplitter.cs b/src/Libraries/AvalonDock/ResizingPanelSplitter.cs deleted file mode 100644 index e13684f1bd..0000000000 --- a/src/Libraries/AvalonDock/ResizingPanelSplitter.cs +++ /dev/null @@ -1,75 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Controls.Primitives; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; - -namespace AvalonDock -{ - public class ResizingPanelSplitter : System.Windows.Controls.Primitives.Thumb - { - static ResizingPanelSplitter() - { - //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. - //This style is defined in themes\generic.xaml - DefaultStyleKeyProperty.OverrideMetadata(typeof(ResizingPanelSplitter), new FrameworkPropertyMetadata(typeof(ResizingPanelSplitter))); - MinWidthProperty.OverrideMetadata(typeof(ResizingPanelSplitter), new FrameworkPropertyMetadata(4.0, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); - MinHeightProperty.OverrideMetadata(typeof(ResizingPanelSplitter), new FrameworkPropertyMetadata(4.0, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); - HorizontalAlignmentProperty.OverrideMetadata(typeof(ResizingPanelSplitter), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); - VerticalAlignmentProperty.OverrideMetadata(typeof(ResizingPanelSplitter), new FrameworkPropertyMetadata(VerticalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); - } - - public Orientation Orientation - { - get { return (Orientation)GetValue(OrientationProperty); } - protected set { SetValue(OrientationPropertyKey, value); } - } - - // Using a DependencyProperty as the backing store for Orientation. This enables animation, styling, binding, etc... - private static readonly DependencyPropertyKey OrientationPropertyKey = - DependencyProperty.RegisterReadOnly("Orientation", typeof(Orientation), typeof(ResizingPanelSplitter), new UIPropertyMetadata(Orientation.Horizontal)); - - public static readonly DependencyProperty OrientationProperty = OrientationPropertyKey.DependencyProperty; - - protected override void OnVisualParentChanged(DependencyObject oldParent) - { - ResizingPanel panel = Parent as ResizingPanel; - if (panel != null) - Orientation = panel.Orientation; - - base.OnVisualParentChanged(oldParent); - } - } -} diff --git a/src/Libraries/AvalonDock/Resources/Brushes.xaml b/src/Libraries/AvalonDock/Resources/Brushes.xaml deleted file mode 100644 index 2c85933640..0000000000 --- a/src/Libraries/AvalonDock/Resources/Brushes.xaml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/Common.xaml b/src/Libraries/AvalonDock/Resources/Common.xaml deleted file mode 100644 index 1041b37c96..0000000000 --- a/src/Libraries/AvalonDock/Resources/Common.xaml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/DockablePaneStyles.xaml b/src/Libraries/AvalonDock/Resources/DockablePaneStyles.xaml deleted file mode 100644 index 467055b6db..0000000000 --- a/src/Libraries/AvalonDock/Resources/DockablePaneStyles.xaml +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/DockingManagerStyles.xaml b/src/Libraries/AvalonDock/Resources/DockingManagerStyles.xaml deleted file mode 100644 index 30dfd9d484..0000000000 --- a/src/Libraries/AvalonDock/Resources/DockingManagerStyles.xaml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml b/src/Libraries/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml deleted file mode 100644 index d0c43ae544..0000000000 --- a/src/Libraries/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/DocumentPaneStyles.xaml b/src/Libraries/AvalonDock/Resources/DocumentPaneStyles.xaml deleted file mode 100644 index edbdc3e2f0..0000000000 --- a/src/Libraries/AvalonDock/Resources/DocumentPaneStyles.xaml +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/FloatingWindowStyle.xaml b/src/Libraries/AvalonDock/Resources/FloatingWindowStyle.xaml deleted file mode 100644 index 0d6b191279..0000000000 --- a/src/Libraries/AvalonDock/Resources/FloatingWindowStyle.xaml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/ManagedContentStyle.xaml b/src/Libraries/AvalonDock/Resources/ManagedContentStyle.xaml deleted file mode 100644 index f6e2c151c6..0000000000 --- a/src/Libraries/AvalonDock/Resources/ManagedContentStyle.xaml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/NavigatorWindowStyle.xaml b/src/Libraries/AvalonDock/Resources/NavigatorWindowStyle.xaml deleted file mode 100644 index f8433a0e02..0000000000 --- a/src/Libraries/AvalonDock/Resources/NavigatorWindowStyle.xaml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/OverlayWindowStyle.xaml b/src/Libraries/AvalonDock/Resources/OverlayWindowStyle.xaml deleted file mode 100644 index b26979c92e..0000000000 --- a/src/Libraries/AvalonDock/Resources/OverlayWindowStyle.xaml +++ /dev/null @@ -1,58 +0,0 @@ - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockBottom.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockBottom.png deleted file mode 100644 index 63edb12fc6bf956948ae5270c99089f5d13aa7d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 699 zcmV;s0!00ZP)Vl&|0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIyEsmG&3M8FflMN$=#l?00007bV*G` z2iXG|5HteXRf#j5Qg7176Af{L=?&5qXxI)&_jum+;f9Vj!C7S(o;|UX+8E(a_kSN zN+Y#75k3ScQcf|S2IK6k1j02bCdhkfUuk98%+9mpomn#sT!X>Dsnu$z*XtOLMhHsL zNCdfD4u)YM7K<^~@AsX`)fI}xBGRc8!r^dWaLcmL?sQPCR#7gMzNX z{Zoxb17@!WrG9&hbUG~!Ov+?3Ag(&*uR>MTwG&1b&yAt8)-D=hi0=H|hIoSOceTyV z5Z{0G@X)uPw0W@`!rMX|Z(c`z`ScAhgSEDHJcV8?MbgNp^^_n;~^ zK7aY)`R)Ad5Qe_Di90CEtMM}oJ&6zRjxjLr7K85Txu5wSxL+`h*=&aWWE_|8Pca_e zi!0sJbH6@Zd%kK_>y+11`1J9Dm#GHZwtdehyHF^!9eg^SLemb!brUhhya~4{{JC?M z_3X&Ekt=f9a8Klvtumx2iaT=p)J-N6DR9bkN;+5MR4%gQikx1#EV!rC2rg^S=O^I; zE;Hd)!ey1(GDq3M&(``6|3~5T<4!t!hqp&`y3v6jv?xeA+lfb9(Jt}gLyGrl^l=HY z-U%Gx&0@RV7XN_MSG;5VTB(RGLesQB8$}AP)9vE-%?--sGQ?(^rYTzFW~+r!fGsjb h{W6;sEpj4}V2`D0f?CO~sw)5h002ovPDHLkV1j_NItBm$ diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockBottomHover.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockBottomHover.png deleted file mode 100644 index 69d4fe3115edb371f94dde5caac0857183f4c316..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1260 zcmVVl&|0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIyE#pH8~(FFflMNM=lB^00007bV*G` z2iXG|5H}TasA4Su000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000C- zNklfv7>E@t`7jHVDCh2fZu)T=gXA zLA-iVqF_M0iCzK`4M`-o=#tfd;K3z_Fk`Yivoq5_<@dU(XM4t--5FuMXbq27T|NE2 z_r7}XRks31qtW>K=j$uapIr{Ix*lV<#zIBoOx;Jly7=YX+}tTe;2%z(y?(;f9>>$i z4GxqPO8jG9QK)@tk6MojU?`CYCn0s0xrxOmBY(0mN< zoir#L1&=7c7BJ2UtVCdC+#wDKf3XoU2*nXD7|y#|I489hE5s!@Y_}{8boPC}}Jc z*B^(*JR@4U(Zc!5O*C$YBmcMOE+0=Go57K#X@t?vcKy^FGeTr^XsA}LK-WR!+b-5oK^d%aa zi~S(pWI)@<`A}@Ec4FvJGKUkle!Car-n}z;=j|8JURzDHT+4d@Sq$08+GQkzw8yp# zJc@Rb&6lLkGbMB@^iZ!Iz(?=Djt36z$IZ@QnWj{y3?@-KNw=gAp31&Qn9GgK{!U17kry)@fx z9vb6UQk+tPu^&ovD8lJ`9Yh3T9^na5etvu!n}?dj%C z0G^&=J)(E1TU=NRfF{dP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a@CRQ2<|#Fq1<(Kh002ovPDHLkV1g?SI^6&O diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockLeftHover.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockLeftHover.png deleted file mode 100644 index 4011775be4bba17668cdf2cd036afa2615f705fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1198 zcmV;f1X25mP)WdLnuav(A_AZ=lCATls8IUq4NIy5#qGc+J8FflMNCGBmV00007bV*G` z2iXG|5HAjT)-#v@000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000C9 zNklU;HlufD1hU|U^X{py#-<>zLWLR?!{7-X9)NxWS5P_G@DtyZfq2s;1%#7yH!U3&t@ zk7+zKDlozqhXqiiEf5~BB`o@FW*89>YM@KorESw*ZEJixFCZHi@aapn@5J2s3;Oix zG~Pe1QG!50I)^cYwXRc z2}FE5Af&P*7t%%}?ge(}A}0xzac=q_DF|%Pnz|tQBq1V`6r>SwA8D0gt+(r=AH)%G z7#|X7{@%tO))iA@LU%tU5QT_~gn1Ba!R2aO=uGFQee^i|?C(22oE7UUD-e-AI}o30wEIWf~`6 zJ8kso+`KpGD>SZL$LTZYQJR>-sPDAF+(x=L4P_F6Kv^P@(?psEl|K#l_!8HyH}TE~ zpWRWMq0?AOz=Xu4z`zg*bP|<+=%Nn{Gsl+}7xC(AAKo!KrvGka`%F_X)6}ST0#sO^ z$0?c;rD~>)PeBaDt0PxQw?g*Q4%Uz2%tt5j#@nClc(#07;aBcCzU0`a(i8;18fU@= znQannqN6OfR4+RHqVZRR$@}lcd#6t9AYl6246(fqfCM%|`=CQ?MHXF$K;=V+-+Z$I z96tB}-hJ~K_{Bm>!1UL4Ga*ADA_2vbYko{nNn51Yr45M0=7H(w^Q!^YOXGO{*#j6a zd6od5ZPHhe)d18^(J8kmWh-Q!rkp4jnjz}@tC;SrVS@X?CexEFe!U0`xGl95Mh=uQ zdxM+a&Fw?+c7uRP?GJQ*E7-ZC_|JDl{}YhO?`|?NzLLt|?HLgmqcF=wxho`m%D&9{ zzD7M7-`*=nhA_8S;Nc{K&&gZ%>{>8N47;^pDCb&WnyCSyTV;nM#C`dmJ%5zxxIBmW zjOaajq<*8mFu(Wg(lIj~#v3?lD@emR|UI31=@WtZWSSfOg-Q#EUhF#~-PqQmKf)0iCJ0B3Oqp>i_@% M07*qoM6N<$f;wa#3jhEB diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockPane.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockPane.png deleted file mode 100644 index ccc29ae53e7b0cce104699e0571a42596190a701..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3624 zcmV+@4%hLCP)KEW0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIx;ajGcq76FflMNOjL=U00007bV*G` z2iXG|5F!(-ejyA1000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000et zNkl~_nq;PfLK~uk{&;POi!OarR8`$XZ3`FL5jsC)xP(xb)Y9HyqGCfDkG z_UswWFDy{|zI{T;!|yc#T0DL7gtlzi;%c3Zjg3mZqCq(2tRxZ?2n1ZM6ZN59(IA|1 z@>oY+IWikcg=S}GDVxa0$H$fH z)vH&o2*Bs}Q(+*W)Oq2v&oYt+o35gwf{KfasXh{+9W5<6HS=lqHy1JT6zEgmu77PZdwx))DbmmOf`xh1#6xznd z#^~zRt5QvEEgkIa%!!g5SI(U~cckY-LsVZ^M;&jyWvdJfX>Ro#R-ak023A>FNo{Ry zG%_+mfBEVwX=`I6wYRrBsw791bL-YEX?b~>j=%RF`Th1+hM*YNhBZ!8x}l+g>g(&N ztE)@lzoVnWF$Focws!mWZ7EbzLWd3=;!+F%VI`AES1vRHUgHD&f^YB-IXER#N0fuz z%eA#N+S%Ib2vJOERxivSR-bXwG6esS1LWaEd5$P&Se|1J95~D|>saF2tGrsookn$Hw)pm47SB$G$xPL4UvfA&}H&N%rFlH7z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zoxtcsl!ngC)BIxb(TSRBFKxdsLR)*owv~%7ivrnICi_cMV2T_ZiGO!)j@DIITTYG^h4uB+k#y-lFOGb%LPNSk|3=KS$21}(XW2?qWp>f^=`ee zf*g2#(7}cC=Ph|{izPuQ4jLL68Ik8b5Otek{m^hl86k$Q%xb@s=(5$YQJBqhr|!0p1$}PX)7h zs6m`0d{=DubTQcVdKM$=0=O)^f5ExhkQFTk3m~j~e~zVNYbY4rJcWV8zP>)$)rOhj z^Y2{P=gCJUh zGTz$k0#`Vny)1Pt)*~SB#uWX;#Dpy0{{8#QQk%+NMU`(moV|Ouvc~`5eILW-cSByqj7ljCxW= z^Qw@e14a)@GJ*;@I$`H7H@6Z4xNe%df)!NAaWN|7xEK|3T#O1iE`}?~abmi`jc^?~ z%59M4M*cQGx50IBj+t$cdXc})&uws}{V=)>QZMqi`8h3jK3rEI4kOzj^&)?ppWE<1 X_J6fgw+pDo00000NkvXXu0mjf3~EjB diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockPaneLeft.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockPaneLeft.png deleted file mode 100644 index aca8e9310195d900dccbc7dc8afede07184beafb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4244 zcmV;F5Nq#=P)KEW0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIx;ajGcq76FflMNOjL=U00007bV*G` z2iXG|5GWPD@@%sJ000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000l` zNkl3&26+Ukk&)A;9HW+UhV~jCoGlZp}tR#w(G(sXFAx)J^Ren`btEyG{ zrJDrB-UIh(FCDrL96p(j*P2&C*mrlLiwE7y|}l47Rb2vBBGTmiKzUJ9F(> zJ#U*gugZMV_4B-WbC>ho<(zYuCy@;?Jw2`T^z=|~Z!gUR0y#^k*z2Xn#ztDSXwjaA zhK6_ZU2fZBYHCV(>+QFdOFcbGAP`VwS7=YHMkAb8}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_Ch625k7(rHIPs0yHjD@5rLjYJz;Qw{8D{1G&2&&8nqO zuL7ps-5MsQOXpNL5}?>gMfhnx`GW3LNSl0*LsmhkPVt^W;k3`Ma$UejRp35pBWsaaV9wyH}*>*f}HX3 zaZ{%Zpi6sO8#d0*pE9rtyms;KojXlWiyMIvLzETcn7so4F=#P+-+h;!c>Hn8Hujt= zE#OtdmlBJ6r9BMKww$4%A@x{>l@(f}zyOc&rn|e_ZFP0wNpf(23NMx0x^=55@6jy8 zNivkT&bPJvvbI_HQ`sI2!y{31v z&289fIbw5qq0QiCfI!U1o2X`^3Qf-zE;CdvQDsGbZx-dn4aP7=AnalHOsg$&%56?M z+QEe@vvlbABu!4|o}H+!^3%rK!nCft@TqsC6`}xdF-RQvlkn z{sg`HkN&LBp4hdCx;knM<>Ta%iI`9wzkc1+)QxUlb{_8S?UnEg9}vb#1CrWM_K|{rHDZs8{^& z)DaLf8{Ldpe>Y+byIY;CK$KZ%y903qPPg9nwtGiTI& z33#m)6fqK%iPlys2!o5&%R=A9*&_trSfaneVFdKswQE;VYE#jxsP@+mZ%j-S{63U^ z=)ngao$Ja6vEv0Vy)zOt)_v7~?NAG|3SeIXUWNxUO97CB!5qZcS?@0fJhz?$l=5Vo zlQZg0!?Wa+>P%>^^Qm5dC&{rAgj&TSIVR!Ou|u!HbIa6=n8zYH9>yX$9>yX$9>yX$ z9)>5$@zR@d-Gt}J(H?^=HZqU-c@3V6bLgn*eqMto`wtw0T+`cY`WU2HfP9>y v!vZ0W`MIrkCOjvQfR$sAW|4W!&ujQU;SBaV9;JW%00000NkvXXu0mjf#Zq3r diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockRight.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockRight.png deleted file mode 100644 index 3e90ce2b4c9790f167833c003bdbba4a0c1b7a91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 755 zcmVWdLnuav(A_AZ=lCATls8IUq4NIy5ypF*qPAFflMNOJBQ`00007bV*G` z2iXG|5HBM?32*HH000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP0006? zNklq;E0|CkFPyocb#|4;IJ4i+*ul*>fBy!m`8%6}XyAOC3bi3U^$q9nX z5DO9@RBgs1xPR{!djjotJ8*Kj$t^V^s`q3<$K6sK<_#D9em`(>vEkpIh9ux(`~`PR zH?V~J8&6mtZduxkN$Ej3G`vHtV&Qq>)5-tD$002ovPDHLkV1j$8Mw0*l diff --git a/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockRightHover.png b/src/Libraries/AvalonDock/Resources/images/Aero/AeroDockRightHover.png deleted file mode 100644 index 1015ec89acc684b0ce6050772ef644727b6cfb49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1183 zcmV;Q1YrA#P)WdLnuav(A_AZ=lCATls8IUq4NIy5*sG&UeBFflMNrhY{o00007bV*G` z2iXG|5HSTgMb*y$000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000B_ zNkl@IjmNmRsIigKUz9jm2~a5?xZc~_`=KE4Uylz}-!bL4 zarB76{;dLAXkxbj@-*g11G<;6+Ntm|6lrXLCXG!R>oopdH~48pKvr+#s}tp)#qh1$ z=JMPiK0Rtsgg{O@z(j=|ol%j2fbmKfWtfmbtnIUijDCF6;FHpCkYA2Pc=cU@ytb@2 zS`>i(Ctm$|g_dlzb%sR@VO^Sfl zHa3b-a-0j&CZ2XyI1!C_h9oo=$T$qX=gJVNl?0wmONE`#N=Uc#EZ}h9e#P3^OGdpy zuth-8?1)s-%K|NZE7f70YsWa}J5pIl=oC2HSFRknFGzahiAWy;p2+pzNB({|RYy;k zSYd72^P>|rX0>`-v0s}fpkgFVBA*kOex&f-%}1E{YZj%vY$NeJs#5Ant`OjMsVxbX z`NbI5f0)F-4{F#;t-00BG6J$aKYEQ=71~2!Us7CBy|B?#xcJ47s7_3wzo3W&z0aup ztUZU*G;sJxT-R~38q&>hcNkXtrr#XG*b5uu1 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@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde00d`2O+f$vv5tKEQIh}w03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(` z>RI+y?e7jKeZ#YO-C07OYdK~#9!V*LOAKLe?Nkz!3Jj;>%}U|_&z3ZsQ}1VK%V zP@(@LRTIwex3G?2#Ag!&k}Zr#nivLH6R`jQ009600{}RGQ|DtzxEKHc002ovPDHLk FV1h<5Xs7@H diff --git a/src/Libraries/AvalonDock/Resources/images/Classic/PinAutoHideSelected.png b/src/Libraries/AvalonDock/Resources/images/Classic/PinAutoHideSelected.png deleted file mode 100644 index 87cad42141477a80388a95ddce23382ebc3b32ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2838 zcmV+x3+eQUP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z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J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde00d`2O+f$vv5tKEQIh}w03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(` z>RI+y?e7jKeZ#YO-C05eHMK~#9!V*LOAKLe?Nky@ItnZihnCPp*^Mw}*m;m=4+ oJpD(vVQ^`}2><{90RR6309j2n=XTgnhX4Qo07*qoM6N<$f^Rrt*8l(j diff --git a/src/Libraries/AvalonDock/Resources/images/Classic/PinClose.png b/src/Libraries/AvalonDock/Resources/images/Classic/PinClose.png deleted file mode 100644 index 3e8c611a2c3779e4b07ac6ae62c3f6f842ecba7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2865 zcmV-13(oY3P)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-e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PinCloseSelected.png deleted file mode 100644 index a15868156a39e4170dae62a3edff3efa2fce91fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2856 zcmV+@3)l3CP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)p@E5RI61Ft6o-prbbn>P~)iy)E2AN zsU20jsWz_8Qg>31P|s0cqrPALg8E|(vWA65poU1JRAa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LkV1gQ^WjO!< diff --git a/src/Libraries/AvalonDock/Resources/images/DockBottom.PNG b/src/Libraries/AvalonDock/Resources/images/DockBottom.PNG deleted file mode 100644 index cdc7c06ebdad41ed7d5fa2ca2fc1cd41f15f7764..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 701 zcmV;u0z&j6!UFrRW5!#CJLtK z;S_Y`{_Ej8lNWFK&tHE&;PyFOPfj{V`_JC%b9j4BTsze7?(B0BYw30F>mJ-|J+r6N z(bM72WHNwAl2qjif{@GQ3WWl4ujt><1odnD!%tt}$JpC%Bh%~NsjpXGmR&EF2Yp4y zsjOK>-(Qe_F2<)u-GY!eYU1k=u(Y$!OZ$vZEw14(^gGQZ>ajYJ|yn`;C00004XF*Lt006O% z3;baP0007TNklWy5~PX&OJho@RHTYVB3^3H#u|;c;H_GgX$UssK6+)YA4ZAq<&4+`}+d$t(MrcIOSVfKV&$@%77XSN3d zfo)qV0EnU(3WXw(NR+p*-Q$7vcs!m?r?b4p0ATO1F3WPBw-^8f23v>mo({j~-Xzw= zJ1p8>iUYoaxFPjk z%i27tE_VWea5xNxIbg_N9vm;ZCn}`r)%i#}?fZIsOtIh3AG-VL;4OK-SL(i+v3k;^ z_g+ZsIsbn5V65ZpI{*YhKuF91ujf>(>6kW?D2tg&Se}pN7n4dYr+t@8Kd@Fdk|qJg zV6rS`>i{YP;LjV`UuhDc1(PM_!H4IbjjPCNdug%HY!W~opo*wW z0VtSzfX#N%u7z&e(-RR9aotN}m{%&Vv+z?vkp5D~zv*tcIyKP;bLtyonpX8Pr4VtS zrvG*FdO2vt0~!^xnX29g|Arlh^MKl?&DHQk!$FGU6rbCahG#Oa0${X%Icj*Tz%k8N fjB5*iwod*6m105#MH!5000000NkvXXu0mjfKRG*e diff --git a/src/Libraries/AvalonDock/Resources/images/DockPane.PNG b/src/Libraries/AvalonDock/Resources/images/DockPane.PNG deleted file mode 100644 index 0377b966e23a237fcbdf71d4e246b0cf5a0ac833..0000000000000000000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rGO zFblmp$y?B`%h#dELQ~5G)|HR{d7RWIt+yhid^YkDQ(ilwKr6z}#wVF)c(A&`_4H(@ zrq)KW(R|`0hc@ysd>)K+$RD?m+YTnK`y-1;^y41<=6k2sZCKT<2xV5>hDbYjs4c9$ z-RrC5WG2FAhX$V{mv_Mpj@Tntbt?i^COJqXzo7vj;oCfVC8sjbn|k`V2}<{t-@X0) zk%i`_Ja~Oya?HEu2XpQ#xv83m^dds#=a)NrHz{M;tq5RL!AMqKd4g+Iv4PxIUi#5U z*Uh`v;J$dgy~_)6oZX6ut^}ZL^3rKP9i7}f=pG!5feac_ zNgXv&WRB4YTW2hxEzAt}MLe9jy((4Z(3hM>4jUTMJB&<%nP0&L--j`;#?#$M%Rz_U zn-<@$JTvK9AUj&wzOdGQ0fapQ&hsE z#Lq$wkRi(|+h`r|GMlifEJX1GWqDoaMk`|ksC9iTNQS_!PP#Optl_n#3<}93`Io=` zlSrjR%f2qH%(2U*%-RNH6v^VEF_JI7bBm5Y`-oV#DbXsM+|mdxLUI}Nrd2WOzSMaK zvq*mak-LpuCrP4J)szOM*Elc|vVF++;bHJP+o*EBh{|TpR9{`JK|u zJwB^)fQawJC!bK;UqsY;OfVJ%11cE+{gvSir{fXZ3xC-6U53)q;*1V zX8wEjjI6j4XHpF&0A+Ft@*x$IHe0K=`qM|>{CwuW&kCyjlL-wNcQ!Q9a^!b(&i42$ zx8c5ep*{pVZd5s*GL^VK-MG>~t9=Fac%`B?1ou3GgKnSUm9$k2ax1GD#kCz>_$4?6Quf) zN{>emWohSCkMU@xC5^hSamztRZ9KS4MQ53)1;Lnx#k8UmD#xn-OAe_14oFT?2MvRb sdDE&!EeNg)8CGno>cUn2Q*4>|6fnZgX>GqMXaE2J07*qoM6N<$f;Ty3tN;K2 diff --git a/src/Libraries/AvalonDock/Resources/images/DockRight.PNG b/src/Libraries/AvalonDock/Resources/images/DockRight.PNG deleted file mode 100644 index 067b3f0632630ddf405cb988242bc0c8bc8532c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 691 zcmV;k0!;mhP)C00004XF*Lt006O% z3;baP0007NNklW+w*yVTe*OAwY6GYRz<>cd9cXxvie@k#|6a`oy}plSE+-NRzR+`YeN?)<*s zz#j++;ZENAwRgj(_Eqm2mcFi>_q=$<Mr|NUGOPC2ejbm z(W5{+uv<_%=V{T*C*^aWLr4fWZ`z~m$q&-{?LaiZZo@5j0z&V+E79jEg zI1ZpWnfRgt=s?O5&KeC^kzTlP;n1N&Koyh#oOLp!)dIAJ!uAo)Rt2z{rY?XsTYwbp Z003ukLQG-h*UbO`002ovPDHLkV1gzvHH!cM diff --git a/src/Libraries/AvalonDock/Resources/images/DockTop.PNG b/src/Libraries/AvalonDock/Resources/images/DockTop.PNG deleted file mode 100644 index b14b818c7dc6d1b699dc7f0dcfa384efacf76a6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 719 zcmV;=0xPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!O-V#SR7gwhmfLF+K@`UI{}QB%0ZU^`sZ^wjMj~2k(8d~#x8SYb zeF&(9)C$rE`{YXuk}hl^S;URGZ&w@H*d!$-w)7(6gF^ew%x(;tbnLK#4<5dpe0%2X zkC|nYnXTb)c+1}iaAjGJ#bS!0ys;_BT=4-kkw|1RnVd~waxqgtbzLvm6ebs|$3(&O z-yVm~-F!ZDZS3@w(8-IBkNbjd?}NjhJAM5(dfkEULl^e+`PzHEEIWEUJGut8JCAK^ zcXzjiG))7eTpgZR3XFd~|Fr6TQXU8v-S<8o9DdL8 zzN=c#2Aw{uW!JM|V^Ns_Sc=G=%{hF+Ztf#?qxas0j+Mp^fn}%MdP&X^fq=zbnI_V_h zaPy^={OoFemSm0j60}0aj8$Q6R-MDuD__LK=b{5>fxOZ0VofwS^A*Le{d-)@XoJ-V z&KI{awL*(_V74f)Sy4~p{~>hF_)Y5D(v zT^f5ehQ*@gK95rc(87nQmgf>|{kDX8-ocmcu?|hnSd{OUeFgvk002ovPDHLkV1kG% BMpb%$) zM`SSr12<5bTZr+}-MT+OL6&q!Uq=Rpjs4tz5?O)#y`CXf8orD$p;?kZH0{JUuP{yElj=9_hMESx&QWQ)|K zBRp=07gWitzkPL%Bp3H)q3Q@@FmclXTspFJ`c1!?(T0b;*^Bdm?kzBm@Y4 w-Q>~!Cd2K_kKGSt)4NUo1bzKKef=+n-K)}-PDva50D6SM)78&qol`;+0M?O!p8x;= diff --git a/src/Libraries/AvalonDock/Resources/images/Locked.png b/src/Libraries/AvalonDock/Resources/images/Locked.png deleted file mode 100644 index b8f6ced2df26aa988dd3087712d62e9168c4351d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJx0U~c5>$3n-Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A3Jr+{)NoLEFI4z#y|OdL>XFdx@v7EBj4m2|fdbqj5K{0fjgV zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%LgLo-U3d6}M#jbomY$Fto;>6qzP( z&Y~#6)7LY9^&6hu2Ta;M@ppmi?D0cO7$zBdEetd$<=xK z=Mv4O2A^#B%j!K2>}Yxa+lr&<*1FeOhjmsqYIG&=yB$$EWN@Wz;#IqA=PlTiHCqG% zyc$zwu4xNK^jQB8d&|WXspnYk9x>;+=#>xCr7g~}tj*(p^S43OrO`syaPHZK(!O`{ s!>8ecOsb+Okyp0=FX~R)=lZi#66g;GPgg&ebxsLQ07P4TjsO4v diff --git a/src/Libraries/AvalonDock/Resources/images/PinAutoHide.png b/src/Libraries/AvalonDock/Resources/images/PinAutoHide.png deleted file mode 100644 index 7a968a25eaa72a54e18ec873a57e0c93c4a7a6bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpTyyf4=~y(-8| vaxqRgl6gq1NFwXw(aZHQpPHS8{TLX+ZTR_4&-N$>>SFM8^>bP0l+XkK*m@l0 diff --git a/src/Libraries/AvalonDock/Resources/images/PinClose.png b/src/Libraries/AvalonDock/Resources/images/PinClose.png deleted file mode 100644 index 1bd384e1142c268302f39d65197f6c9e0ef40256..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2^Po-U3d6}OU86qpTyR=u>BYYuoK z@zL{20-l$p00i_>zopr E01vewjQ{`u diff --git a/src/Libraries/AvalonDock/Resources/images/PinDocMenu.png b/src/Libraries/AvalonDock/Resources/images/PinDocMenu.png deleted file mode 100644 index 35b3fef68e18e9cbad978fa2da452116f76a9d83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpV8W-R-EWX1BX wWsdLEYosI%C0I<19zA(*p<`iN-9mN-w?sC+EfdQ4fVvnwUHx3vIVCg!0QDaofdBvi diff --git a/src/Libraries/AvalonDock/Resources/images/PinMenu.png b/src/Libraries/AvalonDock/Resources/images/PinMenu.png deleted file mode 100644 index ebad71bee8796c6ccfa67ec43943075c4a1e0c93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpV8bbbGK2KJv_ v_Wy^;gW`MjF;W~qU)t-LI_sRsT+YexxtWFU{qv%eKwS);u6{1-oD!M<9+MxI diff --git a/src/Libraries/AvalonDock/Resources/images/VTabGroup.png b/src/Libraries/AvalonDock/Resources/images/VTabGroup.png deleted file mode 100644 index c3f279f7d7ac7b6ef8381388fb79afd790dd8d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1SBVD?P>#3Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A>(%#LCoCLEFI4z+ldYw-rEr>?NMQuIx9NB?Kh-yvvSu0EIXU zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%Lglo-U3d6}NIP82T|g@~{S|&zdCS zu_dNi`a(c(U_ju7C66RJq7@Vsv-})R$_j{j-B^+^@y6Euxo=nmF7|Bgo&T>Y#ed!V z=`LR^f2`WRZu`~t()Xt~KRztwec|fMgKsaV>_2`_YO|!%>=_qlx4-+(a4UrQz1;lT z?R|cFvn-b0t%~glxhl4t;opfKwsVrcI!q_;HOHJ~zm_pOLV@XQTyIFN2!C!;=XMJd zyB#z7_jGRCutIC|ah?M%ovQbLO4D{H?=?Pol;GCnVx*>@_?*9@MnelF{r5}E*8VV&6k diff --git a/src/Libraries/AvalonDock/WindowInteropWrapper.cs b/src/Libraries/AvalonDock/WindowInteropWrapper.cs deleted file mode 100644 index b02519263d..0000000000 --- a/src/Libraries/AvalonDock/WindowInteropWrapper.cs +++ /dev/null @@ -1,146 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; -using System.Windows.Interop; -using System.Runtime.InteropServices; -using System.Diagnostics; - -namespace AvalonDock -{ - class WindowInteropWrapper : IDisposable - { - public WindowInteropWrapper() - { - } - - DependencyObject _attachedObject; - - public DependencyObject AttachedObject - { - get {return _attachedObject;} - set - { - if (_attachedObject != value) - { - if (_attachedObject != null) - { - _hwndSrc.RemoveHook(_hwndSrcHook); - //_hwndSrc.Dispose(); - _hwndSrc = null; - _hwndSrcHook = null; - } - - _attachedObject = value; - - if (_attachedObject != null) - { - _hwndSrc = HwndSource.FromDependencyObject(value) as HwndSource; - _hwndSrcHook = new HwndSourceHook(this.HookHandler); - _hwndSrc.AddHook(_hwndSrcHook); - } - } - } - } - - HwndSource _hwndSrc = null; - HwndSourceHook _hwndSrcHook = null; - - #region interop funtions and consts - const int WM_NCACTIVATE = 0x86; - const int WM_ACTIVATEAPP = 0x1c; - const int WM_ACTIVATE = 6; - const int WM_WINDOWPOSCHANGING = 70; - const int WM_WINDOWPOSCHANGED = 0x47; - const int WM_MOVE = 0x0003; - const int WM_SIZE = 0x0005; - const int WM_NCMOUSEMOVE = 0xa0; - const int WM_NCLBUTTONDOWN = 0xA1; - const int WM_NCLBUTTONUP = 0xA2; - const int WM_NCLBUTTONDBLCLK = 0xA3; - const int WM_NCRBUTTONDOWN = 0xA4; - const int WM_NCRBUTTONUP = 0xA5; - const int HTCAPTION = 2; - const int SC_MOVE = 0xF010; - const int WM_SYSCOMMAND = 0x0112; - - - [DllImport("user32.dll", CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll")] - public static extern bool LockWindowUpdate(IntPtr hWndLock); - - #endregion - - private IntPtr HookHandler( - IntPtr hwnd, - int msg, - IntPtr wParam, - IntPtr lParam, - ref bool handled - ) - { - handled = false; - - switch (msg) - { - case SC_MOVE: - case WM_WINDOWPOSCHANGING: - SafeFireEvent(OnWindowPosChanging, EventArgs.Empty); - break; - } - - return IntPtr.Zero; - } - - public event EventHandler OnWindowPosChanging; - - - void SafeFireEvent(EventHandler eventToFireup, EventArgs e) - { - if (AttachedObject != null && - PresentationSource.FromDependencyObject(AttachedObject) != null) - { - if (eventToFireup != null) - eventToFireup(this, e); - } - } - - - #region IDisposable Members - - public void Dispose() - { - AttachedObject = null; - GC.SuppressFinalize(this); - } - - #endregion - } -} diff --git a/src/Libraries/AvalonDock/WpfApplication.cs b/src/Libraries/AvalonDock/WpfApplication.cs deleted file mode 100644 index 193b970f45..0000000000 --- a/src/Libraries/AvalonDock/WpfApplication.cs +++ /dev/null @@ -1,96 +0,0 @@ -//Copyright (c) 2007-2009, Adolfo Marinucci -//All rights reserved. - -//Redistribution and use in source and binary forms, with or without modification, -//are permitted provided that the following conditions are met: -// -//* Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -//* Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -//* Neither the name of Adolfo Marinucci nor the names of its contributors may -// be used to endorse or promote products derived from this software without -// specific prior written permission. -// -//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -using System; -using System.Windows; -using System.Windows.Threading; - - - -namespace AvalonDock -{ - - /// - /// Designates a Windows Presentation Foundation application model with added functionalities. - /// - class WpfApplication : Application - { - - private static DispatcherOperationCallback exitFrameCallback = new - DispatcherOperationCallback(ExitFrame); - - - - /// - /// Processes all UI messages currently in the message queue. - /// - public static void DoEvents() - { - - // Create new nested message pump. - DispatcherFrame nestedFrame = new DispatcherFrame(); - - - - // Dispatch a callback to the current message queue, when getting called, - // this callback will end the nested message loop. - // note that the priority of this callback should be lower than the that of UI event messages. - DispatcherOperation exitOperation = Dispatcher.CurrentDispatcher.BeginInvoke( - DispatcherPriority.Background, exitFrameCallback, nestedFrame); - - - - // pump the nested message loop, the nested message loop will - // immediately process the messages left inside the message queue. - Dispatcher.PushFrame(nestedFrame); - - - - // If the "exitFrame" callback doesn't get finished, Abort it. - if (exitOperation.Status != DispatcherOperationStatus.Completed) - { - exitOperation.Abort(); - } - - } - - - - private static Object ExitFrame(Object state) - { - DispatcherFrame frame = state as DispatcherFrame; - - - // Exit the nested message loop. - frame.Continue = false; - - return null; - - } - - } - -} - diff --git a/src/Libraries/AvalonDock/doc/AvalonDock.shfb b/src/Libraries/AvalonDock/doc/AvalonDock.shfb deleted file mode 100644 index 23e6041ab1..0000000000 --- a/src/Libraries/AvalonDock/doc/AvalonDock.shfb +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - Summary, Parameter, Returns, AutoDocumentCtors, Namespace, TypeParameter - InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected - - - .\Help\ - - - True - True - - HtmlHelp1x - False - 3.5 - False - False - False - - AvalonDock Library Documentation - AvalonDock - en-US - http://www.codeplex.com/AvalonDock/license - (C)2008 Adolfo Marinucci - - - - - Local - Msdn - Blank - Prototype - Guid - Standard - False - True - False - Hierarchical - True - ms.vsipcc+, ms.vsexpresscc+ - 1.0.0.0 - AboveNamespaces - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/aero.normalcolor.brushes.xaml b/src/Libraries/AvalonDock/themes/aero.normalcolor.brushes.xaml deleted file mode 100644 index 673e70395e..0000000000 --- a/src/Libraries/AvalonDock/themes/aero.normalcolor.brushes.xaml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/aero.normalcolor.xaml b/src/Libraries/AvalonDock/themes/aero.normalcolor.xaml deleted file mode 100644 index e1bdd0dc5f..0000000000 --- a/src/Libraries/AvalonDock/themes/aero.normalcolor.xaml +++ /dev/null @@ -1,621 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/classic.brushes.xaml b/src/Libraries/AvalonDock/themes/classic.brushes.xaml deleted file mode 100644 index 45b2989ca3..0000000000 --- a/src/Libraries/AvalonDock/themes/classic.brushes.xaml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/classic.xaml b/src/Libraries/AvalonDock/themes/classic.xaml deleted file mode 100644 index b925e76c86..0000000000 --- a/src/Libraries/AvalonDock/themes/classic.xaml +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/classic2.xaml b/src/Libraries/AvalonDock/themes/classic2.xaml deleted file mode 100644 index 9f17426088..0000000000 --- a/src/Libraries/AvalonDock/themes/classic2.xaml +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Libraries/AvalonDock/themes/generic.xaml b/src/Libraries/AvalonDock/themes/generic.xaml deleted file mode 100644 index 6e2f3c6cfe..0000000000 --- a/src/Libraries/AvalonDock/themes/generic.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/Libraries/AvalonDock/themes/luna.normalcolor.xaml b/src/Libraries/AvalonDock/themes/luna.normalcolor.xaml deleted file mode 100644 index b51c454551..0000000000 --- a/src/Libraries/AvalonDock/themes/luna.normalcolor.xaml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file From 671595277a9508d4e2855883812f7cf8898d516a Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 31 May 2010 16:21:31 +0000 Subject: [PATCH 34/79] Update to AvalonDock 1.3.3391 git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5879 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- SharpDevelop.Tests.sln | 2 +- SharpDevelop.sln | 2 +- data/layouts/Debug.xml | 76 +- data/layouts/Default.xml | 61 +- data/layouts/Plain.xml | 44 +- .../Test/Utils/MockWorkbenchWindow.cs | 2 +- .../Test/Utils/MockWorkbenchWindow.cs | 2 +- .../AvalonDock.Themes.csproj | 129 + .../AvalonDock.Themes.csproj.user | 6 + .../Images/ExpDark/HTabGroup.png | Bin 0 -> 358 bytes .../Images/ExpDark/Locked.png | Bin 0 -> 357 bytes .../Images/ExpDark/PinAutoHide.png | Bin 0 -> 1227 bytes .../Images/ExpDark/PinClose.png | Bin 0 -> 1237 bytes .../Images/ExpDark/PinDocMenu.png | Bin 0 -> 1237 bytes .../Images/ExpDark/PinMenu.png | Bin 0 -> 1233 bytes .../Images/ExpDark/VTabGroup.png | Bin 0 -> 403 bytes .../Images/dev2010/HTabGroup.png | Bin 0 -> 358 bytes .../Images/dev2010/Locked.png | Bin 0 -> 357 bytes .../Images/dev2010/PinAutoHide.png | Bin 0 -> 1229 bytes .../Images/dev2010/PinClose.png | Bin 0 -> 1243 bytes .../Images/dev2010/PinDocMenu.png | Bin 0 -> 1237 bytes .../Images/dev2010/PinMenu.png | Bin 0 -> 1233 bytes .../Images/dev2010/VTabGroup.png | Bin 0 -> 403 bytes .../Properties/AssemblyInfo.cs | 55 + .../Properties/Resources.Designer.cs | 71 + .../Properties/Resources.resx | 117 + .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + .../Themes/ExpressionDark.xaml | 960 ++++ .../AvalonDock.Themes/Themes/dev2010.xaml | 1332 ++++++ src/Libraries/AvalonDock/AvalonDock.url | 5 + .../AvalonDock/AvalonDock/AlignedImage.cs | 187 + .../AvalonDock/AvalonDock/AvalonDock.csproj | 261 ++ .../AvalonDock/AvalonDock/AvalonDock.snk | Bin 0 -> 596 bytes .../AvalonDock/AvalonDockBrushes.cs | 148 + .../AvalonDock/AvalonDock/AvalonDockWindow.cs | 20 + .../AvalonDock/ContextMenuElement.cs | 58 + .../AvalonDock/AvalonDock/Converters.cs | 167 + .../DeserializationCallbackEventArgs.cs | 25 + .../AvalonDock/AvalonDock/DockableContent.cs | 954 ++++ .../AvalonDock/DockableContentCommands.cs | 128 + .../AvalonDock/DockableFloatingWindow.cs | 303 ++ .../DockableFloatingWindowCommands.cs | 80 + .../AvalonDock/AvalonDock/DockablePane.cs | 610 +++ .../AvalonDock/DockablePaneAnchorTab.cs | 248 + .../AvalonDock/DockablePaneAnchorTabGroup.cs | 64 + .../AvalonDock/DockablePaneCommands.cs | 102 + .../AvalonDock/AvalonDock/DockableTabPanel.cs | 87 + .../AvalonDock/AvalonDock/DockingManager.cs | 4075 +++++++++++++++++ .../AvalonDock/AvalonDock/DocumentContent.cs | 442 ++ .../AvalonDock/DocumentContentCommands.cs | 83 + .../AvalonDock/DocumentFloatingWindow.cs | 295 ++ .../AvalonDock/DocumentNavigatorWindow.cs | 254 + .../AvalonDock/AvalonDock/DocumentPane.cs | 525 +++ .../AvalonDock/DocumentPaneCommands.cs | 142 + .../AvalonDock/DocumentPaneResizingPanel.cs | 55 + .../AvalonDock/AvalonDock/DocumentTabPanel.cs | 131 + .../AvalonDock/AvalonDock/DragPaneServices.cs | 195 + .../AvalonDock/FloatingDockablePane.cs | 216 + .../AvalonDock/FloatingDocumentPane.cs | 126 + .../AvalonDock/AvalonDock/FloatingWindow.cs | 617 +++ .../AvalonDock/FlyoutDockablePane.cs | 106 + .../AvalonDock/AvalonDock/FlyoutPaneWindow.cs | 1107 +++++ .../AvalonDock/AvalonDock/GreyableImage.cs | 121 + .../AvalonDock/AvalonDock/HelperFunc.cs | 204 + .../AvalonDock/AvalonDock/IDockableControl.cs | 36 + .../AvalonDock/AvalonDock/IDropSurface.cs | 72 + .../AvalonDock/AvalonDock/InteropHelper.cs | 71 + .../AvalonDock/LogicalTreeAdapter.cs | 159 + .../AvalonDock/AvalonDock/ManagedContent.cs | 961 ++++ .../AvalonDock/ManagedContentCollection.cs | 53 + .../AvalonDock/ManagedContentCommands.cs | 126 + .../AvalonDock/AvalonDock/NavigatorWindow.cs | 338 ++ .../AvalonDock/AvalonDock/OverlayWindow.cs | 518 +++ .../AvalonDock/OverlayWindowAnchorButton.cs | 130 + src/Libraries/AvalonDock/AvalonDock/Pane.cs | 472 ++ .../AvalonDock/AvalonDock/PaneCommands.cs | 37 + .../AvalonDock/AvalonDock/PaneTabPanel.cs | 120 + .../AvalonDock/Properties/AssemblyInfo.cs | 55 + .../Properties/Resources.Designer.cs | 252 + .../AvalonDock/Properties/Resources.resx | 183 + .../Properties/Settings.Designer.cs | 30 + .../AvalonDock/Properties/Settings.settings | 7 + .../RequestDocumentCloseEventArgs.cs | 21 + .../AvalonDock/AvalonDock/Resizer.cs | 55 + .../AvalonDock/AvalonDock/ResizingPanel.cs | 1574 +++++++ .../AvalonDock/Resources/Brushes.xaml | 116 + .../AvalonDock/Resources/Common.xaml | 88 + .../Resources/DockablePaneStyles.xaml | 232 + .../Resources/DockingManagerStyles.xaml | 141 + .../DocumentNavigatorWindowStyle.xaml | 131 + .../Resources/DocumentPaneStyles.xaml | 219 + .../Resources/FloatingWindowStyle.xaml | 112 + .../Resources/Images/Aero/AeroDockBottom.png | Bin 0 -> 699 bytes .../Images/Aero/AeroDockBottomHover.png | Bin 0 -> 1260 bytes .../Resources/Images/Aero/AeroDockLeft.png | Bin 0 -> 747 bytes .../Images/Aero/AeroDockLeftHover.png | Bin 0 -> 1198 bytes .../Resources/Images/Aero/AeroDockPane.png | Bin 0 -> 3624 bytes .../Images/Aero/AeroDockPaneBottom.png | Bin 0 -> 4356 bytes .../Images/Aero/AeroDockPaneInto.png | Bin 0 -> 4277 bytes .../Images/Aero/AeroDockPaneLeft.png | Bin 0 -> 4244 bytes .../Images/Aero/AeroDockPaneRight.png | Bin 0 -> 4174 bytes .../Resources/Images/Aero/AeroDockPaneTop.png | Bin 0 -> 4353 bytes .../Resources/Images/Aero/AeroDockRight.png | Bin 0 -> 755 bytes .../Images/Aero/AeroDockRightHover.png | Bin 0 -> 1183 bytes .../Resources/Images/Aero/AeroDockTop.png | Bin 0 -> 712 bytes .../Images/Aero/AeroDockTopHover.png | Bin 0 -> 1281 bytes .../Resources/Images/Classic/PinAutoHide.png | Bin 0 -> 2855 bytes .../Images/Classic/PinAutoHideSelected.png | Bin 0 -> 2838 bytes .../Resources/Images/Classic/PinClose.png | Bin 0 -> 2865 bytes .../Images/Classic/PinCloseSelected.png | Bin 0 -> 2856 bytes .../Resources/Images/Classic/PinMenu.png | Bin 0 -> 2856 bytes .../Images/Classic/PinMenuSelected.png | Bin 0 -> 2839 bytes .../Resources/Images/DockBottom.PNG | Bin 0 -> 701 bytes .../AvalonDock/Resources/Images/DockLeft.PNG | Bin 0 -> 697 bytes .../AvalonDock/Resources/Images/DockPane.PNG | Bin 0 -> 2790 bytes .../AvalonDock/Resources/Images/DockRight.PNG | Bin 0 -> 691 bytes .../AvalonDock/Resources/Images/DockTop.PNG | Bin 0 -> 719 bytes .../AvalonDock/Resources/Images/HTabGroup.png | Bin 0 -> 358 bytes .../AvalonDock/Resources/Images/Locked.png | Bin 0 -> 357 bytes .../Resources/Images/PinAutoHide.png | Bin 0 -> 99 bytes .../AvalonDock/Resources/Images/PinClose.png | Bin 0 -> 108 bytes .../Resources/Images/PinDocMenu.png | Bin 0 -> 99 bytes .../AvalonDock/Resources/Images/PinMenu.png | Bin 0 -> 99 bytes .../AvalonDock/Resources/Images/VTabGroup.png | Bin 0 -> 403 bytes .../Resources/ManagedContentStyle.xaml | 39 + .../Resources/NavigatorWindowStyle.xaml | 232 + .../Resources/OverlayWindowStyle.xaml | 59 + .../AvalonDock/RoutedEventHandler.cs | 11 + .../AvalonDock/RoutedEventHelper.cs | 82 + .../AvalonDock/AvalonDock/ThemeFactory.cs | 255 ++ .../Themes/aero.normalcolor.brushes.xaml | 154 + .../AvalonDock/Themes/aero.normalcolor.xaml | 582 +++ .../AvalonDock/Themes/classic.brushes.xaml | 104 + .../AvalonDock/AvalonDock/Themes/classic.xaml | 498 ++ .../AvalonDock/AvalonDock/Themes/generic.xaml | 17 + .../AvalonDock/Themes/luna.normalcolor.xaml | 18 + .../AvalonDock/WindowInteropWrapper.cs | 252 + src/Libraries/AvalonDock/License.rtf | 25 + .../Project/ICSharpCode.SharpDevelop.csproj | 6 +- .../Base/Project/Src/Gui/IWorkbenchWindow.cs | 2 +- .../Gui/Workbench/Layouts/AvalonDockLayout.cs | 34 +- .../Gui/Workbench/Layouts/AvalonPadContent.cs | 15 +- .../Layouts/AvalonWorkbenchWindow.cs | 45 +- 144 files changed, 23675 insertions(+), 101 deletions(-) create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj.user create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/HTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/Locked.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinAutoHide.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinClose.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinDocMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/VTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/HTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/Locked.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinAutoHide.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinClose.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinDocMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/VTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Properties/AssemblyInfo.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.resx create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.settings create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock.url create mode 100644 src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj create mode 100644 src/Libraries/AvalonDock/AvalonDock/AvalonDock.snk create mode 100644 src/Libraries/AvalonDock/AvalonDock/AvalonDockBrushes.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/AvalonDockWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ContextMenuElement.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Converters.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DeserializationCallbackEventArgs.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockableContent.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockableContentCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindowCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockablePane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTab.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTabGroup.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockablePaneCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockableTabPanel.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DockingManager.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentContent.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentContentCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentFloatingWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentNavigatorWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentPaneCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentPaneResizingPanel.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/DragPaneServices.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/FloatingDocumentPane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/FlyoutDockablePane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/GreyableImage.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/HelperFunc.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/IDockableControl.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/IDropSurface.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/InteropHelper.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ManagedContent.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ManagedContentCollection.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ManagedContentCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/OverlayWindow.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/OverlayWindowAnchorButton.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Pane.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/PaneCommands.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/PaneTabPanel.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Properties/Resources.Designer.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Properties/Resources.resx create mode 100644 src/Libraries/AvalonDock/AvalonDock/Properties/Settings.Designer.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Properties/Settings.settings create mode 100644 src/Libraries/AvalonDock/AvalonDock/RequestDocumentCloseEventArgs.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resizer.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ResizingPanel.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Brushes.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Common.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/DockingManagerStyles.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/DocumentPaneStyles.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/FloatingWindowStyle.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottom.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottomHover.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockLeft.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockLeftHover.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPane.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneBottom.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneInto.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneLeft.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneRight.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneTop.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRight.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRightHover.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockTop.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockTopHover.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinAutoHide.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinAutoHideSelected.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinClose.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinCloseSelected.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinMenuSelected.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockBottom.PNG create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockLeft.PNG create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockPane.PNG create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockRight.PNG create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockTop.PNG create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/HTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/Locked.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinAutoHide.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinClose.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinDocMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinMenu.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/Images/VTabGroup.png create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/ManagedContentStyle.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/NavigatorWindowStyle.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Resources/OverlayWindowStyle.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/RoutedEventHandler.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/RoutedEventHelper.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/ThemeFactory.cs create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.brushes.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/classic.brushes.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/generic.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/Themes/luna.normalcolor.xaml create mode 100644 src/Libraries/AvalonDock/AvalonDock/WindowInteropWrapper.cs create mode 100644 src/Libraries/AvalonDock/License.rtf diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln index 18596020b1..160f35186f 100644 --- a/SharpDevelop.Tests.sln +++ b/SharpDevelop.Tests.sln @@ -94,7 +94,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "s {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" ProjectSection(SolutionItems) = postProject diff --git a/SharpDevelop.sln b/SharpDevelop.sln index cdb498d6ff..5f28c1cb00 100644 --- a/SharpDevelop.sln +++ b/SharpDevelop.sln @@ -84,7 +84,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "s {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" ProjectSection(SolutionItems) = postProject diff --git a/data/layouts/Debug.xml b/data/layouts/Debug.xml index 1ed42b231a..c44fc9cfed 100644 --- a/data/layouts/Debug.xml +++ b/data/layouts/Debug.xml @@ -1,32 +1,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/layouts/Default.xml b/data/layouts/Default.xml index 988fb426ab..00ae490078 100644 --- a/data/layouts/Default.xml +++ b/data/layouts/Default.xml @@ -1,22 +1,49 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - + - + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/layouts/Plain.xml b/data/layouts/Plain.xml index da1deb0774..d3bbe459e4 100644 --- a/data/layouts/Plain.xml +++ b/data/layouts/Plain.xml @@ -1,5 +1,43 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbenchWindow.cs b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbenchWindow.cs index e9bc14bd9f..4687833673 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbenchWindow.cs +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbenchWindow.cs @@ -90,7 +90,7 @@ namespace PythonBinding.Tests.Utils } } - public System.Windows.Media.Imaging.BitmapSource Icon { + public System.Windows.Media.ImageSource Icon { get { throw new NotImplementedException(); } diff --git a/src/AddIns/BackendBindings/WixBinding/Test/Utils/MockWorkbenchWindow.cs b/src/AddIns/BackendBindings/WixBinding/Test/Utils/MockWorkbenchWindow.cs index 3ca745594c..0940a5bfa8 100644 --- a/src/AddIns/BackendBindings/WixBinding/Test/Utils/MockWorkbenchWindow.cs +++ b/src/AddIns/BackendBindings/WixBinding/Test/Utils/MockWorkbenchWindow.cs @@ -39,7 +39,7 @@ namespace WixBinding.Tests.Utils } } - public System.Windows.Media.Imaging.BitmapSource Icon { + public System.Windows.Media.ImageSource Icon { get { throw new NotImplementedException(); } diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj new file mode 100644 index 0000000000..e10d619cae --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj @@ -0,0 +1,129 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {3836F4A8-4B35-4F5E-BB0F-DAD374297525} + library + Properties + AvalonDock.Themes + AvalonDock.Themes + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {87E61430-4243-45F2-B74E-0A4C096CEBF3} + AvalonDock + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj.user b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj.user new file mode 100644 index 0000000000..07dbd5b56e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/AvalonDock.Themes.csproj.user @@ -0,0 +1,6 @@ + + + + ProjectFiles + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/HTabGroup.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/HTabGroup.png new file mode 100644 index 0000000000000000000000000000000000000000..4c50d26d30e92554e22a917221b2dfb25b337b02 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp@K+MO%1SG3v8C!vrPKj$oiE~kEVo7Fxopb%$) zM`SSr12<5bTZr+}-MT+OL6&q!Uq=Rpjs4tz5?O)#y`CXf8orD$p;?kZH0{JUuP{yElj=9_hMESx&QWQ)|K zBRp=07gWitzkPL%Bp3H)q3Q@@FmclXTspFJ`c1!?(T0b;*^Bdm?kzBm@Y4 w-Q>~!Cd2K_kKGSt)4NUo1bzKKef=+n-K)}-PDva50D6SM)78&qol`;+0M?O!p8x;= literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/Locked.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/Locked.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f6ced2df26aa988dd3087712d62e9168c4351d GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJx0U~c5>$3n-Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A3Jr+{)NoLEFI4z#y|OdL>XFdx@v7EBj4m2|fdbqj5K{0fjgV zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%LgLo-U3d6}M#jbomY$Fto;>6qzP( z&Y~#6)7LY9^&6hu2Ta;M@ppmi?D0cO7$zBdEetd$<=xK z=Mv4O2A^#B%j!K2>}Yxa+lr&<*1FeOhjmsqYIG&=yB$$EWN@Wz;#IqA=PlTiHCqG% zyc$zwu4xNK^jQB8d&|WXspnYk9x>;+=#>xCr7g~}tj*(p^S43OrO`syaPHZK(!O`{ s!>8ecOsb+Okyp0=FX~R)=lZi#66g;GPgg&ebxsLQ07P4TjsO4v literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinAutoHide.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinAutoHide.png new file mode 100644 index 0000000000000000000000000000000000000000..540c4a1bb794ab875eec771aa3491f0c076e60ef GIT binary patch literal 1227 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2fox}&cn1H;CC?mvmF3=GT+0X`wF zKyd>DgQG`}0vV%VGz3Ok2vp2ya$#U#WGD&p3;sW{0YmV2c2!{fa~60+7BevL9RguS zQ4OyKprB-lYeY$Kep*R+Vo@qXKw@TIiJqTph(ejMo~fRxXV;$xKt%?gE{-7*;mJSx zc_a)feH0jk*iJWA_K18s(ALn)IQ!&@6Gu2$0^~06P55b15%8Un!R}4bo3~$I{{iY{ N@O1TaS?83{1OT}(JBa`Q literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinClose.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinClose.png new file mode 100644 index 0000000000000000000000000000000000000000..db99ae48884bc82acbc68df7307ec9f7a66d7da0 GIT binary patch literal 1237 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2fox}&cn1H;CC?mvmF3=GT+0X`wF zK=J?o{{zWUFd70QFa*-e-Xt?HFfx<``2_*ARs=V?9$n6T99sWk5x` zo-U3d65+`|`gtTcK1eKl@V|b7SBRXG_A<>3Eyb7xY#m-2?5CKE4lep}hl#=RM$3Y4 SC(f+}r8-YnKbLh*2~7a$KRqu1 literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinMenu.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/ExpDark/PinMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..653373ce5ca725fa65fbea28949570e977c86f70 GIT binary patch literal 1233 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2f=age(c!@6@aFM%AEbVpxD28NCO z+*ARs=V?9$n6T99sWk5xm zo-U3d65+`|`gtTg9vM0v{Qp0pRzPk7qao|5#!n3~8#FS_6y`Lq;%7MUWlF#3Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A>(%#LCoCLEFI4z+ldYw-rEr>?NMQuIx9NB?Kh-yvvSu0EIXU zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%Lglo-U3d6}NIP82T|g@~{S|&zdCS zu_dNi`a(c(U_ju7C66RJq7@Vsv-})R$_j{j-B^+^@y6Euxo=nmF7|Bgo&T>Y#ed!V z=`LR^f2`WRZu`~t()Xt~KRztwec|fMgKsaV>_2`_YO|!%>=_qlx4-+(a4UrQz1;lT z?R|cFvn-b0t%~glxhl4t;opfKwsVrcI!q_;HOHJ~zm_pOLV@XQTyIFN2!C!;=XMJd zyB#z7_jGRCutIC|ah?M%ovQbLO4D{H?=?Pol;GCnVx*>@_?*9@MnelF{r5}E*8VV&6k literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/HTabGroup.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/HTabGroup.png new file mode 100644 index 0000000000000000000000000000000000000000..4c50d26d30e92554e22a917221b2dfb25b337b02 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp@K+MO%1SG3v8C!vrPKj$oiE~kEVo7Fxopb%$) zM`SSr12<5bTZr+}-MT+OL6&q!Uq=Rpjs4tz5?O)#y`CXf8orD$p;?kZH0{JUuP{yElj=9_hMESx&QWQ)|K zBRp=07gWitzkPL%Bp3H)q3Q@@FmclXTspFJ`c1!?(T0b;*^Bdm?kzBm@Y4 w-Q>~!Cd2K_kKGSt)4NUo1bzKKef=+n-K)}-PDva50D6SM)78&qol`;+0M?O!p8x;= literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/Locked.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/Locked.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f6ced2df26aa988dd3087712d62e9168c4351d GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJx0U~c5>$3n-Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A3Jr+{)NoLEFI4z#y|OdL>XFdx@v7EBj4m2|fdbqj5K{0fjgV zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%LgLo-U3d6}M#jbomY$Fto;>6qzP( z&Y~#6)7LY9^&6hu2Ta;M@ppmi?D0cO7$zBdEetd$<=xK z=Mv4O2A^#B%j!K2>}Yxa+lr&<*1FeOhjmsqYIG&=yB$$EWN@Wz;#IqA=PlTiHCqG% zyc$zwu4xNK^jQB8d&|WXspnYk9x>;+=#>xCr7g~}tj*(p^S43OrO`syaPHZK(!O`{ s!>8ecOsb+Okyp0=FX~R)=lZi#66g;GPgg&ebxsLQ07P4TjsO4v literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinAutoHide.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinAutoHide.png new file mode 100644 index 0000000000000000000000000000000000000000..abefd96b6326caccd207c855c1a1edd44a792946 GIT binary patch literal 1229 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2f=age(c!@6@aFM%AEbVpxD28NCO z+*ARs=V?9$n6T99sWk5x$ zo-U3d65+`|`gtS_Dtic1@AG%v1tOZJw@v JF6*2UngG~nH}?Pl literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinClose.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinClose.png new file mode 100644 index 0000000000000000000000000000000000000000..132bdfafca809ea30c965ef59fb94a67ee90f9eb GIT binary patch literal 1243 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2f=age(c!@6@aFM%AEbVpxD28NCO z+*ARs=V?9$n6T99sWk5y7 zo-U3d65+`|`gtTSRQB{F2nw)HVlF<&5}`VQHIU)ragNa5*7ik0M@3Ae1^5mWa8J6; YP@3H}<$GH4BT(A&boFyt=akR{00f{s=>Px# literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinDocMenu.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinDocMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..b6be30f66bbc17f0b1fcf6a5da031e1f65e9fbc3 GIT binary patch literal 1237 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2f=age(c!@6@aFM%AEbVpxD28NCO z+*ARs=V?9$n6T99sWk5x` zo-U3d65+`|`gtTcK1eKl@V|b7SBRXG_A<>3Eyb7xY#m-2?5CKE4lep}hl#=RM$3Y4 SC(f+}r8-YnKbLh*2~7a$KRqu1 literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinMenu.png b/src/Libraries/AvalonDock/AvalonDock.Themes/Images/dev2010/PinMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..653373ce5ca725fa65fbea28949570e977c86f70 GIT binary patch literal 1233 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uGBwbBK{D2f=age(c!@6@aFM%AEbVpxD28NCO z+*ARs=V?9$n6T99sWk5xm zo-U3d65+`|`gtTg9vM0v{Qp0pRzPk7qao|5#!n3~8#FS_6y`Lq;%7MUWlF#3Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A>(%#LCoCLEFI4z+ldYw-rEr>?NMQuIx9NB?Kh-yvvSu0EIXU zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%Lglo-U3d6}NIP82T|g@~{S|&zdCS zu_dNi`a(c(U_ju7C66RJq7@Vsv-})R$_j{j-B^+^@y6Euxo=nmF7|Bgo&T>Y#ed!V z=`LR^f2`WRZu`~t()Xt~KRztwec|fMgKsaV>_2`_YO|!%>=_qlx4-+(a4UrQz1;lT z?R|cFvn-b0t%~glxhl4t;opfKwsVrcI!q_;HOHJ~zm_pOLV@XQTyIFN2!C!;=XMJd zyB#z7_jGRCutIC|ah?M%ovQbLO4D{H?=?Pol;GCnVx*>@_?*9@MnelF{r5}E*8VV&6k literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/AssemblyInfo.cs b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..b3c1476e11 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AvalonDock.Themes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AvalonDock.Themes")] +[assembly: AssemblyCopyright("Copyright © Adolfo Marinucci 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..b1b282a8cf --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AvalonDock.Themes.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AvalonDock.Themes.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.resx b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.resx new file mode 100644 index 0000000000..af7dbebbac --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs new file mode 100644 index 0000000000..57f26aa8b7 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AvalonDock.Themes.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.settings b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.settings new file mode 100644 index 0000000000..033d7a5e9e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml new file mode 100644 index 0000000000..0bef6aafde --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/ExpressionDark.xaml @@ -0,0 +1,960 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml new file mode 100644 index 0000000000..1e1751be84 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.Themes/Themes/dev2010.xaml @@ -0,0 +1,1332 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Libraries/AvalonDock/AvalonDock.url b/src/Libraries/AvalonDock/AvalonDock.url new file mode 100644 index 0000000000..e7270f30c5 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,2 +[InternetShortcut] +URL=http://avalondock.codeplex.com/ +IDList= diff --git a/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs b/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs new file mode 100644 index 0000000000..ecafc7182f --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/AlignedImage.cs @@ -0,0 +1,187 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Controls; +using System.Windows; +using System.Windows.Media; + +namespace AvalonDock +{ + public class AlignedImage : Decorator + { + public AlignedImage() + { + this.LayoutUpdated += new EventHandler(OnLayoutUpdated); + } + + protected override System.Windows.Size MeasureOverride(Size constraint) + { + Size desideredSize = new Size(); + + if (Child != null) + { + Child.Measure(constraint); + + PresentationSource ps = PresentationSource.FromVisual(this); + if (ps != null) + { + Matrix fromDevice = ps.CompositionTarget.TransformFromDevice; + + Vector pixelSize = new Vector(Child.DesiredSize.Width, Child.DesiredSize.Height); + Vector measureSizeV = fromDevice.Transform(pixelSize); + desideredSize = new Size(measureSizeV.X, measureSizeV.Y); + } + } + + return desideredSize; + } + + protected override Size ArrangeOverride(Size arrangeBounds) + { + Size finalSize = new Size(); + + if (Child != null) + { + _pixelOffset = GetPixelOffset(); + Child.Arrange(new Rect(_pixelOffset, Child.DesiredSize)); + finalSize = arrangeBounds; + } + + return finalSize; + } + + private Point _pixelOffset; + + private void OnLayoutUpdated(object sender, EventArgs e) + { + // This event just means that layout happened somewhere. However, this is + // what we need since layout anywhere could affect our pixel positioning. + Point pixelOffset = GetPixelOffset(); + if (!AreClose(pixelOffset, _pixelOffset)) + { + InvalidateArrange(); + } + } + + // Gets the matrix that will convert a point from "above" the + // coordinate space of a visual into the the coordinate space + // "below" the visual. + private Matrix GetVisualTransform(Visual v) + { + if (v != null) + { + Matrix m = Matrix.Identity; + + Transform transform = VisualTreeHelper.GetTransform(v); + if (transform != null) + { + Matrix cm = transform.Value; + m = Matrix.Multiply(m, cm); + } + + Vector offset = VisualTreeHelper.GetOffset(v); + m.Translate(offset.X, offset.Y); + + return m; + } + + return Matrix.Identity; + } + + private Point TryApplyVisualTransform(Point point, Visual v, bool inverse, bool throwOnError, out bool success) + { + success = true; + if (v != null) + { + Matrix visualTransform = GetVisualTransform(v); + if (inverse) + { + if (!throwOnError && !visualTransform.HasInverse) + { + success = false; + return new Point(0, 0); + } + visualTransform.Invert(); + } + point = visualTransform.Transform(point); + } + return point; + } + + private Point ApplyVisualTransform(Point point, Visual v, bool inverse) + { + bool success = true; + return TryApplyVisualTransform(point, v, inverse, true, out success); + } + + private Point GetPixelOffset() + { + Point pixelOffset = new Point(); + + PresentationSource ps = PresentationSource.FromVisual(this); + if (ps != null) + { + Visual rootVisual = ps.RootVisual; + + // Transform (0,0) from this element up to pixels. + pixelOffset = this.TransformToAncestor(rootVisual).Transform(pixelOffset); + pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, false); + pixelOffset = ps.CompositionTarget.TransformToDevice.Transform(pixelOffset); + + // Round the origin to the nearest whole pixel. + pixelOffset.X = Math.Round(pixelOffset.X); + pixelOffset.Y = Math.Round(pixelOffset.Y); + + // Transform the whole-pixel back to this element. + pixelOffset = ps.CompositionTarget.TransformFromDevice.Transform(pixelOffset); + pixelOffset = ApplyVisualTransform(pixelOffset, rootVisual, true); + pixelOffset = rootVisual.TransformToDescendant(this).Transform(pixelOffset); + } + + return pixelOffset; + } + + private bool AreClose(Point point1, Point point2) + { + return AreClose(point1.X, point2.X) && AreClose(point1.Y, point2.Y); + } + + private bool AreClose(double value1, double value2) + { + if (value1 == value2) + { + return true; + } + double delta = value1 - value2; + return ((delta < 1.53E-06) && (delta > -1.53E-06)); + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj new file mode 100644 index 0000000000..463c98c348 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.csproj @@ -0,0 +1,261 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {87E61430-4243-45F2-B74E-0A4C096CEBF3} + Library + Properties + AvalonDock + AvalonDock + v4.0 + Client + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + False + File + ..\..\..\..\bin\ + False + False + false + + + true + Full + false + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + TRACE + prompt + 4 + + + true + + + AvalonDock.snk + + + False + + + False + Auto + 4194304 + AnyCPU + + + + + + + + + + + 4.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + + + + + + MSBuild:Compile + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDock.snk b/src/Libraries/AvalonDock/AvalonDock/AvalonDock.snk new file mode 100644 index 0000000000000000000000000000000000000000..41474c43ec736c0c85e7aa8444bc52e9798e19b1 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50097{c@UKJS|QT+U99gfWom!k3-wjeYN16) zQ3$`qu1YajjXV5uf$z=A9@yFUMj1Wv!vD zYO8KmM(0G{oF=kutBwmym=+xvqa;P8RzIYAfSjj*hRH^>inQm|h=SP>zf&v9NL#Y; zV&fZ1vCt;94ONgunvOCB2=LbT4!_!dr4?ZarP&^e2o`bt4YR< z)!Lof|I?49f4dNSvCY2vT@%ymI4ae_zckw)7}(&6zzuKJ(1u%Tj7)mCdPqNFoD*P} zk{Ux%>HUI3ua_nS_nbg6am=iu1iHBzJZ6BbT_eaLVh_B9Tk2Q>6a}h9ZFwDmW%W#cGfYH+Xzz40{|afjJ|N)&@DPb45wiDFg$_1yha;5 zS*o>Jhzn!<|EtkQZ1M27jNtm6j;M56;~)H82Vz>fD7r i5BQ(A-6}ibT>C>%aiP}sg4H=Myl(kz>uWG*uTDBq)FpiY literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDockBrushes.cs b/src/Libraries/AvalonDock/AvalonDock/AvalonDockBrushes.cs new file mode 100644 index 0000000000..34d7c98e4d --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/AvalonDockBrushes.cs @@ -0,0 +1,148 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AvalonDock +{ + /// + /// Defines a list of brushes used by AvalonDock templates + /// + public enum AvalonDockBrushes + { + /// + /// Default brush for DockingManager background + /// + DefaultBackgroundBrush, + + /// + /// Brush used for the title background of a . + /// + DockablePaneTitleBackground, + + /// + /// Brush used for the title background of a when is focused. + /// + DockablePaneTitleBackgroundSelected, + + /// + /// Brush used for the title foreground of a . + /// + DockablePaneTitleForeground, + + /// + /// Brush used for the title foreground of a when is focused. + /// + DockablePaneTitleForegroundSelected, + + /// + /// Brush used for the background of the pane command pins. + /// + PaneHeaderCommandBackground, + + /// + /// Brush used for the border of the pane command pins. + /// + PaneHeaderCommandBorderBrush, + + /// + /// Brush used for the background of a document header. + /// + DocumentHeaderBackground, + + /// + /// Brush used for the foreground of a document header. + /// + DocumentHeaderForeground, + + /// + /// Brush used for fonts while a document header is selected but not activated + /// + DocumentHeaderForegroundSelected, + + /// + /// Brush used for fonts while a document header is selected and activated + /// + DocumentHeaderForegroundSelectedActivated, + + /// + /// Brush used for the background of a document header when selected (). + /// + DocumentHeaderBackgroundSelected, + + /// + /// Brush used for the background of a document header when active and selected (). + /// + DocumentHeaderBackgroundSelectedActivated, + + /// + /// Brush used for the background of a document header when mouse is over it. + /// + DocumentHeaderBackgroundMouseOver, + + /// + /// Brush used for the border brush of a document header when mouse is over it (but is not selected). + /// + DocumentHeaderBorderBrushMouseOver, + + /// + /// Brush for the document header border + /// + DocumentHeaderBorder, + + /// + /// Brush for the document header border when contains a document selected + /// + DocumentHeaderBorderSelected, + + /// + /// Brush for the document header border when contains a document selected and activated + /// + DocumentHeaderBorderSelectedActivated, + + + + NavigatorWindowTopBackground, + + NavigatorWindowTitleForeground, + + NavigatorWindowDocumentTypeForeground, + + NavigatorWindowInfoTipForeground, + + NavigatorWindowForeground, + + NavigatorWindowBackground, + + NavigatorWindowSelectionBackground, + + NavigatorWindowSelectionBorderbrush, + + NavigatorWindowBottomBackground, + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/AvalonDockWindow.cs b/src/Libraries/AvalonDock/AvalonDock/AvalonDockWindow.cs new file mode 100644 index 0000000000..cf5fc169d5 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/AvalonDockWindow.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; + +namespace AvalonDock +{ + public class AvalonDockWindow : Window + { + static AvalonDockWindow() + { + ShowInTaskbarProperty.OverrideMetadata(typeof(AvalonDockWindow), new FrameworkPropertyMetadata(false)); + + } + + internal AvalonDockWindow() + { } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ContextMenuElement.cs b/src/Libraries/AvalonDock/AvalonDock/ContextMenuElement.cs new file mode 100644 index 0000000000..d607886ddc --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ContextMenuElement.cs @@ -0,0 +1,58 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace AvalonDock +{ + /// + /// Defines a list of context menu resources + /// + public enum ContextMenuElement + { + /// + /// Context menu related to a + /// + DockablePane, + + /// + /// Context menu related to a + /// + DocumentPane, + + /// + /// Context menu related to a + /// + DockableFloatingWindow, + + /// + /// Context menu related to a + /// + DocumentFloatingWindow + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Converters.cs b/src/Libraries/AvalonDock/AvalonDock/Converters.cs new file mode 100644 index 0000000000..feae586935 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Converters.cs @@ -0,0 +1,167 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Data; +using System.IO; +using System.Reflection; +using System.Windows.Media; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media.Imaging; + +namespace AvalonDock +{ + //public class FindResourcePathConverter : IValueConverter + //{ + // #region IValueConverter Members + + // public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + // { + // if (value == null) + // { + // return null; + // //return new Uri(@"DocumentHS.png", UriKind.Relative); + // } + + // return value; + // } + + // public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + // { + // throw new NotImplementedException(); + // } + + // #endregion + //} + + /// + /// Converter from boolean values to visibility (inverse mode) + /// + [ValueConversion(typeof(object), typeof(Visibility))] + public class BoolToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, + System.Globalization.CultureInfo culture) + { + return System.Convert.ToBoolean(value) ? Visibility.Visible : + (parameter != null && ((string)parameter) == "Hidden" ? Visibility.Hidden : Visibility.Collapsed); + } + + public object ConvertBack(object value, Type targetType, object parameter, + System.Globalization.CultureInfo culture) + { + return null; + } + } + + [ValueConversion(typeof(object), typeof(Image))] + public class ObjectToImageConverter : IValueConverter + { + + #region IValueConverter Members + + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + double width = 16.0; + if (parameter != null && + parameter is double) + width = (double)parameter; + + if (value is string) + { + Uri iconUri; + // try to resolve given value as an absolute URI + if (Uri.TryCreate(value as String, UriKind.RelativeOrAbsolute, out iconUri)) + { + var img = new BitmapImage(iconUri); + if (img != null) + { + return new Image() + { + UseLayoutRounding = true, + Width = width, + Source = img + }; + } + } + } + else if (value is BitmapImage) + { + var img = value as BitmapImage; + return new Image() + { + UseLayoutRounding = true, + Width = width, + Source = new BitmapImage(img.UriSource) + }; + + } + + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + + #endregion + } + + public static class Converters + { + static BoolToVisibilityConverter _BoolToVisibilityConverter = null; + + public static BoolToVisibilityConverter BoolToVisibilityConverter + { + get + { + if (_BoolToVisibilityConverter == null) + _BoolToVisibilityConverter = new BoolToVisibilityConverter(); + + + return _BoolToVisibilityConverter; + } + } + + static ObjectToImageConverter _ObjectToImageConverter = null; + + public static ObjectToImageConverter ObjectToImageConverter + { + get + { + if (_ObjectToImageConverter == null) + _ObjectToImageConverter = new ObjectToImageConverter(); + + + return _ObjectToImageConverter; + } + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DeserializationCallbackEventArgs.cs b/src/Libraries/AvalonDock/AvalonDock/DeserializationCallbackEventArgs.cs new file mode 100644 index 0000000000..8ebc85087f --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DeserializationCallbackEventArgs.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AvalonDock +{ + public class DeserializationCallbackEventArgs : EventArgs + { + public DeserializationCallbackEventArgs(string contentName) + { + Name = contentName; + } + + /// + /// Gets the name of the content to deserialize + /// + public string Name { get; protected set; } + + /// + /// Gets/Sets the content manually deserialized + /// + public ManagedContent Content { get; set; } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs b/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs new file mode 100644 index 0000000000..ecbec60d80 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockableContent.cs @@ -0,0 +1,954 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.Xml; +using System.ComponentModel; +using System.Linq; + +namespace AvalonDock +{ + /// + /// Enumerates all the possible states of + /// + public enum DockableContentState + { + /// + /// Content is not associated with any (Default State) + /// + None, + + /// + /// Content is docked to a border of a within as control + /// + Docked, + + /// + /// Content is hosted by a flyout window and is visible only when user move mouse over an anchor thumb located to a controlo border + /// + AutoHide, + + /// + /// Content is hosted by a floating window and user can redock is on its container control + /// + DockableWindow, + + /// + /// Content is hosted by a floating window that can't be docked to a its container control + /// + FloatingWindow, + + /// + /// Content is hosted into a + /// + Document, + + /// + /// Content is hidden + /// + Hidden, + } + + + /// + /// Defines how a dockable content can be dragged over a docking manager + /// + /// This style can be composed with the 'or' operator. + public enum DockableStyle : uint + { + /// + /// Content is not dockable at all + /// + None = 0x0000, + + /// + /// Dockable as document + /// + Document = 0x0001, + + /// + /// Dockable to the left border of + /// + LeftBorder = 0x0002, + + /// + /// Dockable to the right border of + /// + RightBorder = 0x0004, + + /// + /// Dockable to the top border of + /// + TopBorder = 0x0008, + + /// + /// Dockable to the bottom border of + /// + BottomBorder= 0x0010, + + /// + /// A with this style can be hosted in a + /// + Floating = 0x0020, + + /// + /// A with this style can be the only one content in a pane (NOT YET SUPPORTED) + /// + /// This style is not compatible with style + Single = 0x0040, + + /// + /// A with this style can be autohidden. + /// + AutoHide = 0x0080, + + /// + /// Dockable only to a border of a + /// + DockableToBorders = LeftBorder | RightBorder | TopBorder | BottomBorder | AutoHide, + + /// + /// Dockable to a border of a and into a + /// + Dockable = DockableToBorders | Document | Floating, + + /// + /// Dockable to a border of a and into a but not in autohidden mode (WinForms controls) + /// + DockableButNotAutoHidden = Dockable & ~AutoHide + } + + + /// + /// Represent a state of a dockable content that can be used to restore it after it's hidden + /// + internal class DockableContentStateAndPosition + { + public readonly Pane ContainerPane = null; + public readonly Guid ContainerPaneID; + public readonly int ChildIndex = -1; + public readonly double Width; + public readonly double Height; + public readonly DockableContentState State; + public readonly AnchorStyle Anchor = AnchorStyle.None; + + public DockableContentStateAndPosition( + Pane containerPane, + int childIndex, + double width, + double height, + AnchorStyle anchor, + DockableContentState state) + { + ContainerPane = containerPane; + ChildIndex = childIndex; + Width = Math.Max(width, 100.0); + Height = Math.Max(height, 100.0); + Anchor = anchor; + State = state; + } + + public DockableContentStateAndPosition( + Guid containerPaneID, + int childIndex, + double width, + double height, + AnchorStyle anchor, + DockableContentState state) + { + ContainerPaneID = containerPaneID; + ChildIndex = childIndex; + Width = Math.Max(width, 100.0); + Height = Math.Max(height, 100.0); + Anchor = anchor; + State = state; + } + + public DockableContentStateAndPosition( + DockableContent cntToSave) + { + ContainerPane = cntToSave.ContainerPane; + ChildIndex = ContainerPane.Items.IndexOf(cntToSave); + Width = Math.Max(ContainerPane.ActualWidth, 100.0); + Height = Math.Max(ContainerPane.ActualHeight, 100.0); + State = cntToSave.State; + + DockablePane dockablePane = ContainerPane as DockablePane; + if (dockablePane != null) + { + Anchor = dockablePane.Anchor; + } + } + } + + /// + /// Identifies a content that can be drag over a control or hosted by a window floating over it (). + /// + public class DockableContent : ManagedContent + { + static DockableContent() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockableContent), new FrameworkPropertyMetadata(typeof(DockableContent))); + } + + public DockableContent() + { + } + + protected override void OnContentLoaded() + { + //now the logical tree is up + DockingManager manager = GetParentManager(null); + + //if can't find the manager there is a problem + //if (manager == null) + // throw new InvalidOperationException("Unable to find DockingManager object in the logical tree"); + //if (manager != null) + // manager.DockableContents.Add(this); + + base.OnContentLoaded(); + } + + protected override void OnContentUnloaded() + { + //if (Manager != null && !Manager.HiddenContents.Contains(this)) + // Manager.DockableContents.Remove(this); + + base.OnContentUnloaded(); + } + + SizeToContent _floatingWindowSizeToContent = SizeToContent.Manual; + + /// + /// Gets or sets a value indicating if this dockable content should change the size of a FloatingWindow when undocked + /// + public SizeToContent FloatingWindowSizeToContent + { + get { return _floatingWindowSizeToContent; } + set + { + _floatingWindowSizeToContent = value; + RaisePropertyChanged("FloatingWindowSizeToContent"); + } + } + + #region Drag content + protected override void OnDragMouseMove(object sender, MouseEventArgs e) + { + base.OnDragMouseMove(sender, e); + } + + protected override void OnDragStart(Point ptMouse, Point ptRelativeMouse) + { + if (DockableStyle != DockableStyle.None && + (State == DockableContentState.Docked || State == DockableContentState.Document || State == DockableContentState.DockableWindow) && + !Manager.DragPaneServices.IsDragging) + { + Manager.Drag(this, HelperFunc.PointToScreenWithoutFlowDirection(this, ptMouse), ptRelativeMouse); + } + + base.OnDragStart(ptMouse, ptRelativeMouse); + } + + #endregion + + #region State Properties & Events + + #region StateChanged + + /// + /// StateChanged Routed Event + /// + public static readonly RoutedEvent StateChangedEvent = EventManager.RegisterRoutedEvent("StateChanged", + RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(DockableContent)); + + /// + /// Occurs when State property changes + /// + public event RoutedEventHandler StateChanged + { + add { AddHandler(StateChangedEvent, value); } + remove { RemoveHandler(StateChangedEvent, value); } + } + + /// + /// A helper method to raise the StateChanged event. + /// + protected RoutedEventArgs RaiseStateChangedEvent() + { + return RaiseStateChangedEvent(this); + } + + /// + /// A static helper method to raise the StateChanged event on a target element. + /// + /// UIElement or ContentElement on which to raise the event + static RoutedEventArgs RaiseStateChangedEvent(DependencyObject target) + { + if (target == null) return null; + + RoutedEventArgs args = new RoutedEventArgs(); + args.RoutedEvent = StateChangedEvent; + RoutedEventHelper.RaiseEvent(target, args); + return args; + } + + #endregion + + /// + /// Gets the state of + /// + public DockableContentState State + { + get { return (DockableContentState)GetValue(StatePropertyKey.DependencyProperty); } + protected set { SetValue(StatePropertyKey, value); } + } + + // Using a DependencyProperty as the backing store for State. This enables animation, styling, binding, etc... + public static readonly DependencyPropertyKey StatePropertyKey = + DependencyProperty.RegisterReadOnly("State", + typeof(DockableContentState), + typeof(DockableContent), + new FrameworkPropertyMetadata( + DockableContentState.None, + new PropertyChangedCallback( + (s, e) => + { + ((DockableContent)s).OnStateChanged((DockableContentState)e.OldValue, (DockableContentState)e.NewValue); + } + ))); + + protected virtual void OnStateChanged(DockableContentState oldState, DockableContentState newState) + { + RaiseStateChangedEvent(this); + + if (ContainerPane is DockablePane) + ((DockablePane)ContainerPane).UpdateCanAutohideProperty(); + } + + public static readonly DependencyProperty StateProperty = + StatePropertyKey.DependencyProperty; + + #region DockableStyle + + /// + /// DockableStyle Dependency Property + /// + public static readonly DependencyProperty DockableStyleProperty = + DependencyProperty.Register("DockableStyle", typeof(DockableStyle), typeof(DockableContent), + new FrameworkPropertyMetadata(DockableStyle.Dockable)); + + /// + /// Get or sets a value that indicates how a dockable content can be dragged over and docked to a + /// + public DockableStyle DockableStyle + { + get { return (DockableStyle)GetValue(DockableStyleProperty); } + set { SetValue(DockableStyleProperty, value); } + } + + #endregion + + + + + protected override void OnVisualParentChanged(DependencyObject oldParent) + { + + base.OnVisualParentChanged(oldParent); + + //if (oldParent == null && State == DockableContentState.None) + //{ + // if (Parent is FloatingDockablePane) + // { + // throw new InvalidOperationException(); + // } + + // SetStateToDock(); + //} + + } + + + #endregion + + #region StateMachine + + internal void SetStateToAutoHide() + { + State = DockableContentState.AutoHide; + } + + internal void SetStateToDock() + { + State = DockableContentState.Docked; + } + + internal void SetStateToDockableWindow() + { + if (State == DockableContentState.DockableWindow) + return; + + Debug.Assert( + State == DockableContentState.None || + State == DockableContentState.Document || + State == DockableContentState.Docked || + State == DockableContentState.FloatingWindow || + State == DockableContentState.Hidden); + + State = DockableContentState.DockableWindow; + } + + internal void SetStateToFloatingWindow() + { + if (State == DockableContentState.FloatingWindow) + return; + + Debug.Assert( + State == DockableContentState.Document || + State == DockableContentState.Docked || + State == DockableContentState.DockableWindow); + + State = DockableContentState.FloatingWindow; + } + + internal void SetStateToHidden() + { + State = DockableContentState.Hidden; + } + + internal void SetStateToDocument() + { + State = DockableContentState.Document; + } + #endregion + + #region HideOnClose + public static DependencyProperty HideOnCloseKey = DependencyProperty.Register("HideOnClose", typeof(bool), typeof(DockableContent), new PropertyMetadata(true)); + + public bool HideOnClose + { + get { return (bool)GetValue(HideOnCloseKey); } + set { SetValue(HideOnCloseKey, value); } + } + #endregion + + //#region OnIsActiveContentChanged (flyout windows) + //protected override void OnIsActiveContentChanged(DependencyPropertyChangedEventArgs e) + //{ + // if (State == DockableContentState.AutoHide) + // Manager.ShowFlyoutWindow(this, null); + + // base.OnIsActiveContentChanged(e); + //} + //#endregion + + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + this.CommandBindings.Add( + new CommandBinding(DockableContentCommands.FloatingWindow, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DockableContentCommands.DockableFloatingWindow, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Show, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DockableContentCommands.ShowAsDocument, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DockableContentCommands.ToggleAutoHide, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Hide, this.OnExecuteCommand, this.OnCanExecuteCommand)); + } + + #region Commands + + void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (!e.Handled && + e.Command == DockableContentCommands.ToggleAutoHide) + { + ToggleAutoHide(); + + e.Handled = true; + } + else if (!e.Handled && e.Command == DockableContentCommands.FloatingWindow) + { + ShowAsFloatingWindow(false); + + e.Handled = true; + } + else if (!e.Handled && e.Command == DockableContentCommands.DockableFloatingWindow) + { + ShowAsFloatingWindow(true); + + e.Handled = true; + } + else if (!e.Handled && e.Command == DockableContentCommands.ShowAsDocument) + { + ShowAsDocument(); + e.Handled = true; + } + } + + void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = CanExecuteCommand(e.Command); + } + + /// + /// Show as docked pane + /// + public override void Show() + { + Show(Manager); + } + + /// + /// Show as docked pane within provided + /// + public override void Show(DockingManager manager) + { + if (SavedStateAndPosition != null && State == DockableContentState.Hidden) + Show(manager, SavedStateAndPosition.Anchor); + else + Show(manager, AnchorStyle.None); + } + + /// + /// Show as docked pane + /// + /// Desidered anchor position + public void Show(AnchorStyle desideredAnchor) + { + Show(Manager, desideredAnchor); + } + + /// + /// Show as docked pane + /// + public void Show(DockingManager manager, AnchorStyle desideredAnchor) + { + if (Manager != null && Manager != manager) + throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); + + if (manager == null && !CanExecuteCommand(ManagedContentCommands.Show)) + throw new InvalidOperationException("This operation can be executed in this state"); + + if (State == DockableContentState.Docked) + { + //if already shown as docked content just activate it + Activate(); + } + else + { + if (SavedStateAndPosition != null && State == DockableContentState.Hidden) + manager.Show(this, SavedStateAndPosition.State, desideredAnchor); + else + manager.Show(this, DockableContentState.Docked, desideredAnchor); + } + } + + /// + /// Show as as a tabbed document + /// + public void ShowAsDocument() + { + ShowAsDocument(Manager); + } + + /// + /// Show as as a tabbed document under the provided + /// + public void ShowAsDocument(DockingManager manager) + { + if (Manager != null && Manager != manager) + throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); + + //Manager = manager; + + if (manager == null && !CanExecuteCommand(DockableContentCommands.ShowAsDocument)) + throw new InvalidOperationException("This operation can be executed in this state"); + + manager.Show(this, DockableContentState.Document); + } + + /// + /// Show the content as floating window inside the provided + /// + /// True if the resulting floating window can the be re-docked to the docking manager. + public void ShowAsFloatingWindow(bool dockableWindow) + { + ShowAsFloatingWindow(Manager, dockableWindow); + } + + /// + /// Show the content ad floating window + /// + /// True if the resulting floating window can the be re-docked to the docking manager. + public void ShowAsFloatingWindow(DockingManager manager, bool dockableWindow) + { + if (Manager != null && Manager != manager) + throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); + + //Manager = manager; + + if (manager == null) + { + if (dockableWindow && + !CanExecuteCommand(DockableContentCommands.DockableFloatingWindow)) + throw new InvalidOperationException("This operation can be executed in this state"); + if (!dockableWindow && + !CanExecuteCommand(DockableContentCommands.FloatingWindow)) + throw new InvalidOperationException("This operation can be executed in this state"); + } + + manager.Show(this, dockableWindow ? DockableContentState.DockableWindow : DockableContentState.FloatingWindow); + } + + + /// + /// Hides this content + /// + public override bool Hide() + { + if (!CanExecuteCommand(ManagedContentCommands.Hide)) + return false; + + Manager.Hide(this); + return true; + } + + /// + /// Close content + /// + public override bool Close() + { + return CloseOrHide(); + } + + /// + /// Close content + /// + /// If true forces the content closing regardless of the property. + public bool Close(bool forceClose) + { + return CloseOrHide(true); + } + + /// + /// Closes or hides provided content depending on HideOnClose property + /// + internal virtual bool CloseOrHide() + { + return CloseOrHide(false); + } + + /// + /// Closes or hides content depending on HideOnClose property + /// + internal virtual bool CloseOrHide(bool force) + { + if (!force && + !IsCloseable) + return false; + + if (HideOnClose) + { + Hide(); + return true; + } + else + { + if (!CanExecuteCommand(ManagedContentCommands.Close)) + throw new InvalidOperationException("This operation can be executed in this state"); + + CancelEventArgs e = new CancelEventArgs(false); + OnClosing(e); + + if (e.Cancel) + return false; + + DockingManager oldManager = Manager; + + if (e.Cancel) + return false; + + ((DockablePane)ContainerPane).RemoveContent( + ContainerPane.Items.IndexOf(this)); + + OnClosed(); + return true; + } + } + + /// + /// Slides out this content to a border of the containing docking manager + /// + public void ToggleAutoHide() + { + if (!CanExecuteCommand(DockableContentCommands.ToggleAutoHide)) + throw new InvalidOperationException("This operation can be executed in this state"); + + (ContainerPane as DockablePane).ToggleAutoHide(); + } + + public override void Activate() + { + if (State == DockableContentState.AutoHide) + { + if (Manager != null && this.IsLoaded) + { + Manager.ShowFlyoutWindow(this, null); + } + } + else if (State == DockableContentState.Document) + { + if (!DocumentTabPanel.GetIsHeaderVisible(this)) + { + DocumentPane parentPane = this.ContainerPane as DocumentPane; + if (parentPane != null && + parentPane.GetManager() != null && + parentPane.Items.IndexOf(this) != 0) + { + parentPane.Items.Remove(this); + parentPane.Items.Insert(0, this); + parentPane.SelectedIndex = 0; + } + } + } + base.Activate(); + } + + /// + /// Retrive a value indicating if the command can be executed based to the dockable content state + /// + /// + /// + protected override bool CanExecuteCommand(ICommand command) + { + //if (State == DockableContentState.None) + // return false; + + if (command == ManagedContentCommands.Hide) + { + if (State == DockableContentState.Hidden) + { + return false; + } + } + else if (command == DockableContentCommands.ShowAsDocument) + { + if (State == DockableContentState.Document) + { + return false; + } + } + else if (command == DockableContentCommands.FloatingWindow) + { + if (State == DockableContentState.FloatingWindow || + State == DockableContentState.DockableWindow) + { + return false; + } + } + else if (command == DockableContentCommands.ToggleAutoHide) + { + if (State == DockableContentState.AutoHide || + State == DockableContentState.Document || + State == DockableContentState.FloatingWindow || + State == DockableContentState.DockableWindow) + { + return false; + } + } + else if (command == DockableContentCommands.ShowAsDocument) + { + if (State == DockableContentState.Document) + { + return false; + } + } + else if (command == DockableContentCommands.DockableFloatingWindow) + { + if (State == DockableContentState.FloatingWindow || + State == DockableContentState.DockableWindow) + { + return false; + } + } + else if (command == ManagedContentCommands.Show) + { + if (State == DockableContentState.Docked) + { + return false; + } + } + + return base.CanExecuteCommand(command); + } + #endregion + + #region Operations on content + + + + + DockableContentStateAndPosition _savedStateAndPosition = null; + + internal DockableContentStateAndPosition SavedStateAndPosition + { + get { return _savedStateAndPosition; } + set { _savedStateAndPosition = value; } + } + + internal void SaveCurrentStateAndPosition() + { + SavedStateAndPosition = new DockableContentStateAndPosition( + this); + } + + /// + /// Reset internal state and position of the content + /// + /// After a is hidden AvalonDock save its state and position in order to + /// restore it correctly when user wants to reshow it calling function. Call this method + /// if you want to reset these data and provide your state and anchor style calling one of the overloads of the function + /// . + public void ResetSavedStateAndPosition() + { + SavedStateAndPosition = null; + } + + #endregion + + #region Save/Restore Content Layout + /// + /// Save content specific layout settings + /// + /// Backend store writer + /// Custom derived class can overloads this method to handle custom layout persistence. + public override void SaveLayout(XmlWriter storeWriter) + { + if (!FloatingWindowSize.IsEmpty) + { + storeWriter.WriteAttributeString( + "FloatingWindowSize", new SizeConverter().ConvertToInvariantString(FloatingWindowSize)); + } + + if (SavedStateAndPosition != null) + { + storeWriter.WriteAttributeString( + "ChildIndex", SavedStateAndPosition.ChildIndex.ToString()); + storeWriter.WriteAttributeString( + "Width", SavedStateAndPosition.Width.ToString()); + storeWriter.WriteAttributeString( + "Height", SavedStateAndPosition.Height.ToString()); + storeWriter.WriteAttributeString( + "Anchor", SavedStateAndPosition.Anchor.ToString()); + storeWriter.WriteAttributeString( + "State", SavedStateAndPosition.State.ToString()); + + if (SavedStateAndPosition.ContainerPane is DockablePane) + { + Guid idToSave = (SavedStateAndPosition.ContainerPane as DockablePane).ID; + storeWriter.WriteAttributeString( + "ContainerPaneID", idToSave.ToString()); + } + } + + } + + /// + /// Restore content specific layout settings + /// + /// Saved xml element containg content layout settings + /// Custom derived class must overload this method to restore custom layout settings previously saved trought . + public override void RestoreLayout(XmlElement contentElement) + { + if (contentElement.HasAttribute("FloatingWindowSize")) + FloatingWindowSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("FloatingWindowSize")); + + Size effectiveSize = new Size(0d, 0d); + if (contentElement.HasAttribute("EffectiveSize")) + { + // Store + effectiveSize = (Size)(new SizeConverter()).ConvertFromInvariantString(contentElement.GetAttribute("EffectiveSize")); + } + + ResizingPanel.SetEffectiveSize(this, effectiveSize); + + if (contentElement.HasAttribute("ChildIndex")) + { + Pane paneRef = null; + Guid containerPaneGuid = Guid.Empty; + if (contentElement.HasAttribute("ContainerPaneID")) + { + containerPaneGuid = Guid.Parse(contentElement.GetAttribute("ContainerPaneID")); + + if (Manager != null) + { + ILinqToTree itemFound = new LogicalTreeAdapter(Manager).Descendants().FirstOrDefault(el => el.Item is DockablePane && ((el.Item as DockablePane).ID == containerPaneGuid)); + paneRef = itemFound != null ? itemFound.Item as DockablePane : null; + } + } + + if (paneRef != null) + { + _savedStateAndPosition = new DockableContentStateAndPosition( + paneRef, + int.Parse(contentElement.GetAttribute("ChildIndex")), + double.Parse(contentElement.GetAttribute("Width")), + double.Parse(contentElement.GetAttribute("Height")), + (AnchorStyle)Enum.Parse(typeof(AnchorStyle), contentElement.GetAttribute("Anchor")), + (DockableContentState)Enum.Parse(typeof(DockableContentState), contentElement.GetAttribute("State"))); + } + else + { + _savedStateAndPosition = new DockableContentStateAndPosition( + containerPaneGuid, + int.Parse(contentElement.GetAttribute("ChildIndex")), + double.Parse(contentElement.GetAttribute("Width")), + double.Parse(contentElement.GetAttribute("Height")), + (AnchorStyle)Enum.Parse(typeof(AnchorStyle), contentElement.GetAttribute("Anchor")), + (DockableContentState)Enum.Parse(typeof(DockableContentState), contentElement.GetAttribute("State"))); + } + } + } + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableContentCommands.cs b/src/Libraries/AvalonDock/AvalonDock/DockableContentCommands.cs new file mode 100644 index 0000000000..5a0ae4fed6 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockableContentCommands.cs @@ -0,0 +1,128 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + /// + /// Defines commands that can be executed against a DockableContent + /// + public sealed class DockableContentCommands + { + static object syncRoot = new object(); + + private static RoutedUICommand documentCommand = null; + + /// + /// Shows the DockableContent as a tabbed document + /// + public static RoutedUICommand ShowAsDocument + { + get + { + lock (syncRoot) + { + if (null == documentCommand) + { + documentCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_ShowAsDocument, "Document", typeof(DockableContentCommands)); + } + } + return documentCommand; + } + } + + + private static RoutedUICommand floatingWindowCommand = null; + + /// + /// Shows the as a which overlays the + /// + /// A floating window can't be redocked to the docking manager. + public static RoutedUICommand FloatingWindow + { + get + { + lock (syncRoot) + { + if (null == floatingWindowCommand) + { + floatingWindowCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_FloatingWindow, "FloatingWindow", typeof(DockableContentCommands)); + } + } + return floatingWindowCommand; + } + } + + private static RoutedUICommand dockableWindowCommand = null; + + /// + /// Shows the as a which overlays the + /// + /// A floating window can't be redocked to the docking manager. + public static RoutedUICommand DockableFloatingWindow + { + get + { + lock (syncRoot) + { + if (null == dockableWindowCommand) + { + dockableWindowCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_DockableFloatingWindow, "DockableFloatingWindow", typeof(DockableContentCommands)); + } + } + return dockableWindowCommand; + } + } + + private static RoutedUICommand autoHideCommand = null; + + /// + /// Switch the state of a from to and viceversa + /// + /// This command has the same effect as applying command to container pane + public static RoutedUICommand ToggleAutoHide + { + get + { + lock (syncRoot) + { + if (null == autoHideCommand) + { + autoHideCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_ToggleAutoHide, "AutoHide", typeof(DockableContentCommands)); + } + } + return autoHideCommand; + } + } + + + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs new file mode 100644 index 0000000000..be1fc8fdd1 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindow.cs @@ -0,0 +1,303 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Markup; +using System.Diagnostics; +using System.Windows.Threading; +using System.Windows.Media.Animation; +using System.Windows.Interop; +using System.Linq; + +namespace AvalonDock +{ + public class DockableFloatingWindow : FloatingWindow + { + static DockableFloatingWindow() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockableFloatingWindow), new FrameworkPropertyMetadata(typeof(DockableFloatingWindow))); + + ContentControl.ContentProperty.OverrideMetadata(typeof(DockableFloatingWindow), + new FrameworkPropertyMetadata( + new PropertyChangedCallback(OnContentPropertyChanged), + new CoerceValueCallback(OnCoerceValueContentProperty))); + } + + //Pane _previousPane = null; + + //int _arrayIndexPreviousPane = -1; + + + internal DockableFloatingWindow(DockingManager manager) + : base(manager) + { + if (manager == null) + throw new ArgumentNullException("manager"); + } + + + //protected override void OnClosed(EventArgs e) + //{ + // base.OnClosed(e); + + // DockableContent[] cntsToClose = new DockableContent[HostedPane.Items.Count]; + // HostedPane.Items.CopyTo(cntsToClose, 0); + + // foreach (DockableContent cntToClose in cntsToClose) + // { + // //HostedPane.CloseOrHide(HostedPane.Items[0] as DockableContent, ForcedClosing); + // cntToClose.CloseOrHide(ForcedClosing); + // } + + // Manager.UnregisterFloatingWindow(this); + //} + + public override Pane ClonePane() + { + DockablePane paneToAnchor = new DockablePane(); + + ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height)); + + //if (HostedPane.Style != null) + // paneToAnchor.Style = HostedPane.Style; + + int selectedIndex = HostedPane.SelectedIndex; + + //transfer contents from hosted pane in the floating window and + //the new created dockable pane + while (HostedPane.Items.Count > 0) + { + paneToAnchor.Items.Add( + HostedPane.RemoveContent(0)); + } + + paneToAnchor.SelectedIndex = selectedIndex; + + return paneToAnchor; + } + + #region IsDockableWindow + + /// + /// IsDockableWindow Dependency Property + /// + public static readonly DependencyProperty IsDockableWindowProperty = + DependencyProperty.Register("IsDockableWindow", typeof(bool), typeof(DockableFloatingWindow), + new FrameworkPropertyMetadata(true, + new PropertyChangedCallback(OnIsDockableWindowChanged))); + + /// + /// Gets or sets the IsDockableWindow property. This dependency property + /// indicates that can be docked to . + /// + public bool IsDockableWindow + { + get { return (bool)GetValue(IsDockableWindowProperty); } + set { SetValue(IsDockableWindowProperty, value); } + } + + /// + /// Handles changes to the IsDockableWindow property. + /// + private static void OnIsDockableWindowChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((DockableFloatingWindow)d).OnIsDockableWindowChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the IsDockableWindow property. + /// + protected virtual void OnIsDockableWindowChanged(DependencyPropertyChangedEventArgs e) + { + if ((bool)e.NewValue) + { + foreach (DockableContent content in HostedPane.Items) + content.SetStateToDockableWindow(); + } + else + { + foreach (DockableContent content in HostedPane.Items) + content.SetStateToFloatingWindow(); + } + } + + #endregion + + #region Commands + + protected virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (e.Command == DockableFloatingWindowCommands.SetAsDockableWindow) + { + IsDockableWindow = true; + e.Handled = true; + } + else if (e.Command == DockableFloatingWindowCommands.SetAsFloatingWindow) + { + IsDockableWindow = false; + e.Handled = true; + } + } + + protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + if (e.Command == DockableFloatingWindowCommands.SetAsDockableWindow) + e.CanExecute = !IsDockableWindow; + else if (e.Command == DockableFloatingWindowCommands.SetAsFloatingWindow) + e.CanExecute = IsDockableWindow; + } + #endregion + + protected override void OnInitialized(EventArgs e) + { + this.CommandBindings.Add(new CommandBinding(DockableFloatingWindowCommands.SetAsDockableWindow, OnExecuteCommand, OnCanExecuteCommand)); + this.CommandBindings.Add(new CommandBinding(DockableFloatingWindowCommands.SetAsFloatingWindow, OnExecuteCommand, OnCanExecuteCommand)); + + base.OnInitialized(e); + } + + protected override bool OpenContextMenu(UIElement popupButton, Point ptMouse) + { + ContextMenu cxMenu = FindResource(new ComponentResourceKey(typeof(DockingManager), + ContextMenuElement.DockableFloatingWindow)) as ContextMenu; + if (cxMenu != null) + { + foreach (var menuItem in cxMenu.Items.OfType()) + menuItem.CommandTarget = HostedPane.SelectedItem as IInputElement; + + if (popupButton != null) + { + cxMenu.Placement = PlacementMode.Bottom; + cxMenu.PlacementTarget = popupButton; + } + else + { + cxMenu.Placement = PlacementMode.Bottom; + cxMenu.PlacementRectangle = new Rect(ptMouse, new Size(0, 0)); + } + cxMenu.IsOpen = true; + + return true; + } + + return base.OpenContextMenu(popupButton, ptMouse); + } + + protected override void FilterMessage(object sender, FilterMessageEventArgs e) + { + e.Handled = false; + + if (Manager == null) + return; + + switch (e.Msg) + { + case WM_NCLBUTTONDOWN: //Left button down on title -> start dragging over docking manager + if (IsDockableWindow && e.WParam.ToInt32() == HTCAPTION) + { + short x = (short)((e.LParam.ToInt32() & 0xFFFF)); + short y = (short)((e.LParam.ToInt32() >> 16)); + + Point clickPoint = this.TransformToDeviceDPI(new Point(x, y)); + Manager.Drag(this, clickPoint, new Point(clickPoint.X - Left, clickPoint.Y - Top)); + + e.Handled = true; + } + break; + case WM_NCLBUTTONDBLCLK: //Left Button Double Click -> dock to docking manager + if (IsDockableWindow && e.WParam.ToInt32() == HTCAPTION) + { + if (IsDockableWindow) + { + Dock(); + e.Handled = true; + } + } + break; + } + + + + base.FilterMessage(sender, e); + } + + static void OnContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + + } + + static object OnCoerceValueContentProperty(DependencyObject d, object baseValue) + { + DockableFloatingWindow fl = ((DockableFloatingWindow)d); + + if (fl.Content != null) + { + throw new InvalidOperationException("Content on floating windows can't be set more than one time."); + } + + if (!(baseValue is DockableContent) && + !(baseValue is DockablePane)) + { + throw new InvalidOperationException("Content must be of type DockableContent or DockablePane"); + } + + FloatingDockablePane paneToReturn = null; + + if (baseValue is DockableContent) + paneToReturn = new FloatingDockablePane(fl, baseValue as DockableContent); + else if (baseValue is DockablePane) + paneToReturn = new FloatingDockablePane(fl, baseValue as DockablePane); + + return paneToReturn; + } + + + public override void Dock() + { + var dockablePane = HostedPane as FloatingDockablePane; + + Debug.Assert(dockablePane != null); + + if (dockablePane != null) + dockablePane.Dock(); + + base.Dock(); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindowCommands.cs b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindowCommands.cs new file mode 100644 index 0000000000..858d9c6c48 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockableFloatingWindowCommands.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + /// + /// Encapsulates the + /// + public sealed class DockableFloatingWindowCommands + { + private static object syncRoot = new object(); + + private static RoutedUICommand dockableCommand = null; + public static RoutedUICommand SetAsDockableWindow + { + get + { + lock (syncRoot) + { + if (null == dockableCommand) + { + dockableCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_DockableFloatingWindow, "DockableWindow", typeof(DockableFloatingWindowCommands)); + } + } + return dockableCommand; + } + } + + private static RoutedUICommand floatingCommand = null; + public static RoutedUICommand SetAsFloatingWindow + { + get + { + lock (syncRoot) + { + if (null == floatingCommand) + { + floatingCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockableContentCommands_FloatingWindow, "FloatingWindow", typeof(DockableFloatingWindowCommands)); + } + } + return floatingCommand; + } + } + + //private static RoutedUICommand closeCommand = null; + //public static RoutedUICommand Close + //{ + // get + // { + // lock (syncRoot) + // { + // if (null == closeCommand) + // { + // closeCommand = new RoutedUICommand("Close", "Close", typeof(FloatingWindowCommands)); + // } + // } + // return closeCommand; + // } + //} + + //private static RoutedUICommand dockCommand = null; + //public static RoutedUICommand Dock + //{ + // get + // { + // lock (syncRoot) + // { + // if (null == dockCommand) + // { + // dockCommand = new RoutedUICommand("Dock", "Dock", typeof(FloatingWindowCommands)); + // } + // } + // return dockCommand; + // } + //} + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs b/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs new file mode 100644 index 0000000000..9f148670fb --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockablePane.cs @@ -0,0 +1,610 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.ComponentModel; +using System.Collections; +using System.Linq; + +namespace AvalonDock +{ + /// + /// Anchor types + /// + public enum AnchorStyle + { + /// + /// No anchor style, while content is hosted in a or a + /// + None, + /// + /// Top border anchor + /// + Top, + /// + /// Left border anchor + /// + Left, + /// + /// Bottom border anchor + /// + Bottom, + /// + /// Right border anchor + /// + Right + } + + + /// + /// Defines a pane that can contain contents of type + /// + /// Usually a is used to arrange a series of in TabControl like model. + /// A DockablePane can be redocked to a border of the parent , can be floated in an external window and can be autohidden. + /// When docked into a docking manager the property gives the border to which it's docked. + /// See to get commands that are supported by DockablePane objects. + /// + /// + public class DockablePane : Pane + { + static DockablePane() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePane), new FrameworkPropertyMetadata(typeof(DockablePane))); + } + + public DockablePane() + { + this.Loaded += new RoutedEventHandler(DockablePane_Loaded); + this.Unloaded += new RoutedEventHandler(DockablePane_Unloaded); + + KeyboardNavigation.SetTabNavigation(this, KeyboardNavigationMode.Cycle); + } + + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + this.CommandBindings.Add( + new CommandBinding(DockablePaneCommands.ToggleAutoHide, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DockablePaneCommands.Close, this.OnExecuteCommand, this.OnCanExecuteCommand)); + } + + protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (e.NewItems != null) + { + e.NewItems.Cast().ForEach(c => + { + if (c.State == DockableContentState.None) + c.SetStateToDock(); + }); + } + + UpdateCanAutohideProperty(); + base.OnItemsChanged(e); + } + + + void DockablePane_Loaded(object sender, RoutedEventArgs e) + { + + } + + void DockablePane_Unloaded(object sender, RoutedEventArgs e) + { + CloseOptionsMenu(); + } + + /// + /// This guid is saved with the dockable content so that can be restored in the case is + /// referenced by a dockable content + /// + internal Guid ID = Guid.NewGuid(); + + #region Dependency properties + + public bool ShowTabs + { + get { return (bool)GetValue(ShowTabsProperty); } + set { SetValue(ShowTabsProperty, value); } + } + + // Using a DependencyProperty as the backing store for ShowTabs. This enables animation, styling, binding, etc... + public static readonly DependencyProperty ShowTabsProperty = + DependencyProperty.Register("ShowTabs", typeof(bool), typeof(DockablePane), new UIPropertyMetadata(true)); + + + public AnchorStyle Anchor + { + get { return (AnchorStyle)GetValue(AnchorPropertyKey.DependencyProperty); } + internal set { SetValue(AnchorPropertyKey, value); } + } + + // Using a DependencyProperty as the backing store for Anchor. This enables animation, styling, binding, etc... + public static readonly DependencyPropertyKey AnchorPropertyKey = + DependencyProperty.RegisterAttachedReadOnly("Anchor", typeof(AnchorStyle), typeof(DockablePane), new UIPropertyMetadata(AnchorStyle.None)); + + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + if (_partHeader != null) + { + _partHeader.MouseDown += new MouseButtonEventHandler(OnHeaderMouseDown); + _partHeader.MouseMove += new MouseEventHandler(OnHeaderMouseMove); + _partHeader.MouseUp += new MouseButtonEventHandler(OnHeaderMouseUp); + _partHeader.MouseEnter += new MouseEventHandler(OnHeaderMouseEnter); + _partHeader.MouseLeave += new MouseEventHandler(OnHeaderMouseLeave); + + _partHeader.MouseRightButtonDown += (s, e) => + { + OpenOptionsMenu(null); e.Handled = true; + }; + } + + var optionsMenuPopupElement = GetTemplateChild("PART_ShowContextMenuButton") as Border; + + if (optionsMenuPopupElement != null) + { + optionsMenuPopupElement.MouseLeftButtonDown += (s, e) => { OpenOptionsMenu(s as UIElement); e.Handled = true; }; + } + + + } + + + #region CanAutohide + + /// + /// CanAutohide Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey CanAutohidePropertyKey + = DependencyProperty.RegisterReadOnly("CanAutohide", typeof(bool), typeof(DockablePane), + new FrameworkPropertyMetadata((bool)false)); + + public static readonly DependencyProperty CanAutohideProperty + = CanAutohidePropertyKey.DependencyProperty; + + /// + /// Gets the CanAutohide property. This dependency property + /// indicates if contents inside pane can be autohidden. + /// + public bool CanAutohide + { + get { return (bool)GetValue(CanAutohideProperty); } + } + + /// + /// Provides a secure method for setting the CanAutohide property. + /// This dependency property indicates if contents inside pane can be autohidden. + /// + /// The new value for the property. + protected void SetCanAutohide(bool value) + { + SetValue(CanAutohidePropertyKey, value); + } + + internal void UpdateCanAutohideProperty() + { + SetCanAutohide( + Items.Cast().All(c => + { + bool flag = c.State == DockableContentState.Docked || + c.State == DockableContentState.Document || + c.State == DockableContentState.AutoHide; + + flag = flag && ((c.DockableStyle & DockableStyle.AutoHide) > 0); +#if DEBUG + Debug.WriteLine("{0} CanAutohide()= {1}", c.Title, flag); +#endif + return flag; + }) + ); + } + + #endregion + + + #endregion + + + protected override bool IsSurfaceVisible + { + get + { + foreach (ManagedContent managedContent in Items) + { + if (managedContent is DocumentContent) + continue; + + if (((DockableContent)managedContent).State == DockableContentState.Docked || + ((DockableContent)managedContent).State == DockableContentState.None) + return true; + } + + return false; + } + } + + + #region OptionsContextMenu + ContextMenu cxOptions = null; + + /// + /// Open the option context menu + /// + public bool OpenOptionsMenu(UIElement menuTarget) + { + if (cxOptions == null) + { + Debug.Assert(cxOptions == null); + cxOptions = TryFindResource(new ComponentResourceKey(typeof(DockingManager), ContextMenuElement.DockablePane)) as ContextMenu; + if (cxOptions != null) + { + cxOptions.Opened += (s, e) => IsOptionsMenuOpen = true; + cxOptions.Closed += (s, e) => IsOptionsMenuOpen = false; + } + } + + if (cxOptions != null) + { + cxOptions.DataContext = this.SelectedItem as DockableContent; + + foreach (MenuItem menuItem in cxOptions.Items.OfType()) + menuItem.CommandTarget = this.SelectedItem as DockableContent; + + if (menuTarget != null) + { + cxOptions.Placement = PlacementMode.Bottom; + cxOptions.PlacementTarget = menuTarget; + } + else + { + cxOptions.Placement = PlacementMode.MousePoint; + cxOptions.PlacementTarget = this; + } + + FocusContent(); + cxOptions.IsOpen = true; + } + + return (cxOptions != null && cxOptions.IsOpen); + } + + /// + /// Close the options context menu + /// + public void CloseOptionsMenu() + { + if (cxOptions != null) + { + cxOptions.IsOpen = false; + cxOptions = null; + } + } + + /// + /// Gets a value indicating if the options context menu is open + /// + public bool IsOptionsMenuOpen + { + get { return (bool)GetValue(IsOptionsMenuOpenProperty); } + protected set { SetValue(IsOptionsMenuOpenPropertyKey, value); } + } + + // Using a DependencyProperty as the backing store for IsOptionsMenuOpen. This enables animation, styling, binding, etc... + static readonly DependencyPropertyKey IsOptionsMenuOpenPropertyKey = + DependencyProperty.RegisterReadOnly("IsOptionsMenuOpen", typeof(bool), typeof(DockablePane), new UIPropertyMetadata(false)); + + public static readonly DependencyProperty IsOptionsMenuOpenProperty = IsOptionsMenuOpenPropertyKey.DependencyProperty; + + + + #endregion + + #region Mouse management + + void FocusContent() + { + ManagedContent selectedContent = SelectedItem as ManagedContent; + if (selectedContent != null)// && selectedContent.Content is UIElement) + { + UIElement internalContent = selectedContent.Content as UIElement; + bool res = Focus(); + //Keyboard.Focus(internalContent); + selectedContent.Activate(); + } + } + + Point ptStartDrag; + bool isMouseDown = false; + protected virtual void OnHeaderMouseDown(object sender, MouseButtonEventArgs e) + { + if (!e.Handled && SelectedItem != null) + { + FocusContent(); + + if (((DockableContent)SelectedItem).State != DockableContentState.AutoHide) + { + //ptStartDrag = e.MouseDevice.GetPosition(this); + ptStartDrag = e.GetPosition((IInputElement)System.Windows.Media.VisualTreeHelper.GetParent(this)); + + isMouseDown = true; + } + } + } + + protected virtual void OnHeaderMouseMove(object sender, MouseEventArgs e) + { + //Point ptMouseMove = e.GetPosition(this); + Point ptMouseMove = e.GetPosition((IInputElement)System.Windows.Media.VisualTreeHelper.GetParent(this)); + + + if (!e.Handled && isMouseDown && e.LeftButton == MouseButtonState.Pressed) + { + if (_partHeader != null && + _partHeader.IsMouseOver) + { + DockingManager manager = GetManager(); + if (!manager.DragPaneServices.IsDragging && + !IsMouseCaptured) + { + if (Math.Abs(ptMouseMove.X - ptStartDrag.X) > SystemParameters.MinimumHorizontalDragDistance || + Math.Abs(ptMouseMove.Y - ptStartDrag.Y) > SystemParameters.MinimumVerticalDragDistance) + { + isMouseDown = false; + ReleaseMouseCapture(); + + manager.Drag(this, this.PointToScreenDPI(e.GetPosition(this)), e.GetPosition(this)); + e.Handled = true; + } + } + } + } + + } + + protected virtual void OnHeaderMouseUp(object sender, MouseButtonEventArgs e) + { + isMouseDown = false; + ReleaseMouseCapture(); + } + + protected virtual void OnHeaderMouseEnter(object sender, MouseEventArgs e) + { + isMouseDown = false; + + } + protected virtual void OnHeaderMouseLeave(object sender, MouseEventArgs e) + { + isMouseDown = false; + + } + #endregion + + #region Commands + + + protected override void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (e.Command == DockablePaneCommands.Close) + { + Close(); + e.Handled = true; + } + else if (e.Command == DockablePaneCommands.Hide) + { + Hide(); + e.Handled = true; + } + else if (e.Command == DockablePaneCommands.ToggleAutoHide) + { + ToggleAutoHide(); + e.Handled = true; + } + //else if (e.Command == ShowOptionsCommand) + //{ + // OpenOptionsContextMenu(); + // e.Handled = true; + //} + + } + + protected override void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = true; + } + + /// + /// Retrive a value indicating if the command can be executed based to the dockable content state + /// + /// + /// + protected virtual bool CanExecuteCommand(ICommand command) + { + //Test by DockableStyle + if (command == DockablePaneCommands.Close) + { + return true; + } + else if (command == DockablePaneCommands.Hide) + { + return true; + } + else if (command == DockablePaneCommands.ToggleAutoHide) + { + return true; + } + + + return true; + } + + + #endregion + + + public override bool IsDocked + { + get { return IsSurfaceVisible; } + } + + public bool IsAutoHidden + { + get + { + return Items.Cast().FirstOrDefault(c => c.State == DockableContentState.AutoHide) != null; + } + } + + + public DockableStyle GetCumulativeDockableStyle() + { + DockableStyle style = DockableStyle.Dockable; + + if (Items.Count == 1 && + Items[0] is DocumentContent) + style = DockableStyle.Document; + else + { + foreach (DockableContent content in this.Items) + { + style &= content.DockableStyle; + } + } + + return style; + } + + internal override ManagedContent RemoveContent(int index) + { + ManagedContent content = base.RemoveContent(index); + DockableContent dockableContent = content as DockableContent; + + if (((dockableContent == null) + || (dockableContent != null && dockableContent.SavedStateAndPosition == null) + || (dockableContent != null && dockableContent.SavedStateAndPosition.ContainerPane != this)) + && Items.Count == 0) + { + ResizingPanel containerPanel = Parent as ResizingPanel; + if (containerPanel != null) + containerPanel.RemoveChild(this); + } + + return content; + } + + protected override void CheckItems(IList newItems) + { + foreach (object newItem in newItems) + { + if (!(newItem is DockableContent)) + throw new InvalidOperationException("DockablePane can contain only DockableContents!"); + } + } + + + #region Dockable Pane operations + /// + /// Toggle auto hide state to all content inside the pane + /// + public virtual void ToggleAutoHide() + { + bool flag = Items.OfType().FirstOrDefault(c => (c.DockableStyle & DockableStyle.AutoHide) == 0) == null; + + if (flag && GetManager() != null) + GetManager().ToggleAutoHide(this); + } + + /// + /// Close pane and all contained contents + /// + /// True if all content has been closed, false if at least one content couldn't be closed. + /// + public virtual bool Close() + { + DockableContent[] cntsToClose = Items.OfType().ToArray(); + bool res = true; + foreach (var cnt in cntsToClose) + { + if (!cnt.Close()) + res = false; + } + + return res; + } + + + /// + /// Close pane and hide all contained contents + /// + /// True if all content has been hidden, false if at least one content couldn't be hidden. + /// + public virtual bool Hide() + { + DockableContent[] cntsToClose = Items.OfType().ToArray(); + bool res = true; + foreach (var cnt in cntsToClose) + { + if (!cnt.Hide()) + res = false; + } + + return res; + } + + + /// + /// Closes or hides current content depending on HideOnClose property + /// + internal void CloseOrHideCurrentContent() + { + (SelectedItem as DockableContent).CloseOrHide(false); + } + + + + #endregion + + + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTab.cs b/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTab.cs new file mode 100644 index 0000000000..8e0b037bd6 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTab.cs @@ -0,0 +1,248 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Diagnostics; + +namespace AvalonDock +{ + /// + /// Represents a tab displayed in a border of the docking manager + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public class DockablePaneAnchorTab : System.Windows.Controls.Control//, INotifyPropertyChanged + { + static DockablePaneAnchorTab() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePaneAnchorTab), new FrameworkPropertyMetadata(typeof(DockablePaneAnchorTab))); + } + + public DockablePaneAnchorTab() + { + + } + + /// + /// Gets or sets the referenced content + /// + public DockableContent ReferencedContent + { + get { return (DockableContent)GetValue(ReferencedContentPropertyKey.DependencyProperty); } + set { SetValue(ReferencedContentPropertyKey, value); } + } + + // Using a DependencyProperty as the backing store for DockableContent. This enables animation, styling, binding, etc... + public static readonly DependencyPropertyKey ReferencedContentPropertyKey = + DependencyProperty.RegisterReadOnly("ReferencedContent", typeof(DockableContent), typeof(DockablePaneAnchorTab), new UIPropertyMetadata(null, new PropertyChangedCallback(OnPaneAttached))); + + /// + /// Handles the referencedContent property changes in order to update the Anchor property + /// + /// + /// + static void OnPaneAttached(DependencyObject depObj, DependencyPropertyChangedEventArgs e) + { + //Update Anchor, Title and Icon property + DockablePaneAnchorTab _this = depObj as DockablePaneAnchorTab; + _this.SetAnchor(((DockablePane)_this.ReferencedContent.ContainerPane).Anchor); + _this.SetIcon(_this.ReferencedContent.Icon); + _this.SetTitle(_this.ReferencedContent.Title); + + } + + ///// + ///// Gets anchor style of the referenced content + ///// + ///// This proprety is exposed to facilitate the control template binding. + //public AnchorStyle Anchor + //{ + // get { return (AnchorStyle)GetValue(AnchorPropertyKey.DependencyProperty); } + // protected set { SetValue(AnchorPropertyKey, value); } + //} + + //// Using a DependencyProperty as the backing store for IsSelected. This enables animation, styling, binding, etc... + //public static readonly DependencyPropertyKey AnchorPropertyKey = + // DependencyProperty.RegisterAttachedReadOnly("Anchor", typeof(AnchorStyle), typeof(DockablePaneAnchorTab), new PropertyMetadata(AnchorStyle.Left)); + + ///// + ///// Gets icon of the referenced content + ///// + ///// This proprety is exposed to facilitate the control template binding. + //public object Icon + //{ + // get { return (object)GetValue(IconPropertyKey.DependencyProperty); } + // protected set { SetValue(IconPropertyKey, value); } + //} + + //// Using a DependencyProperty as the backing store for IsSelected. This enables animation, styling, binding, etc... + //public static readonly DependencyPropertyKey IconPropertyKey = + // DependencyProperty.RegisterAttachedReadOnly("Icon", typeof(object), typeof(DockablePaneAnchorTab), new PropertyMetadata(null)); + + #region Anchor + + /// + /// Anchor Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey AnchorPropertyKey + = DependencyProperty.RegisterReadOnly("Anchor", typeof(AnchorStyle), typeof(DockablePaneAnchorTab), + new FrameworkPropertyMetadata((AnchorStyle)AnchorStyle.None)); + + public static readonly DependencyProperty AnchorProperty + = AnchorPropertyKey.DependencyProperty; + + /// + /// Gets the Anchor property. This dependency property + /// indicates the achor style of referenced content that is in autohidden state. + /// + public AnchorStyle Anchor + { + get { return (AnchorStyle)GetValue(AnchorProperty); } + } + + /// + /// Provides a secure method for setting the Anchor property. + /// This dependency property indicates the achor style of referenced content that is in autohidden state. + /// + /// The new value for the property. + protected void SetAnchor(AnchorStyle value) + { + SetValue(AnchorPropertyKey, value); + } + + #endregion + + #region Icon + + /// + /// Icon Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey IconPropertyKey + = DependencyProperty.RegisterReadOnly("Icon", typeof(object), typeof(DockablePaneAnchorTab), + new FrameworkPropertyMetadata((object)null)); + + public static readonly DependencyProperty IconProperty + = IconPropertyKey.DependencyProperty; + + /// + /// Gets the Icon property. This dependency property + /// indicates icon of the referenced content in autohidden state. + /// + public object Icon + { + get { return (object)GetValue(IconProperty); } + } + + /// + /// Provides a secure method for setting the Icon property. + /// This dependency property indicates icon of the referenced content in autohidden state. + /// + /// The new value for the property. + protected void SetIcon(object value) + { + SetValue(IconPropertyKey, value); + } + + #endregion + + #region Title + + /// + /// Title Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey TitlePropertyKey + = DependencyProperty.RegisterReadOnly("Title", typeof(object), typeof(DockablePaneAnchorTab), + new FrameworkPropertyMetadata((string)null)); + + public static readonly DependencyProperty TitleProperty + = TitlePropertyKey.DependencyProperty; + + /// + /// Gets the Title property. This dependency property + /// indicates title of the content that is hosted in autohidden pane. + /// + public object Title + { + get { return (object)GetValue(TitleProperty); } + } + + /// + /// Provides a secure method for setting the Title property. + /// This dependency property indicates title of the content that is hosted in autohidden pane. + /// + /// The new value for the property. + protected void SetTitle(object value) + { + SetValue(TitlePropertyKey, value); + } + + #endregion + + /// + /// Handles the MouseMove event + /// + /// + /// Notify the docking manager that the referenced content should appears + protected override void OnMouseMove(MouseEventArgs e) + { + if (ReferencedContent != null) + ReferencedContent.Manager.ShowFlyoutWindow(ReferencedContent, this); + + base.OnMouseMove(e); + } + + /// + /// Handles the MouseDown event + /// + /// + /// Notify the docking manager that the referenced content should appears and should be activated + protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) + { + if (ReferencedContent != null) + { + ReferencedContent.Manager.ShowFlyoutWindow(ReferencedContent, this); + ReferencedContent.Activate(); + } + + base.OnMouseLeftButtonDown(e); + } + + } + +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTabGroup.cs b/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTabGroup.cs new file mode 100644 index 0000000000..6e73ba0b98 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockablePaneAnchorTabGroup.cs @@ -0,0 +1,64 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace AvalonDock +{ + public class DockablePaneAnchorTabGroup : System.Windows.Controls.StackPanel + { + static DockablePaneAnchorTabGroup() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockablePaneAnchorTabGroup), new FrameworkPropertyMetadata(typeof(DockablePaneAnchorTabGroup))); + } + + DockablePane _pane = null; + + internal DockablePane ReferencedPane + { + get + { return _pane; } + set { _pane = value; } + } + + protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) + { + base.OnVisualChildrenChanged(visualAdded, visualRemoved); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockablePaneCommands.cs b/src/Libraries/AvalonDock/AvalonDock/DockablePaneCommands.cs new file mode 100644 index 0000000000..0da812b30a --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockablePaneCommands.cs @@ -0,0 +1,102 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + /// + /// Defines commands that can be applied to a dockable pane + /// + public sealed class DockablePaneCommands + { + private static object syncRoot = new object(); + + private static RoutedUICommand closeCommand = null; + + /// + /// This command closes the and closes all the contained s inside it + /// + public static RoutedUICommand Close + { + get + { + lock (syncRoot) + { + if (null == closeCommand) + { + closeCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockablePaneCommands_Close, "Close", typeof(DockablePaneCommands)); + } + } + return closeCommand; + } + } + + private static RoutedUICommand hideCommand = null; + + /// + /// This command closes the and hides all the contained s inside it + /// + public static RoutedUICommand Hide + { + get + { + lock (syncRoot) + { + if (null == hideCommand) + { + hideCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockablePaneCommands_Hide, "Hide", typeof(DockablePaneCommands)); + } + } + return hideCommand; + } + } + + private static RoutedUICommand autoHideCommand = null; + + /// + /// This commands auto-hides the pane with all contained s inside it + /// + public static RoutedUICommand ToggleAutoHide + { + get + { + lock (syncRoot) + { + if (null == autoHideCommand) + { + autoHideCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DockablePaneCommands_ToggleAutoHide, "AutoHide", typeof(DockablePaneCommands)); + } + } + return autoHideCommand; + } + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockableTabPanel.cs b/src/Libraries/AvalonDock/AvalonDock/DockableTabPanel.cs new file mode 100644 index 0000000000..5572d452ec --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockableTabPanel.cs @@ -0,0 +1,87 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace AvalonDock +{ + public class DockableTabPanel : PaneTabPanel + { + protected override Size MeasureOverride(Size availableSize) + { + double totWidth = 0; + + if (base.VisualChildrenCount == 0) + return base.MeasureOverride(availableSize); + + + var childsOrderedByWidth = new List(); + + foreach (FrameworkElement child in Children) + { + child.Measure(new Size(double.PositiveInfinity, availableSize.Height)); + totWidth += child.DesiredSize.Width - child.Margin.Left - child.Margin.Right; + childsOrderedByWidth.Add(child); + } + + if (totWidth > availableSize.Width) + { + foreach (FrameworkElement child in Children) + { + child.Measure(new Size(availableSize.Width / Children.Count, availableSize.Height)); + } + } + + return base.MeasureOverride(availableSize); + } + + protected override Size ArrangeOverride(Size finalSize) + { + double offsetX = 0; + + foreach (FrameworkElement child in Children) + { + double childFinalWidth = child.DesiredSize.Width; + child.Arrange(new Rect(offsetX, 0, childFinalWidth, finalSize.Height)); + + offsetX += child.DesiredSize.Width; + } + + return base.ArrangeOverride(finalSize); + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs b/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs new file mode 100644 index 0000000000..85ce9b84ab --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DockingManager.cs @@ -0,0 +1,4075 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.Windows.Interop; +using System.ComponentModel; +using System.IO; +using System.Xml; +using System.Linq; +using System.Collections; +using System.Collections.Specialized; +using System.Collections.ObjectModel; + + +namespace AvalonDock +{ + + /// + /// Represents a control which manages a dockable layout for its children + /// + public class DockingManager : ContentControl, IDropSurface, INotifyPropertyChanged, IDisposable + { + static DockingManager() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(DockingManager), new FrameworkPropertyMetadata(typeof(DockingManager))); + } + + + public DockingManager() + { + Debug.WriteLine("DockingManager ctr"); + + Documents = new ManagedContentCollection(this); + DockableContents = new ManagedContentCollection(this); + //HiddenContents = new ManagedContentCollection(this); + + this.Loaded += new RoutedEventHandler(DockingManager_Loaded); + this.Unloaded += new RoutedEventHandler(DockingManager_Unloaded); + } + + + #region Control lifetime management + ~DockingManager() + { + Dispose(false); + } + + bool _isControlLoaded = false; + + void DockingManager_Loaded(object sender, RoutedEventArgs e) + { + Debug.WriteLine("DockingManager Loaded"); + + if (!DesignerProperties.GetIsInDesignMode(this)) + { + foreach (FloatingWindow floatingWindow in _floatingWindows) + { + floatingWindow.Owner = Window.GetWindow(this); + if (floatingWindow.IsVisible) + floatingWindow.Hide(); + + floatingWindow.Show(); + } + + DragPaneServices.Register(this); + } + + + _isControlLoaded = true; + } + + void DockingManager_Unloaded(object sender, RoutedEventArgs e) + { + Debug.WriteLine("DockingManager Unloaded"); + + if (!DesignerProperties.GetIsInDesignMode(this)) + { + //cleanup pending resources + HideFlyoutWindow(); + + if (_overlayWindow != null) + { + _overlayWindow.Close(); + _overlayWindow = null; + } + + foreach (FloatingWindow floatingWindow in _floatingWindows) + floatingWindow.Hide(); + + //navigator windows are now automatically disposed when + //no longer used. In this way we avoid WPF bug: + //http://social.msdn.microsoft.com/forums/en/wpf/thread/f3fc5b7e-e035-4821-908c-b6c07e5c7042/ + //if (navigatorWindow != null) + //{ + // navigatorWindow.Close(); + // navigatorWindow = null; + //} + + //if (documentNavigatorWindow != null) + //{ + // documentNavigatorWindow.Close(); + // documentNavigatorWindow = null; + //} + + DragPaneServices.Unregister(this); + } + + _isControlLoaded = false; + } + + /// + /// Call this function if you want to deallocate external floating windows, that otherwise are closed when main window is closed. + /// + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + bool _disposed = false; + protected virtual void Dispose(bool disposing) + { + if (_disposed) + return; + + if (disposing) + { + while (_floatingWindows.Count > 0) + { + _floatingWindows[0].Owner = null; + _floatingWindows[0].Close(); + } + } + + _disposed = true; + } + + #endregion + + Panel _leftAnchorTabPanel; + Panel _rightAnchorTabPanel; + Panel _topAnchorTabPanel; + Panel _bottomAnchorTabPanel; + + List _anchorTabPanels = new List(); + + bool _OnApplyTemplateFlag = false; + + + Panel ReplaceAnchorTabPanel(Panel oldPanel, Panel newPanel) + { + if (oldPanel == null) + { + _anchorTabPanels.Add(newPanel); + return newPanel; + } + else + { + _anchorTabPanels.Remove(oldPanel); + while (oldPanel.Children.Count > 0) + { + UIElement tabToTransfer = oldPanel.Children[0]; + oldPanel.Children.RemoveAt(0); + + newPanel.Children.Add(tabToTransfer); + } + _anchorTabPanels.Add(newPanel); + + return newPanel; + } + } + + /// + /// Overriden to get a reference to underlying template elements + /// + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + Panel leftPanel = GetTemplateChild("PART_LeftAnchorTabPanel") as Panel; + if (leftPanel == null) + throw new ArgumentException("PART_LeftAnchorTabPanel template child element not fount!"); + + Panel rightPanel = GetTemplateChild("PART_RightAnchorTabPanel") as Panel; + if (rightPanel == null) + throw new ArgumentException("PART_RightAnchorTabPanel template child element not fount!"); + + Panel topPanel = GetTemplateChild("PART_TopAnchorTabPanel") as Panel; + if (topPanel == null) + throw new ArgumentException("PART_TopAnchorTabPanel template child element not fount!"); + + Panel bottomPanel = GetTemplateChild("PART_BottomAnchorTabPanel") as Panel; + if (bottomPanel == null) + throw new ArgumentException("PART_BottomAnchorTabPanel template child element not fount!"); + + + _leftAnchorTabPanel = ReplaceAnchorTabPanel(_leftAnchorTabPanel, leftPanel); + _rightAnchorTabPanel = ReplaceAnchorTabPanel(_rightAnchorTabPanel, rightPanel); + _topAnchorTabPanel = ReplaceAnchorTabPanel(_topAnchorTabPanel, topPanel); + _bottomAnchorTabPanel = ReplaceAnchorTabPanel(_bottomAnchorTabPanel, bottomPanel); + + _OnApplyTemplateFlag = true; + } + + + #region Access to contents and pane + + #region ActiveDocument + + + /// + /// ActiveDocument Dependency Property + /// + public static readonly DependencyProperty ActiveDocumentProperty = + DependencyProperty.Register("ActiveDocument", typeof(ManagedContent), typeof(DockingManager), + new FrameworkPropertyMetadata(null, + new PropertyChangedCallback(OnActiveDocumentChanged), + new CoerceValueCallback(CoerceActiveDocumentValue))); + + /// + /// Gets or sets the ActiveDocument property. This dependency property + /// indicates currently active document. + /// + /// The active document not neessary receive keyboard focus. To set keyboard focus on a content see + public ManagedContent ActiveDocument + { + get { return (ManagedContent)GetValue(ActiveDocumentProperty); } + set { SetValue(ActiveDocumentProperty, value); } + } + + /// + /// Handles changes to the ActiveDocument property. + /// + private static void OnActiveDocumentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((DockingManager)d).OnActiveDocumentChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the ActiveDocument property. + /// + protected virtual void OnActiveDocumentChanged(DependencyPropertyChangedEventArgs e) + { + var cntActivated = e.NewValue as ManagedContent; + var cntDeactivated = e.OldValue as ManagedContent; + + if (cntDeactivated != null) + cntDeactivated.SetIsActiveDocument(false); + + if (cntActivated != null) + cntActivated.SetIsActiveDocument(true); + + if (ActiveContent == null) + ActiveContent = cntActivated; + + NotifyPropertyChanged("ActiveDocument"); + + if (ActiveDocumentChanged != null) + ActiveDocumentChanged(this, EventArgs.Empty); + + if (ActiveDocument == null) + { + var docToActivate = Documents.OrderBy(d => d.LastActivation).FirstOrDefault(); + if (docToActivate != null) + docToActivate.Activate(); + } + } + + /// + /// Coerces the ActiveDocument value. + /// + private static object CoerceActiveDocumentValue(DependencyObject d, object value) + { + var contentToCoerce = value as ManagedContent; + if (contentToCoerce != null && + (contentToCoerce.ContainerPane == null || + contentToCoerce.ContainerPane.GetManager() != d)) + { + //value is not contained in a document pane/ documentfloatingwindow so cant be the active document! + throw new InvalidOperationException("Unable to set active document"); + } + + return value; + } + + + /// + /// Raised whenever the property changes + /// + public event EventHandler ActiveDocumentChanged; + + #endregion + + + //ManagedContent _activeContent = null; + + ///// + ///// Get or set the active content + ///// + ///// An activated content is automatically selected in its container pane and receive logical as well keyboard focus. + //public ManagedContent ActiveContent + //{ + // get + // { + // return _activeContent; + // } + // internal set + // { + + // } + //} + + #region ActiveContent + + /// + /// ActiveContent Dependency Property + /// + public static readonly DependencyProperty ActiveContentProperty = + DependencyProperty.Register("ActiveContent", typeof(ManagedContent), typeof(DockingManager), + new FrameworkPropertyMetadata(null, + new PropertyChangedCallback(OnActiveContentChanged), + new CoerceValueCallback(CoerceActiveContentValue))); + + /// + /// Gets or sets the ActiveContent property. This dependency property + /// indicates the active content. + /// + public ManagedContent ActiveContent + { + get { return (ManagedContent)GetValue(ActiveContentProperty); } + set { SetValue(ActiveContentProperty, value); } + } + + /// + /// Handles changes to the ActiveContent property. + /// + private static void OnActiveContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((DockingManager)d).OnActiveContentChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the ActiveContent property. + /// + protected virtual void OnActiveContentChanged(DependencyPropertyChangedEventArgs e) + { + var cntActivated = e.NewValue as ManagedContent; + var cntDeactivated = e.OldValue as ManagedContent; + + if (cntDeactivated != null) + cntDeactivated.SetIsActiveContent(false); + + if (cntActivated != null) + cntActivated.SetIsActiveContent(true); + + if (cntActivated != null && + cntActivated.ContainerPane is DocumentPane) + ActiveDocument = cntActivated; + + //for backward compatibility + NotifyPropertyChanged("ActiveContent"); + + if (ActiveContentChanged != null) + ActiveContentChanged(this, EventArgs.Empty); + } + + /// + /// Coerces the ActiveContent value. + /// + private static object CoerceActiveContentValue(DependencyObject d, object value) + { + return value; + } + + /// + /// Raised whenever the changes + /// + public event EventHandler ActiveContentChanged; + + #endregion + + /// + /// Gets the active dockable content + /// + /// If no dockbale content us active at the moment returns null. + public DockableContent ActiveDockableContent + { + get + { + IInputElement focusedElement = FocusManager.GetFocusedElement(this); + + return focusedElement as DockableContent; + } + } + + /// + /// Gets an array of all dockable contents currenty managed + /// + //public DockableContent[] DockableContents + //{ + // get + // { + // List contents = FindContents(); + + // foreach (DockableContent content in HiddenContents) + // contents.Add(content); + + // return contents.ToArray(); + // } + //} + #region DockableContents + + /// + /// DockableContents Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey DockableContentsPropertyKey + = DependencyProperty.RegisterReadOnly("DockableContents", typeof(ManagedContentCollection), typeof(DockingManager), + new FrameworkPropertyMetadata(null)); + + public static readonly DependencyProperty DockableContentsProperty + = DockableContentsPropertyKey.DependencyProperty; + + /// + /// Gets the DockableContents property. This dependency property + /// retrives the collection of that are bound to + /// + public ManagedContentCollection DockableContents + { + get { return (ManagedContentCollection)GetValue(DockableContentsProperty); } + protected set { SetValue(DockableContentsPropertyKey, value); } + } + #endregion + + + #region Documents + + /// + /// DockableContents Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey DocumentsPropertyKey + = DependencyProperty.RegisterReadOnly("Documents", typeof(ManagedContentCollection), typeof(DockingManager), + new FrameworkPropertyMetadata(null)); + + public static readonly DependencyProperty DocumentsProperty + = DocumentsPropertyKey.DependencyProperty; + + /// + /// Gets the DockableContents property. This dependency property + /// retrives the collection of that are bound to + /// + public ManagedContentCollection Documents + { + get { return (ManagedContentCollection)GetValue(DocumentsProperty); } + protected set { SetValue(DocumentsPropertyKey, value); } + } + #endregion + + + + ///// + ///// Gets an array of all document contents + ///// + //public DocumentContent[] Documents + //{ + // get + // { + // return FindContents().ToArray(); + // } + //} + + #region Documents Source + + /// + /// Get or set the source collection for documents + /// + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Bindable(true)] + public IEnumerable DocumentsSource + { + get { return (IEnumerable)GetValue(DocumentsSourceProperty); } + set { SetValue(DocumentsSourceProperty, value); } + } + + // Using a DependencyProperty as the backing store for DocumentsSource. This enables animation, styling, binding, etc... + public static readonly DependencyProperty DocumentsSourceProperty = + DependencyProperty.Register("DocumentsSource", typeof(IEnumerable), typeof(DockingManager), new UIPropertyMetadata(null, new PropertyChangedCallback((s, e) => ((DockingManager)s).OnDocumentsSourceChanged(e.OldValue as IEnumerable, e.NewValue as IEnumerable)))); + + void OnDocumentsSourceChanged(IEnumerable oldSource, IEnumerable newSource) + { + if (oldSource != null) + { + INotifyCollectionChanged oldSourceNotityIntf = oldSource as INotifyCollectionChanged; + if (oldSourceNotityIntf != null) + oldSourceNotityIntf.CollectionChanged -= new NotifyCollectionChangedEventHandler(DocumentsSourceCollectionChanged); + } + + if (newSource != null) + { + INotifyCollectionChanged newSourceNotityIntf = newSource as INotifyCollectionChanged; + if (newSourceNotityIntf != null) + newSourceNotityIntf.CollectionChanged += new NotifyCollectionChangedEventHandler(DocumentsSourceCollectionChanged); + } + } + + void DocumentsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Reset) + { + //close first documents that do not belong to the MainDocumentPane + DocumentContent[] docs = this.Documents.ToArray(); + List documentsToCloseFirst = new List(); + + foreach (DocumentContent doc in docs) + { + if (doc.Parent is DocumentPane) + { + if ((doc.Parent as DocumentPane).IsMainDocumentPane == false) + { + documentsToCloseFirst.Add(doc); + } + } + } + + foreach (DocumentContent doc in documentsToCloseFirst) + { + doc.InternalClose(); + } + + foreach (DocumentContent doc in docs) + doc.InternalClose(); + } + + if (e.OldItems != null && + (e.Action == NotifyCollectionChangedAction.Remove || + e.Action == NotifyCollectionChangedAction.Replace)) + { + foreach (object newDoc in e.OldItems) + { + if (newDoc is DocumentContent) + { + DocumentContent documentToAdd = newDoc as DocumentContent; + documentToAdd.InternalClose(); + } + else if (newDoc is FrameworkElement) + { + DocumentContent docContainer = ((FrameworkElement)newDoc).Parent as DocumentContent; + if (docContainer != null) + docContainer.InternalClose(); + } + } + } + + if (e.NewItems != null && + (e.Action == NotifyCollectionChangedAction.Add || + e.Action == NotifyCollectionChangedAction.Replace)) + { + if (MainDocumentPane == null) + throw new InvalidOperationException("DockingManager must have at least a DocumentPane to host documents"); + + int iInsertIndex = e.NewStartingIndex; + foreach (object newDoc in e.NewItems) + { + if (newDoc is DocumentContent) + { + DocumentContent documentToAdd = newDoc as DocumentContent; + if (documentToAdd.Parent is DocumentPane) + { + ((DocumentPane)documentToAdd.Parent).Items.Clear(); + } + + MainDocumentPane.Items.Insert(iInsertIndex, documentToAdd); + } + else if (newDoc is UIElement) //limit objects to be at least framework elements + { + DocumentContent documentToAdd = new DocumentContent() + { + Content = newDoc + }; + + MainDocumentPane.Items.Insert(iInsertIndex, documentToAdd); + } + else + throw new InvalidOperationException(string.Format("Unable to add type {0} as DocumentContent", newDoc)); + + iInsertIndex++; + } + } + } + + internal void HandleDocumentClose(DocumentContent contentClosed) + { + IList listToUpdate = DocumentsSource as IList; + if (listToUpdate != null) + listToUpdate.Remove(contentClosed); + } + + internal void HandleDocumentOpen(DocumentContent contentClosed) + { + IList listToUpdate = DocumentsSource as IList; + if (listToUpdate != null) + listToUpdate.Add(contentClosed); + } + #endregion + + /// + /// Returns the main document pane + /// + /// + /// + internal static DocumentPane GetMainDocumentPane(ResizingPanel parentPanel) + { + foreach (UIElement child in parentPanel.Children) + { + if (child is DocumentPane) + return child as DocumentPane; + + if (child is ResizingPanel) + { + DocumentPane foundDocPane = GetMainDocumentPane(child as ResizingPanel); + if (foundDocPane != null) + return foundDocPane; + } + } + + return null; + } + + internal static bool IsPanelContainingDocumentPane(ResizingPanel parentPanel) + { + foreach (UIElement child in parentPanel.Children) + { + if (child is DocumentPane) + return true; + if (child is ResizingPanel) + { + bool foundDocPane = IsPanelContainingDocumentPane(child as ResizingPanel); + if (foundDocPane) + return foundDocPane; + } + } + + return false; + } + + internal void EnsurePanePositionIsValid(DocumentPane pane) + { + if (pane == MainDocumentPane) + return; + + //A document pane must be at maindocument pane level or deeper + if (MainDocumentPane.Parent == this) + { + throw new InvalidOperationException("A document pane can't be positioned at this level!"); + } + } + + bool? FindPaneInPanel(ResizingPanel panel, Pane paneToFind) + { + foreach (UIElement child in panel.Children) + { + if (child == paneToFind) + return true; + else if (child is DockablePane) + return null; + else if (child is ResizingPanel) + { + bool? found = FindPaneInPanel(child as ResizingPanel, paneToFind); + if (found.HasValue && found.Value) + return true; + } + } + + return false; + } + + DocumentPane _mainDocumentPane; + + /// + /// Gets the main that can be used to add new document + /// + public DocumentPane MainDocumentPane + { + get { return _mainDocumentPane; } + set + { + if (_mainDocumentPane == null) + { + _mainDocumentPane = value; + + if (DocumentsSource != null) + { + foreach (object newDoc in DocumentsSource) + { + if (newDoc is DocumentContent) + { + MainDocumentPane.Items.Add(newDoc); + } + else if (newDoc is FrameworkElement) //limit objects to be at least framework elements + { + DocumentContent docContainer = new DocumentContent(); + docContainer.Content = newDoc; + + MainDocumentPane.Items.Add(docContainer); + } + } + } + } + else + { + _mainDocumentPane = value; + } + + } + } + + protected override void OnContentChanged(object oldContent, object newContent) + { + base.OnContentChanged(oldContent, newContent); + + UpdateLayout(); + RefreshContents(); + } + + internal void RefreshContents() + { + var contentsFoundUnderMe = new LogicalTreeAdapter(this).Descendants().Where(d => d.Item is ManagedContent).Select(d => d.Item).Cast(); + var contentsFoundInFloatingMode = _floatingWindows.SelectMany(d => d.HostedPane.Items.Cast()); + DockableContent contentFoundInFlyoutMode = null; + + if (_flyoutWindow != null && + _flyoutWindow.ReferencedPane != null && + _flyoutWindow.ReferencedPane.Items.Count > 0) + { + contentFoundInFlyoutMode = _flyoutWindow.ReferencedPane.Items[0] as DockableContent; + } + + var contentsFound = new List(); + contentsFound.AddRange(contentsFoundUnderMe); + contentsFound.AddRange(contentsFoundInFloatingMode); + if (contentFoundInFlyoutMode != null) + contentsFound.Add(contentFoundInFlyoutMode); + + var dockableContensToRemove = DockableContents.Except(contentsFound.OfType()); + var dockableContensToAdd = contentsFound.OfType().Except(DockableContents); + + dockableContensToAdd.ToArray().ForEach(d => + { + if (d.State != DockableContentState.Hidden) + DockableContents.Add(d); + }); + dockableContensToRemove.ToArray().ForEach(d => + { + if (d.State != DockableContentState.Hidden) + DockableContents.Remove(d); + }); + + var documentsToRemove = Documents.Except(contentsFound.OfType()); + var documentsToAdd = contentsFound.OfType().Except(Documents); + + documentsToAdd.ToArray().ForEach(d => Documents.Add(d)); + documentsToRemove.ToArray().ForEach(d => Documents.Remove(d)); + + //refresh MainDocumentPane + if (MainDocumentPane == null || + MainDocumentPane.GetManager() != this) + { + ILinqToTree itemFound = new LogicalTreeAdapter(this).Descendants().FirstOrDefault(d => d.Item is DocumentPane); + + MainDocumentPane = itemFound != null ? itemFound.Item as DocumentPane : null; + } + + //_floatingWindows.ForEach(fl => fl.CheckContents()); + CheckValidPanesFromTabGroups(); + } + + internal void ClearEmptyPanes() + { + if (RestoringLayout) + return; + + while (true) + { + bool foundEmptyPaneToRemove = false; + var emptyDockablePanes = new LogicalTreeAdapter(this).Descendants().Where(i => (i.Item is DockablePane) && (i.Item as DockablePane).Items.Count == 0).Select(i => i.Item).Cast().ToArray(); + + emptyDockablePanes.ForEach(dp => + { + if (!DockableContents.Any(dc => + { + if (dc.SavedStateAndPosition != null && + (dc.SavedStateAndPosition.ContainerPane == dp || dc.SavedStateAndPosition.ContainerPaneID == dp.ID)) + return true; + + if (dc.State == DockableContentState.AutoHide) + { + var flyoutDocPane = dc.ContainerPane as FlyoutDockablePane; + if (flyoutDocPane != null && flyoutDocPane.ReferencedPane == dp) + return true; + } + + return false; + })) + { + var containerPanel = dp.Parent as ResizingPanel; + if (containerPanel != null) + { + containerPanel.RemoveChild(dp); + foundEmptyPaneToRemove = true; + } + } + }); + + if (!foundEmptyPaneToRemove) + break; + } + + } + + + internal void ClearEmptyPanels(ResizingPanel panelToClear) + { + if (panelToClear == null) + return; + + foreach (var childPanel in panelToClear.Children.OfType().ToArray()) + { + if (childPanel.Children.Count == 0) + { + panelToClear.RemoveChild(childPanel); + } + else + { + ClearEmptyPanels(childPanel); + } + } + } + + /// + /// This method ensure that content of this is not empty + /// + void EnsureContentNotEmpty() + { + if (RestoringLayout) + return; + + if (Content == null) + { + Content = new DocumentPane(); + RefreshContents(); + } + } + + //internal List FindContents() where T : ManagedContent + //{ + // List resList = new List(); + + // if (Content is Pane) + // { + // foreach (ManagedContent c in ((Pane)Content).Items) + // { + // if (c is T) + // { + // resList.Add((T)c); + // } + // } + // } + // else if (Content is ResizingPanel) + // { + // FindContents(resList, Content as ResizingPanel); + // } + + // foreach (FloatingWindow flWindow in _floatingWindows) + // { + // foreach (ManagedContent c in flWindow.HostedPane.Items) + // { + // if (c is T) + // resList.Add(c as T); + // } + // } + + // if (_flyoutWindow != null && _flyoutWindow.ReferencedPane != null) + // { + // foreach (ManagedContent c in _flyoutWindow.ReferencedPane.Items) + // { + // if (c is T) + // resList.Add(c as T); + // } + // } + + + // return resList; + //} + + //void FindContents(List listOfFoundContents, ResizingPanel parentPanel) where T : ManagedContent + //{ + // foreach (UIElement child in parentPanel.Children) + // { + // if (child is Pane) + // { + // foreach (ManagedContent c in ((Pane)child).Items) + // { + // if (c is T) + // { + // listOfFoundContents.Add((T)c); + // } + // } + // } + // else if (child is ResizingPanel) + // { + // FindContents(listOfFoundContents, child as ResizingPanel); + // } + // } + //} + + #endregion + + #region Floating windows management + List _floatingWindows = new List(); + + /// + /// Get all floating windows created by the while user dragged contents + /// + public FloatingWindow[] FloatingWindows + { + get + { + if (_floatingWindows == null || + _floatingWindows.Count == 0) + return new DockableFloatingWindow[] { }; + + return _floatingWindows.ToArray(); + } + } + + internal void RegisterFloatingWindow(FloatingWindow floatingWindow) + { + if (_floatingWindows != null) + { + floatingWindow.FlowDirection = this.FlowDirection; + if (!_floatingWindows.Contains(floatingWindow)) + _floatingWindows.Add(floatingWindow); + } + } + + internal void UnregisterFloatingWindow(FloatingWindow floatingWindow) + { + if (_floatingWindows != null) + _floatingWindows.Remove(floatingWindow); + } + + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + this.CommandBindings.Clear(); + + //Keyboard.AddKeyDownHandler(this, (s, ke) => + // { + // if (ke.Key == Key.Tab && Keyboard.IsKeyDown(Key.LeftCtrl)) + // { + // ShowNavigatorWindow(); + // ke.Handled = true; + // } + // }); + + //Keyboard.AddKeyDownHandler(this, (s, ke) => + //{ + // if (ke.Key == Key.Tab) + // { + // if (navigatorWindow != null && navigatorWindow.IsVisible) + // { + // HideNavigatorWindow(); + // ke.Handled = true; + // } + // } + //}); + + //this.CommandBindings.Add(new CommandBinding(ShowNavigatorWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); + //this.CommandBindings.Add(new CommandBinding(ShowDocumentNavigatorWindowCommand, OnExecuteCommand, OnCanExecuteCommand)); + } + + protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) + { + if (e.Property == FlowDirectionProperty) + { + _floatingWindows.ForEach(fl => + { + fl.FlowDirection = FlowDirection; + }); + + if (_flyoutWindow != null) + { + _flyoutWindow.FlowDirection = FlowDirection; + } + } + + base.OnPropertyChanged(e); + } + #endregion + + //#region Commands + + //private static object syncRoot = new object(); + + + //private static RoutedUICommand showNavigatorCommand = null; + + ///// + ///// Get the command to show navigator window + ///// + //public static RoutedUICommand ShowNavigatorWindowCommand + //{ + // get + // { + // lock (syncRoot) + // { + // if (null == showNavigatorCommand) + // { + // showNavigatorCommand = new RoutedUICommand("S_how navigator window", "Navigator", typeof(DockingManager)); + // showNavigatorCommand.InputGestures.Add(new KeyGesture(Key.Tab, ModifierKeys.Control)); + // } + + // } + // return showNavigatorCommand; + // } + //} + + NavigatorWindow navigatorWindow = null; + + void ShowNavigatorWindow() + { + HideNavigatorWindow(); + + if (navigatorWindow == null) + { + navigatorWindow = new NavigatorWindow(this); + navigatorWindow.Owner = Window.GetWindow(this); + } + + Point locDockingManager = this.PointToScreenDPI(new Point()); + navigatorWindow.Left = locDockingManager.X; + navigatorWindow.Top = locDockingManager.Y; + navigatorWindow.Width = this.ActualWidth; + navigatorWindow.Height = this.ActualHeight; + navigatorWindow.ShowActivated = false; + navigatorWindow.Show(); + navigatorWindow.Focus(); + } + + void HideNavigatorWindow() + { + if (navigatorWindow != null) + { + navigatorWindow.Close(); + navigatorWindow = null; + } + } + + + protected override void OnKeyDown(KeyEventArgs e) + { + bool isCtrlDown = Keyboard.Modifiers == ModifierKeys.Control; + bool _navigatorWindowIsVisible = navigatorWindow != null ? navigatorWindow.IsVisible : false; + Debug.WriteLine(string.Format("OnKeyDn {0} CtrlDn={1}", e.Key, isCtrlDown)); + + if (e.Key == Key.Tab && isCtrlDown) + { + if (!_navigatorWindowIsVisible) + { + ShowNavigatorWindow(); + } + + navigatorWindow.MoveNextSelectedContent(); + e.Handled = true; + } + else + HideNavigatorWindow(); + + + base.OnKeyDown(e); + } + + protected override void OnKeyUp(KeyEventArgs e) + { + bool isCtrlDown = Keyboard.Modifiers == ModifierKeys.Control; + bool _navigatorWindowIsVisible = navigatorWindow != null ? navigatorWindow.IsVisible : false; + Debug.WriteLine(string.Format("OnKeyUp {0} CtrlDn={1}", e.Key, isCtrlDown)); + + if (e.Key != Key.Tab || !isCtrlDown) + HideNavigatorWindow(); + + base.OnKeyUp(e); + } + + //void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + //{ + // if (e.Command == ShowNavigatorWindowCommand && ((Keyboard.Modifiers & ModifierKeys.Control)>0) ) + // { + // ShowNavigatorWindow(); + // e.Handled = true; + // } + // else if (e.Command == ShowDocumentNavigatorWindowCommand && ((Keyboard.Modifiers & ModifierKeys.Shift) > 0)) + // { + // ShowDocumentNavigatorWindow(); + // e.Handled = true; + // } + + //} + + //void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + //{ + // e.CanExecute = true; + //} + + + //private static RoutedUICommand showDocumentNavigatorCommand = null; + + ///// + ///// Get the command to show document navigator window + ///// + //public static RoutedUICommand ShowDocumentNavigatorWindowCommand + //{ + // get + // { + // lock (syncRoot) + // { + // if (null == showDocumentNavigatorCommand) + // { + // showDocumentNavigatorCommand = new RoutedUICommand("S_how document navigator window", "DocumentNavigator", typeof(DockingManager)); + // showDocumentNavigatorCommand.InputGestures.Add(new KeyGesture(Key.Tab, ModifierKeys.Shift)); + // } + + // } + // return showDocumentNavigatorCommand; + // } + //} + + //DocumentNavigatorWindow documentNavigatorWindow = null; + + //void ShowDocumentNavigatorWindow() + //{ + // HideDocumentNavigatorWindow(); + + // //if (documentNavigatorWindow == null) + // { + // documentNavigatorWindow = new DocumentNavigatorWindow(this); + // documentNavigatorWindow.Owner = Window.GetWindow(this); + // } + + // if (MainDocumentPane == null) + // return; + + // Point locMainDocumentPane = MainDocumentPane.PointToScreenDPI(new Point()); + // documentNavigatorWindow.Left = locMainDocumentPane.X; + // documentNavigatorWindow.Top = locMainDocumentPane.Y; + // documentNavigatorWindow.Width = MainDocumentPane.ActualWidth; + // documentNavigatorWindow.Height = MainDocumentPane.ActualHeight; + // documentNavigatorWindow.Show(); + // documentNavigatorWindow.Focus(); + //} + + //void HideDocumentNavigatorWindow() + //{ + // //if (documentNavigatorWindow != null) + // //{ + // // documentNavigatorWindow.Hide(); + + // // //don't close this window to be more responsive + // // documentNavigatorWindow.Close(); + // // documentNavigatorWindow = null; + // //} + //} + + + //#endregion + + #region DockablePane operations + /// + /// Anchor a dockable pane to a border + /// + /// + /// + public void Anchor(DockablePane paneToAnchor, AnchorStyle anchor) + { + //ensure that content property is not empty + EnsureContentNotEmpty(); + + if (Content == null) + return; + + //remove the pane from its original children collection + FrameworkElement parentElement = paneToAnchor.Parent as FrameworkElement; + + if (anchor == AnchorStyle.None) + anchor = AnchorStyle.Right; + + //Change anchor border according to FlowDirection + if (FlowDirection == FlowDirection.RightToLeft) + { + if (anchor == AnchorStyle.Right) + anchor = AnchorStyle.Left; + else if (anchor == AnchorStyle.Left) + anchor = AnchorStyle.Right; + } + + //parentElement should be a DockingManager or a ResizingPanel + if (parentElement is ContentControl) + { + ((ContentControl)parentElement).Content = null; + } + + //and insert in the top level panel if exist + ResizingPanel toplevelPanel = Content as ResizingPanel; + + if (toplevelPanel != null && toplevelPanel.Children.Count == 0) + { + Content = null; + toplevelPanel = null; + } + + Orientation requestedOrientation = + (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; + + //if toplevel panel contains only one child then just override the orientation + //as requested + if (toplevelPanel != null && toplevelPanel.Children.Count == 1) + toplevelPanel.Orientation = requestedOrientation; + + if (toplevelPanel == null || + toplevelPanel.Orientation != requestedOrientation) + { + //if toplevel panel doesn't exist or it has not the correct orientation + //we have to create a new one and set it as content of docking manager + toplevelPanel = new ResizingPanel(); + toplevelPanel.Orientation = requestedOrientation; + + FrameworkElement contentElement = Content as FrameworkElement; + Content = toplevelPanel; + + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Top) + { + toplevelPanel.Children.Add(paneToAnchor); + toplevelPanel.InsertChildRelativeTo(contentElement, paneToAnchor, true); + } + else + { + toplevelPanel.Children.Add(paneToAnchor); + toplevelPanel.InsertChildRelativeTo(contentElement, paneToAnchor, false); + } + } + else + { + + //here we have a docking manager content with the right orientation + //so we have only to insert new child at correct position + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Top) + { + //add new child before first one (prepend) + toplevelPanel.InsertChildRelativeTo(paneToAnchor, toplevelPanel.Children[0] as FrameworkElement, false); + } + else + { + //add new child after last one (append) + toplevelPanel.InsertChildRelativeTo(paneToAnchor, toplevelPanel.Children[toplevelPanel.Children.Count - 1] as FrameworkElement, true); + } + } + + //Refresh anchor style + DockablePane paneToAnchorAsDockablePane = paneToAnchor as DockablePane; + + if (paneToAnchorAsDockablePane != null) + { + paneToAnchorAsDockablePane.Anchor = anchor; + } + + + + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Right) + { + double w = Math.Min( + ActualWidth / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Width); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + } + else + { + double h = Math.Min( + ActualHeight / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Height); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); + } + + //refresh contents state + foreach (ManagedContent content in paneToAnchor.Items) + { + if (content is DockableContent) + { + ((DockableContent)content).SetStateToDock(); + } + } + + + paneToAnchor.Focus(); + toplevelPanel.InvalidateMeasure(); + } + + /// + /// Anchor a pane ( and ) to a border of a another pane + /// + /// Pane to anchor + /// Pane relative + /// Position relative to the target pane + public void Anchor(Pane paneToAnchor, Pane relativePane, AnchorStyle anchor) + { + //ensure that content property is not empty + EnsureContentNotEmpty(); + + if (anchor == AnchorStyle.None) + anchor = AnchorStyle.Right; + + //Change anchor border according to FlowDirection + if (FlowDirection == FlowDirection.RightToLeft) + { + if (anchor == AnchorStyle.Right) + anchor = AnchorStyle.Left; + else if (anchor == AnchorStyle.Left) + anchor = AnchorStyle.Right; + } + + if (paneToAnchor is DockablePane && + relativePane is DockablePane) + Anchor(paneToAnchor as DockablePane, relativePane as DockablePane, anchor); + else if (paneToAnchor is DockablePane && + relativePane is DocumentPane) + Anchor(paneToAnchor as DockablePane, relativePane as DocumentPane, anchor); + else if (paneToAnchor is DocumentPane && + relativePane is DocumentPane) + Anchor(paneToAnchor as DocumentPane, relativePane as DocumentPane, anchor); + else + throw new InvalidOperationException(); + + CheckForSingleChildPanels(); + } + + + /// + /// Anchor a dockable pane () to a border of a document pane + /// + /// Pane to anchor + /// Pane relative + /// + public void Anchor(DockablePane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor) + { + //ensure that content property is not empty + EnsureContentNotEmpty(); + + if (anchor == AnchorStyle.None) + anchor = AnchorStyle.Right; + + //get a reference to the resizingpanel container of relativePane + ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; + DocumentPaneResizingPanel relativeDocumentPaneContainer = relativePane.GetParentDocumentPaneResizingPanel(); + Orientation requestedOrientation = + (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; + + if (relativePaneContainer == null) + { + Debug.Assert(relativePane.Parent == this); + + this.Content = null; + + relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); + relativeDocumentPaneContainer.Children.Add(relativePane); + + relativePaneContainer = new ResizingPanel(); + relativePaneContainer.Orientation = requestedOrientation; + + this.Content = relativePaneContainer; + + relativePaneContainer.Children.Add(relativeDocumentPaneContainer); + } + + if (relativeDocumentPaneContainer == null) + { + relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); + relativeDocumentPaneContainer.Orientation = requestedOrientation; + + + int indexOfPaneToReplace = relativePaneContainer.Children.IndexOf(relativePane); + relativePaneContainer.Children.RemoveAt(indexOfPaneToReplace); + + relativeDocumentPaneContainer.Children.Add(relativePane); + + relativePaneContainer.Children.Insert(indexOfPaneToReplace, relativeDocumentPaneContainer); + } + + relativePaneContainer = LogicalTreeHelper.GetParent(relativeDocumentPaneContainer) as ResizingPanel; + + //Debug.Assert(relativePaneContainer is DocumentPaneResizingPanel, "By now we can't have a pane without a resizing panel containing it"); + if (relativePaneContainer == null) + { + Debug.Assert(relativeDocumentPaneContainer.Parent == this); + + this.Content = null; + + relativePaneContainer = new ResizingPanel(); + relativePaneContainer.Orientation = requestedOrientation; + + this.Content = relativePaneContainer; + + relativePaneContainer.Children.Add(relativeDocumentPaneContainer); + } + + #region Create and setup container panel + if (relativePaneContainer != null) + { + //check if orientation is right + if (relativePaneContainer.Orientation != requestedOrientation) + { + //if the existing panel is not oriented as we want + //create a new one + ResizingPanel newPanel = new ResizingPanel(); + newPanel.Orientation = requestedOrientation; + + + if (newPanel.Orientation == Orientation.Horizontal) + ResizingPanel.SetResizeHeight(newPanel, ResizingPanel.GetResizeHeight(relativePane)); + else + ResizingPanel.SetResizeWidth(newPanel, ResizingPanel.GetResizeWidth(relativePane)); + + + //replace relative pane in its' container panel + //with this new panel + int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativeDocumentPaneContainer); + relativePaneContainer.Children.Remove(relativeDocumentPaneContainer); + relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); + + //now we have a panel correctly placed in the tree + newPanel.Children.Add(relativeDocumentPaneContainer); + + //use InsertChildRelativeTo function to add a resizingsplitter between + //the two children + newPanel.InsertChildRelativeTo( + paneToAnchor, relativeDocumentPaneContainer, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); + } + else + { + + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Top) + { + //add new child before first (prepend) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativeDocumentPaneContainer, false); + } + else + { + //add new child after last (append) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativeDocumentPaneContainer, true); + } + } + + } + + relativePaneContainer.InvalidateMeasure(); + #endregion + + + + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Right) + { + double w = Math.Min( + ResizingPanel.GetEffectiveSize(relativePane).Width / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Width); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + } + else + { + double h = Math.Min( + ResizingPanel.GetEffectiveSize(relativePane).Height / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Height); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); + } + + //refresh contents state + foreach (DockableContent draggedContent in paneToAnchor.Items) + { + draggedContent.SetStateToDock(); + } + + + //than set the new anchor style for the pane + paneToAnchor.Anchor = anchor; + paneToAnchor.Focus(); + } + + /// + /// Anchor a document pane () to a border of an other document pane + /// + /// Pane to anchor + /// Pane relative + /// + public void Anchor(DocumentPane paneToAnchor, DocumentPane relativePane, AnchorStyle anchor) + { + //ensure that content property is not empty + EnsureContentNotEmpty(); + + if (anchor == AnchorStyle.None) + anchor = AnchorStyle.Right; + + //get a reference to the resizingpanel container of relativePane + ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; + DocumentPaneResizingPanel relativeDocumentPaneContainer = relativePane.GetParentDocumentPaneResizingPanel(); + Orientation requestedOrientation = + (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; + + if (relativePaneContainer == null) + { + Debug.Assert(relativePane.Parent == this); + + + relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); + relativePaneContainer = relativeDocumentPaneContainer; + + relativeDocumentPaneContainer.Orientation = requestedOrientation; + this.Content = relativePaneContainer; + + relativePaneContainer.Children.Add(relativePane); + + } + + if (relativeDocumentPaneContainer == null) + { + relativeDocumentPaneContainer = new DocumentPaneResizingPanel(); + relativeDocumentPaneContainer.Orientation = requestedOrientation; + + + int indexOfPaneToReplace = relativePaneContainer.Children.IndexOf(relativePane); + relativePaneContainer.Children.RemoveAt(indexOfPaneToReplace); + + relativeDocumentPaneContainer.Children.Add(relativePane); + + relativePaneContainer.Children.Insert(indexOfPaneToReplace, relativeDocumentPaneContainer); + + relativePaneContainer = relativeDocumentPaneContainer; + } + + Debug.Assert(relativePaneContainer != null, "By now we can't have a pane without a resizing panel containing it"); + + #region Create and setup container panel + if (relativePaneContainer != null) + { + //check if orientation is right + if (relativePaneContainer.Orientation != requestedOrientation) + { + //if the existing panel is not oriented as we want + //create a new one + DocumentPaneResizingPanel newPanel = new DocumentPaneResizingPanel(); + newPanel.Orientation = requestedOrientation; + + //replace relative pane in its' container panel + //with this new panel + int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativePane); + relativePaneContainer.Children.Remove(relativePane); + relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); + + //now we have a panel correctly placed in the tree + newPanel.Children.Add(relativePane); + + //use InsertChildRelativeTo function to add a resizingsplitter between + //the two children + newPanel.InsertChildRelativeTo( + paneToAnchor, relativePane, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); + + relativePaneContainer = newPanel; + } + else + { + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Top) + { + //add new child before first (prepend) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativePane, false); + } + else + { + //add new child after last (append) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativePane, true); + } + + if (relativePaneContainer.Orientation == Orientation.Horizontal) + { + Size desideredSize = ResizingPanel.GetEffectiveSize(paneToAnchor); + double approxStarForNewPane = desideredSize.Width / relativePaneContainer.ActualWidth; + approxStarForNewPane = Math.Min(approxStarForNewPane, 1.0); + paneToAnchor.SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(approxStarForNewPane, GridUnitType.Star)); + } + } + + relativePaneContainer.InvalidateMeasure(); + } + #endregion + + paneToAnchor.Focus(); + + //(paneToAnchor.SelectedItem as ManagedContent).Activate(); + //if (paneToAnchor.SelectedItem is DocumentContent) + // ActiveDocument = paneToAnchor.SelectedItem as DocumentContent; + + paneToAnchor.SelectedIndex = 0; + } + + /// + /// Anchor a dockable pane () to a border of an other dockable pane + /// + /// Pane to anchor + /// Pane relative + /// + public void Anchor(DockablePane paneToAnchor, DockablePane relativePane, AnchorStyle anchor) + { + //ensure that content property is not empty + EnsureContentNotEmpty(); + + if (anchor == AnchorStyle.None) + anchor = AnchorStyle.Right; + + //get a refernce to the resizingpanel container of relativePane + ResizingPanel relativePaneContainer = LogicalTreeHelper.GetParent(relativePane) as ResizingPanel; + Orientation requestedOrientation = + (anchor == AnchorStyle.Bottom || anchor == AnchorStyle.Top) ? Orientation.Vertical : Orientation.Horizontal; + + if (relativePaneContainer == null) + { + Debug.Assert(relativePane.Parent == this); + + relativePaneContainer = new ResizingPanel(); + relativePaneContainer.Orientation = requestedOrientation; + this.Content = relativePaneContainer; + relativePaneContainer.Children.Add(relativePane); + } + + Debug.Assert(relativePaneContainer != null, "By now we can't have a pane without a resizing panel containing it"); + + #region Create and setup container panel + if (relativePaneContainer != null) + { + //check if orientation is right + if (relativePaneContainer.Orientation != requestedOrientation) + { + //if the existing panel is not oriented as we want + //create a new one + ResizingPanel newPanel = new ResizingPanel(); + newPanel.Orientation = requestedOrientation; + + if (newPanel.Orientation == Orientation.Horizontal) + ResizingPanel.SetResizeHeight(newPanel, ResizingPanel.GetResizeHeight(relativePane)); + else + ResizingPanel.SetResizeWidth(newPanel, ResizingPanel.GetResizeWidth(relativePane)); + + //replace relative pane in its' container panel + //with this new panel + int indexofRelativePane = relativePaneContainer.Children.IndexOf(relativePane); + relativePaneContainer.Children.Remove(relativePane); + relativePaneContainer.Children.Insert(indexofRelativePane, newPanel); + + //now we have a panel correctly placed in the tree + newPanel.Children.Add(relativePane); + newPanel.InsertChildRelativeTo( + paneToAnchor, relativePane, anchor == AnchorStyle.Right || anchor == AnchorStyle.Bottom); + + relativePaneContainer = newPanel; + } + else + { + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Top) + { + //add new child before first (prepend) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativePane, false); + } + else + { + //add new child after last (append) + relativePaneContainer.InsertChildRelativeTo(paneToAnchor, + relativePane, true); + } + } + + + relativePaneContainer.InvalidateMeasure(); + } + #endregion + + //than set the new anchor style for the pane + paneToAnchor.Anchor = relativePane.Anchor; + + if (anchor == AnchorStyle.Left || + anchor == AnchorStyle.Right) + { + double w = Math.Min( + ResizingPanel.GetEffectiveSize(relativePane).Width / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Width); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(w, GridUnitType.Pixel)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + } + else + { + double h = Math.Min( + ResizingPanel.GetEffectiveSize(relativePane).Height / 2.0, + ResizingPanel.GetEffectiveSize(paneToAnchor).Height); + ResizingPanel.SetResizeWidth(paneToAnchor, new GridLength(1.0, GridUnitType.Star)); + ResizingPanel.SetResizeHeight(paneToAnchor, new GridLength(h, GridUnitType.Pixel)); + } + + //refresh contents state + foreach (DockableContent draggedContent in paneToAnchor.Items) + { + draggedContent.SetStateToDock(); + } + + if (relativePaneContainer != null) + relativePaneContainer.AdjustPanelSizes(); + + paneToAnchor.Focus(); + } + + #region DropInto methods + internal void DropInto(Pane paneDragged, Pane paneToDropInto) + { + if (paneDragged is DockablePane && + paneToDropInto is DockablePane) + DropInto(paneDragged as DockablePane, paneToDropInto as DockablePane); + else if (paneDragged is DockablePane && + paneToDropInto is DocumentPane) + DropInto(paneDragged as DockablePane, paneToDropInto as DocumentPane); + else if (paneDragged is DocumentPane && + paneToDropInto is DocumentPane) + DropInto(paneDragged as DocumentPane, paneToDropInto as DocumentPane); + else + throw new InvalidOperationException(); + } + internal void DropInto(DocumentPane paneDragged, DocumentPane paneToDropInto) + { + //transfer tha contents of dragged pane (conatined in a FloatingWindow) + //to the pane which user select + ManagedContent contentToFocus = null; + while (paneDragged.Items.Count > 0) + { + ManagedContent contentToTransfer = paneDragged.RemoveContent(0); + paneToDropInto.Items.Insert(0, contentToTransfer); + contentToFocus = contentToTransfer; + } + + + paneToDropInto.SelectedIndex = 0; + paneToDropInto.Focus(); + if (contentToFocus != null) + contentToFocus.Activate(); + } + internal void DropInto(DockablePane paneDragged, DocumentPane paneToDropInto) + { + //if (paneToDropInto != MainDocumentPane) + // paneToDropInto = MainDocumentPane; + + //transfer contents of dragged pane (contained in a FloatingWindow) + //to the pane which user select, taking care of setting contents state + //to Dock (using Dock() method of class DockablePane). + while (paneDragged.Items.Count > 0) + { + ManagedContent contentToTransfer = paneDragged.RemoveContent(0); + paneToDropInto.Items.Add(contentToTransfer); + + + DockableContent dockContentToTransfer = contentToTransfer as DockableContent; + + if (dockContentToTransfer != null) + dockContentToTransfer.SetStateToDocument(); + } + + paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1; + paneToDropInto.Focus(); + } + internal void DropInto(DockablePane paneDragged, DockablePane paneToDropInto) + { + //transfer tha contents of dragged pane (conatined in a FloatingWindow) + //to the pane which user select, taking care of setting contents state + //to Dock (using Dock() method of class DockablePane). + while (paneDragged.Items.Count > 0) + { + ManagedContent contentToTransfer = paneDragged.RemoveContent(0); + paneToDropInto.Items.Add(contentToTransfer); + + + DockableContent dockContentToTransfer = contentToTransfer as DockableContent; + + if (dockContentToTransfer != null) + dockContentToTransfer.SetStateToDock(); + } + + + paneToDropInto.SelectedIndex = paneToDropInto.Items.Count - 1; + paneToDropInto.Focus(); + } + #endregion + + bool RemoveContentFromTabGroup(DockableContent contentToRemove) + { + foreach (Panel anchorTabPanel in _anchorTabPanels) + { + foreach (DockablePaneAnchorTabGroup group in anchorTabPanel.Children) + { + foreach (DockablePaneAnchorTab tab in group.Children) + { + if (tab.ReferencedContent == contentToRemove) + { + group.Children.Remove(tab); + if (group.Children.Count == 0) + anchorTabPanel.Children.Remove(group); + + return true; + } + } + } + } + + return false; + } + + /// + /// Remove a pane from border tab groups + /// + /// Pane to remove + /// True if pane was removed, false otherwise + bool RemovePaneFromTabGroups(DockablePane paneToRemove) + { + foreach (Panel anchorTabPanel in _anchorTabPanels) + { + foreach (DockablePaneAnchorTabGroup group in anchorTabPanel.Children) + { + if (group.ReferencedPane == paneToRemove) + { + anchorTabPanel.Children.Remove(group); + return true; + } + } + } + + return false; + } + + /// + /// Check if only vali panes are referenced by anchor tabs + /// + void CheckValidPanesFromTabGroups() + { + if (RestoringLayout) + return; + + foreach (var anchorTabPanel in _anchorTabPanels) + { + foreach (var group in anchorTabPanel.Children.Cast().ToArray()) + { + if (group.ReferencedPane.GetManager() != this) + { + anchorTabPanel.Children.Remove(group); + } + } + } + + if (_flyoutWindow != null && + _flyoutWindow.ReferencedPane != null && + _flyoutWindow.ReferencedPane.Items.Count == 1) + { + var cntFlyingOut = _flyoutWindow.ReferencedPane.Items[0] as ManagedContent; + if (((FlyoutDockablePane)cntFlyingOut.ContainerPane).ReferencedPane.GetManager() != this) + HideFlyoutWindow(); + } + } + + [Conditional("DEBUG")] + void CheckForSingleChildPanels() + { + //Debug.Assert(! + //new LogicalTreeAdapter(this).Descendants().Any( + // di => di.Item is ResizingPanel && ((ResizingPanel)di.Item).Children.Count == 1) + //); + } + + /// + /// Autohides/redock a dockable pane + /// + /// Pane to auto hide/redock + internal void ToggleAutoHide(DockablePane pane) + { + if (!_OnApplyTemplateFlag) + { + Debug.WriteLine("Layout has been restored before creating DockingManager object: force WPF to apply the template..."); + ApplyTemplate(); + } + + + //if pane is in auto hide state then is found + //referenced by a DockablePaneAnchorTabGroup + //if so redock it in its original position + if (RemovePaneFromTabGroups(pane)) + { + #region Pane is present in tab anchor panels + DockableContent selectedContent = + _flyoutWindow != null && + _flyoutWindow.ReferencedPane != null && + _flyoutWindow.ReferencedPane.Items.Count > 0 ? _flyoutWindow.ReferencedPane.Items[0] as DockableContent : + pane.Items[0] as DockableContent; + + HideFlyoutWindow(); + + ResizingPanel parentPanel = pane.Parent as ResizingPanel; + if (parentPanel != null && parentPanel.Children.Count >= 3) + { + parentPanel.AdjustPanelSizes(); + } + + //reset content state to docked + foreach (DockableContent content in pane.Items) + { + content.SetStateToDock(); + } + + pane.Focus(); + pane.SelectedItem = selectedContent; + ActiveContent = selectedContent; + #endregion + } + else + { + #region Pane is not auto hidden + //Create e new group + DockablePaneAnchorTabGroup group = new DockablePaneAnchorTabGroup(); + + //associate it to the pane + group.ReferencedPane = pane; + + DockableContent selectedContent = pane.SelectedItem as DockableContent; + + //add contents to it + foreach (DockableContent content in pane.Items) + { + DockablePaneAnchorTab tab = new DockablePaneAnchorTab(); + tab.ReferencedContent = content; + //tab.Anchor = pane.Anchor; + //tab.Icon = content.Icon; + + + group.Children.Add(tab); + content.SetStateToAutoHide(); + } + + //place group under correct anchor tabpanel + switch (pane.Anchor) + { + case AnchorStyle.Left: + if (_leftAnchorTabPanel != null) + _leftAnchorTabPanel.Children.Add(group); + break; + case AnchorStyle.Top: + if (_topAnchorTabPanel != null) + _topAnchorTabPanel.Children.Add(group); + break; + case AnchorStyle.Right: + if (_rightAnchorTabPanel != null) + _rightAnchorTabPanel.Children.Add(group); + break; + case AnchorStyle.Bottom: + if (_bottomAnchorTabPanel != null) + _bottomAnchorTabPanel.Children.Add(group); + break; + } + + #endregion + } + + //refresh arrangements traversing bottom-up visual tree + FrameworkElement parentElement = pane.Parent as FrameworkElement; + + while (parentElement != null) + { + parentElement.InvalidateMeasure(); + parentElement = parentElement.Parent as FrameworkElement; + } + + + } + + #endregion + + #region Hide/Show contents + + +// #region HiddenContents + +// /// +// /// HiddenContents Read-Only Dependency Property +// /// +// private static readonly DependencyPropertyKey HiddenContentsPropertyKey +// = DependencyProperty.RegisterReadOnly("HiddenContents", typeof(ManagedContentCollection), typeof(DockingManager), +// new FrameworkPropertyMetadata((ManagedContentCollection)null)); + +// public static readonly DependencyProperty HiddenContentsProperty +// = HiddenContentsPropertyKey.DependencyProperty; + +// /// +// /// Gets the HiddenContents property. This dependency property +// /// returns the list of object that are in hidden state. +// /// +// public ManagedContentCollection HiddenContents +// { +// get { return (ManagedContentCollection)GetValue(HiddenContentsProperty); } +// protected set { SetValue(HiddenContentsPropertyKey, value); } +// } + +// #endregion + +//#if DEBUG +// internal void CheckHiddenState(DockableContent contentToCheck) +// { +// if (contentToCheck.State == DockableContentState.Hidden) +// Debug.Assert(HiddenContents.Contains(contentToCheck)); +// else +// Debug.Assert(!HiddenContents.Contains(contentToCheck)); +// } +//#endif + + /// + /// Hide a dockable content removing it from its container + /// + /// Content to hide + /// Note that if you simply remove a content from its container without calling this method, the + /// layout serializer component can't managed correctly the removed content. + internal void Hide(DockableContent content) + { + if (content.State == DockableContentState.Hidden) + { + DockableContents.Add(content); + return; + } + + if (!content.IsCloseable) + return; + + if (content.State != DockableContentState.FloatingWindow && + content.State != DockableContentState.DockableWindow) + { + //save position only if hiding from a docked or autohidden pane + content.SaveCurrentStateAndPosition(); + } + + if (content.State == DockableContentState.AutoHide) + { + HideFlyoutWindow(); + RemoveContentFromTabGroup(content); + } + + if (content.State == DockableContentState.FloatingWindow || + content.State == DockableContentState.DockableWindow) + { + DockableFloatingWindow floatingWindow = Window.GetWindow(content) as DockableFloatingWindow; + + if (floatingWindow != null && + (floatingWindow.Content as Pane).HasSingleItem && + !floatingWindow.IsClosing) + { + floatingWindow.Close(); + } + } + + if (content.State != DockableContentState.Hidden) + { + DockableContents.Add(content); + + content.SetStateToHidden(); + content.DetachFromContainerPane(); + } + + if (ActiveDocument == content) + ActiveDocument = null; + + if (ActiveContent == content) + ActiveContent = null; + } + + /// + /// Show or add a document in AvalonDock + /// + /// Document to show/add. + /// If document provided is not present in the list, this method inserts it in first position of collection. + /// In both cases select it in the container . + internal void Show(DocumentContent document) + { + bool found = Documents.FirstOrDefault(d => d == document) != null; + + if (!found && MainDocumentPane != null) + { + if (document.Parent is DocumentPane) + { + ((DocumentPane)document.Parent).Items.Clear(); + } + + MainDocumentPane.Items.Insert(0, document); + } + + } + + /// + /// Show or add a document in AvalonDock + /// + /// Document to show/add. + /// Indicates if the document should be placed in a floating window + /// If document provided is not present in the list, this method inserts it in first position of collection. + /// In both cases select it in the container . + internal void Show(DocumentContent document, bool floating) + { + bool found = Documents.FirstOrDefault(d => d == document) != null; + + if (!found && MainDocumentPane != null) + { + if (document.Parent is DocumentPane) + { + ((DocumentPane)document.Parent).Items.Clear(); + } + + if (floating) + { + DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this); + floatingWindow.Content = document; + floatingWindow.Show(); + } + else + MainDocumentPane.Items.Insert(0, document); + } + else if (found && document.ContainerPane is FloatingDocumentPane) + { + var containerPane = document.ContainerPane as FloatingDocumentPane; + DocumentPane previousPane = containerPane.PreviousPane; + int arrayIndexPreviuosPane = containerPane.ArrayIndexPreviousPane; + //if previous pane exist that redock to it + if (previousPane == null || + previousPane.GetManager() != this) + { + previousPane = MainDocumentPane; + arrayIndexPreviuosPane = 0; + } + + if (previousPane != null) + { + if (arrayIndexPreviuosPane > previousPane.Items.Count) + arrayIndexPreviuosPane = previousPane.Items.Count; + + previousPane.Items.Insert(arrayIndexPreviuosPane, + containerPane.RemoveContent(0)); + } + + containerPane.FloatingWindow.Close(); + } + + } + + /// + /// Show a dockable content in its container + /// + /// Content to show + internal void Show(DockableContent content) + { + //if desideredState is not defined, use the saved state if exists + if (content.SavedStateAndPosition != null) + Show(content, content.SavedStateAndPosition.State); + else + Show(content, DockableContentState.Docked); + } + + /// + /// Show a dockable content in its container with a desidered state + /// + /// Content to show + /// State desidered + internal void Show(DockableContent content, DockableContentState desideredState) + { + Show(content, desideredState, AnchorStyle.None); + } + + /// + /// Show a dockable content in its container with a desidered state + /// + /// Content to show + /// State desidered + /// Border to which anchor the newly created container pane + /// + internal void Show(DockableContent content, DockableContentState desideredState, AnchorStyle desideredAnchor) + { + Debug.WriteLine(string.Format("Show Content={0}, desideredState={1}, desideredAnchor={2}", content.Name, desideredState, desideredAnchor)); + + #region Dockable content + + if (desideredState == DockableContentState.Hidden)//??!!show hidden? + Hide(content); + + if (content.State == DockableContentState.AutoHide) + { + //first redock the content + (content.ContainerPane as DockablePane).ToggleAutoHide(); + //then show it as desidered + Show(content, desideredState, desideredAnchor); + } + else if (content.State == DockableContentState.Docked || + content.State == DockableContentState.Document || + content.State == DockableContentState.None) + { + if (content.ContainerPane == null || + content.State == DockableContentState.None) + { + //Problem!? try to rescue + if (content.State == DockableContentState.Docked || + content.State == DockableContentState.None) + { + //find the the pane which the desidered anchor style + //DockablePane foundPane = this.FindChildDockablePane(desideredAnchor != AnchorStyle.None ? desideredAnchor : AnchorStyle.Right); + //first search for a pane with other contents (avoiding empty panes which are containers for hidden contents) + ILinqToTree itemFound = new LogicalTreeAdapter(this).Descendants().FirstOrDefault(el => el.Item is DockablePane && (el.Item as DockablePane).Anchor == desideredAnchor && (el.Item as DockablePane).IsDocked); + + if (itemFound == null)//search for all panes (even empty) + itemFound = new LogicalTreeAdapter(this).Descendants().FirstOrDefault(el => el.Item is DockablePane && (el.Item as DockablePane).Anchor == desideredAnchor && (el.Item as DockablePane).Items.Count == 0); + + DockablePane foundPane = itemFound != null ? itemFound.Item as DockablePane : null; + + if (foundPane != null) + { + content.SetStateToDock(); + foundPane.Items.Add(content); + var containerPanel = foundPane.Parent as ResizingPanel; + if (containerPanel != null) + containerPanel.InvalidateMeasure(); + } + else + { + //if no suitable pane was found create e new one on the fly + DockablePane pane = new DockablePane(); + pane.Items.Add(content); + Anchor(pane, desideredAnchor); + } + } + else + { + //add to main document pane + MainDocumentPane.Items.Add(content); + } + + } + + if (content.ContainerPane.GetManager() == null) + { + //disconnect the parent pane from previous panel + //((Panel)content.ContainerPane.Parent).Children.Remove(content.ContainerPane); + if (content.ContainerPane.Parent != null) + { + ((Panel)content.ContainerPane.Parent).Children.Remove(content.ContainerPane); + } + + Anchor(content.ContainerPane as DockablePane, desideredAnchor); + } + + if (desideredState == DockableContentState.DockableWindow || + desideredState == DockableContentState.FloatingWindow) + { + var floatingWindow = new DockableFloatingWindow(this); + floatingWindow.Content = content; + + var mainWindow = Window.GetWindow(this); + if (mainWindow.IsVisible) + floatingWindow.Owner = mainWindow; + + //floatingWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; + //if (content.Content != null) + //{ + // floatingWindow.Width = Math.Min(((FrameworkElement)content.Content).ActualWidth, ResizingPanel.GetResizeWidth(content.ContainerPane)); + // floatingWindow.Height = Math.Min(((FrameworkElement)content.Content).ActualHeight, ResizingPanel.GetResizeHeight(content.ContainerPane)); + //} + //else + ////{ + // floatingWindow.Width = 400; + // floatingWindow.Height = 400; + //} + + floatingWindow.Show(); + + + } + else if (desideredState == DockableContentState.AutoHide) + { + var paneContainer = content.ContainerPane as DockablePane; + Debug.Assert(paneContainer != null); + + if (paneContainer != null) + paneContainer.ToggleAutoHide(); + + content.Activate(); + } + else if (desideredState == DockableContentState.Document) + { + DocumentPane docPane = MainDocumentPane; + if (docPane != null) + { + docPane.Items.Add(content.DetachFromContainerPane()); + docPane.SelectedItem = content; + content.SetStateToDocument(); + } + } + else + { + content.ContainerPane.SelectedItem = content; + content.Activate(); + + DockablePane dockParent = content.ContainerPane as DockablePane; + if (content.ActualWidth == 0.0 && ( + dockParent.Anchor == AnchorStyle.Left || dockParent.Anchor == AnchorStyle.Right)) + { + ResizingPanel.SetResizeWidth(dockParent, new GridLength(200)); + ResizingPanel.SetEffectiveSize(dockParent, new Size(200, 0.0)); + } + else if (content.ActualWidth == 0.0 && ( + dockParent.Anchor == AnchorStyle.Left || dockParent.Anchor == AnchorStyle.Right)) + { + ResizingPanel.SetResizeWidth(dockParent, new GridLength(200)); + ResizingPanel.SetEffectiveSize(dockParent, new Size(200, 0.0)); + } + + } + } + else if (content.State == DockableContentState.Document) + { + if (content.ContainerPane != null) + content.ContainerPane.SelectedItem = this; + content.Activate(); + } + else if (content.State == DockableContentState.Hidden || + content.State == DockableContentState.DockableWindow || + content.State == DockableContentState.FloatingWindow) + { + if (content.State == DockableContentState.Hidden) + { + //Debug.Assert(HiddenContents.Contains(content)); + //HiddenContents.Remove(content); + } + else + { + FloatingWindow floatingWindow = null; + floatingWindow = (content.ContainerPane as FloatingDockablePane).FloatingWindow; + content.DetachFromContainerPane(); + + if (floatingWindow.HostedPane.Items.Count == 0) + floatingWindow.Close(); + } + + if (desideredState == DockableContentState.Docked || + desideredState == DockableContentState.AutoHide) + { + + if (content.SavedStateAndPosition != null && + content.SavedStateAndPosition.ContainerPane != null && + content.SavedStateAndPosition.ChildIndex >= 0 && + content.SavedStateAndPosition.ContainerPane.GetManager() == this && + desideredState == DockableContentState.Docked) + { + //ok previous container pane is here.. + Pane prevPane = content.SavedStateAndPosition.ContainerPane; + + if (content.SavedStateAndPosition.ChildIndex < prevPane.Items.Count) + { + prevPane.Items.Insert(content.SavedStateAndPosition.ChildIndex, content); + } + else + { + prevPane.Items.Add(content); + } + + if (prevPane.Items.Count == 1) + { + if (!double.IsNaN(content.SavedStateAndPosition.Width) || + !double.IsInfinity(content.SavedStateAndPosition.Width)) + { + ResizingPanel.SetResizeWidth(content, + new GridLength(content.SavedStateAndPosition.Width)); + } + } + + DockablePane prevDockablePane = prevPane as DockablePane; + if (prevDockablePane != null && prevDockablePane.IsAutoHidden) + { + prevDockablePane.ToggleAutoHide(); + } + + content.SetStateToDock(); + content.Activate(); + + (prevPane.Parent as UIElement).InvalidateMeasure(); + } + else + { + if (desideredAnchor == AnchorStyle.None && + content.SavedStateAndPosition != null && + content.SavedStateAndPosition.Anchor != AnchorStyle.None) + desideredAnchor = content.SavedStateAndPosition.Anchor; + + if (desideredAnchor == AnchorStyle.None) + desideredAnchor = AnchorStyle.Right; + + DockablePane foundPane = null; + + if (desideredState == DockableContentState.Docked) + { + //first not empty panes + ILinqToTree itemFound = new LogicalTreeAdapter(this).Descendants().FirstOrDefault(el => el.Item is DockablePane && (el.Item as DockablePane).Anchor == desideredAnchor && (el.Item as DockablePane).IsDocked); + + if (itemFound == null)//look for all panes even empty + itemFound = new LogicalTreeAdapter(this).Descendants().FirstOrDefault(el => el.Item is DockablePane && (el.Item as DockablePane).Anchor == desideredAnchor && (el.Item as DockablePane).Items.Count == 0); + + foundPane = itemFound != null ? itemFound.Item as DockablePane : null; + } + + if (foundPane != null) + { + content.SetStateToDock(); + foundPane.Items.Add(content); + + if ((foundPane.IsAutoHidden && desideredState == DockableContentState.Docked) || + (!foundPane.IsAutoHidden && desideredState == DockableContentState.AutoHide)) + foundPane.ToggleAutoHide(); + } + else + { + DockablePane newHostpane = new DockablePane(); + newHostpane.Items.Add(content); + + if (desideredAnchor == AnchorStyle.Left || + desideredAnchor == AnchorStyle.Right) + { + double w = 200; + if (content.SavedStateAndPosition != null && + !double.IsInfinity(content.SavedStateAndPosition.Width) && + !double.IsNaN(content.SavedStateAndPosition.Width)) + w = content.SavedStateAndPosition.Width; + + ResizingPanel.SetResizeWidth(newHostpane, new GridLength(w)); + ResizingPanel.SetEffectiveSize(newHostpane, new Size(w, 0.0)); + } + else + { + double h = 200; + if (content.SavedStateAndPosition != null && + !double.IsInfinity(content.SavedStateAndPosition.Height) && + !double.IsNaN(content.SavedStateAndPosition.Height)) + h = content.SavedStateAndPosition.Height; + + ResizingPanel.SetResizeHeight(newHostpane, new GridLength(h)); + ResizingPanel.SetEffectiveSize(newHostpane, new Size(0.0, h)); + } + + + Anchor(newHostpane, desideredAnchor); + + if (desideredState == DockableContentState.AutoHide) + { + ToggleAutoHide(newHostpane); + } + } + } + + ActiveContent = content; + } + else if (desideredState == DockableContentState.DockableWindow || + desideredState == DockableContentState.FloatingWindow) + { + DockablePane newHostpane = null; + FloatingDockablePane prevHostpane = null; + if (content.SavedStateAndPosition != null && content.SavedStateAndPosition.ContainerPane != null && content.SavedStateAndPosition.ContainerPane is FloatingDockablePane) + { + prevHostpane = content.SavedStateAndPosition.ContainerPane as FloatingDockablePane; + if (!prevHostpane.Items.Contains(content)) + prevHostpane.Items.Add(content); + } + else + { + newHostpane = new DockablePane(); + newHostpane.Items.Add(content); + + } + + if (desideredState == DockableContentState.DockableWindow) + content.SetStateToDockableWindow(); + else if (desideredState == DockableContentState.FloatingWindow) + content.SetStateToFloatingWindow(); + + if (prevHostpane != null) + { + //check to see if floating window that host prevHostPane is already loaded (hosting other contents) + var floatingWindow = prevHostpane.Parent as DockableFloatingWindow; + if (floatingWindow != null && floatingWindow.IsLoaded) + { + floatingWindow.Activate(); + } + else + { + floatingWindow = new DockableFloatingWindow(this); + floatingWindow.Content = content; + floatingWindow.WindowStartupLocation = WindowStartupLocation.Manual; + floatingWindow.Top = prevHostpane.FloatingWindow.Top; + floatingWindow.Left = prevHostpane.FloatingWindow.Left; + floatingWindow.Width = prevHostpane.FloatingWindow.Width; + floatingWindow.Height = prevHostpane.FloatingWindow.Height; + //floatingWindow.Owner = Window.GetWindow(this); + var mainWindow = Window.GetWindow(this); + if (mainWindow.IsVisible) + floatingWindow.Owner = mainWindow; + + + + //now I've created a new pane to host the hidden content + //if a an hidden content is shown that has prevHostpane as saved pane + //I want that it is relocated in this new pane that I've created right now + var hiddenContents = DockableContents.Where(c => c.State == DockableContentState.Hidden).ToArray(); + foreach (var hiddenContent in hiddenContents) + { + if (hiddenContent.SavedStateAndPosition.ContainerPane == prevHostpane) + { + hiddenContent.SavedStateAndPosition = new DockableContentStateAndPosition( + (floatingWindow.Content as Pane), + hiddenContent.SavedStateAndPosition.ChildIndex, + hiddenContent.SavedStateAndPosition.Width, + hiddenContent.SavedStateAndPosition.Height, + hiddenContent.SavedStateAndPosition.Anchor, + hiddenContent.SavedStateAndPosition.State); + } + } + + floatingWindow.Show(); + } + } + else if (newHostpane != null) + { + var floatingWindow = new DockableFloatingWindow(this); + floatingWindow.Content = newHostpane; + floatingWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; + floatingWindow.Width = 200; + floatingWindow.Height = 500; + //floatingWindow.Owner = Window.GetWindow(this); + var mainWindow = Window.GetWindow(this); + if (mainWindow.IsVisible) + floatingWindow.Owner = mainWindow; + + + floatingWindow.Show(); + } + + } + else if (desideredState == DockableContentState.Document) + { + DocumentPane docPane = MainDocumentPane; + if (docPane != null) + { + docPane.Items.Add(content); + docPane.SelectedItem = content; + content.SetStateToDocument(); + } + } + } + + #endregion + +//#if DEBUG +// CheckHiddenState(content); +//#endif + } + #endregion + + + #region Anchor Style Update routines + protected override Size ArrangeOverride(Size arrangeBounds) + { + //at the moment this is the easy way to get anchor properties always updated + if (this.Content as ResizingPanel != null) + UpdateAnchorStyle(); + + return base.ArrangeOverride(arrangeBounds); + } + + internal void UpdateAnchorStyle() + { + ResizingPanel mainPanel = this.Content as ResizingPanel; + Debug.Assert(mainPanel != null); + + + UpdateAnchorStyle(mainPanel); + } + + /// + /// Update the property relative to the object + /// + /// + /// + /// Traverse the logical tree starting from root and set property of dockable pane found. + void UpdateAnchorStyle(ResizingPanel panel) + { + AnchorStyle currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Left : AnchorStyle.Top; + bool foundDocumentContent = false; + + foreach (FrameworkElement child in panel.Children) + { + if (child is ResizingPanel) + { + if (!foundDocumentContent && + GetMainDocumentPane(child as ResizingPanel) != null) + { + foundDocumentContent = true; + currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Right : AnchorStyle.Bottom; + UpdateAnchorStyle(child as ResizingPanel); + } + else + ForceAnchorStyle(child as ResizingPanel, currentAnchor); + } + else if (child is DocumentPane) + { + foundDocumentContent = true; + currentAnchor = panel.Orientation == Orientation.Horizontal ? AnchorStyle.Right : AnchorStyle.Bottom; + } + else if (child is DockablePane) + { + (child as DockablePane).Anchor = currentAnchor; + } + } + } + + /// + /// Called by whene a object has been found + /// + /// + /// + void ForceAnchorStyle(ResizingPanel panel, AnchorStyle forcedAnchor) + { + foreach (FrameworkElement child in panel.Children) + { + if (child is ResizingPanel) + { + ForceAnchorStyle((child as ResizingPanel), forcedAnchor); + } + else if ((child is DockablePane)) + { + ((DockablePane)child).Anchor = forcedAnchor; + } + } + } + + #endregion + + + #region Flyout window + /// + /// Stores the only one flyout window that can be open at time + /// + FlyoutPaneWindow _flyoutWindow = null; + + /// + /// This object is used to handle interop events (i.e. WindowsPosChanging) of the main window the contains this + /// DockingManager object + /// + /// WindowsPosChanging are useful to automatically resize the FlyoutWindow when user move + /// the main window. + WindowInteropWrapper _wndInteropWrapper = null; + + + /// + /// Gets or sets a value indicating if flyout windows should animate when are open or closed + /// + public bool IsAnimationEnabled + { + get { return (bool)GetValue(IsAnimationEnabledProperty); } + set { SetValue(IsAnimationEnabledProperty, value); } + } + + // Using a DependencyProperty as the backing store for IsAnimationEnabled. This enables animation, styling, binding, etc... + public static readonly DependencyProperty IsAnimationEnabledProperty = + DependencyProperty.Register("IsAnimationEnabled", typeof(bool), typeof(DockingManager), new UIPropertyMetadata(false)); + + + + /// + /// Closes the flyout window + /// + void HideFlyoutWindow() + { + if (_flyoutWindow != null && !_flyoutWindow.IsClosing) + { + _flyoutWindow.Height = 0.0; + _flyoutWindow.Width = 0.0; + _flyoutWindow.Close(); + _flyoutWindow = null; + } + } + + /// + /// Shows a flyout window for a content + /// + /// Content to show + internal void ShowFlyoutWindow(DockableContent content, DockablePaneAnchorTab tabActivating) + { + //check if parent window is Active + Window parentWindow = Window.GetWindow(this); + if (parentWindow == null || !parentWindow.IsVisible) + return; + + if (!parentWindow.IsActive && (_flyoutWindow == null || !_flyoutWindow.IsActive)) + return; + + //check if content is already visible in a flyout window + if (_flyoutWindow != null && + _flyoutWindow.ReferencedPane.Items.Contains(content)) + { + //continue to show the winow + //_flyoutWindow.KeepWindowOpen(); + return; + } + //hide previous create window + HideFlyoutWindow(); + + //select this content in the referenced pane + content.ContainerPane.SelectedItem = content; + + + if (_wndInteropWrapper == null) + { + _wndInteropWrapper = new WindowInteropWrapper(parentWindow); + _wndInteropWrapper.WindowPosChanging += (s, e) => + { + //update the flyout window + UpdateFlyoutWindowPosition(); + }; + } + + //create e new window + _flyoutWindow = new FlyoutPaneWindow(this, content); + _flyoutWindow.Owner = parentWindow; + _flyoutWindow.FlowDirection = this.FlowDirection; + _flyoutWindow.ShowActivated = false; + _flyoutWindow.AnchorTabActivating = tabActivating; + + UpdateFlyoutWindowPosition(true); + + _flyoutWindow.Closing += new System.ComponentModel.CancelEventHandler(OnFlyoutWindowClosing); + _flyoutWindow.Show(); + + //this.Focus(); + } + + /// + /// Handles the resize changed event to update location and size of the flyout window + /// + /// + protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo) + { + UpdateFlyoutWindowPosition(); + base.OnRenderSizeChanged(sizeInfo); + } + + /// + /// Handle the closing event of the flyout window to reset internal variables + /// + /// + /// + void OnFlyoutWindowClosing(object sender, System.ComponentModel.CancelEventArgs e) + { + _flyoutWindow.Closing -= new System.ComponentModel.CancelEventHandler(OnFlyoutWindowClosing); + _flyoutWindow.Owner = null; + } + + /// + /// Update location and size of the flyout window + /// + void UpdateFlyoutWindowPosition() + { + UpdateFlyoutWindowPosition(false); + } + + /// + /// Update location and size of the flyout window + /// + /// Indicates if thw current flyout window should be setup for the first time. + void UpdateFlyoutWindowPosition(bool initialSetup) + { + if (_flyoutWindow == null) + return; + + double leftTabsWidth = FlowDirection == FlowDirection.LeftToRight ? _leftAnchorTabPanel.ActualWidth : _rightAnchorTabPanel.ActualWidth; + double rightTabsWidth = FlowDirection == FlowDirection.LeftToRight ? _rightAnchorTabPanel.ActualWidth : _leftAnchorTabPanel.ActualWidth; + double topTabsHeight = _topAnchorTabPanel.ActualHeight; + double bottomTabsHeight = _bottomAnchorTabPanel.ActualHeight; + + Point locDockingManager = HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()); + Point locContent = HelperFunc.PointToScreenWithoutFlowDirection(Content as FrameworkElement, new Point()); + + double resWidth = initialSetup ? ResizingPanel.GetResizeWidth(_flyoutWindow.ReferencedPane).Value : _flyoutWindow.Width; + double resHeight = initialSetup ? ResizingPanel.GetResizeHeight(_flyoutWindow.ReferencedPane).Value : _flyoutWindow.Height; + + + if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Right) + { + _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; + _flyoutWindow.Height = this.ActualHeight - topTabsHeight - bottomTabsHeight; + + _flyoutWindow.MaxWidth = ActualWidth - rightTabsWidth; + _flyoutWindow.MaxHeight = ActualHeight; + + if (initialSetup) + { + _flyoutWindow.Left = FlowDirection == FlowDirection.LeftToRight ? locDockingManager.X + this.ActualWidth - rightTabsWidth : locDockingManager.X + leftTabsWidth; + _flyoutWindow.Width = 0.0; + _flyoutWindow.TargetWidth = resWidth; + } + else + { + if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) + _flyoutWindow.Left = FlowDirection == FlowDirection.LeftToRight ? locDockingManager.X + this.ActualWidth - rightTabsWidth - _flyoutWindow.Width : locDockingManager.X + leftTabsWidth; + } + } + if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Left) + { + _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; + //_flyoutWindow.Top = locContent.Y; + _flyoutWindow.Height = this.ActualHeight - topTabsHeight - bottomTabsHeight; + //_flyoutWindow.Height = ((FrameworkElement)this.Content).ActualHeight; + + _flyoutWindow.MaxWidth = ActualWidth - leftTabsWidth; + _flyoutWindow.MaxHeight = ActualHeight; + + + if (initialSetup) + { + _flyoutWindow.Left = FlowDirection == FlowDirection.RightToLeft ? locDockingManager.X + this.ActualWidth - rightTabsWidth : locDockingManager.X + leftTabsWidth; + _flyoutWindow.Width = 0.0; + _flyoutWindow.TargetWidth = resWidth; + } + else + { + if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) + _flyoutWindow.Left = FlowDirection == FlowDirection.RightToLeft ? locDockingManager.X + this.ActualWidth - rightTabsWidth - _flyoutWindow.Width : locDockingManager.X + leftTabsWidth; + } + } + if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Top) + { + _flyoutWindow.Left = locDockingManager.X + leftTabsWidth; + _flyoutWindow.Width = this.ActualWidth - rightTabsWidth -leftTabsWidth; + + _flyoutWindow.MaxWidth = ActualWidth; + _flyoutWindow.MaxHeight = ActualHeight - topTabsHeight; + + if (initialSetup) + { + _flyoutWindow.Height = 0.0; + _flyoutWindow.TargetHeight = resHeight; + } + else + { + if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) + _flyoutWindow.Top = locDockingManager.Y + topTabsHeight; + } + } + if (_flyoutWindow.ReferencedPane.Anchor == AnchorStyle.Bottom) + { + _flyoutWindow.Left = locDockingManager.X + leftTabsWidth; + _flyoutWindow.Width = this.ActualWidth - rightTabsWidth - leftTabsWidth; + + _flyoutWindow.MaxWidth = ActualWidth; + _flyoutWindow.MaxHeight = ActualHeight - bottomTabsHeight; + + if (initialSetup) + { + _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight; + _flyoutWindow.Height = 0.0; + _flyoutWindow.TargetHeight = resHeight; + } + else + { + if (!_flyoutWindow.IsOpening && !_flyoutWindow.IsClosing) + _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight - _flyoutWindow.Height; + if (_flyoutWindow.IsClosing) + _flyoutWindow.Top = locDockingManager.Y + this.ActualHeight - bottomTabsHeight - _flyoutWindow.Height; + } + } + + if (_flyoutWindow != null && !_flyoutWindow.IsClosing) + _flyoutWindow.UpdatePositionAndSize(); + } + + + #endregion + + + #region DragDrop Operations + /// + /// Begins dragging operations + /// + /// Floating window containing pane which is dragged by user + /// Current mouse position + /// Offset to be use to set floating window screen position + /// Retruns True is drag is completed, false otherwise + internal bool Drag(FloatingWindow floatingWindow, Point point, Point offset) + { + bool mouseCaptured = IsMouseCaptured; + + if (!mouseCaptured) + mouseCaptured = CaptureMouse(); + + if (mouseCaptured) + { + floatingWindow.Owner = Window.GetWindow(this); + + DragPaneServices.StartDrag(floatingWindow, point, offset); + return true; + } + + return false; + } + + internal void Drag(DocumentContent documentContent, Point point, Point offset) + { + if (CaptureMouse()) + { + DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this); + floatingWindow.Content = documentContent; + Drag(floatingWindow, point, offset); + } + + } + + + internal void Drag(DockableContent dockableContent, Point point, Point offset) + { + if (CaptureMouse()) + { + var floatingWindow = new DockableFloatingWindow(this); + floatingWindow.Content = dockableContent; + floatingWindow.Owner = Window.GetWindow(this); + Drag(floatingWindow, point, offset); + } + } + + + internal void Drag(DockablePane dockablePane, Point point, Point offset) + { + if (CaptureMouse()) + { + DockableFloatingWindow floatingWindow = new DockableFloatingWindow(this); + floatingWindow.Content = dockablePane; + floatingWindow.Owner = Window.GetWindow(this); + Drag(floatingWindow, point, offset); + } + } + + + protected override void OnMouseMove(MouseEventArgs e) + { + if (IsMouseCaptured) + { + DragPaneServices.MoveDrag(this.PointToScreenDPI(e.GetPosition(this))); + + if (_flyoutWindow != null) + _flyoutWindow.UpdatePositionAndSize(); + } + + base.OnMouseMove(e); + } + + + protected override void OnMouseUp(MouseButtonEventArgs e) + { + CompleteDragging(e.GetPosition(this)); + base.OnMouseUp(e); + } + + protected override void OnMouseLeave(MouseEventArgs e) + { + CompleteDragging(e.GetPosition(this)); + base.OnMouseLeave(e); + } + + /// + /// Ends all previously initiated dragging operations + /// + /// + void CompleteDragging(Point ptEndDrag) + { + if (IsMouseCaptured) + { + DragPaneServices.EndDrag(this.PointToScreenDPI(ptEndDrag)); + ReleaseMouseCapture(); + } + } + + DragPaneServices _dragPaneServices; + + internal DragPaneServices DragPaneServices + { + get + { + if (DesignerProperties.GetIsInDesignMode(this)) + return null; + + if (_dragPaneServices == null) + _dragPaneServices = new DragPaneServices(this); + + return _dragPaneServices; + } + } + #endregion + + #region IDropSurface + bool IDropSurface.IsSurfaceVisible + { + get + { + //a DockingManager is always visible for drop a pane + return true; + } + } + + /// + /// Returns a rectangle where this surface is active + /// + Rect IDropSurface.SurfaceRectangle + { + get + { + if (PresentationSource.FromVisual(this) != null) + return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(this, new Point(0, 0)), new Size(ActualWidth, ActualHeight)); + return Rect.Empty; + } + } + + /// + /// Overlay window which shows docking placeholders + /// + OverlayWindow _overlayWindow; + + /// + /// Returns current overlay window + /// + internal OverlayWindow OverlayWindow + { + get + { + if (DesignerProperties.GetIsInDesignMode(this)) + throw new NotSupportedException("OverlayWindow not valid in design mode"); + + if (_overlayWindow == null) + _overlayWindow = new OverlayWindow(this); + + return _overlayWindow; + } + } + + /// + /// Handles this sourface mouse entering (show current overlay window) + /// + /// Current mouse position + void IDropSurface.OnDragEnter(Point point) + { + if (OverlayWindow.IsVisible) + return; + + OverlayWindow.Owner = DragPaneServices.FloatingWindow; + //OverlayWindow.Left = PointToScreen(new Point(0, 0)).X; + //OverlayWindow.Top = PointToScreen(new Point(0, 0)).Y; + Point origPoint = HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()); + OverlayWindow.Left = origPoint.X; + OverlayWindow.Top = origPoint.Y; + OverlayWindow.Width = ActualWidth; + OverlayWindow.Height = ActualHeight; + + OverlayWindow.Show(); + } + + /// + /// Handles mouse overing this surface + /// + /// + void IDropSurface.OnDragOver(Point point) + { + + } + + /// + /// Handles mouse leave event during drag (hide overlay window) + /// + /// + void IDropSurface.OnDragLeave(Point point) + { + OverlayWindow.Owner = null; + OverlayWindow.Hide(); + //Window mainWindow = Window.GetWindow(this); + //if (mainWindow != null) + // mainWindow.Activate(); + } + + /// + /// Handler drop events + /// + /// Current mouse position + /// Returns alwasy false because this surface doesn't support direct drop + bool IDropSurface.OnDrop(Point point) + { + return false; + } + + #endregion + + #region INotifyPropertyChanged Members + + public event PropertyChangedEventHandler PropertyChanged; + + void NotifyPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + + #region Persistence + + void SaveLayout(XmlWriter xmlWriter, DockablePane pane) + { + bool needToSavePane = pane.Items.Count > 0; + + //if a pane is reference by a content than save it + if (DockableContents.FirstOrDefault(d => d.SavedStateAndPosition != null && d.SavedStateAndPosition.ContainerPane == pane) != null) + needToSavePane = true; + + if (needToSavePane) + { + xmlWriter.WriteStartElement("DockablePane"); + + xmlWriter.WriteAttributeString("ResizeWidth", ResizingPanel.GetResizeWidth(pane).ToString()); + xmlWriter.WriteAttributeString("ResizeHeight", ResizingPanel.GetResizeHeight(pane).ToString()); + xmlWriter.WriteAttributeString("EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(pane))); + xmlWriter.WriteAttributeString("ID", pane.ID.ToString()); + xmlWriter.WriteAttributeString("Anchor", pane.Anchor.ToString()); + + xmlWriter.WriteAttributeString("IsAutoHidden", XmlConvert.ToString(pane.IsAutoHidden)); + + foreach (DockableContent content in pane.Items) + { + SaveLayout(xmlWriter, content); + } + + + xmlWriter.WriteEndElement(); + } + } + + void SaveLayout(XmlWriter xmlWriter, DockableFloatingWindow flWindow) + { + xmlWriter.WriteStartElement("FloatingWindow"); + xmlWriter.WriteAttributeString("IsDockableWindow", XmlConvert.ToString(flWindow.IsDockableWindow)); + + xmlWriter.WriteAttributeString("Top", XmlConvert.ToString(flWindow.Top)); + xmlWriter.WriteAttributeString("Left", XmlConvert.ToString(flWindow.Left)); + xmlWriter.WriteAttributeString("Width", XmlConvert.ToString(flWindow.Width)); + xmlWriter.WriteAttributeString("Height", XmlConvert.ToString(flWindow.Height)); + + + SaveLayout(xmlWriter, flWindow.HostedPane as DockablePane); + + xmlWriter.WriteEndElement(); + } + + void SaveLayout(XmlWriter xmlWriter, DockableContent content) + { + Debug.Assert(!string.IsNullOrEmpty(content.Name), + "DockableContent must have a Name to save its content.\n" + + "Click Ignore to skip this element and continue with save." + ); + + if (!string.IsNullOrEmpty(content.Name)) + { + xmlWriter.WriteStartElement("DockableContent"); + + xmlWriter.WriteAttributeString("Name", content.Name); + //xmlWriter.WriteAttributeString("AutoHide", XmlConvert.ToString(content.State == DockableContentState.AutoHide)); + + content.SaveLayout(xmlWriter); + + xmlWriter.WriteEndElement(); + } + } + + void SaveLayout(XmlWriter xmlWriter, DocumentContent content) + { + if (!string.IsNullOrEmpty(content.Name)) + { + xmlWriter.WriteStartElement("DocumentContent"); + + xmlWriter.WriteAttributeString("Name", content.Name); + + content.SaveLayout(xmlWriter); + + xmlWriter.WriteEndElement(); + } + } + + void SaveLayout(XmlWriter xmlWriter, DocumentPane pane) + { + if (pane.Items.Count == 0 && !pane.IsMainDocumentPane.GetValueOrDefault()) + return; + + xmlWriter.WriteStartElement("DocumentPane"); + + if (pane.IsMainDocumentPane.GetValueOrDefault()) + xmlWriter.WriteAttributeString("IsMain", "true"); + + foreach (ManagedContent content in pane.Items) + { + if (content is DockableContent) + { + var dockableContent = content as DockableContent; + SaveLayout(xmlWriter, dockableContent); + } + else if (content is DocumentContent) + { + var documentContent = content as DocumentContent; + SaveLayout(xmlWriter, documentContent); + } + } + + xmlWriter.WriteEndElement(); + } + + //void SaveLayout(XmlWriter xmlWriter, DocumentPaneResizingPanel panelToSerialize) + //{ + // xmlWriter.WriteStartElement("DocumentPanePlaceHolder"); + + // //List listOfFoundContents = new List(); + // //FindContents(listOfFoundContents, panelToSerialize); + // var listOfFoundContents = new LogicalTreeAdapter(panelToSerialize).Descendants().Where(i => i.Item is DockableContent).Select(i => i.Item); + + // foreach (DockableContent content in listOfFoundContents) + // { + // SaveLayout(xmlWriter, content); + // } + + + // xmlWriter.WriteEndElement(); + //} + + void SaveLayout(XmlWriter xmlWriter, ResizingPanel panelToSerialize) + { + if (panelToSerialize is DocumentPaneResizingPanel) + xmlWriter.WriteStartElement("DocumentPaneResizingPanel"); + else + xmlWriter.WriteStartElement("ResizingPanel"); + + //if (!double.IsInfinity(ResizingPanel.GetResizeWidth(panelToSerialize))) + // xmlWriter.WriteAttributeString("ResizeWidth", XmlConvert.ToString(ResizingPanel.GetResizeWidth(panelToSerialize))); + //if (!double.IsInfinity(ResizingPanel.GetResizeHeight(panelToSerialize))) + // xmlWriter.WriteAttributeString("ResizeHeight", XmlConvert.ToString(ResizingPanel.GetResizeHeight(panelToSerialize))); + + xmlWriter.WriteAttributeString("ResizeWidth", ResizingPanel.GetResizeWidth(panelToSerialize).ToString()); + xmlWriter.WriteAttributeString("ResizeHeight", ResizingPanel.GetResizeHeight(panelToSerialize).ToString()); + xmlWriter.WriteAttributeString("EffectiveSize", new SizeConverter().ConvertToInvariantString(ResizingPanel.GetEffectiveSize(panelToSerialize))); + + xmlWriter.WriteAttributeString("Orientation", Convert.ToString(panelToSerialize.Orientation)); + + + foreach (UIElement child in panelToSerialize.Children) + { + if (child is DockablePane) + SaveLayout(xmlWriter, child as DockablePane); + else if (child is DocumentPane) + SaveLayout(xmlWriter, child as DocumentPane); + //else if (child is DocumentPaneResizingPanel) + // SaveLayout(xmlWriter, child as DocumentPaneResizingPanel); + else if (child is ResizingPanel) + SaveLayout(xmlWriter, child as ResizingPanel); + } + + xmlWriter.WriteEndElement(); + } + + /// + /// Save layout as xml to a + /// + /// Text writter object which receive the xml text + /// The writer is not closed. + public void SaveLayout(TextWriter textWriter) + { + XmlTextWriter sw = new XmlTextWriter(textWriter); + + sw.Formatting = Formatting.Indented; + sw.Indentation = 4; + + SaveLayout(sw); + + } + + /// + /// Save layout as xml to generic stream + /// + /// Stream receiving the xml string + /// The stream is not closed + public void SaveLayout(Stream backendStream) + { + XmlTextWriter sw = new XmlTextWriter(backendStream, Encoding.Default); + + sw.Formatting = Formatting.Indented; + sw.Indentation = 4; + + SaveLayout(sw); + } + + /// + /// Save layout as xml text into a file + /// + /// Path to the file + /// The file is created as new or overwritten is already exist a file with same name. + public void SaveLayout(string filename) + { + using (FileStream stream = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite)) + SaveLayout(stream); + } + + /// + /// Layout format version + /// + const string layoutFileVersion = "1.3.0"; + + /// + /// Send layout configuration to a object + /// + /// Object which stores the xml + /// The writer is not closed. + public void SaveLayout(XmlWriter sw) + { + if (!_isControlLoaded) + throw new InvalidOperationException("Unable to serialize docking layout while DockingManager control is unloaded"); + + EnsureContentNotEmpty(); + ClearEmptyPanes(); + HideFlyoutWindow(); + + sw.WriteStartElement("DockingManager"); + sw.WriteAttributeString("version", layoutFileVersion); + + if (Content is ResizingPanel) + SaveLayout(sw, Content as ResizingPanel); + else if (Content is DocumentPane) + SaveLayout(sw, Content as DocumentPane); + //else if (Content is DocumentPaneResizingPanel) + // SaveLayout(sw, Content as DocumentPaneResizingPanel); + + sw.WriteStartElement("Hidden"); + + var hiddenContents = DockableContents.Where(c => c.State == DockableContentState.Hidden).ToArray(); + foreach (DockableContent content in hiddenContents) + { + SaveLayout(sw, content); + } + sw.WriteEndElement(); + + sw.WriteStartElement("Windows"); + foreach (var flWindow in _floatingWindows.OfType()) + { + SaveLayout(sw, flWindow); + } + sw.WriteEndElement(); + + sw.WriteEndElement();//dockingmanager + + sw.Flush(); + } + + + void DetachContentFromDockingManager(DockableContent content) + { + if (content.State == DockableContentState.AutoHide) + { + DockablePane parentContainer = content.Parent as DockablePane; + if (parentContainer != null && + parentContainer.Items.Count == 1) + parentContainer.ToggleAutoHide(); + } + if (content.State == DockableContentState.DockableWindow || + content.State == DockableContentState.FloatingWindow) + { + DockablePane parentContainer = content.Parent as DockablePane; + + if (parentContainer != null && + parentContainer.Items.Count == 1) + { + FloatingWindow floatingWindow = Window.GetWindow(content) as FloatingWindow; + floatingWindow.Close(true); + } + } + //this content can be hidden also if was contained in closed floating window + if (content.State == DockableContentState.Hidden) + Show(content, DockableContentState.Docked); + + content.DetachFromContainerPane(); + } + + + public delegate void DeserializationCallbackHandler(object sender, DeserializationCallbackEventArgs e); + public DeserializationCallbackHandler DeserializationCallback { get; set; } + + + //void ShowAllHiddenContents() + //{ + // var hiddenContents = DockableContents.Where(c => c.State == DockableContentState.Hidden).ToArray(); + // foreach (var hiddenContent in hiddenContents) + // { + // //Debug.Assert(HiddenContents[0].State == DockableContentState.Hidden); + // hiddenContent.Show(); + // } + //} + + #region Restore Layout Overloads + + /// + /// Restore a layout from xml + /// + /// + public void RestoreLayout(Stream backendStream) + { + XmlDocument doc = new XmlDocument(); + + doc.Load(backendStream); + + RestoreLayout(doc); + } + + /// + /// Restore a layout from xml + /// + /// + public void RestoreLayout(XmlReader reader) + { + XmlDocument doc = new XmlDocument(); + + doc.Load(reader); + + RestoreLayout(doc); + } + + /// + /// Loads a xml content from a file and restore the layout contained in it + /// + /// + public void RestoreLayout(string filename) + { + XmlDocument doc = new XmlDocument(); + + doc.Load(filename); + + RestoreLayout(doc); + } + + /// + /// Restore a layout from a xml string + /// + /// + public void RestoreLayout(TextReader reader) + { + XmlDocument doc = new XmlDocument(); + + doc.Load(reader); + + RestoreLayout(doc); + } + + + #region Restore Layout Core + ///// + ///// Restore from xml a document pane + ///// + ///// + ///// + ///// + ///// + //void RestoreDocumentPaneLayout(XmlElement childElement, out DocumentPane mainExistingDocumentPane, out DocumentPaneResizingPanel existingDocumentPanel, DockableContent[] dockableContents) + //{ + // mainExistingDocumentPane = (Content is DocumentPane) ? Content as DocumentPane : GetMainDocumentPane(Content as ResizingPanel); + // if (mainExistingDocumentPane != null) + // { + // existingDocumentPanel = mainExistingDocumentPane.GetParentDocumentPaneResizingPanel(); + // } + // else + // { + // existingDocumentPanel = null; + // } + + // if (existingDocumentPanel != null) + // { + // if (existingDocumentPanel.Parent is ResizingPanel) + // { + // ((ResizingPanel)existingDocumentPanel.Parent).RemoveChild(existingDocumentPanel); + // } + // else if (existingDocumentPanel.Parent is DockingManager) + // { + // ((DockingManager)existingDocumentPanel.Parent).Content = null; + // } + // } + // else if (mainExistingDocumentPane != null) + // { + // if (mainExistingDocumentPane.Parent is ResizingPanel) + // { + // ((ResizingPanel)mainExistingDocumentPane.Parent).RemoveChild(mainExistingDocumentPane); + // } + // else if (mainExistingDocumentPane.Parent is DockingManager) + // { + // ((DockingManager)mainExistingDocumentPane.Parent).Content = null; + // } + // } + + // foreach (XmlElement contentElement in childElement.ChildNodes) + // { + // if (contentElement.HasAttribute("Name")) + // { + // DockableContent foundContent = null; + // string contentName = contentElement.GetAttribute("Name"); + // foreach (DockableContent content in dockableContents) + // { + // if (content.Name == contentName) + // { + // foundContent = content; + // break; + // } + // } + + // if (foundContent == null && + // DeserializationCallback != null) + // { + // DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); + // DeserializationCallback(this, e); + + // foundContent = e.Content as DockableContent; + // } + + + // if (foundContent != null) + // { + // DetachContentFromDockingManager(foundContent); + // mainExistingDocumentPane.Items.Add(foundContent); + // foundContent.SetStateToDocument(); + + // //call custom layout persistence method + // foundContent.RestoreLayout(contentElement); + // } + // } + // } + //} + + DocumentPane RestoreDocumentPaneLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments) + { + var documentPane = new DocumentPane(); + + foreach (XmlElement contentElement in mainElement.ChildNodes) + { + if (contentElement.Name == "DockableContent" && + contentElement.HasAttribute("Name")) + { + DockableContent foundContent = null; + string contentName = contentElement.GetAttribute("Name"); + + foundContent = actualContents.FirstOrDefault(c => c.Name == contentName); + + if (foundContent == null && + DeserializationCallback != null) + { + DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); + DeserializationCallback(this, e); + + foundContent = e.Content as DockableContent; + } + + + if (foundContent != null) + { + DetachContentFromDockingManager(foundContent); + documentPane.Items.Add(foundContent); + foundContent.SetStateToDocument(); + + //call custom layout persistence method + foundContent.RestoreLayout(contentElement); + } + } + else if (contentElement.Name == "DocumentContent" && + contentElement.HasAttribute("Name")) + { + DocumentContent foundDocument = null; + string contentName = contentElement.GetAttribute("Name"); + + foundDocument = actualDocuments.FirstOrDefault(c => c.Name == contentName); + + if (foundDocument == null && + DeserializationCallback != null) + { + DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); + DeserializationCallback(this, e); + + foundDocument = e.Content as DocumentContent; + } + + + if (foundDocument != null) + { + foundDocument.DetachFromContainerPane(); + documentPane.Items.Add(foundDocument); + } + } + } + + return documentPane; + + } + + DockablePane RestoreDockablePaneLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments) + { + + DockablePane pane = new DockablePane(); + + if (mainElement.HasAttribute("Anchor")) + pane.Anchor = (AnchorStyle)Enum.Parse(typeof(AnchorStyle), mainElement.GetAttribute("Anchor")); + if (mainElement.HasAttribute("ResizeWidth")) + ResizingPanel.SetResizeWidth(pane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth"))); + if (mainElement.HasAttribute("ResizeHeight")) + ResizingPanel.SetResizeHeight(pane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight"))); + if (mainElement.HasAttribute("EffectiveSize")) + ResizingPanel.SetEffectiveSize(pane, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize"))); + if (mainElement.HasAttribute("ID")) + pane.ID = Guid.Parse(mainElement.GetAttribute("ID")); + + bool toggleAutoHide = false; + if (mainElement.HasAttribute("IsAutoHidden")) + toggleAutoHide = XmlConvert.ToBoolean(mainElement.GetAttribute("IsAutoHidden")); + + foreach (XmlElement contentElement in mainElement.ChildNodes) + { + if (contentElement.HasAttribute("Name")) + { + DockableContent foundContent = null; + string contentName = contentElement.GetAttribute("Name"); + + foundContent = actualContents.FirstOrDefault(c => c.Name == contentName); + + if (foundContent == null && + DeserializationCallback != null) + { + DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); + DeserializationCallback(this, e); + + foundContent = e.Content as DockableContent; + } + + + if (foundContent != null) + { + DetachContentFromDockingManager(foundContent); + pane.Items.Add(foundContent); + foundContent.SetStateToDock(); + + //call custom layout persistence method + foundContent.RestoreLayout(contentElement); + } + } + } + + if (toggleAutoHide && pane.Items.Count > 0) + ToggleAutoHide(pane); + + return pane; + } + + ResizingPanel RestoreResizingPanel(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane) + { + ResizingPanel panel = null; + + if (mainElement.Name == "DocumentPaneResizingPanel") + panel = new DocumentPaneResizingPanel(); + else + panel = new ResizingPanel(); + + if (mainElement.HasAttribute("Orientation")) + panel.Orientation = (Orientation)Enum.Parse(typeof(Orientation), mainElement.GetAttribute("Orientation")); + if (mainElement.HasAttribute("ResizeWidth")) + ResizingPanel.SetResizeWidth(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth"))); + if (mainElement.HasAttribute("ResizeHeight")) + ResizingPanel.SetResizeHeight(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight"))); + if (mainElement.HasAttribute("EffectiveSize")) + ResizingPanel.SetEffectiveSize(panel, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize"))); + + + foreach (XmlElement childElement in mainElement.ChildNodes) + { + if (childElement.Name == "ResizingPanel" || + childElement.Name == "DocumentPaneResizingPanel") + { + var childPanel = RestoreResizingPanel(childElement, actualContents, actualDocuments, ref mainDocumentPane); + + if (childPanel.Children.Count > 0) + { + panel.Children.Add(childPanel); + } + else + { + Debug.WriteLine("Found empty ResizingPanel in stored layout, it will be discarded."); + } + } + #region Restore DockablePane + else if (childElement.Name == "DockablePane") + { + var pane = RestoreDockablePaneLayout(childElement, actualContents, actualDocuments); + + //restore dockable panes even if no contents are inside (an hidden content could refer this pane in SaveStateAndPosition) + panel.Children.Add(pane); + + } + #endregion + #region Restore Contents inside a DocumentPane + else if (childElement.Name == "DocumentPane") + { + var documentPane = RestoreDocumentPaneLayout(childElement, actualContents, actualDocuments); + + bool isMainDocumentPane = false; + if (childElement.HasAttribute("IsMain")) + isMainDocumentPane = XmlConvert.ToBoolean(childElement.GetAttribute("IsMain")); + + if (documentPane.Items.Count > 0 || + isMainDocumentPane) + panel.Children.Add(documentPane); + + if (isMainDocumentPane) + { + if (mainDocumentPane != null) + throw new InvalidOperationException("Main document pane is set more than one time"); + + mainDocumentPane = documentPane; + } + } + + #endregion + } + + return panel; + + } + + /// + /// Restore from xml a resizing panel or a documentpane + /// + /// + /// + /// + object RestoreLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane) + { + if (mainElement == null) + throw new ArgumentNullException("mainElement"); + + if (mainElement.Name == "ResizingPanel" || + mainElement.Name == "DocumentPaneResizingPanel") + { + return RestoreResizingPanel(mainElement, actualContents, actualDocuments, ref mainDocumentPane); + } + else if (mainElement.Name == "DocumentPane") + { + mainDocumentPane = RestoreDocumentPaneLayout(mainElement, actualContents, actualDocuments); + return mainDocumentPane; + } + + throw new InvalidOperationException(string.Format("Unable to deserialize '{0}' element", mainElement.Name)); + } + + /// + /// True while is restoring a layout + /// + protected bool RestoringLayout { get; private set; } + + /// + /// Internal main restore layout method + /// + /// Document Xml from which restore layout + void RestoreLayout(XmlDocument doc) + { + if (!_isControlLoaded) + throw new InvalidOperationException("Unable to deserialize a docking layout while DockingManager control is unloaded"); + + if (doc.DocumentElement == null || + doc.DocumentElement.Name != "DockingManager") + { + Debug.Assert(false, "Layout file hasn't a valid structure!"); + throw new InvalidOperationException("Layout file had not a valid structure!"); + } + + if (doc.DocumentElement.GetAttribute("version") != layoutFileVersion) + throw new FileFormatException("Unsupported layout file version"); + + if (doc.DocumentElement.ChildNodes.Count != 3 || + (doc.DocumentElement.ChildNodes[0].Name != "ResizingPanel" && doc.DocumentElement.ChildNodes[0].Name != "DocumentPane") || + doc.DocumentElement.ChildNodes[1].Name != "Hidden" || + doc.DocumentElement.ChildNodes[2].Name != "Windows") + { + Debug.Assert(false, "Layout file hasn't a valid structure!"); + throw new InvalidOperationException("Layout file hasn't a valid structure!"); + } + + //Hide temp windows + HideFlyoutWindow(); + HideNavigatorWindow(); + //HideDocumentNavigatorWindow(); + + RestoringLayout = true; + + //show all auto hidden panes + var panesAutoHidden = DockableContents.Where(c => c.State == DockableContentState.AutoHide).Select(c => c.ContainerPane).Distinct(); + foreach (DockablePane pane in panesAutoHidden) + pane.ToggleAutoHide(); + + DockableContent[] actualContents = DockableContents.ToArray(); + DocumentContent[] actualDocuments = Documents.ToArray(); + + + //first detach all my actual contents + this.Content = null; + this.ActiveContent = null; + this.ActiveDocument = null; + + //restore main panel + XmlElement rootElement = doc.DocumentElement.ChildNodes[0] as XmlElement; + DocumentPane mainDocumentPane = null; + this.Content = RestoreLayout(rootElement, actualContents, actualDocuments, ref mainDocumentPane); + MainDocumentPane = mainDocumentPane; + + //restore hidden contents + foreach (XmlElement hiddenContentElement in doc.DocumentElement.ChildNodes[1].ChildNodes) + { + var hiddenContentName = hiddenContentElement.GetAttribute("Name"); + + var hiddenContent = actualContents.FirstOrDefault(c => c.Name == hiddenContentName && + c.State != DockableContentState.Hidden); + + if (hiddenContent != null) + { + Hide(hiddenContent); + hiddenContent.RestoreLayout(hiddenContentElement); + } + } + + //restore floating windows + foreach (XmlElement flWindowElement in doc.DocumentElement.ChildNodes[2].ChildNodes) + { + if (flWindowElement.ChildNodes.Count != 1) + continue;//handles invalid layouts structures + + bool isDockableWindow = XmlConvert.ToBoolean(flWindowElement.GetAttribute("IsDockableWindow")); + Point location = new Point(XmlConvert.ToDouble(flWindowElement.GetAttribute("Left")), XmlConvert.ToDouble(flWindowElement.GetAttribute("Top"))); + Size size = new Size(XmlConvert.ToDouble(flWindowElement.GetAttribute("Width")), XmlConvert.ToDouble(flWindowElement.GetAttribute("Height"))); + + XmlElement paneElement = flWindowElement.ChildNodes[0] as XmlElement; + + DockablePane paneForFloatingWindow = new DockablePane(); + if (paneElement.HasAttribute("ResizingWidth")) + ResizingPanel.SetResizeWidth(paneForFloatingWindow, (GridLength)GLConverter.ConvertFromInvariantString(paneElement.GetAttribute("ResizeWidth"))); + if (paneElement.HasAttribute("ResizingHeight")) + ResizingPanel.SetResizeHeight(paneForFloatingWindow, (GridLength)GLConverter.ConvertFromInvariantString(paneElement.GetAttribute("ResizeHeight"))); + paneForFloatingWindow.Anchor = (AnchorStyle)Enum.Parse(typeof(AnchorStyle), paneElement.GetAttribute("Anchor")); + + + DockableContent contentToTransfer = null; + foreach (XmlElement contentElement in paneElement.ChildNodes) + { + #region Find the content to transfer + string contentToFindName = contentElement.GetAttribute("Name"); + contentToTransfer = actualContents.FirstOrDefault(c => c.Name == contentToFindName); + + if (contentToTransfer == null && + DeserializationCallback != null) + { + DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentToFindName); + DeserializationCallback(this, e); + + contentToTransfer = e.Content as DockableContent; + } + #endregion + if (contentToTransfer != null) + { + DetachContentFromDockingManager(contentToTransfer); + paneForFloatingWindow.Items.Add(contentToTransfer); + contentToTransfer.RestoreLayout(contentElement); + } + } + + if (paneForFloatingWindow.Items.Count > 0) + { + var flWindow = new DockableFloatingWindow(this); + flWindow.Content = paneForFloatingWindow; + flWindow.Left = location.X; + flWindow.Top = location.Y; + flWindow.Width = size.Width; + flWindow.Height = size.Height; + flWindow.Owner = Window.GetWindow(this); + + flWindow.IsDockableWindow = isDockableWindow; + flWindow.ShowActivated = false; + + flWindow.ApplyTemplate(); + flWindow.Show(); + } + } + + ClearEmptyPanels(Content as ResizingPanel); + + //get documents that are not present in last layout and must be included + //in the new one + var documentsNotTransferred = actualDocuments.Where(d => d.ContainerPane == null || d.ContainerPane.GetManager() != this).ToArray(); + + Debug.Assert(MainDocumentPane != null && MainDocumentPane.GetManager() == this); + + if (MainDocumentPane != null && documentsNotTransferred.Count() > 0) + { + documentsNotTransferred.ForEach(d => MainDocumentPane.Items.Add(d.DetachFromContainerPane())); + } + + //get contents that are not present in the new layout and hide them + var contentsNotTransferred = actualContents.Where(c => c.ContainerPane == null || c.ContainerPane.GetManager() != this).ToArray(); + + contentsNotTransferred.ForEach(c => + { + Hide(c); + }); + + RestoringLayout = false; + + ClearEmptyPanes(); + RefreshContents(); + + if (Documents.Count() > 0) + { + ActiveContent = Documents[0]; + } + else + { + ActiveContent = null; + ActiveDocument = null; + } + + } + #endregion + + #endregion + /// + /// Static converter used to convert GridLength from/to string + /// + static GridLengthConverter GLConverter = new GridLengthConverter(); + + #endregion + + #region OnClosing/OnClosedDocument events + /// + /// Event fired when the document is about to be closed + /// + public event EventHandler DocumentClosing; + + /// + /// Event fired when a document has been closed + /// + /// Note that when a document is closed, property like or returns null. + public event EventHandler DocumentClosed; + + /// + /// Ovveride this method to handle event. + /// + protected virtual void OnDocumentClosing(CancelEventArgs e) + { + if (DocumentClosing != null && !e.Cancel) + { + DocumentClosing(this, e); + } + } + + /// + /// Ovveride this method to handle event. + /// + protected virtual void OnDocumentClosed() + { + if (DocumentClosed != null) + DocumentClosed(this, EventArgs.Empty); + } + + internal void FireDocumentClosingEvent(CancelEventArgs e) + { + OnDocumentClosing(e); + } + + internal void FireDocumentClosedEvent() + { + OnDocumentClosed(); + } + + //public event EventHandler RequestDocumentClose; + + //internal bool FireRequestDocumentCloseEvent(DocumentContent doc) + //{ + // bool res = false; + + // if (RequestDocumentClose != null) + // { + // RequestDocumentCloseEventArgs args = new RequestDocumentCloseEventArgs(doc); + // RequestDocumentClose(this, args); + // res = !args.Cancel; + // } + + // return res; + //} + + + #endregion + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentContent.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentContent.cs new file mode 100644 index 0000000000..22681636ef --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentContent.cs @@ -0,0 +1,442 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Diagnostics; + + +namespace AvalonDock +{ + /// + /// Represent a document which can be host by a . + /// + /// A document is always hosted by a usually in the central area of . + /// It has limited dragging features becaus it can be only moved to an other and can't float as a separate window. + /// You can access all documents within with property . + public class DocumentContent : ManagedContent + { + + static DocumentContent() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentContent), new FrameworkPropertyMetadata(typeof(DocumentContent))); + + //Control.WidthProperty.OverrideMetadata(typeof(DocumentContent), + // new FrameworkPropertyMetadata(new PropertyChangedCallback(OnSizePropertyChanged), new CoerceValueCallback(CourceSizeToNaN))); + //Control.HeightProperty.OverrideMetadata(typeof(DocumentContent), + // new FrameworkPropertyMetadata(new PropertyChangedCallback(OnSizePropertyChanged), new CoerceValueCallback(CourceSizeToNaN))); + } + + public DocumentContent() + { + //base.PropertyChanged += new PropertyChangedEventHandler(DocumentContent_PropertyChanged); + } + + protected override void OnContentLoaded() + { + //now the logical tree is up + DockingManager manager = GetParentManager(null); + + //if can't find the manager there is a problem + //if (manager == null) + // throw new InvalidOperationException(string.Format( + // "Unable to find DockingManager object in the logical tree of document '{0}'", Title)); + + //manager.Documents.Add(this); + + base.OnContentLoaded(); + } + + protected override void OnContentUnloaded() + { + //if (Manager != null) + // Manager.Documents.Remove(this); + + base.OnContentUnloaded(); + } + + #region InfoTip + + /// + /// InfoTip Dependency Property + /// + public static readonly DependencyProperty InfoTipProperty = + DependencyProperty.Register("InfoTip", typeof(string), typeof(DocumentContent), + new FrameworkPropertyMetadata(null)); + + /// + /// Gets or sets the InfoTip property. This dependency property + /// indicates information text attached to the document content. + /// + /// This text is usually displayed when users switch between documents and helps them to choose the right one. + public string InfoTip + { + get { return (string)GetValue(InfoTipProperty); } + set { SetValue(InfoTipProperty, value); } + } + + #endregion + + #region ContentTypeDescription + + /// + /// ContentTypeDescription Dependency Property + /// + public static readonly DependencyProperty ContentTypeDescriptionProperty = + DependencyProperty.Register("ContentTypeDescription", typeof(string), typeof(DocumentContent), + new FrameworkPropertyMetadata((string)string.Empty)); + + /// + /// Gets or sets the ContentTypeDescription property. This dependency property + /// indicates a text which describes the type of content contained in this document. + /// + public string ContentTypeDescription + { + get { return (string)GetValue(ContentTypeDescriptionProperty); } + set { SetValue(ContentTypeDescriptionProperty, value); } + } + + #endregion + + /// + /// Gets or sets a value indicating if this document can float over main window (VS2010 Feature). + /// + public bool IsFloatingAllowed + { + get { return (bool)GetValue(IsFloatingAllowedProperty); } + set { SetValue(IsFloatingAllowedProperty, value); } + } + + // Using a DependencyProperty as the backing store for IsFloatingAllowed. This enables animation, styling, binding, etc... + public static readonly DependencyProperty IsFloatingAllowedProperty = + DependencyProperty.Register("IsFloatingAllowed", typeof(bool), typeof(DocumentContent), new PropertyMetadata(true)); + + + #region IsFloating + + /// + /// IsFloating Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey IsFloatingPropertyKey + = DependencyProperty.RegisterReadOnly("IsFloating", typeof(bool), typeof(DocumentContent), + new FrameworkPropertyMetadata((bool)false)); + + public static readonly DependencyProperty IsFloatingProperty + = IsFloatingPropertyKey.DependencyProperty; + + /// + /// Gets the IsFloating property. This dependency property + /// indicates if the DocumentContent is floating inside an external window. + /// + public bool IsFloating + { + get { return (bool)GetValue(IsFloatingProperty); } + } + + /// + /// Provides a secure method for setting the IsFloating property. + /// This dependency property indicates if the DocumentContent is floating inside an external window. + /// + /// The new value for the property. + internal void SetIsFloating(bool value) + { + SetValue(IsFloatingPropertyKey, value); + } + + #endregion + + + protected override void OnDragStart(Point ptMouse, Point ptRelativeMouse) + { + if (IsFloatingAllowed) + { + Manager.Drag(this, HelperFunc.PointToScreenWithoutFlowDirection(this, ptMouse), ptRelativeMouse); + } + + base.OnDragStart(ptMouse, ptRelativeMouse); + } + + protected override void OnDragMouseMove(object sender, MouseEventArgs e) + { + base.OnDragMouseMove(sender, e); + } + + protected override void OnDragMouseLeave(object sender, MouseEventArgs e) + { + + base.OnDragMouseLeave(sender, e); + } + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + if (DragEnabledArea != null) + { + if (string.IsNullOrEmpty((string)DragEnabledArea.ToolTip)) + DragEnabledArea.ToolTip = InfoTip; + } + } + + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + this.CommandBindings.Add( + new CommandBinding(DocumentContentCommands.FloatingDocument, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DocumentContentCommands.TabbedDocument, this.OnExecuteCommand, this.OnCanExecuteCommand)); + } + + void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (!e.Handled && e.Command == DocumentContentCommands.FloatingDocument) + { + this.Show(true); + + e.Handled = true; + } + else if (!e.Handled && e.Command == DocumentContentCommands.TabbedDocument) + { + this.Show(false); + + e.Handled = true; + } + } + + void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = CanExecuteCommand(e.Command); + } + + /// + /// Show as tabbed document + /// + public override void Show() + { + Show(false); + } + + /// + /// Show as tabbed document inside the provided + /// + /// Docking manager target + public override void Show(DockingManager manager) + { + Show(manager, false); + } + + /// + /// Show as tabbed document or inside a floating window + /// + public void Show(bool showAsFloatingWindow) + { + if (!CanExecuteCommand(ManagedContentCommands.Show)) + throw new InvalidOperationException("This operation can be executed in this state"); + + Manager.Show(this, showAsFloatingWindow); + } + + /// + /// Show as tabbed document inside the provided + /// + /// Docking manager target + /// True if document should be shown inside a floating window () + public void Show(DockingManager manager, bool showAsFloatingWindow) + { + if (Manager != null && Manager != manager) + throw new InvalidOperationException("Please remove the content from previous DockingManager (using the Close method)"); + + if (!CanExecuteCommand(ManagedContentCommands.Show)) + throw new InvalidOperationException("This operation can be executed in this state"); + + manager.Show(this, showAsFloatingWindow); + + manager.Documents.Add(this); + } + + /// + /// Activate the document showing its header if it's not visible + /// + public override void Activate() + { + base.Activate(); + + if (!DocumentTabPanel.GetIsHeaderVisible(this)) + { + DocumentPane parentPane = this.ContainerPane as DocumentPane; + if (parentPane != null && + parentPane.GetManager() != null && + parentPane.Items.IndexOf(this) != 0) + { + parentPane.Items.Remove(this); + parentPane.Items.Insert(0, this); + parentPane.SelectedIndex = 0; + } + } + } + + /// + /// Retrive a value indicating if the command can be executed based to the dockable content state + /// + /// + /// + protected override bool CanExecuteCommand(ICommand command) + { + if (command == DocumentContentCommands.FloatingDocument) + { + return !IsFloating && IsFloatingAllowed; + } + else if (command == DocumentContentCommands.TabbedDocument) + { + return IsFloating; + } + + return true; + } + + /// + /// Close this content without notifications + /// + internal void InternalClose() + { + DockingManager manager = Manager; + + if (manager != null) + { + if (manager.ActiveContent == this) + manager.ActiveContent = null; + + if (manager.ActiveDocument == this) + manager.ActiveDocument = null; + } + + DocumentPane parentPane = ContainerPane as DocumentPane; + FloatingDocumentPane floatingParentPane = ContainerPane as FloatingDocumentPane; + + if (floatingParentPane != null) + { + floatingParentPane.RemoveContent(0); + if (floatingParentPane.FloatingWindow != null && + !floatingParentPane.FloatingWindow.IsClosing) + floatingParentPane.FloatingWindow.Close(); + } + else if (parentPane != null) + { + parentPane.Items.Remove(this); + + parentPane.CheckContentsEmpty(); + } + } + + /// + /// Close this document removing it from its parent container + /// + /// Use this function to close a document and remove it from its parent container. Please note + /// that if you simply remove it from its parent without call this method, events like + /// / are not called. + /// + public override bool Close() + { + if (!IsCloseable) + return false; + + ////if documents are attached to an external source via DockingManager.DocumentsSource + ////let application host handle the document closing by itself + //if (Manager.DocumentsSource != null) + //{ + // //return Manager.FireRequestDocumentCloseEvent(this); + // Manager.HandleDocumentClose(this); + //} + + + CancelEventArgs e = new CancelEventArgs(false); + OnClosing(e); + + if (e.Cancel) + return false; + + DockingManager oldManager = Manager; + + if (Manager != null) + Manager.FireDocumentClosingEvent(e); + + if (e.Cancel) + return false; + + InternalClose(); + + OnClosed(); + + //if documents are attached to an external source via DockingManager.DocumentsSource + //let application host handle the document closing by itself + if (Manager.DocumentsSource != null) + { + Manager.HandleDocumentClose(this); + } + + if (oldManager != null) + oldManager.FireDocumentClosedEvent(); + + + Debug.Assert(Parent == null, "Parent MUST bu null after Doc is closed"); + return true; + } + + /// + /// Hide the (Close the document) + /// + /// + public override bool Hide() + { + return Close(); + } + + + + #region Save/RestoreLayout + public override void SaveLayout(System.Xml.XmlWriter storeWriter) + { + base.SaveLayout(storeWriter); + } + + public override void RestoreLayout(System.Xml.XmlElement contentElement) + { + base.RestoreLayout(contentElement); + } + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentContentCommands.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentContentCommands.cs new file mode 100644 index 0000000000..17c76e67ea --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentContentCommands.cs @@ -0,0 +1,83 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + /// + /// Contains a list of commands that can be applied to a + /// + public sealed class DocumentContentCommands + { + static object syncRoot = new object(); + + private static RoutedUICommand _floatingDocumentCommand = null; + + /// + /// Shows the as a floating window document + /// + public static RoutedUICommand FloatingDocument + { + get + { + lock (syncRoot) + { + if (null == _floatingDocumentCommand) + { + _floatingDocumentCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentContentCommands_FloatingDocument, "FloatingDocument", typeof(DocumentContentCommands)); + } + } + return _floatingDocumentCommand; + } + } + + + private static RoutedUICommand _tabbedDocumentCommand = null; + + /// + /// Shows the as a tabbed document + /// + public static RoutedUICommand TabbedDocument + { + get + { + lock (syncRoot) + { + if (null == _tabbedDocumentCommand) + { + _tabbedDocumentCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentContentCommands_TabbedDocument, "TabbedDocument", typeof(DocumentContentCommands)); + } + } + return _tabbedDocumentCommand; + } + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentFloatingWindow.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentFloatingWindow.cs new file mode 100644 index 0000000000..8ec877bf3b --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentFloatingWindow.cs @@ -0,0 +1,295 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Markup; +using System.Diagnostics; +using System.Windows.Threading; +using System.Windows.Media.Animation; +using System.Windows.Interop; +using System.Linq; + +namespace AvalonDock +{ + public class DocumentFloatingWindow : FloatingWindow + { + static DocumentFloatingWindow() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentFloatingWindow), new FrameworkPropertyMetadata(typeof(DocumentFloatingWindow))); + + ContentProperty.OverrideMetadata(typeof(DocumentFloatingWindow), + new FrameworkPropertyMetadata( + new PropertyChangedCallback(OnContentPropertyChanged), + new CoerceValueCallback(OnCoerceValueContentProperty))); + } + + //DocumentPane _previousPane = null; + + //int _arrayIndexPreviousPane = -1; + + internal DocumentFloatingWindow(DockingManager manager) + :base(manager) + { + } + + //public DocumentFloatingWindow(DockingManager manager, DocumentContent content) + // : this(manager) + //{ + // //create a new temporary pane + // FloatingDocumentPane pane = new FloatingDocumentPane(this); + + // //setup window size + // Width = content.ContainerPane.ActualWidth; + // Height = content.ContainerPane.ActualHeight; + + // //save current content position in container pane + // _previousPane = content.ContainerPane as DocumentPane; + // _arrayIndexPreviousPane = _previousPane.Items.IndexOf(content); + // pane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); + // pane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); + + // pane.Style = _previousPane.Style; + + // //remove content from container pane + // _previousPane.RemoveContent(_arrayIndexPreviousPane); + + // //add content to my temporary pane + // pane.Items.Add(content); + + // //let templates access this pane + // SetHostedPane(pane); + + // //if (IsDocumentFloatingAllowed) + // //{ + // // AllowsTransparency = false; + // // WindowStyle = WindowStyle.ToolWindow; + // //} + //} + + //public bool IsDocumentFloatingAllowed + //{ + // get + // { + // if (HostedPane != null && + // HostedPane.Items.Count > 0) + // return ((DocumentContent)HostedPane.Items[0]).IsFloatingAllowed; + + // return false; + // } + //} + + + internal override void OnEndDrag() + { + //if (HostedPane.Items.Count > 0) + //{ + // DocumentContent content = HostedPane.Items[0] as DocumentContent; + // if (!content.IsFloatingAllowed) + // { + // HostedPane.Items.RemoveAt(0); + // _previousPane.Items.Insert(_arrayIndexPreviousPane, content); + // _previousPane.SelectedItem = content; + // Close(); + // } + // else + // { + // DocumentPane originalDocumentPane = _previousPane as DocumentPane; + // originalDocumentPane.CheckContentsEmpty(); + // } + //} + //else + //{ + // DocumentPane originalDocumentPane = _previousPane as DocumentPane; + // originalDocumentPane.CheckContentsEmpty(); + // Close(); + //} + + ((FloatingDocumentPane)HostedPane).PreviousPane.CheckContentsEmpty(); + + if (HostedPane.Items.Count == 0) + Close(); + + base.OnEndDrag(); + } + + public override Pane ClonePane() + { + DocumentPane paneToAnchor = new DocumentPane(); + + ResizingPanel.SetEffectiveSize(paneToAnchor, new Size(Width, Height)); + + //transfer contents from hosted pane in the floating window and + //the new created dockable pane + while (HostedPane.Items.Count > 0) + { + paneToAnchor.Items.Add( + HostedPane.RemoveContent(0)); + } + paneToAnchor.ApplyTemplate(); + + return paneToAnchor; + } + + internal override void OnShowSelectionBox() + { + this.Visibility = Visibility.Hidden; + base.OnShowSelectionBox(); + } + + internal override void OnHideSelectionBox() + { + this.Visibility = Visibility.Visible; + base.OnHideSelectionBox(); + } + + public override void Dock() + { + //if (_previousPane != null) + //{ + // if (_previousPane.GetManager() == null) + // { + // Manager.MainDocumentPane.Items.Insert(0, HostedPane.RemoveContent(0)); + // } + // else + // { + // if (_arrayIndexPreviousPane > _previousPane.Items.Count) + // _arrayIndexPreviousPane = _previousPane.Items.Count; + + // _previousPane.Items.Insert(_arrayIndexPreviousPane, HostedPane.RemoveContent(0)); + // _previousPane.SelectedIndex = _arrayIndexPreviousPane; + // } + // this.Close(); + //} + + ((DocumentContent)HostedPane.Items[0]).Show(); + + base.Dock(); + } + + protected override void FilterMessage(object sender, FilterMessageEventArgs e) + { + e.Handled = false; + + if (Manager == null) + return; + + switch (e.Msg) + { + case WM_NCLBUTTONDOWN: //Left button down on title -> start dragging over docking manager + if (e.WParam.ToInt32() == HTCAPTION) + { + short x = (short)((e.LParam.ToInt32() & 0xFFFF)); + short y = (short)((e.LParam.ToInt32() >> 16)); + + Point clickPoint = this.TransformToDeviceDPI(new Point(x, y)); + Manager.Drag(this, clickPoint, new Point(clickPoint.X - Left, clickPoint.Y - Top)); + + e.Handled = true; + } + break; + case WM_NCLBUTTONDBLCLK: //Left Button Double Click -> Maximixe/Normal + if (e.WParam.ToInt32() == HTCAPTION) + { + WindowState = WindowState == System.Windows.WindowState.Maximized ? + System.Windows.WindowState.Normal : System.Windows.WindowState.Maximized; + e.Handled = true; + } + break; + } + + + + base.FilterMessage(sender, e); + } + + protected override bool OpenContextMenu(UIElement popupButton, Point ptMouse) + { + ContextMenu cxMenu = FindResource(new ComponentResourceKey(typeof(DockingManager), + ContextMenuElement.DocumentFloatingWindow)) as ContextMenu; + if (cxMenu != null) + { + foreach (var menuItem in cxMenu.Items.OfType()) + menuItem.CommandTarget = HostedPane.SelectedItem as IInputElement; + + if (popupButton != null) + { + cxMenu.Placement = PlacementMode.Bottom; + cxMenu.PlacementTarget = popupButton; + } + else + { + cxMenu.Placement = PlacementMode.Bottom; + cxMenu.PlacementRectangle = new Rect(ptMouse, new Size(0, 0)); + } + + cxMenu.IsOpen = true; + return true; + } + + return base.OpenContextMenu(popupButton, ptMouse); + } + + static void OnContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + + } + + static object OnCoerceValueContentProperty(DependencyObject d, object baseValue) + { + DocumentFloatingWindow fl = ((DocumentFloatingWindow)d); + + if (fl.Content != null) + { + throw new InvalidOperationException("Content on floating windows can't be set more than one time."); + } + + if (!(baseValue is DocumentContent)) + { + throw new InvalidOperationException("Content must be of type DocumentContent"); + } + + FloatingDocumentPane paneToReturn = null; + + if (baseValue is DocumentContent) + paneToReturn = new FloatingDocumentPane(fl, baseValue as DocumentContent); + + return paneToReturn; + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentNavigatorWindow.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentNavigatorWindow.cs new file mode 100644 index 0000000000..597366935b --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentNavigatorWindow.cs @@ -0,0 +1,254 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Input; +using System.Windows.Controls.Primitives; + +namespace AvalonDock +{ + public class DocumentNavigatorWindow : AvalonDockWindow, INotifyPropertyChanged + { + static DocumentNavigatorWindow() + { + //DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(typeof(DocumentNavigatorWindow))); + + + AllowsTransparencyProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(true)); + WindowStyleProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(WindowStyle.None)); + ShowInTaskbarProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(false)); + BackgroundProperty.OverrideMetadata(typeof(DocumentNavigatorWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); + } + + public static object Theme; + + internal DocumentNavigatorWindow() + { + } + + void OnKeyUp(object sender, KeyEventArgs e) + { + if (e.Key != Key.Tab) + CloseThisWindow();//Hide(); + else + { + e.Handled = true; + MoveNextSelectedContent(); + } + } + + void OnKeyDown(object sender, KeyEventArgs e) + { + if (e.Key != Key.Tab) + CloseThisWindow();//Hide(); + else + { + e.Handled = true; + } + } + + void CloseThisWindow() + { + Window wndParent = this.Owner; + Close(); + wndParent.Activate(); + } + + DockingManager _manager; + public DocumentNavigatorWindow(DockingManager manager) + :this() + { + _manager = manager; + Keyboard.AddKeyUpHandler(this, new KeyEventHandler(this.OnKeyUp)); + Keyboard.AddKeyDownHandler(this, new KeyEventHandler(this.OnKeyDown)); + } + + + protected override void OnActivated(EventArgs e) + { + base.OnActivated(e); + + //List listOfDocuments = _manager.FindContents(); + List docs = new List(); + _manager.Documents.ForEach((DocumentContent doc) => + { + docs.Add(new NavigatorWindowDocumentItem(doc)); + }); + + //docs.Sort((NavigatorWindowDocumentItem item1, NavigatorWindowDocumentItem item2) => + //{ + // if (item1 == item2 || + // item1.LastActivation == item2.LastActivation) + // return 0; + // return (item1.LastActivation < item2.LastActivation) ? 1 : -1; + //}); + + Documents = docs; + + _internalSelect = true; + + SelectedContent = Documents.Find((NavigatorWindowDocumentItem docItem) => + { + return docItem.ItemContent == _manager.ActiveDocument; + }); + + _internalSelect = false; + } + + protected override void OnDeactivated(EventArgs e) + { + if (_manager != null) + { + Window mainWindow = Window.GetWindow(_manager); + if (mainWindow != null) + { + mainWindow.Activate(); + if (SelectedContent != null) + { + _manager.Show(SelectedContent.ItemContent as DocumentContent); + SelectedContent.ItemContent.Activate(); + } + } + } + + if (!_isClosing) + CloseThisWindow(); + + base.OnDeactivated(e); + } + + + + ListBox _itemsControl; + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _itemsControl = GetTemplateChild("PART_ScrollingPanel") as ListBox; + } + + List _documents = new List(); + + public List Documents + { + get { return _documents; } + private + set + { + _documents = value; + NotifyPropertyChanged("Documents"); + } + } + + NavigatorWindowDocumentItem _selectedContent; + + bool _internalSelect = false; + + public NavigatorWindowDocumentItem SelectedContent + { + get + { + return _selectedContent; + } + set + { + if (_selectedContent != value) + { + _selectedContent = value; + NotifyPropertyChanged("SelectedContent"); + + if (!_internalSelect && _selectedContent != null) + CloseThisWindow();//Hide(); + + if (_internalSelect && _itemsControl != null) + _itemsControl.ScrollIntoView(_selectedContent); + } + } + } + + + public void MoveNextSelectedContent() + { + if (_selectedContent == null) + return; + + if (Documents.Contains(SelectedContent)) + { + int indexOfSelecteContent = Documents.IndexOf(_selectedContent); + + if (indexOfSelecteContent == Documents.Count - 1) + { + indexOfSelecteContent = 0; + } + else + indexOfSelecteContent++; + + _internalSelect = true; + SelectedContent = Documents[indexOfSelecteContent]; + _internalSelect = false; + } + } + + bool _isClosing = false; + protected override void OnClosing(CancelEventArgs e) + { + _isClosing = true; + + base.OnClosing(e); + } + + protected override void OnClosed(EventArgs e) + { + //reset documents list to avoid WPF Bug: + //http://social.msdn.microsoft.com/forums/en/wpf/thread/f3fc5b7e-e035-4821-908c-b6c07e5c7042/ + //http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=321955 + Documents = new List(); + + base.OnClosed(e); + } + + + #region INotifyPropertyChanged Members + + public event PropertyChangedEventHandler PropertyChanged; + + void NotifyPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + } + +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs new file mode 100644 index 0000000000..5d8ab68111 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentPane.cs @@ -0,0 +1,525 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.Linq; + +namespace AvalonDock +{ + public class DocumentPane : Pane + { + static DocumentPane() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(DocumentPane), new FrameworkPropertyMetadata(typeof(DocumentPane))); + + } + + public DocumentPane() + { + this.Loaded += new RoutedEventHandler(DocumentPane_Loaded); + } + + void DocumentPane_Loaded(object sender, RoutedEventArgs e) + { + if (Parent == null) + return; + + if (GetManager() == null) + return; + //throw new InvalidOperationException("DocumentPane must be put under a DockingManager!"); + + //try to set this as main document pane + if (GetManager().MainDocumentPane == null) + { + GetManager().MainDocumentPane = this; + NotifyPropertyChanged("IsMainDocumentPane"); + } + else + { + //or ensure that this document pane is under or at the same level of the MainDocumentPane + GetManager().EnsurePanePositionIsValid(this); + } + } + + /// + /// Returns a value indicating if this pane is the main document pane + /// + /// The main document pane is the default pane that remains always visible. + public bool? IsMainDocumentPane + { + get + { + if (GetManager() == null) + return null; + + return GetManager().MainDocumentPane == this; + } + } + + + #region ContainsActiveDocument + + internal void RefreshContainsActiveDocumentProperty() + { + SetContainsActiveDocument( + Items.Cast().FirstOrDefault(d => d.IsActiveDocument) != null); + + if (Items.Count > 0) + Debug.WriteLine("{0} ContainsActiveDocument ={1}", (Items[0] as ManagedContent).Title, ContainsActiveDocument); + } + + + /// + /// ContainsActiveDocument Read-Only Dependency Property + /// + /// This property is especially intended for use in restyling. + private static readonly DependencyPropertyKey ContainsActiveDocumentPropertyKey + = DependencyProperty.RegisterReadOnly("ContainsActiveDocument", typeof(bool), typeof(DocumentPane), + new FrameworkPropertyMetadata((bool)false, + new PropertyChangedCallback(OnContainsActiveDocumentChanged))); + + public static readonly DependencyProperty ContainsActiveDocumentProperty + = ContainsActiveDocumentPropertyKey.DependencyProperty; + + /// + /// Gets the ContainsActiveDocument property. This dependency property + /// indicates if this pane contains a that has property set to true. + /// + public bool ContainsActiveDocument + { + get { return (bool)GetValue(ContainsActiveDocumentProperty); } + } + + /// + /// Provides a secure method for setting the ContainsActiveDocument property. + /// This dependency property indicates if this pane contains a that has property set to true. + /// + /// The new value for the property. + protected void SetContainsActiveDocument(bool value) + { + SetValue(ContainsActiveDocumentPropertyKey, value); + } + + /// + /// Handles changes to the ContainsActiveDocument property. + /// + private static void OnContainsActiveDocumentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((DocumentPane)d).OnContainsActiveDocumentChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the ContainsActiveDocument property. + /// + protected virtual void OnContainsActiveDocumentChanged(DependencyPropertyChangedEventArgs e) + { + NotifyPropertyChanged("ContainsActiveDocument"); + } + + #endregion + + protected override void OnInitialized(EventArgs e) + { + this.CommandBindings.Add( + new CommandBinding(DocumentPaneCommands.CloseThis, OnExecuteCommand, OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DocumentPaneCommands.CloseAllButThis, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DocumentPaneCommands.NewHorizontalTabGroup, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(DocumentPaneCommands.NewVerticalTabGroup, this.OnExecuteCommand, this.OnCanExecuteCommand)); + + + base.OnInitialized(e); + } + + #region DocumentPane Commands + + //#region Show Document Window List Command + + //public static RoutedCommand ShowDocumentsListMenuCommand = new RoutedCommand(); + + //public void ExecutedShowDocumentsListMenuCommand(object sender, + // ExecutedRoutedEventArgs e) + //{ + // //MessageBox.Show("ShowOptionsMenu"); + // ShowDocumentsListMenu(); + //} + + + //public void CanExecuteShowDocumentsListMenuCommand(object sender, + // CanExecuteRoutedEventArgs e) + //{ + // e.CanExecute = true; + //} + + //#endregion + + //#region Close Command + + ////ApplicationCommands.Close command.... + + //public void ExecutedCloseCommand(object sender, + // ExecutedRoutedEventArgs e) + //{ + //} + + + //public void CanExecuteCloseCommand(object sender, + // CanExecuteRoutedEventArgs e) + //{ + // e.CanExecute = true; + //} + + //#endregion + + #region Commands + + protected override void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (e.Command == DocumentPaneCommands.CloseThis) + { + CloseThis(e.Parameter as ManagedContent); + e.Handled = true; + } + else if (e.Command == DocumentPaneCommands.CloseAllButThis) + { + CloseAllButThis(); + e.Handled = true; + } + else if (e.Command == DocumentPaneCommands.NewHorizontalTabGroup) + { + CreateNewHorizontalTabGroup(); + e.Handled = true; + } + else if (e.Command == DocumentPaneCommands.NewVerticalTabGroup) + { + CreateNewVerticalTabGroup(); + e.Handled = true; + } + //else if (e.Command == DocumentPaneCommands.ActivateDocument) + //{ + // ManagedContent doc = e.Parameter as ManagedContent; + // if (doc != null) + // { + // doc.Activate(); + // } + //} + + } + + protected override void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = this.GetManager() != null; + + if (e.CanExecute) + { + if (e.Command == DocumentPaneCommands.NewHorizontalTabGroup || + e.Command == DocumentPaneCommands.NewVerticalTabGroup || + e.Command == DocumentPaneCommands.CloseAllButThis) + { + if (this.Items.Count <= 1) + e.CanExecute = false; + } + } + } + + public void Close() + { + CloseThis(null); + } + + void CloseThis(ManagedContent contentToClose) + { + if (GetManager() == null) + return; + + if (contentToClose == null) + contentToClose = SelectedItem as ManagedContent; + + DockableContent dockableContent = contentToClose as DockableContent; + + if (dockableContent != null) + dockableContent.Close(); + else + { + DocumentContent documentContent = contentToClose as DocumentContent; + documentContent.Close(); + } + + } + + void CloseAllButThis() + { + DocumentContent activeContent = GetManager().ActiveDocument as DocumentContent; + foreach (DocumentContent cnt in this.GetManager().Documents.ToArray()) + { + if (cnt != activeContent) + cnt.Close(); + } + } + + public DocumentPane CreateNewHorizontalTabGroup() + { + ManagedContent activeContent = SelectedItem as ManagedContent; + DocumentPane newContainerPane = new DocumentPane(); + + int indexOfDocumentInItsContainer = activeContent.ContainerPane.Items.IndexOf(activeContent); + activeContent.ContainerPane.RemoveContent(indexOfDocumentInItsContainer); + newContainerPane.Items.Add(activeContent); + + GetManager().Anchor(newContainerPane, this, AnchorStyle.Bottom); + + return newContainerPane; + } + + public DocumentPane CreateNewVerticalTabGroup() + { + ManagedContent activeContent = SelectedItem as ManagedContent; + DocumentPane newContainerPane = new DocumentPane(); + + int indexOfDocumentInItsContainer = activeContent.ContainerPane.Items.IndexOf(activeContent); + activeContent.ContainerPane.RemoveContent(indexOfDocumentInItsContainer); + newContainerPane.Items.Add(activeContent); + + GetManager().Anchor(newContainerPane, this, AnchorStyle.Right); + + return newContainerPane; + } + + #endregion + + #endregion + + Button _optionsContextMenuPlacementTarget; + + public override void OnApplyTemplate() + { + _optionsContextMenuPlacementTarget = GetTemplateChild("PART_ShowContextMenuButton") as Button; + + if (_optionsContextMenuPlacementTarget != null) + { + _optionsContextMenuPlacementTarget.Click += (s, e) => { ShowDocumentsListMenu(); }; + } + + base.OnApplyTemplate(); + } + + void ShowDocumentsListMenu() + { + if (Items.Count == 0) + return; //nothings to show + + ContextMenu cxMenuDocuments = (ContextMenu)TryFindResource("DocumentsListMenu"); + if (cxMenuDocuments != null) + { + cxMenuDocuments.ItemsSource = Items.OfType().OrderBy(c => c.Title); + //cxMenuDocuments.CommandBindings.Add(new CommandBinding(ActivateDocumentCommand, new ExecutedRoutedEventHandler(this.ExecutedActivateDocumentCommand), new CanExecuteRoutedEventHandler(CanExecuteActivateDocumentCommand))); + + if (_optionsContextMenuPlacementTarget != null) + { + cxMenuDocuments.Placement = PlacementMode.Bottom; + cxMenuDocuments.PlacementTarget = _optionsContextMenuPlacementTarget; + } + else + { + cxMenuDocuments.Placement = PlacementMode.MousePoint; + cxMenuDocuments.PlacementTarget = this; + } + + cxMenuDocuments.IsOpen = true; + } + } + + + protected override void OnMouseDown(MouseButtonEventArgs e) + { + base.OnMouseDown(e); + + if (!e.Handled) + { + if (_partHeader != null && + !_partHeader.IsMouseOver) + { + //prevent document content to start dragging when it is clicked outside of the header area + e.Handled = true; + } + } + } + + internal void CheckContentsEmpty() + { + if (Items.Count == 0) + { + bool isMainDocPaneToBeClose = IsMainDocumentPane.HasValue && + IsMainDocumentPane.Value; + + if (isMainDocPaneToBeClose) + { + DockingManager manager = GetManager(); + DocumentPane candidateNewMainDocPane = manager.FindAnotherLogicalChildContained(this); + if (candidateNewMainDocPane != null) + { + ResizingPanel containerPanel = Parent as ResizingPanel; + if (containerPanel != null) + containerPanel.RemoveChild(this); + + manager.MainDocumentPane = candidateNewMainDocPane; + candidateNewMainDocPane.NotifyPropertyChanged("IsMainDocumentPane"); + } + } + else + { + ResizingPanel containerPanel = Parent as ResizingPanel; + if (containerPanel != null) + containerPanel.RemoveChild(this); + } + } + + } + + + internal override ResizingPanel GetContainerPanel() + { + return GetParentDocumentPaneResizingPanel(); + } + + internal DocumentPaneResizingPanel GetParentDocumentPaneResizingPanel() + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(this) as ResizingPanel; + + if (parentPanel == null) + return null; + + while (!(parentPanel is DocumentPaneResizingPanel)) + { + parentPanel = LogicalTreeHelper.GetParent(parentPanel) as ResizingPanel; + + if (parentPanel == null) + return null; + } + + return parentPanel as DocumentPaneResizingPanel; + } + + protected override bool IsSurfaceVisible + { + get + { + if (IsMainDocumentPane.HasValue && + !IsMainDocumentPane.Value && + Items.Count == 0) + return false; + + return true; + } + } + + protected override Rect SurfaceRectangle + { + get + { + return base.SurfaceRectangle; + //it is dragging a document let drop in this document pane + //if (GetManager().DragPaneServices.FloatingWindow is DocumentFloatingWindow) + // return base.SurfaceRectangle; + + ////otherwise we should provide a drop surface for all the DocumentPaneResizingPanel + //DocumentPaneResizingPanel parentPanel = GetParentDocumentPaneResizingPanel(); + + //if (parentPanel == null) + // return base.SurfaceRectangle; + + //return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(parentPanel, new Point(0, 0)), new Size(parentPanel.ActualWidth, parentPanel.ActualHeight)); + //return new Rect(parentPanel.PointToScreen(new Point(0, 0)), new Size(parentPanel.ActualWidth, parentPanel.ActualHeight)); + } + } + + protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (e.NewItems != null) + { + foreach (object newItem in e.NewItems) + { + if (!(newItem is DockableContent) && + !(newItem is DocumentContent)) + throw new InvalidOperationException("DocumentPane can contain only DockableContents or DocumentContents!"); + + if (newItem is DockableContent && + (((DockableContent)newItem).DockableStyle & DockableStyle.Document) == 0) + { + ((DockableContent)newItem).DockableStyle |= DockableStyle.Document; + } + + var dockContent = newItem as DockableContent; + if (dockContent != null) + dockContent.SetStateToDocument(); + } + } + + RefreshContainsActiveDocumentProperty(); + + //if (Items.Count > 0 && + // SelectedItem == null && + // GetManager() != null) + //{ + // //get previously activated content + // var documentToActivate = Items.OrderBy(d => d.LastActivation).LastOrDefault(d => d != cntDeactivated); + + // Debug.WriteLine(string.Format("Activated Document '{0}'", documentToActivate != null ? documentToActivate.Title : "")); + + // if (documentToActivate != null) + // documentToActivate.Activate(); + // //ActiveDocument = MainDocumentPane.SelectedItem as ManagedContent; + //} + + base.OnItemsChanged(e); + } + + protected override void OnSelectionChanged(SelectionChangedEventArgs e) + { + ManagedContent selectedContent = this.SelectedItem as ManagedContent; + if (selectedContent != null && GetManager() != null) + GetManager().ActiveDocument = selectedContent; + + base.OnSelectionChanged(e); + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentPaneCommands.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentPaneCommands.cs new file mode 100644 index 0000000000..192ebc1871 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentPaneCommands.cs @@ -0,0 +1,142 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + public sealed class DocumentPaneCommands + { + private static object syncRoot = new object(); + + + private static RoutedUICommand closeAllButThisCommand = null; + public static RoutedUICommand CloseAllButThis + { + get + { + lock (syncRoot) + { + if (null == closeAllButThisCommand) + { + closeAllButThisCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentPaneCommands_CloseAllButThis, "CloseAllButThis", typeof(DocumentPaneCommands)); + } + } + return closeAllButThisCommand; + } + } + + private static RoutedUICommand closeThisCommand = null; + public static RoutedUICommand CloseThis + { + get + { + lock (syncRoot) + { + if (null == closeThisCommand) + { + closeThisCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentPaneCommands_CloseThis, "Close", typeof(DocumentPaneCommands)); + } + } + return closeThisCommand; + } + } + + private static RoutedUICommand newHTabGroupCommand = null; + public static RoutedUICommand NewHorizontalTabGroup + { + get + { + lock (syncRoot) + { + if (null == newHTabGroupCommand) + { + newHTabGroupCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentPaneCommands_NewHorizontalTabGroup, "NewHorizontalTabGroup", typeof(DocumentPaneCommands)); + } + } + return newHTabGroupCommand; + } + } + + private static RoutedUICommand newVTabGroupCommand = null; + public static RoutedUICommand NewVerticalTabGroup + { + get + { + lock (syncRoot) + { + if (null == newVTabGroupCommand) + { + newVTabGroupCommand = new RoutedUICommand(AvalonDock.Properties.Resources.DocumentPaneCommands_NewVerticalTabGroup, "NewVerticalTabGroup", typeof(DocumentPaneCommands)); + } + } + return newVTabGroupCommand; + } + } + + + //private static RoutedUICommand activateDocument = null; + //public static RoutedUICommand ActivateDocument + //{ + // get + // { + // lock (syncRoot) + // { + // if (null == activateDocument) + // { + // activateDocument = new RoutedUICommand("Activate Document", "ActivateDocuement", typeof(DocumentPaneCommands)); + // } + // } + // return activateDocument; + // } + //} + + //#region Activate Document Command + //public static RoutedCommand ActivateDocumentCommand = new RoutedCommand(); + + //public void ExecutedActivateDocumentCommand(object sender, + // ExecutedRoutedEventArgs e) + //{ + // ManagedContent doc = e.Parameter as ManagedContent; + // if (doc != null) + // { + // doc.Activate(); + // } + //} + + //public void CanExecuteActivateDocumentCommand(object sender, + // CanExecuteRoutedEventArgs e) + //{ + // e.CanExecute = true; + //} + + //#endregion + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentPaneResizingPanel.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentPaneResizingPanel.cs new file mode 100644 index 0000000000..64d7d91512 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentPaneResizingPanel.cs @@ -0,0 +1,55 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Windows.Markup; +using System.Diagnostics; + +namespace AvalonDock +{ + public class DocumentPaneResizingPanel : ResizingPanel + { + +//#if DEBUG +// static int inst = 0; +// public DocumentPaneResizingPanel() +// { +// inst++; +// Debug.Assert(inst < 2); +// } +//#endif + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs b/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs new file mode 100644 index 0000000000..65226ee9fc --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DocumentTabPanel.cs @@ -0,0 +1,131 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Diagnostics; +using System.ComponentModel; + +namespace AvalonDock +{ + [EditorBrowsable(EditorBrowsableState.Never)] + public class DocumentTabPanel : PaneTabPanel + { + public static bool GetIsHeaderVisible(DependencyObject obj) + { + return (bool)obj.GetValue(IsHeaderVisibleProperty); + } + + public static void SetIsHeaderVisible(DependencyObject obj, bool value) + { + obj.SetValue(IsHeaderVisibleProperty, value); + } + + // Using a DependencyProperty as the backing store for IsHeaderVisible. This enables animation, styling, binding, etc... + public static readonly DependencyProperty IsHeaderVisibleProperty = + DependencyProperty.RegisterAttached("IsHeaderVisible", typeof(bool), typeof(DocumentTabPanel), new UIPropertyMetadata(false)); + + + protected override Size MeasureOverride(Size availableSize) + { + Size desideredSize = new Size(); + int i = 1; + + foreach (ManagedContent child in Children) + { + Panel.SetZIndex(child, Selector.GetIsSelected(child)?1:-i); + i++; + //child.Width = double.NaN; + //child.Height = double.NaN; + child.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); + desideredSize.Width += child.DesiredSize.Width; + desideredSize.Height = Math.Max(desideredSize.Height, child.DesiredSize.Height); + } + + return new Size(Math.Min(desideredSize.Width, availableSize.Width), desideredSize.Height); + //return base.MeasureOverride(availableSize); + //return desideredSize; + } + + protected override Size ArrangeOverride(Size finalSize) + { + double offset = 0.0; + bool skipAllOthers = false; + foreach (ManagedContent doc in Children) + { + if (skipAllOthers || offset + doc.DesiredSize.Width > finalSize.Width) + { + SetIsHeaderVisible(doc, false); + doc.Arrange(new Rect()); + skipAllOthers = true; + } + else + { + SetIsHeaderVisible(doc, true); + doc.Arrange(new Rect(offset, 0.0, doc.DesiredSize.Width, finalSize.Height)); + offset += doc.ActualWidth; + } + } + + return finalSize; + + } + + //#region Padding + + ///// + ///// Padding Dependency Property + ///// + //public static readonly DependencyProperty PaddingProperty = + // DependencyProperty.Register("Padding", typeof(Thickness), typeof(DocumentTabPanel), + // new FrameworkPropertyMetadata((Thickness)new Thickness(), + // FrameworkPropertyMetadataOptions.AffectsMeasure)); + + ///// + ///// Gets or sets the Padding property. This dependency property + ///// indicates internal padding of the panel. + ///// + //public Thickness Padding + //{ + // get { return (Thickness)GetValue(PaddingProperty); } + // set { SetValue(PaddingProperty, value); } + //} + + //#endregion + + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/DragPaneServices.cs b/src/Libraries/AvalonDock/AvalonDock/DragPaneServices.cs new file mode 100644 index 0000000000..bca01d5496 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/DragPaneServices.cs @@ -0,0 +1,195 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Diagnostics; +using System.ComponentModel; + +namespace AvalonDock +{ + /// + /// Provides drag-drop functionalities for dockable panes + /// + internal sealed class DragPaneServices + { + List Surfaces = new List(); + List SurfacesWithDragOver = new List(); + + DockingManager _owner; + + public DockingManager DockManager + { + get { return _owner; } + } + + public DragPaneServices(DockingManager owner) + { + if (DesignerProperties.GetIsInDesignMode(owner)) + throw new NotSupportedException("DragPaneServices not valid in design mode"); + + if (owner == null) + throw new ArgumentNullException("owner"); + + _owner = owner; + } + + public void Register(IDropSurface surface) + { + if (!Surfaces.Contains(surface)) + Surfaces.Add(surface); + } + + public void Unregister(IDropSurface surface) + { + Surfaces.Remove(surface); + } + + Point Offset; + + public bool IsDragging { get; private set; } + + public void StartDrag(FloatingWindow wnd, Point point, Point offset) + { + Debug.Assert(!IsDragging); + + IsDragging = true; + + Offset = offset; + + _wnd = wnd; + + if (Offset.X >= _wnd.Width) + Offset.X = _wnd.Width / 2; + + + _wnd.Left = point.X - Offset.X; + _wnd.Top = point.Y - Offset.Y; + _wnd.Show(); + + int surfaceCount = 0; + restart: + surfaceCount = Surfaces.Count; + foreach (IDropSurface surface in Surfaces) + { + if (surface.SurfaceRectangle.Contains(point)) + { + SurfacesWithDragOver.Add(surface); + surface.OnDragEnter(point); + Debug.WriteLine("Enter " + surface.ToString()); + if (surfaceCount != Surfaces.Count) + { + //Surfaces list has been changed restart cycle + SurfacesWithDragOver.Clear(); + goto restart; + } + } + } + + } + + public void MoveDrag(Point point) + { + if (_wnd == null) + return; + + _wnd.Left = point.X - Offset.X; + _wnd.Top = point.Y - Offset.Y; + + List enteringSurfaces = new List(); + foreach (IDropSurface surface in Surfaces) + { + if (surface.SurfaceRectangle.Contains(point)) + { + if (!SurfacesWithDragOver.Contains(surface)) + enteringSurfaces.Add(surface); + else + surface.OnDragOver(point); + } + else if (SurfacesWithDragOver.Contains(surface)) + { + SurfacesWithDragOver.Remove(surface); + surface.OnDragLeave(point); + } + } + + foreach (IDropSurface surface in enteringSurfaces) + { + SurfacesWithDragOver.Add(surface); + surface.OnDragEnter(point); + } + } + + public void EndDrag(Point point) + { + IDropSurface dropSufrace = null; + foreach (IDropSurface surface in Surfaces) + { + if (surface.SurfaceRectangle.Contains(point)) + { + if (surface.OnDrop(point)) + { + dropSufrace = surface; + break; + } + } + } + + foreach (IDropSurface surface in SurfacesWithDragOver) + { + if (surface != dropSufrace) + { + surface.OnDragLeave(point); + } + } + + SurfacesWithDragOver.Clear(); + + _wnd.OnEndDrag();//notify floating window that drag operation is coming to end + + if (dropSufrace != null) + _wnd.Close(); + else + { + _wnd.Visibility = Visibility.Visible; + _wnd.Activate(); + } + + _wnd = null; + + IsDragging = false; + + } + + FloatingWindow _wnd; + public FloatingWindow FloatingWindow + { + get { return _wnd; } + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs b/src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs new file mode 100644 index 0000000000..1751b0c877 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/FloatingDockablePane.cs @@ -0,0 +1,216 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Linq; +using System.Windows.Data; + +namespace AvalonDock +{ + public class FloatingDockablePane : DockablePane + { + static FloatingDockablePane() + { + //DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(typeof(FloatingDockablePane))); + //by design avoid style change + + Pane.ShowHeaderProperty.OverrideMetadata(typeof(FloatingDockablePane), new FrameworkPropertyMetadata(false)); + + } + + + + internal FloatingDockablePane(DockableFloatingWindow floatingWindow, DockablePane paneToTransfer) + { + _floatingWindow = floatingWindow; + _paneToTransfer = paneToTransfer; + } + + internal FloatingDockablePane(DockableFloatingWindow floatingWindow, DockableContent contentToTransfer) + { + _floatingWindow = floatingWindow; + _contentToTransfer = contentToTransfer; + } + + protected override void OnInitialized(EventArgs e) + { + if (_paneToTransfer != null) + { + //setup window size + ManagedContent selectedContent = _paneToTransfer.SelectedItem as ManagedContent; + if (selectedContent is DockableContent) + { + _floatingWindow.SizeToContent = (selectedContent as DockableContent).FloatingWindowSizeToContent; + } + + if (selectedContent != null && selectedContent.FloatingWindowSize.IsEmpty) + selectedContent.FloatingWindowSize = new Size(_paneToTransfer.ActualWidth, _paneToTransfer.ActualHeight); + + if (selectedContent != null) + { + _floatingWindow.Width = selectedContent.FloatingWindowSize.Width; + _floatingWindow.Height = selectedContent.FloatingWindowSize.Height; + } + else + { + _floatingWindow.Width = _paneToTransfer.ActualWidth; + _floatingWindow.Height = _paneToTransfer.ActualHeight; + } + + int selectedIndex = _paneToTransfer.SelectedIndex; + + //remove contents from container pane and insert in hosted pane + while (_paneToTransfer.Items.Count > 0) + { + DockableContent contentToTranser = _paneToTransfer.Items[0] as DockableContent; + + contentToTranser.SaveCurrentStateAndPosition(); + + _paneToTransfer.RemoveContent(0); + + //add content to my temporary pane + Items.Add(contentToTranser); + + contentToTranser.SetStateToDockableWindow(); + } + + SelectedIndex = selectedIndex; + + //transfer the style from the original dockablepane + //Style = _paneToTransfer.Style; + AttachStyleFromPane(_paneToTransfer); + + ApplyTemplate(); + } + else if (_contentToTransfer != null) + { + //setup window size + if (_contentToTransfer.FloatingWindowSize.IsEmpty) + _contentToTransfer.FloatingWindowSize = new Size(_contentToTransfer.ContainerPane.ActualWidth, _contentToTransfer.ContainerPane.ActualHeight); + + _floatingWindow.Width = _contentToTransfer.FloatingWindowSize.Width; + _floatingWindow.Height = _contentToTransfer.FloatingWindowSize.Height; + + //save current content position in container pane + _previousPane = _contentToTransfer.ContainerPane; + + _arrayIndexPreviousPane = _previousPane.Items.IndexOf(_contentToTransfer); + + _contentToTransfer.SaveCurrentStateAndPosition(); + + //remove content from container pane + _contentToTransfer.ContainerPane.RemoveContent(_arrayIndexPreviousPane); + + //add content to this pane + Items.Add(_contentToTransfer); + + SelectedIndex = 0; + + //if (_previousPane is DockablePane) + //{ + // Style = _previousPane.Style; + //} + AttachStyleFromPane(_previousPane as DockablePane); + + DocumentPane originalDocumentPane = _previousPane as DocumentPane; + if (originalDocumentPane != null) + originalDocumentPane.CheckContentsEmpty(); + + + _contentToTransfer.SetStateToDockableWindow(); + } + + base.OnInitialized(e); + } + + void AttachStyleFromPane(DockablePane copyFromPane) + { + if (copyFromPane == null) + return; + + Binding bnd = new Binding("Style"); + bnd.Source = copyFromPane; + bnd.Mode = BindingMode.OneWay; + + SetBinding(StyleProperty, bnd); + } + + DockablePane _paneToTransfer = null; + DockableContent _contentToTransfer = null; + + Pane _previousPane = null; + int _arrayIndexPreviousPane = -1; + + DockableFloatingWindow _floatingWindow = null; + + public DockableFloatingWindow FloatingWindow + { + get { return _floatingWindow; } + } + + public override DockingManager GetManager() + { + return _floatingWindow.Manager; + } + + protected override void CheckItems(System.Collections.IList newItems) + { + if (Items.Count == 0 && FloatingWindow != null) + FloatingWindow.Close(true); + } + + protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (e.NewItems != null) + { + e.NewItems.Cast().ForEach(c => + { + if (c.State == DockableContentState.None) + { + if (FloatingWindow.IsDockableWindow) + c.SetStateToDockableWindow(); + else + c.SetStateToFloatingWindow(); + } + }); + } + + base.OnItemsChanged(e); + } + + public override void Dock() + { + DockableContent[] contentsToRedock = Items.Cast().ToArray(); + + foreach (var cntToRedock in contentsToRedock) + cntToRedock.Show(); + + base.Dock(); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/FloatingDocumentPane.cs b/src/Libraries/AvalonDock/AvalonDock/FloatingDocumentPane.cs new file mode 100644 index 0000000000..993a480292 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/FloatingDocumentPane.cs @@ -0,0 +1,126 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Data; + +namespace AvalonDock +{ + internal class FloatingDocumentPane : DocumentPane + { + static FloatingDocumentPane() + { + Pane.ShowHeaderProperty.OverrideMetadata(typeof(FloatingDocumentPane), new FrameworkPropertyMetadata(false)); + } + + internal FloatingDocumentPane(DocumentFloatingWindow floatingWindow, DocumentContent documentToTransfer) + { + _floatingWindow = floatingWindow; + _documentToTransfer = documentToTransfer; + } + + DocumentContent _documentToTransfer = null; + DocumentPane _previousPane = null; + + internal DocumentPane PreviousPane + { + get + { return _previousPane; } + } + + int _arrayIndexPreviousPane = -1; + + internal int ArrayIndexPreviousPane + { + get { return _arrayIndexPreviousPane; } + } + + protected override void OnInitialized(EventArgs e) + { + //setup window size + _floatingWindow.Width = _documentToTransfer.ContainerPane.ActualWidth; + _floatingWindow.Height = _documentToTransfer.ContainerPane.ActualHeight; + + //save current content position in container pane + _previousPane = _documentToTransfer.ContainerPane as DocumentPane; + _arrayIndexPreviousPane = _previousPane.Items.IndexOf(_documentToTransfer); + SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); + SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); + + //Style = _previousPane.Style; + AttachStyleFromPane(_previousPane); + + //remove content from container pane + _previousPane.RemoveContent(_arrayIndexPreviousPane); + + //add content to my temporary pane + Items.Add(_documentToTransfer); + + _documentToTransfer.SetIsFloating(true); + + base.OnInitialized(e); + } + + void AttachStyleFromPane(DocumentPane copyFromPane) + { + if (copyFromPane == null) + return; + + Binding bnd = new Binding("Style"); + bnd.Source = copyFromPane; + bnd.Mode = BindingMode.OneWay; + + SetBinding(StyleProperty, bnd); + } + + protected override void OnUnloaded(object sender, RoutedEventArgs e) + { + _documentToTransfer.SetIsFloating(false); + base.OnUnloaded(sender, e); + } + + + DocumentFloatingWindow _floatingWindow = null; + + public DocumentFloatingWindow FloatingWindow + { + get { return _floatingWindow; } + } + + public override DockingManager GetManager() + { + return _floatingWindow.Manager; + } + + protected override bool IsSurfaceVisible + { + get + { + return false; + } + } + + protected override void CheckItems(System.Collections.IList newItems) + { + foreach (object newItem in newItems) + { + if (!(newItem is DocumentContent)) + throw new InvalidOperationException("FloatingDocumentPane can contain only DocumentContents!"); + } + + if (Items.Count == 0 && FloatingWindow != null) + FloatingWindow.Close(true); + } + + public override void Dock() + { + var contentsToRedock = Items.Cast().ToArray(); + + foreach (var cntToRedock in contentsToRedock) + cntToRedock.Show(); + + base.Dock(); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs b/src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs new file mode 100644 index 0000000000..993de8ee3a --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/FloatingWindow.cs @@ -0,0 +1,617 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Markup; +using System.Diagnostics; +using System.Windows.Threading; +using System.Windows.Media.Animation; +using System.Windows.Interop; +using System.Runtime.InteropServices; +using System.Linq; + +namespace AvalonDock +{ + /// + /// Represents the base class for and classes + /// + /// Provides base services for floating windows + public abstract class FloatingWindow : AvalonDockWindow + { + static FloatingWindow() + { + Window.ShowInTaskbarProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(false)); + Window.WindowStyleProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(WindowStyle.ToolWindow)); + + //DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatingWindow), new FrameworkPropertyMetadata(typeof(FloatingWindow))); + } + + + internal FloatingWindow() + { + this.Loaded += new RoutedEventHandler(OnLoaded); + this.Unloaded += new RoutedEventHandler(OnUnloaded); + + this.SizeChanged += new SizeChangedEventHandler(FloatingWindow_SizeChanged); + } + + internal FloatingWindow(DockingManager manager) + : this() + { + //save manager ref + _manager = manager; + } + + void FloatingWindow_SizeChanged(object sender, SizeChangedEventArgs e) + { + if (HostedPane != null) + { + foreach (ManagedContent c in HostedPane.Items) + c.FloatingWindowSize = new Size(Width, Height); + + ResizingPanel.SetEffectiveSize(HostedPane, new Size(Width, Height)); + } + } + + DockingManager _manager = null; + + internal DockingManager Manager + { + get { return _manager; } + } + + public Pane HostedPane + { + get { return Content as Pane; } + } + + #region ContentTitle + + /// + /// ContentTitle Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey ContentTitlePropertyKey + = DependencyProperty.RegisterReadOnly("ContentTitle", typeof(object), typeof(FloatingWindow), + new FrameworkPropertyMetadata((object)null)); + + public static readonly DependencyProperty ContentTitleProperty + = ContentTitlePropertyKey.DependencyProperty; + + /// + /// Gets the ContentTitle property. This dependency property + /// indicates title of the content currectly hosted in the floating window. + /// + public object ContentTitle + { + get { return (object)GetValue(ContentTitleProperty); } + } + + /// + /// Provides a secure method for setting the ContentTitle property. + /// This dependency property indicates title of the content currectly hosted in the floating window. + /// + /// The new value for the property. + protected void SetContentTitle(object value) + { + SetValue(ContentTitlePropertyKey, value); + } + + + private void UpdateContentTitle() + { + if (HostedPane == null) + return; + + var cnt = HostedPane.SelectedItem as ManagedContent; + if (cnt != null) + SetContentTitle(cnt.Title); + } + #endregion + + + + //#region HostedPane + + ///// + ///// HostedPane Read-Only Dependency Property + ///// + //private static readonly DependencyPropertyKey HostedPanePropertyKey + // = DependencyProperty.RegisterReadOnly("HostedPane", typeof(Pane), typeof(FloatingWindow), + // new FrameworkPropertyMetadata((Pane)null, + // new PropertyChangedCallback(OnHostedPaneChanged))); + + //public static readonly DependencyProperty HostedPaneProperty + // = HostedPanePropertyKey.DependencyProperty; + + ///// + ///// Gets the HostedPane property. This dependency property + ///// indicates the hosted pane contained into the floating window (an hosted pane can be of type or type . + ///// + //public Pane HostedPane + //{ + // get { return (Pane)GetValue(HostedPaneProperty); } + //} + + ///// + ///// Provides a secure method for setting the HostedPane property. + ///// This dependency property indicates the hosted pane contained into the floating window (an hosted pane can be of type or type . + ///// + ///// The new value for the property. + //protected void SetHostedPane(Pane value) + //{ + // SetValue(HostedPanePropertyKey, value); + //} + + ///// + ///// Handles changes to the HostedPane property. + ///// + //private static void OnHostedPaneChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + //{ + // ((FloatingWindow)d).OnHostedPaneChanged(e); + //} + + ///// + ///// Provides derived classes an opportunity to handle changes to the HostedPane property. + ///// + //protected virtual void OnHostedPaneChanged(DependencyPropertyChangedEventArgs e) + //{ + //} + + //#endregion + + protected override void OnInitialized(EventArgs e) + { + + base.OnInitialized(e); + } + + protected override void OnContentChanged(object oldContent, object newContent) + { + base.OnContentChanged(oldContent, newContent); + + if (_manager != null) + { + _manager.RegisterFloatingWindow(this); + _manager.RefreshContents(); + } + + UpdateContentTitle(); + } + + + + internal virtual void OnEndDrag() + { + } + + internal virtual void OnShowSelectionBox() + { + + } + + internal virtual void OnHideSelectionBox() + { + + } + + #region Move/Resize + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + Resizer resLeftAnchor = GetTemplateChild("PART_LeftAnchor") as Resizer; + Resizer resTopAnchor = GetTemplateChild("PART_TopAnchor") as Resizer; + Resizer resBottomAnchor = GetTemplateChild("PART_BottomAnchor") as Resizer; + Resizer resRightAnchor = GetTemplateChild("PART_RightAnchor") as Resizer; + + Resizer resLeftTopAnchor = GetTemplateChild("PART_LeftTopAnchor") as Resizer; + Resizer resLeftBottomAnchor = GetTemplateChild("PART_LeftBottomAnchor") as Resizer; + + Resizer resRightTopAnchor = GetTemplateChild("PART_RightTopAnchor") as Resizer; + Resizer resRightBottomAnchor = GetTemplateChild("PART_RightBottomAnchor") as Resizer; + + //Resizer resMoveAnchor = GetTemplateChild("PART_MoveAnchor") as Resizer; + Border resMoveAnchor = GetTemplateChild("PART_MoveAnchor") as Border; + + if (resLeftAnchor != null) resLeftAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width - e.HorizontalChange) - Width; + this.Left -= delta; + this.Width += delta; + }; + if (resRightAnchor != null) resRightAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width + e.HorizontalChange) - Width; + this.Width += delta; + }; + if (resTopAnchor != null) resTopAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinHeight, Height - e.VerticalChange) - Height; + this.Top -= delta; + this.Height += delta; + }; + if (resBottomAnchor != null) resBottomAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinHeight, Height + e.VerticalChange) - Height; + this.Height += delta; + }; + + if (resLeftTopAnchor != null) resLeftTopAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width - e.HorizontalChange) - Width; + this.Left -= delta; + this.Width += delta; + + delta = Math.Max(MinHeight, Height - e.VerticalChange) - Height; + this.Top -= delta; + this.Height += delta; + }; + if (resLeftBottomAnchor != null) resLeftBottomAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width - e.HorizontalChange) - Width; + this.Left -= delta; + this.Width += delta; + + delta = Math.Max(MinHeight, Height + e.VerticalChange) - Height; + this.Height += delta; + }; + if (resRightTopAnchor != null) resRightTopAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width + e.HorizontalChange) - Width; + this.Width += delta; + + delta = Math.Max(MinHeight, Height - e.VerticalChange) - Height; + this.Top -= delta; + this.Height += delta; + }; + if (resRightBottomAnchor != null) resRightBottomAnchor.DragDelta += (s, e) => + { + double delta = Math.Max(MinWidth, Width + e.HorizontalChange) - Width; + this.Width += delta; + + delta = Math.Max(MinHeight, Height + e.VerticalChange) - Height; + this.Height += delta; + }; + + if (resMoveAnchor != null) + { + bool isMouseDown = false; + Point ptStartDrag = new Point(); + resMoveAnchor.MouseLeftButtonDown += (s, e) => + { + isMouseDown = true; + ptStartDrag = e.GetPosition(s as IInputElement); + resMoveAnchor.CaptureMouse(); + }; + + resMoveAnchor.MouseMove += (s, e) => + { + if (isMouseDown && resMoveAnchor.IsMouseCaptured) + { + Point ptMouseMove = e.GetPosition(s as IInputElement); + if (Math.Abs(ptMouseMove.X - ptStartDrag.X) > SystemParameters.MinimumHorizontalDragDistance || + Math.Abs(ptMouseMove.Y - ptStartDrag.Y) > SystemParameters.MinimumVerticalDragDistance) + { + isMouseDown = false; + resMoveAnchor.ReleaseMouseCapture(); + HandleMove(); + } + } + }; + + resMoveAnchor.MouseLeftButtonUp += (s, e)=> + { + isMouseDown = false; + resMoveAnchor.ReleaseMouseCapture(); + }; + + } + + var pupupButton = GetTemplateChild("PART_ShowContextMenuButton") as FrameworkElement; + + if (pupupButton != null) + pupupButton.MouseLeftButtonDown += (s, e) => + { + e.Handled = OpenContextMenu(s as Border, e.GetPosition(s as IInputElement)); + }; + + var titleAnchor = GetTemplateChild("PART_MoveAnchor") as FrameworkElement; + if (titleAnchor != null) + titleAnchor.MouseRightButtonDown += (s, e) => + { + e.Handled = OpenContextMenu(s as Border, e.GetPosition(s as IInputElement)); + }; + + + base.OnApplyTemplate(); + } + + protected virtual bool OpenContextMenu(UIElement popupButton, Point ptMouse) + { + return false; + } + + protected virtual void HandleMove() + { + Point mousePosition = PointToScreen(Mouse.GetPosition(null)); + Point clickPoint = this.TransformToDeviceDPI(mousePosition); + if (!Manager.DragPaneServices.IsDragging) + Manager.Drag(this, clickPoint, new Point(clickPoint.X - Left, clickPoint.Y - Top)); + } + + #endregion + + #region Active Content Management + ManagedContent lastActiveContent = null; + + protected override void OnActivated(EventArgs e) + { + if (Manager != null) + { + lastActiveContent = Manager.ActiveContent; + Manager.ActiveContent = HostedPane.SelectedItem as ManagedContent; + } + + base.OnActivated(e); + } + + protected override void OnDeactivated(EventArgs e) + { + if (Manager != null && lastActiveContent != null) + { + Manager.ActiveContent = lastActiveContent; + } + base.OnDeactivated(e); + } + #endregion + + #region IsClosing Flag Management + + /// + /// Closes the window regardless of result of contents CanClose method call + /// + /// + internal void Close(bool force) + { + ForcedClosing = force; + base.Close(); + } + + protected bool ForcedClosing { get; private set; } + + internal bool IsClosing { get; private set; } + + protected override void OnClosing(CancelEventArgs e) + { + IsClosing = true; + + if (HostedPane.Items.Count > 0) + { + var contentsToClose = HostedPane.Items.Cast().ToArray(); + foreach (var cntToClose in contentsToClose) + { + //if even a content can't close than cancel the close process, but continue try closing other contents + if (!cntToClose.Close()) + { + //forced closing continues the window close process + if (!ForcedClosing) + e.Cancel = true; + } + } + } + + if (e.Cancel) + IsClosing = false; + else if (_manager != null) + { + _manager.UnregisterFloatingWindow(this); + } + + base.OnClosing(e); + } + + protected override void OnClosed(EventArgs e) + { + IsClosing = false; + base.OnClosed(e); + } + #endregion + + public abstract Pane ClonePane(); + + + #region Enable/Disable window Close Button + [DllImport("User32.dll", CharSet = CharSet.Auto)] + private static extern IntPtr GetSystemMenu( + IntPtr hWnd, + Int32 bRevert + ); + + [DllImport("User32.dll", CharSet = CharSet.Auto)] + private static extern int GetMenuItemCount( + IntPtr hMenu + ); + + [DllImport("User32.dll", CharSet = CharSet.Auto)] + private static extern int DrawMenuBar( + IntPtr hWnd + ); + + [DllImport("User32.dll", CharSet = CharSet.Auto)] + private static extern bool EnableMenuItem( + IntPtr hMenu, + Int32 uIDEnableItem, + Int32 uEnable + ); + + private const Int32 MF_BYPOSITION = 0x400; + private const Int32 MF_ENABLED = 0x0000; + private const Int32 MF_GRAYED = 0x0001; + private const Int32 MF_DISABLED = 0x0002; + + void EnableXButton() + { + WindowInteropHelper helper = new WindowInteropHelper(this); + IntPtr hMenu = GetSystemMenu(helper.Handle, 0); + + int menuItemCount = GetMenuItemCount(hMenu); + + EnableMenuItem(hMenu, menuItemCount - 1, MF_BYPOSITION | MF_ENABLED); + DrawMenuBar(helper.Handle); + } + + void DisableXButton() + { + WindowInteropHelper helper = new WindowInteropHelper(this); + IntPtr hMenu = GetSystemMenu(helper.Handle, 0); + + int menuItemCount = GetMenuItemCount(hMenu); + + EnableMenuItem(hMenu, menuItemCount - 1, MF_BYPOSITION | MF_DISABLED | MF_GRAYED); + DrawMenuBar(helper.Handle); + } + + #endregion + + #region Non-Client area management + + protected const int WM_MOVE = 0x0003; + protected const int WM_SIZE = 0x0005; + protected const int WM_NCMOUSEMOVE = 0xa0; + protected const int WM_NCLBUTTONDOWN = 0xA1; + protected const int WM_NCLBUTTONUP = 0xA2; + protected const int WM_NCLBUTTONDBLCLK = 0xA3; + protected const int WM_NCRBUTTONDOWN = 0xA4; + protected const int WM_NCRBUTTONUP = 0xA5; + protected const int HTCAPTION = 2; + protected const int SC_MOVE = 0xF010; + protected const int WM_SYSCOMMAND = 0x0112; + + + + #region Load/Unload window events + + + protected void OnLoaded(object sender, EventArgs e) + { + WindowInteropWrapper wih = new WindowInteropWrapper(this); + + //wih.WindowActivating += (s, ce) => ce.Cancel = true;//prevent window activating + wih.FilterMessage += new EventHandler(FilterMessage); + + if (HostedPane.Items.Count > 0) + { + ManagedContent cntHosted = HostedPane.Items[0] as ManagedContent; + if (!cntHosted.IsCloseable) + { + DisableXButton(); + } + } + } + + protected void OnUnloaded(object sender, EventArgs e) + { } + #endregion + + + protected virtual void FilterMessage(object sender, FilterMessageEventArgs e) + { + if (e.Handled) + return; + + if (Manager == null) + return; + + switch (e.Msg) + { + case WM_SIZE: + case WM_MOVE: + break; + case WM_NCRBUTTONDOWN: //Right button click on title area -> show context menu + if (e.WParam.ToInt32() == HTCAPTION) + { + short x = (short)((e.LParam.ToInt32() & 0xFFFF)); + short y = (short)((e.LParam.ToInt32() >> 16)); + OpenContextMenu(null, new Point(x, y)); + e.Handled = true; + } + break; + case WM_NCRBUTTONUP: //set as handled right button click on title area (after showing context menu) + if (e.WParam.ToInt32() == HTCAPTION) + { + e.Handled = true; + } + break; + + } + + } + #endregion + + #region Floating/dockable window state + + + /// + /// Redock contained object to the + /// + public virtual void Dock() + { + + } + #endregion + + + + internal void CheckContents() + { + if (HostedPane == null) + return; + + ManagedContent[] cntsToCheck = HostedPane.Items.Cast().ToArray(); + + cntsToCheck.ForEach(cnt => + { + if (cnt.Manager == null || + cnt.Manager != Manager || + (!cnt.Manager.DockableContents.Contains(cnt) && + !cnt.Manager.Documents.Contains(cnt))) + cnt.ContainerPane.RemoveContent(cnt); + }); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/FlyoutDockablePane.cs b/src/Libraries/AvalonDock/AvalonDock/FlyoutDockablePane.cs new file mode 100644 index 0000000000..188f46a5c5 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/FlyoutDockablePane.cs @@ -0,0 +1,106 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Input; + +namespace AvalonDock +{ + internal class FlyoutDockablePane : DockablePane + { + static FlyoutDockablePane() + { + DockablePane.ShowTabsProperty.AddOwner(typeof(FlyoutDockablePane), new FrameworkPropertyMetadata(false)); + } + + int _arrayIndexPreviousPane = -1; + + + public FlyoutDockablePane() + { } + + public FlyoutDockablePane(DockableContent content) + { + _referencedPane = content.ContainerPane as DockablePane; + _manager = _referencedPane.GetManager(); + + //save current content position in container pane + _arrayIndexPreviousPane = _referencedPane.Items.IndexOf(content); + Anchor = _referencedPane.Anchor; + + SetValue(ResizingPanel.ResizeWidthProperty, new GridLength(ResizingPanel.GetEffectiveSize(_referencedPane).Width)); + SetValue(ResizingPanel.ResizeHeightProperty, new GridLength(ResizingPanel.GetEffectiveSize(_referencedPane).Height)); + + this.Style = _referencedPane.Style; + + //remove content from container pane + //and add content to my temporary pane + _referencedPane.Items.RemoveAt(_arrayIndexPreviousPane); + this.Items.Add(content); + + + //select the single content in this pane + SelectedItem = this.Items[0]; + } + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + } + + internal void RestoreOriginalPane() + { + if (this.Items.Count == 1) + { + _referencedPane.Items.Insert(_arrayIndexPreviousPane, RemoveContent(0)); + ResizingPanel.SetResizeWidth(_referencedPane, ResizingPanel.GetResizeWidth(this)); + ResizingPanel.SetResizeHeight(_referencedPane, ResizingPanel.GetResizeHeight(this)); + } + } + + + DockablePane _referencedPane = null; + + internal DockablePane ReferencedPane + { + get { return _referencedPane; } + } + + DockingManager _manager = null; + + public override DockingManager GetManager() + { + return _manager; + } + + public override void ToggleAutoHide() + { + GetManager().ToggleAutoHide(_referencedPane); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs b/src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs new file mode 100644 index 0000000000..28a51d7a68 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/FlyoutPaneWindow.cs @@ -0,0 +1,1107 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Markup; +using System.Diagnostics; +using System.Windows.Threading; +using System.Windows.Media.Animation; +using System.Windows.Forms.Integration; +using System.Runtime.InteropServices; +using System.Windows.Interop; +using System.Threading; + +namespace AvalonDock +{ + /// + /// Implements a flyout window + /// + /// + /// The flyout window is showed when user activate a ManagedContent that is in the AutoHide state. + /// The flyout window appears from a border of the parent docking manager according to the property Anchor. + /// It contains the selected content under the property ReferencedPane. + /// When user move focus to an other object outside this window, it automaticcaly is closed. + /// + [ContentPropertyAttribute("ReferencedPane")] + public class FlyoutPaneWindow : AvalonDockWindow + { + /// + /// Points to the internal windows forms control (if exist) + /// + WindowsFormsHost _winFormsHost = null; + + double _targetWidth; + double _targetHeight; + + /// + /// Gets or sets the final width of the window + /// + internal double TargetWidth + { + get { return _targetWidth; } + set { _targetWidth = value; } + } + + /// + /// Gets or sets the final height of the window + /// + internal double TargetHeight + { + get { return _targetHeight; } + set { _targetHeight = value; } + } + + DockingManager _dockingManager = null; + + internal DockablePaneAnchorTab AnchorTabActivating { get; set; } + + static FlyoutPaneWindow() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(typeof(FlyoutPaneWindow))); + + //AllowsTransparency slow down perfomance under XP/VISTA because rendering is enterely perfomed using CPU + //Window.AllowsTransparencyProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(true)); + + WindowStyleProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(WindowStyle.None)); + ShowInTaskbarProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(false)); + ResizeModeProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(ResizeMode.NoResize)); + BackgroundProperty.OverrideMetadata(typeof(FlyoutPaneWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); + } + + public FlyoutPaneWindow() + { + Title = "AvalonDock_FlyoutPaneWindow"; + } + + public FlyoutPaneWindow(DockingManager manager, DockableContent content) + : this() + { + //create a new temporary pane + _refPane = new FlyoutDockablePane(content); + _dockingManager = manager; + + _winFormsHost = ReferencedPane.GetLogicalChildContained(); + + if (_winFormsHost != null) + { + AllowsTransparency = false; + } + + this.Loaded += new RoutedEventHandler(FlyoutPaneWindow_Loaded); + } + + + void FlyoutPaneWindow_Loaded(object sender, RoutedEventArgs e) + { + //prevents user from activating this window + //WindowInteropWrapper wiw = new WindowInteropWrapper(this); + //wiw.WindowActivating += (s, args) => args.Cancel = true; + + //Open the pane with or without animation + OpenPane(); + } + + + public override void OnApplyTemplate() + { + var resizer = GetTemplateChild("PART_Resizer") as Resizer; + + if (resizer != null) resizer.DragStarted += (s, e) => + { + IsResizing = true; + + ShowResizerOverlayWindow(s as Resizer); + }; + + if (resizer != null) resizer.DragDelta += (s, e) => + { + switch (CorrectedAnchor) + { + case AnchorStyle.Left: + case AnchorStyle.Right: + { + double newLeft = _initialStartPoint.X + e.HorizontalChange; + newLeft = Math.Max(newLeft, 0.0); + newLeft = Math.Min(newLeft, MaxWidth); + + Canvas.SetLeft(_resizerGhost, newLeft); + } + break; + case AnchorStyle.Top: + case AnchorStyle.Bottom: + { + double newTop = _initialStartPoint.Y + e.VerticalChange; + newTop = Math.Max(newTop, 0.0); + newTop = Math.Min(newTop, MaxHeight); + + Canvas.SetTop(_resizerGhost, newTop); + } + break; + + } + }; + + if (resizer != null) resizer.DragCompleted += (s, e) => + { + switch (CorrectedAnchor) + { + case AnchorStyle.Left: + { + Width = Canvas.GetLeft(_resizerGhost) + _resizerGhost.Width; + ApplyRegion(new Rect(0, 0, this.Width, this.Height)); + } + break; + case AnchorStyle.Right: + { + double newWidth = MaxWidth - Canvas.GetLeft(_resizerGhost); + Left -= newWidth - Width; + Width = newWidth; + + + ApplyRegion(new Rect(0, 0, this.Width, this.Height)); + } + break; + case AnchorStyle.Top: + { + Height = Canvas.GetTop(_resizerGhost) + _resizerGhost.Height; + ApplyRegion(new Rect(0, 0, this.Width, this.Height)); + } + break; + case AnchorStyle.Bottom: + { + double newHeight = MaxHeight - Canvas.GetTop(_resizerGhost); + Top -= newHeight - Height; + Height = newHeight; + + + ApplyRegion(new Rect(0, 0, this.Width, this.Height)); + } + break; + } + + IsResizing = false; + HideResizerOverlayWindow(); + }; + + + + base.OnApplyTemplate(); + } + + + /// + /// Handles the closed event + /// + /// + protected override void OnClosed(EventArgs e) + { + StopClosingTimer(); + + ReferencedPane.RestoreOriginalPane(); + + base.OnClosed(e); + + IsClosed = true; + } + + /// + /// Gets a value indicating i fthis window is closed + /// + internal bool IsClosed { get; private set; } + + /// + /// Anchor of the flyout window + /// + public AnchorStyle Anchor + { + get { return ReferencedPane.Anchor; } + } + + /// + /// Get th anchor of the window corrected with the FlowDirection property + /// + AnchorStyle CorrectedAnchor + { + get + { + if (Anchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) + return AnchorStyle.Right; + else if (Anchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) + return AnchorStyle.Left; + + return Anchor; + } + } + + /// + /// Refrenced pane + /// + FlyoutDockablePane _refPane; + + /// + /// Gets the pane that is hosted in flyout window + /// + internal FlyoutDockablePane ReferencedPane + { + get { return _refPane; } + } + + /// + /// Initialize the window + /// + /// + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + //Attach the referenced pane to show + if (ReferencedPane == null) + _refPane = this.Content as FlyoutDockablePane; + + if (ReferencedPane != null) + { + //move the pane under me as content + //ReferencePane now changes visual tree! + Content = ReferencedPane; + InitClosingTimer(); + } + } + + /// + /// Popup window that hosts the resizer thumb + /// + /// Resizer is host in a popup window becaus it needs to overlay winforms controls. + Window _resizerPopup = null; + + //public override void OnApplyTemplate() + //{ + // base.OnApplyTemplate(); + + // _resizerPopup = GetTemplateChild("INT_ResizerPopup") as Popup; + //} + + + #region Resize management + + Border _resizerGhost = null; + Window _resizerWindowHost = null; + Vector _initialStartPoint; + + void ShowResizerOverlayWindow(Resizer splitter) + { + _resizerGhost = new Border() + { + Background = Brushes.Black, + Opacity = 0.7 + }; + + if (CorrectedAnchor == AnchorStyle.Left || CorrectedAnchor == AnchorStyle.Right) + { + _resizerGhost.Width = splitter.Width; + _resizerGhost.Height = MaxHeight; + } + else + { + _resizerGhost.Height = splitter.Height; + _resizerGhost.Width = MaxWidth; + } + + Canvas panelHostResizer = new Canvas() + { + HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch, + VerticalAlignment = System.Windows.VerticalAlignment.Stretch + }; + + panelHostResizer.Children.Add(_resizerGhost); + + _resizerWindowHost = new Window() + { + ResizeMode = ResizeMode.NoResize, + WindowStyle = System.Windows.WindowStyle.None, + ShowInTaskbar = false, + AllowsTransparency = true, + Background = null, + Width = MaxWidth, + Height = MaxHeight, + Left = Left, + Top = Top, + ShowActivated = false, + Owner = this, + Content = panelHostResizer + }; + + if (CorrectedAnchor == AnchorStyle.Right) + _resizerWindowHost.Left = Left - MaxWidth + Width; + else if (CorrectedAnchor == AnchorStyle.Bottom) + _resizerWindowHost.Top = Top - MaxHeight + Height; + + if (CorrectedAnchor == AnchorStyle.Left) + { + Canvas.SetLeft(_resizerGhost, Width - splitter.Width); + } + else if (CorrectedAnchor == AnchorStyle.Right) + { + Canvas.SetLeft(_resizerGhost, MaxWidth - Width); + } + else if (CorrectedAnchor == AnchorStyle.Top) + { + Canvas.SetTop(_resizerGhost, Height - splitter.Height); + } + else if (CorrectedAnchor == AnchorStyle.Bottom) + { + Canvas.SetTop(_resizerGhost, MaxHeight - Height); + } + + _initialStartPoint = new Vector(Canvas.GetLeft(_resizerGhost), Canvas.GetTop(_resizerGhost)); + + _resizerWindowHost.Show(); + } + + void HideResizerOverlayWindow() + { + if (_resizerWindowHost != null) + { + _resizerWindowHost.Close(); + _resizerWindowHost = null; + } + } + + + //void ShowResizerPopup() + //{ + // _resizerPopup = new Window() + // { + // AllowsTransparency = true, + // Background = Brushes.Transparent, + // ShowActivated = false, + // ShowInTaskbar = false, + // ResizeMode = System.Windows.ResizeMode.NoResize, + // WindowStyle = System.Windows.WindowStyle.None, + // Owner = this + // }; + + // Debug.WriteLine(string.Format("{0}-{1} {2}-{3}", + // Left, + // Top, + // Width, + // Height)); + + // Canvas resizerCanvas = new Canvas() { Width = MaxWidth, Height = MaxHeight, Background = null}; + // Border resizer = new Border() { Background = new SolidColorBrush(Colors.DarkGray), Opacity = 0.1 }; + + // switch (CorrectedAnchor) + // { + // case AnchorStyle.Left: + // { + // _resizerPopup.Left = Left; + // _resizerPopup.Top = Top; + // _resizerPopup.Width = MaxWidth; + // _resizerPopup.Height = MaxHeight; + + // resizer.Width = 4; + // resizer.Height = MaxHeight; + // resizer.Cursor = Cursors.SizeWE; + + // Canvas.SetLeft(resizer, Width - resizer.Width); + // Canvas.SetTop(resizer, 0.0); + // } + // break; + // case AnchorStyle.Right: + // { + // _resizerPopup.Left = Left - MaxWidth + Width; + // _resizerPopup.Top = Top; + // _resizerPopup.Width = MaxWidth; + // _resizerPopup.Height = MaxHeight; + + // resizer.Width = 4; + // resizer.Height = MaxHeight; + // resizer.Cursor = Cursors.SizeWE; + + // Canvas.SetLeft(resizer, MaxWidth - Width); + // Canvas.SetTop(resizer, 0.0); + // } + // break; + // case AnchorStyle.Top: + // { + // _resizerPopup.Left = Left; + // _resizerPopup.Top = Top; + // _resizerPopup.Width = MaxWidth; + // _resizerPopup.Height = MaxHeight; + + // resizer.Width = MaxWidth; + // resizer.Height = 4; + // resizer.Cursor = Cursors.SizeNS; + + // Canvas.SetLeft(resizer, 4); + // Canvas.SetTop(resizer, Height - resizer.Height); + // } + // break; + // case AnchorStyle.Bottom: + // { + // _resizerPopup.Left = Left; + // _resizerPopup.Top = Top - MaxHeight + Height; + // _resizerPopup.Width = MaxWidth; + // _resizerPopup.Height = MaxHeight; + + // resizer.Width = MaxWidth; + // resizer.Height = 4; + // resizer.Cursor = Cursors.SizeNS; + + // Canvas.SetLeft(resizer, 4); + // Canvas.SetTop(resizer, MaxHeight - Height); + // } + // break; + // } + + // resizerCanvas.Children.Add(resizer); + + + // _resizerPopup.Content = resizerCanvas; + // _resizerPopup.Show(); + //} + + //void HideResizerPopup() + //{ + // if (_resizerPopup == null) + // return; + + // //_resizerPopup.IsOpen = false; + // _resizerPopup.Close(); + // _resizerPopup = null; + //} + + //void UpdateResizerPopup() + //{ + // if (_resizerPopup == null) + // return; + + // switch (CorrectedAnchor) + // { + // case AnchorStyle.Left: + // { + // //_resizerPopup.PlacementRectangle = new Rect(Left, Top, MaxWidth, MaxHeight); + // _resizerPopup.Left = Left; + // _resizerPopup.Top = Top; + // _resizerPopup.Width = MaxWidth; + // _resizerPopup.Height = MaxHeight; + + // } + // break; + // case AnchorStyle.Right: + // { + // //_resizerPopup.PlacementRectangle = new Rect(Left - MaxWidth + Width, Top, MaxWidth, MaxHeight); + // } + // break; + // } + + //} + + /// + /// Gets a value indicating if user is resizer the window + /// + public bool IsResizing { get; private set; } + + #endregion + + #region Closing window strategies + + + DispatcherTimer _closingTimer = null; + + ///// + ///// Start the closing timer + ///// + //void StartClosingTimer() + //{ + // //if (_closingTimer != null) + // // _closingTimer.Start(); + //} + + /// + /// Creates the closing timer + /// + void InitClosingTimer() + { + if (_closingTimer == null) + { + _closingTimer = new DispatcherTimer( + new TimeSpan(0, 0, 1), + DispatcherPriority.Background, + new EventHandler(ForceCloseWindow), + Dispatcher.CurrentDispatcher); + _closingTimer.Start(); + } + } + + /// + /// Stop the closing timer + /// + void StopClosingTimer() + { + if (_closingTimer != null) + { + _closingTimer.Stop(); + _closingTimer = null; + } + } + + ///// + ///// Stop the closing timer + ///// + //void StopClosingTimer() + //{ + // //if (_closingTimer != null) + // // _closingTimer.Stop(); + //} + + /// + /// This handler is called when the closing time delay is elapsed (user is focusing to something else of the UI) + /// + /// + /// + void ForceCloseWindow(object sender, EventArgs e) + { + //Debug.WriteLine(string.Format("IsMouseOver={0}", IsMouseOverPane)); + //Debug.WriteLine(string.Format("IsFocused={0}", _winFormsHost != null && _winFormsHost.IsFocused)); + + //options menu is open don't close the flyout window + if (ReferencedPane.IsOptionsMenuOpen || + IsMouseOverPane || + (_winFormsHost != null && _winFormsHost.IsFocused && _refPane.Items.Count > 0 && ((ManagedContent)_refPane.Items[0]).IsActiveContent) || + IsActive || + _refPane.IsKeyboardFocusWithin || + _refPane.ContainsActiveContent || + (AnchorTabActivating != null && AnchorTabActivating.IsMouseOver) || + IsResizing || + (_resizerPopup != null && _resizerPopup.IsMouseOver)) + { + return; + } + + StopClosingTimer(); + + if (IsClosed) + return; + + ClosePane(); + } + + bool IsMouseOverPane + { + get + { + InteropHelper.Win32Point pt = new InteropHelper.Win32Point(); + if (!InteropHelper.GetCursorPos(ref pt)) + return false; + + Point ptMouse = PointToScreen(new Point()); + //Debug.WriteLine(string.Format("{0}-{1}", pt.X, pt.Y)); + + Rect rectWindow = new Rect(ptMouse.X, ptMouse.Y, Width, Height); + return rectWindow.Contains(new Point(pt.X,pt.Y)); + } + } + + + //protected override void OnMouseLeave(MouseEventArgs e) + //{ + // base.OnMouseLeave(e); + + // if (!IsFocused && !IsKeyboardFocusWithin && !ReferencedPane.IsOptionsMenuOpen) + // StartClosingTimer(); + //} + + //protected override void OnMouseMove(MouseEventArgs e) + //{ + // base.OnMouseMove(e); + + // StopClosingTimer(); + //} + + //protected override void OnLostFocus(RoutedEventArgs e) + //{ + // base.OnLostFocus(e); + + // if (!IsMouseOver && !ReferencedPane.IsOptionsMenuOpen) + // StartClosingTimer(); + //} + + //protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e) + //{ + // base.OnLostKeyboardFocus(e); + + // if (!IsMouseOver) + // StopClosingTimer(); + //} + + //protected override void OnGotFocus(RoutedEventArgs e) + //{ + // base.OnGotFocus(e); + + // StopClosingTimer(); + //} + + //protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) + //{ + // base.OnGotKeyboardFocus(e); + + // StopClosingTimer(); + //} + + //internal void KeepWindowOpen() + //{ + // StopClosingTimer(); + //} + #endregion + + #region Open/Close Flyout window + + /// + /// Gets a value indicating if the flyout window is closing + /// + public bool IsClosing { get; private set; } + + /// + /// Initiate a closing animation + /// + void CloseWidthAnimation() + { + AnchorStyle CorrectedAnchor = Anchor; + + if (CorrectedAnchor == AnchorStyle.Left && FlowDirection == FlowDirection.RightToLeft) + CorrectedAnchor = AnchorStyle.Right; + else if (CorrectedAnchor == AnchorStyle.Right && FlowDirection == FlowDirection.RightToLeft) + CorrectedAnchor = AnchorStyle.Left; + + double wnd_Width = this.ActualWidth; + double wnd_Height = this.ActualHeight; + double wnd_Left = this.Left; + double wnd_Top = this.Top; + + int wnd_TrimWidth = (int)wnd_Width; + int wnd_TrimHeight = (int)wnd_Height; + + int stepWidth = (int)(wnd_Width / 4); + int stepHeight = (int)(wnd_Height / 4); + + DispatcherTimer animTimer = new DispatcherTimer(); + animTimer.Interval = TimeSpan.FromMilliseconds(1); + + animTimer.Tick += (sender, eventArgs) => + { + bool stopTimer = false; + double newLeft = 0.0; + double newTop = 0.0; + switch (CorrectedAnchor) + { + case AnchorStyle.Right: + newLeft = this.Left; + if (this.Left + stepWidth >= wnd_Left + wnd_Width) + { + newLeft = wnd_Left + wnd_Width; + wnd_TrimWidth = 0; + stopTimer = true; + } + else + { + newLeft += stepWidth; + wnd_TrimWidth -= stepWidth; + wnd_TrimWidth = Math.Max(wnd_TrimWidth, 0); + } + + //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, wnd_TrimWidth, wnd_TrimHeight), true); + ApplyRegion(new Rect(0, 0, wnd_TrimWidth, wnd_TrimHeight)); + this.Left = newLeft; + break; + case AnchorStyle.Left: + newLeft = this.Left; + if (this.Left - stepWidth <= wnd_Left - wnd_Width) + { + newLeft = wnd_Left - wnd_Width; + wnd_TrimWidth = 0; + stopTimer = true; + } + else + { + newLeft -= stepWidth; + wnd_TrimWidth -= stepWidth; + wnd_TrimWidth = Math.Max(wnd_TrimWidth, 0); + } + + this.Left = newLeft; + //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), wnd_TrimHeight), true); + ApplyRegion( + new Rect((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), wnd_TrimHeight)); + break; + case AnchorStyle.Bottom: + newTop = this.Top; + if (this.Top + stepHeight >= wnd_Top + wnd_Height) + { + newTop = wnd_Top + wnd_Height; + wnd_TrimHeight = 0; + stopTimer = true; + } + else + { + newTop += stepHeight; + wnd_TrimHeight -= stepHeight; + wnd_TrimHeight = Math.Max(wnd_TrimHeight, 0); + } + + //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, 0, wnd_TrimWidth, wnd_TrimHeight), true); + ApplyRegion( + new Rect(0, 0, wnd_TrimWidth, wnd_TrimHeight)); + this.Top = newTop; + break; + case AnchorStyle.Top: + newTop = this.Top; + if (this.Top - stepHeight <= wnd_Top - wnd_Height) + { + newTop = wnd_Top - wnd_Height; + wnd_TrimHeight = 0; + stopTimer = true; + } + else + { + newTop -= stepHeight; + wnd_TrimHeight -= stepHeight; + wnd_TrimHeight = Math.Max(wnd_TrimWidth, 0); + } + + this.Top = newTop; + ApplyRegion( + new Rect(0, (int)(wnd_Top - this.Top), wnd_TrimWidth, (int)(wnd_Height))); + //SetWindowRgn(new WindowInteropHelper(this).Handle, CreateRectRgn(0, (int)(wnd_Top - this.Top), wnd_TrimWidth, (int)(wnd_Height)), true); + break; + } + + if (stopTimer) + { + //window is being closed + Width = 0.0; + Height = 0.0; + animTimer.Stop(); + if (!IsClosed) + ClosePane(); + IsClosing = false; + } + }; + + IsClosing = true; + animTimer.Start(); + } + + /// + /// Gets a flag indicating if flyout window is opening + /// + public bool IsOpening { get; private set; } + + /// + /// Initiate an opening animation + /// + void OpenWidthAnimation() + { + double wnd_Width = this._targetWidth > 0.0 ? this._targetWidth : this.ActualWidth; + double wnd_Height = this._targetHeight > 0.0 ? this._targetHeight : this.ActualHeight; + double wnd_Left = this.Left; + double wnd_Top = this.Top; + + int wnd_TrimWidth = 0; + int wnd_TrimHeight = 0; + + int stepWidth = (int)(wnd_Width / 4); + int stepHeight = (int)(wnd_Height / 4); + + if (CorrectedAnchor == AnchorStyle.Left) + { + InteropHelper.SetWindowRgn(new WindowInteropHelper(this).Handle, InteropHelper.CreateRectRgn(0, 0, 0, (int)wnd_Height - wnd_TrimHeight), true); + this.Left = wnd_Left - wnd_Width; + } + else if (CorrectedAnchor == AnchorStyle.Top) + { + InteropHelper.SetWindowRgn(new WindowInteropHelper(this).Handle, InteropHelper.CreateRectRgn(0, 0, (int)wnd_Width - wnd_TrimWidth, 0), true); + this.Top = wnd_Top - wnd_Height; + } + + DispatcherTimer animTimer = new DispatcherTimer(); + animTimer.Interval = TimeSpan.FromMilliseconds(1); + + animTimer.Tick += (sender, eventArgs) => + { + bool stopTimer = false; + switch (CorrectedAnchor) + { + case AnchorStyle.Right: + { + double newLeft = this.Left; + if (this.Left - stepWidth <= wnd_Left - wnd_Width) + { + newLeft = wnd_Left - wnd_Width; + wnd_TrimWidth = (int)wnd_Width; + stopTimer = true; + } + else + { + newLeft -= stepWidth; + wnd_TrimWidth += stepWidth; + } + + Width = _targetWidth; + this.Left = newLeft; + ApplyRegion(new Rect(0, 0, wnd_TrimWidth, (int)wnd_Height - wnd_TrimHeight)); + } + break; + case AnchorStyle.Left: + { + double newLeft = this.Left; + if (this.Left + stepWidth >= wnd_Left) + { + newLeft = wnd_Left; + wnd_TrimWidth = (int)wnd_Width; + stopTimer = true; + } + else + { + newLeft += stepWidth; + wnd_TrimWidth += stepWidth; + } + + ApplyRegion( + new Rect((int)(wnd_Left - this.Left), 0, (int)(wnd_Width), (int)wnd_Height - wnd_TrimHeight)); + + Width = _targetWidth; + this.Left = newLeft; + } + break; + case AnchorStyle.Bottom: + { + double newTop = this.Top; + if (this.Top - stepHeight <= wnd_Top - wnd_Height) + { + newTop = wnd_Top - wnd_Height; + wnd_TrimHeight = (int)wnd_Height; + stopTimer = true; + } + else + { + newTop -= stepHeight; + wnd_TrimHeight += stepHeight; + } + + ApplyRegion( + new Rect(0, 0, (int)wnd_Width - wnd_TrimWidth, wnd_TrimHeight)); + + Height = _targetHeight; + this.Top = newTop; + + } + break; + case AnchorStyle.Top: + { + double newTop = this.Top; + if (this.Top + stepHeight >= wnd_Top) + { + newTop = wnd_Top; + wnd_TrimHeight = (int)wnd_Height; + stopTimer = true; + } + else + { + newTop += stepHeight; + wnd_TrimHeight += stepHeight; + } + + ApplyRegion( + new Rect(0, (int)(wnd_Top - this.Top), (int)wnd_Width - wnd_TrimWidth, (int)(wnd_Height))); + + Height = _targetHeight; + this.Top = newTop; + } + break; + } + + if (stopTimer) + { + UpdatePositionAndSize(); + animTimer.Stop(); + IsOpening = false; + } + }; + + IsOpening = true; + animTimer.Start(); + } + + /// + /// Open the flyout window with or without animation depending on the ShowAnimated flag + /// + void OpenPane() + { + if (_dockingManager.IsAnimationEnabled) + { + OpenWidthAnimation(); + } + else + { + switch (CorrectedAnchor) + { + case AnchorStyle.Left: + Width = this._targetWidth; + break; + case AnchorStyle.Right: + Width = this._targetWidth; + Left -= this.Width; + break; + case AnchorStyle.Top: + Height = this._targetHeight; + break; + case AnchorStyle.Bottom: + Height = this._targetHeight; + Top -= this.Height; + break; + } + + UpdatePositionAndSize(); + //ShowResizerPopup(); + //StartClosingTimer(); + } + } + + + /// + /// Close the flyout window with or without animation depending on the ShowAnimated flag + /// + void ClosePane() + { + if (_dockingManager.IsAnimationEnabled) + { + CloseWidthAnimation(); + } + else + { + if (!IsClosed) + Close(); + } + } + #endregion + + + #region Clipping Region + + protected override void OnActivated(EventArgs e) + { + if (!IsOpening && !IsClosing) + UpdatePositionAndSize(); + + base.OnActivated(e); + } + + //protected override void OnDeactivated(EventArgs e) + //{ + // //StartClosingTimer(); + // base.OnDeactivated(e); + //} + + internal void UpdatePositionAndSize() + { + ApplyRegion(new Rect(0, 0, Width, Height)); + } + + Rect _lastApplyRect = Rect.Empty; + + void ApplyRegion(Rect wndRect) + { + if (!this.CanTransform()) + return; + + wndRect = new Rect( + this.TransformFromDeviceDPI(wndRect.TopLeft), + this.TransformFromDeviceDPI(wndRect.Size)); + + _lastApplyRect = wndRect; + + if (PresentationSource.FromVisual(this) == null) + return; + + + if (_dockingManager != null) + { + List otherRects = new List(); + + foreach (Window fl in Window.GetWindow(_dockingManager).OwnedWindows) + { + //not with myself! + if (fl == this) + continue; + + if (!fl.IsVisible) + continue; + + Rect flRect = new Rect( + PointFromScreen(new Point(fl.Left, fl.Top)), + PointFromScreen(new Point(fl.Left + fl.Width, fl.Top + fl.Height))); + + if (flRect.IntersectsWith(wndRect)) + otherRects.Add(Rect.Intersect(flRect, wndRect)); + } + + IntPtr hDestRegn = InteropHelper.CreateRectRgn( + (int)wndRect.Left, + (int)wndRect.Top, + (int)wndRect.Right, + (int)wndRect.Bottom); + + foreach (Rect otherRect in otherRects) + { + IntPtr otherWin32Rect = InteropHelper.CreateRectRgn( + (int)otherRect.Left, + (int)otherRect.Top, + (int)otherRect.Right, + (int)otherRect.Bottom); + + InteropHelper.CombineRgn(hDestRegn, hDestRegn, otherWin32Rect, (int)InteropHelper.CombineRgnStyles.RGN_DIFF); + } + + + InteropHelper.SetWindowRgn(new WindowInteropHelper(this).Handle, hDestRegn, true); + } + } + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/GreyableImage.cs b/src/Libraries/AvalonDock/AvalonDock/GreyableImage.cs new file mode 100644 index 0000000000..0910cd40d5 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/GreyableImage.cs @@ -0,0 +1,121 @@ +using System; + +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.ComponentModel; + + +namespace AvalonDock +{ + /// + /// Image control that get's greyed out when disabled. + /// This control is intended to be used for toolbar, menu or button icons where ability of an icon to + /// grey itself out when disabled is essential. + /// + /// 1) Greyscale image is created using FormatConvertedBitmap class. Unfortunately when converting the + /// image to greyscale this class does n0t preserve transparency information. To overcome that, there is + /// an opacity mask created from original image that is applied to greyscale image in order to preserve + /// transparency information. Because of that if an OpacityMask is applied to original image that mask + /// has to be combined with that special opacity mask of greyscale image in order to make a proper + /// greyscale image look. If you know how to combine two opacity masks please let me know. + /// 2) DrawingImage source is not supported at the moment. + /// 3) Have not tried to use any BitmapSource derived sources accept for BitmapImage so it may not be + /// able to convert some of them to greyscale. + /// 4) When specifying source Uri from XAML try to use Absolute Uri otherwise the greyscale image + /// may not be created in some scenarious. There is some code to improve the situation but I cannot + /// guarantee it will work in all possible scenarious. + /// 5) In case the greyscaled version cannot be created for whatever reason the original image with + /// 60% opacity (i.e. dull colours) will be used instead (that will work even with the DrawingImage + /// source). + /// + /// + public class GreyableImage : Image + { + // these are holding references to original and greyscale ImageSources + private ImageSource _sourceC, _sourceG; + // these are holding original and greyscale opacity masks + private Brush _opacityMaskC, _opacityMaskG; + + static GreyableImage() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(GreyableImage), new FrameworkPropertyMetadata(typeof(GreyableImage))); + } + + /// + /// Overwritten to handle changes of IsEnabled, Source and OpacityMask properties + /// + /// + protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) + { + if (e.Property.Name.Equals("IsEnabled")) + { + if ((e.NewValue as bool?) == false) + { + Source = _sourceG; + OpacityMask = _opacityMaskG; + } + else if ((e.NewValue as bool?) == true) + { + Source = _sourceC; + OpacityMask = _opacityMaskC; + } + } + else if (e.Property.Name.Equals("Source") && + !object.ReferenceEquals(Source, _sourceC) && + !object.ReferenceEquals(Source, _sourceG)) // only recache Source if it's the new one from outside + { + SetSources(); + } + else if (e.Property.Name.Equals("OpacityMask") && + !object.ReferenceEquals(OpacityMask, _opacityMaskC) && + !object.ReferenceEquals(OpacityMask, _opacityMaskG)) // only recache opacityMask if it's the new one from outside + { + _opacityMaskC = OpacityMask; + } + + base.OnPropertyChanged(e); + } + + /// + /// Cashes original ImageSource, creates and caches greyscale ImageSource and greyscale opacity mask + /// + private void SetSources() + { + // in case greyscale image cannot be created set greyscale source to original Source first + _sourceG = _sourceC = Source; + + // create Opacity Mask for greyscale image as FormatConvertedBitmap does not keep transparency info + _opacityMaskG = new ImageBrush(_sourceC); + _opacityMaskG.Opacity = 0.6; + + try + { + // get the string Uri for the original image source first + String stringUri = TypeDescriptor.GetConverter(Source).ConvertTo(Source, typeof(string)) as string; + Uri uri = null; + // try to resolve it as an absolute Uri (if it is relative and used it as is + // it is likely to point in a wrong direction) + if (!Uri.TryCreate(stringUri, UriKind.Absolute, out uri)) + { + // it seems that the Uri is relative, at this stage we can only assume that + // the image requested is in the same assembly as this oblect, + // so we modify the string Uri to make it absolute ... + stringUri = "pack://application:,,,/" + stringUri.TrimStart(new char[2] { System.IO.Path.DirectorySeparatorChar, System.IO.Path.AltDirectorySeparatorChar }); + + // ... and try to resolve again + uri = new Uri(stringUri); + } + + // create and cache greyscale ImageSource + _sourceG = new FormatConvertedBitmap(new BitmapImage(uri), PixelFormats.Gray8, null, 0); + } + catch (Exception e) + { + System.Diagnostics.Debug.Fail("The Image used cannot be greyed out.", + "Use BitmapImage or URI as a Source in order to allow greyscaling. Make sure the absolute Uri is used as relative Uri may sometimes resolve incorrectly.\n\nException: " + e.Message); + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/HelperFunc.cs b/src/Libraries/AvalonDock/AvalonDock/HelperFunc.cs new file mode 100644 index 0000000000..aab9b12344 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/HelperFunc.cs @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Media; +using System.Windows.Controls; +using System.Windows.Threading; +using System.Threading; + +namespace AvalonDock +{ + internal static class HelperFunc + { + public static void ForEach(this IEnumerable collection, Action action) + { + foreach (T v in collection) + action(v); + } + + public static bool AreClose(double v1, double v2) + { + if (v1 == v2) + { + return true; + } + double num = ((Math.Abs(v1) + Math.Abs(v2)) + 10.0) * 2.2204460492503131E-16; + double num2 = v1 - v2; + return ((-num < num2) && (num > num2)); + } + + public static double MultiplyCheckNaN(double v1, double v2) + { + //inf * 0 = 1 + if (double.IsInfinity(v1) && + v2 == 0.0) + return 1.0; + if (double.IsInfinity(v2) && + v1 == 0.0) + return 1.0; + + return v1 * v2; + } + + + public static bool IsLessThen(double v1, double v2) + { + if (AreClose(v1, v2)) + return false; + + return v1 < v2; + } + + public static Point PointToScreenWithoutFlowDirection(FrameworkElement element, Point point) + { + if (FrameworkElement.GetFlowDirection(element) == FlowDirection.RightToLeft) + { + Point leftToRightPoint = new Point( + element.ActualWidth - point.X, + point.Y); + return element.PointToScreenDPI(leftToRightPoint); + } + + return element.PointToScreenDPI(point); + } + + public static T FindVisualAncestor(this DependencyObject obj, bool includeThis) where T : DependencyObject + { + if (!includeThis) + obj = VisualTreeHelper.GetParent(obj); + + while (obj != null && (!(obj is T))) + { + obj = VisualTreeHelper.GetParent(obj); + } + + return obj as T; + } + + public static bool IsLogicalChildContained(this DependencyObject obj) where T : DependencyObject + { + foreach (object child in LogicalTreeHelper.GetChildren(obj)) + { + if (child is T) + return true; + + if (child is DependencyObject) + { + + bool res = (child as DependencyObject).IsLogicalChildContained(); + if (res) + return true; + } + } + + return false; + } + + public static T GetLogicalChildContained(this DependencyObject obj) where T : DependencyObject + { + foreach (object child in LogicalTreeHelper.GetChildren(obj)) + { + if (child is T) + return child as T; + + if (child is DependencyObject) + { + T childFound = (child as DependencyObject).GetLogicalChildContained(); + if (childFound != null) + return childFound; + } + } + + return null; + } + + public static T FindAnotherLogicalChildContained(this DependencyObject obj, UIElement childToExclude) where T : DependencyObject + { + foreach (object child in LogicalTreeHelper.GetChildren(obj)) + { + if (child is T && child != childToExclude) + return child as T; + + if (child is DependencyObject) + { + T childFound = (child as DependencyObject).FindAnotherLogicalChildContained(childToExclude); + if (childFound != null) + return childFound; + } + } + + return null; + } + + public static IEnumerable DockablePanes(this UIElement element) + { + if (element is DockablePane) + yield return element as DockablePane; + + foreach (UIElement childObject in LogicalTreeHelper.GetChildren(element)) + { + if (element is DockablePane) + yield return element as DockablePane; + + yield return FindChildDockablePane(childObject); + } + } + + static DockablePane FindChildDockablePane(UIElement parent) + { + if (parent is ResizingPanel) + { + foreach (UIElement childObject in ((ResizingPanel)parent).Children) + { + DockablePane foundPane = FindChildDockablePane(childObject); + if (foundPane != null) + return foundPane; + } + } + + return null; + } + + + public static Point PointToScreenDPI(this Visual visual, Point pt) + { + Point resultPt = visual.PointToScreen(pt); + return TransformToDeviceDPI(visual, resultPt); + } + + public static Point TransformToDeviceDPI(this Visual visual, Point pt) + { + Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; + return new Point(pt.X / m.M11, pt.Y /m.M22); + } + + public static Size TransformFromDeviceDPI(this Visual visual, Size size) + { + Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; + return new Size(size.Width * m.M11, size.Height * m.M22); + } + + public static Point TransformFromDeviceDPI(this Visual visual, Point pt) + { + Matrix m = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice; + return new Point(pt.X * m.M11, pt.Y * m.M22); + } + + public static bool CanTransform(this Visual visual) + { + return PresentationSource.FromVisual(visual) != null; + } + + + public static void CallMethod(this object o, string methodName, object[] args) + { + o.GetType().GetMethod(methodName).Invoke(o, null); + } + + public static T GetPropertyValue(this object o, string propertyName) + { + return (T)o.GetType().GetProperty(propertyName).GetValue(o, null); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/IDockableControl.cs b/src/Libraries/AvalonDock/AvalonDock/IDockableControl.cs new file mode 100644 index 0000000000..e7dae9b412 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/IDockableControl.cs @@ -0,0 +1,36 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; + +namespace AvalonDock +{ + interface IDockableControl + { + bool IsDocked { get; } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/IDropSurface.cs b/src/Libraries/AvalonDock/AvalonDock/IDropSurface.cs new file mode 100644 index 0000000000..8738035716 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/IDropSurface.cs @@ -0,0 +1,72 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; + +namespace AvalonDock +{ + /// + /// Defines an interface that must be implemented by objects that can host dragged panes + /// + internal interface IDropSurface + { + /// + /// Gets a value indicating if this area is avilable for drop a dockable pane + /// + bool IsSurfaceVisible { get; } + + /// + /// Gets the sensible area for drop a pane + /// + Rect SurfaceRectangle { get; } + + /// + /// Called by when user dragged pane enter this surface + /// + /// Location of the mouse + void OnDragEnter(Point point); + + /// + /// Called by when user dragged pane is over this surface + /// + /// Location of the mouse + void OnDragOver(Point point); + + /// + /// Called by when user dragged pane leave this surface + /// + /// Location of the mouse + void OnDragLeave(Point point); + + /// + /// Called by when user drops a pane to this surface + /// + /// Location of the mouse + bool OnDrop(Point point); + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/InteropHelper.cs b/src/Libraries/AvalonDock/AvalonDock/InteropHelper.cs new file mode 100644 index 0000000000..5fa361acb1 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/InteropHelper.cs @@ -0,0 +1,71 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Runtime.InteropServices; + +namespace AvalonDock +{ + internal sealed class InteropHelper + { + [DllImport("user32.dll")] + public static extern int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw); + + [DllImport("gdi32.dll")] + public static extern IntPtr CreateRectRgn(int left, int top, int right, int bottom); + + [DllImport("gdi32.dll")] + public static extern int CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, int fnCombineMode); + + public enum CombineRgnStyles : int + { + RGN_AND = 1, + RGN_OR = 2, + RGN_XOR = 3, + RGN_DIFF = 4, + RGN_COPY = 5, + RGN_MIN = RGN_AND, + RGN_MAX = RGN_COPY + } + + + [StructLayout(LayoutKind.Sequential)] + internal struct Win32Point + { + public Int32 X; + public Int32 Y; + }; + + [DllImport("user32.dll")] + internal static extern bool GetCursorPos(ref Win32Point pt); + + + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs b/src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs new file mode 100644 index 0000000000..ae3d25ed72 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/LogicalTreeAdapter.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Media; +using System.Collections; + +namespace AvalonDock +{ + /// + /// Defines an adapter that must be implemented in order to use the LinqToTree + /// extension methods + /// + /// + internal interface ILinqToTree + { + /// + /// Obtains all the children of the Item. + /// + /// + IEnumerable> Children(); + + /// + /// The parent of the Item. + /// + ILinqToTree Parent { get; } + + /// + /// The item being adapted. + /// + T Item { get; } + } + + internal static class ILinqToTreeExts + { + /// + /// Returns a collection of descendant elements. + /// + public static IEnumerable> + Descendants(this ILinqToTree adapter) + { + foreach (var child in adapter.Children()) + { + yield return child; + + foreach (var grandChild in child.Descendants()) + { + yield return grandChild; + } + } + } + + /// + /// Returns a collection of ancestor elements. + /// + public static IEnumerable> + Ancestors(this ILinqToTree adapter) + { + var parent = adapter.Parent; + while (parent != null) + { + yield return parent; + parent = parent.Parent; + } + } + + /// + /// Returns a collection of child elements. + /// + public static IEnumerable> + Elements(this ILinqToTree adapter) + { + foreach (var child in adapter.Children()) + { + yield return child; + } + } + } + + /// + /// An adapter for DependencyObject which implements ILinqToTree in + /// order to allow Linq queries on the visual tree + /// + internal class VisualTreeAdapter : ILinqToTree + { + private DependencyObject _item; + + public VisualTreeAdapter(DependencyObject item) + { + _item = item; + } + + public IEnumerable> Children() + { + int childrenCount = VisualTreeHelper.GetChildrenCount(_item); + for (int i = 0; i < childrenCount; i++) + { + yield return new VisualTreeAdapter(VisualTreeHelper.GetChild(_item, i)); + } + } + + public ILinqToTree Parent + { + get + { + return new VisualTreeAdapter(VisualTreeHelper.GetParent(_item)); + } + } + + public DependencyObject Item + { + get + { + return _item; + } + } + } + + /// + /// An adapter for DependencyObject which implements ILinqToTree in + /// order to allow Linq queries on the logical tree + /// + internal class LogicalTreeAdapter : ILinqToTree + { + private DependencyObject _item; + + public LogicalTreeAdapter(DependencyObject item) + { + _item = item; + } + + public IEnumerable> Children() + { + IEnumerable children = LogicalTreeHelper.GetChildren(_item).OfType(); + foreach (DependencyObject child in children) + { + yield return new LogicalTreeAdapter(child); + } + } + + public ILinqToTree Parent + { + get + { + return new VisualTreeAdapter(LogicalTreeHelper.GetParent(_item)); + } + } + + public DependencyObject Item + { + get + { + return _item; + } + } + } + +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ManagedContent.cs b/src/Libraries/AvalonDock/AvalonDock/ManagedContent.cs new file mode 100644 index 0000000000..c00b925e23 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ManagedContent.cs @@ -0,0 +1,961 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Xml; +using System.Windows.Forms.Integration; +using System.Diagnostics; +using System.Windows.Threading; +using System.Threading; +using System.Reflection; +using System.Net.Cache; + + +namespace AvalonDock +{ + + public abstract class ManagedContent : ContentControl, INotifyPropertyChanged + { + static ManagedContent() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(typeof(ManagedContent))); + + WidthProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(double.NaN, null, new CoerceValueCallback( + (s, v) => + { + if (!DesignerProperties.GetIsInDesignMode(s as DependencyObject)) + return double.NaN; + + return v; + }))); + HeightProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(double.NaN, null, new CoerceValueCallback( + (s, v) => + { + if (!DesignerProperties.GetIsInDesignMode(s as DependencyObject)) + return double.NaN; + + return v; + }))); + + FocusableProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(true)); + } + + public ManagedContent() + { + this.Loaded += new RoutedEventHandler(ManagedContent_Loaded); + this.Unloaded += new RoutedEventHandler(ManagedContent_Unloaded); + } + + //WindowsFormsHost GetWinFormsHost() + //{ + // WindowsFormsHost contentHost = null; + + // if (this.Content is UserControl) + // { + // UserControl usTemp = this.Content as UserControl; + + // if (usTemp.Content is WindowsFormsHost) + // contentHost = usTemp.Content as WindowsFormsHost; + // } + // else if (this.Content is WindowsFormsHost) + // { + // contentHost = this.Content as WindowsFormsHost; + // } + + // return contentHost; + //} + + void ManagedContent_SizeChanged(object sender, SizeChangedEventArgs e) + { + //WindowsFormsHost contentHost = GetWinFormsHost(); + + //if (contentHost != null) + //{ + // object childCtrl = contentHost.GetType().GetProperty("Child").GetValue(contentHost, null); + + // if (childCtrl != null) + // { + // this.Dispatcher.Invoke(new Action((o) => o.CallMethod("Refresh", null)), DispatcherPriority.Render, childCtrl); + // } + //} + } + + protected virtual void OnContentLoaded() + { + RaisePropertyChanged("ContainerPane"); + } + + protected virtual void OnContentUnloaded() + { + RaisePropertyChanged("ContainerPane"); + } + + void ManagedContent_Loaded(object sender, RoutedEventArgs e) + { + OnContentLoaded(); + + //WindowsFormsHost contentHost = GetWinFormsHost(); + + //if (contentHost != null) + //{ + // contentHost.SizeChanged += new SizeChangedEventHandler(ManagedContent_SizeChanged); + //} + } + + void ManagedContent_Unloaded(object sender, RoutedEventArgs e) + { + OnContentUnloaded(); + + //WindowsFormsHost contentHost = GetWinFormsHost(); + + //if (contentHost != null) + //{ + // contentHost.SizeChanged -= new SizeChangedEventHandler(ManagedContent_SizeChanged); + //} + } + + #region Title + + /// + /// Gets or set the title of the content + /// + public string Title + { + get { return (string)GetValue(TitleProperty); } + set { SetValue(TitleProperty, value); } + } + + // Using a DependencyProperty as the backing store for Title. This enables animation, styling, binding, etc... + public static readonly DependencyProperty TitleProperty = + DependencyProperty.Register("Title", typeof(string), typeof(ManagedContent)); + + #endregion + + #region Icon + + /// + /// Access to dependency property + /// + public ImageSource Icon + { + get { return (ImageSource)GetValue(IconProperty); } + set { SetValue(IconProperty, value); } + } + + /// + /// Select an icon object for the content + /// + public static readonly DependencyProperty IconProperty = + DependencyProperty.Register("Icon", typeof(ImageSource), typeof(ManagedContent), + new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerce_Icon))); + + private static object OnCoerce_Icon(DependencyObject o, object value) + { + //if (value is string) + //{ + // Uri iconUri; + // //// try to resolve given value as an absolute URI + // if (Uri.TryCreate(value as String, UriKind.Relative, out iconUri)) + // { + // ImageSource img = new BitmapImage(iconUri); + // if (img != null) + // return img;//new Image() { Source = img }; + + // //GreyableImage seems to be not compatible with .net 4 + // //if (null != img) + // //{ + // // GreyableImage icon = (o as ManagedContent).Icon as GreyableImage; + // // if (null == icon) + // // icon = new GreyableImage(); + + // // icon.Source = img; + // // //icon.Stretch = Stretch.None; + // // //icon.SnapsToDevicePixels = true; + + // // return icon; + // //} + // } + //} + return value; + } + + #endregion + + #region DefaultElement + + /// + /// Access to + /// + public IInputElement DefaultElement + { + + get { return (IInputElement)GetValue(DefaultFocusedElementProperty); } + + set { SetValue(DefaultFocusedElementProperty, value); } + + } + + /// + /// Gets or sets an element which is focused by default when content is activated + /// + public static readonly DependencyProperty DefaultFocusedElementProperty = DependencyProperty.Register("DefaultElement", typeof(IInputElement), typeof(ManagedContent)); + + #endregion + + FrameworkElement _dragEnabledArea; + + /// + /// Gets the draggable area of the document + /// + protected FrameworkElement DragEnabledArea + { + get { return _dragEnabledArea; } + } + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _dragEnabledArea = GetTemplateChild("PART_DragArea") as FrameworkElement; + + if (_dragEnabledArea != null) + { + _dragEnabledArea.MouseDown += new MouseButtonEventHandler(OnDragMouseDown); + _dragEnabledArea.MouseMove += new MouseEventHandler(OnDragMouseMove); + _dragEnabledArea.MouseUp += new MouseButtonEventHandler(OnDragMouseUp); + _dragEnabledArea.MouseLeave += new MouseEventHandler(OnDragMouseLeave); + } + + if (_dragEnabledArea != null) + _dragEnabledArea.InputBindings.Add(new InputBinding(ManagedContentCommands.Close, new MouseGesture(MouseAction.MiddleClick))); + + } + + #region Mouse management + + protected virtual void OnDragStart(Point ptMouse, Point ptrelativeMouse) + { + + } + + Point ptStartDrag; + bool isMouseDown = false; + + protected Point StartDragPoint + { + get { return ptStartDrag; } + } + + protected bool IsMouseDown + { + get { return isMouseDown; } + } + + protected void ResetIsMouseDownFlag() + { + isMouseDown = false; + } + + protected virtual void OnDragMouseDown(object sender, MouseButtonEventArgs e) + { + if (!e.Handled && Manager != null)// && State != DockableContentState.AutoHide) + { + isMouseDown = true; + ptStartDrag = e.GetPosition((IInputElement)System.Windows.Media.VisualTreeHelper.GetParent(this)); + } + } + + protected virtual void OnDragMouseMove(object sender, MouseEventArgs e) + { + } + + protected virtual void OnDragMouseUp(object sender, MouseButtonEventArgs e) + { + isMouseDown = false; + } + + Point ptRelativePosition; + + protected virtual void OnDragMouseLeave(object sender, MouseEventArgs e) + { + if (!e.Handled && e.LeftButton == MouseButtonState.Pressed && Manager != null) + { + if (!IsMouseCaptured) + { + //Point ptMouseMove = e.GetPosition(this); + Point ptMouseMove = e.GetPosition((IInputElement)System.Windows.Media.VisualTreeHelper.GetParent(this)); + ManagedContent contentToSwap = null; + if (ContainerPane != null) + { + foreach (ManagedContent content in ContainerPane.Items) + { + if (content == this) + continue; + + HitTestResult res = VisualTreeHelper.HitTest(content, e.GetPosition(content)); + if (res != null) + { + contentToSwap = content; + break; + } + } + } + + if (contentToSwap != null) + { + Pane containerPane = ContainerPane; + int myIndex = containerPane.Items.IndexOf(this); + + ContainerPane.Items.RemoveAt(myIndex); + + int otherIndex = containerPane.Items.IndexOf(contentToSwap); + containerPane.Items.RemoveAt(otherIndex); + + containerPane.Items.Insert(otherIndex, this); + + containerPane.Items.Insert(myIndex, contentToSwap); + + containerPane.SelectedItem = this; + + e.Handled = false; + return; + } + else if (Math.Abs(ptMouseMove.X - StartDragPoint.X) > SystemParameters.MinimumHorizontalDragDistance || + Math.Abs(ptMouseMove.Y - StartDragPoint.Y) > SystemParameters.MinimumVerticalDragDistance) + { + ptRelativePosition = e.GetPosition(DragEnabledArea); + + ResetIsMouseDownFlag(); + OnDragStart(StartDragPoint, ptRelativePosition); + e.Handled = true; + } + } + } + + isMouseDown = false; + } + + + #endregion + + protected override void OnMouseDown(MouseButtonEventArgs e) + { + base.OnMouseDown(e); + + if (!e.Handled) + { + Activate(); + //FocusManager.SetFocusedElement(Content as DependencyObject, DefaultElement); + //IInputElement focusedElement = e.Source as IInputElement; + //if (focusedElement != null) Keyboard.Focus(focusedElement); + } + } + + protected override void OnKeyDown(KeyEventArgs e) + { + if (e.Key == Key.Enter) + { + if (ContainerPane != null) + ContainerPane.SelectedItem = this; + } + + base.OnKeyDown(e); + } + + /// + /// Gets container pane currently hosting the content + /// + /// Please note that this value could change as user move the content around the . + public Pane ContainerPane + { + get + { + Pane containerPane = Parent as Pane; + if (containerPane != null) + return containerPane; + + return this.FindVisualAncestor(false); + } + } + + /// + /// Remove this content from its parent container pane + /// + /// + internal virtual ManagedContent DetachFromContainerPane() + { + if (ContainerPane != null) + { + int indexOfContent = ContainerPane.Items.IndexOf(this); + return ContainerPane.RemoveContent(indexOfContent) as ManagedContent; + } + + return null; + } + + protected override void OnVisualParentChanged(DependencyObject oldParent) + { + RaisePropertyChanged("ContainerPane"); + base.OnVisualParentChanged(oldParent); + } + + #region Manager + + private DockingManager _manager = null; + + /// + /// Get current hosting docking manager () + /// + public DockingManager Manager + { + get { return _manager; } + internal set + { + if (_manager != value) + { + DockingManager oldValue = _manager; + _manager = value; + OnManagerChanged(oldValue, value); + RaisePropertyChanged("Manager"); + } + } + } + + /// + /// Provides derived classes an opportunity to handle changes to the Manager property. + /// + protected virtual void OnManagerChanged(DockingManager oldValue, DockingManager newValue) + { + } + + #endregion + + protected DockingManager GetParentManager(Pane containerPane) + { + if (containerPane == null) + containerPane = ContainerPane; + + if (containerPane != null) + return ContainerPane.GetManager(); + + return null; + } + + protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e) + { + base.OnGotKeyboardFocus(e); + + Debug.WriteLine(string.Format("[{0}].OnGotKeyboardFocus() Source={1} NewFocus={2} OldFocus={3}", this.Name, e.Source.GetType().ToString(), e.NewFocus.GetType().ToString(), e.OldFocus == null ? "" : e.OldFocus.GetType().ToString())); + + if (Manager != null && + this.IsKeyboardFocusWithin) + { + Manager.ActiveContent = this; + } + } + + protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e) + { + Debug.WriteLine(string.Format("[{0}].OnLostKeyboardFocus() Source={1} NewFocus={2} OldFocus={3}", this.Name, e.Source.GetType().ToString(), e.NewFocus == null ? "" : e.NewFocus.GetType().ToString(), e.OldFocus == null ? "" : e.OldFocus.GetType().ToString())); + base.OnLostKeyboardFocus(e); + } + + #region IsActiveContent + + /// + /// IsActiveContent Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey IsActiveContentPropertyKey + = DependencyProperty.RegisterReadOnly("IsActiveContent", typeof(bool), typeof(ManagedContent), + new FrameworkPropertyMetadata((bool)false, + new PropertyChangedCallback(OnIsActiveContentChanged))); + + public static readonly DependencyProperty IsActiveContentProperty + = IsActiveContentPropertyKey.DependencyProperty; + + /// + /// Gets the IsActiveContent property. This dependency property + /// indicates the active (selected) content between all contents of the docking manager + /// + public bool IsActiveContent + { + get { return (bool)GetValue(IsActiveContentProperty); } + } + + /// + /// Provides a secure method for setting the IsActiveContent property. + /// This dependency property indicates the current content is the active content between all docking manager contents + /// + /// The new value for the property. + internal void SetIsActiveContent(bool value) + { + SetValue(IsActiveContentPropertyKey, value); + } + + + /// + /// Handles changes to the IsActiveContent property. + /// + private static void OnIsActiveContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((ManagedContent)d).OnIsActiveContentChanged(e); + } + + DateTime _lastActivation = DateTime.MinValue; + + internal DateTime LastActivation + { + get { return _lastActivation; } + } + + /// + /// Provides derived classes an opportunity to handle changes to the IsActiveContent property. + /// + protected virtual void OnIsActiveContentChanged(DependencyPropertyChangedEventArgs e) + { + if (IsActiveContent) + _lastActivation = DateTime.Now; + + FocusContent(); + + Pane parentPane = ContainerPane as Pane; + if (parentPane != null) + { + parentPane.RefreshContainsActiveContentProperty(); + if (IsActiveContent) + parentPane.SelectedItem = this; + } + + //for backward compatibility + RaisePropertyChanged("IsActiveContent"); + + if (IsActiveContentChanged != null) + IsActiveContentChanged(this, EventArgs.Empty); + } + + /// + /// Provides derived classes an opportunity to manage custom focus strategy. + /// + /// + /// Derived classes should not call base class if don't want AvalonDock to set focus on object + /// + protected virtual void FocusContent() + { + if (IsActiveContent && !IsKeyboardFocused) + { + Dispatcher.BeginInvoke(DispatcherPriority.Input, new ThreadStart(delegate + { + if (IsActiveContent && !IsKeyboardFocused) + { + if (this.Content is WindowsFormsHost) + { + //Use reflection in order to remove WinForms assembly reference + WindowsFormsHost contentHost = this.Content as WindowsFormsHost; + + object childCtrl = contentHost.GetType().GetProperty("Child").GetValue(contentHost, null); + + if (childCtrl != null) + { + if (!childCtrl.GetPropertyValue("Focused")) + { + childCtrl.CallMethod("Focus", null); + } + } + } + else if (DefaultElement != null) + { + Debug.WriteLine("Try to set kb focus to " + DefaultElement); + + IInputElement kbFocused = Keyboard.Focus(DefaultElement); + + if (kbFocused != null) + Debug.WriteLine("Focused element " + kbFocused); + else + Debug.WriteLine("No focused element"); + + } + else if (this.Content is IInputElement) + { + Debug.WriteLine("Try to set kb focus to " + this.Content.ToString()); + IInputElement kbFocused = Keyboard.Focus(this.Content as IInputElement); + if (kbFocused != null) + Debug.WriteLine("Focused element " + kbFocused); + else + Debug.WriteLine("No focused element"); + } + } + })); + } + + + + } + + /// + /// Event fired when the property changes + /// + public event EventHandler IsActiveContentChanged; + #endregion + + #region IsActiveDocument + + /// + /// IsActiveDocument Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey IsActiveDocumentPropertyKey + = DependencyProperty.RegisterReadOnly("IsActiveDocument", typeof(bool), typeof(ManagedContent), + new FrameworkPropertyMetadata((bool)false, + new PropertyChangedCallback(OnIsActiveDocumentChanged))); + + public static readonly DependencyProperty IsActiveDocumentProperty + = IsActiveDocumentPropertyKey.DependencyProperty; + + /// + /// Gets the IsActiveDocument property. This dependency property + /// indicates is content is the active document. + /// + public bool IsActiveDocument + { + get { return (bool)GetValue(IsActiveDocumentProperty); } + } + + /// + /// Provides a secure method for setting the IsActiveDocument property. + /// This dependency property indicates is content is the active document. + /// + /// The new value for the property. + internal void SetIsActiveDocument(bool value) + { + SetValue(IsActiveDocumentPropertyKey, value); + } + + /// + /// Handles changes to the IsActiveDocument property. + /// + private static void OnIsActiveDocumentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((ManagedContent)d).OnIsActiveDocumentChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the IsActiveDocument property. + /// + protected virtual void OnIsActiveDocumentChanged(DependencyPropertyChangedEventArgs e) + { + if ((bool)e.NewValue) + { + if (ContainerPane != null) + ContainerPane.SelectedItem = this; + } + + DocumentPane parentDocumentPane = ContainerPane as DocumentPane; + if (parentDocumentPane != null) + { + parentDocumentPane.RefreshContainsActiveDocumentProperty(); + } + + Debug.WriteLine("{0}-{1}-{2}", IsFocused, IsKeyboardFocused, IsKeyboardFocusWithin); + + //for backward compatibility + RaisePropertyChanged("IsActiveDocumentChanged"); + + if (IsActiveDocumentChanged != null) + IsActiveDocumentChanged(this, EventArgs.Empty); + } + + /// + /// Event fired when the property changes + /// + public event EventHandler IsActiveDocumentChanged; + + #endregion + + #region IsLocked + + /// + /// IsLocked Dependency Property + /// + public static readonly DependencyProperty IsLockedProperty = + DependencyProperty.Register("IsLocked", typeof(bool), typeof(ManagedContent), + new FrameworkPropertyMetadata((bool)false)); + + /// + /// Gets or sets the IsLocked property. This dependency property + /// indicates if this content is locked (for objects this often means that it's readonly). + /// + public bool IsLocked + { + get { return (bool)GetValue(IsLockedProperty); } + set { SetValue(IsLockedProperty, value); } + } + + #endregion + + #region FloatingWindowSize + + /// + /// FloatingWindowSize Dependency Property + /// + public static readonly DependencyProperty FloatingWindowSizeProperty = + DependencyProperty.Register("FloatingWindowSize", typeof(Size), typeof(ManagedContent), + new FrameworkPropertyMetadata(new Size(250,400), + new PropertyChangedCallback(OnFloatingWindowSizeChanged))); + + /// + /// Gets or sets the FloatingWindowSize property. This dependency property + /// indicates the size of the floating window hosting the content when it's floating. + /// + public Size FloatingWindowSize + { + get { return (Size)GetValue(FloatingWindowSizeProperty); } + set { SetValue(FloatingWindowSizeProperty, value); } + } + + /// + /// Handles changes to the FloatingWindowSize property. + /// + private static void OnFloatingWindowSizeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((ManagedContent)d).OnFloatingWindowSizeChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the FloatingWindowSize property. + /// + protected virtual void OnFloatingWindowSizeChanged(DependencyPropertyChangedEventArgs e) + { + } + + #endregion + + #region INotifyPropertyChanged Members + + public event PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + + #region IsCloseable + /// + /// Get or set a value indicating if this content can be closed or hidden + /// + public bool IsCloseable + { + get { return (bool)GetValue(IsCloseableProperty); } + set { SetValue(IsCloseableProperty, value); } + } + + // Using a DependencyProperty as the backing store for IsCloseable. This enables animation, styling, binding, etc... + public static readonly DependencyProperty IsCloseableProperty = + DependencyProperty.Register("IsCloseable", typeof(bool), typeof(ManagedContent), new UIPropertyMetadata(true)); + + internal virtual bool CanClose() + { + if (!IsCloseable) + return false; + + return true; + } + #endregion + + #region Commands + + protected override void OnInitialized(EventArgs e) + { + base.OnInitialized(e); + + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Hide, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Close, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Show, this.OnExecuteCommand, this.OnCanExecuteCommand)); + this.CommandBindings.Add( + new CommandBinding(ManagedContentCommands.Activate, this.OnExecuteCommand, this.OnCanExecuteCommand)); + + + } + + void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (e.Command == ManagedContentCommands.Show) + { + Show(); + e.Handled = true; + } + else if (e.Command == ManagedContentCommands.Hide) + { + e.Handled = Hide(); + } + else if (e.Command == ManagedContentCommands.Close) + { + e.Handled = Close(); + } + else if (e.Command == ManagedContentCommands.Activate) + { + Activate(); + e.Handled = true; + } + + //else if (e.Command == ShowOptionsCommand) + //{ + // OpenOptionsContextMenu(); + // e.Handled = true; + //} + + } + + + void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = CanExecuteCommand(e.Command); + + //Debug.WriteLine("ManagedContent.OnCanExecuteCommand({0}) = {1} (ContinueRouting={2})", (e.Command as RoutedUICommand).Name, e.CanExecute, e.ContinueRouting); + } + + + /// + /// Retrive a value indicating if the command passed can be executed based to the content state + /// + /// Command to execute + /// True if the command can be execute, false otherwise. + protected virtual bool CanExecuteCommand(ICommand command) + { + if (Manager == null) + return false; + + return true; + } + + /// + /// Shows the content + /// + /// How content is shows depends from the type of the content. + public abstract void Show(); + + /// + /// Shows the content inside a object + /// + /// How content is shows depends from the type of the content. + public abstract void Show(DockingManager manager); + + /// + /// Event fired when the content is about to be closed + /// + public event EventHandler Closing; + + /// + /// Event fired when the content has been closed + /// + /// Note that when a document is closed property like or returns null. + public event EventHandler Closed; + + /// + /// Ovveride this method to handle event. + /// + protected virtual void OnClosing(CancelEventArgs e) + { + if (Closing != null && !e.Cancel) + { + Closing(this, e); + } + } + + /// + /// Ovveride this method to handle event. + /// + protected virtual void OnClosed() + { + if (Closed != null) + Closed(this, EventArgs.Empty); + } + + /// + /// Close the content + /// + /// Returns true if the content was succesfully closed, false otherwise. + public abstract bool Close(); + + /// + /// Hide the content + /// + public abstract bool Hide(); + + /// + /// Set the content as the active content + /// + /// After this method returns property returns true. + public virtual void Activate() + { + if (ContainerPane != null && Manager != null)// && Manager.ActiveContent != this) + { + ContainerPane.SelectedItem = this; + ContainerPane.Focus(); + if (Manager != null) + Manager.ActiveContent = this; + } + } + #endregion + + #region Save/Restore Content Layout + /// + /// Save content specific layout settings + /// + /// Backend store writer + /// Custom derived class can overloads this method to handle custom layout persistence. + public virtual void SaveLayout(XmlWriter storeWriter) + { + } + + /// + /// Restore content specific layout settings + /// + /// Saved xml element containg content layout settings + /// Custom derived class must overload this method to restore custom layout settings previously saved trought . + public virtual void RestoreLayout(XmlElement contentElement) + { + } + #endregion + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ManagedContentCollection.cs b/src/Libraries/AvalonDock/AvalonDock/ManagedContentCollection.cs new file mode 100644 index 0000000000..c2766ff9c3 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ManagedContentCollection.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections.ObjectModel; + +namespace AvalonDock +{ + public class ManagedContentCollection : ReadOnlyObservableCollection where T : ManagedContent + { + internal ManagedContentCollection(DockingManager manager) + : base(new ObservableCollection()) + { + Manager = manager; + } + + + /// + /// Get associated object + /// + public DockingManager Manager { get; private set; } + + /// + /// Override collection changed event to setup manager property on objects + /// + /// + protected override void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (e.NewItems != null) + { + foreach (T cntAdded in e.NewItems) + cntAdded.Manager = Manager; + } + + base.OnCollectionChanged(e); + } + + /// + /// Add a content to the list + /// + /// + internal void Add(T contentToAdd) + { + if (!Items.Contains(contentToAdd)) + Items.Add(contentToAdd); + } + + internal void Remove(T contentToRemove) + { + Items.Remove(contentToRemove); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ManagedContentCommands.cs b/src/Libraries/AvalonDock/AvalonDock/ManagedContentCommands.cs new file mode 100644 index 0000000000..a1b39d4ce5 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ManagedContentCommands.cs @@ -0,0 +1,126 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + /// + /// Defines commands shared beteween all contents (Dockable or Documents) + /// + public sealed class ManagedContentCommands + { + private static object syncRoot = new object(); + + + private static RoutedUICommand closeCommand = null; + + /// + /// This command closes the content + /// + public static RoutedUICommand Close + { + get + { + lock (syncRoot) + { + if (null == closeCommand) + { + closeCommand = new RoutedUICommand(AvalonDock.Properties.Resources.ManagedContentCommands_Close, "Close", typeof(ManagedContentCommands)); + } + } + return closeCommand; + } + } + + private static RoutedUICommand hideCommand = null; + + /// + /// This command hides the content + /// + public static RoutedUICommand Hide + { + get + { + lock (syncRoot) + { + if (null == hideCommand) + { + hideCommand = new RoutedUICommand(AvalonDock.Properties.Resources.ManagedContentCommands_Hide, "Hide", typeof(ManagedContentCommands)); + } + } + return hideCommand; + } + } + + private static RoutedUICommand showCommand = null; + + /// + /// This command shows the content + /// + /// How content is shown by default depends from the type of content. A is shown as docked pane, instead + /// a is shown as tabbed document + public static RoutedUICommand Show + { + get + { + lock (syncRoot) + { + if (null == showCommand) + { + showCommand = new RoutedUICommand(AvalonDock.Properties.Resources.ManagedContentCommands_Show, "Show", typeof(ManagedContentCommands)); + } + } + return showCommand; + } + } + + + private static RoutedUICommand activateCommand = null; + + /// + /// This command activate the commands (i.e. select it inside the conatiner pane) + /// + /// Activating a content means essentially putting it in evidence. For a content that is auto-hidden this command opens a flyout window containing the content. + public static RoutedUICommand Activate + { + get + { + lock (syncRoot) + { + if (null == activateCommand) + { + activateCommand = new RoutedUICommand(AvalonDock.Properties.Resources.ManagedContentCommands_Activate, "Activate", typeof(ManagedContentCommands)); + } + } + return activateCommand; + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs b/src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs new file mode 100644 index 0000000000..1d9ee2d9c9 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/NavigatorWindow.cs @@ -0,0 +1,338 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Linq; +using System.Collections.ObjectModel; +using System.Diagnostics; + +namespace AvalonDock +{ + /// + /// Represent an navigator item within lists of contents that user can choose from the + /// + public class NavigatorWindowItem + { + private string _title; + + public string Title + { + get + { + return _title; + } + } + + private object _icon; + + public object Icon + { + get + { + return _icon; + } + } + + protected ManagedContent _content; + + public ManagedContent ItemContent + { + get { return _content; } + } + + internal NavigatorWindowItem(ManagedContent content) + { + _title = content.Title; + _icon = content.Icon; + _content = content; + } + } + + /// + /// Specialized class of for objects + /// + public class NavigatorWindowDocumentItem : NavigatorWindowItem + { + private string _infoTip; + + public string InfoTip + { + get + { + return _infoTip; + } + } + + private string _contentTypeDescription; + + public string ContentTypeDescription + { + get + { + return _contentTypeDescription; + } + } + + private DateTime _lastActivation; + + public DateTime LastActivation + { + get { return _lastActivation; } + } + + + internal NavigatorWindowDocumentItem(DocumentContent document) + : base(document) + { + _infoTip = document.InfoTip; + if (_infoTip == null && document.ToolTip != null && document.ToolTip is string) + _infoTip = document.ToolTip.ToString(); + + _contentTypeDescription = document.ContentTypeDescription; + _lastActivation = document.LastActivation; + } + + + } + + /// + /// Window that is automatically shown when user press Ctrl+Tab combination + /// + /// This window allow user to rapidly select a object or a object. + /// When selected a content is also activate with the function + public class NavigatorWindow : AvalonDockWindow + { + #region Constructors + static NavigatorWindow() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(typeof(NavigatorWindow))); + + AllowsTransparencyProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(true)); + WindowStyleProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(WindowStyle.None)); + ShowInTaskbarProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(false)); + BackgroundProperty.OverrideMetadata(typeof(NavigatorWindow), new FrameworkPropertyMetadata(Brushes.Transparent)); + } + + DockingManager _manager; + internal NavigatorWindow(DockingManager manager) + { + WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; + + _manager = manager; + + List docs = new List(); + _manager.Documents.ForEach((DocumentContent doc) => + { + docs.Add(new NavigatorWindowDocumentItem(doc)); + }); + + docs.Sort((NavigatorWindowDocumentItem item1, NavigatorWindowDocumentItem item2) => + { + if (item1 == item2 || + item1.LastActivation == item2.LastActivation) + return 0; + return (item1.LastActivation < item2.LastActivation) ? 1 : -1; + }); + + SetDocuments(new CollectionView(docs)); + + List cnts = new List(); + _manager.DockableContents.Where(c => c.State != DockableContentState.Hidden).ForEach((DockableContent cnt) => + { + cnts.Add(new NavigatorWindowItem(cnt)); + }); + + SetDockableContents(new CollectionView(cnts)); + + Documents.MoveCurrentTo(Documents.OfType().FirstOrDefault(cntItem => + { + return cntItem.ItemContent == _manager.ActiveDocument; + })); + + DockableContents.MoveCurrentTo(null); + + Loaded += new RoutedEventHandler(NavigatorWindow_Loaded); + } + + #endregion + + #region Handlers for Tab+ctrl keys events + protected override void OnPreviewKeyDown(KeyEventArgs e) + { + if (e.Key != Key.Tab) + Hide(); + else + { + e.Handled = true; + MoveNextSelectedContent(); + } + + base.OnKeyDown(e); + } + + protected override void OnPreviewKeyUp(KeyEventArgs e) + { + if (e.Key != Key.Tab) + { + var docSelected = (Documents.CurrentItem as NavigatorWindowDocumentItem).ItemContent as DocumentContent; + docSelected.Activate(); + Hide(); + } + else + { + e.Handled = true; + } + + base.OnPreviewKeyUp(e); + } + + #endregion + + #region Current Document/Content changed + void NavigatorWindow_Loaded(object sender, RoutedEventArgs e) + { + Documents.CurrentChanged += new EventHandler(Documents_CurrentChanged); + DockableContents.CurrentChanged += new EventHandler(DockableContents_CurrentChanged); + } + + + void DockableContents_CurrentChanged(object sender, EventArgs e) + { + if (DockableContents.CurrentItem == null) + return; + + Debug.WriteLine(string.Format("DockContent current changed to {0}", (DockableContents.CurrentItem as NavigatorWindowItem).ItemContent.Title)); + var dockCntSelected = (DockableContents.CurrentItem as NavigatorWindowItem).ItemContent as DockableContent; + Hide(); + dockCntSelected.Activate(); + } + + void Documents_CurrentChanged(object sender, EventArgs e) + { + if (Documents.CurrentItem == null) + return; + if (_intMoveFlag) + return; + + Debug.WriteLine(string.Format("Document current changed to {0}", (Documents.CurrentItem as NavigatorWindowItem).ItemContent.Title)); + + var docSelected = (Documents.CurrentItem as NavigatorWindowDocumentItem).ItemContent as DocumentContent; + docSelected.Activate(); + Hide(); + } + #endregion + + #region Documents + + /// + /// Documents Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey DocumentsPropertyKey + = DependencyProperty.RegisterReadOnly("Documents", typeof(CollectionView), typeof(NavigatorWindow), + new FrameworkPropertyMetadata(null)); + + public static readonly DependencyProperty DocumentsProperty + = DocumentsPropertyKey.DependencyProperty; + + /// + /// Gets the Documents property. This dependency property + /// indicates documents currently hosted by parent . + /// + public CollectionView Documents + { + get { return (CollectionView)GetValue(DocumentsProperty); } + } + + /// + /// Provides a secure method for setting the Documents property. + /// This dependency property indicates documents currently hosted by parent . + /// + /// The new value for the property. + protected void SetDocuments(CollectionView value) + { + SetValue(DocumentsPropertyKey, value); + } + + #endregion + + #region DockableContents + + /// + /// DockableContents Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey DockableContentsPropertyKey + = DependencyProperty.RegisterReadOnly("DockableContents", typeof(CollectionView), typeof(NavigatorWindow), + new FrameworkPropertyMetadata((CollectionView)null)); + + public static readonly DependencyProperty DockableContentsProperty + = DockableContentsPropertyKey.DependencyProperty; + + /// + /// Gets the DockableContents property. This dependency property + /// indicates dockable contents hosted in parent object. + /// + public CollectionView DockableContents + { + get { return (CollectionView)GetValue(DockableContentsProperty); } + } + + /// + /// Provides a secure method for setting the DockableContents property. + /// This dependency property indicates dockable contents hosted in parent object. + /// + /// The new value for the property. + protected void SetDockableContents(CollectionView value) + { + SetValue(DockableContentsPropertyKey, value); + } + + #endregion + + #region Move to Next document + bool _intMoveFlag = false; + public void MoveNextSelectedContent() + { + _intMoveFlag = true; + if (!Documents.MoveCurrentToNext()) + Documents.MoveCurrentToFirst(); + if (Documents.IsCurrentAfterLast) + Documents.MoveCurrentToFirst(); + _intMoveFlag = false; + } + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/OverlayWindow.cs b/src/Libraries/AvalonDock/AvalonDock/OverlayWindow.cs new file mode 100644 index 0000000000..8f3b03e30a --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/OverlayWindow.cs @@ -0,0 +1,518 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Markup; +using System.Diagnostics; +using System.Windows.Threading; +using System.Windows.Media.Animation; + +namespace AvalonDock +{ + public enum OverlayButtonHover + { + None, + DropPaneInto, + DropPaneLeft, + DropPaneRight, + DropPaneTop, + DropPaneBottom, + DropBorderLeft, + DropBorderRight, + DropBorderTop, + DropBorderBottom, + DropMainPaneLeft, + DropMainPaneRight, + DropMainPaneTop, + DropMainPaneBottom, + } + + public class OverlayWindow : AvalonDockWindow//, INotifyPropertyChanged + { + static OverlayWindow() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(typeof(OverlayWindow))); + + Window.AllowsTransparencyProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(true)); + Window.WindowStyleProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(WindowStyle.None)); + Window.ShowInTaskbarProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(false)); + Window.ShowActivatedProperty.OverrideMetadata(typeof(OverlayWindow), new FrameworkPropertyMetadata(false)); + } + + public static object Theme; + + internal OverlayWindow() + { + + } + + DockingManager _manager = null; + + internal OverlayWindow(DockingManager manager) + { + _manager = manager; + } + + FrameworkElement gridPaneRelativeDockingOptions; + FrameworkElement selectionBox; + + OverlayWindowDockingButton owdBottom; + OverlayWindowDockingButton owdTop; + OverlayWindowDockingButton owdLeft; + OverlayWindowDockingButton owdRight; + OverlayWindowDockingButton owdPaneBottom; + OverlayWindowDockingButton owdPaneTop; + OverlayWindowDockingButton owdPaneLeft; + OverlayWindowDockingButton owdPaneRight; + OverlayWindowDockingButton owdPaneInto; + + OverlayWindowDockingButton owdMainPaneBottom; + OverlayWindowDockingButton owdMainPaneTop; + OverlayWindowDockingButton owdMainPaneLeft; + OverlayWindowDockingButton owdMainPaneRight; + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + gridPaneRelativeDockingOptions = GetTemplateChild("PART_gridPaneRelativeDockingOptions") as FrameworkElement; + selectionBox = GetTemplateChild("PART_SelectionBox") as FrameworkElement; + + owdBottom = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockBottom") as FrameworkElement, this); + owdTop = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockTop") as FrameworkElement, this); + owdLeft = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockLeft") as FrameworkElement, this); + owdRight = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockRight") as FrameworkElement, this); + + owdPaneBottom = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneBottom") as FrameworkElement, this); + owdPaneTop = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneTop") as FrameworkElement, this); + owdPaneLeft = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneLeft") as FrameworkElement, this); + owdPaneRight = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneRight") as FrameworkElement, this); + owdPaneInto = new OverlayWindowDockingButton(GetTemplateChild("PART_btnDockPaneInto") as FrameworkElement, this); + + var btn = GetTemplateChild("PART_btnDockMainPaneBottom") as FrameworkElement; + if (btn != null) owdMainPaneBottom = new OverlayWindowDockingButton(btn, this); + + btn = GetTemplateChild("PART_btnDockMainPaneTop") as FrameworkElement; + if (btn != null) owdMainPaneTop = new OverlayWindowDockingButton(btn, this); + + btn = GetTemplateChild("PART_btnDockMainPaneLeft") as FrameworkElement; + if (btn != null) owdMainPaneLeft = new OverlayWindowDockingButton(btn, this); + + btn = GetTemplateChild("PART_btnDockMainPaneRight") as FrameworkElement; + if (btn != null) owdMainPaneRight = new OverlayWindowDockingButton(btn, this); + + + _manager.DragPaneServices.Register(owdPaneBottom); + _manager.DragPaneServices.Register(owdPaneTop); + _manager.DragPaneServices.Register(owdPaneLeft); + _manager.DragPaneServices.Register(owdPaneRight); + _manager.DragPaneServices.Register(owdPaneInto); + _manager.DragPaneServices.Register(owdBottom); + _manager.DragPaneServices.Register(owdTop); + _manager.DragPaneServices.Register(owdLeft); + _manager.DragPaneServices.Register(owdRight); + + if (owdMainPaneTop != null) _manager.DragPaneServices.Register(owdMainPaneTop); + if (owdMainPaneLeft != null) _manager.DragPaneServices.Register(owdMainPaneLeft); + if (owdMainPaneRight != null) _manager.DragPaneServices.Register(owdMainPaneRight); + if (owdMainPaneBottom != null) _manager.DragPaneServices.Register(owdMainPaneBottom); + } + + internal bool OnDrop(OverlayWindowDockingButton owdDock, Point point) + { + //calculate desidered size + Rect rectPane; + + switch (OverlayButtonHover) + { + case AvalonDock.OverlayButtonHover.DropBorderBottom: + case AvalonDock.OverlayButtonHover.DropBorderLeft: + case AvalonDock.OverlayButtonHover.DropBorderTop: + case AvalonDock.OverlayButtonHover.DropBorderRight: + rectPane = (_manager as IDropSurface).SurfaceRectangle; + break; + default: + rectPane = (CurrentDropPane as IDropSurface).SurfaceRectangle; + break; + } + + var desideredWidth = Math.Min( + rectPane.Width / 2.0, + ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Width); + var desideredHeight = Math.Min( + rectPane.Height / 2.0, + ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Height); + + var desideredSize = new Size( + desideredWidth, + desideredHeight); + + //user has dropped the floating window over a anchor button + //create a new dockable pane to insert in the main layout + //FIX: clone pane and return true only if overlayButtonOver is not set to None!! + + + //floating window is going to be closed.. + selectionBox.Visibility = Visibility.Hidden; + + //take the overlaybutton hover property to get the right button highlighted + switch (OverlayButtonHover) + { + case AvalonDock.OverlayButtonHover.DropBorderBottom: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane() as DockablePane, + AnchorStyle.Bottom); + break; + case AvalonDock.OverlayButtonHover.DropBorderTop: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane() as DockablePane, + AnchorStyle.Top); + break; + case AvalonDock.OverlayButtonHover.DropBorderLeft: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane() as DockablePane, + AnchorStyle.Left); + break; + case AvalonDock.OverlayButtonHover.DropBorderRight: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane() as DockablePane, + AnchorStyle.Right); + break; + case AvalonDock.OverlayButtonHover.DropPaneBottom: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane(), + CurrentDropPane, AnchorStyle.Bottom); + break; + case AvalonDock.OverlayButtonHover.DropPaneTop: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane(), + CurrentDropPane, AnchorStyle.Top); + break; + case AvalonDock.OverlayButtonHover.DropPaneLeft: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane(), + CurrentDropPane, AnchorStyle.Left); + break; + case AvalonDock.OverlayButtonHover.DropPaneRight: + _manager.Anchor( + _manager.DragPaneServices.FloatingWindow.ClonePane(), + CurrentDropPane, AnchorStyle.Right); + break; + case AvalonDock.OverlayButtonHover.DropPaneInto: + _manager.DropInto( + _manager.DragPaneServices.FloatingWindow.ClonePane(), + CurrentDropPane); + break; + default: + return false; + } + + + return true; + } + + Pane CurrentDropPane = null; + + internal void ShowOverlayPaneDockingOptions(Pane paneOvering) + { + var draggingPane = _manager.DragPaneServices.FloatingWindow.HostedPane; + var isDraggingADocumentPane = draggingPane is DocumentPane; + var isDraggingADockablePane = draggingPane is DockablePane; + + + HideOverlayPaneDockingOptions(paneOvering); + + + + //check if dockable on a document pane + DockableStyle currentPaneDockableStyle = + isDraggingADocumentPane ? + DockableStyle.Document : + (draggingPane as DockablePane).GetCumulativeDockableStyle(); + + //if current drop pane is a DocumentPane ... + if (paneOvering is DocumentPane && + (currentPaneDockableStyle & DockableStyle.Document) == 0) + return; + if (paneOvering is DockablePane && + (currentPaneDockableStyle & DockableStyle.Dockable) == 0) + return; + + + Rect rectPane = (paneOvering as IDropSurface).SurfaceRectangle; + + Point myScreenTopLeft = this.PointToScreenDPI(new Point(0, 0)); + rectPane.Offset(-myScreenTopLeft.X, -myScreenTopLeft.Y);//relative to me + + gridPaneRelativeDockingOptions.SetValue(Canvas.LeftProperty, rectPane.Left); + gridPaneRelativeDockingOptions.SetValue(Canvas.TopProperty, rectPane.Top); + gridPaneRelativeDockingOptions.Width = rectPane.Width; + gridPaneRelativeDockingOptions.Height = rectPane.Height; + //gridPaneRelativeDockingOptions.SetValue(Canvas.LeftProperty, rectPane.Left + rectPane.Width / 2 - gridPaneRelativeDockingOptions.Width / 2); + //gridPaneRelativeDockingOptions.SetValue(Canvas.TopProperty, rectPane.Top + rectPane.Height / 2 - gridPaneRelativeDockingOptions.Height / 2); + + if (paneOvering is DocumentPane) + gridPaneRelativeDockingOptions.Visibility = Visibility.Visible; + else + { + gridPaneRelativeDockingOptions.Visibility = !isDraggingADocumentPane ? Visibility.Visible : Visibility.Hidden; + } + + owdBottom.Enabled = ((currentPaneDockableStyle & DockableStyle.BottomBorder) > 0); + owdTop.Enabled = ((currentPaneDockableStyle & DockableStyle.TopBorder) > 0); + owdLeft.Enabled = ((currentPaneDockableStyle & DockableStyle.LeftBorder) > 0); + owdRight.Enabled = ((currentPaneDockableStyle & DockableStyle.RightBorder) > 0); + + + if (paneOvering is DocumentPane) + owdPaneInto.Enabled = true; + else + owdPaneInto.Enabled = !(_manager.DragPaneServices.FloatingWindow is DocumentFloatingWindow); + + + if (paneOvering is DockablePane || isDraggingADocumentPane) + { + if (owdMainPaneBottom != null) owdMainPaneBottom.Enabled = false; + if (owdMainPaneTop != null) owdMainPaneTop.Enabled = false; + if (owdMainPaneLeft != null) owdMainPaneLeft.Enabled = false; + if (owdMainPaneRight != null) owdMainPaneRight.Enabled = false; + } + else if (isDraggingADockablePane) + { + if (owdMainPaneBottom != null) owdMainPaneBottom.Enabled = true; + if (owdMainPaneTop != null) owdMainPaneTop.Enabled = true; + if (owdMainPaneLeft != null) owdMainPaneLeft.Enabled = true; + if (owdMainPaneRight != null) owdMainPaneRight.Enabled = true; + } + + int destPaneChildCount = paneOvering.Items.Count; + + owdPaneBottom.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; + owdPaneTop.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; + owdPaneLeft.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; + owdPaneRight.Enabled = owdPaneInto.Enabled && destPaneChildCount > 0; + + CurrentDropPane = paneOvering; + } + + internal void HideOverlayPaneDockingOptions(Pane surfaceElement) + { + owdPaneBottom.Enabled = false; + owdPaneTop.Enabled = false; + owdPaneLeft.Enabled = false; + owdPaneRight.Enabled = false; + owdPaneInto.Enabled = false; + + gridPaneRelativeDockingOptions.Visibility = Visibility.Collapsed; + CurrentDropPane = null; + SetOverlayButtonHover(OverlayButtonHover.None); + } + + protected override void OnDeactivated(EventArgs e) + { + selectionBox.Visibility = Visibility.Hidden; + + base.OnDeactivated(e); + } + + protected override void OnActivated(EventArgs e) + { + DockableStyle currentPaneDockableStyle = + _manager.DragPaneServices.FloatingWindow.HostedPane is FloatingDocumentPane ? + DockableStyle.Document : + (_manager.DragPaneServices.FloatingWindow.HostedPane as DockablePane).GetCumulativeDockableStyle(); + + selectionBox.Visibility = Visibility.Hidden; + + owdBottom.Enabled = (currentPaneDockableStyle & DockableStyle.BottomBorder) > 0; + owdTop.Enabled = (currentPaneDockableStyle & DockableStyle.TopBorder) > 0; + owdLeft.Enabled = (currentPaneDockableStyle & DockableStyle.LeftBorder) > 0; + owdRight.Enabled = (currentPaneDockableStyle & DockableStyle.RightBorder) > 0; + + + base.OnActivated(e); + } + + /// + /// Shows a highlighting rectangle + /// + /// + /// + /// + internal void OnDragEnter(OverlayWindowDockingButton owdDock, Point point) + { + OnDragOver(owdDock, point); + } + + /// + /// Hides the highlighting rectangle + /// + /// + /// + /// + internal void OnDragLeave(OverlayWindowDockingButton owdDock, Point point) + { + selectionBox.Visibility = Visibility.Hidden; + _manager.DragPaneServices.FloatingWindow.OnHideSelectionBox(); + SetOverlayButtonHover(OverlayButtonHover.None); + } + + internal void OnDragOver(OverlayWindowDockingButton owdDock, Point point) + { + if (selectionBox == null) + return; + + Rect rectPane; + + if (owdDock == owdBottom || + owdDock == owdLeft || + owdDock == owdTop || + owdDock == owdRight) + rectPane = (_manager as IDropSurface).SurfaceRectangle; + else + rectPane = (CurrentDropPane as IDropSurface).SurfaceRectangle; + + double selectionBoxWidth = Math.Min( + rectPane.Width / 2.0, + ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Width); + double selectionBoxHeight = Math.Min( + rectPane.Height / 2.0, + ResizingPanel.GetEffectiveSize(_manager.DragPaneServices.FloatingWindow.HostedPane).Height); + + + Point myScreenTopLeft = this.PointToScreenDPI(new Point()); + rectPane.Offset(-myScreenTopLeft.X, -myScreenTopLeft.Y);//relative to me + + if (owdDock == owdBottom || owdDock == owdPaneBottom) + { + selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); + selectionBox.SetValue(Canvas.TopProperty, rectPane.Top + rectPane.Height - selectionBoxHeight); + selectionBox.Width = rectPane.Width; + selectionBox.Height = selectionBoxHeight; + } + if (owdDock == owdLeft || owdDock == owdPaneLeft) + { + selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); + selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); + selectionBox.Width = selectionBoxWidth; + selectionBox.Height = rectPane.Height; + } + if (owdDock == owdRight || owdDock == owdPaneRight) + { + selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left + rectPane.Width - selectionBoxWidth); + selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); + selectionBox.Width = selectionBoxWidth; + selectionBox.Height = rectPane.Height; + } + if (owdDock == owdTop || owdDock == owdPaneTop) + { + selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); + selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); + selectionBox.Width = rectPane.Width; + selectionBox.Height = selectionBoxHeight; + } + if (owdDock == owdPaneInto) + { + selectionBox.SetValue(Canvas.LeftProperty, rectPane.Left); + selectionBox.SetValue(Canvas.TopProperty, rectPane.Top); + selectionBox.Width = rectPane.Width; + selectionBox.Height = rectPane.Height; + } + + if (owdDock == owdLeft) + SetOverlayButtonHover(OverlayButtonHover.DropBorderLeft);//OverlayButtonHover = OverlayButtonHover.DropBorderLeft; + else if (owdDock == owdRight) + SetOverlayButtonHover(OverlayButtonHover.DropBorderRight);//OverlayButtonHover = OverlayButtonHover.DropBorderRight; + else if (owdDock == owdTop) + SetOverlayButtonHover(OverlayButtonHover.DropBorderTop);//OverlayButtonHover = OverlayButtonHover.DropBorderTop; + else if (owdDock == owdBottom) + SetOverlayButtonHover(OverlayButtonHover.DropBorderBottom);//OverlayButtonHover = OverlayButtonHover.DropBorderBottom; + else if (owdDock == owdPaneInto) + SetOverlayButtonHover(OverlayButtonHover.DropPaneInto);//OverlayButtonHover = OverlayButtonHover.DropPaneInto; + else if (owdDock == owdPaneRight) + SetOverlayButtonHover(OverlayButtonHover.DropPaneRight);//OverlayButtonHover = OverlayButtonHover.DropPaneRight; + else if (owdDock == owdPaneTop) + SetOverlayButtonHover(OverlayButtonHover.DropPaneTop);//OverlayButtonHover = OverlayButtonHover.DropPaneTop; + else if (owdDock == owdPaneLeft) + SetOverlayButtonHover(OverlayButtonHover.DropPaneLeft);//OverlayButtonHover = OverlayButtonHover.DropPaneLeft; + else if (owdDock == owdPaneBottom) + SetOverlayButtonHover(OverlayButtonHover.DropPaneBottom);//OverlayButtonHover = OverlayButtonHover.DropPaneBottom; + else + SetOverlayButtonHover(OverlayButtonHover.None);//OverlayButtonHover = OverlayButtonHover.None; + + + selectionBox.Visibility = Visibility.Visible; + + _manager.DragPaneServices.FloatingWindow.OnShowSelectionBox(); + + } + + #region OverlayButtonHover + + /// + /// OverlayButtonHover Read-Only Dependency Property + /// + private static readonly DependencyPropertyKey OverlayButtonHoverPropertyKey + = DependencyProperty.RegisterReadOnly("OverlayButtonHover", typeof(OverlayButtonHover), typeof(OverlayWindow), + new FrameworkPropertyMetadata(OverlayButtonHover.None)); + + public static readonly DependencyProperty OverlayButtonHoverProperty + = OverlayButtonHoverPropertyKey.DependencyProperty; + + /// + /// Gets the OverlayButtonHover property. This dependency property + /// indicates .... + /// + public OverlayButtonHover OverlayButtonHover + { + get { return (OverlayButtonHover)GetValue(OverlayButtonHoverProperty); } + } + + /// + /// Provides a secure method for setting the OverlayButtonHover property. + /// This dependency property indicates indicates which anchor button is currently highlighted by user. + /// + /// The new value for the property. + protected void SetOverlayButtonHover(OverlayButtonHover value) + { + SetValue(OverlayButtonHoverPropertyKey, value); + } + + + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/OverlayWindowAnchorButton.cs b/src/Libraries/AvalonDock/AvalonDock/OverlayWindowAnchorButton.cs new file mode 100644 index 0000000000..f7395a7b62 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/OverlayWindowAnchorButton.cs @@ -0,0 +1,130 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; + +namespace AvalonDock +{ + class OverlayWindowDockingButton : IDropSurface + { + OverlayWindow _owner; + FrameworkElement _btnDock; + + public OverlayWindowDockingButton(FrameworkElement btnDock, OverlayWindow owner) + : this(btnDock, owner, true) + { + + } + public OverlayWindowDockingButton(FrameworkElement btnDock, OverlayWindow owner, bool enabled) + { + if (btnDock == null) + throw new ArgumentNullException("btnDock"); + if (owner == null) + throw new ArgumentNullException("owner"); + + _btnDock = btnDock; + _owner = owner; + Enabled = enabled; + } + + bool _enabled = true; + + public bool Enabled + { + get { return _enabled; } + set + { + _enabled = value; + + if (_enabled) + _btnDock.Visibility = Visibility.Visible; + else + _btnDock.Visibility = Visibility.Hidden; + } + } + + + + #region IDropSurface Membri di + + + + Rect IDropSurface.SurfaceRectangle + { + get + { + if (!(this as IDropSurface).IsSurfaceVisible) + return Rect.Empty; + + if (PresentationSource.FromVisual(_btnDock) == null) + return Rect.Empty; + + return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(_btnDock, new Point()), new Size(_btnDock.ActualWidth, _btnDock.ActualHeight)); + } + } + + void IDropSurface.OnDragEnter(Point point) + { + if (!Enabled) + return; + + _owner.OnDragEnter(this, point); + } + + void IDropSurface.OnDragOver(Point point) + { + if (!Enabled) + return; + + _owner.OnDragOver(this, point); + } + + void IDropSurface.OnDragLeave(Point point) + { + if (!Enabled) + return; + + _owner.OnDragLeave(this, point); + } + + bool IDropSurface.OnDrop(Point point) + { + if (!Enabled) + return false; + + return _owner.OnDrop(this, point); + } + + bool IDropSurface.IsSurfaceVisible + { + get { return (_owner.IsLoaded && _btnDock != null); } + } + + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Pane.cs b/src/Libraries/AvalonDock/AvalonDock/Pane.cs new file mode 100644 index 0000000000..3171e884ee --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Pane.cs @@ -0,0 +1,472 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Diagnostics; +using System.ComponentModel; +using System.Collections; +using System.Linq; + +namespace AvalonDock +{ + public abstract class Pane : + System.Windows.Controls.Primitives.Selector, + IDropSurface, + IDockableControl, + INotifyPropertyChanged + { + static Pane() + { + //FocusableProperty.OverrideMetadata(typeof(Pane), new FrameworkPropertyMetadata(false)); + } + + internal Pane() + { + this.Loaded += new RoutedEventHandler(OnLoaded); + this.Unloaded += new RoutedEventHandler(OnUnloaded); + } + + protected virtual void OnLoaded(object sender, RoutedEventArgs e) + { + //if (GetManager() == null && Parent != null) + // throw new InvalidOperationException("Pane must be put under a DockingManager!"); + + AddDragPaneReferences(); + } + + protected virtual void OnUnloaded(object sender, RoutedEventArgs e) + { + RemoveDragPaneReferences(); + } + + #region Contents management + public bool HasSingleItem + { + get + { + return (bool)GetValue(HasSingleItemProperty); + } + protected set { SetValue(HasSingleItemPropertyKey, value); } + } + + // Using a DependencyProperty as the backing store for HasSingleItem. This enables animation, styling, binding, etc... + private static readonly DependencyPropertyKey HasSingleItemPropertyKey = + DependencyProperty.RegisterReadOnly("HasSingleItem", typeof(bool), typeof(Pane), new PropertyMetadata(false)); + + public static readonly DependencyProperty HasSingleItemProperty = HasSingleItemPropertyKey.DependencyProperty; + + + ManagedContent _lastSelectedContent = null; + protected override void OnSelectionChanged(SelectionChangedEventArgs e) + { + if (e.RemovedItems != null && + e.RemovedItems.Count > 0 && + e.AddedItems != null && + e.AddedItems.Count > 0) + _lastSelectedContent = e.RemovedItems[0] as ManagedContent; + + base.OnSelectionChanged(e); + } + + protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + DockingManager dockManager = GetManager(); + if (dockManager != null) + dockManager.RefreshContents(); + + if (e.NewItems != null) + CheckItems(e.NewItems); + + HasSingleItem = (Items.Count == 1); + + if (_lastSelectedContent != null && + !Items.Contains(_lastSelectedContent)) + _lastSelectedContent = null; + + if ((e.NewItems == null || e.NewItems.Count == 0) && + (e.OldItems != null && e.OldItems.Count > 0)) + { + if (_lastSelectedContent != null && + Items.Contains(_lastSelectedContent)) + SelectedItem = _lastSelectedContent; + } + + if (Items.Count > 0) + { + int currentIndex = SelectedIndex; + + if (currentIndex < 0 || + currentIndex >= Items.Count) + currentIndex = Items.Count - 1; + + SelectedItem = Items.GetItemAt(currentIndex); + } + + RefreshContainsActiveContentProperty(); + + if (Items.Count > 0) + { + var parentPanel = Parent as ResizingPanel; + while (parentPanel != null && parentPanel.IsLoaded) + { + parentPanel.UpdateLayout(); + parentPanel.InvalidateMeasure(); + parentPanel = parentPanel.Parent as ResizingPanel; + } + } + + base.OnItemsChanged(e); + } + + protected override void OnVisualParentChanged(DependencyObject oldParent) + { + DockingManager dockManager = GetManager(); + if (dockManager != null) + dockManager.RefreshContents(); + + base.OnVisualParentChanged(oldParent); + } + + protected virtual void CheckItems(IList newItems) + { + foreach (object newItem in newItems) + { + if (!(newItem is ManagedContent)) + throw new InvalidOperationException("Pane can contain only ManagedContents!"); + } + } + + //void RefreshContentsSelectedProperty() + //{ + // //foreach (ManagedContent mc in Items) + // //{ + // // //mc.IsSelected = (mc == SelectedItem); + // // //Selector.SetIsSelected(mc + + // // if (Selector.GetIsSelected(mc)) + // // mc.FocusContent(); + // //} + //} + + //protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) + //{ + // if (e.Property == SelectedItemProperty) + // RefreshContentsSelectedProperty(); + // // SetValue(ActiveContentProperty, SelectedItem); + + // //if (e.Property == ActiveContentProperty) + // //{ + // // //SetValue(SelectedItemProperty, ActiveContent); + + // //} + + // base.OnPropertyChanged(e); + //} + #endregion + + #region IDockableControl Members + + public virtual bool IsDocked + { + get { return true; } + } + + #endregion + + public virtual DockingManager GetManager() + { + DependencyObject parent = LogicalTreeHelper.GetParent(this); + + while (parent != null && + (!(parent is DockingManager))) + parent = LogicalTreeHelper.GetParent(parent); + + return parent as DockingManager; + } + + #region ContainsActiveContent + + /// + /// ContainsActiveContent Read-Only Dependency Property + /// + /// This property is specially intended for use in restyling. + private static readonly DependencyPropertyKey ContainsActiveContentPropertyKey + = DependencyProperty.RegisterReadOnly("ContainsActiveContent", typeof(bool), typeof(Pane), + new FrameworkPropertyMetadata(false, + new PropertyChangedCallback(OnContainsActiveContentChanged))); + + public static readonly DependencyProperty ContainsActiveContentProperty + = ContainsActiveContentPropertyKey.DependencyProperty; + + /// + /// Gets the ContainsActiveContent property. This dependency property + /// indicates if this contains a set as active content into the parent object. + /// + public bool ContainsActiveContent + { + get { return (bool)GetValue(ContainsActiveContentProperty); } + } + + /// + /// Provides a secure method for setting the ContainsActiveContent property. + /// This dependency property indicates if this contains a set as active content into the parent object. + /// + /// The new value for the property. + protected void SetContainsActiveContent(bool value) + { + SetValue(ContainsActiveContentPropertyKey, value); + } + + /// + /// Handles changes to the ContainsActiveContent property. + /// + private static void OnContainsActiveContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((Pane)d).OnContainsActiveContentChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the ContainsActiveContent property. + /// + protected virtual void OnContainsActiveContentChanged(DependencyPropertyChangedEventArgs e) + { + } + + + internal void RefreshContainsActiveContentProperty() + { + SetContainsActiveContent( + Items.Cast().FirstOrDefault(d => d.IsActiveContent) != null); + + if (Items.Count> 0) + Debug.WriteLine("{0} ContainsActiveContent ={1}", (Items[0] as ManagedContent).Title, ContainsActiveContent); + } + #endregion + + #region IDockableControl Members + + #endregion + + #region Membri di IDropSurface + #region Drag pane services + + DockingManager _oldManager = null; + + protected void RemoveDragPaneReferences() + { + if (!DesignerProperties.GetIsInDesignMode(this)) + { + if (_oldManager != null) + { + _oldManager.DragPaneServices.Unregister(this); + _oldManager = null; + } + } + } + + protected void AddDragPaneReferences() + { + if (!DesignerProperties.GetIsInDesignMode(this)) + { + _oldManager = GetManager(); + if (_oldManager != null) + _oldManager.DragPaneServices.Register(this); + } + } + #endregion + + protected abstract bool IsSurfaceVisible + { + get; + } + + bool IDropSurface.IsSurfaceVisible { get { return IsSurfaceVisible; } } + + + protected virtual Rect SurfaceRectangle + { + get + { + if (!IsSurfaceVisible) + return new Rect(); + + if (PresentationSource.FromVisual(this) == null) + return new Rect(); + + return new Rect(HelperFunc.PointToScreenWithoutFlowDirection(this, new Point()), new Size(ActualWidth, ActualHeight)); + } + } + Rect IDropSurface.SurfaceRectangle + { + get { return SurfaceRectangle; } + } + + protected virtual void OnDragEnter(Point point) + { + GetManager().OverlayWindow.ShowOverlayPaneDockingOptions(this); + } + void IDropSurface.OnDragEnter(Point point) + { + OnDragEnter(point); + } + + protected virtual void OnDragOver(Point point) + { + + } + + void IDropSurface.OnDragOver(Point point) + { + OnDragOver(point); + } + + protected virtual void OnDragLeave(Point point) + { + GetManager().OverlayWindow.HideOverlayPaneDockingOptions(this); + } + + + void IDropSurface.OnDragLeave(Point point) + { + OnDragLeave(point); + } + + + protected virtual bool OnDrop(Point point) + { + return false; + } + + bool IDropSurface.OnDrop(Point point) + { + return OnDrop(point); + } + + #endregion + + #region Commands + protected override void OnInitialized(EventArgs e) + { + this.CommandBindings.Add( + new CommandBinding(PaneCommands.Dock, this.OnExecuteCommand, this.OnCanExecuteCommand)); + + base.OnInitialized(e); + } + + protected virtual void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) + { + if (e.Command == PaneCommands.Dock) + { + Dock(); + e.Handled = true; + } + } + + protected virtual void OnCanExecuteCommand(object sender, CanExecuteRoutedEventArgs e) + { + e.CanExecute = this.GetManager() != null; + + if (e.CanExecute) + { + if (e.Command == PaneCommands.Dock) + { + e.CanExecute = true; + } + } + + Debug.WriteLine("Pane.OnCanExecuteCommand({0}) = {1} (ContinueRouting={2})", e.Command, e.CanExecute, e.ContinueRouting); + } + + /// + /// Dock contained contents to the container + /// + public virtual void Dock() + { + + } + #endregion + + internal virtual ManagedContent RemoveContent(ManagedContent contentToRemove) + { + Items.Remove(contentToRemove); + + return contentToRemove; + } + + + internal virtual ManagedContent RemoveContent(int index) + { + ManagedContent contentToRemove = Items[index] as ManagedContent; + + return RemoveContent(contentToRemove); + } + + protected FrameworkElement _partHeader = null; + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + //gets a reference to the header for the pane + _partHeader = GetTemplateChild("PART_Header") as FrameworkElement; + } + + internal virtual ResizingPanel GetContainerPanel() + { + return LogicalTreeHelper.GetParent(this) as ResizingPanel; + } + + + /// + /// Gest or set a value indicating if pane should show the tab header + /// + public bool ShowHeader + { + get { return (bool)GetValue(ShowHeaderProperty); } + set { SetValue(ShowHeaderProperty, value); } + } + + // Using a DependencyProperty as the backing store for ActiveContent. This enables animation, styling, binding, etc... + public static readonly DependencyProperty ShowHeaderProperty = + DependencyProperty.Register("ShowHeader", typeof(bool), typeof(Pane), new UIPropertyMetadata(true)); + + + + + #region INotifyPropertyChanged Members + + public event PropertyChangedEventHandler PropertyChanged; + + internal void NotifyPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/PaneCommands.cs b/src/Libraries/AvalonDock/AvalonDock/PaneCommands.cs new file mode 100644 index 0000000000..93d7cdfbaf --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/PaneCommands.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Input; + +namespace AvalonDock +{ + public sealed class PaneCommands + { + static object syncRoot = new object(); + + + + + private static RoutedUICommand dockCommand = null; + + /// + /// Dock to container + /// + public static RoutedUICommand Dock + { + get + { + lock (syncRoot) + { + if (null == dockCommand) + { + dockCommand = new RoutedUICommand("Dock", "Dock", typeof(PaneCommands)); + } + } + return dockCommand; + } + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/PaneTabPanel.cs b/src/Libraries/AvalonDock/AvalonDock/PaneTabPanel.cs new file mode 100644 index 0000000000..24857f6bc8 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/PaneTabPanel.cs @@ -0,0 +1,120 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Linq; +using System.Windows.Markup; + +namespace AvalonDock +{ + public abstract class PaneTabPanel : Panel + { + //static PaneTabPanel() + //{ + // //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + // //This style is defined in themes\generic.xaml + // DefaultStyleKeyProperty.OverrideMetadata(typeof(PaneTabPanel), new FrameworkPropertyMetadata(typeof(PaneTabPanel))); + //} + + protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) + { + base.OnVisualChildrenChanged(visualAdded, visualRemoved); + + ManagedContent mc = visualAdded as ManagedContent; + if (mc != null) + { + mc.Style = TabItemStyle; + mc.ApplyTemplate(); + } + + } + + + + internal PaneTabPanel() + { + + } + + #region TabItemStyle + + /// + /// TabItemStyle Dependency Property + /// + public static readonly DependencyProperty TabItemStyleProperty = + DependencyProperty.Register("TabItemStyle", typeof(Style), typeof(PaneTabPanel), + new FrameworkPropertyMetadata((Style)null, + new PropertyChangedCallback(OnTabItemStyleChanged))); + + /// + /// Gets or sets the TabItemStyle property. This dependency property + /// indicates style to use for tabs. + /// + public Style TabItemStyle + { + get { return (Style)GetValue(TabItemStyleProperty); } + set { SetValue(TabItemStyleProperty, value); } + } + + /// + /// Handles changes to the TabItemStyle property. + /// + private static void OnTabItemStyleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((PaneTabPanel)d).OnTabItemStyleChanged(e); + } + + /// + /// Provides derived classes an opportunity to handle changes to the TabItemStyle property. + /// + protected virtual void OnTabItemStyleChanged(DependencyPropertyChangedEventArgs e) + { + //Children.Cast().ForEach(c => + // { + // Binding bnd = new Binding("TabItemStyle"); + // bnd.Source = this; + // bnd.Mode = BindingMode.OneWay; + + // c.SetBinding(StyleProperty, bnd); + + // //c.Style = TabItemStyle; + // }); + } + + + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs b/src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..8db8b6927e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AvalonDock")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Adolfo Marinucci")] +[assembly: AssemblyProduct("AvalonDock")] +[assembly: AssemblyCopyright("Copyright © Adolfo Marinucci 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.SourceAssembly, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.3.3391")] +[assembly: AssemblyFileVersion("1.3.3391")] diff --git a/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.Designer.cs b/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.Designer.cs new file mode 100644 index 0000000000..474b94b1bf --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.Designer.cs @@ -0,0 +1,252 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AvalonDock.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AvalonDock.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Float. + /// + public static string DockableContentCommands_DockableFloatingWindow { + get { + return ResourceManager.GetString("DockableContentCommands_DockableFloatingWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Float. + /// + public static string DockableContentCommands_FloatingWindow { + get { + return ResourceManager.GetString("DockableContentCommands_FloatingWindow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dock as Tabbed Document. + /// + public static string DockableContentCommands_ShowAsDocument { + get { + return ResourceManager.GetString("DockableContentCommands_ShowAsDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto Hide. + /// + public static string DockableContentCommands_ToggleAutoHide { + get { + return ResourceManager.GetString("DockableContentCommands_ToggleAutoHide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Window Position. + /// + public static string DockablePane_ShowOptionsMenu { + get { + return ResourceManager.GetString("DockablePane_ShowOptionsMenu", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string DockablePaneCommands_Close { + get { + return ResourceManager.GetString("DockablePaneCommands_Close", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide. + /// + public static string DockablePaneCommands_Hide { + get { + return ResourceManager.GetString("DockablePaneCommands_Hide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto Hide. + /// + public static string DockablePaneCommands_ToggleAutoHide { + get { + return ResourceManager.GetString("DockablePaneCommands_ToggleAutoHide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Float. + /// + public static string DocumentContentCommands_FloatingDocument { + get { + return ResourceManager.GetString("DocumentContentCommands_FloatingDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dock as Tabbed Document. + /// + public static string DocumentContentCommands_TabbedDocument { + get { + return ResourceManager.GetString("DocumentContentCommands_TabbedDocument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close All But This. + /// + public static string DocumentPaneCommands_CloseAllButThis { + get { + return ResourceManager.GetString("DocumentPaneCommands_CloseAllButThis", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string DocumentPaneCommands_CloseThis { + get { + return ResourceManager.GetString("DocumentPaneCommands_CloseThis", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Horizontal Tab Group. + /// + public static string DocumentPaneCommands_NewHorizontalTabGroup { + get { + return ResourceManager.GetString("DocumentPaneCommands_NewHorizontalTabGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New VerticalTab Group. + /// + public static string DocumentPaneCommands_NewVerticalTabGroup { + get { + return ResourceManager.GetString("DocumentPaneCommands_NewVerticalTabGroup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Activate. + /// + public static string ManagedContentCommands_Activate { + get { + return ResourceManager.GetString("ManagedContentCommands_Activate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Close. + /// + public static string ManagedContentCommands_Close { + get { + return ResourceManager.GetString("ManagedContentCommands_Close", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Hide. + /// + public static string ManagedContentCommands_Hide { + get { + return ResourceManager.GetString("ManagedContentCommands_Hide", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show. + /// + public static string ManagedContentCommands_Show { + get { + return ResourceManager.GetString("ManagedContentCommands_Show", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Active Files. + /// + public static string NavigatorWindow_ActiveFiles { + get { + return ResourceManager.GetString("NavigatorWindow_ActiveFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Active Tool Windows. + /// + public static string NavigatorWindow_ActiveToolWindows { + get { + return ResourceManager.GetString("NavigatorWindow_ActiveToolWindows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dock. + /// + public static string PaneCommands_Dock { + get { + return ResourceManager.GetString("PaneCommands_Dock", resourceCulture); + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.resx b/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.resx new file mode 100644 index 0000000000..b83816f7c1 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Properties/Resources.resx @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Float + + + Float + + + Dock as Tabbed Document + + + Auto Hide + + + Close + + + Hide + + + Auto Hide + + + Window Position + + + Float + + + Dock as Tabbed Document + + + Close All But This + + + Close + + + New Horizontal Tab Group + + + New VerticalTab Group + + + Activate + + + Close + + + Hide + + + Show + + + Active Files + + + Active Tool Windows + + + Dock + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.Designer.cs b/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.Designer.cs new file mode 100644 index 0000000000..6ae5f90b65 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AvalonDock.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.settings b/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.settings new file mode 100644 index 0000000000..033d7a5e9e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/RequestDocumentCloseEventArgs.cs b/src/Libraries/AvalonDock/AvalonDock/RequestDocumentCloseEventArgs.cs new file mode 100644 index 0000000000..447c19db0e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/RequestDocumentCloseEventArgs.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace AvalonDock +{ + public class RequestDocumentCloseEventArgs : CancelEventArgs + { + public RequestDocumentCloseEventArgs(DocumentContent doc) + { + DocumentToClose = doc; + } + + /// + /// Document content that user wants to close + /// + public DocumentContent DocumentToClose { get; private set; } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Resizer.cs b/src/Libraries/AvalonDock/AvalonDock/Resizer.cs new file mode 100644 index 0000000000..1125a53a7d --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resizer.cs @@ -0,0 +1,55 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace AvalonDock +{ + public class Resizer : Thumb + { + static Resizer() + { + //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class. + //This style is defined in themes\generic.xaml + DefaultStyleKeyProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(typeof(Resizer))); + MinWidthProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(6.0, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); + MinHeightProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(6.0, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); + HorizontalAlignmentProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); + VerticalAlignmentProperty.OverrideMetadata(typeof(Resizer), new FrameworkPropertyMetadata(VerticalAlignment.Stretch, FrameworkPropertyMetadataOptions.AffectsParentMeasure)); + } + + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ResizingPanel.cs b/src/Libraries/AvalonDock/AvalonDock/ResizingPanel.cs new file mode 100644 index 0000000000..48108b286e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ResizingPanel.cs @@ -0,0 +1,1574 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using System.Windows.Markup; +using System.Diagnostics; +using System.Linq; + + +namespace AvalonDock +{ + public class ResizingPanel : Panel, IDockableControl + { + /// + /// Gets or sets the orientation of the panel + /// + /// If horizontal oriented children are positioned from left to right and width of each child is computed according to attached property value. When vertical oriented children are arranged from top to bottom, according to of each child. + public Orientation Orientation + { + get { return (Orientation)GetValue(OrientationProperty); } + set { SetValue(OrientationProperty, value); } + } + + /// + /// Give access to Orientation attached property + /// + /// If horizontal oriented children are positioned from left to right and width of each child is computed according to attached property value. When vertical oriented children are arranged from top to bottom, according to of each child. + public static readonly DependencyProperty OrientationProperty = + DependencyProperty.Register("Orientation", typeof(Orientation), typeof(ResizingPanel), new FrameworkPropertyMetadata(Orientation.Horizontal, FrameworkPropertyMetadataOptions.AffectsMeasure, OnOrientationChanged)); + + static void OnOrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((ResizingPanel)d).splitterListIsDirty = true; + } + + public static GridLength GetResizeWidth(DependencyObject obj) + { + return (GridLength)obj.GetValue(ResizeWidthProperty); + } + + public static void SetResizeWidth(DependencyObject obj, GridLength value) + { + obj.SetValue(ResizeWidthProperty, value); + } + + + public static readonly DependencyProperty ResizeWidthProperty = + DependencyProperty.RegisterAttached("ResizeWidth", + typeof(GridLength), + typeof(ResizingPanel), + new FrameworkPropertyMetadata(new GridLength(1.0, GridUnitType.Star), + OnSplitSizeChanged, + OnCoerceSplitSize), + new ValidateValueCallback(IsSplitSizeValid)); + + public static GridLength GetResizeHeight(DependencyObject obj) + { + return (GridLength)obj.GetValue(ResizeHeightProperty); + } + + public static void SetResizeHeight(DependencyObject obj, GridLength value) + { + obj.SetValue(ResizeHeightProperty, value); + } + + + public static readonly DependencyProperty ResizeHeightProperty = + DependencyProperty.RegisterAttached("ResizeHeight", + typeof(GridLength), + typeof(ResizingPanel), + new FrameworkPropertyMetadata(new GridLength(1.0, GridUnitType.Star), + OnSplitSizeChanged, + OnCoerceSplitSize), + new ValidateValueCallback(IsSplitSizeValid)); + + static void OnSplitSizeChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(sender) as ResizingPanel; + if (parentPanel != null) + parentPanel.InvalidateMeasure(); + } + + static object OnCoerceSplitSize(DependencyObject sender, object value) + { + GridLength gd = (GridLength)value; + + if (gd.Value < 0.0) + gd = new GridLength(0.0, gd.GridUnitType); + + return gd; + } + + static bool IsSplitSizeValid(object value) + { + GridLength v = (GridLength)value; + return v.IsStar || v.IsAbsolute;//at the moment auto is not supported + } + + + + public static Size GetEffectiveSize(DependencyObject obj) + { + return (Size)obj.GetValue(EffectiveSizeProperty); + } + + public static void SetEffectiveSize(DependencyObject obj, Size value) + { + obj.SetValue(EffectiveSizeProperty, value); + } + + public static readonly DependencyProperty EffectiveSizeProperty = + DependencyProperty.RegisterAttached("EffectiveSize", typeof(Size), typeof(ResizingPanel), new FrameworkPropertyMetadata(new Size())); + + + List _splitterList = new List(); + + /// + /// Correct sizes of children if all of them are set to absolutes + /// + void CorrectSizes() + { + IEnumerable children = Children.OfType().Where(c => !(c is Resizer)); + + if (children.All(c => c.IsAbsolute())) + { + double totSum = children.Sum(f => f.GetAbsoluteValue()); + foreach (var c in children) + { + if (Orientation == Orientation.Horizontal) + SetResizeWidth(c, new GridLength(c.GetAbsoluteValue() / totSum, GridUnitType.Star)); + else + SetResizeHeight(c, new GridLength(c.GetAbsoluteValue() / totSum, GridUnitType.Star)); + } + } + } + + /// + /// Helper funcs which correct elements size of a resizing panel + /// + internal void AdjustPanelSizes() + { + IEnumerable children = Children.OfType().Where(c => !(c is Resizer)); + + if (!this.IsLogicalChildContained()) + { + //if no document pane is contained in this panel + //adjust elements so that any child will get a proportional star size + if (Orientation == Orientation.Horizontal) + { + double totSum = children.Sum(f => f.IsAbsolute() ? f.GetAbsoluteValue() : GetEffectiveSize(f).Width); + foreach (var c in children) + SetResizeWidth(c, new GridLength((c.IsAbsolute() ? c.GetAbsoluteValue() : GetEffectiveSize(c).Width) / totSum, GridUnitType.Star)); + } + else + { + double totSum = children.Sum(f => f.IsAbsolute() ? f.GetAbsoluteValue() : GetEffectiveSize(f).Height); + foreach (var c in children) + SetResizeHeight(c, new GridLength((c.IsAbsolute() ? c.GetAbsoluteValue() : GetEffectiveSize(c).Height) / totSum, GridUnitType.Star)); + } + } + + } + + + /// + /// Compute the desidered size of the panel + /// + /// + /// + protected override Size MeasureOverride(Size availableSize) + { + //Debug.WriteLine("ResizingPanel.MeasureOverride()"); + + SetupSplitters(); + + CorrectSizes(); + + //Compute the list of visible children + List visibleChildren = new List(); + for (int i = 0; i < VisualChildrenCount; i++) + { + FrameworkElement child = GetVisualChild(i) as FrameworkElement; + + IDockableControl dockableControl = child as IDockableControl; + if (dockableControl != null && + !dockableControl.IsDocked) + { + child.Measure(Size.Empty); + + if (i == VisualChildrenCount - 1 && + i > 0) + { + child = GetVisualChild(i - 1) as FrameworkElement; + Debug.Assert(child is Resizer); + + child.Measure(Size.Empty); + + if (visibleChildren.Count > 0) + { + Debug.Assert(visibleChildren[visibleChildren.Count - 1] is Resizer); + visibleChildren[visibleChildren.Count - 1].Measure(Size.Empty); + visibleChildren.RemoveAt(visibleChildren.Count - 1); + } + } + else if (i < VisualChildrenCount - 1) + { + i++; + child = GetVisualChild(i) as FrameworkElement; + Debug.Assert(child is Resizer); + child.Measure(Size.Empty); + } + + continue; + } + + visibleChildren.Add(child); + } + + + //with no children no space needed + if (visibleChildren.Count == 0) + return new Size(); + + NormalizeStarLength(visibleChildren); + + Debug.Assert(!(visibleChildren.Last() is Resizer)); + + if (availableSize.Width == double.PositiveInfinity && + Orientation == Orientation.Horizontal) + { + Size newAvailSize = new Size(); + foreach (FrameworkElement child in visibleChildren) + { + child.Measure(availableSize); + newAvailSize.Width += child.DesiredSize.Width; + newAvailSize.Height = Math.Max(child.DesiredSize.Height, newAvailSize.Height); + } + availableSize = newAvailSize; + } + //Thx to TMx + else if (availableSize.Height == double.PositiveInfinity && + Orientation == Orientation.Vertical) + { + Size newAvailSize = new Size(); + foreach (FrameworkElement child in visibleChildren) + { + child.Measure(newAvailSize); + newAvailSize.Width = Math.Max(child.DesiredSize.Width, newAvailSize.Width); + newAvailSize.Height += child.DesiredSize.Height; + } + availableSize = newAvailSize; + } + + var splitters = from FrameworkElement child in visibleChildren + where child is Resizer + select child; + var childStars = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsStar() + select child; + + var childAbsolutes = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsAbsolute() + select child; + + var childAutoSizes = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsAuto() + select child; + + //calculate the size of the splitters + Size splitterSize = new Size(); + foreach (Resizer splitter in splitters) + { + splitterSize.Width += splitter.MinWidth; + splitterSize.Height += splitter.MinHeight; + } + + Size minimumSize = new Size(splitterSize.Width, splitterSize.Height); + foreach (FrameworkElement child in childStars) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + foreach (FrameworkElement child in childAbsolutes) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + foreach (FrameworkElement child in childAutoSizes) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + + + Size minimumPrefferedSize = new Size(minimumSize.Width, minimumSize.Height); + foreach (FrameworkElement child in childAbsolutes) + { + minimumPrefferedSize.Width += child.GetAbsoluteValue() - child.MinWidth; + minimumPrefferedSize.Height += child.GetAbsoluteValue() - child.MinHeight; + } + foreach (FrameworkElement child in childAutoSizes) + { + minimumPrefferedSize.Width += child.DesiredSize.Width - child.MinWidth; + minimumPrefferedSize.Height += child.DesiredSize.Height - child.MinHeight; + } + + if (Orientation == Orientation.Horizontal) + { + #region Horizontal Orientation + + //if finalSize is not sufficient... + double offset = 0.0; + double maxHeight = 0.0; + if (minimumSize.Width >= availableSize.Width) + { + foreach (FrameworkElement child in visibleChildren) + { + child.Measure(new Size(child.MinWidth, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.MinWidth; + } + } + else if (minimumPrefferedSize.Width >= availableSize.Width) + { + double delta = (minimumPrefferedSize.Width - availableSize.Width) / childAbsolutes.Count(); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + { + child.Measure(new Size(child.MinWidth, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.MinWidth; + } + else if (child.IsAbsolute()) + { + child.Measure(new Size(Math.Max(child.GetAbsoluteValue() - delta, child.MinWidth), availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.GetAbsoluteValue() - delta; + } + else + { + child.Measure(new Size(child.MinWidth, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.MinWidth; + } + } + } + else + { + double starsSum = childStars.Sum(v => v.GetStarValue()); + double starsFinalWidth = + availableSize.Width - + splitters.Sum(s => s.MinWidth) - + childAbsolutes.Sum(a => a.GetAbsoluteValue()) - + childAutoSizes.Sum(a => a.DesiredSize.Width); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + { + child.Measure(new Size(child.MinWidth, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.MinWidth; + } + else if (child.IsAbsolute()) + { + child.Measure(new Size(child.GetAbsoluteValue(), availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.GetAbsoluteValue(); + } + else if (child.IsStar()) + { + double w = child.GetStarValue() / starsSum * starsFinalWidth; + child.Measure(new Size(w, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += w; + } + else + { + child.Measure(new Size(child.DesiredSize.Width, availableSize.Height)); + maxHeight = Math.Max(child.DesiredSize.Height, maxHeight); + offset += child.DesiredSize.Width; + } + } + } + + return new Size(offset, maxHeight); + + #endregion + } + else + { + #region Vertical Orientation + + //if finalSize is not sufficient... + double offset = 0.0; + double maxWidth = 0.0; + if (minimumSize.Height >= availableSize.Height) + { + foreach (FrameworkElement child in visibleChildren) + { + child.Measure(new Size(availableSize.Width, child.MinHeight)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.MinHeight; + } + } + else if (minimumPrefferedSize.Height >= availableSize.Height) + { + double delta = (minimumPrefferedSize.Height - availableSize.Height) / childAbsolutes.Count(); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + { + child.Measure(new Size(availableSize.Width, child.MinHeight)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.MinHeight; + } + else if (child.IsAbsolute()) + { + child.Measure(new Size(availableSize.Width, Math.Max(child.GetAbsoluteValue() - delta, child.MinHeight))); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.GetAbsoluteValue() - delta; + } + else + { + child.Measure(new Size(availableSize.Width, child.MinHeight)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.MinWidth; + } + } + } + else + { + double starsSum = childStars.Sum(v => v.GetStarValue()); + double starsFinalHeight = + availableSize.Height - + splitters.Sum(s => s.MinHeight) - + childAbsolutes.Sum(a => a.GetAbsoluteValue()) - + childAutoSizes.Sum(a => a.DesiredSize.Height); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + { + child.Measure(new Size(availableSize.Width, child.MinHeight)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.MinWidth; + } + else if (child.IsAbsolute()) + { + child.Measure(new Size(availableSize.Width, child.GetAbsoluteValue())); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.GetAbsoluteValue(); + } + else if (child.IsStar()) + { + double w = child.GetStarValue() / starsSum * starsFinalHeight; + child.Measure(new Size(availableSize.Width, w)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += w; + } + else + { + child.Measure(new Size(availableSize.Width, child.DesiredSize.Height)); + maxWidth = Math.Max(child.DesiredSize.Width, maxWidth); + offset += child.DesiredSize.Width; + } + } + } + + return new Size(maxWidth, offset); + + #endregion + + } + } + + private void NormalizeStarLength(IEnumerable visibleChildren) + { + var childrenWithStarLength = visibleChildren.Where(c => c is IDockableControl && c.IsStar()); + int childrenWithStartLengthCount = childrenWithStarLength.Count(); + + if (childrenWithStartLengthCount == 0) + return; + + if (childrenWithStartLengthCount == 1) + { + ResizingPanel.SetResizeWidth(childrenWithStarLength.First(), new GridLength(1.0, GridUnitType.Star)); + return; + } + + double sumStars = childrenWithStarLength.Sum(c => c.GetStarValue()); + + if (sumStars == 0) + { + //problem!?! try to fix... + childrenWithStarLength.ForEach(c => + { + ResizingPanel.SetResizeWidth(c, new GridLength(1.0 / childrenWithStartLengthCount, GridUnitType.Star)); + }); + } + else + { + childrenWithStarLength.ForEach(c => + { + ResizingPanel.SetResizeWidth(c, new GridLength(1.0 * c.GetStarValue() / sumStars, GridUnitType.Star)); + }); + } + + } + + Size[] _childrenFinalSizes = null; + + /// + /// Arranges children giving them a proportional space according to their attached property value + /// + /// + /// + protected override Size ArrangeOverride(Size finalSize) + { + //Debug.WriteLine("ResizingPanel.ArrangeOverride()"); + + //Compute the list of visible children + List visibleChildren = new List(); + for (int i = 0; i < VisualChildrenCount; i++) + { + FrameworkElement child = GetVisualChild(i) as FrameworkElement; + + IDockableControl dockableControl = child as IDockableControl; + if (dockableControl != null && + !dockableControl.IsDocked) + { + child.Arrange(new Rect()); + + if (i == VisualChildrenCount - 1 && + i > 0) + { + child = GetVisualChild(i - 1) as FrameworkElement; + Debug.Assert(child is Resizer); + + child.Arrange(new Rect()); + + if (visibleChildren.Count > 0) + { + Debug.Assert(visibleChildren[visibleChildren.Count - 1] is Resizer); + visibleChildren[visibleChildren.Count - 1].Arrange(new Rect()); + visibleChildren.RemoveAt(visibleChildren.Count - 1); + } + + } + else if (i < VisualChildrenCount - 1) + { + i++; + child = GetVisualChild(i) as FrameworkElement; + child.Arrange(new Rect()); + Debug.Assert(child is Resizer); + } + + continue; + } + + visibleChildren.Add(child); + } + + //with no children fill the space + if (visibleChildren.Count == 0) + { + _childrenFinalSizes = new Size[] { }; + return new Size(); + } + + Debug.Assert(!(visibleChildren.Last() is Resizer)); + + + _childrenFinalSizes = new Size[visibleChildren.Count]; + + var splitters = from FrameworkElement child in visibleChildren + where child is Resizer + select child; + var childStars = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsStar() + select child; + + var childAbsolutes = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsAbsolute() + select child; + + var childAutoSizes = from FrameworkElement child in visibleChildren + where (!(child is Resizer)) && child.IsAuto() + select child; + + //calculate the size of the splitters + Size splitterSize = new Size(); + foreach (Resizer splitter in splitters) + { + splitterSize.Width += splitter.MinWidth; + splitterSize.Height += splitter.MinHeight; + } + + Size minimumSize = new Size(splitterSize.Width, splitterSize.Height); + foreach (FrameworkElement child in childStars) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + foreach (FrameworkElement child in childAbsolutes) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + foreach (FrameworkElement child in childAutoSizes) + { + minimumSize.Width += child.MinWidth; + minimumSize.Height += child.MinHeight; + } + + + Size minimumPrefferedSize = new Size(minimumSize.Width, minimumSize.Height); + foreach (FrameworkElement child in childAbsolutes) + { + minimumPrefferedSize.Width += child.GetAbsoluteValue() - child.MinWidth; + minimumPrefferedSize.Height += child.GetAbsoluteValue() - child.MinHeight; + } + foreach (FrameworkElement child in childAutoSizes) + { + minimumPrefferedSize.Width += child.DesiredSize.Width - child.MinWidth; + minimumPrefferedSize.Height += child.DesiredSize.Height - child.MinHeight; + } + + int iChild = 0; + + if (Orientation == Orientation.Horizontal) + { + #region Horizontal Orientation + + //if finalSize is not sufficient... + if (minimumSize.Width >= finalSize.Width) + { + foreach (FrameworkElement child in visibleChildren) + { + _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); + } + } + else if (minimumPrefferedSize.Width >= finalSize.Width) + { + double delta = (minimumPrefferedSize.Width - finalSize.Width) / childAbsolutes.Count(); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); + else if (child.IsAbsolute()) + _childrenFinalSizes[iChild++] = new Size(Math.Max(child.GetAbsoluteValue() - delta, 0.0), finalSize.Height); + else + _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); + } + } + else + { + double starsSum = childStars.Sum(v => v.GetStarValue()); + double starsFinalWidth = + finalSize.Width - + splitters.Sum(s => s.MinWidth) - + childAbsolutes.Sum(a => a.GetAbsoluteValue()) - + childAutoSizes.Sum(a => a.DesiredSize.Width); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + _childrenFinalSizes[iChild++] = new Size(child.MinWidth, finalSize.Height); + else if (child.IsAbsolute()) + _childrenFinalSizes[iChild++] = new Size(child.GetAbsoluteValue(), finalSize.Height); + else if (child.IsStar()) + _childrenFinalSizes[iChild++] = new Size(child.GetStarValue() / starsSum * starsFinalWidth, finalSize.Height); + else + _childrenFinalSizes[iChild++] = new Size(child.DesiredSize.Width, finalSize.Height); + } + + } + + double offset = 0.0; + + for (int i = 0; i < visibleChildren.Count; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + child.Arrange(new Rect(offset, 0.0, _childrenFinalSizes[i].Width, finalSize.Height)); + offset += _childrenFinalSizes[i].Width; + + SetEffectiveSize(child, new Size(_childrenFinalSizes[i].Width, finalSize.Height)); + } + + return new Size(offset, finalSize.Height); + #endregion + } + else + { + #region Vertical Orientation + + //if finalSize is not sufficient... + if (minimumSize.Height >= finalSize.Height) + { + foreach (FrameworkElement child in visibleChildren) + { + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); + } + } + else if (minimumPrefferedSize.Height >= finalSize.Height) + { + double delta = (minimumPrefferedSize.Height - finalSize.Height) / childAbsolutes.Count(); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); + else if (child.IsAbsolute()) + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, Math.Max(child.GetAbsoluteValue() - delta, 0.0)); + else + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); + } + } + else + { + double starsSum = childStars.Sum(v => v.GetStarValue()); + double starsFinalHeight = + finalSize.Height - + splitters.Sum(s => s.MinHeight) - + childAbsolutes.Sum(a => a.GetAbsoluteValue()) - + childAutoSizes.Sum(a => a.DesiredSize.Height); + + foreach (FrameworkElement child in visibleChildren) + { + if (child is Resizer) + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.MinHeight); + else if (child.IsAbsolute()) + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.GetAbsoluteValue()); + else if (child.IsStar()) + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.GetStarValue() / starsSum * starsFinalHeight); + else + _childrenFinalSizes[iChild++] = new Size(finalSize.Width, child.DesiredSize.Height); + } + + } + + double offset = 0.0; + + for (int i = 0; i < visibleChildren.Count; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + child.Arrange(new Rect(0.0, offset, finalSize.Width, _childrenFinalSizes[i].Height)); + offset += _childrenFinalSizes[i].Height; + SetEffectiveSize(child, new Size(finalSize.Width, _childrenFinalSizes[i].Height)); + } + + return new Size(finalSize.Width, offset); + #endregion + } + + + } + + bool setupSplitters = false; + bool splitterListIsDirty = false; + + void SetupSplitters() + { + if (!splitterListIsDirty) + return; + + if (setupSplitters) + return; + + setupSplitters = true; + + while (_splitterList.Count > 0) + { + Resizer splitter = _splitterList[0]; + splitter.DragStarted -= new DragStartedEventHandler(splitter_DragStarted); + splitter.DragDelta -= new DragDeltaEventHandler(splitter_DragDelta); + splitter.DragCompleted -= new DragCompletedEventHandler(splitter_DragCompleted); + _splitterList.Remove(splitter); + Children.Remove(splitter); + } + + int i = 0;//child index + int j = 0;//splitter index + + while (i < Children.Count - 1) + { + if (j == _splitterList.Count) + { + Resizer splitter = new Resizer(); + splitter.Cursor = this.Orientation == Orientation.Horizontal ? Cursors.SizeWE : Cursors.SizeNS; + _splitterList.Add(splitter); + splitter.DragStarted += new DragStartedEventHandler(splitter_DragStarted); + splitter.DragDelta += new DragDeltaEventHandler(splitter_DragDelta); + splitter.DragCompleted += new DragCompletedEventHandler(splitter_DragCompleted); + Children.Insert(i + 1, splitter); + } + + i += 2; + j++; + } + + for (j = 0; j < _splitterList.Count; j++) + { + _splitterList[j].Width = (Orientation == Orientation.Horizontal) ? 6 : double.NaN; + _splitterList[j].Height = (Orientation == Orientation.Vertical) ? 6 : double.NaN; + } + +#if DEBUG + Debug.Assert(_splitterList.Count == Children.Count / 2); + i = 0; + while (Children.Count > 0) + { + Debug.Assert(Children[i] != null); + Debug.Assert(!(Children[i] is Resizer)); + i++; + if (i >= Children.Count) + break; + + Debug.Assert((Children[i] is Resizer)); + i++; + + } +#endif + splitterListIsDirty = false; + setupSplitters = false; + } + + protected override void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved) + { + base.OnVisualChildrenChanged(visualAdded, visualRemoved); + + splitterListIsDirty = true; + } + + + /// + /// This method is called by a splitter when it is dragged + /// + /// Dragged splitter + /// + void splitter_DragDelta(object sender, DragDeltaEventArgs e) + { + Resizer splitter = sender as Resizer; + + if (Orientation == System.Windows.Controls.Orientation.Horizontal) + { + Canvas.SetLeft(_resizerGhost, _initialStartPoint.X + e.HorizontalChange); + } + else + { + Canvas.SetTop(_resizerGhost, _initialStartPoint.Y + e.VerticalChange); + } + + + //ResizingPanelSplitter splitter = e.Source as ResizingPanelSplitter; + //int i = 0; + + ////Compute the list of visible children + //List visibleChildren = new List(); + //for (i = 0; i < VisualChildrenCount; i++) + //{ + // FrameworkElement child = GetVisualChild(i) as FrameworkElement; + + // IDockableControl dockableControl = child as IDockableControl; + // if (dockableControl != null && + // !dockableControl.IsDocked) + // { + // if (i == VisualChildrenCount - 1 && + // i > 0) + // { + // //remove the last splitter added + // if (visibleChildren.Count > 0 && + // visibleChildren.Last() is ResizingPanelSplitter) + // visibleChildren.RemoveAt(visibleChildren.Count - 1); + // } + // else if (i < VisualChildrenCount - 1) + // { + // //discard the next splitter + // i++; + // } + + // continue; + // } + + // visibleChildren.Add(child); + //} + + //if (visibleChildren.Count == 0) + // return; + + //if (visibleChildren.Last() is ResizingPanelSplitter) + // visibleChildren.RemoveAt(visibleChildren.Count - 1); + + //Size[] currentSizes = new Size[visibleChildren.Count]; + //double delta = Orientation == Orientation.Horizontal ? e.HorizontalChange : e.VerticalChange; + + //if (_childrenFinalSizes == null) + // return; + + //_childrenFinalSizes.CopyTo(currentSizes, 0); + + //int iSplitter = visibleChildren.IndexOf(splitter); + + //Debug.Assert(iSplitter > -1); + + //List prevChildren = new List(); + //for (i = iSplitter - 1; i >= 0; i--) + //{ + // FrameworkElement child = visibleChildren[i] as FrameworkElement; + // if (child is ResizingPanelSplitter) + // continue; + // if (child.IsAbsolute() || child.IsAuto()) + // { + // if (prevChildren.Count == 0) + // { + // prevChildren.Add(child); + // } + // break; + // } + // if (child.IsStar()) + // { + // prevChildren.Add(child); + // } + //} + + //List nextChildren = new List(); + + //for (i = iSplitter + 1; i < visibleChildren.Count; i++) + //{ + // FrameworkElement child = visibleChildren[i] as FrameworkElement; + // if (child is ResizingPanelSplitter) + // continue; + // if (child.IsAbsolute() || child.IsAuto()) + // { + // if (nextChildren.Count == 0) + // nextChildren.Add(child); + // break; + // } + // if (child.IsStar()) + // { + // nextChildren.Add(child); + // } + //} + + + //double prevMinSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); + //double nextMinSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); + //double prevMaxSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); + //double nextMaxSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); + + //double prevSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); + //double nextSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); + + //if (prevSize + delta < prevMinSize) + // delta = prevMinSize - prevSize; + //if (nextSize - delta < nextMinSize) + // delta = -(nextMinSize - nextSize); + + //double remDelta = delta * 2; + + //while (!HelperFunc.AreClose(delta, 0.0)) + //{ + // int prevChildrenCountWithNoMinLen = + // prevChildren.Count(c => delta > 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); + // int nextChildrenCountWithNoMinLen = + // nextChildren.Count(c => delta < 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); + + // delta = remDelta / 2.0; + + // for (i = 0; i < currentSizes.Length; i++) + // { + // FrameworkElement child = visibleChildren[i] as FrameworkElement; + // if (child is ResizingPanelSplitter) + // continue; + + // if (Orientation == Orientation.Horizontal) + // { + // if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) + // { + // double s = delta / prevChildrenCountWithNoMinLen; + // if (currentSizes[i].Width + s < child.MinWidth) + // s = child.MinWidth - currentSizes[i].Width; + + // currentSizes[i].Width += s; + // remDelta -= s; + // } + // if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) + // { + // double s = delta / nextChildrenCountWithNoMinLen; + // if (currentSizes[i].Width - s < child.MinWidth) + // s = currentSizes[i].Width - child.MinWidth; + + // currentSizes[i].Width -= s; + // remDelta -= s; + // } + // } + // else + // { + // if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) + // { + // double s = delta / prevChildrenCountWithNoMinLen; + // if (currentSizes[i].Height + s < child.MinHeight) + // s = child.MinHeight - currentSizes[i].Height; + + // currentSizes[i].Height += s; + // remDelta -= s; + // } + // if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) + // { + // double s = delta / nextChildrenCountWithNoMinLen; + // if (currentSizes[i].Height - s < child.MinHeight) + // s = currentSizes[i].Height - child.MinHeight; + + // currentSizes[i].Height -= s; + // remDelta -= s; + // } + // } + // } + //} + + //Debug.Assert(HelperFunc.AreClose(delta, 0.0)); + + //double totalStartsSum = 0.0; + //double totalSizeForStarts = 0.0; + + //for (i = 0; i < visibleChildren.Count; i++) + //{ + // FrameworkElement child = visibleChildren[i] as FrameworkElement; + // if (child is ResizingPanelSplitter) + // continue; + // if (child.IsStar()) + // { + // totalStartsSum += child.GetStarValue(); + // totalSizeForStarts += Orientation == Orientation.Horizontal ? currentSizes[i].Width : currentSizes[i].Height; + // } + //} + + + //double starsScaleFactor = totalStartsSum / totalSizeForStarts; + + //for (i = 0; i < currentSizes.Length; i++) + //{ + // FrameworkElement child = visibleChildren[i] as FrameworkElement; + + // if (child is ResizingPanelSplitter) + // continue; + + // if (child.IsStar()) + // { + // if (Orientation == Orientation.Horizontal) + // { + // SetResizeWidth(child, + // new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Width, starsScaleFactor), GridUnitType.Star)); + // } + // else + // { + // SetResizeHeight(child, + // new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Height, starsScaleFactor), GridUnitType.Star)); + // } + // } + // else if (child.IsAbsolute()) + // { + // if (Orientation == Orientation.Horizontal) + // { + // SetResizeWidth(child, + // new GridLength(currentSizes[i].Width, GridUnitType.Pixel)); + // } + // else + // { + // SetResizeHeight(child, + // new GridLength(currentSizes[i].Height, GridUnitType.Pixel)); + // } + // } + //} + + //InvalidateMeasure(); + } + + void splitter_DragStarted(object sender, DragStartedEventArgs e) + { + var resizer = sender as Resizer; + ShowResizerOverlayWindow(resizer); + } + + void splitter_DragCompleted(object sender, DragCompletedEventArgs e) + { + HideResizerOverlayWindow(); + + Resizer splitter = e.Source as Resizer; + int i = 0; + + //Compute the list of visible children + List visibleChildren = new List(); + for (i = 0; i < VisualChildrenCount; i++) + { + FrameworkElement child = GetVisualChild(i) as FrameworkElement; + + IDockableControl dockableControl = child as IDockableControl; + if (dockableControl != null && + !dockableControl.IsDocked) + { + if (i == VisualChildrenCount - 1 && + i > 0) + { + //remove the last splitter added + if (visibleChildren.Count > 0 && + visibleChildren.Last() is Resizer) + visibleChildren.RemoveAt(visibleChildren.Count - 1); + } + else if (i < VisualChildrenCount - 1) + { + //discard the next splitter + i++; + } + + continue; + } + + visibleChildren.Add(child); + } + + if (visibleChildren.Count == 0) + return; + + if (visibleChildren.Last() is Resizer) + visibleChildren.RemoveAt(visibleChildren.Count - 1); + + Size[] currentSizes = new Size[visibleChildren.Count]; + double delta = Orientation == Orientation.Horizontal ? e.HorizontalChange : e.VerticalChange; + + if (_childrenFinalSizes == null) + return; + + _childrenFinalSizes.CopyTo(currentSizes, 0); + + int iSplitter = visibleChildren.IndexOf(splitter); + + Debug.Assert(iSplitter > -1); + + List prevChildren = new List(); + for (i = iSplitter - 1; i >= 0; i--) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + if (child is Resizer) + continue; + if (child.IsAbsolute() || child.IsAuto()) + { + if (prevChildren.Count == 0) + { + prevChildren.Add(child); + } + break; + } + if (child.IsStar()) + { + prevChildren.Add(child); + } + } + + List nextChildren = new List(); + + for (i = iSplitter + 1; i < visibleChildren.Count; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + if (child is Resizer) + continue; + if (child.IsAbsolute() || child.IsAuto()) + { + if (nextChildren.Count == 0) + nextChildren.Add(child); + break; + } + if (child.IsStar()) + { + nextChildren.Add(child); + } + } + + + double prevMinSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); + double nextMinSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MinWidth : c.MinHeight); + double prevMaxSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); + double nextMaxSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? c.MaxWidth : c.MaxHeight); + + double prevSize = prevChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); + double nextSize = nextChildren.Sum(c => Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width : currentSizes[visibleChildren.IndexOf(c)].Height); + + if (prevSize + delta < prevMinSize) + delta = prevMinSize - prevSize; + if (nextSize - delta < nextMinSize) + delta = -(nextMinSize - nextSize); + + double remDelta = delta * 2; + + while (!HelperFunc.AreClose(delta, 0.0)) + { + int prevChildrenCountWithNoMinLen = + prevChildren.Count(c => delta > 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); + int nextChildrenCountWithNoMinLen = + nextChildren.Count(c => delta < 0 ? true : (Orientation == Orientation.Horizontal ? currentSizes[visibleChildren.IndexOf(c)].Width > c.MinWidth : currentSizes[visibleChildren.IndexOf(c)].Height > c.MinHeight)); + + delta = remDelta / 2.0; + + for (i = 0; i < currentSizes.Length; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + if (child is Resizer) + continue; + + if (Orientation == Orientation.Horizontal) + { + if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) + { + double s = delta / prevChildrenCountWithNoMinLen; + if (currentSizes[i].Width + s < child.MinWidth) + s = child.MinWidth - currentSizes[i].Width; + + currentSizes[i].Width += s; + remDelta -= s; + } + if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) + { + double s = delta / nextChildrenCountWithNoMinLen; + if (currentSizes[i].Width - s < child.MinWidth) + s = currentSizes[i].Width - child.MinWidth; + + currentSizes[i].Width -= s; + remDelta -= s; + } + } + else + { + if (prevChildren.Contains(child) && prevChildrenCountWithNoMinLen > 0) + { + double s = delta / prevChildrenCountWithNoMinLen; + if (currentSizes[i].Height + s < child.MinHeight) + s = child.MinHeight - currentSizes[i].Height; + + currentSizes[i].Height += s; + remDelta -= s; + } + if (nextChildren.Contains(child) && nextChildrenCountWithNoMinLen > 0) + { + double s = delta / nextChildrenCountWithNoMinLen; + if (currentSizes[i].Height - s < child.MinHeight) + s = currentSizes[i].Height - child.MinHeight; + + currentSizes[i].Height -= s; + remDelta -= s; + } + } + } + } + + Debug.Assert(HelperFunc.AreClose(delta, 0.0)); + + double totalStartsSum = 0.0; + double totalSizeForStarts = 0.0; + + for (i = 0; i < visibleChildren.Count; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + if (child is Resizer) + continue; + if (child.IsStar()) + { + totalStartsSum += child.GetStarValue(); + totalSizeForStarts += Orientation == Orientation.Horizontal ? currentSizes[i].Width : currentSizes[i].Height; + } + } + + double starsScaleFactor = totalStartsSum / totalSizeForStarts; + + for (i = 0; i < currentSizes.Length; i++) + { + FrameworkElement child = visibleChildren[i] as FrameworkElement; + + if (child is Resizer) + continue; + + if (child.IsStar()) + { + if (Orientation == Orientation.Horizontal) + { + SetResizeWidth(child, + new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Width, starsScaleFactor), GridUnitType.Star)); + } + else + { + SetResizeHeight(child, + new GridLength(HelperFunc.MultiplyCheckNaN(currentSizes[i].Height, starsScaleFactor), GridUnitType.Star)); + } + } + else if (child.IsAbsolute()) + { + if (Orientation == Orientation.Horizontal) + { + SetResizeWidth(child, + new GridLength(currentSizes[i].Width, GridUnitType.Pixel)); + } + else + { + SetResizeHeight(child, + new GridLength(currentSizes[i].Height, GridUnitType.Pixel)); + } + } + } + + InvalidateMeasure(); + } + + Border _resizerGhost = null; + Window _resizerWindowHost = null; + Vector _initialStartPoint; + + void ShowResizerOverlayWindow(Resizer splitter) + { + Point ptTopLeftScreen = this.PointToScreen(new Point()); + + _resizerGhost = new Border() + { + Background = Brushes.Black, + Opacity = 0.7 + }; + + if (Orientation == System.Windows.Controls.Orientation.Horizontal) + { + _resizerGhost.Width = 5.0; + _resizerGhost.Height = ActualHeight; + } + else + { + _resizerGhost.Height = 5.0; + _resizerGhost.Width = ActualWidth; + } + + _initialStartPoint = splitter.PointToScreen(new Point()) - this.PointToScreen(new Point()); + + if (Orientation == System.Windows.Controls.Orientation.Horizontal) + { + Canvas.SetLeft(_resizerGhost, _initialStartPoint.X); + } + else + { + Canvas.SetTop(_resizerGhost, _initialStartPoint.Y); + } + + Canvas panelHostResizer = new Canvas() + { + HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch, + VerticalAlignment = System.Windows.VerticalAlignment.Stretch + }; + + panelHostResizer.Children.Add(_resizerGhost); + + _resizerWindowHost = new Window() + { + ResizeMode = ResizeMode.NoResize, + WindowStyle = System.Windows.WindowStyle.None, + ShowInTaskbar = false, + AllowsTransparency = true, + Background = null, + Width = ActualWidth, + Height = ActualHeight, + Left = ptTopLeftScreen.X, + Top = ptTopLeftScreen.Y, + ShowActivated = false, + Owner = Window.GetWindow(this), + Content = panelHostResizer + }; + + _resizerWindowHost.Show(); + } + + void HideResizerOverlayWindow() + { + if (_resizerWindowHost != null) + { + _resizerWindowHost.Close(); + _resizerWindowHost = null; + } + } + + #region IDockableControl Membri di + + public bool IsDocked + { + get + { + foreach (UIElement child in this.Children) + { + if (child is IDockableControl) + if (((IDockableControl)child).IsDocked) + return true; + } + + return false; + } + } + + #endregion + + + /// + /// Remove a child from children collection + /// + /// + internal void RemoveChild(FrameworkElement childToRemove) + { + int indexOfChildToRemove = Children.IndexOf(childToRemove); + + Debug.Assert(indexOfChildToRemove != -1); + + Children.RemoveAt(indexOfChildToRemove); + + if (Children.Count > 0) + { + SetupSplitters(); + + if (Children.Count == 1) + { + UIElement singleChild = this.Children[0]; + + if (Parent is ResizingPanel) + { + ResizingPanel parentPanel = Parent as ResizingPanel; + if (parentPanel != null) + { + int indexOfThisPanel = parentPanel.Children.IndexOf(this); + parentPanel.Children.RemoveAt(indexOfThisPanel); + this.Children.Remove(singleChild); + parentPanel.Children.Insert(indexOfThisPanel, singleChild); + + if (parentPanel.Orientation == Orientation.Horizontal) + { + SetResizeWidth(singleChild, GetResizeWidth(this)); + } + else + { + SetResizeHeight(singleChild, GetResizeHeight(this)); + } + } + } + else if (Parent is DockingManager) + { + DockingManager manager = Parent as DockingManager; + if (manager != null) + { + this.Children.Remove(singleChild); + manager.Content = singleChild; + } + } + + } + } + else + { + ResizingPanel parentPanel = Parent as ResizingPanel; + if (parentPanel != null) + { + parentPanel.RemoveChild(this); + } + } + } + + /// + /// Insert a new child element into the children collection. + /// + /// New child element to insert. + /// Child after or before which element must be insert. + /// True if new child must be insert after the element. False otherwise. + internal void InsertChildRelativeTo(FrameworkElement childToInsert, FrameworkElement relativeChild, bool next) + { + int childRelativeIndex = Children.IndexOf(relativeChild); + + Debug.Assert(childRelativeIndex != -1); + + Children.Insert( + next ? childRelativeIndex + 1 : childRelativeIndex, childToInsert); + + SetupSplitters(); + + InvalidateMeasure(); + } + + + + + } + + + internal static class ResizingPanelExFuncs + { + public static double GetAbsoluteValue(this FrameworkElement child) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; + GridLength len = parentPanel.Orientation == Orientation.Horizontal ? ResizingPanel.GetResizeWidth(child) : ResizingPanel.GetResizeHeight(child); + if (!len.IsAbsolute) + throw new InvalidOperationException(); + return len.Value; + } + + public static double GetStarValue(this FrameworkElement child) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; + GridLength len = parentPanel.Orientation == Orientation.Horizontal ? ResizingPanel.GetResizeWidth(child) : ResizingPanel.GetResizeHeight(child); + if (!len.IsStar) + throw new InvalidOperationException(); + return len.Value; + } + + public static bool IsStar(this FrameworkElement child) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; + return parentPanel.Orientation == Orientation.Horizontal ? + ResizingPanel.GetResizeWidth(child).IsStar : + ResizingPanel.GetResizeHeight(child).IsStar; + } + public static bool IsAbsolute(this FrameworkElement child) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; + return parentPanel.Orientation == Orientation.Horizontal ? + ResizingPanel.GetResizeWidth(child).IsAbsolute : + ResizingPanel.GetResizeHeight(child).IsAbsolute; + } + + public static bool IsAuto(this FrameworkElement child) + { + ResizingPanel parentPanel = LogicalTreeHelper.GetParent(child) as ResizingPanel; + return parentPanel.Orientation == Orientation.Horizontal ? + ResizingPanel.GetResizeWidth(child).IsAuto : + ResizingPanel.GetResizeHeight(child).IsAuto; + } + + } + +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Brushes.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/Brushes.xaml new file mode 100644 index 0000000000..2c85933640 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/Brushes.xaml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Common.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/Common.xaml new file mode 100644 index 0000000000..fb12dda598 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/Common.xaml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml new file mode 100644 index 0000000000..e9db6e16b0 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/DockablePaneStyles.xaml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/DockingManagerStyles.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/DockingManagerStyles.xaml new file mode 100644 index 0000000000..3e6d163d67 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/DockingManagerStyles.xaml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml new file mode 100644 index 0000000000..be778ee74b --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentNavigatorWindowStyle.xaml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentPaneStyles.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentPaneStyles.xaml new file mode 100644 index 0000000000..c6bb54ce22 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/DocumentPaneStyles.xaml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/FloatingWindowStyle.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/FloatingWindowStyle.xaml new file mode 100644 index 0000000000..dfd76b3d83 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/FloatingWindowStyle.xaml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottom.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..63edb12fc6bf956948ae5270c99089f5d13aa7d4 GIT binary patch literal 699 zcmV;s0!00ZP)Vl&|0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIyEsmG&3M8FflMN$=#l?00007bV*G` z2iXG|5HteXRf#j5Qg7176Af{L=?&5qXxI)&_jum+;f9Vj!C7S(o;|UX+8E(a_kSN zN+Y#75k3ScQcf|S2IK6k1j02bCdhkfUuk98%+9mpomn#sT!X>Dsnu$z*XtOLMhHsL zNCdfD4u)YM7K<^~@AsX`)fI}xBGRc8!r^dWaLcmL?sQPCR#7gMzNX z{Zoxb17@!WrG9&hbUG~!Ov+?3Ag(&*uR>MTwG&1b&yAt8)-D=hi0=H|hIoSOceTyV z5Z{0G@X)uPw0W@`!rMX|Z(c`z`ScAhgSEDHJcV8?MbgNp^^_n;~^ zK7aY)`R)Ad5Qe_Di90CEtMM}oJ&6zRjxjLr7K85Txu5wSxL+`h*=&aWWE_|8Pca_e zi!0sJbH6@Zd%kK_>y+11`1J9Dm#GHZwtdehyHF^!9eg^SLemb!brUhhya~4{{JC?M z_3X&Ekt=f9a8Klvtumx2iaT=p)J-N6DR9bkN;+5MR4%gQikx1#EV!rC2rg^S=O^I; zE;Hd)!ey1(GDq3M&(``6|3~5T<4!t!hqp&`y3v6jv?xeA+lfb9(Jt}gLyGrl^l=HY z-U%Gx&0@RV7XN_MSG;5VTB(RGLesQB8$}AP)9vE-%?--sGQ?(^rYTzFW~+r!fGsjb h{W6;sEpj4}V2`D0f?CO~sw)5h002ovPDHLkV1j_NItBm$ literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottomHover.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockBottomHover.png new file mode 100644 index 0000000000000000000000000000000000000000..69d4fe3115edb371f94dde5caac0857183f4c316 GIT binary patch literal 1260 zcmVVl&|0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIyE#pH8~(FFflMNM=lB^00007bV*G` z2iXG|5H}TasA4Su000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000C- zNklfv7>E@t`7jHVDCh2fZu)T=gXA zLA-iVqF_M0iCzK`4M`-o=#tfd;K3z_Fk`Yivoq5_<@dU(XM4t--5FuMXbq27T|NE2 z_r7}XRks31qtW>K=j$uapIr{Ix*lV<#zIBoOx;Jly7=YX+}tTe;2%z(y?(;f9>>$i z4GxqPO8jG9QK)@tk6MojU?`CYCn0s0xrxOmBY(0mN< zoir#L1&=7c7BJ2UtVCdC+#wDKf3XoU2*nXD7|y#|I489hE5s!@Y_}{8boPC}}Jc z*B^(*JR@4U(Zc!5O*C$YBmcMOE+0=Go57K#X@t?vcKy^FGeTr^XsA}LK-WR!+b-5oK^d%aa zi~S(pWI)@<`A}@Ec4FvJGKUkle!Car-n}z;=j|8JURzDHT+4d@Sq$08+GQkzw8yp# zJc@Rb&6lLkGbMB@^iZ!Iz(?=Djt36z$IZ@QnWj{y3?@-KNw=gAp31&Qn9GgK{!U17kry)@fx z9vb6UQk+tPu^&ovD8lJ`9Yh3T9^na5etvu!n}?dj%C z0G^&=J)(E1TU=NRfF{dP@%II7olL8GJ%>O0^_nJR!Jbc8|8YPNXsfLxPE-4DFK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HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockLeftHover.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockLeftHover.png new file mode 100644 index 0000000000000000000000000000000000000000..4011775be4bba17668cdf2cd036afa2615f705fe GIT binary patch literal 1198 zcmV;f1X25mP)WdLnuav(A_AZ=lCATls8IUq4NIy5#qGc+J8FflMNCGBmV00007bV*G` z2iXG|5HAjT)-#v@000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000C9 zNklU;HlufD1hU|U^X{py#-<>zLWLR?!{7-X9)NxWS5P_G@DtyZfq2s;1%#7yH!U3&t@ zk7+zKDlozqhXqiiEf5~BB`o@FW*89>YM@KorESw*ZEJixFCZHi@aapn@5J2s3;Oix zG~Pe1QG!50I)^cYwXRc z2}FE5Af&P*7t%%}?ge(}A}0xzac=q_DF|%Pnz|tQBq1V`6r>SwA8D0gt+(r=AH)%G z7#|X7{@%tO))iA@LU%tU5QT_~gn1Ba!R2aO=uGFQee^i|?C(22oE7UUD-e-AI}o30wEIWf~`6 zJ8kso+`KpGD>SZL$LTZYQJR>-sPDAF+(x=L4P_F6Kv^P@(?psEl|K#l_!8HyH}TE~ zpWRWMq0?AOz=Xu4z`zg*bP|<+=%Nn{Gsl+}7xC(AAKo!KrvGka`%F_X)6}ST0#sO^ z$0?c;rD~>)PeBaDt0PxQw?g*Q4%Uz2%tt5j#@nClc(#07;aBcCzU0`a(i8;18fU@= znQannqN6OfR4+RHqVZRR$@}lcd#6t9AYl6246(fqfCM%|`=CQ?MHXF$K;=V+-+Z$I z96tB}-hJ~K_{Bm>!1UL4Ga*ADA_2vbYko{nNn51Yr45M0=7H(w^Q!^YOXGO{*#j6a zd6od5ZPHhe)d18^(J8kmWh-Q!rkp4jnjz}@tC;SrVS@X?CexEFe!U0`xGl95Mh=uQ zdxM+a&Fw?+c7uRP?GJQ*E7-ZC_|JDl{}YhO?`|?NzLLt|?HLgmqcF=wxho`m%D&9{ zzD7M7-`*=nhA_8S;Nc{K&&gZ%>{>8N47;^pDCb&WnyCSyTV;nM#C`dmJ%5zxxIBmW zjOaajq<*8mFu(Wg(lIj~#v3?lD@emR|UI31=@WtZWSSfOg-Q#EUhF#~-PqQmKf)0iCJ0B3Oqp>i_@% M07*qoM6N<$f;wa#3jhEB literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPane.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPane.png new file mode 100644 index 0000000000000000000000000000000000000000..ccc29ae53e7b0cce104699e0571a42596190a701 GIT binary patch literal 3624 zcmV+@4%hLCP)KEW0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIx;ajGcq76FflMNOjL=U00007bV*G` z2iXG|5F!(-ejyA1000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000et zNkl~_nq;PfLK~uk{&;POi!OarR8`$XZ3`FL5jsC)xP(xb)Y9HyqGCfDkG z_UswWFDy{|zI{T;!|yc#T0DL7gtlzi;%c3Zjg3mZqCq(2tRxZ?2n1ZM6ZN59(IA|1 z@>oY+IWikcg=S}GDVxa0$H$fH z)vH&o2*Bs}Q(+*W)Oq2v&oYt+o35gwf{KfasXh{+9W5<6HS=lqHy1JT6zEgmu77PZdwx))DbmmOf`xh1#6xznd z#^~zRt5QvEEgkIa%!!g5SI(U~cckY-LsVZ^M;&jyWvdJfX>Ro#R-ak023A>FNo{Ry zG%_+mfBEVwX=`I6wYRrBsw791bL-YEX?b~>j=%RF`Th1+hM*YNhBZ!8x}l+g>g(&N ztE)@lzoVnWF$Focws!mWZ7EbzLWd3=;!+F%VI`AES1vRHUgHD&f^YB-IXER#N0fuz z%eA#N+S%Ib2vJOERxivSR-bXwG6esS1LWaEd5$P&Se|1J95~D|>saF2tGrsookn$Hw)pm47SB$G$xPL4UvfA&}H&N%rFlH7zHV^MbF{k zVT!pJ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xb(TSRBFKxdsLR)*owv~%7ivrnICi_cMV2T_ZiGO!)j@DIITTYG^h4uB+k#y-lFOGb%LPNSk|3=KS$21}(XW2?qWp>f^=`ee zf*g2#(7}cC=Ph|{izPuQ4jLL68Ik8b5Otek{m^hl86k$Q%xb@s=(5$YQJBqhr|!0p1$}PX)7h zs6m`0d{=DubTQcVdKM$=0=O)^f5ExhkQFTk3m~j~e~zVNYbY4rJcWV8zP>)$)rOhj z^Y2{P=gCJUh zGTz$k0#`Vny)1Pt)*~SB#uWX;#Dpy0{{8#QQk%+NMU`(moV|Ouvc~`5eILW-cSByqj7ljCxW= z^Qw@e14a)@GJ*;@I$`H7H@6Z4xNe%df)!NAaWN|7xEK|3T#O1iE`}?~abmi`jc^?~ z%59M4M*cQGx50IBj+t$cdXc})&uws}{V=)>QZMqi`8h3jK3rEI4kOzj^&)?ppWE<1 X_J6fgw+pDo00000NkvXXu0mjf3~EjB literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneLeft.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockPaneLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..aca8e9310195d900dccbc7dc8afede07184beafb GIT binary patch literal 4244 zcmV;F5Nq#=P)KEW0000ibVXQnLvm$d zbZKvHAXI5>WdLnuav(A_AZ=lCATls8IUq4NIx;ajGcq76FflMNOjL=U00007bV*G` z2iXG|5GWPD@@%sJ000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000l` zNkl3&26+Ukk&)A;9HW+UhV~jCoGlZp}tR#w(G(sXFAx)J^Ren`btEyG{ zrJDrB-UIh(FCDrL96p(j*P2&C*mrlLiwE7y|}l47Rb2vBBGTmiKzUJ9F(> zJ#U*gugZMV_4B-WbC>ho<(zYuCy@;?Jw2`T^z=|~Z!gUR0y#^k*z2Xn#ztDSXwjaA zhK6_ZU2fZBYHCV(>+QFdOFcbGAP`VwS7=YHMkAb8}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_Ch625k7(rHIPs0yHjD@5rLjYJz;Qw{8D{1G&2&&8nqO zuL7ps-5MsQOXpNL5}?>gMfhnx`GW3LNSl0*LsmhkPVt^W;k3`Ma$UejRp35pBWsaaV9wyH}*>*f}HX3 zaZ{%Zpi6sO8#d0*pE9rtyms;KojXlWiyMIvLzETcn7so4F=#P+-+h;!c>Hn8Hujt= zE#OtdmlBJ6r9BMKww$4%A@x{>l@(f}zyOc&rn|e_ZFP0wNpf(23NMx0x^=55@6jy8 zNivkT&bPJvvbI_HQ`sI2!y{31v z&289fIbw5qq0QiCfI!U1o2X`^3Qf-zE;CdvQDsGbZx-dn4aP7=AnalHOsg$&%56?M z+QEe@vvlbABu!4|o}H+!^3%rK!nCft@TqsC6`}xdF-RQvlkn z{sg`HkN&LBp4hdCx;knM<>Ta%iI`9wzkc1+)QxUlb{_8S?UnEg9}vb#1CrWM_K|{rHDZs8{^& z)DaLf8{Ldpe>Y+byIY;CK$KZ%y903qPPg9nwtGiTI& z33#m)6fqK%iPlys2!o5&%R=A9*&_trSfaneVFdKswQE;VYE#jxsP@+mZ%j-S{63U^ z=)ngao$Ja6vEv0Vy)zOt)_v7~?NAG|3SeIXUWNxUO97CB!5qZcS?@0fJhz?$l=5Vo zlQZg0!?Wa+>P%>^^Qm5dC&{rAgj&TSIVR!Ou|u!HbIa6=n8zYH9>yX$9>yX$9>yX$ z9)>5$@zR@d-Gt}J(H?^=HZqU-c@3V6bLgn*eqMto`wtw0T+`cY`WU2HfP9>y v!vZ0W`MIrkCOjvQfR$sAW|4W!&ujQU;SBaV9;JW%00000NkvXXu0mjf#Zq3r literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRight.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRight.png new file mode 100644 index 0000000000000000000000000000000000000000..3e90ce2b4c9790f167833c003bdbba4a0c1b7a91 GIT binary patch literal 755 zcmVWdLnuav(A_AZ=lCATls8IUq4NIy5ypF*qPAFflMNOJBQ`00007bV*G` z2iXG|5HBM?32*HH000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP0006? zNklq;E0|CkFPyocb#|4;IJ4i+*ul*>fBy!m`8%6}XyAOC3bi3U^$q9nX z5DO9@RBgs1xPR{!djjotJ8*Kj$t^V^s`q3<$K6sK<_#D9em`(>vEkpIh9ux(`~`PR zH?V~J8&6mtZduxkN$Ej3G`vHtV&Qq>)5-tD$002ovPDHLkV1j$8Mw0*l literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRightHover.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Aero/AeroDockRightHover.png new file mode 100644 index 0000000000000000000000000000000000000000..1015ec89acc684b0ce6050772ef644727b6cfb49 GIT binary patch literal 1183 zcmV;Q1YrA#P)WdLnuav(A_AZ=lCATls8IUq4NIy5*sG&UeBFflMNrhY{o00007bV*G` z2iXG|5HSTgMb*y$000SaNLh0L01FZT01FZU(%pXi00004XF*Lt006O%3;baP000B_ zNkl@IjmNmRsIigKUz9jm2~a5?xZc~_`=KE4Uylz}-!bL4 zarB76{;dLAXkxbj@-*g11G<;6+Ntm|6lrXLCXG!R>oopdH~48pKvr+#s}tp)#qh1$ z=JMPiK0Rtsgg{O@z(j=|ol%j2fbmKfWtfmbtnIUijDCF6;FHpCkYA2Pc=cU@ytb@2 zS`>i(Ctm$|g_dlzb%sR@VO^Sfl zHa3b-a-0j&CZ2XyI1!C_h9oo=$T$qX=gJVNl?0wmONE`#N=Uc#EZ}h9e#P3^OGdpy zuth-8?1)s-%K|NZE7f70YsWa}J5pIl=oC2HSFRknFGzahiAWy;p2+pzNB({|RYy;k zSYd72^P>|rX0>`-v0s}fpkgFVBA*kOex&f-%}1E{YZj%vY$NeJs#5Ant`OjMsVxbX z`NbI5f0)F-4{F#;t-00BG6J$aKYEQ=71~2!Us7CBy|B?#xcJ47s7_3wzo3W&z0aup ztUZU*G;s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M9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde00d`2O+f$vv5tKEQIh}w03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(` z>RI+y?e7jKeZ#YO-C07OYdK~#9!V*LOAKLe?Nkz!3Jj;>%}U|_&z3ZsQ}1VK%V zP@(@LRTIwex3G?2#Ag!&k}Zr#nivLH6R`jQ009600{}RGQ|DtzxEKHc002ovPDHLk FV1h<5Xs7@H literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinAutoHideSelected.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinAutoHideSelected.png new file mode 100644 index 0000000000000000000000000000000000000000..87cad42141477a80388a95ddce23382ebc3b32ae GIT binary patch literal 2838 zcmV+x3+eQUP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E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{`ly3)1N^`o1+o7}D0ZPeY&J;i;i`%NyJ8_8Y6J?}yE@b_5a zam?eLr<8@mESk|3$_SkmS{wQ>%qC18))9_|&j{ZT zes8AvOzF(F2#DZEY>2oYX&IRp`F#{ADl)1r>QS^)ba8a|EY_^#S^HO&t^Rgqwv=MZThqqEWH8 zxJo>d=ABlR_Bh=;eM9Tw|Ih34~oTE|= zX_mAr*D$vzw@+p(E0Yc6dFE}(8oqt`+R{gE3x4zjX+Sb3_cYE^= zgB=w+-tUy`ytONMS8KgRef4hA?t0j zufM;t32jm~jUGrkaOInTZ`zyfns>EuS}G30LFK_G-==(f<51|K&cocp&EJ`SxAh3? zNO>#LI=^+SEu(FqJ)ynt=!~PC9bO$rzPJB=?=j6w@a-(u02P7 zaQ)#(uUl{HW%tYNS3ItC^iAtK(eKlL`f9+{bJzISE?u8_z3;~C8@FyI-5j_jy7l;W z_U#vU3hqqYU3!mrul&B+{ptt$59)uk{;_4iZQ%G|z+lhASr6|H35TBkl>gI*;nGLU zN7W-nBaM%pA0HbH8olyl&XeJ%vZoWz%6?Y=dFykl=imL}`%BMQ{Mhgd`HRoLu6e2R za__6DuR6yg#~-}Tc|Gx_{H@O0eebyMy5GmWADJlpK>kqk(fVV@r_fLLKIeS?{4e)} z^ZO;zpECde00d`2O+f$vv5tKEQIh}w03c&XQcVB=dL;k=fP(-4`Tqa_faw4Lbua(` z>RI+y?e7jKeZ#YO-C05eHMK~#9!V*LOAKLe?Nky@ItnZihnCPp*^Mw}*m;m=4+ oJpD(vVQ^`}2><{90RR6309j2n=XTgnhX4Qo07*qoM6N<$f^Rrt*8l(j literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinClose.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinClose.png new file mode 100644 index 0000000000000000000000000000000000000000..3e8c611a2c3779e4b07ac6ae62c3f6f842ecba7f GIT binary patch literal 2865 zcmV-13(oY3P)KLZ*U+5Lu!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001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinCloseSelected.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Classic/PinCloseSelected.png new file mode 100644 index 0000000000000000000000000000000000000000..a15868156a39e4170dae62a3edff3efa2fce91fe GIT binary patch literal 2856 zcmV+@3)l3CP)KLZ*U+5Lu!Sk^o_Z5E4Meg@_7P6crJiNL9pw)e1;Xm069{HJUZAPk55R%$-RIA z6-eL&AQ0xu!e<4=008gy@A0LT~suv4>S3ILP<0Bm`DLLvaF4FK%)Nj?Pt*r}7;7Xa9z9H|HZjR63e zC`Tj$K)V27Re@400>HumpsYY5E(E}?0f1SyGDiY{y#)Yvj#!WnKwtoXnL;eg03bL5 z07D)V%>y7z1E4U{zu>7~aD})?0RX_umCct+(lZpemCzb@^6=o|A>zVpu|i=NDG+7} zl4`aK{0#b-!z=TL9Wt0BGO&T{GJWpjryhdijfaIQ&2!o}p04JRKYg3k&Tf zVxhe-O!X z{f;To;xw^bEES6JSc$k$B2CA6xl)ltA<32E66t?3@gJ7`36pmX0IY^jz)rRYwaaY4 ze(nJRiw;=Qb^t(r^DT@T3y}a2XEZW-_W%Hszxj_qD**t_m!#tW0KDiJT&R>6OvVTR z07RgHDzHHZ48atvzz&?j9lXF70$~P3Knx_nJP<+#`N z#-MZ2bTkiLfR>_b(HgWKJ%F~Nr_oF3b#wrIijHG|(J>BYjM-sajE6;FiC7vY#};Gd zST$CUHDeuEH+B^pz@B062qXfFfD`NpUW5?BY=V%GM_5c)L#QR}BeW8_2v-S%gfYS= zB9o|3v?Y2H`NVi)In3rTB8+ej^> zQ=~r95NVuDChL%G$=>7$vVg20myx%S50Foi`^m%Pw-h?Xh~i8Mq9jtJloCocWk2Nv zrJpiFnV_ms&8eQ$2&#xWpIS+6pmtC%Q-`S&GF4Q#^mhymh7E(qNMa}%YZ-ePrx>>xFPTiH1=E+A$W$=bG8>s^ zm=Bn5Rah$aDtr}@$`X}2l~$F0mFKEdRdZE8)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*LOAKLe?NacF5GWC9~DoBrd|fX{jVacLmr pr~lYA48b6$ohASP009600|51uD(BxPAbJ1*002ovPDHLkV1gQ^WjO!< literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockBottom.PNG b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockBottom.PNG new file mode 100644 index 0000000000000000000000000000000000000000..cdc7c06ebdad41ed7d5fa2ca2fc1cd41f15f7764 GIT binary patch literal 701 zcmV;u0z&j6!UFrRW5!#CJLtK z;S_Y`{_Ej8lNWFK&tHE&;PyFOPfj{V`_JC%b9j4BTsze7?(B0BYw30F>mJ-|J+r6N z(bM72WHNwAl2qjif{@GQ3WWl4ujt><1odnD!%tt}$JpC%Bh%~NsjpXGmR&EF2Yp4y zsjOK>-(Qe_F2<)u-GY!eYU1k=u(Y$!OZ$vZEw14(^gGQZ>ajYJ|yn`;C00004XF*Lt006O% z3;baP0007TNklWy5~PX&OJho@RHTYVB3^3H#u|;c;H_GgX$UssK6+)YA4ZAq<&4+`}+d$t(MrcIOSVfKV&$@%77XSN3d zfo)qV0EnU(3WXw(NR+p*-Q$7vcs!m?r?b4p0ATO1F3WPBw-^8f23v>mo({j~-Xzw= zJ1p8>iUYoaxFPjk z%i27tE_VWea5xNxIbg_N9vm;ZCn}`r)%i#}?fZIsOtIh3AG-VL;4OK-SL(i+v3k;^ z_g+ZsIsbn5V65ZpI{*YhKuF91ujf>(>6kW?D2tg&Se}pN7n4dYr+t@8Kd@Fdk|qJg zV6rS`>i{YP;LjV`UuhDc1(PM_!H4IbjjPCNdug%HY!W~opo*wW z0VtSzfX#N%u7z&e(-RR9aotN}m{%&Vv+z?vkp5D~zv*tcIyKP;bLtyonpX8Pr4VtS zrvG*FdO2vt0~!^xnX29g|Arlh^MKl?&DHQk!$FGU6rbCahG#Oa0${X%Icj*Tz%k8N fjB5*iwod*6m105#MH!5000000NkvXXu0mjfKRG*e literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockPane.PNG b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockPane.PNG new file mode 100644 index 0000000000000000000000000000000000000000..0377b966e23a237fcbdf71d4e246b0cf5a0ac833 GIT binary patch literal 2790 zcmVl7yuYzVSQf>wdZTC}^CY*t7!(>>+>s=B(Xd-^rI zRoy+ZKWM6_AJzST{dZM${a@8EssQKCo#SO+^VqRttO{FOwlBarC&q?to1B~!X`|6d z+;0-suV1%qW-6=`oP}ny87v_BPDEt{gHRB=Y11Z}n3%Bc#Z|!?!Fthf;lhPIhYlV3 zP~VSzAQx7k1U6J9$~${OTC^;U5~_W*W1=} z{B^ml;}MJ$$ARF!_h4M_A+h(*)AI5%?b@|Vydifa!5~g}vA2G0dip*uIg@q#zZX}? z9dH`(fh1XYGe{c$8SGf`wRzm>sxz9JJfb@OaYB3C`!*K9-*UXNlmn z&*UV)gChjSns{8)Z!9c>HCN@D$JY%O2@VNZSy?$TJw5$)=8d3|3(5eGN{>L!S?Ik2 z;r`$nTq}TUSPEP9;88w*n?YX$i={=@)Am=7vU*sq6glXblfN;N)(Mq7ZuAFl-@aXZ z#%|ucnVvrVXL{=oKQxyA14mz_Q%~-u+1Xjzwrv|NEG$&kAAD!_5!MKw6Kok{MKE6d zal_aUtjHZVlC2Z0_X+3q52xYyi8rV}IVqN&w;Vt5+wvINAdC>4#hcz1UQbx)zEkf} zcY2DtQ+J7_C(A-;lmFO`V%FrSNq5MzPXCeS@81#_+-RB*<+-BVOEdb*_dX~H>vY;a!5i17(fj8`#Tl>Y;ty2V z2fJX01<_$(r7C|LtV#R7_E2DOx7!z~O`|U^UK9DZTk@mBwmwaNpeF505*;SKJG#L* z8L3U9e|Bn*(bp1q;Apx&txWq83I6Uq@_=SzKy9z+fVZQJg1iagb!Zq=6!_pw@!CJr z=qqdV^B2$36HlM?($~H8VG+c9{_GEOQ+2#LKkuGKd7!v20HixU@jZ{|eqTO-o+$og zx&7M0@cB8_Ig_%3c%A3h116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ff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockRight.PNG b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockRight.PNG new file mode 100644 index 0000000000000000000000000000000000000000..067b3f0632630ddf405cb988242bc0c8bc8532c7 GIT binary patch literal 691 zcmV;k0!;mhP)C00004XF*Lt006O% z3;baP0007NNklW+w*yVTe*OAwY6GYRz<>cd9cXxvie@k#|6a`oy}plSE+-NRzR+`YeN?)<*s zz#j++;ZENAwRgj(_Eqm2mcFi>_q=$<Mr|NUGOPC2ejbm z(W5{+uv<_%=V{T*C*^aWLr4fWZ`z~m$q&-{?LaiZZo@5j0z&V+E79jEg zI1ZpWnfRgt=s?O5&KeC^kzTlP;n1N&Koyh#oOLp!)dIAJ!uAo)Rt2z{rY?XsTYwbp Z003ukLQG-h*UbO`002ovPDHLkV1gzvHH!cM literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockTop.PNG b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/DockTop.PNG new file mode 100644 index 0000000000000000000000000000000000000000..b14b818c7dc6d1b699dc7f0dcfa384efacf76a6a GIT binary patch literal 719 zcmV;=0xPx#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBU!O-V#SR7gwhmfLF+K@`UI{}QB%0ZU^`sZ^wjMj~2k(8d~#x8SYb zeF&(9)C$rE`{YXuk}hl^S;URGZ&w@H*d!$-w)7(6gF^ew%x(;tbnLK#4<5dpe0%2X zkC|nYnXTb)c+1}iaAjGJ#bS!0ys;_BT=4-kkw|1RnVd~waxqgtbzLvm6ebs|$3(&O z-yVm~-F!ZDZS3@w(8-IBkNbjd?}NjhJAM5(dfkEULl^e+`PzHEEIWEUJGut8JCAK^ zcXzjiG))7eTpgZR3XFd~|Fr6TQXU8v-S<8o9DdL8 zzN=c#2Aw{uW!JM|V^Ns_Sc=G=%{hF+Ztf#?qxas0j+Mp^fn}%MdP&X^fq=zbnI_V_h zaPy^={OoFemSm0j60}0aj8$Q6R-MDuD__LK=b{5>fxOZ0VofwS^A*Le{d-)@XoJ-V z&KI{awL*(_V74f)Sy4~p{~>hF_)Y5D(v zT^f5ehQ*@gK95rc(87nQmgf>|{kDX8-ocmcu?|hnSd{OUeFgvk002ovPDHLkV1kG% BMpb%$) zM`SSr12<5bTZr+}-MT+OL6&q!Uq=Rpjs4tz5?O)#y`CXf8orD$p;?kZH0{JUuP{yElj=9_hMESx&QWQ)|K zBRp=07gWitzkPL%Bp3H)q3Q@@FmclXTspFJ`c1!?(T0b;*^Bdm?kzBm@Y4 w-Q>~!Cd2K_kKGSt)4NUo1bzKKef=+n-K)}-PDva50D6SM)78&qol`;+0M?O!p8x;= literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Locked.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/Locked.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f6ced2df26aa988dd3087712d62e9168c4351d GIT binary patch literal 357 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJx0U~c5>$3n-Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A3Jr+{)NoLEFI4z#y|OdL>XFdx@v7EBj4m2|fdbqj5K{0fjgV zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%LgLo-U3d6}M#jbomY$Fto;>6qzP( z&Y~#6)7LY9^&6hu2Ta;M@ppmi?D0cO7$zBdEetd$<=xK z=Mv4O2A^#B%j!K2>}Yxa+lr&<*1FeOhjmsqYIG&=yB$$EWN@Wz;#IqA=PlTiHCqG% zyc$zwu4xNK^jQB8d&|WXspnYk9x>;+=#>xCr7g~}tj*(p^S43OrO`syaPHZK(!O`{ s!>8ecOsb+Okyp0=FX~R)=lZi#66g;GPgg&ebxsLQ07P4TjsO4v literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinAutoHide.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinAutoHide.png new file mode 100644 index 0000000000000000000000000000000000000000..7a968a25eaa72a54e18ec873a57e0c93c4a7a6bd GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpTyyf4=~y(-8| vaxqRgl6gq1NFwXw(aZHQpPHS8{TLX+ZTR_4&-N$>>SFM8^>bP0l+XkK*m@l0 literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinClose.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinClose.png new file mode 100644 index 0000000000000000000000000000000000000000..1bd384e1142c268302f39d65197f6c9e0ef40256 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2^Po-U3d6}OU86qpTyR=u>BYYuoK z@zL{20-l$p00i_>zopr E01vewjQ{`u literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinDocMenu.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinDocMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..35b3fef68e18e9cbad978fa2da452116f76a9d83 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpV8W-R-EWX1BX wWsdLEYosI%C0I<19zA(*p<`iN-9mN-w?sC+EfdQ4fVvnwUHx3vIVCg!0QDaofdBvi literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinMenu.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/PinMenu.png new file mode 100644 index 0000000000000000000000000000000000000000..ebad71bee8796c6ccfa67ec43943075c4a1e0c93 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp@Ak4uAB#T}@sR2@2o-U3d6}OU86qpV8bbbGK2KJv_ v_Wy^;gW`MjF;W~qU)t-LI_sRsT+YexxtWFU{qv%eKwS);u6{1-oD!M<9+MxI literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/Images/VTabGroup.png b/src/Libraries/AvalonDock/AvalonDock/Resources/Images/VTabGroup.png new file mode 100644 index 0000000000000000000000000000000000000000..c3f279f7d7ac7b6ef8381388fb79afd790dd8d65 GIT binary patch literal 403 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1SBVD?P>#3Iwh_VCC){ui6xo&c?uz!xv31f ziA4%VCJJE6z`#<$(A>(%#LCoCLEFI4z+ldYw-rEr>?NMQuIx9NB?Kh-yvvSu0EIXU zJR*x37`TN%nDNrxx<5ccmUKs7M+SzC{oH>NS%Lglo-U3d6}NIP82T|g@~{S|&zdCS zu_dNi`a(c(U_ju7C66RJq7@Vsv-})R$_j{j-B^+^@y6Euxo=nmF7|Bgo&T>Y#ed!V z=`LR^f2`WRZu`~t()Xt~KRztwec|fMgKsaV>_2`_YO|!%>=_qlx4-+(a4UrQz1;lT z?R|cFvn-b0t%~glxhl4t;opfKwsVrcI!q_;HOHJ~zm_pOLV@XQTyIFN2!C!;=XMJd zyB#z7_jGRCutIC|ah?M%ovQbLO4D{H?=?Pol;GCnVx*>@_?*9@MnelF{r5}E*8VV&6k literal 0 HcmV?d00001 diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/ManagedContentStyle.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/ManagedContentStyle.xaml new file mode 100644 index 0000000000..822a3bd4c1 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/ManagedContentStyle.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/NavigatorWindowStyle.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/NavigatorWindowStyle.xaml new file mode 100644 index 0000000000..66498a5123 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/NavigatorWindowStyle.xaml @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Resources/OverlayWindowStyle.xaml b/src/Libraries/AvalonDock/AvalonDock/Resources/OverlayWindowStyle.xaml new file mode 100644 index 0000000000..501647c2c2 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Resources/OverlayWindowStyle.xaml @@ -0,0 +1,59 @@ + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/RoutedEventHandler.cs b/src/Libraries/AvalonDock/AvalonDock/RoutedEventHandler.cs new file mode 100644 index 0000000000..be35aed59e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/RoutedEventHandler.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AvalonDock +{ + class RoutedEventHandler + { + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/RoutedEventHelper.cs b/src/Libraries/AvalonDock/AvalonDock/RoutedEventHelper.cs new file mode 100644 index 0000000000..97ee15f32b --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/RoutedEventHelper.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace AvalonDock +{ + using System; + using System.Windows; + + internal static class RoutedEventHelper + { + #region RoutedEvent Helper Methods + + /// + /// A static helper method to raise a routed event on a target UIElement or ContentElement. + /// + /// UIElement or ContentElement on which to raise the event + /// RoutedEventArgs to use when raising the event + internal static void RaiseEvent(DependencyObject target, RoutedEventArgs args) + { + if (target is UIElement) + { + (target as UIElement).RaiseEvent(args); + } + else if (target is ContentElement) + { + (target as ContentElement).RaiseEvent(args); + } + } + + /// + /// A static helper method that adds a handler for a routed event + /// to a target UIElement or ContentElement. + /// + /// UIElement or ContentElement that listens to the event + /// Event that will be handled + /// Event handler to be added + internal static void AddHandler(DependencyObject element, RoutedEvent routedEvent, Delegate handler) + { + UIElement uie = element as UIElement; + if (uie != null) + { + uie.AddHandler(routedEvent, handler); + } + else + { + ContentElement ce = element as ContentElement; + if (ce != null) + { + ce.AddHandler(routedEvent, handler); + } + } + } + + /// + /// A static helper method that removes a handler for a routed event + /// from a target UIElement or ContentElement. + /// + /// UIElement or ContentElement that listens to the event + /// Event that will no longer be handled + /// Event handler to be removed + internal static void RemoveHandler(DependencyObject element, RoutedEvent routedEvent, Delegate handler) + { + UIElement uie = element as UIElement; + if (uie != null) + { + uie.RemoveHandler(routedEvent, handler); + } + else + { + ContentElement ce = element as ContentElement; + if (ce != null) + { + ce.RemoveHandler(routedEvent, handler); + } + } + } + + #endregion + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/ThemeFactory.cs b/src/Libraries/AvalonDock/AvalonDock/ThemeFactory.cs new file mode 100644 index 0000000000..68f56aa2f4 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/ThemeFactory.cs @@ -0,0 +1,255 @@ +//Copyright (c) 2009, Juergen Schildmann +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +using System; +using System.IO; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Media; + +namespace AvalonDock +{ + /// + /// Is used for color-support to change the colors depending on a base theme. + /// + public sealed class ThemeFactory + { + /// + /// Change the theme to one from AvalonDock. + /// + /// for example: "aero.normalcolor" (default style) + public static void ChangeTheme(string theme) + { + ResourceDictionary rd = new ResourceDictionary(); + rd.Source = new Uri("/AvalonDock;component/themes/" + theme + ".xaml", UriKind.RelativeOrAbsolute); + + // first search and remove old one + ResetTheme(); + + Application.Current.Resources.MergedDictionaries.Add(rd); + } + + /// + /// Change the theme to one from AvalonDock. + /// + /// for example: /AvalonDock;component/themes/aero.normalcolor.xaml" (default style) + public static void ChangeTheme(Uri themeUri) + { + ResourceDictionary rd = new ResourceDictionary(); + rd.Source = themeUri; + + // first search and remove old one + ResetTheme(); + + Application.Current.Resources.MergedDictionaries.Add(rd); + } + + /// + /// Change the colors based on the aero-theme from AvalonDock. + /// + /// Example: ChangeColors(Colors.DarkGreen) + /// + /// + /// the new Color + public static void ChangeColors(Color color) + { + ChangeColors("aero.normalcolor", color); + } + + /// + /// Change the colors based on a theme-name from AvalonDock. + /// + /// Example: ChangeColors("classic", Colors.DarkGreen) + /// + /// + /// the string of the base theme we want to change + /// the new Color + public static void ChangeColors(string baseTheme, Color color) + { + ResourceDictionary rd = new ResourceDictionary(); + rd.Source = new Uri("/AvalonDock;component/themes/" + baseTheme + ".xaml", UriKind.RelativeOrAbsolute); + + ChangeKeysInResourceDictionary(rd, color); + foreach (ResourceDictionary rd2 in rd.MergedDictionaries) + { + ChangeKeysInResourceDictionary(rd2, color); + } + + ResetTheme(); + + Application.Current.Resources.MergedDictionaries.Add(rd); + } + + /// + /// Reset custom colors to theme defaults + /// + public static void ResetTheme() + { +//- foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries) + ResourceDictionary res = GetActualResourceDictionary(); + if (res != null) + Application.Current.Resources.MergedDictionaries.Remove(res); + } + + /// + /// Change a specified brush inside the actual theme. + /// Look at AvalonDockBrushes.cs for possible values. + /// + /// an AvalonDockBrushes value + /// The new brush. It can be every brush type that is derived from Brush-class. + public static void ChangeBrush(AvalonDockBrushes brushName, Brush brush) + { + ChangeBrush(brushName.ToString(), brush); + } + + /// + /// Change a specified brush inside the actual theme. + /// + /// a brush name + /// The new brush. It can be every brush type that is derived from Brush-class. + public static void ChangeBrush(string brushName, Brush brush) + { + // get the actual ResourceDictionary + ResourceDictionary rd = GetActualResourceDictionary(); + if (rd == null) + { +//- string source = res.Source.ToString(); +//- if (source.Contains("/AvalonDock;component/themes/")) + ChangeTheme("aero.normalcolor"); + rd = GetActualResourceDictionary(); + } + + if (rd != null) + { + foreach (ResourceDictionary rd2 in rd.MergedDictionaries) + { +//- Application.Current.Resources.MergedDictionaries.Remove(res); +//- break; + foreach (object key in rd2.Keys) + { + object item = rd2[key]; + string keyTypeName = key.GetType().Name; + + string str = ""; + switch (keyTypeName) + { + case "ComponentResourceKey": + str = ((ComponentResourceKey)key).ResourceId.ToString(); + break; + case "String": + str = (string)key; + break; + } + if (str == brushName) + { + rd[key] = brush; + return; + } + } + } + } + } + + /// + /// Searches for keys in the ResourceDictionary for brushes and changes the color-values + /// + /// the ResourceDictionary + /// the new Color + static void ChangeKeysInResourceDictionary(ResourceDictionary rd, Color color) + { + foreach (object key in rd.Keys) + { + object item = rd[key]; + + if (item is SolidColorBrush) + { + SolidColorBrush sb = item as SolidColorBrush; + sb.Color = GetColor(sb.Color, color); + } + else if (item is LinearGradientBrush) + { + LinearGradientBrush lg = item as LinearGradientBrush; + foreach (GradientStop gs in lg.GradientStops) + { + gs.Color = GetColor(gs.Color, color); + } + } + else if (item is RadialGradientBrush) + { + RadialGradientBrush rb = item as RadialGradientBrush; + foreach (GradientStop gs in rb.GradientStops) + { + gs.Color = GetColor(gs.Color, color); + } + } + } + } + + static ResourceDictionary GetActualResourceDictionary() + { + // get the actual ResourceDictionary + foreach (ResourceDictionary res in Application.Current.Resources.MergedDictionaries) + { + if (res.Source != null) + { + string source = res.Source.ToString(); + if (source.Contains("/AvalonDock;component/themes/") || + source.Contains("/AvalonDock.Themes;component/themes/")) + { + return res; + } + } + } + return null; + } + + static Color GetColor(Color c, Color newCol) + { + if (c.A == 0) return c; + + // get brightness for RGB values + byte brighness = (byte)(c.R * 0.2126 + c.G * 0.7152 + c.B * 0.0722); + + return Color.FromArgb(c.A, + GetSmoothColor(brighness, newCol.R), + GetSmoothColor(brighness, newCol.G), + GetSmoothColor(brighness, newCol.B)); + } + + static byte GetSmoothColor(int a, int b) + { + int c = a * b / 255; + return (byte)(c + a * (255 - ((255 - a) * (255 - b) / 255) - c) / 255); + } + + static Color GetSmoothColor(Color c, Color light) + { + return Color.FromArgb(c.A, GetSmoothColor(c.R, light.R), GetSmoothColor(c.G, light.G), GetSmoothColor(c.B, light.B)); + } + } +} diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.brushes.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.brushes.xaml new file mode 100644 index 0000000000..5df899546d --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.brushes.xaml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml new file mode 100644 index 0000000000..5db743fc14 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/aero.normalcolor.xaml @@ -0,0 +1,582 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/classic.brushes.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.brushes.xaml new file mode 100644 index 0000000000..059c9d440e --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.brushes.xaml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml new file mode 100644 index 0000000000..74cd47ba02 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/classic.xaml @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/generic.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/generic.xaml new file mode 100644 index 0000000000..b686aaecd7 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/generic.xaml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/src/Libraries/AvalonDock/AvalonDock/Themes/luna.normalcolor.xaml b/src/Libraries/AvalonDock/AvalonDock/Themes/luna.normalcolor.xaml new file mode 100644 index 0000000000..b51c454551 --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/Themes/luna.normalcolor.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/AvalonDock/AvalonDock/WindowInteropWrapper.cs b/src/Libraries/AvalonDock/AvalonDock/WindowInteropWrapper.cs new file mode 100644 index 0000000000..83bea7c2ca --- /dev/null +++ b/src/Libraries/AvalonDock/AvalonDock/WindowInteropWrapper.cs @@ -0,0 +1,252 @@ +//Copyright (c) 2007-2010, Adolfo Marinucci +//All rights reserved. + +//Redistribution and use in source and binary forms, with or without modification, +//are permitted provided that the following conditions are met: +// +//* Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +//* Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +//* Neither the name of Adolfo Marinucci nor the names of its contributors may +// be used to endorse or promote products derived from this software without +// specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +//WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +//IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +//PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +//HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +//OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +//EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows; +using System.Windows.Interop; +using System.Runtime.InteropServices; +using System.Diagnostics; +using System.ComponentModel; + +namespace AvalonDock +{ + class WindowInteropWrapper : IDisposable + { + public WindowInteropWrapper(Window window) + { + if (window == null) + throw new ArgumentNullException("window"); + + WrappedWindow = window; + if (WrappedWindow.IsLoaded) + AttachWindow(); + else + window.Loaded += (s, e) => AttachWindow(); + window.Unloaded += (s, e) => DetachWindow(); + } + + + public Window WrappedWindow { get; private set; } + + HwndSource _hwndSrc = null; + HwndSourceHook _hwndSrcHook = null; + + void AttachWindow() + { + _hwndSrc = HwndSource.FromDependencyObject(WrappedWindow) as HwndSource; + _hwndSrcHook = new HwndSourceHook(this.HookHandler); + _hwndSrc.AddHook(_hwndSrcHook); + } + + void DetachWindow() + { + if (_hwndSrc != null) + { + _hwndSrc.RemoveHook(_hwndSrcHook); + _hwndSrc = null; + _hwndSrcHook = null; + } + } + + //DependencyObject _attachedObject; + + //public DependencyObject AttachedObject + //{ + // get {return _attachedObject;} + // set + // { + // if (_attachedObject != value) + // { + // if (_attachedObject != null) + // { + // _hwndSrc.RemoveHook(_hwndSrcHook); + // //_hwndSrc.Dispose(); + // _hwndSrc = null; + // _hwndSrcHook = null; + // } + + // _attachedObject = value; + + // if (_attachedObject != null) + // { + // _hwndSrc = HwndSource.FromDependencyObject(value) as HwndSource; + // _hwndSrcHook = new HwndSourceHook(this.HookHandler); + // _hwndSrc.AddHook(_hwndSrcHook); + // } + // } + // } + //} + + #region interop funtions and consts + private const int WM_MOUSEACTIVATE = 0x0021, MA_NOACTIVATE = 0x0003; + const int WM_NCACTIVATE = 0x86; + const int WM_ACTIVATEAPP = 0x1c; + const int WM_ACTIVATE = 6; + const int WM_WINDOWPOSCHANGING = 70; + const int WM_WINDOWPOSCHANGED = 0x47; + const int WM_MOVE = 0x0003; + const int WM_SIZE = 0x0005; + const int WM_NCMOUSEMOVE = 0xa0; + const int WM_NCLBUTTONDOWN = 0xA1; + const int WM_NCLBUTTONUP = 0xA2; + const int WM_NCLBUTTONDBLCLK = 0xA3; + const int WM_NCRBUTTONDOWN = 0xA4; + const int WM_NCRBUTTONUP = 0xA5; + const int HTCAPTION = 2; + const int SC_MOVE = 0xF010; + const int WM_SYSCOMMAND = 0x0112; + + + [DllImport("user32.dll")] + private extern static IntPtr SetActiveWindow(IntPtr handle); + + private const int WA_INACTIVE = 0; + + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); + + [DllImport("user32.dll")] + public static extern bool LockWindowUpdate(IntPtr hWndLock); + + #endregion + + private IntPtr HookHandler( + IntPtr hwnd, + int msg, + IntPtr wParam, + IntPtr lParam, + ref bool handled + ) + { + handled = false; + + switch (msg) + { + case SC_MOVE: + case WM_WINDOWPOSCHANGING: + SafeFireEvent(WindowPosChanging, EventArgs.Empty); + break; + case WM_MOUSEACTIVATE: + { + CancelEventArgs args = new CancelEventArgs(); + SafeFireEvent(WindowActivating, args); + if (args.Cancel) + { + Debug.WriteLine("Cancelled"); + handled = true; + return (IntPtr)MA_NOACTIVATE; + } + } + break; + case WM_ACTIVATE: + { + if (((int)wParam & 0xFFFF) != WA_INACTIVE) + { + CancelEventArgs args = new CancelEventArgs(); + SafeFireEvent(WindowActivating, args); + if (args.Cancel) + { + if (lParam != IntPtr.Zero) + { + SetActiveWindow(lParam); + } + Debug.WriteLine("Cancelled Activation"); + handled = true; + } + } + } + break; + } + + if (!handled) + { + FilterMessageEventArgs e = new FilterMessageEventArgs( + hwnd, + msg, + wParam, + lParam); + + SafeFireEvent(FilterMessage, e); + + handled = e.Handled; + } + + return IntPtr.Zero; + } + + public event EventHandler WindowPosChanging; + + public event EventHandler WindowActivating; + + public event EventHandler FilterMessage; + + void SafeFireEvent(EventHandler eventToFireup, T e) where T : EventArgs + { + if (WrappedWindow != null && + PresentationSource.FromDependencyObject(WrappedWindow) != null) + { + if (eventToFireup != null) + eventToFireup(this, e); + } + } + + + #region IDisposable Members + + public void Dispose() + { + DetachWindow(); + GC.SuppressFinalize(this); + } + + #endregion + } + + + public class FilterMessageEventArgs : EventArgs + { + public FilterMessageEventArgs( + IntPtr hwnd, + int msg, + IntPtr wParam, + IntPtr lParam) + { + Hwnd = hwnd; + WParam = wParam; + LParam = lParam; + Msg = msg; + } + + public IntPtr Hwnd { get; private set; } + public IntPtr WParam { get; private set; } + public IntPtr LParam { get; private set; } + public int Msg { get; private set; } + public bool Handled { get; set; } + + } +} diff --git a/src/Libraries/AvalonDock/License.rtf b/src/Libraries/AvalonDock/License.rtf new file mode 100644 index 0000000000..bbebd45c3e --- /dev/null +++ b/src/Libraries/AvalonDock/License.rtf @@ -0,0 +1,25 @@ +{\rtf1\ansi\deff1\adeflang1025 +{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\fswiss\fprq2\fcharset0 Arial;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\fswiss\fprq0\fcharset0 Arial;}{\f4\fnil\fprq2\fcharset0 MS Mincho;}{\f5\fnil\fprq2\fcharset0 MS Mincho;}{\f6\fnil\fprq2\fcharset0 Tahoma;}{\f7\fnil\fprq0\fcharset0 Tahoma;}{\f8\fswiss\fprq2\fcharset0 Tahoma;}} +{\colortbl;\red0\green0\blue0;\red128\green128\blue128;} +{\stylesheet{\s1\rtlch\afs24\lang255\ltrch\dbch\langfe1040\hich\fs24\lang1040\loch\fs24\lang1040\snext1 Normal;} +{\s2\sb240\sa120\keepn\rtlch\af6\afs28\lang255\ltrch\dbch\af4\langfe1040\hich\fs28\lang1040\loch\fs28\lang1040\sbasedon1\snext3 Heading;} +{\s3\sa120\rtlch\afs24\lang255\ltrch\dbch\langfe1040\hich\fs24\lang1040\loch\fs24\lang1040\sbasedon1\snext3 Body Text;} +{\s4\sa120\rtlch\afs24\lang255\ltrch\dbch\langfe1040\hich\fs24\lang1040\loch\fs24\lang1040\sbasedon3\snext4 List;} +{\s5\sb120\sa120\rtlch\af7\afs24\lang255\ai\ltrch\dbch\langfe1040\hich\fs24\lang1040\i\loch\fs24\lang1040\i\sbasedon1\snext5 caption;} +{\s6\rtlch\af7\afs24\lang255\ltrch\dbch\langfe1040\hich\fs24\lang1040\loch\fs24\lang1040\sbasedon1\snext6 Index;} +{\s7\sb240\sa120\keepn\rtlch\af8\afs28\lang255\ltrch\dbch\af5\langfe1040\hich\fs28\lang1040\loch\fs28\lang1040\sbasedon1\snext3 Heading;} +{\s8\sb120\sa120\rtlch\afs24\lang255\ai\ltrch\dbch\langfe1040\hich\fs24\lang1040\i\loch\fs24\lang1040\i\sbasedon1\snext8 caption;} +{\s9\rtlch\afs24\lang255\ltrch\dbch\langfe1040\hich\fs24\lang1040\loch\fs24\lang1040\sbasedon1\snext9 Index;} +} +{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment StarWriter}{\vern3100}}\deftab720 +{\*\pgdsctbl +{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Standard;}} +{\*\pgdscno0}\paperh15840\paperw12240\margl1800\margr1800\margt1440\margb1440\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc +\pard\plain \ltrpar\s1\sb100\sa100\ql\rtlch\afs20\lang255\ltrch\dbch\langfe1040\hich\fs20\lang1040\loch\fs20\lang1040 {\rtlch \ltrch\loch\f1\fs20\lang1040\i0\b0 Copyright (c) 2007-2010, Adolfo Marinucci\line All rights reserved.\line \line Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\line \line * Redistributions of source code must retain the + above copyright notice, this list of conditions and the following disclaimer.\line \line * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials pro +vided with the distribution.\line \line * Neither the name of Adolfo Marinucci nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\line \line THIS SOFTWARE IS PROVIDED BY THE COPYRI +GHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THE +ORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } +\par \pard\plain \ltrpar\s1\ql\rtlch\af3\afs20\lang255\ltrch\dbch\af3\langfe1040\hich\f3\fs20\lang1040\loch\f3\fs20\lang1040 +\par } \ No newline at end of file diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 106705ef21..6e4c1c8fb2 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -771,14 +771,15 @@ - + {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} AvalonDock + False {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} ICSharpCode.AvalonEdit - True + False {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} @@ -788,6 +789,7 @@ {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory + False {35cef10f-2d4c-45f2-9dd1-161e0fec583c} diff --git a/src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs b/src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs index eec15e6226..6a5270212b 100644 --- a/src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs +++ b/src/Main/Base/Project/Src/Gui/IWorkbenchWindow.cs @@ -41,7 +41,7 @@ namespace ICSharpCode.SharpDevelop.Gui /// /// Gets/Sets the icon of the view content. /// - System.Windows.Media.Imaging.BitmapSource Icon { + System.Windows.Media.ImageSource Icon { get; set; } diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs index 86071c0cc0..dccb478229 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonDockLayout.cs @@ -26,7 +26,6 @@ namespace ICSharpCode.SharpDevelop.Gui { WpfWorkbench workbench; DockingManager dockingManager = new DockingManager(); - DocumentPane documentPane = new DocumentPane(); List workbenchWindows = new List(); internal bool Busy; @@ -40,7 +39,6 @@ namespace ICSharpCode.SharpDevelop.Gui public AvalonDockLayout() { - dockingManager.Content = documentPane; dockingManager.PropertyChanged += dockingManager_PropertyChanged; dockingManager.Loaded += dockingManager_Loaded; } @@ -180,7 +178,7 @@ namespace ICSharpCode.SharpDevelop.Gui { AvalonPadContent pad; if (pads.TryGetValue(padDescriptor, out pad)) { - dockingManager.Show(pad); + pad.Show(dockingManager); } else { LoggingService.Debug("Add pad " + padDescriptor.Class + " at " + padDescriptor.DefaultPosition); @@ -200,13 +198,13 @@ namespace ICSharpCode.SharpDevelop.Gui { AvalonPadContent p; if (pads.TryGetValue(padDescriptor, out p)) - dockingManager.Hide(p); + p.Hide(); } public void UnloadPad(PadDescriptor padDescriptor) { AvalonPadContent p = pads[padDescriptor]; - dockingManager.Hide(p); + p.Hide(); DockablePane pane = p.Parent as DockablePane; if (pane != null) pane.Items.Remove(p); @@ -228,9 +226,9 @@ namespace ICSharpCode.SharpDevelop.Gui workbenchWindows.Add(window); window.ViewContents.Add(content); window.ViewContents.AddRange(content.SecondaryViewContents); - documentPane.Items.Add(window); if (switchToOpenedView) { - dockingManager.Show(window); + window.Show(dockingManager); + window.Activate(); } window.Closed += window_Closed; return window; @@ -278,21 +276,21 @@ namespace ICSharpCode.SharpDevelop.Gui void LoadLayout(string fileName, bool hideAllLostPads) { LoggingService.Info("Loading layout file: " + fileName + ", hideAllLostPads=" + hideAllLostPads); - DockableContent[] oldContents = dockingManager.DockableContents; +// DockableContent[] oldContents = dockingManager.DockableContents; dockingManager.RestoreLayout(fileName); - DockableContent[] newContents = dockingManager.DockableContents; +// DockableContent[] newContents = dockingManager.DockableContents; // Restoring a AvalonDock layout will remove pads that are not // stored in the layout file. // We'll re-add those lost pads. - foreach (DockableContent lostContent in oldContents.Except(newContents)) { - AvalonPadContent padContent = lostContent as AvalonPadContent; - LoggingService.Debug("Re-add lost pad: " + padContent); - if (padContent != null && !hideAllLostPads) { - padContent.ShowInDefaultPosition(); - } else { - dockingManager.Hide(lostContent); - } - } +// foreach (DockableContent lostContent in oldContents.Except(newContents)) { +// AvalonPadContent padContent = lostContent as AvalonPadContent; +// LoggingService.Debug("Re-add lost pad: " + padContent); +// if (padContent != null && !hideAllLostPads) { +// padContent.ShowInDefaultPosition(); +// } else { +// dockingManager.Hide(lostContent); +// } +// } } public void StoreConfiguration() diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs index 17fed5450a..25dec9dddb 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonPadContent.cs @@ -12,7 +12,6 @@ using System.Windows.Input; using System.Windows.Threading; using AvalonDock; -using ICSharpCode.Core; using ICSharpCode.Core.Presentation; namespace ICSharpCode.SharpDevelop.Gui @@ -38,22 +37,20 @@ namespace ICSharpCode.SharpDevelop.Gui this.SetValueToExtension(TitleProperty, new StringParseExtension(descriptor.Title)); placeholder = new TextBlock { Text = this.Title }; this.Content = placeholder; - this.Icon = PresentationResourceService.GetImage(descriptor.Icon); + this.Icon = PresentationResourceService.GetBitmapSource(descriptor.Icon); placeholder.IsVisibleChanged += AvalonPadContent_IsVisibleChanged; } protected override void FocusContent() { + if (!(IsActiveContent && !IsKeyboardFocusWithin)) + return; IInputElement activeChild = CustomFocusManager.GetFocusedChild(this); if (activeChild == null && padInstance != null) { activeChild = padInstance.InitiallyFocusedControl as IInputElement; } - if (activeChild != null) { - LoggingService.Debug("Will move focus to: " + activeChild); - Dispatcher.BeginInvoke(DispatcherPriority.Background, - new Action(delegate { Keyboard.Focus(activeChild); })); - } + AvalonWorkbenchWindow.SetFocus(this, activeChild); } public void ShowInDefaultPosition() @@ -68,9 +65,9 @@ namespace ICSharpCode.SharpDevelop.Gui else style = AnchorStyle.Right; - layout.DockingManager.Show(this, DockableContentState.Docked, style); + this.Show(layout.DockingManager, style); if ((descriptor.DefaultPosition & DefaultPadPositions.Hidden) != 0) - layout.DockingManager.Hide(this); + Hide(); } void AvalonPadContent_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) diff --git a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs index b08a829c16..0d83fe4a68 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs @@ -9,12 +9,10 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; -using System.IO; using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Input; -using System.Windows.Media.Imaging; using System.Windows.Threading; using AvalonDock; @@ -40,19 +38,36 @@ namespace ICSharpCode.SharpDevelop.Gui viewContents = new ViewContentCollection(this); ResourceService.LanguageChanged += OnTabPageTextChanged; - OnTitleNameChanged(this, EventArgs.Empty); } protected override void FocusContent() { + if (!(IsActiveContent && !IsKeyboardFocusWithin)) + return; IInputElement activeChild = CustomFocusManager.GetFocusedChild(this); if (activeChild == null && ActiveViewContent != null) { activeChild = ActiveViewContent.InitiallyFocusedControl as IInputElement; } + AvalonWorkbenchWindow.SetFocus(this, activeChild); + } + + internal static void SetFocus(ManagedContent m, IInputElement activeChild) + { if (activeChild != null) { - LoggingService.Debug("Will move focus to: " + activeChild); - Dispatcher.BeginInvoke(DispatcherPriority.Background, - new Action(delegate { Keyboard.Focus(activeChild); })); + LoggingService.Debug(m.Title + " - Will move focus to: " + activeChild); + m.Dispatcher.BeginInvoke( + DispatcherPriority.Background, + new Action( + delegate { + // ensure that condition for FocusContent() is still fulfilled + // (necessary to avoid focus switching loops when changing layouts) + if (!(m.IsActiveContent && !m.IsKeyboardFocusWithin)) { + LoggingService.Debug(m.Title + " - not moving focus"); + return; + } + LoggingService.Debug(m.Title + " - moving focus to: " + activeChild); + Keyboard.Focus(activeChild); + })); } } @@ -232,7 +247,7 @@ namespace ICSharpCode.SharpDevelop.Gui public void SelectWindow() { - this.SetAsActive(); + Activate();//this.SetAsActive(); } public override void OnApplyTemplate() @@ -312,10 +327,10 @@ namespace ICSharpCode.SharpDevelop.Gui if (this.IsDirty) { newTitle += "*"; - } else if (content.IsReadOnly) { - newTitle += "+"; } + IsLocked = content.IsReadOnly; + if (newTitle != Title) { Title = newTitle; OnTitleChanged(EventArgs.Empty); @@ -424,18 +439,6 @@ namespace ICSharpCode.SharpDevelop.Gui public event EventHandler TitleChanged; - BitmapSource icon; - - BitmapSource IWorkbenchWindow.Icon { - get { return icon; } - set { - if (icon != value) { - icon = value; - base.Icon = new Image { Source = value }; - } - } - } - public override string ToString() { return "[AvalonWorkbenchWindow: " + this.Title + "]"; From 959352e7e2f59254400360efe50d95ce86fe4302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Mon, 31 May 2010 17:13:42 +0000 Subject: [PATCH 35/79] Added option to turn on/off symbol highlighting to Options/TextEditor/Markers and Rulers. Deleted unused Debugger visualize files. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5880 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Debugger.AddIn/Debugger.AddIn.csproj | 10 - .../Commands/VisualizerDescriptors.cs | 2 +- .../Graph/Layout/Tree/BoxDotFormatter.cs | 45 ----- .../Graph/Layout/Tree/DotFormatter.cs | 183 ------------------ .../Graph/Layout/Tree/IdGenerator.cs | 28 --- .../Graph/Layout/Tree/NeatoDoubleFormatter.cs | 40 ---- .../Graph/Layout/Tree/NeatoEdgeRouter.cs | 48 ----- .../Layout/Tree/NeatoPositionTransform.cs | 72 ------- .../Graph/Layout/Tree/NeatoProcess.cs | 104 ---------- .../Graph/Layout/Tree/RecordDotFormatter.cs | 71 ------- .../Visualizers/Graph/NodeControlCache.cs | 2 +- .../Graph/ObjectGraph/ObjectGraphProperty.cs | 2 +- .../Graph/ObjectGraphControl.xaml.cs | 2 +- .../Graph/TreeModel/NestedNodeType.cs | 23 --- .../EnumerableValuesProvider.cs | 4 +- .../PresentationBindings/ScrollUtils.cs | 16 -- .../Src/CaretReferencesRenderer.cs | 24 ++- .../AvalonEdit.AddIn/Src/CodeEditorView.cs | 2 + .../Src/Options/CodeEditorOptions.cs | 13 ++ .../Src/Options/TextViewOptions.xaml | 3 + 20 files changed, 46 insertions(+), 648 deletions(-) delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/BoxDotFormatter.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/DotFormatter.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/IdGenerator.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoDoubleFormatter.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoEdgeRouter.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoPositionTransform.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoProcess.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/TreeModel/NestedNodeType.cs delete mode 100644 src/AddIns/Debugger/Debugger.AddIn/Visualizers/PresentationBindings/ScrollUtils.cs diff --git a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj index 967cd4788b..8c8d10176a 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj +++ b/src/AddIns/Debugger/Debugger.AddIn/Debugger.AddIn.csproj @@ -183,14 +183,12 @@ - - @@ -248,15 +246,7 @@ - - - - - - - - diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/VisualizerDescriptors.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/VisualizerDescriptors.cs index 7893dfd990..ffbfefaf63 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/VisualizerDescriptors.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Commands/VisualizerDescriptors.cs @@ -31,7 +31,7 @@ namespace Debugger.AddIn.Visualizers public static ReadOnlyCollection GetAllDescriptors() { if (allDescriptors == null) { - allDescriptors = new List(CreateAllDescriptors()).AsReadOnly(); + allDescriptors = CreateAllDescriptors().ToList().AsReadOnly(); } return allDescriptors; } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/BoxDotFormatter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/BoxDotFormatter.cs deleted file mode 100644 index f37562f41b..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/BoxDotFormatter.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Text; -using System.Windows; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// that treats node as a atomic "box". Edges go from box to box. - /// - public class BoxDotFormatter : DotFormatter - { - public BoxDotFormatter(PositionedGraph posGraph) : base(posGraph) - { - } - - protected override void appendPosNode(PositionedGraphNode node, StringBuilder builder) - { - string nodeName = genId.GetNextId().ToString(); - nodeNames[node] = nodeName; - - Rect neatoInput = transform.NodeToNeatoInput(node); - - string dotFormatNode = - string.Format(this.neatoDoubleFormatter, - "{0} [pos=\"{1},{2}!\" width=\"{3}\" height=\"{4}\"];", - nodeName, neatoInput.Location.X, neatoInput.Location.Y, neatoInput.Width, neatoInput.Height); - builder.AppendLine(dotFormatNode); - } - - protected override void appendPosEdge(PositionedEdge edge, StringBuilder builder) - { - string sourceNodeName = nodeNames[edge.Source.ContainingNode]; - string targetNodeName = nodeNames[edge.Target]; - - builder.AppendLine(string.Format("{0} -> {1}", sourceNodeName, targetNodeName)); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/DotFormatter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/DotFormatter.cs deleted file mode 100644 index 7c22473b17..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/DotFormatter.cs +++ /dev/null @@ -1,183 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; -using System.Linq; -using System.Windows; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// Converts - /// Gets Graphviz's dot format string for wrapped positioned graph. - /// - public string OutputGraphInDotFormat() - { - StringBuilder dotStringBuilder = new StringBuilder(getGraphHeader()); - - foreach (PositionedGraphNode posNode in this.posGraph.Nodes) - { - appendPosNode(posNode, dotStringBuilder); - } - foreach (PositionedEdge posEdge in this.posGraph.Edges) - { - appendPosEdge(posEdge, dotStringBuilder); - } - - dotStringBuilder.AppendLine(getGraphFooter()); - return dotStringBuilder.ToString(); - } - - private bool validateSplinePoints(PositionedEdge edge) - { - // must have correct number of points: one start point and 3 points per bezier segment - return ((edge.SplinePoints.Count - 1) % 3) == 0; - } - - /// - /// Parses edge positions (from Graphviz's plain format) and sets these positions to underlying positioned graph. - /// - /// Graph with positions in Graphviz's plain format - /// with edge positions filled. - public PositionedGraph ParseEdgePositions(string dotGraphString) - { - using (StringReader reader = new System.IO.StringReader(dotGraphString)) - { - skipAfterPattern(reader, "node " + nodeNames[posGraph.Nodes.First()] + " "); - Point neatoFirstNodePos = readPoint(reader); - PositionedGraphNode firstNode = posGraph.Nodes.First(); - Point firstNodePosOur = transform.AsNeato(firstNode.Center); - // determine how Neato shifted the nodes - transform.NeatoShiftX = neatoFirstNodePos.X - firstNodePosOur.X; - transform.NeatoShiftY = neatoFirstNodePos.Y - firstNodePosOur.Y; - - // assume that edges on output are in the same order as posGraph.Edges (!) - foreach (PositionedEdge posEdge in posGraph.Edges) - { - skipAfterPattern(reader, "edge "); - - readWord(reader); // source node name - readWord(reader); // target node name - - int splinePointCount = readInt(reader); - for (int i = 0; i < splinePointCount; i++) - { - Point edgePoint = readPoint(reader); - edgePoint = transform.FromNeatoOutput(edgePoint); - posEdge.SplinePoints.Add(edgePoint); - } - - bool edgeOk = validateSplinePoints(posEdge); - if (!edgeOk) - throw new DebuggerVisualizerException("Parsed edge invalid"); - } - } - // return original graph with filled edge positions - return this.posGraph; - } - - private Point readPoint(TextReader reader) - { - double x = readDouble(reader); - double y = readDouble(reader); - - return new Point(x, y); - } - - private double readDouble(TextReader reader) - { - return double.Parse(readWord(reader), this.neatoDoubleFormatter.DoubleCulture); - } - - private int readInt(TextReader reader) - { - return int.Parse(readWord(reader)); - } - - private string readWord(TextReader reader) - { - StringBuilder word = new StringBuilder(); - int ch = ' '; - while ((ch = reader.Read()) != ' ') - { - if (ch == -1 || ch == '\n' || ch == '\t') - break; - - word.Append((char)ch); - } - return word.ToString(); - } - - private bool skipAfterPattern(StringReader reader, string pattern) - { - int ch = -1; - int pIndex = 0; - int pTarget = pattern.Length; - while ((ch = reader.Read()) != -1) - { - if (ch == pattern[pIndex]) - { - pIndex++; - if (pIndex == pTarget) - return true; - } - else - { - pIndex = 0; - } - } - return false; - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/IdGenerator.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/IdGenerator.cs deleted file mode 100644 index 77eb424c28..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/IdGenerator.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// Generates sequential ids, usefull for node and edge ids. - /// - public class IdGenerator - { - int currentId = 0; - - public IdGenerator() - { - } - - public int GetNextId() - { - return currentId++; - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoDoubleFormatter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoDoubleFormatter.cs deleted file mode 100644 index 01a7064ce2..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoDoubleFormatter.cs +++ /dev/null @@ -1,40 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Globalization; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// When used as IFormatProvider in string.Format, formats doubles to be suitable for Neato. - /// - public class NeatoDoubleFormatter : IFormatProvider, ICustomFormatter - { - private CultureInfo doubleCulture = CultureInfo.GetCultureInfo("en-US"); - /// - /// CultureInfo used for formatting and parsing doubles (en-US). - /// - public CultureInfo DoubleCulture - { - get { return this.doubleCulture; } - } - - public object GetFormat(Type formatType) - { - if (formatType == typeof(ICustomFormatter)) - return this; - else - return null; - } - - public string Format(string format, object arg, IFormatProvider formatProvider) - { - return string.Format(doubleCulture, "{0:0.000}", arg); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoEdgeRouter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoEdgeRouter.cs deleted file mode 100644 index 7482282a08..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoEdgeRouter.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; -using System.Linq; -using System.Windows; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// Given with positions of nodes, calculates positions of edges. - /// - public class NeatoEdgeRouter - { - public NeatoEdgeRouter() - { - } - - /// - /// Given with node positions, calculates edge positions. - /// - /// , the nodes must have positions filled. - /// with preserved node positions and calculated edge positions. - public PositionedGraph CalculateEdges(PositionedGraph graphWithNodesPositioned) - { - DotFormatter dotFormatter = new BoxDotFormatter(graphWithNodesPositioned); - - // convert PosGraph to .dot string - string dotGraphString = dotFormatter.OutputGraphInDotFormat(); - - // pass to neato.exe and wait for output - string dotGraphStringWithPositions = NeatoProcess.Start().CalculatePositions(dotGraphString); - - // parse edge positions from neato's plain output format - PositionedGraph result = dotFormatter.ParseEdgePositions(dotGraphStringWithPositions); - - return result; - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoPositionTransform.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoPositionTransform.cs deleted file mode 100644 index 2bf6fd1efd..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoPositionTransform.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Windows; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// Transforms positions to and from Neato. - /// - public class NeatoPositionTransform - { - private Rect graphBoundingRect; - - // So that Neato works with smaller numbers. Always > 1 - double ourInputScale = 40; - // Neato itself scales input by this constant. Always > 1, 1 for plain output, 72 for .dot output - double neatoOutputScale = 1; - - public NeatoPositionTransform(Rect graphBoundingRectangle) - { - graphBoundingRect = graphBoundingRectangle; - } - - /// - /// X shift, in Neato coords. - /// - public double NeatoShiftX { get; set; } - /// - /// Y shift, in Neato coords. - /// - public double NeatoShiftY { get; set; } - - public Point ToNeatoInput(Point ourPoint) - { - // invert Y axis, as Neato expects this - return new Point(ourPoint.X / ourInputScale, (graphBoundingRect.Bottom - ourPoint.Y) / ourInputScale); - } - - public System.Windows.Point FromNeatoOutput(Point neatoPoint) - { - // Neato multiplies coords by 72 and adds arbitrary shift (which has to be parsed) - double ourX = (neatoPoint.X - NeatoShiftX) / neatoOutputScale * ourInputScale; - double ourYInverted = (neatoPoint.Y - NeatoShiftY) / neatoOutputScale * ourInputScale; - // invert back - our Y axis grows down - return new Point(ourX, graphBoundingRect.Bottom - ourYInverted); - } - - /// - /// Transform points as Neato would transform it if Neato used no shift - /// - /// - /// - public System.Windows.Point AsNeato(Point ourPoint) - { - - return new Point(ourPoint.X * neatoOutputScale / ourInputScale, (graphBoundingRect.Bottom - ourPoint.Y) * neatoOutputScale / ourInputScale); - } - - public Rect NodeToNeatoInput(PositionedGraphNode node) - { - // don't transform size - return new Rect(ToNeatoInput(node.Center), - new Size(node.Width / ourInputScale, node.Height / ourInputScale)); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoProcess.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoProcess.cs deleted file mode 100644 index d1d750b570..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/NeatoProcess.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.IO; -using System.Text; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// Encapsulates Neato.exe. - /// - public class NeatoProcess - { - private System.Diagnostics.Process neatoProcess; - - /// - /// Starts neato.exe - /// - public static NeatoProcess Start() - { - System.Diagnostics.Process neatoProcess = new System.Diagnostics.Process(); - neatoProcess.StartInfo.FileName = getNeatoExePath(); - neatoProcess.StartInfo.RedirectStandardInput = true; - neatoProcess.StartInfo.RedirectStandardError = true; - neatoProcess.StartInfo.RedirectStandardOutput = true; - neatoProcess.StartInfo.UseShellExecute = false; - neatoProcess.StartInfo.CreateNoWindow = true; - // tell neato to use splines instead of straigt lines - // output type = Graphviz's plain format - neatoProcess.StartInfo.Arguments = " -Gsplines=true -Tplain"; - //p.EnableRaisingEvents = true; - neatoProcess.Exited += delegate { - neatoProcess.Dispose(); - }; - /*p.OutputDataReceived += delegate(object sender, DataReceivedEventArgs e) { - }; - p.ErrorDataReceived += delegate(object sender, DataReceivedEventArgs e) { - };*/ - - neatoProcess.Start(); - - return new NeatoProcess(neatoProcess); - } - - /// Creates new NeatoProcess. - /// Underlying neato.exe process - private NeatoProcess(System.Diagnostics.Process neatoProcess) - { - this.neatoProcess = neatoProcess; - } - - /// Gets directory where Debugger.AddIn.dll resides - private static string getCurrentAssemblyPath() - { - return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); - } - - private static string getNeatoExePath() - { - return Path.Combine(getCurrentAssemblyPath(), "neato.exe"); - } - - /// - /// Passes given graph to neato and reads output. - /// - /// Graph in Graphviz dot format. - /// Same graph in Graphviz plain format with position information added. - public string CalculatePositions(string dotGraph) - { - // write the input to neato.exe to a file for testing purposes - /*using (var writer = new StreamWriter(Path.Combine(getCurrentAssemblyPath(), "logIn.gv"))) - { - writer.Write(dotGraph); - }*/ - - neatoProcess.StandardInput.Write(dotGraph); - neatoProcess.StandardInput.Flush(); - neatoProcess.StandardInput.Close(); - - StringBuilder output = new StringBuilder(); - while(true) - { - string line = neatoProcess.StandardOutput.ReadLine(); - if (line == null) - { - // happens if neato.exe is killed - throw new DebuggerVisualizerException("Problem getting layout information from neato.exe"); - } - if (line == "stop") - { - break; - } - output.AppendLine(line); - } - - return output.ToString(); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs deleted file mode 100644 index 0398743608..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/Layout/Tree/RecordDotFormatter.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows; - -namespace Debugger.AddIn.Visualizers.Graph.Layout -{ - /// - /// that treats nodes as records of properties. - /// Edges start at property, end at node. - /// - public class RecordDotFormatter : DotFormatter - { - private Dictionary propertyIds = new Dictionary(); - - public RecordDotFormatter(PositionedGraph posGraph) : base(posGraph) - { - } - - protected override string getGraphHeader() - { - return "digraph G { rankdir=LR; node [shape = record];"; - } - - protected override void appendPosNode(PositionedGraphNode node, StringBuilder builder) - { - string nodeName = genId.GetNextId().ToString(); - nodeNames[node] = nodeName; - - Rect neatoInput = transform.NodeToNeatoInput(node); - - StringBuilder recordLabel = new StringBuilder(); - bool first = true; - foreach (var prop in node.Properties) - { - string propertyId = "f" + genId.GetNextId().ToString(); - propertyIds[prop] = propertyId; - if (!first) - { - recordLabel.Append("|"); - } - recordLabel.Append(string.Format("<{0}> l", propertyId)); - first = false; - } - - string dotFormatNode = - string.Format(this.neatoDoubleFormatter, - "{0} [pos=\"{1},{2}!\" width=\"{3}\" height=\"{4}\" label=\"{5}\"];", - nodeName, - neatoInput.Location.X, neatoInput.Location.Y, neatoInput.Width, neatoInput.Height, - recordLabel.ToString()); - builder.AppendLine(dotFormatNode); - } - - protected override void appendPosEdge(PositionedEdge edge, StringBuilder builder) - { - string sourceNodeName = nodeNames[edge.Source.ContainingNode]; - string sourcePropertyName = propertyIds[edge.Source]; - string targetNodeName = nodeNames[edge.Target]; - - builder.AppendLine(string.Format("{0}:{1} -> {2}", sourceNodeName, sourcePropertyName, targetNodeName)); - } - } -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/NodeControlCache.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/NodeControlCache.cs index 0734d71ed0..9e4ccffa5b 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/NodeControlCache.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/NodeControlCache.cs @@ -13,7 +13,7 @@ using System.Linq; namespace Debugger.AddIn.Visualizers.Graph { /// - /// Description of NodeControlCache. + /// Store to reuse s so that they don't have to be created for every drawing. /// public class NodeControlCache { diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs index 26bcc7d56d..14b05bb309 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraph/ObjectGraphProperty.cs @@ -64,7 +64,7 @@ namespace Debugger.AddIn.Visualizers.Graph this.IsAtomic = debuggerVal.Type.IsAtomic(); this.IsNull = debuggerVal.IsNull; - // null and complex properties evaluate to empty string + // null and complex properties will show empty string this.Value = debuggerVal.IsNull || (!this.IsAtomic) ? string.Empty : debuggerVal.InvokeToString(); this.evaluateCalled = true; } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs index c27bbf2709..3bb8dcb65c 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/ObjectGraphControl.xaml.cs @@ -109,7 +109,7 @@ namespace Debugger.AddIn.Visualizers.Graph this.graphDrawer.ClearCanvas(); return; } - if (debuggerService.IsProcessRunning) // TODO "Process not paused" exception still occurs + if (debuggerService.IsProcessRunning) // "Process not paused" exception still occurs { showErrorMessage("Cannot inspect when the process is running."); return; diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/TreeModel/NestedNodeType.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/TreeModel/NestedNodeType.cs deleted file mode 100644 index 1b40ea5eca..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Graph/TreeModel/NestedNodeType.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; - -namespace Debugger.AddIn.Visualizers.Graph -{ - /// - /// Description of NestedNodeType. - /// - /*public enum NestedNodeType - { - ThisNode, - BaseClassNode, - NonPublicInstanceMembersNode, - StaticMembersNode, - NonPublicStaticMembersNode - }*/ -} diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs index a9ba69de0a..74dfae8fba 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/GridVisualizer/ValueProviders/EnumerableValuesProvider.cs @@ -21,7 +21,7 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer /// /// Provides s for debugee objects implementing IEnumerable. /// - public class EnumerableValuesProvider : GridValuesProvider + /*public class EnumerableValuesProvider : GridValuesProvider { public EnumerableValuesProvider(Expression targetObject, DebugType iEnumerableType, DebugType itemType) :base(targetObject, iEnumerableType, itemType) @@ -50,5 +50,5 @@ namespace Debugger.AddIn.Visualizers.GridVisualizer yield return ObjectValue.Create(currentValue, index++, this.memberFromNameMap); } } - } + }*/ } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/PresentationBindings/ScrollUtils.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/PresentationBindings/ScrollUtils.cs deleted file mode 100644 index 4a3f8cdfbd..0000000000 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/PresentationBindings/ScrollUtils.cs +++ /dev/null @@ -1,16 +0,0 @@ -// -// -// -// -// $Revision$ -// - -using System; -using System.Collections.Generic; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace Debugger.AddIn.Visualizers -{ -} diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs index a9906ae182..e256860267 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CaretReferencesRenderer.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Windows.Threading; +using ICSharpCode.AvalonEdit.AddIn.Options; using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Dom; @@ -26,6 +27,9 @@ namespace ICSharpCode.AvalonEdit.AddIn /// DispatcherTimer delayTimer; const int delayMilliseconds = 800; + /// + /// Delays the Resolve check so that it does not get called too often when user holds an arrow. + /// DispatcherTimer delayMoveTimer; const int delayMoveMilliseconds = 100; @@ -50,11 +54,18 @@ namespace ICSharpCode.AvalonEdit.AddIn this.delayMoveTimer.Tick += TimerMoveTick; this.editorView.TextArea.Caret.PositionChanged += CaretPositionChanged; } + + public void ClearHighlight() + { + this.highlightRenderer.ClearHighlight(); + } void TimerTick(object sender, EventArgs e) { + if (!CodeEditorOptions.Instance.HighlightSymbol) + return; + this.delayTimer.Stop(); - LoggingService.Info("tick"); // almost the same as DebuggerService.HandleToolTipRequest var referencesToBeHighlighted = GetReferencesInCurrentFile(this.lastResolveResult); this.highlightRenderer.SetHighlight(referencesToBeHighlighted); @@ -62,7 +73,9 @@ namespace ICSharpCode.AvalonEdit.AddIn void TimerMoveTick(object sender, EventArgs e) { - LoggingService.Debug("move"); + if (!CodeEditorOptions.Instance.HighlightSymbol) + return; + this.delayMoveTimer.Stop(); this.delayTimer.Stop(); var resolveResult = GetExpressionUnderCaret(); @@ -120,6 +133,13 @@ namespace ICSharpCode.AvalonEdit.AddIn /// bool SameResolveResult(ResolveResult resolveResult, ResolveResult resolveResult2) { + /*if (resolveResult == null && resolveResult2 == null) + return true; + if (resolveResult == null && resolveResult2 != null) + return false; + if (resolveResult != null && resolveResult2 == null) + return false;*/ + // TODO determine if 2 ResolveResults refer to the same symbol return false; } } diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs index 671f4ee23a..e02b91f5cd 100755 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditorView.cs @@ -72,6 +72,8 @@ namespace ICSharpCode.AvalonEdit.AddIn HighlightBrackets(null, e); else if (e.PropertyName == "EnableFolding") UpdateParseInformation(); + else if (e.PropertyName == "HighlightSymbol") + this.caretReferencesRenderer.ClearHighlight(); } #region CaretPositionChanged - Bracket Highlighting diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs index d96485e379..c046ac1b94 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/CodeEditorOptions.cs @@ -135,6 +135,19 @@ namespace ICSharpCode.AvalonEdit.AddIn.Options } } + bool highlightSymbol = true; + + [DefaultValue(true)] + public bool HighlightSymbol { + get { return highlightSymbol; } + set { + if (highlightSymbol != value) { + highlightSymbol = value; + OnPropertyChanged("HighlightSymbol"); + } + } + } + bool useSmartIndentation = true; [DefaultValue(true)] diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml index 556b22ccec..29c7198180 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/Options/TextViewOptions.xaml @@ -21,6 +21,9 @@ + From 10c5aadd928143ea8025122d3df1930639d55ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Mon, 31 May 2010 18:05:47 +0000 Subject: [PATCH 36/79] CodeCompletion inserts Attributes without the "Attribute" suffix (correctly - only in attribute contexts, that is [*expr*] class *expr*). git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5881 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../CodeCompletionItemProvider.cs | 21 ++++++++++++- .../Base/Project/Src/Util/ExtensionMethods.cs | 31 ++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs b/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs index 45aeeaadb5..886fa50278 100644 --- a/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs +++ b/src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs @@ -11,8 +11,8 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.Xml; - using ICSharpCode.Core; +using ICSharpCode.NRefactory; using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Project.Converter; using ICSharpCode.SharpDevelop.Refactoring; @@ -286,6 +286,11 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion addUsing = true; } + // Special case for Attributes + if (insertedText.EndsWith("Attribute") && IsInAttributeContext(editor, context.StartOffset)) { + insertedText = insertedText.RemoveEnd("Attribute"); + } + // Insert the text context.Editor.Document.Replace(context.StartOffset, context.Length, insertedText); context.EndOffset = context.StartOffset + insertedText.Length; @@ -302,6 +307,20 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion } } + /// + /// Returns true if the offset where we are inserting is in Attibute context, that is [*expr* + /// + bool IsInAttributeContext(ITextEditor editor, int offset) + { + if (editor == null || editor.Document == null) + return false; + var expressionFinder = ParserService.GetExpressionFinder(editor.FileName); + if (expressionFinder == null) + return false; + var resolvedExpression = expressionFinder.FindFullExpression(editor.Document.Text, offset); + return resolvedExpression.Context == ExpressionContext.Attribute; + } + #region Description string description; bool descriptionCreated; diff --git a/src/Main/Base/Project/Src/Util/ExtensionMethods.cs b/src/Main/Base/Project/Src/Util/ExtensionMethods.cs index 0eb1a3d3ee..876ac81930 100644 --- a/src/Main/Base/Project/Src/Util/ExtensionMethods.cs +++ b/src/Main/Base/Project/Src/Util/ExtensionMethods.cs @@ -17,7 +17,6 @@ using System.Windows.Controls; using System.Windows.Media; using System.Windows.Documents; using System.Windows.Forms; - using ICSharpCode.Core.Presentation; using ICSharpCode.SharpDevelop.Gui; using WinForms = System.Windows.Forms; @@ -319,6 +318,36 @@ namespace ICSharpCode.SharpDevelop } #endregion + /// + /// Removes from the start of this string. + /// Throws ArgumentException if this string does not start with . + /// + public static string RemoveStart(this string s, string stringToRemove) + { + if (s == null) + return null; + if (string.IsNullOrEmpty(stringToRemove)) + return s; + if (!s.StartsWith(stringToRemove)) + throw new ArgumentException(string.Format("{0} does not start with {1}", s, stringToRemove)); + return s.Substring(stringToRemove.Length); + } + + /// + /// Removes from the end of this string. + /// Throws ArgumentException if this string does not end with . + /// + public static string RemoveEnd(this string s, string stringToRemove) + { + if (s == null) + return null; + if (string.IsNullOrEmpty(stringToRemove)) + return s; + if (!s.EndsWith(stringToRemove)) + throw new ArgumentException(string.Format("{0} does not end with {1}", s, stringToRemove)); + return s.Substring(0, s.Length - stringToRemove.Length); + } + public static string Replace(this string original, string pattern, string replacement, StringComparison comparisonType) { if (original == null) From a5fa3e193bf5c61d98b49eded9217babe7751635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Mon, 31 May 2010 18:16:01 +0000 Subject: [PATCH 37/79] CodeCompletion shows only imported types. Shows all available types on Ctrl+Space press. After using it for a few days, I found that always showing all types can be confusing, like always showing all extension methods. Now both types and extension methods need Ctrl+Space. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5882 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../NRefactoryResolver/NRefactoryResolver.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs index 3bc4e0318f..5f5fdf19b9 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs @@ -1147,21 +1147,21 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver } result.Add(new KeywordEntry("Global")); result.Add(new KeywordEntry("New")); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else { if (context == ExpressionContext.TypeDeclaration) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.TypeLevel); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.InterfaceDeclaration) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.InterfaceLevel); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.MethodBody) { result.Add(new KeywordEntry("var")); AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.StatementStart); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.Global) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.GlobalLevel); } else if (context == ExpressionContext.InterfacePropertyDeclaration) { @@ -1178,11 +1178,11 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver result.Add(new KeywordEntry("struct")); result.Add(new KeywordEntry("class")); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.InheritableType) { result.Add(new KeywordEntry("where")); // the inheritance list can be followed by constraints AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.PropertyDeclaration) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.InPropertyDeclaration); } else if (context == ExpressionContext.EventDeclaration) { @@ -1199,17 +1199,17 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver } } AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else if (context == ExpressionContext.ObjectInitializer) { bool isCollectionInitializer; result.AddRange(ObjectInitializerCtrlSpace(fileContent, out isCollectionInitializer)); if (isCollectionInitializer) { AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.ExpressionStart); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } } else if (context == ExpressionContext.Attribute) { - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); result.Add(new KeywordEntry("assembly")); result.Add(new KeywordEntry("module")); result.Add(new KeywordEntry("field")); @@ -1223,11 +1223,11 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.ExpressionStart); AddCSharpKeywords(result, NR.Parser.CSharp.Tokens.ExpressionContent); AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } else { // e.g. some ExpressionContext.TypeDerivingFrom() AddCSharpPrimitiveTypes(result); - CtrlSpaceInternal(result, fileContent); + CtrlSpaceInternal(result, fileContent, showEntriesFromAllNamespaces); } } return result; @@ -1241,7 +1241,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver } } - void CtrlSpaceInternal(List result, string fileContent, bool showEntriesFromAllNamespaces = true) + void CtrlSpaceInternal(List result, string fileContent, bool showEntriesFromAllNamespaces) { lookupTableVisitor = new LookupTableVisitor(language); From dd5980e682c0a25fd0cc4854a29fa0a17e2e3f00 Mon Sep 17 00:00:00 2001 From: Mathias Simmack Date: Tue, 1 Jun 2010 12:25:19 +0000 Subject: [PATCH 38/79] fixed exception when opening the options dialog with no catalogs installed git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5885 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs index 96f4e88405..d566ac3869 100644 --- a/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs +++ b/src/AddIns/Misc/HelpViewer/Source/Help3OptionsPanel.xaml.cs @@ -24,13 +24,16 @@ namespace MSHelpSystem { HelpLibraryAgent.Start(); DataContext = Help3Service.Items; - groupBox1.Header = string.Format("{0} ({1})", - StringParser.Parse("${res:AddIns.HelpViewer.InstalledHelpCatalogsLabel}"), - Help3Service.Items.Count); - help3Catalogs.SelectedValue = Help3Service.ActiveCatalog.ShortName; + if (Help3Service.Items.Count > 0) + groupBox1.Header = string.Format("{0} ({1})", StringParser.Parse("${res:AddIns.HelpViewer.InstalledHelpCatalogsLabel}"), Help3Service.Items.Count); + if (Help3Service.ActiveCatalog != null) + help3Catalogs.SelectedValue = Help3Service.ActiveCatalog.ShortName; help3Catalogs.IsEnabled = (Help3Service.Items.Count > 1 && Help3Service.Config.OfflineMode); onlineMode.IsChecked = !Help3Service.Config.OfflineMode; externalHelp.IsChecked = Help3Service.Config.ExternalHelp; + onlineMode.IsEnabled = Help3Environment.IsHelp3ProtocolRegistered; + offlineMode.IsEnabled = Help3Environment.IsHelp3ProtocolRegistered; + externalHelp.IsEnabled = Help3Environment.IsHelp3ProtocolRegistered; } void Help3CatalogsSelectionChanged(object sender, SelectionChangedEventArgs e) From 4ba935e0a1e2eb8e5f113a5c65a396f7c512c2d1 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 1 Jun 2010 13:19:24 +0000 Subject: [PATCH 39/79] Remove unused references to ICSharpCode.TextEditor. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5886 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Analysis/SourceAnalysis/SourceAnalysis.csproj | 8 ++------ src/AddIns/Analysis/UnitTesting/UnitTesting.csproj | 5 ----- .../Boo/BooBinding/Project/BooBinding.csproj | 8 ++------ .../Project/Src/CodeCompletion/BooAdvancedHighlighter.cs | 2 -- .../BooBinding/Project/Src/Designer/BooDesignerLoader.cs | 1 - .../CSharpBinding/Project/CSharpBinding.csproj | 5 ----- .../BackendBindings/FSharpBinding/FSharpBinding.csproj | 8 ++------ .../VBNetBinding/Project/VBNetBinding.csproj | 8 ++------ .../ClassDiagramAddin/ClassDiagramAddin.csproj | 8 ++------ .../FormsDesigner/Project/FormsDesigner.csproj | 9 +++++---- .../Project/Src/DesignerSourceCodeStorage.cs | 6 ++++-- .../ReflectorAddIn/Project/ReflectorAddIn.csproj | 8 ++------ .../ICSharpCode.AvalonEdit/Document/TextDocument.cs | 8 -------- .../AvalonEdit/ICSharpCode.AvalonEdit/Utils/Rope.cs | 5 +++-- 14 files changed, 24 insertions(+), 65 deletions(-) diff --git a/src/AddIns/Analysis/SourceAnalysis/SourceAnalysis.csproj b/src/AddIns/Analysis/SourceAnalysis/SourceAnalysis.csproj index 44a6363fed..d01fdcb70a 100644 --- a/src/AddIns/Analysis/SourceAnalysis/SourceAnalysis.csproj +++ b/src/AddIns/Analysis/SourceAnalysis/SourceAnalysis.csproj @@ -1,4 +1,5 @@ - + + Library MattEverson.SourceAnalysis @@ -72,11 +73,6 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory diff --git a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj index 87c95e47a7..3543d1d00f 100644 --- a/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj +++ b/src/AddIns/Analysis/UnitTesting/UnitTesting.csproj @@ -167,11 +167,6 @@ ICSharpCode.Core False - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj index 7e73ccbc05..cec7174312 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj @@ -1,4 +1,5 @@ - + + Library Grunwald.BooBinding @@ -131,11 +132,6 @@ NRefactory False - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} NRefactoryToBooConverter diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs index 2190e2a846..f151030e52 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs @@ -14,8 +14,6 @@ using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Gui; -using ICSharpCode.TextEditor; -using ICSharpCode.TextEditor.Document; namespace Grunwald.BooBinding.CodeCompletion { diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs index 6ca5b050e4..749ac8b589 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs @@ -18,7 +18,6 @@ using ICSharpCode.Core; using ICSharpCode.FormsDesigner; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Dom; -using ICSharpCode.TextEditor; namespace Grunwald.BooBinding.Designer { diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj index 5a01c5d831..4a7dfbc62d 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj @@ -87,11 +87,6 @@ ICSharpCode.AvalonEdit False - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory diff --git a/src/AddIns/BackendBindings/FSharpBinding/FSharpBinding.csproj b/src/AddIns/BackendBindings/FSharpBinding/FSharpBinding.csproj index ce5a5dc2ed..bbac3c6b46 100644 --- a/src/AddIns/BackendBindings/FSharpBinding/FSharpBinding.csproj +++ b/src/AddIns/BackendBindings/FSharpBinding/FSharpBinding.csproj @@ -1,4 +1,5 @@ - + + {E954F3CB-A446-492F-A664-2B376EBC86E8} Debug @@ -75,11 +76,6 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {2748AD25-9C63-4E12-877B-4DCE96FBED54} ICSharpCode.SharpDevelop diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj index 19562bfee0..f9d596daf2 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.csproj @@ -1,4 +1,5 @@ - + + Debug AnyCPU @@ -77,11 +78,6 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory diff --git a/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.csproj b/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.csproj index b3b73f9855..eff88e194f 100644 --- a/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.csproj +++ b/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.csproj @@ -1,4 +1,5 @@ - + + Library ClassDiagramAddin @@ -68,11 +69,6 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} NRefactory diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj b/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj index 5439871d57..5ea4b46800 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj @@ -1,4 +1,5 @@ - + + Debug AnyCPU @@ -130,9 +131,9 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor + + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} + ICSharpCode.AvalonEdit False diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerSourceCodeStorage.cs b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerSourceCodeStorage.cs index edcba63c5d..1b763b55e1 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerSourceCodeStorage.cs +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerSourceCodeStorage.cs @@ -199,8 +199,10 @@ namespace ICSharpCode.FormsDesigner { if (this.doNotLoad) return; - this.encoding = ParserService.DefaultFileEncoding; - this.Document.Text = ICSharpCode.TextEditor.Util.FileReader.ReadFileContent(stream, ref this.encoding); + using (StreamReader r = ICSharpCode.AvalonEdit.Utils.FileReader.OpenStream(stream, ParserService.DefaultFileEncoding)) { + this.Document.Text = r.ReadToEnd(); + this.encoding = r.CurrentEncoding; + } } public void SaveTo(Stream stream) diff --git a/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.csproj b/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.csproj index 1f03aec459..10cdb66070 100644 --- a/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.csproj +++ b/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.csproj @@ -1,4 +1,5 @@ - + + {8AA421C8-D7AF-4957-9F43-5135328ACB24} Debug @@ -66,11 +67,6 @@ - - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - False - {2748AD25-9C63-4E12-877B-4DCE96FBED54} ICSharpCode.SharpDevelop diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs index 01136854d5..1f63816335 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Document/TextDocument.cs @@ -142,14 +142,6 @@ namespace ICSharpCode.AvalonEdit.Document return rope[offset]; } -// /// -// /// Like GetCharAt, but without any safety checks. -// /// -// internal char FastGetCharAt(int offset) -// { -// return textBuffer.GetCharAt(offset); -// } - WeakReference cachedText; /// diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Utils/Rope.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Utils/Rope.cs index db775e9de7..e125927630 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Utils/Rope.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Utils/Rope.cs @@ -100,7 +100,7 @@ namespace ICSharpCode.AvalonEdit.Utils /// Any modifications inside the rope will also cause the content to be initialized. /// However, insertions at the beginning and the end, as well as inserting this rope into another or /// using the method, allows constructions of larger ropes where parts are - /// lazyly loaded. + /// lazily loaded. /// However, even methods like Concat may sometimes cause the initializer function to be called, e.g. when /// two short ropes are concatenated. /// @@ -451,7 +451,8 @@ namespace ICSharpCode.AvalonEdit.Utils /// public T this[int index] { get { - if (index < 0 || index >= this.Length) { + // use unsigned integers - this way negative values for index overflow and can be tested for with the same check + if (unchecked((uint)index >= (uint)this.Length)) { throw new ArgumentOutOfRangeException("index", index, "0 <= index < " + this.Length.ToString(CultureInfo.InvariantCulture)); } RopeCacheEntry entry = FindNodeUsingCache(index).Peek(); From f113984478be76919b284607eb10c59cde223403 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 1 Jun 2010 13:50:54 +0000 Subject: [PATCH 40/79] Prevent ArgumentOutOfRangeException in XmlFoldingStrategy if .NET reports XML error at line 0. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5887 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../ICSharpCode.AvalonEdit/Folding/XmlFoldingStrategy.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/XmlFoldingStrategy.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/XmlFoldingStrategy.cs index 82562b0ddf..87123a0e6c 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/XmlFoldingStrategy.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Folding/XmlFoldingStrategy.cs @@ -78,8 +78,11 @@ namespace ICSharpCode.AvalonEdit.Folding } firstErrorOffset = -1; } catch (XmlException ex) { - // ignore errors - firstErrorOffset = document.GetOffset(ex.LineNumber, ex.LinePosition); + // ignore errors at invalid positions (prevent ArgumentOutOfRangeException) + if (ex.LineNumber >= 1 && ex.LineNumber <= document.LineCount) + firstErrorOffset = document.GetOffset(ex.LineNumber, ex.LinePosition); + else + firstErrorOffset = 0; } foldMarkers.Sort((a,b) => a.StartOffset.CompareTo(b.StartOffset)); return foldMarkers; From 6378f749d58301c36456a7c5400039a0542fb182 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 1 Jun 2010 15:44:58 +0000 Subject: [PATCH 41/79] UDC: Upload name of feature branch git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5888 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../AnalyticsMonitor.cs | 10 ++++++++-- .../UsageDataCollector/UsageDataUploader.cs | 10 ++++++++-- src/Main/GlobalAssemblyInfo.template | 2 ++ .../StartUp/Project/Dialogs/SplashScreen.cs | 17 +++++++++-------- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs index 629fcac2a3..0b59d89644 100644 --- a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs +++ b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector.AddIn/AnalyticsMonitor.cs @@ -25,6 +25,7 @@ namespace ICSharpCode.UsageDataCollector public sealed class AnalyticsMonitor : IAnalyticsMonitor { const string UploadUrl = "http://usagedatacollector.sharpdevelop.net/upload/UploadUsageData.svc"; + const string ProductName = "sharpdevelop"; public static readonly Uri PrivacyStatementUrl = new Uri("http://www.icsharpcode.net/OpenSource/SD/UsageDataCollector/"); public static readonly AnalyticsMonitor Instance = new AnalyticsMonitor(); @@ -110,7 +111,7 @@ namespace ICSharpCode.UsageDataCollector } } if (sessionOpened) { - UsageDataUploader uploader = new UsageDataUploader(dbFileName); + UsageDataUploader uploader = new UsageDataUploader(dbFileName, ProductName); uploader.EnvironmentDataForDummySession = appEnvironmentProperties; ThreadPool.QueueUserWorkItem(delegate { uploader.StartUpload(UploadUrl); }); } @@ -131,6 +132,11 @@ namespace ICSharpCode.UsageDataCollector if (!string.IsNullOrEmpty(PROCESSOR_ARCHITECTURE)) { properties.Add(new UsageDataEnvironmentProperty { Name = "architecture", Value = PROCESSOR_ARCHITECTURE }); } + #pragma warning disable 0162 + if (RevisionClass.BranchName != null) { + properties.Add(new UsageDataEnvironmentProperty { Name = "branch", Value = RevisionClass.BranchName }); + } + #pragma warning restore 0162 #if DEBUG properties.Add(new UsageDataEnvironmentProperty { Name = "debug", Value = "true" }); #endif @@ -148,7 +154,7 @@ namespace ICSharpCode.UsageDataCollector if (session != null) session.Flush(); } - UsageDataUploader uploader = new UsageDataUploader(dbFileName); + UsageDataUploader uploader = new UsageDataUploader(dbFileName, ProductName); return uploader.GetTextForStoredData(); } diff --git a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataUploader.cs b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataUploader.cs index d907a174c4..42f1d3613a 100644 --- a/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataUploader.cs +++ b/src/AddIns/Misc/UsageDataCollector/UsageDataCollector/UsageDataUploader.cs @@ -28,13 +28,19 @@ namespace ICSharpCode.UsageDataCollector public class UsageDataUploader { string databaseFileName; + string productName; /// /// Creates a new UsageDataUploader. /// - public UsageDataUploader(string databaseFileName) + public UsageDataUploader(string databaseFileName, string productName) { + if (databaseFileName == null) + throw new ArgumentNullException("databaseFileName"); + if (productName == null) + throw new ArgumentNullException("productName"); this.databaseFileName = databaseFileName; + this.productName = productName; } /// @@ -140,7 +146,7 @@ namespace ICSharpCode.UsageDataCollector UdcProxy.UDCUploadServiceClient client = new UdcProxy.UDCUploadServiceClient(binding, endpoint); try { - client.BeginUploadUsageData("sharpdevelop", new MemoryStream(data), + client.BeginUploadUsageData(productName, new MemoryStream(data), ar => UsageDataUploaded(ar, client, commaSeparatedSessionIDList), null); } catch (CommunicationException) { // ignore error (maybe currently not connected to network) diff --git a/src/Main/GlobalAssemblyInfo.template b/src/Main/GlobalAssemblyInfo.template index d75b703800..5ddb81e4f9 100644 --- a/src/Main/GlobalAssemblyInfo.template +++ b/src/Main/GlobalAssemblyInfo.template @@ -33,4 +33,6 @@ internal static class RevisionClass public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; + + public const string BranchName = null; } diff --git a/src/Main/StartUp/Project/Dialogs/SplashScreen.cs b/src/Main/StartUp/Project/Dialogs/SplashScreen.cs index f947f26572..5963bddb1b 100644 --- a/src/Main/StartUp/Project/Dialogs/SplashScreen.cs +++ b/src/Main/StartUp/Project/Dialogs/SplashScreen.cs @@ -14,8 +14,6 @@ namespace ICSharpCode.SharpDevelop { public class SplashScreenForm : Form { - public const string VersionText = "Mirador (4.0) build " + RevisionClass.Revision; - static SplashScreenForm splashScreen; static List requestedFileList = new List(); static List parameterList = new List(); @@ -32,20 +30,23 @@ namespace ICSharpCode.SharpDevelop public SplashScreenForm() { + const string versionText = "SharpDevelop" + + (RevisionClass.BranchName != null ? "-" + RevisionClass.BranchName : "") + + " " + RevisionClass.FullVersion + #if DEBUG + + " (debug)" + #endif + ; + FormBorderStyle = FormBorderStyle.None; StartPosition = FormStartPosition.CenterScreen; ShowInTaskbar = false; - #if DEBUG - string versionText = VersionText + " (debug)"; - #else - string versionText = VersionText; - #endif // Stream must be kept open for the lifetime of the bitmap bitmap = new Bitmap(typeof(SplashScreenForm).Assembly.GetManifestResourceStream("Resources.SplashScreen.jpg")); this.ClientSize = bitmap.Size; using (Font font = new Font("Sans Serif", 4)) { using (Graphics g = Graphics.FromImage(bitmap)) { - g.DrawString(versionText, font, Brushes.Black, 100, 142); + g.DrawString(versionText, font, Brushes.Black, 166 - 3 * versionText.Length, 142); } } BackgroundImage = bitmap; From 67c9a984b904c16599c5eab66a729accb525b7a0 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 1 Jun 2010 16:28:09 +0000 Subject: [PATCH 42/79] Fix SD2-1669: Exception when opening DatabasesTreeViewPad git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5889 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../CSDLDatabaseTreeViewNodeResourceDictionary.xaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/CSDLDatabaseTreeViewNodeResourceDictionary.xaml b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/CSDLDatabaseTreeViewNodeResourceDictionary.xaml index 4d46942e84..32ce0cdf37 100644 --- a/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/CSDLDatabaseTreeViewNodeResourceDictionary.xaml +++ b/src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/CSDLDatabaseTreeViewNodeResourceDictionary.xaml @@ -4,12 +4,13 @@ xmlns:dmDesigner="http://icsharpcode.net/data/edmdesigner/designer" xmlns:userControls="clr-namespace:ICSharpCode.Data.EDMDesigner.Core.UI.UserControls"> + + + + - - - \ No newline at end of file From 01ceebba1c380b75d957e854db66b6b735a9862e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 1 Jun 2010 17:28:06 +0000 Subject: [PATCH 43/79] Fix compiler error in AvalonEdit.Sample. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5890 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- samples/AvalonEdit.Sample/MyCompletionData.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/AvalonEdit.Sample/MyCompletionData.cs b/samples/AvalonEdit.Sample/MyCompletionData.cs index 8295e25c33..7ab77048a3 100644 --- a/samples/AvalonEdit.Sample/MyCompletionData.cs +++ b/samples/AvalonEdit.Sample/MyCompletionData.cs @@ -48,6 +48,8 @@ namespace AvalonEdit.Sample get { return "Description for " + this.Text; } } + public double Priority { get { return 0; } } + public void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs) { textArea.Document.Replace(completionSegment, this.Text); From 0e27d647a6dba589b658280ca688d554c907b93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Tue, 1 Jun 2010 17:50:24 +0000 Subject: [PATCH 44/79] When CodeCompletion window is empty, it shows "Press Ctrl+Space to show items from all namespaces", so that user learns how to use Ctrl+Space naturally. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5891 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../AvalonEdit.AddIn/AvalonEdit.AddIn.csproj | 1 + .../Src/SharpDevelopCompletionWindow.cs | 3 ++- .../Src/SharpDevelopCompletionWindow.xaml | 16 ++++++++++++++ .../CodeCompletion/CompletionList.cs | 16 ++++++++++++++ .../CodeCompletion/CompletionList.xaml | 21 +++++++++++++++++++ .../CodeCompletion/CompletionListBox.cs | 21 +++++++++++++++++++ .../CodeCompletion/CompletionWindow.cs | 15 ++++++++++++- 7 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj index 29ed8bc75d..08f38551ac 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj @@ -152,6 +152,7 @@ + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs index c942314f7f..24b256e29c 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs @@ -11,10 +11,10 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; - using ICSharpCode.AvalonEdit.CodeCompletion; using ICSharpCode.AvalonEdit.Document; using ICSharpCode.AvalonEdit.Editing; +using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Editor; using ICSharpCode.SharpDevelop.Editor.CodeCompletion; @@ -84,6 +84,7 @@ namespace ICSharpCode.AvalonEdit.AddIn this.CompletionList.SelectedItem = adapter; } this.StartOffset -= itemList.PreselectionLength; + this.EmptyContent = StringParser.Parse("${res:ICSharpCode.AvalonEdit.AddIn.SharpDevelopCompletionWindow.EmptyText}"); } protected override void OnSourceInitialized(EventArgs e) diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml new file mode 100644 index 0000000000..17ef344d01 --- /dev/null +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml @@ -0,0 +1,16 @@ + + + \ No newline at end of file diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.cs index 7d65321831..8f13d6a7bf 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.cs @@ -38,6 +38,22 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion set { isFiltering = value; } } + /// + /// Dependency property for . + /// + public static readonly DependencyProperty EmptyContentProperty = + DependencyProperty.Register("EmptyContent", typeof(object), typeof(CompletionList), + new FrameworkPropertyMetadata()); + + /// + /// Content of EmptyTemplate will be shown when CompletionList contains no items. + /// If EmptyTemplate is null, nothing will be shown. + /// + public object EmptyContent { + get { return (object)GetValue(EmptyContentProperty); } + set { SetValue(EmptyContentProperty, value); } + } + /// /// Is raised when the completion list indicates that the user has chosen /// an entry to be completed. diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.xaml b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.xaml index f04c7e814f..8114a67cb9 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.xaml +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionList.xaml @@ -34,6 +34,23 @@ + + - --> \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml index 6721aaa770..3124eeebfa 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml @@ -3,6 +3,10 @@ xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" > + + + + + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml index 3124eeebfa..3c2470e03a 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml @@ -2,10 +2,26 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:ICSharpCode.AvalonEdit.AddIn" xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" + xmlns:core="http://icsharpcode.net/sharpdevelop/core" > + + + @@ -55,7 +49,9 @@ - + @@ -64,10 +60,6 @@ - - - - diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionListBox.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionListBox.cs index 7ca2c2a8be..76077b66ba 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionListBox.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionListBox.cs @@ -29,14 +29,14 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion /// Dependency property for . /// public static readonly DependencyProperty EmptyTemplateProperty = - DependencyProperty.Register("EmptyTemplate", typeof(object), typeof(CompletionListBox), + DependencyProperty.Register("EmptyTemplate", typeof(ControlTemplate), typeof(CompletionListBox), new FrameworkPropertyMetadata()); /// /// Content of EmptyTemplate will be shown when CompletionListBox contains no items. /// If EmptyTemplate is null, nothing will be shown. /// - public object EmptyTemplate { - get { return (object)GetValue(EmptyTemplateProperty); } + public ControlTemplate EmptyTemplate { + get { return (ControlTemplate)GetValue(EmptyTemplateProperty); } set { SetValue(EmptyTemplateProperty, value); } } diff --git a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindow.cs b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindow.cs index 7998df060e..1eeda222d2 100644 --- a/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindow.cs +++ b/src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/CodeCompletion/CompletionWindow.cs @@ -53,12 +53,12 @@ namespace ICSharpCode.AvalonEdit.CodeCompletion /// /// Content that will be shown when the CompletionWindow contains no items. /// - public object EmptyContent { + public ControlTemplate EmptyTemplate { get { - return this.completionList.EmptyContent; + return this.completionList.EmptyTemplate; } set { - this.completionList.EmptyContent = value; + this.completionList.EmptyTemplate = value; } } From 8a464f1a8c5c42c0591b48aa40a04fb8a2a554d3 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 2 Jun 2010 19:26:45 +0000 Subject: [PATCH 50/79] Remove EmptyTemplate from AvalonEdit, instead re-style the CompletionListBox within SharpDevelopCompletionWindow.xaml git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5897 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- SharpDevelop.Tests.sln | 524 +++++++++--------- .../Analysis/CodeAnalysis/CodeAnalysis.addin | 7 +- .../AvalonEdit.AddIn/AvalonEdit.AddIn.csproj | 4 +- .../Src/SharpDevelopCompletionWindow.cs | 22 +- .../Src/SharpDevelopCompletionWindow.xaml | 28 +- .../AvalonEdit.AddIn/themes/generic.xaml | 21 +- .../CodeCompletion/CompletionList.xaml | 16 +- .../CodeCompletion/CompletionListBox.cs | 21 - .../CodeCompletion/CompletionWindow.cs | 12 - 9 files changed, 318 insertions(+), 337 deletions(-) diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln index 160f35186f..5737f8fe4d 100644 --- a/SharpDevelop.Tests.sln +++ b/SharpDevelop.Tests.sln @@ -1,69 +1,69 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.0.5826 +# SharpDevelop 4.0.0.5878 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{256F5C28-532C-44C0-8AB8-D8EC5E492E01}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Presentation", "src\Main\ICSharpCode.Core.Presentation\ICSharpCode.Core.Presentation.csproj", "{7E4A7172-7FF5-48D0-B719-7CD959DD1AC9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.WinForms", "src\Main\ICSharpCode.Core.WinForms\ICSharpCode.Core.WinForms.csproj", "{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "src\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "src\Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "src\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "src\Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "src\Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "src\Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "src\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "src\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "src\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker35", "src\Main\ICSharpCode.SharpDevelop.BuildWorker35\ICSharpCode.SharpDevelop.BuildWorker35.csproj", "{B5F54272-49F0-40DB-845A-8D837875D3BA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "src\Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -72,50 +72,50 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{ ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" + ProjectSection(SolutionItems) = postProject + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonDock", "src\Libraries\AvalonDock\AvalonDock\AvalonDock.csproj", "{2FF700C2-A38A-48BD-A637-8CAFD4FE6237}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "src\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit\ICSharpCode.AvalonEdit.csproj", "{6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryASTGenerator", "src\Libraries\NRefactory\NRefactoryASTGenerator\NRefactoryASTGenerator.csproj", "{B22522AA-B5BF-4A58-AC6D-D4B45805521F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Build.Tasks", "src\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "src\Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "src\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.AvalonEdit.Tests", "src\Libraries\AvalonEdit\ICSharpCode.AvalonEdit.Tests\ICSharpCode.AvalonEdit.Tests.csproj", "{6222A3A1-83CE-47A3-A4E4-A018F82D44D8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "src\Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "src\Libraries\SharpTreeView\ICSharpCode.TreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -124,223 +124,225 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{393278 ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Analysis\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Tests", "src\AddIns\Analysis\Profiler\Tests\Profiler.Tests\Profiler.Tests.csproj", "{068F9531-5D29-49E0-980E-59982A3A0469}" ProjectSection(ProjectDependencies) = postProject + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Analysis\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding.Tests", "src\AddIns\BackendBindings\CSharpBinding\Tests\CSharpBinding.Tests.csproj", "{52006F3F-3156-45DE-89D8-C4813694FBA4}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Debugger\Debugger.Tests\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring.Tests", "src\AddIns\Misc\SharpRefactoring\Test\SharpRefactoring.Tests.csproj", "{A4AA51DE-A096-47EC-AA5D-D91457834ECF}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{F3662720-9EA2-4591-BBC6-97361DCE50A9}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection @@ -350,223 +352,226 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit", "src\AddI {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegExpTk", "src\AddIns\Misc\RegExpTk\Project\RegExpTk.csproj", "{64A3E5E6-90BF-47F6-94DF-68C94B62C817}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SubversionAddIn", "src\AddIns\Misc\SubversionAddIn\Project\SubversionAddIn.csproj", "{17F4D7E0-6933-4C2E-8714-FD7E98D625D5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PInvokeAddIn", "src\AddIns\Misc\PInvokeAddIn\Project\PInvokeAddIn.csproj", "{5EEB99CF-EA2B-4733-80A6-CE9192D68170}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceToolkit.Tests", "src\AddIns\Misc\ResourceToolkit\Test\ResourceToolkit.Tests.csproj", "{DD9AE6A5-2B9D-443A-BC71-38BE578C36BD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FiletypeRegisterer", "src\AddIns\Misc\FiletypeRegisterer\Project\FiletypeRegisterer.csproj", "{D022A6CE-7438-41E8-AC64-F2DE18EC54C6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "src\AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddinScout", "src\AddIns\Misc\AddinScout\Project\AddinScout.csproj", "{4B8F0F98-8BE1-402B-AA8B-C8D548577B38}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UsageDataCollector", "UsageDataCollector", "{DEFC8584-BEC3-4921-BD0F-40482E450B7B}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector\UsageDataCollector.csproj", "{6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddInManager", "src\AddIns\Misc\AddInManager\Project\AddInManager.csproj", "{F93E52FD-DA66-4CE5-A0CB-BCD902811122}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsageDataCollector.AddIn", "src\AddIns\Misc\UsageDataCollector\UsageDataCollector.AddIn\UsageDataCollector.AddIn.csproj", "{0008FCE9-9EB4-4E2E-979B-553278E5BBA6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartPage", "src\AddIns\Misc\StartPage\Project\StartPage.csproj", "{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display Bindings", "{11BF9245-88A3-4A0A-9A8A-EC9D98036B0F}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{C7F29FC2-1B03-4CDD-9E30-400F4765FF04}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.SQLServer", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.SQLServer\ICSharpCode.Data.SQLServer.csproj", "{AFE34868-AFA1-4E1C-9450-47AB4BE329D5}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReflectorAddIn", "src\AddIns\Misc\ReflectorAddIn\ReflectorAddIn\Project\ReflectorAddIn.csproj", "{8AA421C8-D7AF-4957-9F43-5135328ACB24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core.UI\ICSharpCode.Data.EDMDesigner.Core.UI.csproj", "{EEF5E054-4192-4A57-8FBF-E860D808A51D}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "src\AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.EDMDesigner.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.EDMDesigner.Core\ICSharpCode.Data.EDMDesigner.Core.csproj", "{5C70D6AB-0A33-43F9-B8B5-54558C35BBB1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring", "src\AddIns\Misc\SharpRefactoring\Project\SharpRefactoring.csproj", "{3CA90546-3B4C-4663-9445-C4E9371750A7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core.UI", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core.UI\ICSharpCode.Data.Core.UI.csproj", "{BAD94D6E-4159-4CB6-B991-486F412D9BB6}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpRefactoring.Tests", "src\AddIns\Misc\SharpRefactoring\Test\SharpRefactoring.Tests.csproj", "{A4AA51DE-A096-47EC-AA5D-D91457834ECF}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Core", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Core\ICSharpCode.Data.Core.csproj", "{B7823AE9-4B43-4859-8796-2EBDC116FBB8}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelpViewer", "src\AddIns\Misc\HelpViewer\HelpViewer.csproj", "{80F76D10-0B44-4D55-B4BD-DAEB5464090C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Data.Addin", "src\AddIns\DisplayBindings\Data\ICSharpCode.Data.Addin\ICSharpCode.Data.Addin.csproj", "{A9F12710-24E4-46D4-832C-6ECB395B9EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ClassDiagram", "ClassDiagram", "{BFA3BF26-33BD-4A65-B84D-C7F30D131668}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "src\AddIns\Debugger\Debugger.AddIn\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Diagrams", "src\AddIns\DisplayBindings\ClassDiagram\DiagramRouter\Diagrams.csproj", "{0991423A-DBF6-4C89-B365-A1DF1EB32E42}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "src\AddIns\Debugger\Debugger.Core\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagramAddin", "src\AddIns\DisplayBindings\ClassDiagram\ClassDiagramAddin\ClassDiagramAddin.csproj", "{5A1354DF-4989-4BB4-BC6B-D627C2E9FA13}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "src\AddIns\Debugger\Debugger.Tests\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassCanvas", "src\AddIns\DisplayBindings\ClassDiagram\ClassCanvas\ClassCanvas.csproj", "{08F772A1-F0BE-433E-8B37-F6522953DB05}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Language Bindings", "Language Bindings", "{E0646C25-36F2-4524-969F-FA621353AB94}" - ProjectSection(SolutionItems) = postProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "src\AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" + ProjectSection(ProjectDependencies) = postProject + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharpBinding", "src\AddIns\BackendBindings\FSharpBinding\FSharpBinding.csproj", "{E954F3CB-A446-492F-A664-2B376EBC86E8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "src\AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{DCA2703D-250A-463E-A68A-07ED105AE6BD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "src\AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AvalonEdit.AddIn", "src\AddIns\DisplayBindings\AvalonEdit.AddIn\AvalonEdit.AddIn.csproj", "{0162E499-42D0-409B-AA25-EED21F75336B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding.Tests", "src\AddIns\BackendBindings\XamlBinding\XamlBinding.Tests\XamlBinding.Tests.csproj", "{F390DA70-1FE1-4715-81A0-389AB010C130}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEditor", "src\AddIns\DisplayBindings\ResourceEditor\Project\ResourceEditor.csproj", "{CBC6C247-747B-4908-B09A-4D2E0F640B6B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlBinding", "src\AddIns\BackendBindings\XamlBinding\XamlBinding\XamlBinding.csproj", "{7C96B65D-28A5-4F28-A35B-8D83CE831EE8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SettingsEditor", "src\AddIns\DisplayBindings\SettingsEditor\Project\SettingsEditor.csproj", "{85226AFB-CE71-4851-9A75-7EEC663A8E8A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "src\AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HexEditor", "src\AddIns\DisplayBindings\HexEditor\Project\HexEditor.csproj", "{E618A9CD-A39F-4925-A538-E8A3FEF24E54}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "src\AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IconEditor", "IconEditor", "{0773ED53-08E2-4495-A3BE-CA0B5D413C15}" + ProjectSection(SolutionItems) = postProject + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditor", "src\AddIns\DisplayBindings\IconEditor\IconEditor\IconEditor.csproj", "{DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "src\AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{E1B288A2-08EE-4318-8BBB-8AB72C69E33E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IconEditorAddIn", "src\AddIns\DisplayBindings\IconEditor\IconEditorAddIn\IconEditorAddIn.csproj", "{DFB936AD-90EE-4B4F-941E-4F4A636F0D92}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILAsmBinding", "src\AddIns\BackendBindings\ILAsmBinding\Project\ILAsmBinding.csproj", "{6E59AF58-F635-459A-9A35-C9AC41C00339}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "src\AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{CA76F702-5B4E-4918-B8D8-7FF8382434FF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{6022AC51-B658-4C54-97EF-79187AC65B47}" ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "src\AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.AddIn", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.AddIn\WpfDesign.AddIn.csproj", "{9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "src\AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "src\AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{97B3B514-AB0E-4FE1-89DE-8A945F5112AE}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "src\AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "src\AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ComponentInspector", "ComponentInspector", "{D599885D-E161-4CCE-A66E-7A40C8C4F4CC}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "src\AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector", "src\AddIns\Misc\ComponentInspector\ComponentInspector\ComponentInspector.csproj", "{000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "src\AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.Core", "src\AddIns\Misc\ComponentInspector\ComponentInspector.Core\ComponentInspector.Core.csproj", "{E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "src\AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComponentInspector.AddIn", "src\AddIns\Misc\ComponentInspector\ComponentInspector.AddIn\ComponentInspector.AddIn.csproj", "{869951D5-A0D6-4DC6-9F1D-E6B9A12AC446}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding.Tests", "src\AddIns\BackendBindings\CSharpBinding\Tests\CSharpBinding.Tests.csproj", "{52006F3F-3156-45DE-89D8-C4813694FBA4}" - ProjectSection(ProjectDependencies) = postProject - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analysis", "Analysis", "{F355E45F-F54F-4B42-8916-9A633A392789}" + ProjectSection(SolutionItems) = postProject EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppBinding", "src\AddIns\BackendBindings\CppBinding\CppBinding\CppBinding.csproj", "{70966F84-74C9-4067-A379-0C674A929233}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "src\AddIns\Analysis\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RubyBinding", "src\AddIns\BackendBindings\Ruby\RubyBinding\Project\RubyBinding.csproj", "{C896FFFF-5B6C-4B0E-B6DF-049865F501B4}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "src\AddIns\Analysis\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Profiler", "Profiler", "{C4035C32-026F-4158-AF15-113EA1EF1960}" - ProjectSection(SolutionItems) = postProject - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Tests", "src\AddIns\Analysis\Profiler\Tests\Profiler.Tests\Profiler.Tests.csproj", "{068F9531-5D29-49E0-980E-59982A3A0469}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "src\AddIns\Analysis\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.X64Converter", "src\AddIns\Analysis\Profiler\X64Converter\Profiler.X64Converter.csproj", "{FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "src\AddIns\Analysis\CodeCoverage\Project\CodeCoverage.csproj", "{08CE9972-283B-44F4-82FA-966F7DFA6B7A}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controller", "src\AddIns\Analysis\Profiler\Controller\Profiler.Controller.csproj", "{72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceAnalysis", "src\AddIns\Analysis\SourceAnalysis\SourceAnalysis.csproj", "{CE498514-D12D-4B6E-AE0E-FEC29BD43748}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.Controls", "src\AddIns\Analysis\Profiler\Frontend\Controls\Profiler.Controls.csproj", "{BDA49550-5ED1-4C6B-B648-657B2CACD8E0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "src\AddIns\Analysis\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}" ProjectSection(ProjectDependencies) = postProject - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler.AddIn", "src\AddIns\Analysis\Profiler\Frontend\AddIn\Profiler.AddIn.csproj", "{D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeQualityAnalysis", "src\AddIns\Analysis\CodeQuality\CodeQualityAnalysis.csproj", "{76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}" ProjectSection(ProjectDependencies) = postProject {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} EndProjectSection EndProject Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "src\Tools\Tools.build", "{3DF4060F-5EE0-41CF-8096-F27355FD5511}" @@ -1033,125 +1038,138 @@ Global {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|Win32.ActiveCfg = Release|x86 {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.Build.0 = Release|x86 {80F76D10-0B44-4D55-B4BD-DAEB5464090C}.Release|x86.ActiveCfg = Release|x86 + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|Any CPU.Build.0 = Debug|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|Any CPU.ActiveCfg = Debug|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|Win32.Build.0 = Debug|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|Win32.ActiveCfg = Debug|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|x86.Build.0 = Debug|x86 + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Debug|x86.ActiveCfg = Debug|x86 + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|Any CPU.Build.0 = Release|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|Any CPU.ActiveCfg = Release|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|Win32.Build.0 = Release|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|Win32.ActiveCfg = Release|Debug + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|x86.Build.0 = Release|x86 + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3}.Release|x86.ActiveCfg = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {B5F54272-49F0-40DB-845A-8D837875D3BA} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} - {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {857CA1A3-FC88-4BE0-AB6A-D1EE772AB288} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {7E4A7172-7FF5-48D0-B719-7CD959DD1AC9} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {4980B743-B32F-4aba-AABD-45E2CAD3568D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {7DB80259-24D4-46C3-A024-53FF1987733D} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {B5F54272-49F0-40DB-845A-8D837875D3BA} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {DDE2A481-8271-4EAC-A330-8FA6A38D13D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} - {870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} - {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} + {E73BB233-D88B-44A7-A98F-D71EE158381D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {2FF700C2-A38A-48BD-A637-8CAFD4FE6237} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} + {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} - {C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {B22522AA-B5BF-4A58-AC6D-D4B45805521F} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} + {870115DD-960A-4406-A6B9-600BCDC36A03} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} {F355E45F-F54F-4B42-8916-9A633A392789} = {39327899-ED91-4F7F-988C-4FE4E17C014D} - {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789} - {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} - {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} - {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} - {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} - {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789} - {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} - {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} - {66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} - {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} - {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} - {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} - {80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} - {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} - {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} - {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} - {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} - {52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94} - {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} - {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} - {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} - {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} - {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} - {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} - {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94} - {388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94} + {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {F3662720-9EA2-4591-BBC6-97361DCE50A9} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {E0646C25-36F2-4524-969F-FA621353AB94} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {C4035C32-026F-4158-AF15-113EA1EF1960} = {39327899-ED91-4F7F-988C-4FE4E17C014D} + {068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} {E954F3CB-A446-492F-A664-2B376EBC86E8} = {E0646C25-36F2-4524-969F-FA621353AB94} - {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} - {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {388E7B64-0393-4EB4-A3E3-5C474F141853} = {E0646C25-36F2-4524-969F-FA621353AB94} + {F390DA70-1FE1-4715-81A0-389AB010C130} = {E0646C25-36F2-4524-969F-FA621353AB94} + {7C96B65D-28A5-4F28-A35B-8D83CE831EE8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {BF38FB72-B380-4196-AF8C-95749D726C61} = {E0646C25-36F2-4524-969F-FA621353AB94} + {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {E0646C25-36F2-4524-969F-FA621353AB94} + {E1B288A2-08EE-4318-8BBB-8AB72C69E33E} = {E0646C25-36F2-4524-969F-FA621353AB94} + {6E59AF58-F635-459A-9A35-C9AC41C00339} = {E0646C25-36F2-4524-969F-FA621353AB94} + {CA76F702-5B4E-4918-B8D8-7FF8382434FF} = {E0646C25-36F2-4524-969F-FA621353AB94} + {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} = {E0646C25-36F2-4524-969F-FA621353AB94} + {50A89267-A28B-4DF3-8E62-912E005143B8} = {E0646C25-36F2-4524-969F-FA621353AB94} + {52006F3F-3156-45DE-89D8-C4813694FBA4} = {E0646C25-36F2-4524-969F-FA621353AB94} + {70966F84-74C9-4067-A379-0C674A929233} = {E0646C25-36F2-4524-969F-FA621353AB94} + {C896FFFF-5B6C-4B0E-B6DF-049865F501B4} = {E0646C25-36F2-4524-969F-FA621353AB94} {C9DE556D-325C-4544-B29F-16A9EB7C9830} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} - {D294A12D-4B38-4F25-9AA6-3D4A6CE26E7B} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {BDA49550-5ED1-4C6B-B648-657B2CACD8E0} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {72FFB35A-C9E2-4A31-B4FA-E3E3E28DED5F} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {FE88FE17-D9FB-4FCC-9A35-6BFFB6B26CC6} = {C4035C32-026F-4158-AF15-113EA1EF1960} - {068F9531-5D29-49E0-980E-59982A3A0469} = {C4035C32-026F-4158-AF15-113EA1EF1960} + {DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {97B3B514-AB0E-4FE1-89DE-8A945F5112AE} + {8D732610-8FC6-43BA-94C9-7126FD7FE361} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {833904AB-3CD4-4071-9B48-5770E44685AA} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {23B517C9-1ECC-4419-A13F-0B7136D085CB} = {CA76F702-5B4E-4918-B8D8-7FF8382434FF} + {EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {CDE0C5A4-2096-48B5-BEA3-74DBA0F0E1EF} + {DEFC8584-BEC3-4921-BD0F-40482E450B7B} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {A569DCC1-C608-45FD-B770-4F79335EF154} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {DD9AE6A5-2B9D-443A-BC71-38BE578C36BD} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {17F4D7E0-6933-4C2E-8714-FD7E98D625D5} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {461606BD-E824-4D0A-8CBA-01810B1F5E02} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {64A3E5E6-90BF-47F6-94DF-68C94B62C817} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {5EEB99CF-EA2B-4733-80A6-CE9192D68170} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {D022A6CE-7438-41E8-AC64-F2DE18EC54C6} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {F93E52FD-DA66-4CE5-A0CB-BCD902811122} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {8AA421C8-D7AF-4957-9F43-5135328ACB24} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {9196DD8A-B4D4-4780-8742-C5762E547FC2} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {3CA90546-3B4C-4663-9445-C4E9371750A7} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {A4AA51DE-A096-47EC-AA5D-D91457834ECF} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {80F76D10-0B44-4D55-B4BD-DAEB5464090C} = {F3662720-9EA2-4591-BBC6-97361DCE50A9} + {0008FCE9-9EB4-4E2E-979B-553278E5BBA6} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {6B1CFE35-DA17-4DEB-9C6E-227E5E251DA0} = {DEFC8584-BEC3-4921-BD0F-40482E450B7B} + {6022AC51-B658-4C54-97EF-79187AC65B47} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0773ED53-08E2-4495-A3BE-CA0B5D413C15} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {E618A9CD-A39F-4925-A538-E8A3FEF24E54} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {85226AFB-CE71-4851-9A75-7EEC663A8E8A} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {0162E499-42D0-409B-AA25-EED21F75336B} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {DCA2703D-250A-463E-A68A-07ED105AE6BD} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {BFA3BF26-33BD-4A65-B84D-C7F30D131668} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} = {11BF9245-88A3-4A0A-9A8A-EC9D98036B0F} + {A9F12710-24E4-46D4-832C-6ECB395B9EAD} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {B7823AE9-4B43-4859-8796-2EBDC116FBB8} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {BAD94D6E-4159-4CB6-B991-486F412D9BB6} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {5C70D6AB-0A33-43F9-B8B5-54558C35BBB1} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {EEF5E054-4192-4A57-8FBF-E860D808A51D} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {AFE34868-AFA1-4E1C-9450-47AB4BE329D5} = {C7F29FC2-1B03-4CDD-9E30-400F4765FF04} + {08F772A1-F0BE-433E-8B37-F6522953DB05} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {5A1354DF-4989-4BB4-BC6B-D627C2E9FA13} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {0991423A-DBF6-4C89-B365-A1DF1EB32E42} = {BFA3BF26-33BD-4A65-B84D-C7F30D131668} + {DFB936AD-90EE-4B4F-941E-4F4A636F0D92} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {DC1CCE11-CB91-40FA-9C47-4D9EB5D67BFD} = {0773ED53-08E2-4495-A3BE-CA0B5D413C15} + {88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {78CC29AC-CC79-4355-B1F2-97936DF198AC} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {9A9D6FD4-6A2E-455D-ACC3-DDA775FE9865} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {6022AC51-B658-4C54-97EF-79187AC65B47} + {869951D5-A0D6-4DC6-9F1D-E6B9A12AC446} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {E6F4983F-DE41-4AEC-88E7-1FA9AFB4E6FF} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {000E4F64-5D0D-4EB1-B0BF-1A62ADBC6EAD} = {D599885D-E161-4CCE-A66E-7A40C8C4F4CC} + {76DD1CC0-0D86-44A1-9BD6-D91F79807BC3} = {F355E45F-F54F-4B42-8916-9A633A392789} + {44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {F355E45F-F54F-4B42-8916-9A633A392789} + {CE498514-D12D-4B6E-AE0E-FEC29BD43748} = {F355E45F-F54F-4B42-8916-9A633A392789} + {08CE9972-283B-44F4-82FA-966F7DFA6B7A} = {F355E45F-F54F-4B42-8916-9A633A392789} + {3EAA45A9-735C-4AC7-A799-947B93EA449D} = {F355E45F-F54F-4B42-8916-9A633A392789} + {1F261725-6318-4434-A1B1-6C70CE4CD324} = {F355E45F-F54F-4B42-8916-9A633A392789} + {A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {F355E45F-F54F-4B42-8916-9A633A392789} EndGlobalSection EndGlobal diff --git a/src/AddIns/Analysis/CodeAnalysis/CodeAnalysis.addin b/src/AddIns/Analysis/CodeAnalysis/CodeAnalysis.addin index 043ef5de48..58d7b202cd 100644 --- a/src/AddIns/Analysis/CodeAnalysis/CodeAnalysis.addin +++ b/src/AddIns/Analysis/CodeAnalysis/CodeAnalysis.addin @@ -32,14 +32,11 @@ - - - - + - + diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj index 08f38551ac..b82ef3c61f 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.csproj @@ -152,7 +152,9 @@ - + + SharpDevelopCompletionWindow.cs + {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1} diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs index 3454af814b..b66664426a 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.cs @@ -24,14 +24,8 @@ namespace ICSharpCode.AvalonEdit.AddIn /// /// The code completion window. /// - public class SharpDevelopCompletionWindow : CompletionWindow, ICompletionListWindow + public partial class SharpDevelopCompletionWindow : CompletionWindow, ICompletionListWindow { - /*static SharpDevelopCompletionWindow() - { - DefaultStyleKeyProperty.OverrideMetadata(typeof(SharpDevelopCompletionWindow), - new FrameworkPropertyMetadata(typeof(SharpDevelopCompletionWindow))); - }*/ - public ICompletionItem SelectedItem { get { return ((CodeCompletionDataAdapter)this.CompletionList.SelectedItem).Item; @@ -79,7 +73,10 @@ namespace ICSharpCode.AvalonEdit.AddIn throw new ArgumentNullException("editor"); if (itemList == null) throw new ArgumentNullException("itemList"); - this.Style = ICSharpCode.Core.Presentation.GlobalStyles.WindowStyle; + + this.EmptyText = StringParser.Parse("${res:ICSharpCode.AvalonEdit.AddIn.SharpDevelopCompletionWindow.EmptyText}"); + + InitializeComponent(); this.Editor = editor; this.itemList = itemList; ICompletionItem suggestedItem = itemList.SuggestedItem; @@ -92,6 +89,15 @@ namespace ICSharpCode.AvalonEdit.AddIn this.StartOffset -= itemList.PreselectionLength; } + public static readonly DependencyProperty EmptyTextProperty = + DependencyProperty.Register("EmptyText", typeof(string), typeof(SharpDevelopCompletionWindow), + new FrameworkPropertyMetadata()); + + public string EmptyText { + get { return (string)GetValue(EmptyTextProperty); } + set { SetValue(EmptyTextProperty, value); } + } + protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml index 9d49864cb6..5d0cada41a 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/SharpDevelopCompletionWindow.xaml @@ -1,7 +1,29 @@ - - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml index 3c2470e03a..da1d6020e4 100644 --- a/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml +++ b/src/AddIns/DisplayBindings/AvalonEdit.AddIn/themes/generic.xaml @@ -4,25 +4,6 @@ xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" xmlns:core="http://icsharpcode.net/sharpdevelop/core" > - - - - - -