Browse Source

Work around strange .NET feature in command-line parsing.

Update SharpDevelopAddIn.xpt for SD 4 (add WPF references).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5525 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
83261c2a52
  1. 6
      data/templates/project/CSharp/SharpDevelopAddin.xpt
  2. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/LinkElementGenerator.cs
  3. 7
      src/Main/StartUp/Project/Dialogs/SplashScreen.cs

6
data/templates/project/CSharp/SharpDevelopAddin.xpt

@ -8,7 +8,7 @@
<Subcategory>SharpDevelop</Subcategory> <Subcategory>SharpDevelop</Subcategory>
<Icon>C#.Project.ControlLibrary</Icon> <Icon>C#.Project.ControlLibrary</Icon>
<Description>${res:Templates.Project.SharpDevelopAddin.Description}</Description> <Description>${res:Templates.Project.SharpDevelopAddin.Description}</Description>
<SupportedTargetFrameworks>v2.0</SupportedTargetFrameworks> <SupportedTargetFrameworks>v4.0</SupportedTargetFrameworks>
</TemplateConfiguration> </TemplateConfiguration>
<!-- Actions --> <!-- Actions -->
@ -28,6 +28,10 @@
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ProjectItems> </ProjectItems>
<PropertyGroup> <PropertyGroup>

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Rendering/LinkElementGenerator.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.AvalonEdit.Rendering
{ {
// a link starts with a protocol (or just with www), followed by 0 or more 'link characters', followed by a link end character // a link starts with a protocol (or just with www), followed by 0 or more 'link characters', followed by a link end character
// (this allows accepting punctuation inside links but not at the end) // (this allows accepting punctuation inside links but not at the end)
internal readonly static Regex defaultLinkRegex = new Regex(@"\b(https?://|ftp://|www\.)[\w\d\._/\-~%@()+:?&=#]*[\w\d/]"); internal readonly static Regex defaultLinkRegex = new Regex(@"\b(https?://|ftp://|www\.)[\w\d\._/\-~%@()+:?&=#!]*[\w\d/]");
// try to detect email addresses // try to detect email addresses
internal readonly static Regex defaultMailRegex = new Regex(@"\b[\w\d\.\-]+\@[\w\d\.\-]+\.[a-z]{2,6}\b"); internal readonly static Regex defaultMailRegex = new Regex(@"\b[\w\d\.\-]+\@[\w\d\.\-]+\.[a-z]{2,6}\b");

7
src/Main/StartUp/Project/Dialogs/SplashScreen.cs

@ -92,7 +92,12 @@ namespace ICSharpCode.SharpDevelop
markerLength = 2; markerLength = 2;
} }
parameterList.Add(arg.Substring(markerLength)); string param = arg.Substring(markerLength);
// work around .NET "feature" that causes trouble with /addindir:"c:\temp\"
// http://www.mobzystems.com/code/bugingetcommandlineargs.aspx
if (param.EndsWith("\"", StringComparison.Ordinal))
param = param.Substring(0, param.Length - 1) + "\\";
parameterList.Add(param);
} else { } else {
requestedFileList.Add(arg); requestedFileList.Add(arg);
} }

Loading…
Cancel
Save