Browse Source

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
shortcuts
Daniel Grunwald 20 years ago
parent
commit
bd0a39dd05
  1. 52
      doc/ChangeLog.xml
  2. 6
      doc/technotes/ConditionList.html
  3. 4
      doc/technotes/DoozerList.html
  4. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs
  5. 14
      src/Tools/BuildAddinDocumentation/MainClass.cs

52
doc/ChangeLog.xml

@ -1,4 +1,56 @@
<ChangeLog project="SharpDevelop"> <ChangeLog project="SharpDevelop">
<Change author="Daniel Grunwald" date="10/17/2005">Add documentation for conditions, rename CombineOpen to SolutionOpen.</Change>
<Change author="Daniel Grunwald" date="10/17/2005">Add list with documentation about the doozers.</Change>
<Change author="Daniel Grunwald" date="10/17/2005">Fixed SD2-477: Solution import error.</Change>
<Change author="Daniel Grunwald" date="10/17/2005">Fixed SD2-492: VS.NET solution converter ignores HintPath attribute for references.
Fixed SD2-491: Solution converter doesn't convert references correctly.</Change>
<Change author="Daniel Grunwald" date="10/17/2005">Fixed SD2-488: Highlighting editor does not work for addin-defined syntax modes.</Change>
<Change author="Daniel Grunwald" date="10/17/2005">Add attribute completion to BooBinding.
BOO-436, Smarter Boo integration (Macros, Attributes, Modules, and Imported Classes)</Change>
<Change author="Daniel Grunwald" date="10/16/2005">Fixed BOO-347 (BooBinding does not detect methods generated by AST Attributes)
Fixed bug when switching layout configurations.</Change>
<Change author="Daniel Grunwald" date="10/16/2005">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.</Change>
<Change author="Daniel Grunwald" date="10/16/2005">Add boo file templates and icons.</Change>
<Change author="Daniel Grunwald" date="10/16/2005">Added form designer to BooBinding (BOO-513).
Fixed BOO-511 (#develop should not display boo's "generated" module classes).</Change>
<Change author="Matt Ward" date="10/16/2005">SD2-490. Fixed problem where the pad contents were not displayed when the default layout was used.</Change>
<Change author="Daniel Grunwald" date="10/16/2005">Fixed SD2-483: TreeNode declarations are missing</Change>
<Change author="Daniel Grunwald" date="10/16/2005">Add missing file headers.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">BooBinding: Implemented inferring the return type from the "return" statement.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">Use Boo.Microsoft.Build.Tasks.dll from repository instead of recompiling it every time in the PostBuildEvent.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">Added compilation support to BooBinding.</Change>
<Change author="Matt Ward" date="10/15/2005">Added a missing NAnt addin resource string.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">Added missing resource strings, removed resource strings from AssemblyAnalyzer.</Change>
<Change author="Matt Ward" date="10/15/2005">Added NAnt addin from SharpDevelop 1.1/Fidalgo.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">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.</Change>
<Change author="Daniel Grunwald" date="10/15/2005">Delete old ProjectImporterExporter addin.</Change>
<Change author="Matt Ward" date="10/15/2005">The xml folding parser was not setting the filename in the compilation unit causing the Class Browser to throw an unhandled null reference exception.</Change>
<Change author="Christoph Wille" date="10/14/2005">Minor changes to info document</Change>
<Change author="Matt Ward" date="10/12/2005">Added support for Mono 1.1.9.2</Change>
<Change author="Matt Ward" date="10/12/2005">Added extra MSBuild file extensions to be supported by the XmlFoldingParser.</Change>
<Change author="Matt Ward" date="10/12/2005">Added more MSBuild file extensions so they are syntax highlighted.</Change>
<Change author="Markus Palme" date="10/12/2005">SD2-417 Icon for defintionview pad</Change>
<Change author="Daniel Grunwald" date="10/12/2005">Fixed return type of generic parameters like "ref T[]" and generic references in base types (e.g. IList&lt;T&gt; derives from ICollection&lt;T&gt;).</Change>
<Change author="Daniel Grunwald" date="10/12/2005">Fixed SD2-479.</Change>
<Change author="Matt Ward" date="10/12/2005">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.</Change>
<Change author="Daniel Grunwald" date="10/12/2005">Included fix for OverrideMethodsCodeGenerator by Yannick Kiekens (purplebox).</Change>
<Change author="Markus Palme" date="10/12/2005">SD2-453: ported CustomLineManager from Fidalgo</Change>
<Change author="Markus Palme" date="10/11/2005">fixed SD2-445 C# parser fails on default value expression in variable initializer</Change>
<Change author="Daniel Grunwald" date="10/11/2005">Fixed interface code generator for user defined interfaces.</Change>
<Change author="Markus Palme" date="10/11/2005">ported patch from fidalgo rev 2097</Change>
<Change author="Daniel Grunwald" date="10/11/2005">Don't ignore errors in ReflectionLoader, show real exception instead of failing later with a ArgumentNullException.</Change>
<Change author="Markus Palme" date="10/10/2005">Patch from Shinsaku Nakagawa. Fixes two IME problems:
1. The font of IME is not changed when option changed.
(Option-&gt;TextEditor-&gt;General-&gt;Font)
2. The location of IME is not occasionally correct.</Change>
<Change author="Matt Ward" date="10/10/2005">Added extra filename extensions to be supported by the XmlFoldingParser. Folds were only being updated for files with an .xml extension.</Change>
<Change author="Daniel Grunwald" date="10/09/2005">Add "Convert buffer to Boo" command to BooBinding.</Change>
<Change author="Daniel Grunwald" date="10/09/2005">Deleted some of the unused translation strings.</Change>
<Change author="Daniel Grunwald" date="10/09/2005">Fixed SD2-458: Tab is always replaced with 4 spaces</Change> <Change author="Daniel Grunwald" date="10/09/2005">Fixed SD2-458: Tab is always replaced with 4 spaces</Change>
<Change author="Matt Ward" date="10/08/2005">Added support for commenting/uncommenting a selection of xml.</Change> <Change author="Matt Ward" date="10/08/2005">Added support for commenting/uncommenting a selection of xml.</Change>
<Change author="Daniel Grunwald" date="10/08/2005">Fixed SD2-474: Allow targeting other .NET Framework versions.</Change> <Change author="Daniel Grunwald" date="10/08/2005">Fixed SD2-474: Allow targeting other .NET Framework versions.</Change>

6
doc/technotes/ConditionList.html

@ -83,7 +83,7 @@ It is based on SharpDevelop 2.0.0.590.</p>
<div> <div>
<h2><a name="BrowserLocation">BrowserLocation</a></h2> <h2><a name="BrowserLocation">BrowserLocation</a></h2>
<p> <p>
Conditions that tries to match the URL of a <see cref="T:ICSharpCode.SharpDevelop.BrowserDisplayBinding.HtmlViewPane" /> with a regex. Conditions that tries to match the URL of a HtmlViewPane with a regex.
</p> </p>
<table> <table>
<tr> <tr>
@ -100,7 +100,7 @@ It is based on SharpDevelop 2.0.0.590.</p>
<tr> <tr>
<th>options:</td> <th>options:</td>
<td> <td>
Optional; options that are passed as <see cref="T:System.Text.RegularExpressions.RegexOptions" />. Optional; options that are passed as RegexOptions.
</td> </td>
</tr> </tr>
</table> </table>
@ -220,7 +220,7 @@ It is based on SharpDevelop 2.0.0.590.</p>
<h2><a name="OwnerState">OwnerState</a></h2> <h2><a name="OwnerState">OwnerState</a></h2>
<p> <p>
Condition evaluator that compares the state of the caller/owner with a specified value. Condition evaluator that compares the state of the caller/owner with a specified value.
The caller/owner has to implement <see cref="T:ICSharpCode.Core.IOwnerState" />. The caller/owner has to implement IOwnerState.
</p> </p>
<table> <table>
<tr> <tr>

4
doc/technotes/DoozerList.html

@ -5,7 +5,7 @@
</head><body> </head><body>
<h1>Doozer List</h1> <h1>Doozer List</h1>
<p class="notice">This file was generated by the tool 'BuildAddinDocumentation'. <p class="notice">This file was generated by the tool 'BuildAddinDocumentation'.
It is based on SharpDevelop 2.0.0.589.</p> It is based on SharpDevelop 2.0.0.590.</p>
<ul> <ul>
<li><a href="#Class">Class</a> <li><a href="#Class">Class</a>
<li><a href="#CodeCompletionBinding">CodeCompletionBinding</a> <li><a href="#CodeCompletionBinding">CodeCompletionBinding</a>
@ -423,7 +423,7 @@ It is based on SharpDevelop 2.0.0.589.</p>
<td> <td>
When this attribute is used, the include doozer builds all items inside the When this attribute is used, the include doozer builds all items inside the
path addin tree location specified by this attribute and returns an path addin tree location specified by this attribute and returns an
<see cref="T:ICSharpCode.Core.IBuildItemsModifier" /> which includes all items in the output list. IBuildItemsModifier which includes all items in the output list.
</td> </td>
</tr> </tr>
<tr><td colspan=2><hr></td></tr> <tr><td colspan=2><hr></td></tr>

3
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs

@ -490,7 +490,8 @@ namespace CSharpBinding.Parser
if (ch == '"') { if (ch == '"') {
return true; return true;
} else if (ch == '\\') { } else if (ch == '\\') {
outText.Append(text[curOffset++]); if (curOffset <= initialOffset)
outText.Append(text[curOffset++]);
} }
} }
return false; return false;

14
src/Tools/BuildAddinDocumentation/MainClass.cs

@ -8,6 +8,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Text.RegularExpressions;
using System.Xml; using System.Xml;
namespace BuildAddinDocumentation namespace BuildAddinDocumentation
@ -91,7 +92,7 @@ namespace BuildAddinDocumentation
html.WriteLine("<div>"); html.WriteLine("<div>");
html.WriteLine(" <h2><a name=\"" + shortName + "\">" + shortName + "</a></h2>"); html.WriteLine(" <h2><a name=\"" + shortName + "\">" + shortName + "</a></h2>");
html.WriteLine(" <p>" + e["summary"].InnerXml + "</p>"); html.WriteLine(" <p>" + XmlToHtml(e["summary"].InnerXml) + "</p>");
html.WriteLine(" <table>"); html.WriteLine(" <table>");
html.WriteLine(" <tr>"); html.WriteLine(" <tr>");
if (isDoozer) if (isDoozer)
@ -113,7 +114,7 @@ namespace BuildAddinDocumentation
} }
html.WriteLine(" <tr>"); html.WriteLine(" <tr>");
html.WriteLine(" <th>" + sub.GetAttribute("name") + ":</td>"); html.WriteLine(" <th>" + sub.GetAttribute("name") + ":</td>");
html.WriteLine(" <td>" + sub.InnerXml + "</td>"); html.WriteLine(" <td>" + XmlToHtml(sub.InnerXml) + "</td>");
html.WriteLine(" </tr>"); html.WriteLine(" </tr>");
break; break;
default: default:
@ -123,7 +124,7 @@ namespace BuildAddinDocumentation
} }
html.WriteLine(" <tr>"); html.WriteLine(" <tr>");
html.WriteLine(" <th>" + char.ToUpper(sub.Name[0]) + sub.Name.Substring(1) + ":</td>"); html.WriteLine(" <th>" + char.ToUpper(sub.Name[0]) + sub.Name.Substring(1) + ":</td>");
html.WriteLine(" <td>" + sub.InnerXml + "</td>"); html.WriteLine(" <td>" + XmlToHtml(sub.InnerXml) + "</td>");
html.WriteLine(" </tr>"); html.WriteLine(" </tr>");
break; break;
} }
@ -131,7 +132,7 @@ namespace BuildAddinDocumentation
html.WriteLine(" </table>"); html.WriteLine(" </table>");
foreach (XmlElement sub in e) { foreach (XmlElement sub in e) {
if (sub.Name == "example") { if (sub.Name == "example") {
html.WriteLine(" <p><span class=\"exampleTitle\">Example: " + sub.GetAttribute("title") + "</span>"); html.WriteLine(" <p><span class=\"exampleTitle\">Example: " + XmlToHtml(sub.GetAttribute("title")) + "</span>");
html.WriteLine(" <br><pre>" + sub.InnerXml.TrimEnd() + "</pre></p>"); html.WriteLine(" <br><pre>" + sub.InnerXml.TrimEnd() + "</pre></p>");
} }
} }
@ -139,6 +140,11 @@ namespace BuildAddinDocumentation
} }
} }
static string XmlToHtml(string xml)
{
return Regex.Replace(xml, @"\<see cref=""\w\:(?:\w+\.)*(\w+)""\s*\/\s*\>", "$1");
}
static void WriteHeader(StreamWriter html, string title) static void WriteHeader(StreamWriter html, string title)
{ {
html.WriteLine("<html><head>"); html.WriteLine("<html><head>");

Loading…
Cancel
Save