From 20cbe026317bacb17542ac2300aee1500469e92e Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 10 Feb 2007 17:23:16 +0000 Subject: [PATCH 1/9] Fixed SD2-1276: Duplicated code when converting single VB.NET If-Then line into multiple lines Use AddInTree to let AddIns register additional MSBuild properties. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2380 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Boo/BooBinding/Project/BooBinding.addin | 14 ++++++++--- .../Boo/BooBinding/Project/Src/BooProject.cs | 6 ----- .../VBNetFormattingStrategy.cs | 2 +- .../Src/Project/MSBuildBasedProject.cs | 25 ++++++++++++++++--- .../Base/Project/Src/Project/MSBuildEngine.cs | 23 ++++------------- .../Implementations/ConstructedReturnType.cs | 10 +++++--- 6 files changed, 46 insertions(+), 34 deletions(-) diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin index d8e8f76493..6efac20361 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin @@ -15,6 +15,7 @@ + - + + + - + + + + + + - + diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs index 19973e98ea..9d761be105 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs @@ -18,17 +18,11 @@ namespace Grunwald.BooBinding { public class BooProject : CompilableProject { - static bool initialized = false; public static readonly string BooBinPath = Path.GetDirectoryName(typeof(BooProject).Assembly.Location); void Init() { reparseCodeSensitiveProperties.Add("Ducky"); - - if (!initialized) { - initialized = true; - MSBuildEngine.MSBuildProperties.Add("BooBinPath", BooBinPath); - } } public override string Language { diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs index 4d64ad0ff8..9a74d5a9ff 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs @@ -351,7 +351,7 @@ namespace VBNetBinding.FormattingStrategy if (Regex.IsMatch(texttoreplace.Trim(), statement.StartRegex, RegexOptions.IgnoreCase)) { string indentation = GetIndentation(textArea, lineNr - 1); if (isEndStatementNeeded(textArea, ref statement, lineNr)) { - textArea.Document.Insert(textArea.Caret.Offset, terminator + indentation + statement.EndStatement); + textArea.Document.Replace(curLine.Offset, curLine.Length, terminator + indentation + statement.EndStatement); ++undoCount; } for (int i = 0; i < statement.IndentPlus; i++) { diff --git a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs index dec810b845..572ef20134 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs @@ -820,9 +820,28 @@ namespace ICSharpCode.SharpDevelop.Project internal static void InitializeMSBuildProject(MSBuild.Project project) { - project.GlobalProperties.SetProperty("BuildingInsideVisualStudio", "true"); - foreach (KeyValuePair pair in MSBuildEngine.MSBuildProperties) { - project.GlobalProperties.SetProperty(pair.Key, pair.Value, true); + InitializeMSBuildProjectProperties(project.GlobalProperties); + } + + /// + /// Set compilation properties (MSBuildProperties and AddInTree/AdditionalPropertiesPath). + /// + internal static void InitializeMSBuildProjectProperties(MSBuild.BuildPropertyGroup propertyGroup) + { + foreach (KeyValuePair entry in MSBuildEngine.MSBuildProperties) { + propertyGroup.SetProperty(entry.Key, entry.Value); + } + // re-load these properties from AddInTree every time because "text" might contain + // SharpDevelop properties resolved by the StringParser (e.g. ${property:FxCopPath}) + AddInTreeNode node = AddInTree.GetTreeNode(MSBuildEngine.AdditionalPropertiesPath, false); + if (node != null) { + foreach (Codon codon in node.Codons) { + object item = codon.BuildItem(null, new System.Collections.ArrayList()); + if (item != null) { + bool escapeValue = !codon.Properties.Get("text", "").Contains("$("); + propertyGroup.SetProperty(codon.Id, item.ToString(), escapeValue); + } + } } } diff --git a/src/Main/Base/Project/Src/Project/MSBuildEngine.cs b/src/Main/Base/Project/Src/Project/MSBuildEngine.cs index e348149586..252b22e865 100644 --- a/src/Main/Base/Project/Src/Project/MSBuildEngine.cs +++ b/src/Main/Base/Project/Src/Project/MSBuildEngine.cs @@ -30,7 +30,7 @@ namespace ICSharpCode.SharpDevelop.Project const string CompileTaskNamesPath = "/SharpDevelop/MSBuildEngine/CompileTaskNames"; const string AdditionalTargetFilesPath = "/SharpDevelop/MSBuildEngine/AdditionalTargetFiles"; const string AdditionalLoggersPath = "/SharpDevelop/MSBuildEngine/AdditionalLoggers"; - const string AdditionalPropertiesPath = "/SharpDevelop/MSBuildEngine/AdditionalProperties"; + internal const string AdditionalPropertiesPath = "/SharpDevelop/MSBuildEngine/AdditionalProperties"; /// /// Gets a list of the task names that cause a "Compiling ..." log message. @@ -69,6 +69,7 @@ namespace ICSharpCode.SharpDevelop.Project MSBuildProperties = new SortedList(); MSBuildProperties.Add("SharpDevelopBinPath", Path.GetDirectoryName(typeof(MSBuildEngine).Assembly.Location)); + MSBuildProperties.Add("BuildingInsideVisualStudio", "true"); } #region Properties @@ -373,21 +374,9 @@ namespace ICSharpCode.SharpDevelop.Project internal Engine CreateEngine() { Engine engine = MSBuildInternals.CreateEngine(); - foreach (KeyValuePair entry in MSBuildProperties) { - engine.GlobalProperties.SetProperty(entry.Key, entry.Value); - } - // re-load these properties from AddInTree every time because "text" might contain - // SharpDevelop properties resolved by the StringParser (e.g. ${property:FxCopPath}) - AddInTreeNode node = AddInTree.GetTreeNode(AdditionalPropertiesPath, false); - if (node != null) { - foreach (Codon codon in node.Codons) { - object item = codon.BuildItem(null, new System.Collections.ArrayList()); - if (item != null) { - bool escapeValue = !codon.Properties.Get("text", "").Contains("$("); - engine.GlobalProperties.SetProperty(codon.Id, item.ToString(), escapeValue); - } - } - } + + MSBuildBasedProject.InitializeMSBuildProjectProperties(engine.GlobalProperties); + if (options.AdditionalProperties != null) { foreach (KeyValuePair entry in options.AdditionalProperties) { engine.GlobalProperties.SetProperty(entry.Key, entry.Value); @@ -398,8 +387,6 @@ namespace ICSharpCode.SharpDevelop.Project engine.GlobalProperties.SetProperty("SolutionFileName", Path.GetFileName(solution.FileName)); engine.GlobalProperties.SetProperty("SolutionPath", solution.FileName); - engine.GlobalProperties.SetProperty("BuildingInsideVisualStudio", "true"); - return engine; } diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/ConstructedReturnType.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/ConstructedReturnType.cs index 8adc0384bf..ac9a14d008 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/ConstructedReturnType.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/ConstructedReturnType.cs @@ -72,17 +72,21 @@ namespace ICSharpCode.SharpDevelop.Dom } } + /// + /// Gets if is/contains a generic return type referring to a class type parameter. + /// bool CheckReturnType(IReturnType t) { + if (t == null) { + return false; + } if (t.IsGenericReturnType) { return t.CastToGenericReturnType().TypeParameter.Method == null; } else if (t.IsArrayReturnType) { return CheckReturnType(t.CastToArrayReturnType().ArrayElementType); } else if (t.IsConstructedReturnType) { foreach (IReturnType para in t.CastToConstructedReturnType().TypeArguments) { - if (para != null) { - if (CheckReturnType(para)) return true; - } + if (CheckReturnType(para)) return true; } return false; } else { From 61ab46c6ff188bd8201b44ee721d73f2d66cf15f Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Tue, 13 Feb 2007 18:20:12 +0000 Subject: [PATCH 2/9] Fixed SD2-1312 - DivideByZeroException when searching an empty file. The ForwardTextIterator's MoveAhead method no longer tries to move forward when the text buffer is empty. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2382 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../TextIterator/ForwardTextIterator.cs | 4 ++ ...dIteratorWithEmptyTextBufferTestFixture.cs | 47 +++++++++++++++++++ .../ICSharpCode.SharpDevelop.Tests.csproj | 1 + 3 files changed, 52 insertions(+) create mode 100644 src/Main/Base/Test/ForwardIteratorWithEmptyTextBufferTestFixture.cs diff --git a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/TextIterator/ForwardTextIterator.cs b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/TextIterator/ForwardTextIterator.cs index 2f95c9b90e..27c473589e 100644 --- a/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/TextIterator/ForwardTextIterator.cs +++ b/src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/TextIterator/ForwardTextIterator.cs @@ -85,6 +85,10 @@ namespace SearchAndReplace switch (state) { case TextIteratorState.Resetted: + if (textBuffer.Length == 0) { + state = TextIteratorState.Done; + return false; + } Position = endOffset; state = TextIteratorState.Iterating; return true; diff --git a/src/Main/Base/Test/ForwardIteratorWithEmptyTextBufferTestFixture.cs b/src/Main/Base/Test/ForwardIteratorWithEmptyTextBufferTestFixture.cs new file mode 100644 index 0000000000..b45b549c34 --- /dev/null +++ b/src/Main/Base/Test/ForwardIteratorWithEmptyTextBufferTestFixture.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.SharpDevelop.Tests.Utils; +using ICSharpCode.TextEditor.Document; +using SearchAndReplace; +using NUnit.Framework; + +namespace ICSharpCode.SharpDevelop.Tests +{ + /// + /// The fix for SD2-857 highlighted another bug (SD2-1312) in the + /// ForwardTextIterator where it does not handle the case where + /// the ITextBufferStrategy has a length of zero. + /// + [TestFixture] + public class ForwardIteratorWithEmptyTextBufferTestFixture + { + ForwardTextIterator forwardTextIterator; + + [SetUp] + public void SetUp() + { + // Create the document to be iterated through. + MockDocument doc = new MockDocument(); + StringTextBufferStrategy textBufferStrategy = new StringTextBufferStrategy(); + doc.TextBufferStrategy = textBufferStrategy; + ProvidedDocumentInformation docInfo = new ProvidedDocumentInformation(doc, + @"C:\Temp\test.txt", + 0); + + // Create the forward iterator. + forwardTextIterator = new ForwardTextIterator(docInfo); + } + + [Test] + public void CannotMoveAhead() + { + Assert.IsFalse(forwardTextIterator.MoveAhead(1)); + } + } +} diff --git a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj index e6769bd950..77d40a37bb 100644 --- a/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj +++ b/src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj @@ -53,6 +53,7 @@ + From 33ea15dfff24fdd52d3e893e12085e8747099fb9 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 15 Feb 2007 19:47:21 +0000 Subject: [PATCH 3/9] Compiling for the compact framework now references the Compact mscorlib version (previously it was possible to reference non-existing methods and cause a MissingMethodException at runtime). CecilReader now reads attributes for class members. BooProject now references Boo.Lang.Useful so that code-completion can find it. Fixed UnknownScriptTag in HTML-Mode.xshd. Fixed possible deadlock in SearchClassReturnType.cs git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2384 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Boo/BooBinding/Project/Src/BooProject.cs | 12 +-- .../Project/SharpDevelop.Build.CSharp.targets | 73 +++++++++++-------- .../SharpDevelop.Build.VisualBasic.targets | 20 +++-- .../Project/Resources/HTML-Mode.xshd | 2 +- .../Project/Src/CecilReader.cs | 4 + .../Implementations/SearchClassReturnType.cs | 14 ++-- 6 files changed, 77 insertions(+), 48 deletions(-) diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs index 9d761be105..fc29204930 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs @@ -83,19 +83,19 @@ namespace Grunwald.BooBinding protected override ParseProjectContent CreateProjectContent() { - ParseProjectContent pc = base.CreateProjectContent(); - ReferenceProjectItem systemItem = new ReferenceProjectItem(this, "System"); - pc.AddReferencedContent(ParserService.GetProjectContentForReference(systemItem)); - ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location); - pc.AddReferencedContent(ParserService.GetProjectContentForReference(booLangItem)); if (BooCompilerPC == null) { ReferenceProjectItem booCompilerItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Compiler.AbstractAstAttribute).Assembly.Location); BooCompilerPC = ParserService.GetProjectContentForReference(booCompilerItem); } if (BooUsefulPC == null) { ReferenceProjectItem booUsefulItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Useful.Attributes.SingletonAttribute).Assembly.Location); - BooUsefulPC = ParserService.GetProjectContentForReference(booUsefulItem); + BooUsefulPC = ParserService.GetRegistryForReference(booUsefulItem).GetProjectContentForReference("Boo.Lang.Useful", booUsefulItem.Include); } + ParseProjectContent pc = base.CreateProjectContent(); + ReferenceProjectItem systemItem = new ReferenceProjectItem(this, "System"); + pc.AddReferencedContent(ParserService.GetProjectContentForReference(systemItem)); + ReferenceProjectItem booLangItem = new ReferenceProjectItem(this, typeof(Boo.Lang.Builtins).Assembly.Location); + pc.AddReferencedContent(ParserService.GetProjectContentForReference(booLangItem)); pc.DefaultImports = new DefaultUsing(pc); pc.DefaultImports.Usings.Add("Boo.Lang"); pc.DefaultImports.Usings.Add("Boo.Lang.Builtins"); diff --git a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets index 1828bd35cd..0d1c071b0b 100644 --- a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets +++ b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.CSharp.targets @@ -7,46 +7,50 @@ to work around a problem in Microsoft's C# targets --> $(TargetFrameworkVersion) + unknown - - $(SystemRoot)\Microsoft.NET\Framework\v1.0.3705 - true - true - - - $(SystemRoot)\Microsoft.NET\Framework\v1.1.4322 - true - true - - - + v1.0 - - + + + $(SystemRoot)\Microsoft.NET\Framework\v1.0.3705 + $(SystemRoot)\Microsoft.NET\Framework\v1.1.4322 false + v1 - - true + + v2.0 + v2 - + v1.0 true + CF - + v2.0 true + CF + + + Mono + + + + - + - + {CandidateAssemblyFiles}; $(ReferencePath); @@ -60,7 +64,7 @@ $(CscToolPath) - + false @@ -68,16 +72,16 @@ - - + - + - + @@ -87,15 +91,24 @@ - - + + + + PocketPC - WinCE + WinCE + + true + true + + + + - - diff --git a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets index a95ba0c385..1fed152b06 100644 --- a/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets +++ b/src/Libraries/ICSharpCode.Build.Tasks/Project/SharpDevelop.Build.VisualBasic.targets @@ -28,8 +28,9 @@ - - true + + v2.0 + true @@ -157,12 +158,21 @@ - - + + + + PocketPC - WinCE + WinCE + + true + true + + + + diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd index f4a0947917..5ca4ec47ac 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Resources/HTML-Mode.xshd @@ -32,7 +32,7 @@ </script> - <script + <script@C </script> diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs index 81e20a2061..a299d4e047 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs @@ -256,6 +256,7 @@ namespace ICSharpCode.SharpDevelop.Dom DefaultField f = new DefaultField(this, field.Name); f.Modifiers = TranslateModifiers(field); f.ReturnType = CreateType(this.ProjectContent, this, field.FieldType); + AddAttributes(CompilationUnit.ProjectContent, f.Attributes, field.CustomAttributes); Fields.Add(f); } } @@ -277,6 +278,7 @@ namespace ICSharpCode.SharpDevelop.Dom p.IsIndexer = true; } AddParameters(p, property.Parameters); + AddAttributes(CompilationUnit.ProjectContent, p.Attributes, property.CustomAttributes); Properties.Add(p); } } @@ -290,6 +292,7 @@ namespace ICSharpCode.SharpDevelop.Dom e.Modifiers = TranslateModifiers(eventDef); } e.ReturnType = CreateType(this.ProjectContent, this, eventDef.EventType); + AddAttributes(CompilationUnit.ProjectContent, e.Attributes, eventDef.CustomAttributes); Events.Add(e); } } @@ -320,6 +323,7 @@ namespace ICSharpCode.SharpDevelop.Dom } m.ReturnType = CreateType(this.ProjectContent, m, method.ReturnType.ReturnType); + AddAttributes(CompilationUnit.ProjectContent, m.Attributes, method.CustomAttributes); if (this.ClassType == ClassType.Interface) { m.Modifiers = ModifierEnum.Public | ModifierEnum.Abstract; } else { diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SearchClassReturnType.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SearchClassReturnType.cs index c3f222b0ab..78018920d1 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SearchClassReturnType.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SearchClassReturnType.cs @@ -114,14 +114,16 @@ namespace ICSharpCode.SharpDevelop.Dom lock (cache) { if (cache.TryGetValue(this, out type)) return type; - try { - isSearching = true; - type = pc.SearchType(new SearchTypeRequest(name, typeParameterCount, declaringClass, caretLine, caretColumn)).Result; + } + try { + isSearching = true; + type = pc.SearchType(new SearchTypeRequest(name, typeParameterCount, declaringClass, caretLine, caretColumn)).Result; + lock (cache) { cache[this] = type; - return type; - } finally { - isSearching = false; } + return type; + } finally { + isSearching = false; } } } From 3cf1fe84101249ec4a98da45792ef5bca796c21b Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 15 Feb 2007 19:53:42 +0000 Subject: [PATCH 4/9] Fixed forum-15241-2. : Pressing Ctrl-Space in Boo Interpreter Debuggee causes exception. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2385 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo index 4d807e55ef..d617e17c04 100644 --- a/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo +++ b/src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/CodeCompletionData.boo @@ -118,6 +118,7 @@ internal class GlobalsCompletionDataProvider(ICSharpCode.SharpDevelop.DefaultEdi override def GenerateCompletionData(fileName as string, textArea as TextArea, charTyped as System.Char) as (ICompletionData): globals = _interpreter.GetGlobals() + return array(ICompletionData, 0) if globals is null data = array(ICompletionData, len(globals)) for index, key in enumerate(globals): value = null #_interpreter.GetValue(key) TODO From 751904a9f3d6d79a6d904fd86d99c5d44b443f75 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 20 Feb 2007 18:22:42 +0000 Subject: [PATCH 5/9] RC1 designation removed from setup git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2391 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/Setup/Setup.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Setup/Setup.wxs b/src/Setup/Setup.wxs index 6b1cbf5208..df7da8d00d 100644 --- a/src/Setup/Setup.wxs +++ b/src/Setup/Setup.wxs @@ -7,7 +7,7 @@ so the third digit must be the Subversion revision. --> Date: Wed, 21 Feb 2007 08:26:24 +0000 Subject: [PATCH 6/9] Rev 108 of SharpDevelop Reports - fixes error for FolderDialog in wizard git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2392 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../de/PdfSharp.resources.dll | Bin 5120 -> 5120 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/AddIns/SharpDevelopReports/de/PdfSharp.resources.dll b/AddIns/SharpDevelopReports/de/PdfSharp.resources.dll index 54a04efcbd8cb547ff891751ea9e3d1ce456bfaf..9925a18d307036bacdbc8d95da2959e574ce7291 100644 GIT binary patch delta 320 zcmZqBXwaC@!MtJ9j)~pAOlv+)yrsr>MuUODp8*IQ7#LQtOjHz}tjPG8QDCwtlXZQe zhnVYwPQ}a+=^ui3_2Sk~Zu_;&d8@Rg@u_XW-|a8QMV95f))f)udl)JzIWKO?mXF~- zZXdYQbfYTd$e-q$i=rR2IefoZSkCe8XMKM{UE53T_a62OZw3jk+;Q{V`yZF>UY(dK zYW&%0(yK`+JKmiRIIGyB`Tk$euNIkgbvhOe*BR$;zQ82IqN~Bkz@QvlQk0pOUJP<+ z2NMGW2ar|{4Q7}CWD9`U?xCJ8KzhMuNp=|~x0F=9qSWI2(xT*4uoh+opd16k&H$~4 z&Mh|_*01jpo?Io}#lW$>Dke9jFm;jN}&|qK)W&i>Q28I8m& zm`h3O#F3R-jX$YNt~hsgQ`FAtIsb$L!d<)7WGwYh{*LXIzGD3^b^CLP-)!p_^qWKo zb0)t0I(>0d+pBHj($iiTEZCQ|%ZXJ~|I9qM_B(k$e>-lA;+s9k@Tb}--5v51=9T^4 z-8p6B&Av%LF4*r`Z!DZArm%1O6F=X^t^V05Y>ZKxFEGil=&CR>FenF?6lLb67lT~d z!oRFqnrUs{x$3R2Ik03;X~nD$-SyV>`I zdxzy!E+OY_*BCgqSH*-$nmp(fIqkMa_EAIrVwTR;dn#(u#1ArWW7}NK8OX@^Ve(ln K)6M_5m^cA_qjt6c From 64cad7396f0b9a6063cc1998a4b3a0fc9c62f91f Mon Sep 17 00:00:00 2001 From: Justin Dearing Date: Mon, 26 Feb 2007 02:40:04 +0000 Subject: [PATCH 7/9] Setup projects now have an UpgradeCode assigned to them. This is a GUID that remains consistent throughout all incarnations of the MSI package. You cannot upgrade an installed MSI without an upgrade code. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2403 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../WixBinding/Project/Templates/EmptyWixProject.xpt | 1 + .../BackendBindings/WixBinding/Project/Templates/WixProject.xpt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/AddIns/BackendBindings/WixBinding/Project/Templates/EmptyWixProject.xpt b/src/AddIns/BackendBindings/WixBinding/Project/Templates/EmptyWixProject.xpt index 1634def44a..80684d4f95 100644 --- a/src/AddIns/BackendBindings/WixBinding/Project/Templates/EmptyWixProject.xpt +++ b/src/AddIns/BackendBindings/WixBinding/Project/Templates/EmptyWixProject.xpt @@ -20,6 +20,7 @@ Name="" Language="1033" Version="1.0.0.0" + UpgradeCode="${GUID}" Manufacturer=""> Date: Tue, 27 Feb 2007 00:17:22 +0000 Subject: [PATCH 8/9] The XML Editor now returns the correct value for the IViewContent's IsReadOnly property. A read-only xml file will now be indicated by a + character after the filename when opened inside SharpDevelop. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2404 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs index 945cf1dc4d..d5be962044 100644 --- a/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs +++ b/src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs @@ -139,6 +139,12 @@ namespace ICSharpCode.XmlEditor } } + public override bool IsReadOnly { + get { + return xmlEditor.IsReadOnly; + } + } + /// /// Loads the string content into the view. /// From 3e4222ba45918879fe74f3241236e29c16069485 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Tue, 27 Feb 2007 15:42:47 +0000 Subject: [PATCH 9/9] When deleting directories in the project browser, use Subversion's delete command for directories under version control. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2406 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Commands/AutostartCommands.cs | 42 ++++++++++++++++++- src/Libraries/DockPanel_Src/patchnotes.txt | 2 + 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs b/src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs index afb5a65cc3..019de021f7 100644 --- a/src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs +++ b/src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs @@ -23,6 +23,9 @@ namespace ICSharpCode.Svn.Commands /// public sealed class RegisterEventsCommand : AbstractCommand { + const int CannotDeleteFileWithLocalModifications = 195006; + const int CannotDeleteFileNotUnderVersionControl = 200005; + public override void Run() { FileService.FileRemoving += FileRemoving; @@ -65,12 +68,12 @@ namespace ICSharpCode.Svn.Commands void FileCreated(object sender, FileEventArgs e) { + if (e.IsDirectory) return; if (!AddInOptions.AutomaticallyAddFiles) return; if (!Path.IsPathRooted(e.FileName)) return; string fullName = Path.GetFullPath(e.FileName); if (!CanBeVersionControlledFile(fullName)) return; - if (e.IsDirectory) return; try { Status status = SvnClient.Instance.Client.SingleStatus(fullName); switch (status.TextStatus) { @@ -91,7 +94,9 @@ namespace ICSharpCode.Svn.Commands if (e.Cancel) return; string fullName = Path.GetFullPath(e.FileName); if (!CanBeVersionControlledFile(fullName)) return; + if (e.IsDirectory) { + // show "cannot delete directories" message even if // AutomaticallyDeleteFiles (see below) is off! Status status = SvnClient.Instance.Client.SingleStatus(fullName); @@ -100,12 +105,45 @@ namespace ICSharpCode.Svn.Commands case StatusKind.Unversioned: break; default: - MessageService.ShowMessage("SubversionAddIn cannot delete directories, the directory is only removed from the project."); + // must be done using the subversion client, even if + // AutomaticallyDeleteFiles is off, because we don't want to corrupt the + // working copy e.OperationAlreadyDone = true; + try { + SvnClient.Instance.Client.Delete(new string[] { fullName }, false); + } catch (SvnClientException ex) { + LoggingService.Warn("SVN Error code " + ex.ErrorCode); + LoggingService.Warn(ex); + + if (ex.ErrorCode == CannotDeleteFileWithLocalModifications + || ex.ErrorCode == CannotDeleteFileNotUnderVersionControl) + { + if (MessageService.ShowCustomDialog("Delete directory", + "Error deleting " + fullName + ":\n" + + ex.Message, 0, 1, + "Force delete", "${res:Global.CancelButtonText}") + == 0) + { + try { + SvnClient.Instance.Client.Delete(new string[] { fullName }, true); + } catch (SvnClientException ex2) { + e.Cancel = true; + MessageService.ShowError(ex2.Message); + } + } else { + e.Cancel = true; + } + } else { + e.Cancel = true; + MessageService.ShowError(ex.Message); + } + } break; } return; } + // not a directory, but a file: + if (!AddInOptions.AutomaticallyDeleteFiles) return; try { Status status = SvnClient.Instance.Client.SingleStatus(fullName); diff --git a/src/Libraries/DockPanel_Src/patchnotes.txt b/src/Libraries/DockPanel_Src/patchnotes.txt index f11fdf2a26..2311008dc8 100644 --- a/src/Libraries/DockPanel_Src/patchnotes.txt +++ b/src/Libraries/DockPanel_Src/patchnotes.txt @@ -11,6 +11,8 @@ Patch #2: Fixed CREATESTRUCT, MDICREATESTRUCT and WINDOWPOS P/Invoke structure declarations: use IntPtr instead of int - we have to use a pointer-size integers here for 64-bit systems Committed in revision 1335. + Reported to SF: http://sourceforge.net/tracker/index.php?func=detail&aid=1438642&group_id=110642&atid=659401 + The fix was accepted and will be in the next release of the library. Patch #3: Activate the autohide pad explicitly - in DockContentHandler.cs