From 928980620bd37c810694eae647ffa3d876af6f79 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sun, 6 Apr 2014 19:10:49 +0800 Subject: [PATCH 01/12] Tidy up AddIn names --- src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin | 2 +- .../MachineSpecifications/MachineSpecifications.addin | 2 +- .../Profiler/Frontend/AddIn/ICSharpCode.Profiler.AddIn.addin | 2 +- src/AddIns/Analysis/UnitTesting/UnitTesting.addin | 2 +- src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin | 2 +- .../BackendBindings/XamlBinding/XamlBinding/XamlBinding.addin | 2 +- .../DisplayBindings/AvalonEdit.AddIn/AvalonEdit.AddIn.addin | 2 +- src/AddIns/DisplayBindings/ILSpyAddIn/ILSpyAddIn.addin | 2 +- src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin | 2 +- src/AddIns/VersionControl/GitAddIn/GitAddIn.addin | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin b/src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin index bfb43ddecd..ae49a02a4f 100644 --- a/src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin +++ b/src/AddIns/Analysis/CodeCoverage/Project/CodeCoverage.addin @@ -1,4 +1,4 @@ - diff --git a/src/AddIns/DisplayBindings/ILSpyAddIn/ILSpyAddIn.addin b/src/AddIns/DisplayBindings/ILSpyAddIn/ILSpyAddIn.addin index ae3fd711fe..b6c0b0683d 100644 --- a/src/AddIns/DisplayBindings/ILSpyAddIn/ILSpyAddIn.addin +++ b/src/AddIns/DisplayBindings/ILSpyAddIn/ILSpyAddIn.addin @@ -1,4 +1,4 @@ - From 8730117d9f6269cb3a9516982ee1ec5547f94d0d Mon Sep 17 00:00:00 2001 From: Linquize Date: Mon, 7 Apr 2014 20:53:10 +0800 Subject: [PATCH 02/12] Should append "(Error)" instead of "(Readonly)" if failed to load project --- .../Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs index 600b1db372..c24643a6aa 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/TreeNodes/ProjectNode.cs @@ -65,20 +65,21 @@ namespace ICSharpCode.SharpDevelop.Project this.project = project; Text = project.Name; - if (project.IsReadOnly) { - Text += StringParser.Parse(" (${res:Global.ReadOnly})"); - } - autoClearNodes = false; if (project is MissingProject) { OpenedImage = ClosedImage = "ProjectBrowser.MissingProject"; this.ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/MissingProjectNode"; + Text += StringParser.Parse(" (${res:Global.ErrorText})"); } else if (project is ErrorProject) { OpenedImage = ClosedImage = "ProjectBrowser.ProjectWarning"; this.ContextmenuAddinTreePath = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/UnknownProjectNode"; + Text += StringParser.Parse(" (${res:Global.ErrorText})"); } else { OpenedImage = ClosedImage = IconService.GetImageForProjectType(project.Language); + if (project.IsReadOnly) { + Text += StringParser.Parse(" (${res:Global.ReadOnly})"); + } } Tag = project; From dee090ce57caa130899144aac3a5e4f101e208a2 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Wed, 16 Apr 2014 00:17:32 +0200 Subject: [PATCH 03/12] Fix: Base/derived types nodes in ClassBrowser not filled, because no lazy loading active. --- .../Project/Dom/ClassBrowser/BaseTypesTreeNode.cs | 12 ++++-------- .../Project/Dom/ClassBrowser/DerivedTypesTreeNode.cs | 10 +++------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/Main/Base/Project/Dom/ClassBrowser/BaseTypesTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/BaseTypesTreeNode.cs index ae4093d214..223073a691 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/BaseTypesTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/BaseTypesTreeNode.cs @@ -40,19 +40,15 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser throw new ArgumentNullException("definition"); this.definition = definition; this.text = SD.ResourceService.GetString("MainWindow.Windows.ClassBrowser.BaseTypes"); + LazyLoading = true; } - + protected override void OnIsVisibleChanged() { base.OnIsVisibleChanged(); - if (IsVisible) { - definition.Updated += OnDefinitionUpdated; - } else { - definition.Updated -= OnDefinitionUpdated; - LazyLoading = true; - } + definition.Updated += OnDefinitionUpdated; } - + void OnDefinitionUpdated(object sender, EventArgs e) { // If the list of children was created, update it diff --git a/src/Main/Base/Project/Dom/ClassBrowser/DerivedTypesTreeNode.cs b/src/Main/Base/Project/Dom/ClassBrowser/DerivedTypesTreeNode.cs index c61a51d188..0dcc489083 100644 --- a/src/Main/Base/Project/Dom/ClassBrowser/DerivedTypesTreeNode.cs +++ b/src/Main/Base/Project/Dom/ClassBrowser/DerivedTypesTreeNode.cs @@ -38,17 +38,13 @@ namespace ICSharpCode.SharpDevelop.Dom.ClassBrowser throw new ArgumentNullException("definition"); this.definition = definition; this.text = SD.ResourceService.GetString("MainWindow.Windows.ClassBrowser.DerivedTypes"); + LazyLoading = true; } - + protected override void OnIsVisibleChanged() { base.OnIsVisibleChanged(); - if (IsVisible) { - definition.Updated += OnDefinitionUpdated; - } else { - definition.Updated -= OnDefinitionUpdated; - LazyLoading = true; - } + definition.Updated += OnDefinitionUpdated; } void OnDefinitionUpdated(object sender, EventArgs e) From 076f1c2eb72f1d9c6889254cc05555810985dbcd Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Wed, 16 Apr 2014 22:14:12 +0200 Subject: [PATCH 04/12] Fix #391: XML documentation comment auto-generation incomplete on delegates. --- .../CSharpFormattingStrategy.cs | 13 +++- .../CodeIssues/Custom/XmlDocIssue.cs | 74 ++++++++++--------- 2 files changed, 51 insertions(+), 36 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs index ccbafa3f1b..0e0e8498c3 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs @@ -358,8 +358,17 @@ namespace CSharpBinding.FormattingStrategy sb.Append(indentation); sb.Append("/// "); + IUnresolvedMethod method = null; if (member is IUnresolvedMethod) { - IUnresolvedMethod method = (IUnresolvedMethod)member; + method = (IUnresolvedMethod)member; + } else if (member is IUnresolvedTypeDefinition) { + IUnresolvedTypeDefinition type = (IUnresolvedTypeDefinition) member; + if (type.Kind == TypeKind.Delegate) { + method = type.Methods.FirstOrDefault(m => m.Name == "Invoke"); + } + } + + if (method != null) { for (int i = 0; i < method.Parameters.Count; ++i) { sb.Append(terminator); sb.Append(indentation); @@ -376,8 +385,8 @@ namespace CSharpBinding.FormattingStrategy } } } - textArea.Document.Insert(cursorOffset, sb.ToString()); + textArea.Document.Insert(cursorOffset, sb.ToString()); textArea.Caret.Offset = cursorOffset + indentation.Length + "/// ".Length + " ".Length + terminator.Length; } } diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/XmlDocIssue.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/XmlDocIssue.cs index 373f3075c9..e6e41e11e4 100644 --- a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/XmlDocIssue.cs +++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp.Refactoring/CodeIssues/Custom/XmlDocIssue.cs @@ -38,25 +38,25 @@ using ICSharpCode.NRefactory.CSharp.TypeSystem; namespace ICSharpCode.NRefactory.CSharp.Refactoring { [IssueDescription("Validate Xml documentation", - Description = "Validate Xml docs", - Category = IssueCategories.CompilerWarnings, - Severity = Severity.Warning)] + Description = "Validate Xml docs", + Category = IssueCategories.CompilerWarnings, + Severity = Severity.Warning)] public class XmlDocIssue : GatherVisitorCodeIssueProvider { protected override IGatherVisitor CreateVisitor(BaseRefactoringContext context) { return new GatherVisitor(context); } - + class GatherVisitor : GatherVisitorBase { readonly List storedXmlComment = new List(); - + public GatherVisitor(BaseRefactoringContext ctx) : base (ctx) { } - + void InvalideXmlComments() { if (storedXmlComment.Count == 0) @@ -77,37 +77,37 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring )); storedXmlComment.Clear(); } - + public override void VisitComment(Comment comment) { if (comment.CommentType == CommentType.Documentation) storedXmlComment.Add(comment); } - + public override void VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration) { InvalideXmlComments(); base.VisitNamespaceDeclaration(namespaceDeclaration); } - + public override void VisitUsingDeclaration(UsingDeclaration usingDeclaration) { InvalideXmlComments(); base.VisitUsingDeclaration(usingDeclaration); } - + public override void VisitUsingAliasDeclaration(UsingAliasDeclaration usingDeclaration) { InvalideXmlComments(); base.VisitUsingAliasDeclaration(usingDeclaration); } - + public override void VisitExternAliasDeclaration(ExternAliasDeclaration externAliasDeclaration) { InvalideXmlComments(); base.VisitExternAliasDeclaration(externAliasDeclaration); } - + TextLocation TranslateOffset(int offset) { int line = storedXmlComment.First().StartLocation.Line; @@ -120,7 +120,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring } return TextLocation.Empty; } - + void AddXmlIssue(int offset, int length, string str) { var textLocation = TranslateOffset(offset); @@ -150,14 +150,14 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring foreach (var cmt in storedXmlComment) xml.Append(cmt.Content + "\n"); xml.Append("\n"); - + var doc = new AXmlParser().Parse(new StringTextSource(xml.ToString())); - + var stack = new Stack(); stack.Push(doc); foreach (var err in doc.SyntaxErrors) AddXmlIssue(err.StartOffset - firstline.Length, err.EndOffset - err.StartOffset, err.Description); - + while (stack.Count > 0) { var cur = stack.Pop(); var el = cur as AXmlElement; @@ -183,6 +183,12 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring var m = member as IParameterizedMember; if (m != null && m.Parameters.Any(p => p.Name == name.Value)) break; + var dtype = member as ITypeDefinition; + if ((dtype != null) && (dtype.Kind == TypeKind.Delegate)) { + var invokeMethod = dtype.Methods.FirstOrDefault(method => method.Name == "Invoke"); + if ((invokeMethod != null) && invokeMethod.Parameters.Any(p => p.Name == name.Value)) + break; + } if (name.Value == "value" && member != null && (member.SymbolKind == SymbolKind.Property || member.SymbolKind == SymbolKind.Indexer || member.SymbolKind == SymbolKind.Event) && el.Name == "paramref") break; AddXmlIssue(name.ValueSegment.Offset - firstline.Length + 1, name.ValueSegment.Length - 2, string.Format(ctx.TranslateString("Parameter '{0}' not found"), name.Value)); @@ -204,7 +210,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring trctx = trctx.WithUsingScope(state.CurrentUsingScope); var cdc = new CSharpDocumentationComment (emptySource, trctx); var entity = cdc.ResolveCref(cref.Value); - + if (entity == null) { AddXmlIssue(cref.ValueSegment.Offset - firstline.Length + 1, cref.ValueSegment.Length - 2, string.Format(ctx.TranslateString("Cannot find reference '{0}'"), cref.Value)); } @@ -212,15 +218,15 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring AddXmlIssue(cref.ValueSegment.Offset - firstline.Length + 1, cref.ValueSegment.Length - 2, string.Format(ctx.TranslateString("Reference parsing error '{0}'."), e.Message)); } break; - - } + + } } foreach (var child in cur.Children) stack.Push(child); } storedXmlComment.Clear(); } - + protected virtual void VisitXmlChildren(AstNode node, Action checkDocumentationAction) { AstNode next; @@ -231,7 +237,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring child = next; } checkDocumentationAction(); - + for (; child != null; child = next) { // Store next to allow the loop to continue // if the visitor removes/replaces child. @@ -240,47 +246,47 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring } InvalideXmlComments(); } - + protected virtual void VisitXmlChildren(AstNode node) { VisitXmlChildren(node, () => CheckXmlDoc(node)); } - + public override void VisitTypeDeclaration(TypeDeclaration typeDeclaration) { VisitXmlChildren(typeDeclaration); } - + public override void VisitMethodDeclaration(MethodDeclaration methodDeclaration) { VisitXmlChildren(methodDeclaration); } - + public override void VisitDelegateDeclaration(DelegateDeclaration delegateDeclaration) { VisitXmlChildren(delegateDeclaration); } - + public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration) { VisitXmlChildren(constructorDeclaration); } - + public override void VisitCustomEventDeclaration(CustomEventDeclaration eventDeclaration) { VisitXmlChildren(eventDeclaration); } - + public override void VisitDestructorDeclaration(DestructorDeclaration destructorDeclaration) { VisitXmlChildren(destructorDeclaration); } - + public override void VisitEnumMemberDeclaration(EnumMemberDeclaration enumMemberDeclaration) { VisitXmlChildren(enumMemberDeclaration); } - + public override void VisitEventDeclaration(EventDeclaration eventDeclaration) { VisitXmlChildren(eventDeclaration, () => { @@ -289,7 +295,7 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring } }); } - + public override void VisitFieldDeclaration(FieldDeclaration fieldDeclaration) { VisitXmlChildren(fieldDeclaration, () => { @@ -298,17 +304,17 @@ namespace ICSharpCode.NRefactory.CSharp.Refactoring } }); } - + public override void VisitIndexerDeclaration(IndexerDeclaration indexerDeclaration) { VisitXmlChildren(indexerDeclaration); } - + public override void VisitPropertyDeclaration(PropertyDeclaration propertyDeclaration) { VisitXmlChildren(propertyDeclaration); } - + public override void VisitOperatorDeclaration(OperatorDeclaration operatorDeclaration) { VisitXmlChildren(operatorDeclaration); From 453480b4a3d4eea6dc2ca3122c59071c36e02dd7 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Apr 2014 09:17:40 +0200 Subject: [PATCH 05/12] Make debugger options accessible from other AddIns --- .../Options/DebuggingOptions.cs | 3 +- .../Debugger.AddIn/Service/WindowsDebugger.cs | 4 + .../Project/Debugging/BaseDebuggerService.cs | 4 + .../Project/Debugging/IDebuggerService.cs | 109 ++++++++++++++---- 4 files changed, 94 insertions(+), 26 deletions(-) diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs index fce52f77fe..6fe518e798 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptions.cs @@ -24,12 +24,13 @@ using System.Windows.Forms; using System.Xml.Serialization; using Debugger; using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Debugging; namespace ICSharpCode.SharpDevelop.Services { public enum ShowIntegersAs { Decimal, Hexadecimal, Both }; - public class DebuggingOptions: Options + public class DebuggingOptions: Options, IDebuggerOptions { public static DebuggingOptions Instance { get { return new DebuggingOptions(); } diff --git a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs index 6b864b7806..59192cf6c4 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs @@ -137,6 +137,10 @@ namespace ICSharpCode.SharpDevelop.Services } } + public override IDebuggerOptions Options { + get { return DebuggingOptions.Instance; } + } + public override bool CanDebug(IProject project) { return true; diff --git a/src/Main/Base/Project/Debugging/BaseDebuggerService.cs b/src/Main/Base/Project/Debugging/BaseDebuggerService.cs index ca9748533a..b8ad702ff9 100644 --- a/src/Main/Base/Project/Debugging/BaseDebuggerService.cs +++ b/src/Main/Base/Project/Debugging/BaseDebuggerService.cs @@ -33,6 +33,10 @@ namespace ICSharpCode.SharpDevelop.Debugging }; SD.ProjectService.SolutionClosing += OnSolutionClosing; } + + public virtual IDebuggerOptions Options { + get { return DummyDebuggerOptions.Instance; } + } public virtual void Dispose() { diff --git a/src/Main/Base/Project/Debugging/IDebuggerService.cs b/src/Main/Base/Project/Debugging/IDebuggerService.cs index 1acb34c36b..1529a45773 100644 --- a/src/Main/Base/Project/Debugging/IDebuggerService.cs +++ b/src/Main/Base/Project/Debugging/IDebuggerService.cs @@ -16,7 +16,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; using ICSharpCode.Core; using ICSharpCode.SharpDevelop.Editor; using ICSharpCode.SharpDevelop.Gui; @@ -27,13 +29,20 @@ namespace ICSharpCode.SharpDevelop.Debugging [SDService("SD.Debugger", FallbackImplementation = typeof(DebuggerServiceFallback))] public interface IDebuggerService : IDisposable, ITextAreaToolTipProvider { + /// + /// Allows (read-only) access to the currently used debugger options from other AddIns. + /// + IDebuggerOptions Options { + get; + } + /// /// Returns true if debugger is loaded. /// bool IsDebuggerLoaded { get; } - + bool IsDebuggerStarted { get; } @@ -139,6 +148,23 @@ namespace ICSharpCode.SharpDevelop.Debugging event EventHandler DebugStopped; } + /// + /// Abstraction of some debugger options. + /// Allows (read-only) access to the currently used debugger options from other AddIns. + /// + public interface IDebuggerOptions + { + bool EnableJustMyCode { get; } + bool EnableEditAndContinue { get; } + bool SuppressJITOptimization { get; } + bool SuppressNGENOptimization { get; } + bool StepOverDebuggerAttributes { get; } + bool StepOverAllProperties { get; } + bool StepOverFieldAccessProperties { get; } + IEnumerable SymbolsSearchPaths { get; } + bool PauseOnHandledExceptions { get; } + } + public enum DebuggerFeatures { Start, @@ -165,34 +191,67 @@ namespace ICSharpCode.SharpDevelop.Debugging } } - + sealed class DummyDebuggerOptions : IDebuggerOptions + { + DummyDebuggerOptions() {} + + public bool EnableJustMyCode { + get { return true; } + } + public bool EnableEditAndContinue { + get { return false; } + } + public bool SuppressJITOptimization { + get { return false; } + } + public bool SuppressNGENOptimization { + get { return false; } + } + public bool StepOverDebuggerAttributes { + get { return false; } + } + public bool StepOverAllProperties { + get { return false; } + } + public bool StepOverFieldAccessProperties { + get { return false; } + } + public IEnumerable SymbolsSearchPaths { + get { return Enumerable.Empty(); } + } + public bool PauseOnHandledExceptions { + get { return false; } + } + + public static readonly DummyDebuggerOptions Instance = new DummyDebuggerOptions(); + } class DebuggerServiceFallback : BaseDebuggerService { Process attachedProcess = null; - + public override bool IsDebugging { get { return attachedProcess != null; } } - + public override bool IsProcessRunning { get { return IsDebugging; } } - + /// public override bool BreakAtBeginning { get; set; } - + public override bool CanDebug(IProject project) { return true; } - + public override bool Supports(DebuggerFeatures feature) { switch (feature) { @@ -207,7 +266,7 @@ namespace ICSharpCode.SharpDevelop.Debugging return false; default: throw new ArgumentOutOfRangeException(); - } + } } public override void Start(ProcessStartInfo processStartInfo) @@ -215,7 +274,7 @@ namespace ICSharpCode.SharpDevelop.Debugging if (attachedProcess != null) { return; } - + OnDebugStarting(EventArgs.Empty); try { attachedProcess = new Process(); @@ -229,19 +288,19 @@ namespace ICSharpCode.SharpDevelop.Debugging throw new ApplicationException("Can't execute \"" + processStartInfo.FileName + "\"\n"); } } - + public override void ShowAttachDialog() { } - + public override void Attach(Process process) { } - + public override void Detach() { } - + void AttachedProcessExited(object sender, EventArgs e) { attachedProcess.Exited -= AttachedProcessExited; @@ -249,12 +308,12 @@ namespace ICSharpCode.SharpDevelop.Debugging attachedProcess = null; SD.MainThread.InvokeAsyncAndForget(() => new Action(OnDebugStopped)(EventArgs.Empty)); } - + public override void StartWithoutDebugging(ProcessStartInfo processStartInfo) { Process.Start(processStartInfo); } - + public override void Stop() { if (attachedProcess != null) { @@ -265,50 +324,50 @@ namespace ICSharpCode.SharpDevelop.Debugging attachedProcess = null; } } - + // ExecutionControl: - + public override void Break() { throw new NotSupportedException(); } - + public override void Continue() { throw new NotSupportedException(); } // Stepping: - + public override void StepInto() { throw new NotSupportedException(); } - + public override void StepOver() { throw new NotSupportedException(); } - + public override void StepOut() { throw new NotSupportedException(); } - + public override void HandleToolTipRequest(ToolTipRequestEventArgs e) { } - + public override bool SetInstructionPointer(string filename, int line, int column, bool dryRun) { return false; } - + public override void Dispose() { Stop(); base.Dispose(); } - + public override bool IsAttached { get { return false; From 7baff720074c972bd60b0568675b241ede856028 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Apr 2014 11:03:11 +0200 Subject: [PATCH 06/12] fix #436 - Debugger always steps into external code I've restored the "Use 'Just My Code' feature for stepping" option --- .../Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml | 2 ++ src/AddIns/DisplayBindings/ILSpyAddIn/ILSpySymbolSource.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml index 06b62a35e2..9a6b7c713c 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml +++ b/src/AddIns/Debugger/Debugger.AddIn/Options/DebuggingOptionsPanel.xaml @@ -36,6 +36,8 @@ + Date: Sat, 19 Apr 2014 11:45:45 +0200 Subject: [PATCH 07/12] fix #438 - WinForms Designer modifies class fields outside designer file --- .../Src/FormsDesigner/CSharpDesignerLoader.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs index 48fe3c4d18..29964ee49c 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs @@ -127,6 +127,7 @@ namespace CSharpBinding.FormsDesigner foreach (var field in designerClass.Fields) { var codeField = new CodeMemberField(cv.Convert(field.Type), field.Name); + codeField.Attributes = GetAccessibility(field); codeClass.Members.Add(codeField); } var codeNamespace = new CodeNamespace(designerClass.Namespace); @@ -170,6 +171,33 @@ namespace CSharpBinding.FormsDesigner MessageService.ShowException(ex); } } + + MemberAttributes GetAccessibility(IField field) + { + switch (field.Accessibility) { + case Accessibility.None: + case Accessibility.Private: + return MemberAttributes.Private; + break; + case Accessibility.Public: + return MemberAttributes.Public; + break; + case Accessibility.Protected: + return MemberAttributes.Family; + break; + case Accessibility.Internal: + return MemberAttributes.Assembly; + break; + case Accessibility.ProtectedOrInternal: + return MemberAttributes.FamilyOrAssembly; + break; + case Accessibility.ProtectedAndInternal: + return MemberAttributes.FamilyAndAssembly; + break; + default: + throw new ArgumentOutOfRangeException(); + } + } protected override CodeDomLocalizationModel GetCurrentLocalizationModelFromDesignedFile() { From 1507961b829619f1bbe698beb347ce1468571ae2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 19 Apr 2014 13:13:29 +0200 Subject: [PATCH 08/12] remove useless statements --- .../Project/Src/FormsDesigner/CSharpDesignerLoader.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs index 29964ee49c..6dd0346a51 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormsDesigner/CSharpDesignerLoader.cs @@ -178,22 +178,16 @@ namespace CSharpBinding.FormsDesigner case Accessibility.None: case Accessibility.Private: return MemberAttributes.Private; - break; case Accessibility.Public: return MemberAttributes.Public; - break; case Accessibility.Protected: return MemberAttributes.Family; - break; case Accessibility.Internal: return MemberAttributes.Assembly; - break; case Accessibility.ProtectedOrInternal: return MemberAttributes.FamilyOrAssembly; - break; case Accessibility.ProtectedAndInternal: return MemberAttributes.FamilyAndAssembly; - break; default: throw new ArgumentOutOfRangeException(); } From 2b0c75136dccbd0a911dd40a7c0935e2d2efa261 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 13 Apr 2014 13:57:14 +0200 Subject: [PATCH 09/12] For ToolsVersion="12.0" projects, use the MSBuild 12.0 engine. --- README.md | 15 +-- SharpDevelop.Tests.sln | 7 ++ SharpDevelop.sln | 15 ++- clean.bat | 6 +- debugbuild.bat | 4 +- releasebuild.bat | 4 +- src/Automated.proj | 4 +- ...CSharpCode.SharpDevelop.BuildWorker.csproj | 6 +- .../app.config | 6 +- .../Configuration/AssemblyInfo.cs | 27 +++++ ...arpCode.SharpDevelop.BuildWorker120.csproj | 101 ++++++++++++++++++ .../app.config | 32 ++++++ .../Build/MSBuildEngine/BuildWorkerManager.cs | 1 + .../MSBuildEngine/MSBuildEngineWorker.cs | 4 +- src/Main/SharpDevelop/SharpDevelop.csproj | 2 +- .../Templates/SharpDevelop.Setup.sln | 18 ++++ src/Setup/Files.wxs | 6 ++ src/Setup/Setup.wxs | 1 + 18 files changed, 237 insertions(+), 22 deletions(-) create mode 100644 src/Main/ICSharpCode.SharpDevelop.BuildWorker120/Configuration/AssemblyInfo.cs create mode 100644 src/Main/ICSharpCode.SharpDevelop.BuildWorker120/ICSharpCode.SharpDevelop.BuildWorker120.csproj create mode 100644 src/Main/ICSharpCode.SharpDevelop.BuildWorker120/app.config create mode 100644 src/Main/SharpDevelop/Templates/SharpDevelop.Setup.sln diff --git a/README.md b/README.md index c43697f4fd..15807e93b5 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,13 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod ##Extended Requirements (building #Develop) + - [Microsoft Build Tools 2013](www.microsoft.com/en-us/download/details.aspx?id=40760) - [.NET 3.5 SP1](http://www.microsoft.com/en-au/download/details.aspx?id=22) - - [.NET 4.5 SDK](http://www.microsoft.com/en-au/download/details.aspx?id=30653) (part of [Windows SDK 8.0](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx)) - - Windows SDK 7.1 (?? not sure if this still is necessary...) - - Windows SDK 7.0 (optional; C++ compiler needed for profiler) + - [.NET 4.5 SDK] (part of [Windows SDK 8.0](http://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx)) + - [Windows SDK 7.1](http://www.microsoft.com/downloads/details.aspx?familyid=6B6C21D2-2006-4AFA-9702-529FA782D63B) (?? not sure if this still is necessary...) + - [Windows SDK 7.0](http://www.microsoft.com/en-us/download/details.aspx?id=3138) (optional; C++ compiler needed for profiler) - [Windows PowerShell](http://www.microsoft.com/en-us/download/details.aspx?id=34595) - - [SD Git Repository](https://github.com/icsharpcode/SharpDevelop.git) + - If you have cloned the SD git repository: git must be available on your PATH ##Libraries and Integrated tools: @@ -42,7 +43,7 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod * [ITextSharp](http://sourceforge.net/projects/itextsharp/) * [log4Net](https://github.com/apache/log4net) * Mono T4 -* [Mono.Cecil](https://github.com/jbevain/cecil): MIT License (thanks to **Jb Evain**) - +* [Mono.Cecil](https://github.com/jbevain/cecil): MIT License (thanks to **Jb Evain**) * [Sharp Svn](https://sharpsvn.open.collab.net/) * [SQLite](https://sqlite.org/) * [WPFToolkit](https://wpf.codeplex.com/) @@ -58,8 +59,8 @@ If you want to contribute see ["Joining the team"](https://github.com/icsharpcod ##Reusable Libraries (Part of #Develop): -* [AvalonEdit](https://github.com/icsharpcode/SharpDevelop/wiki/AvalonEdit) -* Debugger.Core +* [AvalonEdit](http://avalonedit.net/) +* [Debugger.Core](https://github.com/icsharpcode/SharpDevelop/tree/master/src/AddIns/Debugger/Debugger.Core) * [ICSharpCode.Core](https://github.com/icsharpcode/SharpDevelop/tree/master/src/Main/Core) * [ICSharpCode.Decompiler](https://github.com/icsharpcode/SharpDevelop/tree/master/src/Libraries/ICSharpCode.Decompiler) * [NRefactory](https://github.com/icsharpcode/NRefactory) diff --git a/SharpDevelop.Tests.sln b/SharpDevelop.Tests.sln index abb69b1f6b..6a3094b7fe 100644 --- a/SharpDevelop.Tests.sln +++ b/SharpDevelop.Tests.sln @@ -26,6 +26,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Wi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDevelop", "src\Main\SharpDevelop\SharpDevelop.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker120", "src\Main\ICSharpCode.SharpDevelop.BuildWorker120\ICSharpCode.SharpDevelop.BuildWorker120.csproj", "{6F273DA5-E10C-45A6-9071-7313ECD98C90}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2A232EF1-EB95-41C6-B63A-C106E0C95D3C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "src\Libraries\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}" @@ -280,6 +282,10 @@ Global {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|Any CPU.Build.0 = Debug|Any CPU {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Any CPU.ActiveCfg = Release|Any CPU {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Any CPU.Build.0 = Release|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Release|Any CPU.Build.0 = Release|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU @@ -647,6 +653,7 @@ Global {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {6F273DA5-E10C-45A6-9071-7313ECD98C90} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {D68133BD-1E63-496E-9EDE-4FBDBF77B486} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {6222A3A1-83CE-47A3-A4E4-A018F82D44D8} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} diff --git a/SharpDevelop.sln b/SharpDevelop.sln index c425e8c62c..681b50ed21 100644 --- a/SharpDevelop.sln +++ b/SharpDevelop.sln @@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Wi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpDevelop", "src\Main\SharpDevelop\SharpDevelop.csproj", "{1152B71B-3C05-4598-B20D-823B5D40559E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker120", "src\Main\ICSharpCode.SharpDevelop.BuildWorker120\ICSharpCode.SharpDevelop.BuildWorker120.csproj", "{6F273DA5-E10C-45A6-9071-7313ECD98C90}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{2A232EF1-EB95-41C6-B63A-C106E0C95D3C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil", "src\Libraries\cecil\Mono.Cecil.csproj", "{D68133BD-1E63-496E-9EDE-4FBDBF77B486}" @@ -229,6 +231,10 @@ Global {1152B71B-3C05-4598-B20D-823B5D40559E}.Debug|Any CPU.Build.0 = Debug|Any CPU {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Any CPU.ActiveCfg = Release|Any CPU {1152B71B-3C05-4598-B20D-823B5D40559E}.Release|Any CPU.Build.0 = Release|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F273DA5-E10C-45A6-9071-7313ECD98C90}.Release|Any CPU.Build.0 = Release|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU @@ -373,6 +379,10 @@ Global {40CA84D4-ACFC-4646-9CDD-B87262D34093}.Debug|Any CPU.Build.0 = Debug|Any CPU {40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.ActiveCfg = Release|Any CPU {40CA84D4-ACFC-4646-9CDD-B87262D34093}.Release|Any CPU.Build.0 = Release|Any CPU + {0502FCF7-72F4-4587-936B-D0238CD0E072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0502FCF7-72F4-4587-936B-D0238CD0E072}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0502FCF7-72F4-4587-936B-D0238CD0E072}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0502FCF7-72F4-4587-936B-D0238CD0E072}.Release|Any CPU.Build.0 = Release|Any CPU {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0162E499-42D0-409B-AA25-EED21F75336B}.Debug|Any CPU.Build.0 = Debug|Any CPU {0162E499-42D0-409B-AA25-EED21F75336B}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -497,10 +507,6 @@ Global {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Debug|Any CPU.Build.0 = Debug|Any CPU {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.ActiveCfg = Release|Any CPU {3DF4060F-5EE0-41CF-8096-F27355FD5511}.Release|Any CPU.Build.0 = Release|Any CPU - {0502FCF7-72F4-4587-936B-D0238CD0E072}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0502FCF7-72F4-4587-936B-D0238CD0E072}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0502FCF7-72F4-4587-936B-D0238CD0E072}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0502FCF7-72F4-4587-936B-D0238CD0E072}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -514,6 +520,7 @@ Global {2748AD25-9C63-4E12-877B-4DCE96FBED54} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {8035765F-D51F-4A0C-A746-2FD100E19419} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {1152B71B-3C05-4598-B20D-823B5D40559E} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} + {6F273DA5-E10C-45A6-9071-7313ECD98C90} = {256F5C28-532C-44C0-8AB8-D8EC5E492E01} {D68133BD-1E63-496E-9EDE-4FBDBF77B486} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} = {2A232EF1-EB95-41C6-B63A-C106E0C95D3C} {3B2A5653-EC97-4001-BB9B-D90F1AF2C371} = {E5A0F4D8-37FD-4A30-BEB0-4409DC4E0865} diff --git a/clean.bat b/clean.bat index fe06abd3ec..98b7efba83 100755 --- a/clean.bat +++ b/clean.bat @@ -1,4 +1,6 @@ -%windir%\microsoft.net\framework\v4.0.30319\msbuild /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Debug +@set PROGFILES=%PROGRAMFILES% +@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)% +"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Debug @IF %ERRORLEVEL% NEQ 0 PAUSE -%windir%\microsoft.net\framework\v4.0.30319\msbuild /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Release +"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /t:clean "/p:Platform=Any CPU" /p:Configuration=Release @IF %ERRORLEVEL% NEQ 0 PAUSE \ No newline at end of file diff --git a/debugbuild.bat b/debugbuild.bat index f39954f3bb..7d4ad2a1ad 100755 --- a/debugbuild.bat +++ b/debugbuild.bat @@ -1,4 +1,6 @@ -%windir%\microsoft.net\framework\v4.0.30319\msbuild /m SharpDevelop.sln /p:Configuration=Debug "/p:Platform=Any CPU" +@set PROGFILES=%PROGRAMFILES% +@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)% +"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /p:Configuration=Debug "/p:Platform=Any CPU" %* @IF %ERRORLEVEL% NEQ 0 GOTO err @exit /B 0 :err diff --git a/releasebuild.bat b/releasebuild.bat index cb115d984f..2a49d9c333 100755 --- a/releasebuild.bat +++ b/releasebuild.bat @@ -1,4 +1,6 @@ -%windir%\microsoft.net\framework\v4.0.30319\msbuild /m SharpDevelop.sln /p:Configuration=Release "/p:Platform=Any CPU" +@set PROGFILES=%PROGRAMFILES% +@if exist "%PROGRAMFILES(x86)%" set PROGFILES=%PROGRAMFILES(x86)% +"%PROGFILES%\MSBuild\12.0\Bin\msbuild" /m SharpDevelop.sln /p:Configuration=Release "/p:Platform=Any CPU" %* @IF %ERRORLEVEL% NEQ 0 GOTO err @exit /B 0 :err diff --git a/src/Automated.proj b/src/Automated.proj index 7943a7578f..5b47626ecd 100644 --- a/src/Automated.proj +++ b/src/Automated.proj @@ -21,8 +21,8 @@ properties available for the projects inside the solution (but this works using the command line) --> - - "$(MSBuildBinPath)\..\v4.0.30319\msbuild.exe" + + "$(MSBuildExtensionsPath)\12.0\Bin\msbuild.exe" /m /p:Configuration=Release $(BuildProperties) "/p:SharpDevelopBinPath=$(SharpDevelopBin)" $(BuildProperties) "/p:FSharpBuildTasksPath=$(SharpDevelopSrc)\AddIns\BackendBindings\FSharp\RequiredLibraries" diff --git a/src/Main/ICSharpCode.SharpDevelop.BuildWorker/ICSharpCode.SharpDevelop.BuildWorker.csproj b/src/Main/ICSharpCode.SharpDevelop.BuildWorker/ICSharpCode.SharpDevelop.BuildWorker.csproj index 8580f8ef95..424ff79e3d 100644 --- a/src/Main/ICSharpCode.SharpDevelop.BuildWorker/ICSharpCode.SharpDevelop.BuildWorker.csproj +++ b/src/Main/ICSharpCode.SharpDevelop.BuildWorker/ICSharpCode.SharpDevelop.BuildWorker.csproj @@ -49,8 +49,10 @@ - - + + + 4.0 + 3.5 diff --git a/src/Main/ICSharpCode.SharpDevelop.BuildWorker/app.config b/src/Main/ICSharpCode.SharpDevelop.BuildWorker/app.config index 92fe986e09..5691c95e4c 100644 --- a/src/Main/ICSharpCode.SharpDevelop.BuildWorker/app.config +++ b/src/Main/ICSharpCode.SharpDevelop.BuildWorker/app.config @@ -1,6 +1,10 @@  - + + +
+ + diff --git a/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/Configuration/AssemblyInfo.cs b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/Configuration/AssemblyInfo.cs new file mode 100644 index 0000000000..1d6c87f697 --- /dev/null +++ b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/Configuration/AssemblyInfo.cs @@ -0,0 +1,27 @@ +// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Reflection; + +[assembly: AssemblyTitle("SharpDevelop Build Worker for MSBuild 12.0")] +[assembly: AssemblyDescription("Runs MSBuild 12.0")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: CLSCompliant(true)] diff --git a/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/ICSharpCode.SharpDevelop.BuildWorker120.csproj b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/ICSharpCode.SharpDevelop.BuildWorker120.csproj new file mode 100644 index 0000000000..9bc7e6672d --- /dev/null +++ b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/ICSharpCode.SharpDevelop.BuildWorker120.csproj @@ -0,0 +1,101 @@ + + + + {6F273DA5-E10C-45A6-9071-7313ECD98C90} + Debug + AnyCPU + Exe + ICSharpCode.SharpDevelop.BuildWorker + ICSharpCode.SharpDevelop.BuildWorker120 + v4.5.1 + False + False + 4 + False + ..\..\..\bin\ + True + ..\ICSharpCode.SharpDevelop.snk + False + File + False + -Microsoft.Globalization#CA1303 + + + False + obj\$(Configuration)\ + + + true + Full + False + True + DEBUG;TRACE + obj\ + + + False + None + True + False + TRACE + + + False + Off + 4194304 + AnyCPU + 4096 + True + + + + + + + + 3.5 + + + + + + + Configuration\GlobalAssemblyInfo.cs + + + BuildJob.cs + + + EventSource.cs + + + EventTypes.cs + + + ExtendedBinaryReader.cs + + + HostProcess.cs + + + MSBuild40.cs + + + Program.cs + + + + + + {35CEF10F-2D4C-45F2-9DD1-161E0FEC583C} + ICSharpCode.Core + false + + + + + + + + + \ No newline at end of file diff --git a/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/app.config b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/app.config new file mode 100644 index 0000000000..0e9d54308b --- /dev/null +++ b/src/Main/ICSharpCode.SharpDevelop.BuildWorker120/app.config @@ -0,0 +1,32 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/BuildWorkerManager.cs b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/BuildWorkerManager.cs index 507c61df1b..1fd518f4bd 100644 --- a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/BuildWorkerManager.cs +++ b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/BuildWorkerManager.cs @@ -34,6 +34,7 @@ namespace ICSharpCode.SharpDevelop.Project readonly List freeWorkers = new List(); readonly string workerProcessName; + public static readonly BuildWorkerManager MSBuild120 = new BuildWorkerManager("ICSharpCode.SharpDevelop.BuildWorker120.exe"); public static readonly BuildWorkerManager MSBuild40 = new BuildWorkerManager("ICSharpCode.SharpDevelop.BuildWorker40.exe"); public static readonly BuildWorkerManager MSBuild35 = new BuildWorkerManager("ICSharpCode.SharpDevelop.BuildWorker35.exe"); diff --git a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs index a1cefac003..88a221d635 100644 --- a/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs +++ b/src/Main/SharpDevelop/Project/Build/MSBuildEngine/MSBuildEngineWorker.cs @@ -159,8 +159,10 @@ namespace ICSharpCode.SharpDevelop.Project loggerChain.HandleError(new BuildError(job.ProjectFileName, ".NET 3.5 SP1 is required to build this project.")); tcs.SetResult(false); } - } else { + } else if (projectMinimumSolutionVersion <= SolutionFormatVersion.VS2010) { BuildWorkerManager.MSBuild40.RunBuildJob(job, loggerChain, OnDone, cancellationToken); + } else { + BuildWorkerManager.MSBuild120.RunBuildJob(job, loggerChain, OnDone, cancellationToken); } return tcs.Task; } diff --git a/src/Main/SharpDevelop/SharpDevelop.csproj b/src/Main/SharpDevelop/SharpDevelop.csproj index 90d7f354bf..abc1ba0b2e 100644 --- a/src/Main/SharpDevelop/SharpDevelop.csproj +++ b/src/Main/SharpDevelop/SharpDevelop.csproj @@ -258,6 +258,7 @@ Never + @@ -330,7 +331,6 @@ - diff --git a/src/Main/SharpDevelop/Templates/SharpDevelop.Setup.sln b/src/Main/SharpDevelop/Templates/SharpDevelop.Setup.sln new file mode 100644 index 0000000000..bad5c47864 --- /dev/null +++ b/src/Main/SharpDevelop/Templates/SharpDevelop.Setup.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.0.0.5860 +Project("{CFEE4113-1246-4D54-95CB-156813CB8593}") = "SharpDevelop.Setup", "SharpDevelop.Setup.wixproj", "{FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}.Release|Any CPU.Build.0 = Release|Any CPU + {FFC0F136-2F91-4F2E-8D8B-DD435F01A7E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs index 768ca1de22..c9aaef23c8 100644 --- a/src/Setup/Files.wxs +++ b/src/Setup/Files.wxs @@ -312,6 +312,12 @@ + + + + + + diff --git a/src/Setup/Setup.wxs b/src/Setup/Setup.wxs index 1502825aff..1633ffb543 100644 --- a/src/Setup/Setup.wxs +++ b/src/Setup/Setup.wxs @@ -195,6 +195,7 @@ + From 58f0ba864e066a481b21546c76380bebcd8bbd25 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 13 Apr 2014 16:41:01 +0200 Subject: [PATCH 10/12] Solution: mark properties as [Browsable(false)] when they are not intended to be shown in the property grid --- src/Main/SharpDevelop/Project/Solution.cs | 8 ++++++++ src/Main/SharpDevelop/Project/SolutionFolder.cs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/src/Main/SharpDevelop/Project/Solution.cs b/src/Main/SharpDevelop/Project/Solution.cs index f5d86a93f5..fbd48f28b0 100644 --- a/src/Main/SharpDevelop/Project/Solution.cs +++ b/src/Main/SharpDevelop/Project/Solution.cs @@ -126,6 +126,7 @@ namespace ICSharpCode.SharpDevelop.Project IProject startupProject; + [Browsable(false)] public IProject StartupProject { get { if (startupProject == null) { @@ -231,6 +232,7 @@ namespace ICSharpCode.SharpDevelop.Project } #endregion + [Browsable(false)] public IEnumerable AllItems { get { return this.Items.Flatten(i => i is ISolutionFolder ? ((ISolutionFolder)i).Items : null); @@ -274,12 +276,14 @@ namespace ICSharpCode.SharpDevelop.Project #region Preferences Properties preferences = new Properties(); + [Browsable(false)] public Properties Preferences { get { return preferences; } } Properties globalPreferences = new Properties(); + [Browsable(false)] public Properties GlobalPreferences { get { return globalPreferences; } } @@ -369,6 +373,7 @@ namespace ICSharpCode.SharpDevelop.Project #region MSBuildProjectCollection readonly Microsoft.Build.Evaluation.ProjectCollection msBuildProjectCollection = new Microsoft.Build.Evaluation.ProjectCollection(); + [Browsable(false)] public Microsoft.Build.Evaluation.ProjectCollection MSBuildProjectCollection { get { return msBuildProjectCollection; } } @@ -467,7 +472,9 @@ namespace ICSharpCode.SharpDevelop.Project public event EventHandler ActiveConfigurationChanged = delegate { }; + [Browsable(false)] public IConfigurationOrPlatformNameCollection ConfigurationNames { get; private set; } + [Browsable(false)] public IConfigurationOrPlatformNameCollection PlatformNames { get; private set; } void CreateDefaultConfigurationsIfMissing() @@ -498,6 +505,7 @@ namespace ICSharpCode.SharpDevelop.Project bool isDirty; + [Browsable(false)] public bool IsDirty { get { return isDirty; } set { diff --git a/src/Main/SharpDevelop/Project/SolutionFolder.cs b/src/Main/SharpDevelop/Project/SolutionFolder.cs index c65d49a454..05ee76518d 100644 --- a/src/Main/SharpDevelop/Project/SolutionFolder.cs +++ b/src/Main/SharpDevelop/Project/SolutionFolder.cs @@ -114,24 +114,30 @@ namespace ICSharpCode.SharpDevelop.Project readonly SolutionItemsCollection items; + [Browsable(false)] public IMutableModelCollection Items { get { return items; } } #endregion + [ReadOnly(true)] public virtual string Name { get; set; } + [Browsable(false)] public ISolutionFolder ParentFolder { get; set; } + [Browsable(false)] public ISolution ParentSolution { get { return parentSolution; } } + [Browsable(false)] public Guid IdGuid { get { return idGuid; } set { idGuid = value; } } + [Browsable(false)] public Guid TypeGuid { get { return ProjectTypeGuids.SolutionFolder; } } From dc2207bccf4d531ab4d6239d55d25279f74dabc3 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 13 Apr 2014 19:18:36 +0200 Subject: [PATCH 11/12] Don't save solution-wide .sdsettings file if it is unchanged. --- .../CSharpFormattingOptionsPersistence.cs | 2 +- src/Main/Base/Project/Project/ISolution.cs | 2 +- src/Main/SharpDevelop/Project/Solution.cs | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs index fafc72e574..a8f726ce99 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsPersistence.cs @@ -118,7 +118,7 @@ namespace CSharpBinding.FormattingStrategy { // Load solution settings SolutionOptions = new CSharpFormattingOptionsPersistence( - e.Solution.GlobalPreferences, + e.Solution.SDSettings, new CSharpFormattingOptionsContainer(GlobalOptions.OptionsContainer) { DefaultText = StringParser.Parse("${res:CSharpBinding.Formatting.SolutionOptionReference}") diff --git a/src/Main/Base/Project/Project/ISolution.cs b/src/Main/Base/Project/Project/ISolution.cs index 39e6202f5e..e1f4047106 100644 --- a/src/Main/Base/Project/Project/ISolution.cs +++ b/src/Main/Base/Project/Project/ISolution.cs @@ -97,7 +97,7 @@ namespace ICSharpCode.SharpDevelop.Project /// Gets a container that can be used to store data about the solution. /// This data is stored along with .sln file as .sln.sdsettings. ///
- Properties GlobalPreferences { get; } + Properties SDSettings { get; } /// /// This event is raised by immediately before the preferences are saved to disk. diff --git a/src/Main/SharpDevelop/Project/Solution.cs b/src/Main/SharpDevelop/Project/Solution.cs index fbd48f28b0..1d8b488155 100644 --- a/src/Main/SharpDevelop/Project/Solution.cs +++ b/src/Main/SharpDevelop/Project/Solution.cs @@ -35,7 +35,7 @@ namespace ICSharpCode.SharpDevelop.Project class Solution : SolutionFolder, ISolution { FileName fileName; - FileName globalSettingsFileName; + FileName sdSettingsFileName; DirectoryName directory; readonly IProjectChangeWatcher changeWatcher; readonly IFileService fileService; @@ -52,7 +52,7 @@ namespace ICSharpCode.SharpDevelop.Project this.PlatformNames = new SolutionConfigurationOrPlatformNameCollection(this, true); this.projects = new SynchronizedModelCollection(new ProjectModelCollection(this)); this.FileName = fileName; - this.globalSettingsFileName = new FileName(fileName + ".sdsettings"); + this.sdSettingsFileName = new FileName(fileName + ".sdsettings"); base.Name = fileName.GetFileNameWithoutExtension(); this.globalSections = new SynchronizedModelCollection(new NullSafeSimpleModelCollection()); @@ -281,11 +281,11 @@ namespace ICSharpCode.SharpDevelop.Project get { return preferences; } } - Properties globalPreferences = new Properties(); + Properties sdSettings = new Properties(); [Browsable(false)] - public Properties GlobalPreferences { - get { return globalPreferences; } + public Properties SDSettings { + get { return sdSettings; } } string GetPreferencesKey() @@ -297,7 +297,7 @@ namespace ICSharpCode.SharpDevelop.Project { try { preferences = SD.PropertyService.LoadExtraProperties(GetPreferencesKey()); - globalPreferences = Properties.Load(globalSettingsFileName); + sdSettings = Properties.Load(sdSettingsFileName); } catch (IOException) { } catch (XmlException) { // ignore errors about inaccessible or malformed files @@ -321,7 +321,9 @@ namespace ICSharpCode.SharpDevelop.Project try { SD.PropertyService.SaveExtraProperties(GetPreferencesKey(), preferences); - globalPreferences.Save(globalSettingsFileName); + if (sdSettings.IsDirty) { + sdSettings.Save(sdSettingsFileName); + } } catch (IOException) { // ignore errors writing to extra properties } From 7c90ec58009ad03827941469930644d2dbfa6905 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 19 Apr 2014 14:13:33 +0200 Subject: [PATCH 12/12] Add GlobalAssemblyInfo.cs to ICSharpCode.Reporting. --- .../ICSharpCode.Reporting.Addin.csproj | 3 +++ .../ICSharpCode.Reporting/ICSharpCode.Reporting.csproj | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj index 0a3280f228..1b49fca664 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting.Addin/ICSharpCode.Reporting.Addin.csproj @@ -92,6 +92,9 @@ + + Configuration\GlobalAssemblyInfo.cs + diff --git a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj index d4f76cbaa2..d48e43316b 100644 --- a/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj +++ b/src/AddIns/Misc/Reporting/ICSharpCode.Reporting/ICSharpCode.Reporting.csproj @@ -79,6 +79,9 @@ + + Src\Configuration\GlobalAssemblyInfo.cs +