From bd0a39dd05f2f4c807c5f2f7481dfc0e36f3f9a7 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Mon, 17 Oct 2005 20:47:34 +0000 Subject: [PATCH] Fixed C# ExpressionFinder bug when typing "\." inside a string literal. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@592 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- doc/ChangeLog.xml | 52 +++++++++++++++++++ doc/technotes/ConditionList.html | 6 +-- doc/technotes/DoozerList.html | 4 +- .../Project/Src/Parser/ExpressionFinder.cs | 3 +- .../BuildAddinDocumentation/MainClass.cs | 14 +++-- 5 files changed, 69 insertions(+), 10 deletions(-) diff --git a/doc/ChangeLog.xml b/doc/ChangeLog.xml index 792fd83847..40edb714cb 100644 --- a/doc/ChangeLog.xml +++ b/doc/ChangeLog.xml @@ -1,4 +1,56 @@  + Add documentation for conditions, rename CombineOpen to SolutionOpen. + Add list with documentation about the doozers. + Fixed SD2-477: Solution import error. + Fixed SD2-492: VS.NET solution converter ignores HintPath attribute for references. +Fixed SD2-491: Solution converter doesn't convert references correctly. + Fixed SD2-488: Highlighting editor does not work for addin-defined syntax modes. + Add attribute completion to BooBinding. +BOO-436, Smarter Boo integration (Macros, Attributes, Modules, and Imported Classes) + Fixed BOO-347 (BooBinding does not detect methods generated by AST Attributes) +Fixed bug when switching layout configurations. + Fixed BOO-380 (Namespace aliases handled incorrectly during code completion). +Fixed BOO-515 (Expression resolver thinks " is String.Empty). +Fixed BOO-346 (Addin does not reference Boo.Lang.Useful by default) + +ParserFoldingStrategy now uses both the RecentCompilationUnit and ValidCompilationUnit for folding. This makes folding more stable in VB and Boo. + Add boo file templates and icons. + Added form designer to BooBinding (BOO-513). +Fixed BOO-511 (#develop should not display boo's "generated" module classes). + SD2-490. Fixed problem where the pad contents were not displayed when the default layout was used. + Fixed SD2-483: TreeNode declarations are missing + Add missing file headers. + BooBinding: Implemented inferring the return type from the "return" statement. + Use Boo.Microsoft.Build.Tasks.dll from repository instead of recompiling it every time in the PostBuildEvent. + Added compilation support to BooBinding. + Added a missing NAnt addin resource string. + Added missing resource strings, removed resource strings from AssemblyAnalyzer. + Added NAnt addin from SharpDevelop 1.1/Fidalgo. + Update component library, tried to fix exception when switching back from the form designer when deleting controls from the form so that the caret position is after the end of the document. + Delete old ProjectImporterExporter addin. + The xml folding parser was not setting the filename in the compilation unit causing the Class Browser to throw an unhandled null reference exception. + Minor changes to info document + Added support for Mono 1.1.9.2 + Added extra MSBuild file extensions to be supported by the XmlFoldingParser. + Added more MSBuild file extensions so they are syntax highlighted. + SD2-417 Icon for defintionview pad + Fixed return type of generic parameters like "ref T[]" and generic references in base types (e.g. IList<T> derives from ICollection<T>). + Fixed SD2-479. + The start command line arguments and the working directory are parsed by the StringParser before the program is run. This enables the use of custom string tags such as TargetPath, TargetDir, etc. + Included fix for OverrideMethodsCodeGenerator by Yannick Kiekens (purplebox). + SD2-453: ported CustomLineManager from Fidalgo + fixed SD2-445 C# parser fails on default value expression in variable initializer + Fixed interface code generator for user defined interfaces. + ported patch from fidalgo rev 2097 + Don't ignore errors in ReflectionLoader, show real exception instead of failing later with a ArgumentNullException. + Patch from Shinsaku Nakagawa. Fixes two IME problems: + +1. The font of IME is not changed when option changed. + (Option->TextEditor->General->Font) +2. The location of IME is not occasionally correct. + Added extra filename extensions to be supported by the XmlFoldingParser. Folds were only being updated for files with an .xml extension. + Add "Convert buffer to Boo" command to BooBinding. + Deleted some of the unused translation strings. Fixed SD2-458: Tab is always replaced with 4 spaces Added support for commenting/uncommenting a selection of xml. Fixed SD2-474: Allow targeting other .NET Framework versions. diff --git a/doc/technotes/ConditionList.html b/doc/technotes/ConditionList.html index de79bb39f9..eab5b19bb5 100644 --- a/doc/technotes/ConditionList.html +++ b/doc/technotes/ConditionList.html @@ -83,7 +83,7 @@ It is based on SharpDevelop 2.0.0.590.

BrowserLocation

- Conditions that tries to match the URL of a with a regex. + Conditions that tries to match the URL of a HtmlViewPane with a regex.

@@ -100,7 +100,7 @@ It is based on SharpDevelop 2.0.0.590.

options: - Optional; options that are passed as . + Optional; options that are passed as RegexOptions.
@@ -220,7 +220,7 @@ It is based on SharpDevelop 2.0.0.590.

OwnerState

Condition evaluator that compares the state of the caller/owner with a specified value. - The caller/owner has to implement . + The caller/owner has to implement IOwnerState.

diff --git a/doc/technotes/DoozerList.html b/doc/technotes/DoozerList.html index df77f6a8f6..2e267cfce4 100644 --- a/doc/technotes/DoozerList.html +++ b/doc/technotes/DoozerList.html @@ -5,7 +5,7 @@

Doozer List

This file was generated by the tool 'BuildAddinDocumentation'. -It is based on SharpDevelop 2.0.0.589.

+It is based on SharpDevelop 2.0.0.590.

diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs index e6bd39063d..afc7c850cb 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs @@ -490,7 +490,8 @@ namespace CSharpBinding.Parser if (ch == '"') { return true; } else if (ch == '\\') { - outText.Append(text[curOffset++]); + if (curOffset <= initialOffset) + outText.Append(text[curOffset++]); } } return false; diff --git a/src/Tools/BuildAddinDocumentation/MainClass.cs b/src/Tools/BuildAddinDocumentation/MainClass.cs index b281c8c627..748e7d2d76 100644 --- a/src/Tools/BuildAddinDocumentation/MainClass.cs +++ b/src/Tools/BuildAddinDocumentation/MainClass.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Text.RegularExpressions; using System.Xml; namespace BuildAddinDocumentation @@ -91,7 +92,7 @@ namespace BuildAddinDocumentation html.WriteLine("
"); html.WriteLine("

" + shortName + "

"); - html.WriteLine("

" + e["summary"].InnerXml + "

"); + html.WriteLine("

" + XmlToHtml(e["summary"].InnerXml) + "

"); html.WriteLine("
When this attribute is used, the include doozer builds all items inside the path addin tree location specified by this attribute and returns an - which includes all items in the output list. + IBuildItemsModifier which includes all items in the output list.

"); html.WriteLine(" "); if (isDoozer) @@ -113,7 +114,7 @@ namespace BuildAddinDocumentation } html.WriteLine(" "); html.WriteLine(" "); + html.WriteLine(" "); html.WriteLine(" "); break; default: @@ -123,7 +124,7 @@ namespace BuildAddinDocumentation } html.WriteLine(" "); html.WriteLine(" "); + html.WriteLine(" "); html.WriteLine(" "); break; } @@ -131,7 +132,7 @@ namespace BuildAddinDocumentation html.WriteLine("
" + sub.GetAttribute("name") + ":"); - html.WriteLine(" " + sub.InnerXml + "" + XmlToHtml(sub.InnerXml) + "
" + char.ToUpper(sub.Name[0]) + sub.Name.Substring(1) + ":"); - html.WriteLine(" " + sub.InnerXml + "" + XmlToHtml(sub.InnerXml) + "
"); foreach (XmlElement sub in e) { if (sub.Name == "example") { - html.WriteLine("

Example: " + sub.GetAttribute("title") + ""); + html.WriteLine("

Example: " + XmlToHtml(sub.GetAttribute("title")) + ""); html.WriteLine("

" + sub.InnerXml.TrimEnd() + "

"); } } @@ -139,6 +140,11 @@ namespace BuildAddinDocumentation } } + static string XmlToHtml(string xml) + { + return Regex.Replace(xml, @"\", "$1"); + } + static void WriteHeader(StreamWriter html, string title) { html.WriteLine("");