Browse Source

Added basic support for Extract Interface refactoring in C#; not yet tested in VB.NET:

- moved MoveClassToFile, GetDocument, and ExtractCode from ClassBookmarkMenuBuilder.cs to FindReferencesAndRenameHelper.cs to co-locate similar refactoring helpers
- added ExtractInterface refactoring to the ClassBookmarkMenuBuilder, RefactoringProvider, and NRefactoryRefactoringProvider
- added some test for NRefactoryRefactoringProvider in a new test project: ICSharpCode.SharpDevelop.Dom.Tests
- added default string resources for ExtractInterface to both StringResources.resources and LocalizeDb.mdb

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3019 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Alpert 18 years ago
parent
commit
de1ed7c4f4
  1. 19
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  2. 275
      src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.Designer.cs
  3. 196
      src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.cs
  4. 120
      src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.resx
  5. 4
      src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/ClassBrowser.cs
  6. 2
      src/Main/Base/Project/Src/Project/IParser.cs
  7. 64
      src/Main/Base/Project/Src/Services/RefactoringService/ExtractInterfaceOptions.cs
  8. 190
      src/Main/Base/Project/Src/Services/RefactoringService/FindReferencesAndRenameHelper.cs
  9. 102
      src/Main/Base/Project/Src/TextEditor/Commands/ClassBookmarkMenuBuilder.cs
  10. 2
      src/Main/Base/Test/NRefactoryResolverTests.cs
  11. 288
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/NRefactoryRefactoringProvider.cs
  12. 30
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/RefactoringProvider.cs
  13. 31
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/AssemblyInfo.cs
  14. 66
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ICSharpCode.SharpDevelop.Dom.Tests.csproj
  15. 25
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryRefactoringProviderTestFixt.cs
  16. 500
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryRefactoringProviderTests.cs
  17. 99
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NUnitHelpers/Constraints.cs
  18. 27
      src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NUnitHelpers/SyntaxHelpers.cs
  19. BIN
      src/Main/StartUp/Project/Resources/StringResources.resources
  20. 199
      src/SharpDevelop.Tests.sln

19
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -67,6 +67,17 @@ @@ -67,6 +67,17 @@
<Compile Include="Src\Gui\Dialogs\AsynchronousWaitDialog.Designer.cs">
<DependentUpon>AsynchronousWaitDialog.cs</DependentUpon>
</Compile>
<Compile Include="Src\Gui\Dialogs\ExtractInterfaceDialog.cs" />
<None Include="Src\Gui\Dialogs\ExtractInterfaceDialog.cs">
<Link>Src\Services\RefactoringService\ExtractInterfaceDialog.cs</Link>
</None>
<Compile Include="Src\Gui\Dialogs\ExtractInterfaceDialog.Designer.cs">
<DependentUpon>ExtractInterfaceDialog.cs</DependentUpon>
</Compile>
<None Include="Src\Gui\Dialogs\ExtractInterfaceDialog.Designer.cs">
<Link>Src\Services\RefactoringService\ExtractInterfaceDialog.Designer.cs</Link>
<DependentUpon>ExtractInterfaceDialog.cs</DependentUpon>
</None>
<Compile Include="Src\Gui\Dialogs\NewProjectDialog.cs" />
<Compile Include="Src\Gui\Dialogs\NewProjectDialog.Designer.cs">
<DependentUpon>NewProjectDialog.cs</DependentUpon>
@ -123,6 +134,7 @@ @@ -123,6 +134,7 @@
<Compile Include="Src\Internal\Doozers\IDialogPanelDescriptor.cs" />
<Compile Include="Src\Services\File\FileService.cs" />
<Compile Include="Src\Services\File\FileEventArgs.cs" />
<Compile Include="Src\Services\RefactoringService\ExtractInterfaceOptions.cs" />
<Compile Include="Src\Services\Tasks\Task.cs" />
<Compile Include="Src\Services\Tasks\TaskService.cs" />
<Compile Include="Src\Services\DisplayBinding\IDisplayBinding.cs" />
@ -694,6 +706,13 @@ @@ -694,6 +706,13 @@
<Compile Include="Src\Internal\Templates\TemplateLoadException.cs" />
<Compile Include="Src\Util\UnclosableStream.cs" />
<EmbeddedResource Include="Resources\DefaultManifest.manifest" />
<EmbeddedResource Include="Src\Gui\Dialogs\ExtractInterfaceDialog.resx">
<DependentUpon>ExtractInterfaceDialog.cs</DependentUpon>
</EmbeddedResource>
<None Include="Src\Gui\Dialogs\ExtractInterfaceDialog.resx">
<Link>Src\Services\RefactoringService\ExtractInterfaceDialog.resx</Link>
<DependentUpon>ExtractInterfaceDialog.cs</DependentUpon>
</None>
<EmbeddedResource Include="Src\Gui\Dialogs\NewProjectDialog.resx">
<DependentUpon>NewProjectDialog.cs</DependentUpon>
</EmbeddedResource>

275
src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.Designer.cs generated

@ -0,0 +1,275 @@ @@ -0,0 +1,275 @@
/*
* Created by SharpDevelop.
* User: alperd1
* Date: 1/31/2008
* Time: 4:26 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
namespace ICSharpCode.SharpDevelop.Gui
{
partial class ExtractInterfaceDialog
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// 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.
/// </summary>
private void InitializeComponent()
{
this.lblInterfaceName = new System.Windows.Forms.Label();
this.txtInterfaceName = new System.Windows.Forms.TextBox();
this.lblGeneratedName = new System.Windows.Forms.Label();
this.txtGeneratedName = new System.Windows.Forms.TextBox();
this.lblNewFileName = new System.Windows.Forms.Label();
this.txtNewFileName = new System.Windows.Forms.TextBox();
this.btnSelectAll = new System.Windows.Forms.Button();
this.selectMembersListBox = new System.Windows.Forms.CheckedListBox();
this.specifyInterfaceGroupBox = new System.Windows.Forms.GroupBox();
this.cbIncludeComments = new System.Windows.Forms.CheckBox();
this.btnDeselectAll = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.groupOptions = new System.Windows.Forms.GroupBox();
this.cbAddToClass = new System.Windows.Forms.CheckBox();
this.specifyInterfaceGroupBox.SuspendLayout();
this.groupOptions.SuspendLayout();
this.SuspendLayout();
//
// lblInterfaceName
//
this.lblInterfaceName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInterfaceName.Location = new System.Drawing.Point(12, 9);
this.lblInterfaceName.Name = "lblInterfaceName";
this.lblInterfaceName.Size = new System.Drawing.Size(283, 23);
this.lblInterfaceName.TabIndex = 0;
this.lblInterfaceName.Text = "${res:Dialog.Refactoring.ExtractInterface.InterfaceName}:";
this.lblInterfaceName.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// txtInterfaceName
//
this.txtInterfaceName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtInterfaceName.Location = new System.Drawing.Point(15, 35);
this.txtInterfaceName.Name = "txtInterfaceName";
this.txtInterfaceName.Size = new System.Drawing.Size(412, 20);
this.txtInterfaceName.TabIndex = 6;
this.txtInterfaceName.TextChanged += new System.EventHandler(this.TxtInterfaceNameTextChanged);
//
// lblGeneratedName
//
this.lblGeneratedName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblGeneratedName.Location = new System.Drawing.Point(12, 58);
this.lblGeneratedName.Name = "lblGeneratedName";
this.lblGeneratedName.Size = new System.Drawing.Size(289, 23);
this.lblGeneratedName.TabIndex = 2;
this.lblGeneratedName.Text = "${res:Dialog.Refactoring.ExtractInterface.GeneratedName}:";
this.lblGeneratedName.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// txtGeneratedName
//
this.txtGeneratedName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtGeneratedName.Enabled = false;
this.txtGeneratedName.Location = new System.Drawing.Point(15, 84);
this.txtGeneratedName.Name = "txtGeneratedName";
this.txtGeneratedName.Size = new System.Drawing.Size(412, 20);
this.txtGeneratedName.TabIndex = 7;
//
// lblNewFileName
//
this.lblNewFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblNewFileName.Location = new System.Drawing.Point(12, 107);
this.lblNewFileName.Name = "lblNewFileName";
this.lblNewFileName.Size = new System.Drawing.Size(286, 23);
this.lblNewFileName.TabIndex = 1;
this.lblNewFileName.Text = "${res:Dialog.Refactoring.ExtractInterface.NewFileName}:";
this.lblNewFileName.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
//
// txtNewFileName
//
this.txtNewFileName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtNewFileName.Location = new System.Drawing.Point(15, 133);
this.txtNewFileName.Name = "txtNewFileName";
this.txtNewFileName.Size = new System.Drawing.Size(412, 20);
this.txtNewFileName.TabIndex = 8;
this.txtNewFileName.TextChanged += new System.EventHandler(this.TxtNewFileNameTextChanged);
this.txtNewFileName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtNewFileNameKeyDown);
//
// btnSelectAll
//
this.btnSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSelectAll.Location = new System.Drawing.Point(321, 16);
this.btnSelectAll.Name = "btnSelectAll";
this.btnSelectAll.Size = new System.Drawing.Size(94, 23);
this.btnSelectAll.TabIndex = 4;
this.btnSelectAll.Text = "${res:Global.SelectAllButtonText}";
this.btnSelectAll.UseVisualStyleBackColor = true;
this.btnSelectAll.Click += new System.EventHandler(this.BtnSelectAllClick);
//
// selectMembersListBox
//
this.selectMembersListBox.CheckOnClick = true;
this.selectMembersListBox.Dock = System.Windows.Forms.DockStyle.Left;
this.selectMembersListBox.FormattingEnabled = true;
this.selectMembersListBox.HorizontalScrollbar = true;
this.selectMembersListBox.Location = new System.Drawing.Point(3, 16);
this.selectMembersListBox.Name = "selectMembersListBox";
this.selectMembersListBox.Size = new System.Drawing.Size(312, 154);
this.selectMembersListBox.TabIndex = 0;
this.selectMembersListBox.ThreeDCheckBoxes = true;
//
// specifyInterfaceGroupBox
//
this.specifyInterfaceGroupBox.Controls.Add(this.btnDeselectAll);
this.specifyInterfaceGroupBox.Controls.Add(this.btnSelectAll);
this.specifyInterfaceGroupBox.Controls.Add(this.selectMembersListBox);
this.specifyInterfaceGroupBox.Location = new System.Drawing.Point(12, 231);
this.specifyInterfaceGroupBox.Name = "specifyInterfaceGroupBox";
this.specifyInterfaceGroupBox.Size = new System.Drawing.Size(421, 173);
this.specifyInterfaceGroupBox.TabIndex = 3;
this.specifyInterfaceGroupBox.TabStop = false;
this.specifyInterfaceGroupBox.Text = "${res:Dialog.Refactoring.ExtractInterface.SelectPublicMembers}";
//
// cbIncludeComments
//
this.cbIncludeComments.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbIncludeComments.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.cbIncludeComments.Location = new System.Drawing.Point(6, 19);
this.cbIncludeComments.Name = "cbIncludeComments";
this.cbIncludeComments.Size = new System.Drawing.Size(410, 17);
this.cbIncludeComments.TabIndex = 11;
this.cbIncludeComments.Text = "${res:Dialog.Refactoring.ExtractInterface.IncludeComments}";
this.cbIncludeComments.UseVisualStyleBackColor = true;
//
// btnDeselectAll
//
this.btnDeselectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDeselectAll.Location = new System.Drawing.Point(321, 45);
this.btnDeselectAll.Name = "btnDeselectAll";
this.btnDeselectAll.Size = new System.Drawing.Size(94, 23);
this.btnDeselectAll.TabIndex = 5;
this.btnDeselectAll.Text = "${res:Global.DeselectAllButtonText}";
this.btnDeselectAll.UseVisualStyleBackColor = true;
this.btnDeselectAll.Click += new System.EventHandler(this.BtnDeselectAllClick);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.Location = new System.Drawing.Point(352, 414);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 9;
this.btnCancel.Text = "${res:Global.CancelButtonText}";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancelClick);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.Location = new System.Drawing.Point(271, 414);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 10;
this.btnOK.Text = "${res:Global.OKButtonText}";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
//
// groupOptions
//
this.groupOptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupOptions.Controls.Add(this.cbAddToClass);
this.groupOptions.Controls.Add(this.cbIncludeComments);
this.groupOptions.Location = new System.Drawing.Point(12, 159);
this.groupOptions.Name = "groupOptions";
this.groupOptions.Size = new System.Drawing.Size(421, 66);
this.groupOptions.TabIndex = 11;
this.groupOptions.TabStop = false;
this.groupOptions.Text = "${res:Global.OptionsButtonText}";
//
// cbAddToClass
//
this.cbAddToClass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cbAddToClass.Checked = true;
this.cbAddToClass.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbAddToClass.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.cbAddToClass.Location = new System.Drawing.Point(6, 42);
this.cbAddToClass.Name = "cbAddToClass";
this.cbAddToClass.Size = new System.Drawing.Size(410, 17);
this.cbAddToClass.TabIndex = 12;
this.cbAddToClass.Text = "${res:Dialog.Refactoring.ExtractInterface.AddInterfaceToClass}";
this.cbAddToClass.UseVisualStyleBackColor = true;
//
// ExtractInterfaceDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(445, 449);
this.Controls.Add(this.groupOptions);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lblInterfaceName);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.txtInterfaceName);
this.Controls.Add(this.txtNewFileName);
this.Controls.Add(this.specifyInterfaceGroupBox);
this.Controls.Add(this.lblGeneratedName);
this.Controls.Add(this.txtGeneratedName);
this.Controls.Add(this.lblNewFileName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.HelpButton = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ExtractInterfaceDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "${res:SharpDevelop.Refactoring.ExtractInterfaceCommand}";
this.specifyInterfaceGroupBox.ResumeLayout(false);
this.groupOptions.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.CheckBox cbAddToClass;
private System.Windows.Forms.GroupBox groupOptions;
private System.Windows.Forms.CheckBox cbIncludeComments;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnDeselectAll;
private System.Windows.Forms.GroupBox specifyInterfaceGroupBox;
private System.Windows.Forms.CheckedListBox selectMembersListBox;
private System.Windows.Forms.Button btnSelectAll;
private System.Windows.Forms.TextBox txtNewFileName;
private System.Windows.Forms.Label lblNewFileName;
private System.Windows.Forms.TextBox txtGeneratedName;
private System.Windows.Forms.Label lblGeneratedName;
private System.Windows.Forms.TextBox txtInterfaceName;
private System.Windows.Forms.Label lblInterfaceName;
}
}

196
src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.cs

@ -0,0 +1,196 @@ @@ -0,0 +1,196 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Refactoring;
namespace ICSharpCode.SharpDevelop.Gui
{
/// <summary>
/// Asks the user about Extract Interface refactoring options.
/// </summary>
/// <returns><see cref="ExtractInterfaceDialogResults"/></returns>
public partial class ExtractInterfaceDialog : Form
{
ExtractInterfaceOptions options;
bool hasSetFilenameExplicitly;
public ExtractInterfaceDialog()
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.Owner = WorkbenchSingleton.MainForm;
this.TopMost = true;
this.possibleInterfaceMembers = new List<IMember>();
this.hasSetFilenameExplicitly = false;
/// recursively passes the Text attribute of each Control on this form through our StringParser
ParseTextFor(this);
}
/// <summary>
/// Recursively passes the Text attribute of a <see cref="Control"/> (and it's
/// child controls) through our <see cref="StringParser"/>, rewriting the
/// Text values as it goes.
/// </summary>
/// <param name="control">The <see cref="Control"/> to process.</param>
void ParseTextFor(Control control)
{
control.Text = StringParser.Parse(control.Text);
foreach(Control subControl in control.Controls) {
ParseTextFor(subControl);
}
}
/// <summary>
/// A custom ShowDialog routine that handles pass-through deserialization and reserialization
/// of a <see cref="ExtractInterfaceOptions"/> object to encapsulate this operation's
/// parameters.
/// </summary>
/// <param name="options">
/// A <see cref="ExtractInterfaceOptions"/> containing initial, default values for the operation.
/// </param>
/// <returns>
/// A <see cref="ExtractInterfaceOptions"/> reference encapsulating the dialog's parameters.
/// </returns>
public ExtractInterfaceOptions ShowDialog(ExtractInterfaceOptions options)
{
InitializeFields(options);
options.IsCancelled = (base.ShowDialog() == DialogResult.Cancel);
return options;
}
List<IMember> possibleInterfaceMembers;
void InitializeFields(ExtractInterfaceOptions o)
{
this.options = o;
this.txtInterfaceName.Text = o.NewInterfaceName;
this.txtNewFileName.Text = o.SuggestedFileName;
this.txtGeneratedName.Text = o.FullyQualifiedName;
IClass c = o.ClassEntity;
foreach (IMethod m in c.Methods) {
if (m.IsPublic && !m.IsConstructor && !m.IsConst && !m.IsStatic) {
this.possibleInterfaceMembers.Add(m);
this.selectMembersListBox.Items.Add(FormatMemberForDisplay(m), CheckState.Checked);
}
}
foreach (IProperty p in c.Properties) {
if (p.IsPublic && !p.IsConst && !p.IsStatic) {
this.possibleInterfaceMembers.Add(p);
this.selectMembersListBox.Items.Add(FormatMemberForDisplay(p), CheckState.Checked);
}
}
}
// TODO: i think these really belong in the model (ExtractInterfaceOptions)
// rather than the view's code-behind...
string FormatMemberForDisplay(IMethod m)
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} {1} ( ", m.ReturnType.Name, m.Name);
foreach (IParameter p in m.Parameters) {
if (p != m.Parameters[0]) {
sb.Append(" , ");
}
sb.AppendFormat("{0} {1}", p.ReturnType.Name, p.Name);
}
sb.Append(" );");
return sb.ToString();
}
string FormatMemberForDisplay(IProperty p)
{
StringBuilder sb = new StringBuilder();
sb.AppendFormat("{0} {1} {{ ", p.ReturnType.Name, p.Name);
if (p.CanGet) sb.Append("get;");
if (p.CanSet && p.CanSet) sb.Append(" ");
if (p.CanSet) sb.Append("set;");
sb.Append(" }");
return sb.ToString();
}
#region Event Handlers
//bool insideCheckAll = false;
void BtnSelectAllClick(object sender, EventArgs e)
{
//insideCheckAll = true;
var numItems = selectMembersListBox.Items.Count;
for(var i = 0; i<numItems; i++) {
selectMembersListBox.SetItemCheckState(i, CheckState.Checked);
}
//insideCheckAll = false;
}
void BtnOKClick(object sender, EventArgs e)
{
this.options.ChosenMembers.Clear();
foreach (int i in selectMembersListBox.CheckedIndices) {
this.options.ChosenMembers.Add(this.possibleInterfaceMembers[i]);
}
this.options.IncludeComments = cbIncludeComments.CheckState == CheckState.Checked;
this.options.AddInterfaceToClass = cbAddToClass.CheckState == CheckState.Checked;
this.DialogResult = DialogResult.OK;
this.Close();
}
void BtnCancelClick(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
void BtnDeselectAllClick(object sender, EventArgs e)
{
//insideCheckAll = true;
var numItems = selectMembersListBox.Items.Count;
for(var i = 0; i<numItems; i++) {
selectMembersListBox.SetItemCheckState(i, CheckState.Unchecked);
}
//insideCheckAll = false;
}
void TxtInterfaceNameTextChanged(object sender, EventArgs e)
{
this.options.NewInterfaceName = this.txtInterfaceName.Text;
this.txtGeneratedName.Text = this.options.FullyQualifiedName;
if (!hasSetFilenameExplicitly) {
this.options.NewFileName = this.txtNewFileName.Text = this.options.SuggestedFileName;
}
}
void TxtNewFileNameTextChanged(object sender, EventArgs e)
{
// TODO: this logic should really be in the model...
if (hasSetFilenameExplicitly) {
this.options.NewFileName = this.txtNewFileName.Text;
}
}
void TxtNewFileNameKeyDown(object sender, KeyEventArgs e)
{
hasSetFilenameExplicitly = true;
}
#endregion
}
}

120
src/Main/Base/Project/Src/Gui/Dialogs/ExtractInterfaceDialog.resx

@ -0,0 +1,120 @@ @@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

4
src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/ClassBrowser.cs

@ -92,6 +92,8 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser @@ -92,6 +92,8 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser
contentPanel.Controls.Add(toolStrip);
ProjectService.SolutionLoaded += ProjectServiceSolutionChanged;
ProjectService.ProjectItemAdded += ProjectServiceSolutionChanged;
ProjectService.ProjectItemRemoved += ProjectServiceSolutionChanged;
ProjectService.ProjectAdded += ProjectServiceSolutionChanged; // rebuild view when project is added to solution
ProjectService.SolutionFolderRemoved += ProjectServiceSolutionChanged; // rebuild view when project is removed from solution
ProjectService.SolutionClosed += ProjectServiceSolutionClosed;
@ -104,7 +106,7 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser @@ -104,7 +106,7 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser
}
UpdateToolbars();
}
List<ParseInformationEventArgs> pending = new List<ParseInformationEventArgs>();
// running on main thread, invoked by the parser thread when a compilation unit changed

2
src/Main/Base/Project/Src/Project/IParser.cs

@ -12,7 +12,7 @@ using ICSharpCode.SharpDevelop.Project; @@ -12,7 +12,7 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop.Dom
{
/// <summary>
/// to do: find a better matching namespace - this class is in ICSharpCode.SharpDevelop.dll,
/// TODO: find a better matching namespace - this class is in ICSharpCode.SharpDevelop.dll,
/// not in Dom!
/// </summary>
public interface IParser

64
src/Main/Base/Project/Src/Services/RefactoringService/ExtractInterfaceOptions.cs

@ -0,0 +1,64 @@ @@ -0,0 +1,64 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using System.Collections.Generic;
using System.IO;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.SharpDevelop.Refactoring
{
/// <summary>
/// Description of ExtractInterfaceDetails.
/// </summary>
public class ExtractInterfaceOptions
{
IClass c;
public ExtractInterfaceOptions(IClass c)
{
if (null == c) {
throw new InvalidOperationException("ExtractInterfaceOptions requires a valid IClass");
}
this.c = c;
this.NewInterfaceName = this.ClassEntity.Name.StartsWith("I") ?
String.Format("{0}1", this.ClassEntity.Name) :
String.Format("I{0}", this.ClassEntity.Name);
this.NewFileName = this.SuggestedFileName;
this.ChosenMembers = new List<IMember>();
}
public IClass ClassEntity {
get {
return this.c;
}
}
public string NewInterfaceName {get; set;}
public string NewFileName {get;set;}
public bool IsCancelled {get; set;}
public bool IncludeComments {get; set;}
public bool AddInterfaceToClass {get; set;}
public List<IMember> ChosenMembers;
public string FullyQualifiedName {
get {
return String.Format("{0}.{1}",
c.Namespace,
this.NewInterfaceName);
}
}
public string SuggestedFileName {
get {
return String.Format("{0}{1}",
this.NewInterfaceName,
Path.GetExtension(ClassEntity.CompilationUnit.FileName));
}
}
}
}

190
src/Main/Base/Project/Src/Services/RefactoringService/FindReferencesAndRenameHelper.cs

@ -7,12 +7,15 @@ @@ -7,12 +7,15 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Text;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.Refactoring;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
using SearchAndReplace;
@ -21,6 +24,101 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -21,6 +24,101 @@ namespace ICSharpCode.SharpDevelop.Refactoring
{
public static class FindReferencesAndRenameHelper
{
#region Extract Interface
public static void ExtractInterface(IClass c)
{
ExtractInterfaceOptions extractInterface = new ExtractInterfaceOptions(c);
using (ExtractInterfaceDialog eid = new ExtractInterfaceDialog()) {
extractInterface = eid.ShowDialog(extractInterface);
if (extractInterface.IsCancelled) {
return;
}
// do rename
/*
MessageService.ShowMessageFormatted("Extracting interface",
@"Extracting {0} [{1}] from {2} into {3}",
extractInterface.NewInterfaceName,
extractInterface.FullyQualifiedName,
extractInterface.ClassEntity.Name,
extractInterface.NewFileName
);
` */
}
string newInterfaceFileName = Path.Combine(Path.GetDirectoryName(c.CompilationUnit.FileName),
extractInterface.NewFileName);
if (File.Exists(newInterfaceFileName)) {
int confirmReplace = MessageService.ShowCustomDialog("Extract Interface",
newInterfaceFileName+" already exists!",
0,
1,
"${res:Global.ReplaceButtonText}",
"${res:Global.AbortButtonText}");
if (confirmReplace == 1) {
return;
}
}
LanguageProperties language = c.ProjectContent.Language;
string classFileName = c.CompilationUnit.FileName;
string existingClassCode = ParserService.GetParseableFileContent(classFileName);
// build the new interface...
string newInterfaceCode =
language.RefactoringProvider.GenerateInterfaceForClass(extractInterface.NewInterfaceName,
extractInterface.ChosenMembers,
extractInterface.IncludeComments,
c.Namespace,
c.Name,
existingClassCode
);
if (newInterfaceCode == null)
return;
// ...dump it to a file...
IViewContent viewContent = FileService.GetOpenFile(newInterfaceFileName);
IEditable editable = viewContent as IEditable;
if (viewContent != null && editable != null) {
// simply update it
editable.Text = newInterfaceCode;
viewContent.PrimaryFile.SaveToDisk();
} else {
// create it
viewContent = FileService.NewFile(newInterfaceFileName, newInterfaceCode);
viewContent.PrimaryFile.SaveToDisk(newInterfaceFileName);
// ... and add it to the project
IProject project = (IProject)c.ProjectContent.Project;
if (project != null) {
FileProjectItem projectItem = new FileProjectItem(project, ItemType.Compile);
projectItem.FileName = newInterfaceFileName;
ProjectService.AddProjectItem(project, projectItem);
FileService.FireFileCreated(newInterfaceFileName, false);
project.Save();
ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
}
}
// finally, add the interface to the base types of the class that we're extracting from
if (extractInterface.AddInterfaceToClass) {
string modifiedClassCode = language.RefactoringProvider.AddBaseTypeToClass(existingClassCode, extractInterface.NewInterfaceName);
if (modifiedClassCode == null) {
return;
}
viewContent = FileService.OpenFile(classFileName);
editable = viewContent as IEditable;
if (editable == null) {
return;
}
editable.Text = modifiedClassCode;
}
}
#endregion
#region Rename Class
public static void RenameClass(IClass c)
{
@ -217,11 +315,11 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -217,11 +315,11 @@ namespace ICSharpCode.SharpDevelop.Refactoring
public struct Modification
{
public IDocument Document;
public ICSharpCode.TextEditor.Document.IDocument Document;
public int Offset;
public int LengthDifference;
public Modification(IDocument document, int offset, int lengthDifference)
public Modification(ICSharpCode.TextEditor.Document.IDocument document, int offset, int lengthDifference)
{
this.Document = document;
this.Offset = offset;
@ -229,7 +327,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -229,7 +327,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring
}
}
public static void ModifyDocument(List<Modification> modifications, IDocument doc, int offset, int length, string newName)
public static void ModifyDocument(List<Modification> modifications, ICSharpCode.TextEditor.Document.IDocument doc, int offset, int length, string newName)
{
foreach (Modification m in modifications) {
if (m.Document == doc) {
@ -283,6 +381,90 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -283,6 +381,90 @@ namespace ICSharpCode.SharpDevelop.Refactoring
ParserService.ParseViewContent(viewContent);
}
}
public static void MoveClassToFile(IClass c, string newFileName)
{
LanguageProperties language = c.ProjectContent.Language;
string existingCode = ParserService.GetParseableFileContent(c.CompilationUnit.FileName);
DomRegion fullRegion = language.RefactoringProvider.GetFullCodeRangeForType(existingCode, c);
if (fullRegion.IsEmpty) return;
Action removeExtractedCodeAction;
string newCode = ExtractCode(c, fullRegion, c.BodyRegion.BeginLine, out removeExtractedCodeAction);
newCode = language.RefactoringProvider.CreateNewFileLikeExisting(existingCode, newCode);
if (newCode == null)
return;
IViewContent viewContent = FileService.NewFile(newFileName, newCode);
viewContent.PrimaryFile.SaveToDisk(newFileName);
// now that the code is saved in the other file, remove it from the original document
removeExtractedCodeAction();
IProject project = (IProject)c.ProjectContent.Project;
if (project != null) {
FileProjectItem projectItem = new FileProjectItem(project, ItemType.Compile);
projectItem.FileName = newFileName;
ProjectService.AddProjectItem(project, projectItem);
FileService.FireFileCreated(newFileName, false);
project.Save();
ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
}
}
public static string ExtractCode(IClass c, DomRegion codeRegion, int indentationLine, out Action removeExtractedCodeAction)
{
ICSharpCode.TextEditor.Document.IDocument doc = GetDocument(c);
if (indentationLine < 1) indentationLine = 1;
if (indentationLine >= doc.TotalNumberOfLines) indentationLine = doc.TotalNumberOfLines;
LineSegment segment = doc.GetLineSegment(indentationLine - 1);
string mainLine = doc.GetText(segment);
string indentation = mainLine.Substring(0, mainLine.Length - mainLine.TrimStart().Length);
segment = doc.GetLineSegment(codeRegion.BeginLine - 1);
int startOffset = segment.Offset;
segment = doc.GetLineSegment(codeRegion.EndLine - 1);
int endOffset = segment.Offset + segment.Length;
StringReader reader = new StringReader(doc.GetText(startOffset, endOffset - startOffset));
removeExtractedCodeAction = delegate {
doc.Remove(startOffset, endOffset - startOffset);
doc.RequestUpdate(new ICSharpCode.TextEditor.TextAreaUpdate(ICSharpCode.TextEditor.TextAreaUpdateType.WholeTextArea));
doc.CommitUpdate();
};
// now remove indentation from extracted source code
string line;
StringBuilder b = new StringBuilder();
int endOfLastFilledLine = 0;
while ((line = reader.ReadLine()) != null) {
int startpos;
for (startpos = 0; startpos < line.Length && startpos < indentation.Length; startpos++) {
if (line[startpos] != indentation[startpos])
break;
}
if (startpos == line.Length) {
// empty line
if (b.Length > 0) {
b.AppendLine();
}
} else {
b.Append(line, startpos, line.Length - startpos);
b.AppendLine();
endOfLastFilledLine = b.Length;
}
}
b.Length = endOfLastFilledLine;
return b.ToString();
}
public static ICSharpCode.TextEditor.Document.IDocument GetDocument(IClass c)
{
ITextEditorControlProvider tecp = FileService.OpenFile(c.CompilationUnit.FileName) as ITextEditorControlProvider;
if (tecp == null) return null;
return tecp.TextEditorControl.Document;
}
#endregion
}
}

102
src/Main/Base/Project/Src/TextEditor/Commands/ClassBookmarkMenuBuilder.cs

@ -104,6 +104,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -104,6 +104,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
List<ToolStripItem> list = new List<ToolStripItem>();
// refactoring actions
if (!FindReferencesAndRenameHelper.IsReadOnly(c)) {
if (c.DeclaringType == null &&
!c.BodyRegion.IsEmpty &&
@ -136,7 +137,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -136,7 +137,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
StringParser.Parse("${res:SharpDevelop.Refactoring.MoveClassToFile}",
new string[,] {{ "FileName", Path.GetFileName(correctFileName) }}),
delegate {
MoveClassToFile(c, correctFileName);
FindReferencesAndRenameHelper.MoveClassToFile(c, correctFileName);
});
list.Add(cmd);
}
@ -146,9 +147,17 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -146,9 +147,17 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
cmd = new MenuCommand("${res:SharpDevelop.Refactoring.RenameCommand}", Rename);
cmd.Tag = c;
list.Add(cmd);
if (language.RefactoringProvider.SupportsExtractInterface) {
cmd = new MenuCommand("${res:SharpDevelop.Refactoring.ExtractInterfaceCommand}", ExtractInterface);
cmd.Tag = c;
list.Add(cmd);
}
}
// navigation actions
if (c.BaseTypes.Count > 0) {
list.Add(new MenuSeparator());
cmd = new MenuCommand("${res:SharpDevelop.Refactoring.GoToBaseCommand}", GoToBase);
cmd.Tag = c;
list.Add(cmd);
@ -156,6 +165,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -156,6 +165,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
AddImplementInterfaceCommands(c, list);
}
}
// Search actions
list.Add(new MenuSeparator());
if (!c.IsSealed && !c.IsStatic) {
cmd = new MenuCommand("${res:SharpDevelop.Refactoring.FindDerivedClassesCommand}", FindDerivedClasses);
cmd.Tag = c;
@ -194,83 +207,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -194,83 +207,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
}
}
}
static void MoveClassToFile(IClass c, string newFileName)
{
LanguageProperties language = c.ProjectContent.Language;
string existingCode = ParserService.GetParseableFileContent(c.CompilationUnit.FileName);
DomRegion fullRegion = language.RefactoringProvider.GetFullCodeRangeForType(existingCode, c);
if (fullRegion.IsEmpty) return;
Action removeExtractedCodeAction;
string newCode = ExtractCode(c, fullRegion, c.BodyRegion.BeginLine, out removeExtractedCodeAction);
newCode = language.RefactoringProvider.CreateNewFileLikeExisting(existingCode, newCode);
if (newCode == null)
return;
IViewContent viewContent = FileService.NewFile(newFileName, newCode);
viewContent.PrimaryFile.SaveToDisk(newFileName);
// now that the code is saved in the other file, remove it from the original document
removeExtractedCodeAction();
IProject project = (IProject)c.ProjectContent.Project;
if (project != null) {
FileProjectItem projectItem = new FileProjectItem(project, ItemType.Compile);
projectItem.FileName = newFileName;
ProjectService.AddProjectItem(project, projectItem);
FileService.FireFileCreated(newFileName, false);
project.Save();
ProjectBrowserPad.Instance.ProjectBrowserControl.RefreshView();
}
}
static string ExtractCode(IClass c, DomRegion codeRegion, int indentationLine, out Action removeExtractedCodeAction)
{
ICSharpCode.TextEditor.Document.IDocument doc = GetDocument(c);
if (indentationLine < 1) indentationLine = 1;
if (indentationLine >= doc.TotalNumberOfLines) indentationLine = doc.TotalNumberOfLines;
LineSegment segment = doc.GetLineSegment(indentationLine - 1);
string mainLine = doc.GetText(segment);
string indentation = mainLine.Substring(0, mainLine.Length - mainLine.TrimStart().Length);
segment = doc.GetLineSegment(codeRegion.BeginLine - 1);
int startOffset = segment.Offset;
segment = doc.GetLineSegment(codeRegion.EndLine - 1);
int endOffset = segment.Offset + segment.Length;
StringReader reader = new StringReader(doc.GetText(startOffset, endOffset - startOffset));
removeExtractedCodeAction = delegate {
doc.Remove(startOffset, endOffset - startOffset);
doc.RequestUpdate(new ICSharpCode.TextEditor.TextAreaUpdate(ICSharpCode.TextEditor.TextAreaUpdateType.WholeTextArea));
doc.CommitUpdate();
};
// now remove indentation from extracted source code
string line;
StringBuilder b = new StringBuilder();
int endOfLastFilledLine = 0;
while ((line = reader.ReadLine()) != null) {
int startpos;
for (startpos = 0; startpos < line.Length && startpos < indentation.Length; startpos++) {
if (line[startpos] != indentation[startpos])
break;
}
if (startpos == line.Length) {
// empty line
if (b.Length > 0) {
b.AppendLine();
}
} else {
b.Append(line, startpos, line.Length - startpos);
b.AppendLine();
endOfLastFilledLine = b.Length;
}
}
b.Length = endOfLastFilledLine;
return b.ToString();
}
void AddImplementInterfaceCommandItems(List<ToolStripItem> subItems, IClass c, bool explicitImpl)
{
CodeGenerator codeGen = c.ProjectContent.Language.CodeGenerator;
@ -281,7 +218,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -281,7 +218,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
if (interf != null && interf.ClassType == ClassType.Interface) {
IReturnType rtCopy = rt; // copy for access by anonymous method
EventHandler eh = delegate {
TextEditorDocument d = new TextEditorDocument(GetDocument(c));
TextEditorDocument d = new TextEditorDocument(FindReferencesAndRenameHelper.GetDocument(c));
if (d != null)
codeGen.ImplementInterface(rtCopy, d, explicitImpl, c);
ParserService.ParseCurrentViewContent();
@ -314,11 +251,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands @@ -314,11 +251,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Commands
}
}
static ICSharpCode.TextEditor.Document.IDocument GetDocument(IClass c)
void ExtractInterface(object sender, EventArgs e)
{
ITextEditorControlProvider tecp = FileService.OpenFile(c.CompilationUnit.FileName) as ITextEditorControlProvider;
if (tecp == null) return null;
return tecp.TextEditorControl.Document;
MenuCommand item = (MenuCommand)sender;
FindReferencesAndRenameHelper.ExtractInterface((IClass)item.Tag);
}
void GoToBase(object sender, EventArgs e)

2
src/Main/Base/Test/NRefactoryResolverTests.cs

@ -39,7 +39,7 @@ namespace ICSharpCode.SharpDevelop.Tests @@ -39,7 +39,7 @@ namespace ICSharpCode.SharpDevelop.Tests
NRefactoryASTConvertVisitor visitor = new NRefactoryASTConvertVisitor(pc);
visitor.VisitCompilationUnit(p.CompilationUnit, null);
visitor.Cu.FileName = fileName;
Assert.AreEqual(0, p.Errors.Count, "Parse error preparing compilation unit");
Assert.AreEqual(0, p.Errors.Count, String.Format("Parse error preparing compilation unit: {0}", p.Errors.ErrorOutput));
visitor.Cu.ErrorsDuringCompile = p.Errors.Count > 0;
foreach (IClass c in visitor.Cu.Classes) {
pc.AddClassToNamespaceList(c);

288
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/NRefactoryRefactoringProvider.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using ICSharpCode.NRefactory.Ast;
using ICSharpCode.NRefactory.PrettyPrinter;
@ -60,6 +61,293 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -60,6 +61,293 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
}
}
IOutputAstVisitor GetOutputVisitor() {
switch (language) {
case NR.SupportedLanguage.CSharp:
return new CSharpOutputVisitor();
case NR.SupportedLanguage.VBNet:
return new VBNetOutputVisitor();
default:
throw new NotSupportedException();
}
}
string CommentToken {
get {
switch (language) {
case NR.SupportedLanguage.CSharp:
return "//";
case NR.SupportedLanguage.VBNet:
return "'";
default:
throw new NotSupportedException();
}
}
}
#region ExtractInterface
public override bool SupportsExtractInterface {
get {
return true;
}
}
private class ExtractInterfaceVisitor : NR.Visitors.AbstractAstVisitor
{
string newInterfaceName;
string sourceClassName;
string sourceNamespace;
Dictionary<string, IMember> membersToInclude;
public ExtractInterfaceVisitor(string newInterfaceName,
string sourceNamespace,
string sourceClassName,
IList<IMember> chosenMembers) {
this.newInterfaceName = newInterfaceName;
this.sourceNamespace = sourceNamespace;
this.sourceClassName = sourceClassName;
// store the chosen members in a dictionary for easy lookup
membersToInclude = new Dictionary<string, IMember>();
foreach(IMember m in chosenMembers) {
membersToInclude.Add(m.Name, m);
}
}
public override object VisitCompilationUnit(CompilationUnit compilationUnit, object data)
{
// strip out any usings & extract our TypeReference from the NameSpace
// we walk backwards so that deletions don't affect the iteration
NamespaceDeclaration ns;
TypeDeclaration td;
object child;
object nsChild;
for(int i = compilationUnit.Children.Count-1; i>=0; i--) {
child = compilationUnit.Children[i];
if (child is UsingDeclaration) {
// we don't want our usings here...
compilationUnit.Children.RemoveAt(i);
}
else if (child is NamespaceDeclaration) {
ns = (NamespaceDeclaration)child;
if (ns.Name != this.sourceNamespace) {
// we're not interested in this namespace...
compilationUnit.Children.RemoveAt(i);
} else {
// this NamespaceDeclaration presumably contains our source class
// walk its children backwards to that removing them won't break the iteration
for(int j = ns.Children.Count-1; j>=0; j--) {
nsChild = ns.Children[j];
if (nsChild is TypeDeclaration) {
td = (TypeDeclaration)nsChild;
if (td.Name == this.sourceClassName) {
// keep it, and substitute it for the current NamespaceDeclaration
compilationUnit.Children[i] = td;
} else {
// it's not the class we're extracting from
ns.Children.RemoveAt(j);
}
} else {
// it's not even a class... (e.g. using, etc)
ns.Children.RemoveAt(j);
}
}
}
} else {
// we don't actually want to throw an exception here just because we havn't forseen the node type...
//throw new NotSupportedException("trimming "+compilationUnit.Children[i].ToString()+" is not supported.");
}
}
return base.VisitCompilationUnit(compilationUnit, data);
}
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data)
{
// rewrite the type declaration to an interface
typeDeclaration.Attributes.Clear();
typeDeclaration.BaseTypes.Clear();
typeDeclaration.Type = NR.Ast.ClassType.Interface;
typeDeclaration.Name = newInterfaceName;
// remove those children who are not explicitly listed in our 'membersToInclude' dictionary
// we walk backwards so that deletions don't affect the iteration
bool keepIt;
MethodDeclaration method;
PropertyDeclaration property;
object child;
for (int i = typeDeclaration.Children.Count-1; i >= 0; i--) {
keepIt = false;
child = typeDeclaration.Children[i];
if (child is MethodDeclaration) {
method = (MethodDeclaration)child;
if (membersToInclude.ContainsKey(method.Name)
&& ((method.Modifier & Modifiers.Static) == Modifiers.None)) {
keepIt = true;
}
} else if (child is PropertyDeclaration) {
property = (PropertyDeclaration)child;
if (membersToInclude.ContainsKey(property.Name)
&& ((property.Modifier & Modifiers.Static) == Modifiers.None)) {
keepIt = true;
}
}
if (!keepIt) {
typeDeclaration.Children.RemoveAt(i);
}
}
// must call the base method to ensure that this type's children get visited
return base.VisitTypeDeclaration(typeDeclaration, data);
}
public override object VisitMethodDeclaration(MethodDeclaration methodDeclaration, object data)
{
// strip out the public modifier...
methodDeclaration.Modifier = NR.Ast.Modifiers.None;
// ...and the method body
methodDeclaration.Body = BlockStatement.Null;
return null;
}
public override object VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration, object data)
{
// strip out the public modifiers...
propertyDeclaration.Modifier = NR.Ast.Modifiers.None;
// ... and the body of any get block...
if (propertyDeclaration.HasGetRegion) {
propertyDeclaration.GetRegion.Block = BlockStatement.Null;
}
// ... and the body of any set block...
if (propertyDeclaration.HasSetRegion) {
propertyDeclaration.SetRegion.Block = BlockStatement.Null;
}
return null;
}
}
public override string GenerateInterfaceForClass(string newInterfaceName,
IList<IMember> membersToKeep,
bool preserveComments,
string sourceNamespace,
string sourceClassName,
string existingCode
)
{
string codeForNewInterface = "<insert code for '"+newInterfaceName+"' here>";
NR.IParser parser = ParseFile(null, existingCode);
if (parser == null) {
return null;
}
// use a custom IAstVisitor to strip our class out of this file,
// rewrite it as our desired interface, and strip out every
// member except those we want to keep in our new interface.
ExtractInterfaceVisitor extractInterfaceVisitor = new ExtractInterfaceVisitor(newInterfaceName,
sourceNamespace,
sourceClassName,
membersToKeep);
parser.CompilationUnit.AcceptVisitor(extractInterfaceVisitor, null);
// now use an output visitor for the appropriate language (based on
// extension of the existing code file) to format the new interface.
IOutputAstVisitor output = GetOutputVisitor();
if (preserveComments) {
// run the output visitor with the specials inserter to insert comments
// NOTE: *all* comments will be preserved, even for code that has been
// removed to create the interface...
// TODO: is it worth enhancing the SpecialsNodeInserter to attach comments directly to code so they can be filtered based on what is preserved after a transformation?
using (SpecialNodesInserter.Install(parser.Lexer.SpecialTracker.RetrieveSpecials(), output)) {
parser.CompilationUnit.AcceptVisitor(output, null);
}
} else {
// run the output visitor without the specials inserter
parser.CompilationUnit.AcceptVisitor(output, null);
}
parser.Dispose();
if (output.Errors.Count == 0) {
// get the output
codeForNewInterface = output.Text;
} else {
// dump errors into the new interface file...
codeForNewInterface = String.Format("{0} {1}",
this.CommentToken, output.Errors.ErrorOutput);
}
// wrap the new code in the same comments/usings/namespace as the the original class file.
string newFileContent = CreateNewFileLikeExisting(existingCode, codeForNewInterface);
return newFileContent;
}
private class AddTypeToBaseTypesVisitor : NR.Visitors.AbstractAstVisitor
{
private TypeReference typeReference;
public AddTypeToBaseTypesVisitor(string newTypeName)
{
this.typeReference = new TypeReference(newTypeName);
}
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data)
{
// test the Type string property explicitly (rather than .BaseTypes.Contains())
// to ensure that a matching type name is enough to prevent adding a second
// reference.
bool exists = false;
foreach(TypeReference type in typeDeclaration.BaseTypes) {
if (type.Type == this.typeReference.Type) {
exists = true;
break;
}
}
if (!exists) {
typeDeclaration.BaseTypes.Add(this.typeReference);
}
return base.VisitTypeDeclaration(typeDeclaration, data);
}
}
public override string AddBaseTypeToClass(string existingCode, string newInterfaceName)
{
string newCode = existingCode;
NR.IParser parser = ParseFile(null, existingCode);
if (parser == null) {
return null;
}
AddTypeToBaseTypesVisitor addTypeToBaseTypesVisitor = new AddTypeToBaseTypesVisitor(newInterfaceName);
parser.CompilationUnit.AcceptVisitor(addTypeToBaseTypesVisitor, null);
// now use an output visitor for the appropriate language (based on
// extension of the existing code file) to format the new interface.
IOutputAstVisitor output = GetOutputVisitor();
// run the output visitor with the specials inserter to insert comments
using (SpecialNodesInserter.Install(parser.Lexer.SpecialTracker.RetrieveSpecials(), output)) {
parser.CompilationUnit.AcceptVisitor(output, null);
}
parser.Dispose();
if (output.Errors.Count > 0) {
ShowSourceCodeErrors(null, output.Errors.ErrorOutput);
return null;
}
return output.Text;
}
#endregion
#region FindUnusedUsingDeclarations
protected class PossibleTypeReference
{

30
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Refactoring/RefactoringProvider.cs

@ -29,6 +29,29 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -29,6 +29,29 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
}
}
#region ExtractInterface
public virtual bool SupportsExtractInterface {
get {
return false;
}
}
public virtual string GenerateInterfaceForClass(string newInterfaceName,
IList<IMember> membersToExtract,
bool preserveComments,
string sourceNamespace,
string sourceClassName,
string existingCode
)
{
throw new NotSupportedException();
}
public virtual string AddBaseTypeToClass(string existingCode, string newInterfaceName) {
throw new NotSupportedException();
}
#endregion
#region FindUnusedUsingDeclarations
public virtual bool SupportsFindUnusedUsingDeclarations {
get {
return false;
@ -39,7 +62,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -39,7 +62,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
{
throw new NotSupportedException();
}
#endregion
#region CreateNewFileLikeExisting
public virtual bool SupportsCreateNewFileLikeExisting {
get {
return false;
@ -57,8 +82,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -57,8 +82,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
{
throw new NotSupportedException();
}
#endregion
#region ExtractCodeForType
public virtual bool SupportsGetFullCodeRangeForType {
get {
return false;
@ -69,7 +95,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring @@ -69,7 +95,9 @@ namespace ICSharpCode.SharpDevelop.Dom.Refactoring
{
throw new NotSupportedException();
}
#endregion
}
}

31
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/AssemblyInfo.cs

@ -0,0 +1,31 @@ @@ -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("ICSharpCode.SharpDevelop.Dom.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ICSharpCode.SharpDevelop.Dom.Tests")]
[assembly: AssemblyCopyright("")]
[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.*")]

66
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/ICSharpCode.SharpDevelop.Dom.Tests.csproj

@ -0,0 +1,66 @@ @@ -0,0 +1,66 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{7DB80259-24D4-46C3-A024-53FF1987733D}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>ICSharpCode.SharpDevelop.Dom.Tests</RootNamespace>
<AssemblyName>ICSharpCode.SharpDevelop.Dom.Tests</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<OutputPath>..\..\..\..\..\bin\UnitTests\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\..\..\..\Tools\NUnit\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="NRefactoryRefactoringProviderTests.cs" />
<Compile Include="NUnitHelpers\SyntaxHelpers.cs" />
<Compile Include="NUnitHelpers\Constraints.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj">
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project>
<Name>NRefactory</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj">
<Project>{4980B743-B32F-4aba-AABD-45E2CAD3568D}</Project>
<Name>ICSharpCode.SharpDevelop.Tests</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
</ProjectReference>
<Folder Include="NUnitHelpers" />
</ItemGroup>
</Project>

25
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryRefactoringProviderTestFixt.cs

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
/*
* Created by SharpDevelop.
* User: alperd1
* Date: 2/7/2008
* Time: 12:48 PM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
namespace ICSharpCode.SharpDevelop.Dom.Tests
{
[TestFixture]
public class NRefactoryRefactoringProviderTestFixture
{
[Test]
public void TestMethod()
{
// TODO: Add your test.
}
}
}

500
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NRefactoryRefactoringProviderTests.cs

@ -0,0 +1,500 @@ @@ -0,0 +1,500 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using System.Collections.Generic;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.Refactoring;
using NR = ICSharpCode.NRefactory;
using ICSharpCode.SharpDevelop.Tests;
namespace ICSharpCode.SharpDevelop.Dom.Tests
{
[TestFixture]
public class NRefactoryRefactoringProviderTests
{
NRefactoryResolverTests helper;
NRefactoryRefactoringProvider csharpRefactoringProvider;
// TODO: write VBNet tests to ensure that Extract Interface works on VB.NET syntax
NRefactoryRefactoringProvider vbnetRefactoringProvider;
#region Extract Interface
private class ITestClass {
public const string FileName = "ITestCase.cs";
public const string FileContent = @"// <file>
// <copyright see=""prj:///doc/copyright.txt""/>
// <license see=""prj:///doc/license.txt""/>
// <owner name=""David Alpert"" email=""david@spinthemoose.com""/>
// <version>$Revision: $</version>
// </file>
using System;
using System.Collections.Generics;
namespace ExtractInterface.Tests {
public interface ITestCase {
string Name {get;}
string Property {get; set;}
string Configure {set;}
IList<int> GetRange(string subject);
int MultiplyBy5(int x,
out bool success);
event EventHandler<UnhandledExceptionEventArgs> ConfigurationChanged;
}
}
";
}
private class TestClass {
public const string FileName = "TestCase.cs";
// TODO: write TestClass.FileContent to refactor the string literal code blocks
// from the following tests.
public const string FileContent = @"";
}
#region Sanity Test
[Test]
/// <summary>
/// ensures that the custom assertions in this test fixture are working properly
/// </summary>
public void SanityCheckTest() {
ICompilationUnit cu = helper.Parse(ITestClass.FileName, ITestClass.FileContent);
Assert.That(cu.Classes, Has.Count(1));
IClass c = cu.Classes[0];
Assert.That(c.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(c.BaseTypes, Has.Count(0));
Assert.That(c.Attributes, Has.Count(0));
Assert.That(c.Events, Has.Count(1));
Assert.That(c.Methods, Has.Count(2));
{
IMethod m = c.Methods[0];
Assert.That(m.Name, Is.EqualTo("GetRange"));
Assert.That(m.Parameters, Has.Count(1));
Assert.That(m, HasEmpty.MethodBody);
m = c.Methods[1];
Assert.That(m.Name, Is.EqualTo("MultiplyBy5"));
Assert.That(m.Parameters, Has.Count(2));
Assert.That(m, HasEmpty.MethodBody);
}
Assert.That(c.Properties, Has.Count(3));
{
IProperty p = c.Properties[0];
Assert.That(p.Name, Is.EqualTo("Name"));
Assert.That(p.CanGet, Is.True);
Assert.That(p, HasEmpty.GetRegion);
Assert.That(p.CanSet, Is.False);
p = c.Properties[1];
Assert.That(p.Name, Is.EqualTo("Property"));
Assert.That(p.CanGet, Is.True);
Assert.That(p, HasEmpty.GetRegion);
Assert.That(p.CanSet, Is.True);
Assert.That(p, HasEmpty.SetRegion);
p = c.Properties[2];
Assert.That(p.Name, Is.EqualTo("Configure"));
Assert.That(p.CanGet, Is.False);
Assert.That(p.CanSet, Is.True);
Assert.That(p, HasEmpty.SetRegion);
}
}
#endregion
[Test]
public void GenerateInterfaceFromImplicitPropertyTest() {
string fileContent = @"
using System;
namespace ExtractInterfaceImplicitPropertyTest {
public class ClassA {
string myName;
public ClassA() {
string myName = String.Empty;
}
public string Category {
get; set;
}
}
}
";
IList<IMember> membersToExtract = new List<IMember>();
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IClass c = cu.Classes[0];
IProperty originalProperty = c.Properties[0];
membersToExtract.Add(originalProperty);
string interfaceName = "IA";
string sourceClassName = c.Name;
string sourceNamespace = c.Namespace;
string interfaceCode = csharpRefactoringProvider.GenerateInterfaceForClass(interfaceName,
membersToExtract,
false,
sourceNamespace,
sourceClassName,
fileContent);
ICompilationUnit icu = helper.Parse(TestClass.FileName, interfaceCode);
IClass i = icu.Classes[0];
Assert.That(i.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(i.Name, Is.EqualTo(interfaceName));
Assert.That(i.Namespace, Is.EqualTo(c.Namespace));
Assert.That(i.Methods.Count, Is.EqualTo(0));
Assert.That(i.Properties.Count, Is.EqualTo(1));
IProperty extractedProperty = i.Properties[0];
Assert.That(extractedProperty.Name, Is.EqualTo(originalProperty.Name));
Assert.That(extractedProperty.CanGet, Is.True);
Assert.That(extractedProperty, HasEmpty.GetRegion);
Assert.That(extractedProperty.CanSet, Is.True);
Assert.That(extractedProperty, HasEmpty.SetRegion);
}
[Test]
[Ignore] // TODO: C# parser seems to have trouble with an implicit property with a private setter?
public void GenerateInterfaceFromImplicitPropertyWithPrivateSetterTest() {
string fileContent = @"
using System;
namespace ExtractInterfaceImplicitPropertyTest {
public class ClassA {
string myName;
public ClassA() {
string myName = String.Empty;
}
public string Category {
get; private set;
}
}
}
";
IList<IMember> membersToExtract = new List<IMember>();
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IClass c = cu.Classes[0];
IProperty originalProperty = c.Properties[0];
membersToExtract.Add(originalProperty);
string interfaceName = "IA";
string sourceClassName = c.Name;
string sourceNamespace = c.Namespace;
string interfaceCode = csharpRefactoringProvider.GenerateInterfaceForClass(interfaceName,
membersToExtract,
false,
sourceNamespace,
sourceClassName,
fileContent);
ICompilationUnit icu = helper.Parse(TestClass.FileName, interfaceCode);
IClass i = icu.Classes[0];
Assert.That(i.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(i.Name, Is.EqualTo(interfaceName));
Assert.That(i.Namespace, Is.EqualTo(c.Namespace));
Assert.That(i.Methods.Count, Is.EqualTo(0));
Assert.That(i.Properties.Count, Is.EqualTo(1));
IProperty extractedProperty = i.Properties[0];
Assert.That(extractedProperty.Name, Is.EqualTo(originalProperty.Name));
Assert.That(extractedProperty.CanGet, Is.True);
Assert.That(extractedProperty, HasEmpty.GetRegion);
Assert.That(extractedProperty.CanSet, Is.False);
Assert.That(extractedProperty, HasEmpty.SetRegion);
}
[Test]
public void GenerateInterfaceFromExplicitPropertyTest() {
string fileContent = @"
using System;
namespace ExtractInterfaceImplicitPropertyTest {
public class ClassA {
string myName;
public ClassA() {
string myName = String.Empty;
}
public string Name {
get{
return myName;
}
set {
myName = value;
}
}
}
}
";
IList<IMember> membersToExtract = new List<IMember>();
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IClass c = cu.Classes[0];
IProperty originalProperty = c.Properties[0];
membersToExtract.Add(originalProperty);
string interfaceName = "IA";
string sourceClassName = c.Name;
string sourceNamespace = c.Namespace;
string interfaceCode = csharpRefactoringProvider.GenerateInterfaceForClass(interfaceName,
membersToExtract,
false,
sourceNamespace,
sourceClassName,
fileContent);
ICompilationUnit icu = helper.Parse(ITestClass.FileName, interfaceCode);
IClass i = icu.Classes[0];
Assert.That(i.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(i.Name, Is.EqualTo(interfaceName));
Assert.That(i.Namespace, Is.EqualTo(c.Namespace));
Assert.That(i.Methods.Count, Is.EqualTo(0));
IProperty extractedProperty = i.Properties[0];
Assert.That(extractedProperty.Name, Is.EqualTo(originalProperty.Name));
Assert.That(extractedProperty.CanGet, Is.True);
Assert.That(extractedProperty, HasEmpty.GetRegion);
Assert.That(extractedProperty.CanSet, Is.True);
Assert.That(extractedProperty, HasEmpty.SetRegion);
}
[Test]
public void GenerateInterfaceFromMethodsTest() {
string fileContent = @"
using System;
namespace ExtractInterfaceImplicitPropertyTest {
public class ClassA {
string myName;
public ClassA() {
string myName = String.Empty;
}
public string GetName() {
return myName;
}
static public int GetNumber() {
return -4;
}
}
public interface ITestInterface {
string GetName();
int Number {
get; set;
}
int AnotherNumber {
get;
}
int AnInlineNumber {get;set; }
}
}
";
IList<IMember> membersToExtract = new List<IMember>();
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IClass c = cu.Classes[0];
IMethod originalMethod = c.Methods[1];
membersToExtract.Add(originalMethod);
string interfaceName = "IClassA";
string sourceClassName = c.Name;
string sourceNamespace = c.Namespace;
string interfaceCode = csharpRefactoringProvider.GenerateInterfaceForClass(interfaceName,
membersToExtract,
false,
sourceNamespace,
sourceClassName,
fileContent);
ICompilationUnit icu = helper.Parse(ITestClass.FileName, interfaceCode);
IClass i = icu.Classes[0];
Assert.That(i.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(i.Name, Is.EqualTo(interfaceName));
Assert.That(i.Namespace, Is.EqualTo(c.Namespace));
Assert.That(i.Properties.Count, Is.EqualTo(0));
Assert.That(i.Methods.Count, Is.EqualTo(1));
IMethod extractedMethod = i.Methods[0];
Assert.That(extractedMethod.Name, Is.EqualTo(originalMethod.Name));
Assert.That(extractedMethod, HasEmpty.MethodBody);
}
[Test]
public void GenerateInterfaceWithStaticMethodsTest() {
string fileContent = @"
using System;
namespace ExtractInterfaceImplicitPropertyTest {
public class ClassA {
string myName;
public ClassA() {
string myName = String.Empty;
}
public string GetName() {
return myName;
}
static public int GetNumber() {
return -4;
}
}
}
";
IList<IMember> membersToExtract = new List<IMember>();
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IClass c = cu.Classes[0];
IMethod originalMethod = c.Methods[1]; // GetName()
membersToExtract.Add(originalMethod);
IMethod originalStaticMethod = c.Methods[2]; // GetNumber()
membersToExtract.Add(originalStaticMethod);
string interfaceName = "IClassA";
string sourceClassName = c.Name;
string sourceNamespace = c.Namespace;
string interfaceCode = csharpRefactoringProvider.GenerateInterfaceForClass(interfaceName,
membersToExtract,
false,
sourceNamespace,
sourceClassName,
fileContent);
ICompilationUnit icu = helper.Parse(ITestClass.FileName, interfaceCode);
IClass i = icu.Classes[0];
Assert.That(i.ClassType, Is.EqualTo(ClassType.Interface));
Assert.That(i.Name, Is.EqualTo(interfaceName));
Assert.That(i.Namespace, Is.EqualTo(c.Namespace));
Assert.That(i.Properties.Count, Is.EqualTo(0));
Assert.That(i.Methods.Count, Is.EqualTo(1));
IMethod extractedMethod = i.Methods[0];
Assert.That(extractedMethod.Name, Is.EqualTo(originalMethod.Name));
Assert.That(extractedMethod, HasEmpty.MethodBody);
}
#endregion
#region FindUnusedUsingDeclarations
[Test]
public void FindUnusedUsingDeclarationsTest()
{
string fileName = "a.cs";
string fileContent = @"
using System;
using System.Collections;
using System.Collections.Generic;
namespace UnusedUsingDeclarationsTest {
public class A {
public A() {
string testString = String.Empty;
}
}
}
";
ICompilationUnit cu = helper.Parse(TestClass.FileName, fileContent);
IList<IUsing> unusedUsings = csharpRefactoringProvider.FindUnusedUsingDeclarations(null, fileName, fileContent, cu);
Assert.That(unusedUsings.Count, Is.EqualTo(2));
Assert.That(unusedUsings[0].Usings.Count, Is.EqualTo(1));
Assert.That(unusedUsings[0].Usings[0], Is.EqualTo("System.Collections"));
Assert.That(unusedUsings[1].Usings.Count, Is.EqualTo(1));
Assert.That(unusedUsings[1].Usings[0], Is.EqualTo("System.Collections.Generic"));
}
[Test]
public void NoUnusedUsingDeclarationsToFindTest()
{
string fileName = "a.cs";
string fileContent = @"
using System;
namespace UnusedUsingDeclarationsTest {
public class A {
public A() {
string testString = String.Empty;
}
}
}
";
ICompilationUnit cu = helper.Parse(fileName, fileContent);
IList<IUsing> unusedUsings = csharpRefactoringProvider.FindUnusedUsingDeclarations(null, fileName, fileContent, cu);
Assert.That(unusedUsings.Count, Is.EqualTo(0));
}
#endregion
#region Test-specific setup/tear down
[SetUp]
public void TestInit()
{
// TODO: Add Test-specific Init code.
}
[TearDown]
public void TestDispose()
{
// TODO: Add Test-specific tear down code.
}
#endregion
#region Fixture setup/tear down
[TestFixtureSetUp]
public void Init()
{
helper = new NRefactoryResolverTests();
csharpRefactoringProvider = NRefactoryRefactoringProvider.NRefactoryCSharpProviderInstance;
vbnetRefactoringProvider = NRefactoryRefactoringProvider.NRefactoryVBNetProviderInstance;
}
[TestFixtureTearDown]
public void Dispose()
{
// TODO: Add Fixture tear down code.
}
#endregion
}
}

99
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NUnitHelpers/Constraints.cs

@ -0,0 +1,99 @@ @@ -0,0 +1,99 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using ICSharpCode.SharpDevelop.Dom;
namespace NUnit.Framework.Constraints
{
#region IProperty constraints
/// <summary>
/// Abstract NUnit Constraint to refactor the test for
/// emptiness of an IProperty's get or set accessor region.
/// </summary>
public abstract class PropertyAccessorIsEmptyConstraint : NUnit.Framework.Constraints.Constraint
{
protected IProperty p;
protected abstract string accessorText {get;}
protected abstract DomRegion RegionToTest {get;}
public override bool Matches(object actual)
{
this.actual = actual;
this.p = actual as IProperty;
if (actual is IProperty) {
// test to ensure that the DomRegion encapsulates either "get;" or "set;"
return AccessorDomRegionIsEmpty(this.RegionToTest);
}
// not an IProperty
return false;
}
public bool AccessorDomRegionIsEmpty(DomRegion region) {
return region.EndLine == region.BeginLine
&& region.EndColumn - region.BeginColumn == 4;
}
public override void WriteMessageTo(MessageWriter writer) {
if (this.actual is IProperty) {
writer.WriteMessageLine("Expected {0} to have an empty {1} accessor but it was not empty {2}.", this.actual, this.accessorText, this.RegionToTest);
} else {
writer.WriteMessageLine("{0} is not an IProperty; cannot test for the emptiness of a {1} accessor.", this.actual, this.accessorText);
}
}
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate(String.Format("An IProperty with an empty {0} region", this.accessorText));
}
}
public class PropertyGetIsEmptyConstraint : PropertyAccessorIsEmptyConstraint
{
protected override string accessorText { get { return "get"; } }
protected override DomRegion RegionToTest { get { return this.p.GetterRegion; } }
}
public class PropertySetIsEmptyConstraint : PropertyAccessorIsEmptyConstraint
{
protected override string accessorText { get { return "set"; } }
protected override DomRegion RegionToTest { get { return this.p.SetterRegion; } }
}
#endregion
#region IMethod Constraints
public class MethodBodyIsEmptyConstraint : NUnit.Framework.Constraints.Constraint
{
IMethod m;
public override bool Matches(object actual)
{
this.actual = actual;
this.m = actual as IMethod;
if (this.m == null) {
return false;
}
return m.BodyRegion.EndLine == 0 && m.BodyRegion.EndColumn == 0;
}
public override void WriteMessageTo(MessageWriter writer)
{
if (this.actual is IMethod) {
writer.WriteMessageLine("Expected {0} to have an empty BodyRegion but it was not empty {1}.", this.m, this.m.BodyRegion);
} else {
writer.WriteMessageLine("{0} is not an IMethod; cannot test for the emptiness of a it's BodyRegion.", this.actual);
}
}
public override void WriteDescriptionTo(MessageWriter writer)
{
writer.WritePredicate("A method with an empty BodyRegion");
}
}
#endregion
}

27
src/Main/ICSharpCode.SharpDevelop.Dom/Tests/ICSharpCode.SharpDevelop.Dom.Tests/NUnitHelpers/SyntaxHelpers.cs

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Alpert" email="david@spinthemoose.com"/>
// <version>$Revision: $</version>
// </file>
using System;
using NUnit.Framework.Constraints;
namespace NUnit.Framework.SyntaxHelpers
{
/// <summary>
/// Syntax helper class that generates custom constraints to test ICSharpCode.SharpDevelop.Dom objects
/// </summary>
public class HasEmpty {
public static PropertyGetIsEmptyConstraint GetRegion {
get { return new PropertyGetIsEmptyConstraint(); }
}
public static PropertySetIsEmptyConstraint SetRegion {
get { return new PropertySetIsEmptyConstraint(); }
}
public static MethodBodyIsEmptyConstraint MethodBody {
get { return new MethodBodyIsEmptyConstraint(); }
}
}
}

BIN
src/Main/StartUp/Project/Resources/StringResources.resources

Binary file not shown.

199
src/SharpDevelop.Tests.sln

@ -1,124 +1,126 @@ @@ -1,124 +1,126 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
# SharpDevelop 3.0.0.2993
# SharpDevelop 3.0.0.2983
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{5DA95927-5F2D-46D8-9265-D092734B6F0E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{F94FA21D-78E6-410B-895D-E16D3E7240DB}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{6604365C-C702-4C10-9BA8-637F1E3D4D0D}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{6B717BD1-CD5E-498C-A42E-9E6A4584DC48}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{e1b288a2-08ee-4318-8bbb-8ab72c69e33e}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08ce9972-283b-44f4-82fa-966f7dfa6b7a}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting", "AddIns\Misc\UnitTesting\UnitTesting.csproj", "{1F261725-6318-4434-A1B1-6C70CE4CD324}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage", "AddIns\Misc\CodeCoverage\Project\CodeCoverage.csproj", "{08ce9972-283b-44f4-82fa-966f7dfa6b7a}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormsDesigner", "AddIns\DisplayBindings\FormsDesigner\Project\FormsDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeCoverage.Tests", "AddIns\Misc\CodeCoverage\Test\CodeCoverage.Tests.csproj", "{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeAnalysis", "AddIns\Misc\CodeAnalysis\CodeAnalysis.csproj", "{3EAA45A9-735C-4AC7-A799-947B93EA449D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding", "AddIns\BackendBindings\VBNetBinding\Project\VBNetBinding.csproj", "{BF38FB72-B380-4196-AF8C-95749D726C61}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{e1b288a2-08ee-4318-8bbb-8ab72c69e33e}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor.Tests", "AddIns\DisplayBindings\XmlEditor\Test\XmlEditor.Tests.csproj", "{FC0FE702-A87D-4D70-A9B6-1ECCD611125F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding.Tests", "AddIns\BackendBindings\WixBinding\Test\WixBinding.Tests.csproj", "{388E7B64-0393-4EB4-A3E3-5C474F141853}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlEditor", "AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{6B717BD1-CD5E-498C-A42E-9E6A4584DC48}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTesting.Tests", "AddIns\Misc\UnitTesting\Test\UnitTesting.Tests.csproj", "{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{6604365C-C702-4C10-9BA8-637F1E3D4D0D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WpfDesign", "WpfDesign", "{C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Tests", "AddIns\Misc\Debugger\Debugger.Tests\Project\Debugger.Tests.csproj", "{A4C858C8-51B6-4265-A695-A20FCEBA1D19}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.XamlDom", "AddIns\DisplayBindings\WpfDesign\WpfDesign.XamlDom\Project\WpfDesign.XamlDom.csproj", "{88DA149F-21B2-48AB-82C4-28FB6BDFD783}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Tests", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Tests\WpfDesign.Tests.csproj", "{943DBBB3-E84E-4CF4-917C-C05AFA8743C1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign.Designer", "AddIns\DisplayBindings\WpfDesign\WpfDesign.Designer\Project\WpfDesign.Designer.csproj", "{78CC29AC-CC79-4355-B1F2-97936DF198AC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpBinding", "AddIns\BackendBindings\CSharpBinding\Project\CSharpBinding.csproj", "{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfDesign", "AddIns\DisplayBindings\WpfDesign\WpfDesign\Project\WpfDesign.csproj", "{66A378A1-E9F4-4AD5-8946-D0EC06C2902F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Python", "Python", "{F94FA21D-78E6-410B-895D-E16D3E7240DB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace", "AddIns\Misc\SearchAndReplace\Project\SearchAndReplace.csproj", "{9196DD8A-B4D4-4780-8742-C5762E547FC2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchAndReplace.Tests", "AddIns\Misc\SearchAndReplace\Test\SearchAndReplace.Tests.csproj", "{A569DCC1-C608-45FD-B770-4F79335EF154}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boo", "Boo", "{5DA95927-5F2D-46D8-9265-D092734B6F0E}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks", "AddIns\BackendBindings\Python\Python.Build.Tasks\Project\Python.Build.Tasks.csproj", "{D332F2D1-2CF1-43B7-903C-844BD5211A7E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding", "AddIns\BackendBindings\Python\PythonBinding\Project\PythonBinding.csproj", "{8D732610-8FC6-43BA-94C9-7126FD7FE361}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python.Build.Tasks.Tests", "AddIns\BackendBindings\Python\Python.Build.Tasks\Test\Python.Build.Tasks.Tests.csproj", "{833904AB-3CD4-4071-9B48-5770E44685AA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding.Tests", "AddIns\BackendBindings\Boo\BooBinding\Test\BooBinding.Tests.csproj", "{6FA16499-896F-4C02-BB43-1AF5C6C7C713}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PythonBinding.Tests", "AddIns\BackendBindings\Python\PythonBinding\Test\PythonBinding.Tests.csproj", "{23B517C9-1ECC-4419-A13F-0B7136D085CB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VBNetBinding.Tests", "AddIns\BackendBindings\VBNetBinding\Test\VBNetBinding.Tests.csproj", "{50A89267-A28B-4DF3-8E62-912E005143B8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter.Tests", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Test\NRefactoryToBooConverter.Tests.csproj", "{C9DE556D-325C-4544-B29F-16A9EB7C9830}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{9421EDF4-9769-4BE9-B5A6-C87DE221D73C}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor.Tests", "Libraries\ICSharpCode.TextEditor\Test\ICSharpCode.TextEditor.Tests.csproj", "{6259D767-BA7C-484D-9472-68F350A20086}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryTests", "Libraries\NRefactory\Test\NRefactoryTests.csproj", "{870115DD-960A-4406-A6B9-600BCDC36A03}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor.Tests", "Libraries\ICSharpCode.TextEditor\Test\ICSharpCode.TextEditor.Tests.csproj", "{6259D767-BA7C-484D-9472-68F350A20086}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aga.Controls", "Libraries\TreeViewAdv\Aga.Controls\Aga.Controls.csproj", "{E73BB233-D88B-44A7-A98F-D71EE158381D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{5A3EBEBA-0560-41C1-966B-23F7D03A5486}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartUp", "Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core.Tests", "Main\Core\Test\ICSharpCode.Core.Tests.csproj", "{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Tests", "Main\Base\Test\ICSharpCode.SharpDevelop.Tests.csproj", "{4980B743-B32F-4aba-AABD-45E2CAD3568D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Sda", "Main\ICSharpCode.SharpDevelop.Sda\ICSharpCode.SharpDevelop.Sda.csproj", "{80318B5F-A25D-45AB-8A95-EF31D2370A4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}"
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}") = "StartUp", "Main\StartUp\Project\StartUp.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom.Tests", "Main\ICSharpCode.SharpDevelop.Dom\Tests\ICSharpCode.SharpDevelop.Dom.Tests\ICSharpCode.SharpDevelop.Dom.Tests.csproj", "{7DB80259-24D4-46C3-A024-53FF1987733D}"
EndProject
Project("{00000000-0000-0000-0000-000000000000}") = "Tools", "Tools\Tools.build", "{970116b0-f96b-4257-8579-986b9cf086f5}"
EndProject
@ -356,59 +358,64 @@ Global @@ -356,59 +358,64 @@ Global
{23B517C9-1ECC-4419-A13F-0B7136D085CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23B517C9-1ECC-4419-A13F-0B7136D085CB}.Release|Any CPU.Build.0 = Release|Any CPU
{23B517C9-1ECC-4419-A13F-0B7136D085CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DB80259-24D4-46C3-A024-53FF1987733D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DB80259-24D4-46C3-A024-53FF1987733D}.Release|Any CPU.Build.0 = Release|Any CPU
{7DB80259-24D4-46C3-A024-53FF1987733D}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{50A89267-A28B-4DF3-8E62-912E005143B8} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{F94FA21D-78E6-410B-895D-E16D3E7240DB} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{6604365C-C702-4C10-9BA8-637F1E3D4D0D} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{6B717BD1-CD5E-498C-A42E-9E6A4584DC48} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{08ce9972-283b-44f4-82fa-966f7dfa6b7a} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{e1b288a2-08ee-4318-8bbb-8ab72c69e33e} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{C12B6EA7-2EFC-4368-B585-EC69EFCC3F97} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{5DA95927-5F2D-46D8-9265-D092734B6F0E} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{23B517C9-1ECC-4419-A13F-0B7136D085CB} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{A569DCC1-C608-45FD-B770-4F79335EF154} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{9196DD8A-B4D4-4780-8742-C5762E547FC2} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{C12B6EA7-2EFC-4368-B585-EC69EFCC3F97} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{44A8DE09-CAB9-49D8-9CFC-5EB0A552F181} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{388E7B64-0393-4EB4-A3E3-5C474F141853} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{e1b288a2-08ee-4318-8bbb-8ab72c69e33e} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{3EAA45A9-735C-4AC7-A799-947B93EA449D} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{1F261725-6318-4434-A1B1-6C70CE4CD324} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{08ce9972-283b-44f4-82fa-966f7dfa6b7a} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{A5C0E8F8-9D04-46ED-91D6-1DEF1575313B} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{BF38FB72-B380-4196-AF8C-95749D726C61} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{6B717BD1-CD5E-498C-A42E-9E6A4584DC48} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{6604365C-C702-4C10-9BA8-637F1E3D4D0D} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{F94FA21D-78E6-410B-895D-E16D3E7240DB} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{50A89267-A28B-4DF3-8E62-912E005143B8} = {14A277EE-7DF1-4529-B639-7D1EF334C1C5}
{D332F2D1-2CF1-43B7-903C-844BD5211A7E} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{870115DD-960A-4406-A6B9-600BCDC36A03} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{6259D767-BA7C-484D-9472-68F350A20086} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{8D732610-8FC6-43BA-94C9-7126FD7FE361} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{833904AB-3CD4-4071-9B48-5770E44685AA} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{23B517C9-1ECC-4419-A13F-0B7136D085CB} = {F94FA21D-78E6-410B-895D-E16D3E7240DB}
{A4C858C8-51B6-4265-A695-A20FCEBA1D19} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{66A378A1-E9F4-4AD5-8946-D0EC06C2902F} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{78CC29AC-CC79-4355-B1F2-97936DF198AC} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{943DBBB3-E84E-4CF4-917C-C05AFA8743C1} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{88DA149F-21B2-48AB-82C4-28FB6BDFD783} = {C12B6EA7-2EFC-4368-B585-EC69EFCC3F97}
{C9DE556D-325C-4544-B29F-16A9EB7C9830} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{6FA16499-896F-4C02-BB43-1AF5C6C7C713} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {5DA95927-5F2D-46D8-9265-D092734B6F0E}
{E73BB233-D88B-44A7-A98F-D71EE158381D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{1152B71B-3C05-4598-B20D-823B5D40559E} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{6259D767-BA7C-484D-9472-68F350A20086} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{870115DD-960A-4406-A6B9-600BCDC36A03} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{7DB80259-24D4-46C3-A024-53FF1987733D} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{8035765F-D51F-4A0C-A746-2FD100E19419} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{80318B5F-A25D-45AB-8A95-EF31D2370A4C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{AD6FAA08-D6F5-4DBA-AF85-F4DA9F40C3B5} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{4980B743-B32F-4aba-AABD-45E2CAD3568D} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{2748AD25-9C63-4E12-877B-4DCE96FBED54} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
{1152B71B-3C05-4598-B20D-823B5D40559E} = {5A3EBEBA-0560-41C1-966B-23F7D03A5486}
EndGlobalSection
EndGlobal

Loading…
Cancel
Save