diff --git a/data/options/SharpDevelop-tools.xml b/data/options/SharpDevelop-tools.xml index 53ed78d717..2eb7879ed7 100644 --- a/data/options/SharpDevelop-tools.xml +++ b/data/options/SharpDevelop-tools.xml @@ -13,4 +13,11 @@ IL Dasm False + + ${TargetDir} + + ${NetSdkDir}bin\FUSLOGVW.exe + Assembly Binding Log Viewer + False + diff --git a/data/templates/file/CPPNet/CPP.Wizards.NewClass.xft b/data/templates/file/CPPNet/CPP.Wizards.NewClass.xft deleted file mode 100644 index d5f98d3c4b..0000000000 --- a/data/templates/file/CPPNet/CPP.Wizards.NewClass.xft +++ /dev/null @@ -1,19 +0,0 @@ - - diff --git a/data/templates/file/Misc/EmptyXmlUserControl.xft b/data/templates/file/Misc/EmptyXmlUserControl.xft index 3b132cc207..48208dd673 100644 --- a/data/templates/file/Misc/EmptyXmlUserControl.xft +++ b/data/templates/file/Misc/EmptyXmlUserControl.xft @@ -8,7 +8,7 @@ defaultname = "XmlUserControl${Number}.xfrm" language = "XmlForm"/> - Creates an empty xml form. + Creates an empty xml user control. diff --git a/data/templates/project/CSharp/SharpDevelopAddin.xpt b/data/templates/project/CSharp/SharpDevelopAddin.xpt index ded924a183..1a73384f62 100644 --- a/data/templates/project/CSharp/SharpDevelopAddin.xpt +++ b/data/templates/project/CSharp/SharpDevelopAddin.xpt @@ -34,7 +34,7 @@ - ]]> - + diff --git a/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj b/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj index 2b6e59d3b6..e55a919fd4 100644 --- a/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj +++ b/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.csproj @@ -96,6 +96,9 @@ ICSharpCode.TextEditor False + + Always + \ No newline at end of file diff --git a/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.dll.config b/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.dll.config new file mode 100644 index 0000000000..3bfcea4089 --- /dev/null +++ b/src/AddIns/DisplayBindings/XmlEditor/Test/XmlEditor.Tests.dll.config @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Configuration/AssemblyInfo.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Configuration/AssemblyInfo.cs index 4daf881581..9702f98a54 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Configuration/AssemblyInfo.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Configuration/AssemblyInfo.cs @@ -1,7 +1,7 @@ -// +// // 2002-2005 AlphaSierraPapa // GNU General Public License -// +// // $Revision$ // diff --git a/src/Libraries/NRefactory/Project/Src/Output/CSharp/CSharpOutputVisitor.cs b/src/Libraries/NRefactory/Project/Src/Output/CSharp/CSharpOutputVisitor.cs index 39821af009..bdeb93935f 100644 --- a/src/Libraries/NRefactory/Project/Src/Output/CSharp/CSharpOutputVisitor.cs +++ b/src/Libraries/NRefactory/Project/Src/Output/CSharp/CSharpOutputVisitor.cs @@ -297,7 +297,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter VisitAttributes(fieldDeclaration.Attributes, data); outputFormatter.Indent(); outputFormatter.PrintIdentifier(f.Name); - if (f.Initializer != null) { + if (f.Initializer != null && !f.Initializer.IsNull) { outputFormatter.Space(); outputFormatter.PrintToken(Tokens.Assign); outputFormatter.Space(); @@ -1597,7 +1597,12 @@ namespace ICSharpCode.NRefactory.PrettyPrinter return null; } - outputFormatter.PrintIdentifier(primitiveExpression.Value.ToString()); + if (primitiveExpression.Value is IFormattable) { + outputFormatter.PrintText(((IFormattable)primitiveExpression.Value).ToString(null, NumberFormatInfo.InvariantInfo)); + } else { + outputFormatter.PrintIdentifier(primitiveExpression.Value.ToString()); + } + return null; } @@ -1934,8 +1939,7 @@ namespace ICSharpCode.NRefactory.PrettyPrinter break; case AssignmentOperatorType.ShiftRight: outputFormatter.PrintToken(Tokens.GreaterThan); - outputFormatter.PrintToken(Tokens.GreaterThan); - outputFormatter.PrintToken(Tokens.Equal); + outputFormatter.PrintToken(Tokens.GreaterEqual); break; case AssignmentOperatorType.ExclusiveOr: outputFormatter.PrintToken(Tokens.XorAssign); diff --git a/src/Main/Base/Project/Src/Dom/Implementations/CompoundClass.cs b/src/Main/Base/Project/Src/Dom/Implementations/CompoundClass.cs index 1016b5e416..490426ceb7 100644 --- a/src/Main/Base/Project/Src/Dom/Implementations/CompoundClass.cs +++ b/src/Main/Base/Project/Src/Dom/Implementations/CompoundClass.cs @@ -47,6 +47,8 @@ namespace ICSharpCode.SharpDevelop.Dom { // Common for all parts: this.ClassType = parts[0].ClassType; + this.CompilationUnit.FileName = parts[0].CompilationUnit.FileName; + this.Region = parts[0].Region; ModifierEnum modifier = ModifierEnum.None; this.BaseTypes.Clear(); diff --git a/src/Main/Base/Project/Src/Dom/Implementations/DefaultClass.cs b/src/Main/Base/Project/Src/Dom/Implementations/DefaultClass.cs index c200a6d464..8f809a9a36 100644 --- a/src/Main/Base/Project/Src/Dom/Implementations/DefaultClass.cs +++ b/src/Main/Base/Project/Src/Dom/Implementations/DefaultClass.cs @@ -107,6 +107,9 @@ namespace ICSharpCode.SharpDevelop.Dom get { return region; } + set { + region = value; + } } public override string DotNetName { diff --git a/src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs b/src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs index e31a6a7d2e..f2ae66aeb3 100644 --- a/src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs +++ b/src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs @@ -18,6 +18,17 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates string name; string language; string content; + string buildAction; + string copyToOutputDirectory; + + public FileDescriptionTemplate(XmlElement xml) + { + name = xml.GetAttribute("name"); + language = xml.GetAttribute("language"); + buildAction = xml.GetAttribute("buildAction"); + copyToOutputDirectory = xml.GetAttribute("copyToOutputDirectory"); + content = xml.InnerText; + } public FileDescriptionTemplate(string name, string language, string content) { @@ -37,11 +48,29 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates return language; } } + public string Content { get { return content; } } + public string BuildAction { + get { + return buildAction ?? ""; + } + set { + buildAction = value; + } + } + + public string CopyToOutputDirectory { + get { + return copyToOutputDirectory ?? ""; + } + set { + copyToOutputDirectory = value; + } + } } } diff --git a/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs b/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs index 3516f82abb..2ed3a785ef 100644 --- a/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs +++ b/src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs @@ -73,7 +73,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates } } - public class TemplateScript + public class TemplateScript { string languageName; string runAt; @@ -291,10 +291,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates XmlElement files = doc.DocumentElement["Files"]; XmlNodeList nodes = files.ChildNodes; foreach (XmlElement filenode in nodes) { - FileDescriptionTemplate template = new FileDescriptionTemplate(filenode.GetAttribute("name"), - filenode.GetAttribute("language"), - filenode.InnerText); - this.files.Add(template); + this.files.Add(new FileDescriptionTemplate(filenode)); } // load scripts (if any) @@ -312,9 +309,9 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates static FileTemplate() { - List files = FileUtility.SearchDirectory(PropertyService.DataDirectory + - Path.DirectorySeparatorChar + "templates" + - Path.DirectorySeparatorChar + "file", "*.xft"); + List files = FileUtility.SearchDirectory(PropertyService.DataDirectory + + Path.DirectorySeparatorChar + "templates" + + Path.DirectorySeparatorChar + "file", "*.xft"); foreach (string file in files) { try { if (Path.GetExtension(file) == ".xft") { diff --git a/src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs b/src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs index c8a148f5fc..7161a191bc 100644 --- a/src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs +++ b/src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs @@ -130,8 +130,15 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates string fileName = Path.Combine(projectCreateInformation.ProjectBasePath, StringParser.Parse(file.Name, new string[,] { {"ProjectName", projectCreateInformation.ProjectName} })); FileProjectItem projectFile = new FileProjectItem(project, ItemType.Compile); - if (!project.CanCompile(fileName)) { - projectFile.BuildAction = FileProjectItem.FileBuildAction.None; + if (file.BuildAction.Length > 0) { + projectFile.BuildAction = (FileProjectItem.FileBuildAction)Enum.Parse(typeof(FileProjectItem.FileBuildAction), file.BuildAction); + } else { + if (!project.CanCompile(fileName)) { + projectFile.BuildAction = FileProjectItem.FileBuildAction.None; + } + } + if (file.CopyToOutputDirectory.Length > 0) { + projectFile.CopyToOutputDirectory = (CopyToOutputDirectory)Enum.Parse(typeof(CopyToOutputDirectory), file.CopyToOutputDirectory); } projectFile.Include = FileUtility.GetRelativePath(project.Directory, fileName); @@ -196,10 +203,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates foreach (XmlNode node in element["Files"].ChildNodes) { if (node != null && node.Name == "File") { XmlElement filenode = (XmlElement)node; - FileDescriptionTemplate template = new FileDescriptionTemplate(filenode.GetAttribute("name"), - filenode.GetAttribute("language"), - filenode.InnerText); - projectDescriptor.files.Add(template); + projectDescriptor.files.Add(new FileDescriptionTemplate(filenode)); } } } diff --git a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs index f8f4b93156..4a7e285e3a 100644 --- a/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs +++ b/src/Main/Base/Project/Src/Services/Debugger/DebuggerService.cs @@ -309,9 +309,7 @@ namespace ICSharpCode.Core mousepos.Y - viewRect.Top); if (logicPos.Y >= 0 && logicPos.Y < textArea.Document.TotalNumberOfLines) { // This is for testing olny - it must be reworked properly - if (Control.ModifierKeys == Keys.Control) { - if (currentDebugger == null) return; - if (!currentDebugger.IsDebugging) return; + if (Control.ModifierKeys == Keys.Control && currentDebugger != null && currentDebugger.IsDebugging) { SetIPArgs a = new SetIPArgs(); a.filename = textArea.MotherTextEditorControl.FileName; a.line = logicPos.Y; @@ -345,9 +343,9 @@ namespace ICSharpCode.Core ResolveResult result = ParserService.Resolve(expressionResult, logicPos.Y + 1, logicPos.X + 1, textArea.MotherTextEditorControl.FileName, textContent); string value = GetText(result, expression); if (value != null) { - #if DEBUG - value = "expr: >" + expression + "<\n" + value; - #endif + if (Control.ModifierKeys == Keys.Control) { + value = "expr: >" + expression + "<\n" + value; + } textArea.SetToolTip(value); } oldToolTip = value; @@ -364,8 +362,10 @@ namespace ICSharpCode.Core static string GetText(ResolveResult result, string expression) { - if (result == null) - return null; + if (result == null) { + // when pressing control, show the expression even when it could not be resolved + return (Control.ModifierKeys == Keys.Control) ? "" : null; + } if (result is MixedResolveResult) return GetText(((MixedResolveResult)result).PrimaryResult, expression); IAmbience ambience = AmbienceService.CurrentAmbience; @@ -407,9 +407,14 @@ namespace ICSharpCode.Core else return "Overload of " + ambience.Convert(mrr.ContainingType) + "." + mrr.Name; } else { -// if (result.ResolvedType != null) -// return "expression of type " + ambience.Convert(result.ResolvedType); - return null; + if (Control.ModifierKeys == Keys.Control) { + if (result.ResolvedType != null) + return "expression of type " + ambience.Convert(result.ResolvedType); + else + return "ResolveResult without ResolvedType"; + } else { + return null; + } } } diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs index 0a425bb79f..fab8495987 100644 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs +++ b/src/Main/Base/Project/Src/TextEditor/Gui/Dialogs/GotoDialog.cs @@ -343,7 +343,7 @@ namespace ICSharpCode.SharpDevelop.Gui void GotoRegion(IRegion region, string fileName) { - if (fileName != null) { + if (fileName != null && region != null) { FileService.JumpToFilePosition(fileName, region.BeginLine - 1, region.BeginColumn - 1); } } diff --git a/src/Main/Core/Project/ICSharpCode.Core.csproj b/src/Main/Core/Project/ICSharpCode.Core.csproj index 0c54c1c8d4..6dfc9b0930 100644 --- a/src/Main/Core/Project/ICSharpCode.Core.csproj +++ b/src/Main/Core/Project/ICSharpCode.Core.csproj @@ -141,4 +141,4 @@ - + \ No newline at end of file diff --git a/src/SharpDevelop.WithTests.sln b/src/SharpDevelop.WithTests.sln index 7983ba7ca4..b51d2be209 100644 --- a/src/SharpDevelop.WithTests.sln +++ b/src/SharpDevelop.WithTests.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# SharpDevelop 2.0.0.397 +# SharpDevelop 2.0.0.413 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}" ProjectSection(SolutionItems) = postProject EndProjectSection @@ -8,6 +8,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Display Bindings", "Display ProjectSection(SolutionItems) = postProject EndProjectSection EndProject +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}") = "XmlEditor", "AddIns\DisplayBindings\XmlEditor\Project\XmlEditor.csproj", "{6B717BD1-CD5E-498C-A42E-9E6A4584DC48}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FormDesigner", "AddIns\DisplayBindings\FormDesigner\Project\FormDesigner.csproj", "{7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57}" @@ -58,6 +60,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{ ProjectSection(SolutionItems) = postProject EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll", "Libraries\NUnit.Framework\nunit.framework.dll.csproj", "{83DD7E12-A705-4DBA-9D71-09C8973D9382}" +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}") = "ICSharpCode.Build.Tasks", "Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj", "{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}" @@ -171,6 +175,7 @@ Global {CBC6C247-747B-4908-B09A-4D2E0F640B6B} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} {7D7E92DF-ACEB-4B69-92C8-8AC7A703CD57} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} {6B717BD1-CD5E-498C-A42E-9E6A4584DC48} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} + {FC0FE702-A87D-4D70-A9B6-1ECCD611125F} = {4EA396ED-64AD-4AD0-A67A-AB363F3E0C79} {1F1AC7CD-D154-45BB-8EAF-804CA8055F5A} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C} {BF38FB72-B380-4196-AF8C-95749D726C61} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C} {6e59af58-f635-459a-9a35-c9ac41c00339} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C} @@ -191,6 +196,7 @@ Global {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C} {4139CCF6-FB49-4A9D-B2CF-331E9EA3198D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C} {870115DD-960A-4406-A6B9-600BCDC36A03} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C} + {83DD7E12-A705-4DBA-9D71-09C8973D9382} = {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}