Browse Source

Improved prjx imported.

Added importer for VS.NET [2003] projects.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@264 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
2cdb101e4a
  1. 4
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 17
      data/ConversionStyleSheets/CSharp_prjx2csproj.xsl
  3. 104
      data/ConversionStyleSheets/vsnet2msbuild.xsl
  4. 19
      data/ConversionStyleSheets/vsnet2msbuild_user.xsl
  5. 5
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs
  6. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
  7. 38
      src/AddIns/Misc/SubversionAddIn/Project/Resources/SubversionOptionsPanel.xfrm
  8. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/AddInOptions.cs
  9. 97
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs
  10. 6
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/Checkout/CheckoutCommand.cs
  11. 7
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/Export/ExportDialog.cs
  12. 27
      src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/ProjectBrowserCommands.cs
  13. 30
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs
  14. 2
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/SubversionOptionsPanel.cs
  15. 4
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/VBNET-Mode.xshd
  16. 6
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  17. 21
      src/Main/Base/Project/Src/Commands/FileMenuCommands.cs
  18. 6
      src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs
  19. 16
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  20. 35
      src/Main/Base/Project/Src/Project/Converter/CombineToSolution.cs
  21. 160
      src/Main/Base/Project/Src/Project/Converter/PrjxToSolutionProject.cs
  22. 11
      src/Main/Base/Project/Src/Project/MSBuildProject.cs
  23. 57
      src/Main/Base/Project/Src/Project/Solution/Solution.cs
  24. 31
      src/Main/Base/Project/Src/Services/File/FileEventArgs.cs
  25. 30
      src/Main/Base/Project/Src/Services/File/FileRenameEventArgs.cs
  26. 28
      src/Main/Base/Project/Src/Services/File/FileService.cs
  27. 4
      src/Main/Base/Project/Src/Services/ParserService/ReflectionProjectContent.cs
  28. 6
      src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs
  29. 4
      src/Main/Base/Project/Src/Services/Tasks/TaskService.cs
  30. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AbstractCompletionDataProvider.cs

4
AddIns/ICSharpCode.SharpDevelop.addin

@ -111,7 +111,7 @@
<Path name = "/SharpDevelop/Workbench/Combine/FileFilter"> <Path name = "/SharpDevelop/Workbench/Combine/FileFilter">
<FileFilter id = "Solution" <FileFilter id = "Solution"
name = "Solutions" name = "Solutions (*.sln)"
extensions = "*.sln"/> extensions = "*.sln"/>
<FileFilter id = "Combine" <FileFilter id = "Combine"
@ -120,7 +120,7 @@
<FileFilter id = "Project" <FileFilter id = "Project"
name = "${res:SharpDevelop.FileFilter.ProjectFiles}" name = "${res:SharpDevelop.FileFilter.ProjectFiles}"
extensions = "*.prjx"/> extensions = "*.prjx;*.vbproj;*.csproj"/>
<FileFilter id = "AllFiles" <FileFilter id = "AllFiles"
name = "${res:SharpDevelop.FileFilter.AllFiles}" name = "${res:SharpDevelop.FileFilter.AllFiles}"

17
data/ConversionStyleSheets/CSharp_prjx2csproj.xsl

@ -14,15 +14,15 @@
<xsl:value-of select = "/Project/Configurations/@active" /> <xsl:value-of select = "/Project/Configurations/@active" />
</xsl:element> </xsl:element>
<xsl:element name = "Platform" ><xsl:attribute name = "Condition"> '$(Platform)' == '' </xsl:attribute>AnyCPU</xsl:element> <xsl:element name = "Platform" ><xsl:attribute name = "Condition"> '$(Platform)' == '' </xsl:attribute>AnyCPU</xsl:element>
<xsl:element name = "ProductVersion">8.0.40607</xsl:element> <!--<xsl:element name = "ProductVersion">8.0.40607</xsl:element>-->
<xsl:element name = "SchemaVersion">2.0</xsl:element> <xsl:element name = "SchemaVersion">2.0</xsl:element>
<xsl:element name = "ProjectGuid"><xsl:value-of select = "Conversion:GetGuid(/Project/@name)" /></xsl:element> <xsl:element name = "ProjectGuid"><xsl:value-of select = "Conversion:GetGuid(/Project/@name)" /></xsl:element>
<xsl:element name = "RootNamespace"><xsl:value-of select = "/Project/@standardNamespace" /></xsl:element> <xsl:element name = "RootNamespace"><xsl:value-of select = "Conversion:SetRootNamespace(/Project/@standardNamespace)" /></xsl:element>
<!-- Copy global object from 'Debug' node --> <!-- Copy global object from 'Debug' node -->
<xsl:for-each select="/Project/Configurations/Configuration[@name='Debug']"> <xsl:for-each select="/Project/Configurations/Configuration[@name='Debug']">
<xsl:element name = "AssemblyName"><xsl:value-of select = "Output/@assembly" /></xsl:element> <xsl:element name = "AssemblyName"><xsl:value-of select = "Output/@assembly" /></xsl:element>
<xsl:element name = "OutputTarget"><xsl:value-of select = "CodeGeneration/@target" /></xsl:element> <xsl:element name = "OutputType"><xsl:value-of select = "CodeGeneration/@target" /></xsl:element>
<xsl:element name = "ApplicationIcon"><xsl:value-of select = "CodeGeneration/@win32Icon" /></xsl:element> <xsl:element name = "ApplicationIcon"><xsl:value-of select = "CodeGeneration/@win32Icon" /></xsl:element>
@ -48,7 +48,7 @@
<xsl:element name = "CheckForOverflowUnderflow"><xsl:value-of select = "CodeGeneration/@generateoverflowchecks" /></xsl:element> <xsl:element name = "CheckForOverflowUnderflow"><xsl:value-of select = "CodeGeneration/@generateoverflowchecks" /></xsl:element>
<xsl:element name = "DefineConstants"><xsl:value-of select = "CodeGeneration/@definesymbols" /></xsl:element> <xsl:element name = "DefineConstants"><xsl:value-of select = "CodeGeneration/@definesymbols" /></xsl:element>
<xsl:element name = "OutputPath"><xsl:value-of select = "Conversion:CanocializePath(Output/@directory)" /></xsl:element> <xsl:element name = "OutputPath"><xsl:value-of select = "Conversion:CanocializePath(Output/@directory)" /></xsl:element>
<xsl:element name = "TreatWarningsAsErrors"><xsl:value-of select = "@runwithwarnings" /></xsl:element> <xsl:element name = "TreatWarningsAsErrors"><xsl:value-of select = "Conversion:Negate(@runwithwarnings)" /></xsl:element>
</xsl:element> </xsl:element>
</xsl:for-each> </xsl:for-each>
@ -67,8 +67,8 @@
<xsl:for-each select="/Project/References/Reference[@type='Assembly']"> <xsl:for-each select="/Project/References/Reference[@type='Assembly']">
<xsl:element name = "Reference" > <xsl:element name = "Reference" >
<xsl:attribute name = "Include"><xsl:value-of select = "Conversion:GetFileName(@refto)" /></xsl:attribute> <xsl:attribute name = "Include"><xsl:value-of select = "Conversion:GetFileNameWithoutExtension(@refto)" /></xsl:attribute>
<xsl:element name = "HintPath" ><xsl:value-of select = "@refto" /></xsl:element> <xsl:element name = "HintPath" ><xsl:value-of select = "Conversion:CanocializeFileName(@refto)" /></xsl:element>
<xsl:element name = "Private" ><xsl:value-of select = "@localcopy" /></xsl:element> <xsl:element name = "Private" ><xsl:value-of select = "@localcopy" /></xsl:element>
</xsl:element> </xsl:element>
</xsl:for-each> </xsl:for-each>
@ -82,7 +82,7 @@
</xsl:for-each> </xsl:for-each>
<xsl:for-each select="/Project/Contents/File[@buildaction='EmbedAsResource']"> <xsl:for-each select="/Project/Contents/File[@buildaction='EmbedAsResource']">
<xsl:element name = "EmbeddedResource" > <xsl:element name = "EmbeddedResource" >
<xsl:attribute name = "Include"><xsl:value-of select = "Conversion:CanocializeFileName(@name)" /></xsl:attribute> <xsl:attribute name = "Include"><xsl:value-of select = "Conversion:ConvertResource(@name)" /></xsl:attribute>
</xsl:element> </xsl:element>
</xsl:for-each> </xsl:for-each>
@ -107,14 +107,13 @@
<xsl:attribute name = "Include"><xsl:value-of select = "Conversion:GetRelativeProjectPath(@refto)" /></xsl:attribute> <xsl:attribute name = "Include"><xsl:value-of select = "Conversion:GetRelativeProjectPath(@refto)" /></xsl:attribute>
<xsl:element name = "Project"><xsl:value-of select = "Conversion:GetGuid(@refto)" /></xsl:element> <xsl:element name = "Project"><xsl:value-of select = "Conversion:GetGuid(@refto)" /></xsl:element>
<xsl:element name = "Package">{00000000-0000-0000-0000-000000000000}</xsl:element>
<xsl:element name = "Name"><xsl:value-of select = "@refto" /></xsl:element> <xsl:element name = "Name"><xsl:value-of select = "@refto" /></xsl:element>
</xsl:element> </xsl:element>
</xsl:for-each> </xsl:for-each>
</xsl:element> </xsl:element>
<xsl:element name = "Import" > <xsl:element name = "Import" >
<xsl:attribute name = "Project">$(MSBuildBinPath)\Microsoft.CSHARP.Targets</xsl:attribute> <xsl:attribute name = "Project">$(MSBuildBinPath)\Microsoft.<xsl:value-of select = "Conversion:GetLanguageName()" />.Targets</xsl:attribute>
</xsl:element> </xsl:element>

104
data/ConversionStyleSheets/vsnet2msbuild.xsl

@ -0,0 +1,104 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:Conversion="urn:Conversion">
<xsl:output method = "xml" indent = "yes" />
<xsl:template match = "/VisualStudioProject/*" >
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- <xsl:element name = "Project" namespace="http://schemas.microsoft.com/developer/msbuild/2003" >-->
<!-- <xsl:attribute name = "DefaultTargets">Build</xsl:attribute> -->
<!-- Global project options -->
<xsl:element name = "PropertyGroup" >
<xsl:element name = "Configuration" >
<xsl:attribute name = "Condition"> '$(Configuration)' == '' </xsl:attribute>
<xsl:value-of select = "Build/Settings/Config[1]/@Name" />
</xsl:element>
<xsl:element name = "Platform" ><xsl:attribute name = "Condition"> '$(Platform)' == '' </xsl:attribute>AnyCPU</xsl:element>
<!--<xsl:element name = "ProductVersion">8.0.40607</xsl:element>-->
<xsl:element name = "SchemaVersion">2.0</xsl:element>
<xsl:element name = "ProjectGuid"><xsl:value-of select = "@ProjectGuid" /></xsl:element>
<xsl:element name = "RootNamespace"><xsl:value-of select = "Build/Settings/@RootNamespace" /></xsl:element>
<xsl:element name = "AssemblyName"><xsl:value-of select = "Build/Settings/@AssemblyName" /></xsl:element>
<xsl:element name = "OutputType"><xsl:value-of select = "Build/Settings/@OutputType" /></xsl:element>
<xsl:element name = "ApplicationIcon"><xsl:value-of select = "Build/Settings/@ApplicationIcon" /></xsl:element>
<xsl:element name = "RunPostBuildEvent">OnSuccessfulBuild</xsl:element>
<xsl:element name = "PreBuildEvent"><xsl:value-of select = "Build/Settings/@PreBuildEvent" /></xsl:element>
<xsl:element name = "PostBuildEvent"><xsl:value-of select = "Build/Settings/@PostBuildEvent" /></xsl:element>
<xsl:element name = "StartupObject"><xsl:value-of select = "Build/Settings/@StartupObject" /></xsl:element>
<xsl:element name = "NoConfig">false</xsl:element>
</xsl:element>
<!-- Configurations -->
<xsl:for-each select="Build/Settings/Config">
<xsl:element name = "PropertyGroup" >
<xsl:attribute name = "Condition"> '$(Configuration)|$(Platform)' == '<xsl:value-of select = "@Name" />|AnyCPU' </xsl:attribute>
<xsl:element name = "NoStdLib"><xsl:value-of select = "@NoStdLib" /></xsl:element>
<xsl:element name = "WarningLevel"><xsl:value-of select = "@WarningLevel" /></xsl:element>
<xsl:element name = "NoWarn"><xsl:value-of select = "@NoWarn" /></xsl:element>
<xsl:element name = "DebugSymbols"><xsl:value-of select = "@DebugSymbols" /></xsl:element>
<xsl:element name = "Optimize"><xsl:value-of select = "@Optimize" /></xsl:element>
<xsl:element name = "AllowUnsafeBlocks"><xsl:value-of select = "@AllowUnsafeBlocks" /></xsl:element>
<xsl:element name = "CheckForOverflowUnderflow"><xsl:value-of select = "@CheckForOverflowUnderflow" /></xsl:element>
<xsl:element name = "DefineConstants"><xsl:value-of select = "@DefineConstants" /></xsl:element>
<xsl:element name = "OutputPath"><xsl:value-of select = "@OutputPath" /></xsl:element>
<xsl:element name = "TreatWarningsAsErrors"><xsl:value-of select = "@TreatWarningsAsErrors" /></xsl:element>
</xsl:element>
</xsl:for-each>
<xsl:element name = "ItemGroup">
<xsl:for-each select="Build/References/Reference[@HintPath]">
<xsl:element name = "Reference" >
<xsl:attribute name = "Include"><xsl:value-of select = "@Name" /></xsl:attribute>
<xsl:if test="Conversion:IsNotGacReference(@HintPath)">
<xsl:element name = "HintPath" ><xsl:value-of select = "@HintPath" /></xsl:element>
<xsl:element name = "Private" ><xsl:value-of select = "@Private" /></xsl:element>
</xsl:if>
</xsl:element>
</xsl:for-each>
</xsl:element>
<xsl:element name = "ItemGroup">
<xsl:for-each select="Files/Include/File[@BuildAction='Compile']">
<xsl:element name = "Compile" >
<xsl:attribute name = "Include"><xsl:value-of select = "@RelPath" /></xsl:attribute>
</xsl:element>
</xsl:for-each>
<xsl:for-each select="Files/Include/File[@BuildAction='EmbeddedResource']">
<xsl:element name = "EmbeddedResource" >
<xsl:attribute name = "Include"><xsl:value-of select = "@RelPath" /></xsl:attribute>
</xsl:element>
</xsl:for-each>
<xsl:for-each select="/Project/Contents/File[@BuildAction!='Compile' and @BuildAction!='EmbeddedResource']">
<xsl:element name = "None" >
<xsl:attribute name = "Include"><xsl:value-of select = "@RelPath" /></xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>
<xsl:element name = "ItemGroup">
<!-- Directories -->
</xsl:element>
<xsl:element name = "ItemGroup">
<xsl:for-each select="Build/References/Reference[@Project]">
<xsl:element name = "ProjectReference" >
<xsl:attribute name = "Include"><xsl:value-of select = "Conversion:GetRelativeProjectPath(@Name)" /></xsl:attribute>
<xsl:element name = "Project"><xsl:value-of select = "@Project" /></xsl:element>
<xsl:element name = "Name"><xsl:value-of select = "@Name" /></xsl:element>
<xsl:element name = "Private" ><xsl:value-of select = "@Private" /></xsl:element>
</xsl:element>
</xsl:for-each>
</xsl:element>
<xsl:element name = "Import" >
<xsl:attribute name = "Project">$(MSBuildBinPath)\Microsoft.<xsl:value-of select = "Conversion:GetLanguageName()" />.Targets</xsl:attribute>
</xsl:element>
</Project>
<!-- </xsl:element>-->
</xsl:template>
</xsl:stylesheet>

19
data/ConversionStyleSheets/vsnet2msbuild_user.xsl

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:Conversion="urn:Conversion">
<xsl:output method = "xml" indent = "yes" />
<xsl:template match = "/VisualStudioProject/*" >
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Configurations -->
<xsl:for-each select="Build/Settings/Config">
<xsl:element name = "PropertyGroup" >
<xsl:attribute name = "Condition"> '$(Configuration)|$(Platform)' == '<xsl:value-of select = "@Name" />|AnyCPU' </xsl:attribute>
<xsl:element name = "StartProgram"><xsl:value-of select = "@StartProgram" /></xsl:element>
<xsl:element name = "StartArguments"><xsl:value-of select = "@StartArguments" /></xsl:element>
</xsl:element>
</xsl:for-each>
</Project>
</xsl:template>
</xsl:stylesheet>

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

@ -143,6 +143,7 @@ namespace CSharpBinding.Parser
public string FindExpressionInternal(string inText, int offset) public string FindExpressionInternal(string inText, int offset)
{ {
// warning: Do not confuse this.offset and offset
this.text = inText; this.text = inText;
this.offset = this.lastAccept = offset; this.offset = this.lastAccept = offset;
this.state = START; this.state = START;
@ -159,7 +160,7 @@ namespace CSharpBinding.Parser
lastAccept = this.offset; lastAccept = this.offset;
} }
if (state == ACCEPTNOMORE) { if (state == ACCEPTNOMORE) {
lastExpressionStartPosition = offset + 1; lastExpressionStartPosition = this.offset + 1;
return this.text.Substring(this.offset + 1, offset - this.offset); return this.text.Substring(this.offset + 1, offset - this.offset);
} }
} }
@ -167,7 +168,7 @@ namespace CSharpBinding.Parser
if (lastAccept < 0) if (lastAccept < 0)
return null; return null;
lastExpressionStartPosition = lastAccept + 1; lastExpressionStartPosition = this.lastAccept + 1;
return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept); return this.text.Substring(this.lastAccept + 1, offset - this.lastAccept);
} }

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs

@ -242,7 +242,7 @@ namespace CSharpBinding
{ {
Language = "C#"; Language = "C#";
Create(info); Create(info);
imports.Add(@"$(MSBuildBinPath)\Microsoft.CSHARP.Targets"); imports.Add(@"$(MSBuildBinPath)\Microsoft.CSharp.Targets");
} }
} }
} }

38
src/AddIns/Misc/SubversionAddIn/Project/Resources/SubversionOptionsPanel.xfrm

@ -1,45 +1,53 @@
<Components version="1.0"> <Components version="1.0">
<System.Windows.Forms.UserControl> <System.Windows.Forms.UserControl>
<Name value="XmlUserControl1" /> <Name value="XmlUserControl1" />
<DockPadding value="" />
<ClientSize value="{Width=296, Height=240}" /> <ClientSize value="{Width=296, Height=240}" />
<Controls> <Controls>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="autoReloadProjectCheckBox" /> <Name value="autoDeleteFilesCheckBox" />
<Location value="{X=8,Y=176}" /> <Location value="{X=8,Y=172}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="Automatically &amp;delete removed files" />
<TabIndex value="3" />
<Size value="{Width=280, Height=24}" /> <Size value="{Width=280, Height=24}" />
</System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox>
<Name value="autoReloadProjectCheckBox" />
<Location value="{X=8,Y=192}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="&amp;Re-load project after projectfile change" /> <Text value="&amp;Re-load project after projectfile change" />
<TabIndex value="4" />
<Size value="{Width=280, Height=24}" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<TabIndex value="5" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.CheckBox> <System.Windows.Forms.CheckBox>
<Name value="autoAddFilesCheckBox" /> <Name value="autoAddFilesCheckBox" />
<Location value="{X=8,Y=152}" /> <Location value="{X=8,Y=152}" />
<FlatAppearance value="System.Windows.Forms.FlatButtonAppearance" />
<Text value="Automatically &amp;add new files" />
<TabIndex value="2" />
<Size value="{Width=280, Height=24}" /> <Size value="{Width=280, Height=24}" />
<Text value="&amp;Automatically add new files" />
<Anchor value="Top, Left, Right" /> <Anchor value="Top, Left, Right" />
<TabIndex value="4" />
</System.Windows.Forms.CheckBox> </System.Windows.Forms.CheckBox>
<System.Windows.Forms.TextBox> <System.Windows.Forms.TextBox>
<Name value="logMessageTextBox" /> <Name value="logMessageTextBox" />
<Anchor value="Top, Left, Right" /> <TabIndex value="1" />
<TabIndex value="3" />
<Location value="{X=8,Y=32}" />
<AcceptsReturn value="True" />
<Size value="{Width=280, Height=112}" />
<Multiline value="True" /> <Multiline value="True" />
<AcceptsReturn value="True" />
<WordWrap value="False" /> <WordWrap value="False" />
<Anchor value="Top, Left, Right" />
<Size value="{Width=280, Height=112}" />
<AcceptsTab value="True" /> <AcceptsTab value="True" />
<Text value="" /> <Location value="{X=8,Y=32}" />
</System.Windows.Forms.TextBox> </System.Windows.Forms.TextBox>
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Name value="label1" /> <Name value="label1" />
<Location value="{X=8,Y=8}" />
<Text value="&amp;Standard commit message:" /> <Text value="&amp;Standard commit message:" />
<TextAlign value="BottomLeft" /> <TextAlign value="BottomLeft" />
<Anchor value="Top, Left, Right" />
<TabIndex value="2" />
<Size value="{Width=280, Height=23}" /> <Size value="{Width=280, Height=23}" />
<Location value="{X=8,Y=8}" /> <TabIndex value="0" />
<Anchor value="Top, Left, Right" />
</System.Windows.Forms.Label> </System.Windows.Forms.Label>
</Controls> </Controls>
</System.Windows.Forms.UserControl> </System.Windows.Forms.UserControl>

2
src/AddIns/Misc/SubversionAddIn/Project/Src/AddInOptions.cs

@ -53,7 +53,7 @@ namespace ICSharpCode.Svn
public static bool AutomaticallyDeleteFiles { public static bool AutomaticallyDeleteFiles {
get { get {
return Properties.Get("AutomaticallyDeleteFiles", false); return Properties.Get("AutomaticallyDeleteFiles", true);
} }
set { set {
Properties.Set("AutomaticallyDeleteFiles", value); Properties.Set("AutomaticallyDeleteFiles", value);

97
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/AutostartCommands.cs

@ -33,10 +33,8 @@ namespace ICSharpCode.Svn.Commands
{ {
public override void Run() public override void Run()
{ {
FileService.FileRemoving += FileRemoving;
FileService.FileRemoved += FileRemoved; FileService.FileRenaming += FileRenaming;
FileService.FileRenaming += FileRenamed;
//projectService.FileRemovedFromProject += FileRemoved; //projectService.FileRemovedFromProject += FileRemoved;
//projectService.FileAddedToProject += FileAdded); //projectService.FileAddedToProject += FileAdded);
@ -64,7 +62,6 @@ namespace ICSharpCode.Svn.Commands
void FileAdded(object sender, FileEventArgs e) void FileAdded(object sender, FileEventArgs e)
{ {
// Console.WriteLine("ADD : " + e.FileName);
try { try {
if (AddInOptions.AutomaticallyAddFiles) { if (AddInOptions.AutomaticallyAddFiles) {
SvnClient.Instance.Client.Add(Path.GetFullPath(e.FileName), false); SvnClient.Instance.Client.Add(Path.GetFullPath(e.FileName), false);
@ -74,32 +71,104 @@ namespace ICSharpCode.Svn.Commands
} }
} }
void FileRemoved(object sender, FileEventArgs e) void FileRemoving(object sender, FileCancelEventArgs e)
{ {
// Console.WriteLine("REMOVE : " + e.FileName); if (e.Cancel) return;
if (e.IsDirectory) return;
if (!AddInOptions.AutomaticallyDeleteFiles) return;
string fullName = Path.GetFullPath(e.FileName);
try { try {
if (AddInOptions.AutomaticallyDeleteFiles) { Status status = SvnClient.Instance.Client.SingleStatus(fullName);
SvnClient.Instance.Client.Delete( new string [] { switch (status.TextStatus) {
Path.GetFullPath(e.FileName) case StatusKind.Unversioned:
}, true); return; // nothing to do
case StatusKind.None:
case StatusKind.Normal:
// remove without problem
break;
case StatusKind.Modified:
case StatusKind.Replaced:
MessageService.ShowError("The file has local modifications. Do you really want to remove it?");
e.Cancel = true;
break;
case StatusKind.Added:
if (status.Copied) {
MessageService.ShowError("The file has just been moved to this location, do you really want to remove it?");
e.Cancel = true;
return;
} }
SvnClient.Instance.Client.Revert(new string[] { fullName }, e.IsDirectory);
return;
default:
MessageService.ShowError("The file/directory cannot be removed because it is in subversion status '" + status.TextStatus + "'.");
e.Cancel = true;
return;
}
SvnClient.Instance.Client.Delete(new string [] { fullName }, true);
e.OperationAlreadyDone = true;
} catch (Exception ex) { } catch (Exception ex) {
MessageService.ShowError("File removed exception: " + ex); MessageService.ShowError("File removed exception: " + ex);
} }
} }
void FileRenamed(object sender, FileRenameEventArgs e) void FileRenaming(object sender, FileRenamingEventArgs e)
{ {
// Console.WriteLine("RENAME : " + e.FileName); string fullSource = Path.GetFullPath(e.SourceFile);
try { try {
SvnClient.Instance.Client.Move(Path.GetFullPath(e.SourceFile), Status status = SvnClient.Instance.Client.SingleStatus(fullSource);
switch (status.TextStatus) {
case StatusKind.Unversioned:
return; // nothing to do
case StatusKind.Normal:
case StatusKind.None:
case StatusKind.Modified:
// rename without problem
break;
case StatusKind.Added:
case StatusKind.Replaced:
if (status.Copied) {
MessageService.ShowError("The file was moved/copied and cannot be renamed without losing it's history.");
e.Cancel = true;
} else if (e.IsDirectory) {
goto default;
} else {
SvnClient.Instance.Client.Revert(new string[] { fullSource }, false);
FileService.FileRenamed += new AutoAddAfterRenameHelper(e).Renamed;
}
return;
default:
MessageService.ShowError("The file/directory cannot be renamed because it is in subversion status '" + status.TextStatus + "'.");
e.Cancel = true;
return;
}
SvnClient.Instance.Client.Move(fullSource,
Revision.Unspecified, // TODO: Remove this line when upgrading to new NSvn version Revision.Unspecified, // TODO: Remove this line when upgrading to new NSvn version
Path.GetFullPath(e.TargetFile), Path.GetFullPath(e.TargetFile),
true true
); );
e.OperationAlreadyDone = true;
} catch (Exception ex) { } catch (Exception ex) {
MessageService.ShowError("File renamed exception: " + ex); MessageService.ShowError("File renamed exception: " + ex);
} }
} }
class AutoAddAfterRenameHelper
{
FileRenamingEventArgs args;
public AutoAddAfterRenameHelper(FileRenamingEventArgs args) {
this.args = args;
}
public void Renamed(object sender, FileRenameEventArgs e)
{
FileService.FileRenamed -= Renamed;
if (args.Cancel || args.OperationAlreadyDone)
return;
if (args.SourceFile != e.SourceFile || args.TargetFile != e.TargetFile)
return;
SvnClient.Instance.Client.Add(e.TargetFile, false);
}
}
} }
} }

6
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/Checkout/CheckoutCommand.cs

@ -16,9 +16,6 @@ using NSvn.Core;
namespace ICSharpCode.Svn.Commands namespace ICSharpCode.Svn.Commands
{ {
/// <summary>
/// Description of CheckoutCommand
/// </summary>
public class CheckoutCommand : AbstractMenuCommand public class CheckoutCommand : AbstractMenuCommand
{ {
string from = String.Empty; string from = String.Empty;
@ -31,8 +28,7 @@ namespace ICSharpCode.Svn.Commands
/// </summary> /// </summary>
public CheckoutCommand() public CheckoutCommand()
{ {
// You can enable/disable the menu command using the
// IsEnabled property of the AbstractMenuCommand class
} }
void DoCheckoutCommand() void DoCheckoutCommand()

7
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/Export/ExportDialog.cs

@ -42,10 +42,15 @@ namespace ICSharpCode.Svn.Commands
public string Source { public string Source {
get { get {
return SourceIsLocalDirectory ? ControlDictionary["sourceDirectoryTextBox"].Text : ControlDictionary["urlTextBox"].Text; return SourceIsLocalDirectory ? ConvertPathToURL(ControlDictionary["sourceDirectoryTextBox"].Text) : ControlDictionary["urlTextBox"].Text;
} }
} }
string ConvertPathToURL(string path)
{
return "file:///" + path.Replace('\\', '/');
}
public string Destination { public string Destination {
get { get {
return ControlDictionary["localDirectoryTextBox"].Text; return ControlDictionary["localDirectoryTextBox"].Text;

27
src/AddIns/Misc/SubversionAddIn/Project/Src/Commands/ProjectBrowserCommands.cs

@ -44,15 +44,20 @@ namespace ICSharpCode.Svn.Commands
} }
if (StartOperation()) { if (StartOperation()) {
SvnClient.Instance.WaitForOperationEnd(); SvnClient.Instance.WaitForOperationEnd();
OperationFinished();
if (AddInOptions.AutomaticallyReloadProject) { OverlayIconManager.EnqueueRecursive(node);
//projectService.ReloadCombine();
}
} }
} }
} }
protected abstract bool StartOperation(); protected abstract bool StartOperation();
protected virtual void OperationFinished()
{
//if (AddInOptions.AutomaticallyReloadProject) {
// projectService.ReloadCombine();
//}
}
} }
public class UpdateCommand : SubversionCommand public class UpdateCommand : SubversionCommand
@ -78,10 +83,12 @@ namespace ICSharpCode.Svn.Commands
protected override bool StartOperation() protected override bool StartOperation()
{ {
// TODO: Display warning message (Revert might cause loss of data) if (MessageService.AskQuestion("Revert removes all your local modifications to this file. Are you sure?", "Subversion revert")) {
SvnClient.Instance.OperationStart("Revert", new ThreadStart(DoRevertCommand)); SvnClient.Instance.OperationStart("Revert", new ThreadStart(DoRevertCommand));
return true; return true;
} }
return false;
}
} }
/// <summary> /// <summary>
@ -108,15 +115,15 @@ namespace ICSharpCode.Svn.Commands
outStream, outStream,
errStream); errStream);
output = Encoding.Default.GetString(outStream.ToArray()); output = Encoding.Default.GetString(outStream.ToArray());
// TODO: Invoke the following method: ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.SafeThreadAsyncCall(this, "DisplayPatch");
// FileService.NewFile("a.patch", "txt", output);
} catch (Exception e) { } catch (Exception e) {
MessageService.ShowError(e); MessageService.ShowError(e);
} finally {
if (output == null) {
output = "";
} }
} }
void DisplayPatch()
{
FileService.NewFile(Path.GetFileName(fileName) + ".patch", "patch", output);
} }
protected override bool StartOperation() protected override bool StartOperation()

30
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs

@ -9,6 +9,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Threading; using System.Threading;
using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
@ -74,6 +75,7 @@ namespace ICSharpCode.Svn
case StatusKind.Deleted: case StatusKind.Deleted:
return GetImage(StatusIcon.Deleted); return GetImage(StatusIcon.Deleted);
case StatusKind.Modified: case StatusKind.Modified:
case StatusKind.Replaced:
return GetImage(StatusIcon.Modified); return GetImage(StatusIcon.Modified);
case StatusKind.Normal: case StatusKind.Normal:
return GetImage(StatusIcon.OK); return GetImage(StatusIcon.OK);
@ -94,6 +96,32 @@ namespace ICSharpCode.Svn
} }
} }
public static void EnqueueRecursive(AbstractProjectBrowserTreeNode node)
{
lock (queue) {
bool wasEmpty = queue.Count == 0;
queue.Enqueue(node);
// use breadth-first search
Queue<AbstractProjectBrowserTreeNode> q = new Queue<AbstractProjectBrowserTreeNode>();
q.Enqueue(node);
while (q.Count > 0) {
node = q.Dequeue();
foreach (TreeNode n in node.Nodes) {
node = n as AbstractProjectBrowserTreeNode;
if (node != null) {
q.Enqueue(node);
queue.Enqueue(node);
}
}
}
if (wasEmpty) {
new ThreadStart(Run).BeginInvoke(null, null);
}
}
}
static Client client; static Client client;
static void Run() static void Run()
@ -131,7 +159,7 @@ namespace ICSharpCode.Svn
} }
} }
if (node.TreeView != null) { if (node.TreeView != null) {
node.TreeView.BeginInvoke(new ThreadStart(delegate() { node.TreeView.BeginInvoke(new ThreadStart(delegate {
node.Overlay = GetImage(status); node.Overlay = GetImage(status);
})); }));
} }

2
src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/SubversionOptionsPanel.cs

@ -32,6 +32,7 @@ namespace ICSharpCode.Svn.Gui
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.Svn.Resources.SubversionOptionsPanel.xfrm")); SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.Svn.Resources.SubversionOptionsPanel.xfrm"));
ControlDictionary["logMessageTextBox"].Text = AddInOptions.DefaultLogMessage; ControlDictionary["logMessageTextBox"].Text = AddInOptions.DefaultLogMessage;
((CheckBox)ControlDictionary["autoAddFilesCheckBox"]).Checked = AddInOptions.AutomaticallyAddFiles; ((CheckBox)ControlDictionary["autoAddFilesCheckBox"]).Checked = AddInOptions.AutomaticallyAddFiles;
((CheckBox)ControlDictionary["autoDeleteFilesCheckBox"]).Checked = AddInOptions.AutomaticallyDeleteFiles;
((CheckBox)ControlDictionary["autoReloadProjectCheckBox"]).Checked = AddInOptions.AutomaticallyReloadProject; ((CheckBox)ControlDictionary["autoReloadProjectCheckBox"]).Checked = AddInOptions.AutomaticallyReloadProject;
} }
@ -39,6 +40,7 @@ namespace ICSharpCode.Svn.Gui
{ {
AddInOptions.DefaultLogMessage = ControlDictionary["logMessageTextBox"].Text; AddInOptions.DefaultLogMessage = ControlDictionary["logMessageTextBox"].Text;
AddInOptions.AutomaticallyAddFiles = ((CheckBox)ControlDictionary["autoAddFilesCheckBox"]).Checked; AddInOptions.AutomaticallyAddFiles = ((CheckBox)ControlDictionary["autoAddFilesCheckBox"]).Checked;
AddInOptions.AutomaticallyDeleteFiles = ((CheckBox)ControlDictionary["autoDeleteFilesCheckBox"]).Checked;
AddInOptions.AutomaticallyReloadProject = ((CheckBox)ControlDictionary["autoReloadProjectCheckBox"]).Checked; AddInOptions.AutomaticallyReloadProject = ((CheckBox)ControlDictionary["autoReloadProjectCheckBox"]).Checked;
return true; return true;

4
src/Libraries/ICSharpCode.TextEditor/Project/Resources/VBNET-Mode.xshd

@ -133,6 +133,7 @@
<KeyWords name = "OtherModifiers" bold="false" italic="false" color="Blue"> <KeyWords name = "OtherModifiers" bold="false" italic="false" color="Blue">
<Key word = "Const" /> <Key word = "Const" />
<Key word = "Custom" />
<Key word = "Default" /> <Key word = "Default" />
<Key word = "Global" /> <Key word = "Global" />
<Key word = "MustInherit" /> <Key word = "MustInherit" />
@ -161,9 +162,6 @@
<Key word = "AddHandler" /> <Key word = "AddHandler" />
<Key word = "RemoveHandler" /> <Key word = "RemoveHandler" />
<Key word = "RaiseEvent" /> <Key word = "RaiseEvent" />
<Key word = "Custom" />
<Key word = "RemoveHandler" />
<Key word = "AddHandler" />
<Key word = "Option" /> <Key word = "Option" />
<Key word = "Let" /> <Key word = "Let" />
<Key word = "GoTo" /> <Key word = "GoTo" />

6
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -199,7 +199,7 @@
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\TipOfTheDay.cs"> <Compile Include="Src\Gui\Dialogs\TipOfTheDay.cs">
<SubType>Form</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Dialogs\TreeViewOptions.cs"> <Compile Include="Src\Gui\Dialogs\TreeViewOptions.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@ -679,7 +679,9 @@
<Compile Include="Src\Dom\Implementations\CombinedReturnType.cs" /> <Compile Include="Src\Dom\Implementations\CombinedReturnType.cs" />
<Compile Include="Src\TextEditor\Gui\Editor\CompletionWindow\CodeCompletionDataUsageCache.cs" /> <Compile Include="Src\TextEditor\Gui\Editor\CompletionWindow\CodeCompletionDataUsageCache.cs" />
<EmbeddedResource Include="Resources\CodeCompletionOptionPanel.xfrm" /> <EmbeddedResource Include="Resources\CodeCompletionOptionPanel.xfrm" />
<Compile Include="Src\TextEditor\Gui\OptionPanels\CodeCompletionPanel.cs" /> <Compile Include="Src\TextEditor\Gui\OptionPanels\CodeCompletionPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\Dom\CodeCompletionOptions.cs" /> <Compile Include="Src\Dom\CodeCompletionOptions.cs" />
<Compile Include="Src\Services\Debugger\CurrentLineBookmark.cs" /> <Compile Include="Src\Services\Debugger\CurrentLineBookmark.cs" />
<Compile Include="Src\Dom\ClassFinder.cs" /> <Compile Include="Src\Dom\ClassFinder.cs" />

21
src/Main/Base/Project/Src/Commands/FileMenuCommands.cs

@ -7,6 +7,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -34,8 +35,26 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
public override void Run() public override void Run()
{ {
using (OpenFileDialog fdiag = new OpenFileDialog()) { using (OpenFileDialog fdiag = new OpenFileDialog()) {
AddInTreeNode addinTreeNode = AddInTree.GetTreeNode("/SharpDevelop/Workbench/Combine/FileFilter");
StringBuilder b = new StringBuilder("All known project formats|");
bool first = true;
foreach (Codon c in addinTreeNode.Codons) {
if (!first) {
b.Append(';');
} else {
first = false;
}
string ext = c.Properties.Get("extensions", "");
if (ext != "*.*" && ext.Length > 0) {
b.Append(ext);
}
}
foreach (string entry in addinTreeNode.BuildChildItems(this)) {
b.Append('|');
b.Append(entry);
}
fdiag.AddExtension = true; fdiag.AddExtension = true;
fdiag.Filter = String.Join("|", (string[])(AddInTree.GetTreeNode("/SharpDevelop/Workbench/Combine/FileFilter").BuildChildItems(this)).ToArray(typeof(string))); fdiag.Filter = b.ToString();
fdiag.Multiselect = false; fdiag.Multiselect = false;
fdiag.CheckFileExists = true; fdiag.CheckFileExists = true;
if (fdiag.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) { if (fdiag.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {

6
src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/ProjectBrowserControl.cs

@ -60,9 +60,9 @@ namespace ICSharpCode.SharpDevelop.Project
public ProjectBrowserControl() public ProjectBrowserControl()
{ {
InitializeComponent(); InitializeComponent();
treeView.AfterSelect += new TreeViewEventHandler(TreeViewAfterSelect); treeView.AfterSelect += TreeViewAfterSelect;
FileService.FileRenaming += new FileRenameEventHandler(FileServiceFileRenaming); FileService.FileRenaming += FileServiceFileRenaming;
FileService.FileRemoving += new FileEventHandler(FileServiceFileRemoving); FileService.FileRemoving += FileServiceFileRemoving;
ProjectService.ProjectItemAdded += ProjectServiceProjectItemAdded; ProjectService.ProjectItemAdded += ProjectServiceProjectItemAdded;
ProjectService.SolutionFolderRemoved += ProjectServiceSolutionFolderRemoved; ProjectService.SolutionFolderRemoved += ProjectServiceSolutionFolderRemoved;

16
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -144,11 +144,11 @@ namespace ICSharpCode.SharpDevelop.Gui
ProjectService.CurrentProjectChanged += new ProjectEventHandler(SetProjectTitle); ProjectService.CurrentProjectChanged += new ProjectEventHandler(SetProjectTitle);
FileService.FileRemoved += new FileEventHandler(CheckRemovedFile); FileService.FileRemoved += CheckRemovedFile;
FileService.FileRenamed += new FileRenameEventHandler(CheckRenamedFile); FileService.FileRenamed += CheckRenamedFile;
FileService.FileRemoved += new FileEventHandler(FileService.RecentOpen.FileRemoved); FileService.FileRemoved += FileService.RecentOpen.FileRemoved;
FileService.FileRenamed += new FileRenameEventHandler(FileService.RecentOpen.FileRenamed); FileService.FileRenamed += FileService.RecentOpen.FileRenamed;
CreateMainMenu(); CreateMainMenu();
CreateToolBars(); CreateToolBars();
@ -288,9 +288,11 @@ namespace ICSharpCode.SharpDevelop.Gui
Properties properties = new Properties(); Properties properties = new Properties();
properties["bounds"] = normalBounds.X + "," + normalBounds.Y + "," + normalBounds.Width + "," + normalBounds.Height; properties["bounds"] = normalBounds.X + "," + normalBounds.Y + "," + normalBounds.Width + "," + normalBounds.Height;
if (FullScreen || WindowState == FormWindowState.Minimized)
properties["windowstate"] = defaultWindowState.ToString();
else
properties["windowstate"] = WindowState.ToString(); properties["windowstate"] = WindowState.ToString();
properties["defaultstate"] = defaultWindowState.ToString(); properties["defaultstate"] = defaultWindowState.ToString();
properties["fullscreen"] = fullscreen.ToString();
return properties; return properties;
} }
@ -312,10 +314,12 @@ namespace ICSharpCode.SharpDevelop.Gui
protected override void OnResize(EventArgs e) protected override void OnResize(EventArgs e)
{ {
base.OnResize(e); base.OnResize(e);
if (!FullScreen && WindowState != FormWindowState.Minimized) {
defaultWindowState = WindowState;
if (WindowState == FormWindowState.Normal) { if (WindowState == FormWindowState.Normal) {
normalBounds = Bounds; normalBounds = Bounds;
} }
}
} }
protected override void OnLocationChanged(EventArgs e) protected override void OnLocationChanged(EventArgs e)

35
src/Main/Base/Project/Src/Project/Converter/CombineToSolution.cs

@ -10,12 +10,11 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.IO; using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Xml;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Project.Converter namespace ICSharpCode.SharpDevelop.Project.Converter
{ {
/// <summary>
/// Description of Class1.
/// </summary>
public static class CombineToSolution public static class CombineToSolution
{ {
static string ReadContent(string fileName) static string ReadContent(string fileName)
@ -43,6 +42,14 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
} }
} }
static bool IsVisualBasic(string prjx)
{
using (XmlTextReader reader = new XmlTextReader(prjx)) {
reader.Read();
return reader.GetAttribute("projecttype") == "VBNET";
}
}
public static void ConvertSolution(Solution newSolution, string fileName) public static void ConvertSolution(Solution newSolution, string fileName)
{ {
List<string> projectFiles = new List<string>(); List<string> projectFiles = new List<string>();
@ -53,12 +60,34 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
foreach (string path in projectFiles) { foreach (string path in projectFiles) {
string name = PrjxToSolutionProject.Conversion.GetProjectName(path); string name = PrjxToSolutionProject.Conversion.GetProjectName(path);
conversion.NameToGuid[name] = Guid.NewGuid(); conversion.NameToGuid[name] = Guid.NewGuid();
if (IsVisualBasic(path))
conversion.NameToPath[name] = Path.ChangeExtension(path, ".vbproj");
else
conversion.NameToPath[name] = Path.ChangeExtension(path, ".csproj"); conversion.NameToPath[name] = Path.ChangeExtension(path, ".csproj");
} }
foreach (string path in projectFiles) { foreach (string path in projectFiles) {
conversion.IsVisualBasic = IsVisualBasic(path);
IProject newProject = PrjxToSolutionProject.ConvertOldProject(path, conversion); IProject newProject = PrjxToSolutionProject.ConvertOldProject(path, conversion);
newSolution.AddFolder(newProject); newSolution.AddFolder(newProject);
} }
if (conversion.Resources != null) {
const string resourceWarning = "There were resource files in the project.\n" +
"SharpDevelop 2 compiles resources different: the resource name " +
"is not just the file name; but it is prefixed with the root namespace " +
"and the directory name.\n\n" +
"The resources files have been renamed/moved accordingly.";
if (conversion.Resources.Count == 0) {
MessageService.ShowMessage(resourceWarning);
} else {
StringBuilder txt = new StringBuilder(resourceWarning);
txt.AppendLine();
txt.AppendLine();
txt.AppendLine("The following files could not be renamed/moved automatically:");
foreach (string r in conversion.Resources)
txt.AppendLine(r);
MessageService.ShowMessage(txt.ToString());
}
}
newSolution.Save(); newSolution.Save();
} }
} }

160
src/Main/Base/Project/Src/Project/Converter/PrjxToSolutionProject.cs

@ -6,10 +6,10 @@
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.IO; using System.IO;
using System.Collections.Generic;
using System.Xml; using System.Xml;
using System.Xml.XPath; using System.Xml.XPath;
using System.Xml.Xsl; using System.Xml.Xsl;
@ -28,11 +28,19 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
public Dictionary<string, Guid> NameToGuid = new Dictionary<string, Guid>(); public Dictionary<string, Guid> NameToGuid = new Dictionary<string, Guid>();
public Dictionary<string, string> NameToPath = new Dictionary<string, string>(); public Dictionary<string, string> NameToPath = new Dictionary<string, string>();
public bool IsVisualBasic;
public List<string> Resources;
public string basePath; public string basePath;
public string GetLanguageName()
{
return IsVisualBasic ? "VisualBasic" : "CSharp";
}
public string GetGuid(string name) public string GetGuid(string name)
{ {
return "{" + NameToGuid[name] + "}"; return "{" + NameToGuid[name].ToString().ToUpper() + "}";
} }
public string GetRelativeProjectPath(string name) public string GetRelativeProjectPath(string name)
@ -40,8 +48,78 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
return FileUtility.GetRelativePath(basePath, NameToPath[name]); return FileUtility.GetRelativePath(basePath, NameToPath[name]);
} }
public bool IsNotGacReference(string hintPath)
{
return FileUtility.IsBaseDirectory(FileUtility.NETFrameworkInstallRoot, hintPath);
}
string rootNamespace;
public string SetRootNamespace(string ns)
{
return rootNamespace = ns;
}
/// <summary>
/// Convert SharpDevelop 1.x resource to SharpDevelop 2.x resource.
/// SharpDevelop 1.x includes resources by their filename as resource,
/// SD 2.x/MsBuild also uses the project's root namespace and the directory name(s).
/// </summary>
public string ConvertResource(string fileName)
{
if (Resources == null)
Resources = new List<string>();
fileName = CanocializeFileName(fileName);
string name = Path.GetFileName(fileName);
if (rootNamespace.Length > 0) {
if (name.StartsWith(rootNamespace + ".")) {
name = name.Substring(rootNamespace.Length + 1);
name = ConvertResourceInternal(fileName, name);
if (name != null)
return name;
}
} else {
name = ConvertResourceInternal(fileName, name);
if (name != null)
return name;
}
Resources.Add(Path.Combine(basePath, fileName));
return fileName;
}
string ConvertResourceInternal(string fileName, string name)
{
string[] parts = name.Split('.');
string directory = basePath;
for (int i = 0; i < parts.Length; i++) {
if (Directory.Exists(Path.Combine(directory, parts[i]))) {
directory = Path.Combine(directory, parts[i]);
} else {
directory = Path.Combine(directory, parts[i]);
for (int j = i + 1; j < parts.Length; j++) {
directory += '.' + parts[j];
}
try {
File.Move(Path.Combine(basePath, fileName), directory);
return FileUtility.GetRelativePath(basePath, directory);
} catch {}
break;
}
}
return null;
}
public string CanocializeFileName(string fileName) public string CanocializeFileName(string fileName)
{ {
if (fileName.StartsWith("..\\") || fileName.StartsWith("../")) {
// work around a bug in older Fidalgo versions
if (!File.Exists(Path.Combine(basePath, fileName))) {
string fixedFileName = fileName.Substring(3);
if (File.Exists(Path.Combine(basePath, fixedFileName))) {
fileName = fixedFileName;
}
}
}
if (fileName.StartsWith("./") || fileName.StartsWith(".\\")) { if (fileName.StartsWith("./") || fileName.StartsWith(".\\")) {
return fileName.Substring(2); return fileName.Substring(2);
} }
@ -53,11 +131,21 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
return CanocializeFileName(fileName) + Path.DirectorySeparatorChar; return CanocializeFileName(fileName) + Path.DirectorySeparatorChar;
} }
public string Negate(string boolString)
{
return (!bool.Parse(boolString)).ToString();
}
public string GetFileName(string fileName) public string GetFileName(string fileName)
{ {
return Path.GetFileName(fileName); return Path.GetFileName(fileName);
} }
public string GetFileNameWithoutExtension(string fileName)
{
return Path.GetFileNameWithoutExtension(fileName);
}
public string ConvertBuildEvent(string executeScript, string arguments) public string ConvertBuildEvent(string executeScript, string arguments)
{ {
if (executeScript == null || executeScript.Length == 0) { if (executeScript == null || executeScript.Length == 0) {
@ -85,19 +173,25 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
} }
} }
static void RunConverter(string inFile, string outFile, string script, Conversion conversion) static Dictionary<string, XslCompiledTransform> xsltDict = new Dictionary<string, XslCompiledTransform>();
public static void RunConverter(string inFile, string outFile, string script, Conversion conversion)
{ {
conversion.basePath = Path.GetDirectoryName(inFile); conversion.basePath = Path.GetDirectoryName(inFile);
XslCompiledTransform xslt;
if (xsltDict.ContainsKey(script)) {
xslt = xsltDict[script];
} else {
//Create a new XslTransform object. //Create a new XslTransform object.
XslTransform xslt = new XslTransform(); xslt = new XslCompiledTransform();
//Load the stylesheet. //Load the stylesheet.
xslt.Load(FileUtility.Combine(PropertyService.DataDirectory, "ConversionStyleSheets", script)); xslt.Load(FileUtility.Combine(PropertyService.DataDirectory, "ConversionStyleSheets", script));
//Create a new XPathDocument and load the XML data to be transformed. xsltDict[script] = xslt;
XPathDocument mydata = new XPathDocument(inFile); }
using (XmlTextReader reader = new XmlTextReader(inFile)) {
//Create an XmlTextWriter which outputs to the console. //Create an XmlTextWriter which outputs to the console.
using (XmlTextWriter writer = new XmlTextWriter(outFile, Encoding.UTF8)) { using (XmlTextWriter writer = new XmlTextWriter(outFile, Encoding.UTF8)) {
writer.Formatting = Formatting.Indented; writer.Formatting = Formatting.Indented;
@ -106,40 +200,42 @@ namespace ICSharpCode.SharpDevelop.Project.Converter
argList.AddExtensionObject("urn:Conversion", conversion); argList.AddExtensionObject("urn:Conversion", conversion);
//Transform the data and send the output to the console. //Transform the data and send the output to the console.
xslt.Transform(mydata,argList,writer, null); xslt.Transform(reader, argList, writer, null);
}
} }
// System.Xml.Xsl.XslCompiledTransform xslt = new System.Xml.Xsl.XslCompiledTransform();
//
// xslt.Compile(FileUtility.Combine(PropertyService.DataDirectory, "ConversionStyleSheets", script));
//
// XmlArgumentList argList = new XmlArgumentList();
//
// argList.AddExtensionObject("urn:Conversion", conversion);
//
// if (File.Exists(outFile)) {
// File.Delete(outFile);
// }
// using (Stream outStream = File.OpenWrite(outFile)) {
// xslt.Execute(inFile, new XmlUrlResolver(), argList, outStream);
// }
} }
public static IProject ConvertOldProject(string fileName, Conversion conversion) public static IProject ConvertOldProject(string fileName, Conversion conversion)
{ {
string convertedFileName = Path.ChangeExtension(fileName, ".csproj"); string convertedFileName;
RunConverter(fileName, if (conversion.IsVisualBasic)
convertedFileName, convertedFileName = Path.ChangeExtension(fileName, ".vbproj");
"CSharp_prjx2csproj.xsl", else
conversion); convertedFileName = Path.ChangeExtension(fileName, ".csproj");
RunConverter(fileName, convertedFileName, "CSharp_prjx2csproj.xsl", conversion);
RunConverter(fileName, RunConverter(fileName, convertedFileName + ".user", "CSharp_prjx2csproj_user.xsl", conversion);
convertedFileName + ".user",
"CSharp_prjx2csproj_user.xsl",
conversion);
ILanguageBinding binding = LanguageBindingService.GetBindingPerProjectFile(convertedFileName); ILanguageBinding binding = LanguageBindingService.GetBindingPerProjectFile(convertedFileName);
return binding.LoadProject(convertedFileName, Conversion.GetProjectName(fileName)); return binding.LoadProject(convertedFileName, Conversion.GetProjectName(fileName));
} }
public static void ConvertVSNetProject(string fileName)
{
string old = fileName + ".old";
string userFile = fileName + ".user";
string oldUserFile = fileName + ".user.old";
File.Copy(fileName, old, true);
File.Delete(fileName);
File.Copy(userFile, oldUserFile, true);
File.Delete(userFile);
Conversion conversion = new Conversion();
if (Path.GetExtension(fileName).ToLower() == ".vbproj")
conversion.IsVisualBasic = true;
Solution.ReadSolutionInformation(Solution.SolutionBeingLoaded.FileName, conversion);
RunConverter(old, fileName, "vsnet2msbuild.xsl", conversion);
RunConverter(oldUserFile, userFile, "vsnet2msbuild_user.xsl", conversion);
}
} }
} }

11
src/Main/Base/Project/Src/Project/MSBuildProject.cs

@ -74,7 +74,14 @@ namespace ICSharpCode.SharpDevelop.Project
{ {
this.fileName = projectFileName; this.fileName = projectFileName;
using (XmlTextReader reader = new XmlTextReader(projectFileName)) { using (XmlTextReader reader = new XmlTextReader(projectFileName)) {
while (reader.Read()) { reader.Read();
if (reader.Name == "VisualStudioProject") {
reader.Close();
Converter.PrjxToSolutionProject.ConvertVSNetProject(projectFileName);
SetupProject(projectFileName);
return;
}
do {
if (reader.IsStartElement()) { if (reader.IsStartElement()) {
switch (reader.LocalName) { switch (reader.LocalName) {
case "PropertyGroup": case "PropertyGroup":
@ -107,7 +114,7 @@ namespace ICSharpCode.SharpDevelop.Project
break; break;
} }
} }
} } while (reader.Read());
} }
string userSettingsFileName = projectFileName + ".user"; string userSettingsFileName = projectFileName + ".user";

57
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -354,11 +354,42 @@ namespace ICSharpCode.SharpDevelop.Project
static Regex projectLinePattern = new Regex("Project\\(\"(?<ProjectGuid>.*)\"\\)\\s+=\\s+\"(?<Title>.*)\",\\s*\"(?<Location>.*)\",\\s*\"(?<Guid>.*)\"", RegexOptions.Compiled); static Regex projectLinePattern = new Regex("Project\\(\"(?<ProjectGuid>.*)\"\\)\\s+=\\s+\"(?<Title>.*)\",\\s*\"(?<Location>.*)\",\\s*\"(?<Guid>.*)\"", RegexOptions.Compiled);
static Regex globalSectionPattern = new Regex("\\s*GlobalSection\\((?<Name>.*)\\)\\s*=\\s*(?<Type>.*)", RegexOptions.Compiled); static Regex globalSectionPattern = new Regex("\\s*GlobalSection\\((?<Name>.*)\\)\\s*=\\s*(?<Type>.*)", RegexOptions.Compiled);
/// <summary>
/// Reads the specified solution file. The project-location-guid information is written into the conversion class.
/// </summary>
/// <returns>The version number of the solution.</returns>
public static string ReadSolutionInformation(string solutionFileName, Converter.PrjxToSolutionProject.Conversion conversion)
{
string solutionDirectory = Path.GetDirectoryName(solutionFileName);
using (StreamReader sr = File.OpenText(solutionFileName)) {
string line = sr.ReadLine();
Match match = versionPattern.Match(line);
if (!match.Success) {
return null;
}
string version = match.Result("${Version}");
while ((line = sr.ReadLine()) != null) {
match = projectLinePattern.Match(line);
if (match.Success) {
string projectGuid = match.Result("${ProjectGuid}");
string title = match.Result("${Title}");
string location = Path.Combine(solutionDirectory, match.Result("${Location}"));
string guid = match.Result("${Guid}");
conversion.NameToGuid.Add(title, new Guid(guid));
conversion.NameToPath.Add(title, location);
}
}
return version;
}
}
static bool SetupSolution(Solution newSolution, string fileName) static bool SetupSolution(Solution newSolution, string fileName)
{ {
string solutionDirectory = Path.GetDirectoryName(fileName); string solutionDirectory = Path.GetDirectoryName(fileName);
ProjectSection nestedProjectsSection = null; ProjectSection nestedProjectsSection = null;
bool needsConversion = false;
using (StreamReader sr = File.OpenText(fileName)) { using (StreamReader sr = File.OpenText(fileName)) {
string line = sr.ReadLine(); string line = sr.ReadLine();
Match match = versionPattern.Match(line); Match match = versionPattern.Match(line);
@ -369,19 +400,21 @@ namespace ICSharpCode.SharpDevelop.Project
switch (match.Result("${Version}")) { switch (match.Result("${Version}")) {
case "7.00": case "7.00":
if (!MessageService.AskQuestion("Found VS.NET 2000 Project. Should I convert it to Solution Format 9.00 (VS.NET 2005) ?")) { needsConversion = true;
if (!MessageService.AskQuestion("Found Visual Studio.NET Project. Should I convert it to Solution Format 9.00 (Visual Studio 2005) ?")) {
return false; return false;
} }
break; break;
case "8.00": case "8.00":
if (!MessageService.AskQuestion("Found VS.NET 2003 Project. Should I convert it to Solution Format 9.00 (VS.NET 2005) ?")) { needsConversion = true;
if (!MessageService.AskQuestion("Found Visual Studio.NET 2003 Project. Should I convert it to Solution Format 9.00 (Visual Studio 2005) ?")) {
return false; return false;
} }
break; break;
case "9.00": case "9.00":
break; break;
default: default:
MessageService.ShowError("Can't read Microsoft Solution file format " + match.Result("${Version}") + ". Use Visual Studio.NET to convert it to a newer version."); MessageService.ShowError("Can't read Microsoft Solution file format " + match.Result("${Version}") + ".");
return false; return false;
} }
@ -444,16 +477,32 @@ namespace ICSharpCode.SharpDevelop.Project
folder.AddFolder(newSolution.guidDictionary[from]); folder.AddFolder(newSolution.guidDictionary[from]);
} }
} }
if (needsConversion) {
// save in new format
newSolution.Save();
}
return true; return true;
} }
static Solution solutionBeingLoaded;
public static Solution SolutionBeingLoaded {
get {
return solutionBeingLoaded;
}
}
public static Solution Load(string fileName) public static Solution Load(string fileName)
{ {
Solution newSolution = new Solution(); Solution newSolution = new Solution();
solutionBeingLoaded = newSolution;
newSolution.Name = Path.GetFileNameWithoutExtension(fileName); newSolution.Name = Path.GetFileNameWithoutExtension(fileName);
bool loadCombine = Path.GetExtension(fileName).ToUpper() == ".CMBX"; bool loadCombine = Path.GetExtension(fileName).ToUpper() == ".CMBX";
if (loadCombine) { if (loadCombine) {
if (!MessageService.AskQuestion("Should the SharpDevelop 1.x combine be converted into a SharpDevelop 2.x solution?")) {
return null;
}
newSolution.fileName = Path.ChangeExtension(fileName, ".sln"); newSolution.fileName = Path.ChangeExtension(fileName, ".sln");
ICSharpCode.SharpDevelop.Project.Converter.CombineToSolution.ConvertSolution(newSolution, fileName); ICSharpCode.SharpDevelop.Project.Converter.CombineToSolution.ConvertSolution(newSolution, fileName);
} else { } else {
@ -462,6 +511,8 @@ namespace ICSharpCode.SharpDevelop.Project
return null; return null;
} }
} }
solutionBeingLoaded = null;
return newSolution; return newSolution;
} }

31
src/Main/Base/Project/Src/Services/File/FileEventArgs.cs

@ -10,8 +10,6 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
public delegate void FileEventHandler(object sender, FileEventArgs e);
public class FileEventArgs : EventArgs public class FileEventArgs : EventArgs
{ {
string fileName = null; string fileName = null;
@ -36,4 +34,33 @@ namespace ICSharpCode.Core
this.isDirectory = isDirectory; this.isDirectory = isDirectory;
} }
} }
public class FileCancelEventArgs : FileEventArgs
{
bool cancel;
public bool Cancel {
get {
return cancel;
}
set {
cancel = value;
}
}
bool operationAlreadyDone;
public bool OperationAlreadyDone {
get {
return operationAlreadyDone;
}
set {
operationAlreadyDone = value;
}
}
public FileCancelEventArgs(string fileName, bool isDirectory) : base(fileName, isDirectory)
{
}
}
} }

30
src/Main/Base/Project/Src/Services/File/FileRenameEventArgs.cs

@ -10,7 +10,35 @@ using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
public delegate void FileRenameEventHandler(object sender, FileRenameEventArgs e); public class FileRenamingEventArgs : FileRenameEventArgs
{
bool cancel;
public bool Cancel {
get {
return cancel;
}
set {
cancel = value;
}
}
bool operationAlreadyDone;
public bool OperationAlreadyDone {
get {
return operationAlreadyDone;
}
set {
operationAlreadyDone = value;
}
}
public FileRenamingEventArgs(string sourceFile, string targetFile, bool isDirectory)
: base(sourceFile, targetFile, isDirectory)
{
}
}
public class FileRenameEventArgs : EventArgs public class FileRenameEventArgs : EventArgs
{ {

28
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -185,7 +185,11 @@ namespace ICSharpCode.Core
public static void RemoveFile(string fileName, bool isDirectory) public static void RemoveFile(string fileName, bool isDirectory)
{ {
OnFileRemoving(new FileEventArgs(fileName, isDirectory)); FileCancelEventArgs eargs = new FileCancelEventArgs(fileName, isDirectory);
OnFileRemoving(eargs);
if (eargs.Cancel)
return;
if (!eargs.OperationAlreadyDone) {
if (isDirectory) { if (isDirectory) {
try { try {
if (Directory.Exists(fileName)) { if (Directory.Exists(fileName)) {
@ -205,12 +209,17 @@ namespace ICSharpCode.Core
// return; // return;
} }
} }
}
OnFileRemoved(new FileEventArgs(fileName, isDirectory)); OnFileRemoved(new FileEventArgs(fileName, isDirectory));
} }
public static void RenameFile(string oldName, string newName, bool isDirectory) public static void RenameFile(string oldName, string newName, bool isDirectory)
{ {
OnFileRenaming(new FileRenameEventArgs(oldName, newName, isDirectory)); FileRenamingEventArgs eargs = new FileRenamingEventArgs(oldName, newName, isDirectory);
OnFileRenaming(eargs);
if (eargs.Cancel)
return;
if (!eargs.OperationAlreadyDone) {
try { try {
if (isDirectory) { if (isDirectory) {
if (Directory.Exists(oldName)) { if (Directory.Exists(oldName)) {
@ -227,7 +236,8 @@ namespace ICSharpCode.Core
} else { } else {
MessageService.ShowError(e, "Can't rename file " + oldName); MessageService.ShowError(e, "Can't rename file " + oldName);
} }
// return; return;
}
} }
OnFileRenamed(new FileRenameEventArgs(oldName, newName, isDirectory)); OnFileRenamed(new FileRenameEventArgs(oldName, newName, isDirectory));
} }
@ -280,7 +290,7 @@ namespace ICSharpCode.Core
} }
} }
static void OnFileRemoving(FileEventArgs e) static void OnFileRemoving(FileCancelEventArgs e)
{ {
if (FileRemoving != null) { if (FileRemoving != null) {
FileRemoving(null, e); FileRemoving(null, e);
@ -294,16 +304,16 @@ namespace ICSharpCode.Core
} }
} }
static void OnFileRenaming(FileRenameEventArgs e) { static void OnFileRenaming(FileRenamingEventArgs e) {
if (FileRenaming != null) { if (FileRenaming != null) {
FileRenaming(null, e); FileRenaming(null, e);
} }
} }
public static event FileRenameEventHandler FileRenaming; public static event EventHandler<FileRenamingEventArgs> FileRenaming;
public static event FileRenameEventHandler FileRenamed; public static event EventHandler<FileRenameEventArgs> FileRenamed;
public static event FileEventHandler FileRemoving; public static event EventHandler<FileCancelEventArgs> FileRemoving;
public static event FileEventHandler FileRemoved; public static event EventHandler<FileEventArgs> FileRemoved;
} }
} }

4
src/Main/Base/Project/Src/Services/ParserService/ReflectionProjectContent.cs

@ -28,9 +28,13 @@ namespace ICSharpCode.Core
ICompilationUnit assemblyCompilationUnit = new DefaultCompilationUnit(this); ICompilationUnit assemblyCompilationUnit = new DefaultCompilationUnit(this);
try {
foreach (Type type in assembly.GetExportedTypes()) { foreach (Type type in assembly.GetExportedTypes()) {
AddClassToNamespaceListInternal(new ReflectionClass(assemblyCompilationUnit, type, null)); AddClassToNamespaceListInternal(new ReflectionClass(assemblyCompilationUnit, type, null));
} }
} catch (Exception ex) {
MessageService.ShowError(ex);
}
if (assembly == typeof(void).Assembly) { if (assembly == typeof(void).Assembly) {
// Replace void through the special class (ReturnType(void).GetMethods() does not return // Replace void through the special class (ReturnType(void).GetMethods() does not return

6
src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs

@ -50,8 +50,8 @@ namespace ICSharpCode.SharpDevelop.Project
static ProjectService() static ProjectService()
{ {
WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += new EventHandler(ActiveWindowChanged); WorkbenchSingleton.Workbench.ActiveWorkbenchWindowChanged += new EventHandler(ActiveWindowChanged);
FileService.FileRenamed += new FileRenameEventHandler(FileServiceFileRenamed); FileService.FileRenamed += FileServiceFileRenamed;
FileService.FileRemoved += new FileEventHandler(FileServiceFileRemoved); FileService.FileRemoved += FileServiceFileRemoved;
} }
static void FileServiceFileRenamed(object sender, FileRenameEventArgs e) static void FileServiceFileRenamed(object sender, FileRenameEventArgs e)
@ -162,6 +162,8 @@ namespace ICSharpCode.SharpDevelop.Project
public static void LoadSolution(string fileName) public static void LoadSolution(string fileName)
{ {
openSolution = Solution.Load(fileName); openSolution = Solution.Load(fileName);
if (openSolution == null)
return;
OnSolutionLoaded(new SolutionEventArgs(openSolution)); OnSolutionLoaded(new SolutionEventArgs(openSolution));
try { try {
foreach (IProject project in openSolution.Projects) { foreach (IProject project in openSolution.Projects) {

4
src/Main/Base/Project/Src/Services/Tasks/TaskService.cs

@ -91,8 +91,8 @@ namespace ICSharpCode.Core
static TaskService() static TaskService()
{ {
FileService.FileRenamed += new FileRenameEventHandler(CheckFileRename); FileService.FileRenamed += CheckFileRename;
FileService.FileRemoved += new FileEventHandler(CheckFileRemove); FileService.FileRemoved += CheckFileRemove;
ProjectService.SolutionClosed += new EventHandler(ProjectServiceSolutionClosed); ProjectService.SolutionClosed += new EventHandler(ProjectServiceSolutionClosed);
} }

2
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AbstractCompletionDataProvider.cs

@ -30,7 +30,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
} }
} }
int defaultIndex; int defaultIndex = -1;
public int DefaultIndex { public int DefaultIndex {
get { get {

Loading…
Cancel
Save