Browse Source

Fixed adding new files to project.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2045 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
8a4efd80bc
  1. 2
      data/templates/file/CSharp/CSharp.Forms.Form.xft
  2. 2
      data/templates/file/CSharp/CSharp.Forms.UserControl.xft
  3. 2
      data/templates/file/CSharp/CSharp.WPFPage.xft
  4. 2
      data/templates/file/CSharp/CSharp.WPFPageFunction.xft
  5. 2
      data/templates/file/CSharp/CSharp.WPFUserControl.xft
  6. 2
      data/templates/file/CSharp/CSharp.WPFWindow.xft
  7. 2
      data/templates/file/CSharp/CSharp.Web.WebControl.xft
  8. 2
      data/templates/file/CSharp/CSharp.Web.WebForm.xft
  9. 2
      data/templates/file/CSharp/CSharp.Web.WebService.xft
  10. 2
      data/templates/file/VBNet/VBNet.Forms.Form.xft
  11. 2
      data/templates/file/VBNet/VBNet.Forms.UserControl.xft
  12. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/Form.xft
  13. 9
      src/AddIns/Misc/SubversionAddIn/Project/Src/Gui/ProjectBrowserVisitor/OverlayIconManager.cs
  14. 5
      src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs
  15. 3
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

2
data/templates/file/CSharp/CSharp.Forms.Form.xft

@ -23,7 +23,7 @@
--> -->
<Files> <Files>
<!-- Designer file must come first, so the design tab is shown correctly --> <!-- Designer file must come first, so the design tab is shown correctly -->
<File name="${Path}/${FileNameWithoutExtension}.Designer.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.Designer.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
namespace ${StandardNamespace} namespace ${StandardNamespace}
{ {
partial class ${ClassName} : System.Windows.Forms.Form partial class ${ClassName} : System.Windows.Forms.Form

2
data/templates/file/CSharp/CSharp.Forms.UserControl.xft

@ -23,7 +23,7 @@
--> -->
<Files> <Files>
<!-- Designer file must come first, so the design tab is shown correctly --> <!-- Designer file must come first, so the design tab is shown correctly -->
<File name="${Path}/${FileNameWithoutExtension}.Designer.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.Designer.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
namespace ${StandardNamespace} namespace ${StandardNamespace}
{ {
partial class ${ClassName} : System.Windows.Forms.UserControl partial class ${ClassName} : System.Windows.Forms.UserControl

2
data/templates/file/CSharp/CSharp.WPFPage.xft

@ -30,7 +30,7 @@
</Grid> </Grid>
</Page>]]></File> </Page>]]></File>
<File name="${FullName}.cs" language="C#" dependentUpon="${FileName}" subType="Code"><![CDATA[using System; <File name="${FullName}.cs" language="C#" DependentUpon="${FileName}" SubType="Code"><![CDATA[using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows; using System.Windows;

2
data/templates/file/CSharp/CSharp.WPFPageFunction.xft

@ -32,7 +32,7 @@
</Grid> </Grid>
</PageFunction>]]></File> </PageFunction>]]></File>
<File name="${FullName}.cs" language="C#" dependentUpon="${FileName}" subType="Code"><![CDATA[using System; <File name="${FullName}.cs" language="C#" DependentUpon="${FileName}" SubType="Code"><![CDATA[using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows; using System.Windows;

2
data/templates/file/CSharp/CSharp.WPFUserControl.xft

@ -28,7 +28,7 @@
</Grid> </Grid>
</UserControl>]]></File> </UserControl>]]></File>
<File name="${FullName}.cs" language="C#" dependentUpon="${FileName}" subType="Code"><![CDATA[using System; <File name="${FullName}.cs" language="C#" DependentUpon="${FileName}" SubType="Code"><![CDATA[using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows; using System.Windows;

2
data/templates/file/CSharp/CSharp.WPFWindow.xft

@ -30,7 +30,7 @@
</Grid> </Grid>
</Window>]]></File> </Window>]]></File>
<File name="${FullName}.cs" language="C#" dependentUpon="${FileName}" subType="Code"><![CDATA[using System; <File name="${FullName}.cs" language="C#" DependentUpon="${FileName}" SubType="Code"><![CDATA[using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows; using System.Windows;

2
data/templates/file/CSharp/CSharp.Web.WebControl.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}/${FileNameWithoutExtension}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Web; using System.Web;

2
data/templates/file/CSharp/CSharp.Web.WebForm.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}/${FileName}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileName}.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Collections; using System.Collections;

2
data/templates/file/CSharp/CSharp.Web.WebService.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}/${FileNameWithoutExtension}.cs" dependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#} <File name="${Path}/${FileNameWithoutExtension}.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System; using System;
using System.Web.Services; using System.Web.Services;

2
data/templates/file/VBNet/VBNet.Forms.Form.xft

@ -22,7 +22,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}/${FileNameWithoutExtension}.Designer.vb" dependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET} <File name="${Path}/${FileNameWithoutExtension}.Designer.vb" DependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Partial Class ${ClassName} Partial Class ${ClassName}
Inherits System.Windows.Forms.Form Inherits System.Windows.Forms.Form

2
data/templates/file/VBNet/VBNet.Forms.UserControl.xft

@ -21,7 +21,7 @@
${Path} -> Full path of the file ${Path} -> Full path of the file
--> -->
<Files> <Files>
<File name="${Path}/${FileNameWithoutExtension}.Designer.vb" dependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET} <File name="${Path}/${FileNameWithoutExtension}.Designer.vb" DependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Partial Class ${ClassName} Partial Class ${ClassName}
Inherits System.Windows.Forms.UserControl Inherits System.Windows.Forms.UserControl

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/Templates/Form.xft

@ -22,7 +22,7 @@
--> -->
<Files> <Files>
<!-- Designer file must come first, so the design tab is shown correctly --> <!-- Designer file must come first, so the design tab is shown correctly -->
<File name="${Path}/${FileNameWithoutExtension}.Designer.boo" dependentUpon="${FileName}" language="Boo"><![CDATA[namespace ${StandardNamespace} <File name="${Path}/${FileNameWithoutExtension}.Designer.boo" DependentUpon="${FileName}" language="Boo"><![CDATA[namespace ${StandardNamespace}
partial class ${ClassName}(System.Windows.Forms.Form): partial class ${ClassName}(System.Windows.Forms.Form):
private components as System.ComponentModel.IContainer = null private components as System.ComponentModel.IContainer = null

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

@ -127,12 +127,13 @@ namespace ICSharpCode.Svn
static void Run(object state) static void Run(object state)
{ {
LoggingService.Debug("SVN: OverlayIconManager Thread started"); LoggingService.Debug("SVN: OverlayIconManager Thread started");
Thread.Sleep(2); // sleep a tiny bit to give main thread time to add more jobs to the queue // sleep a tiny bit to give main thread time to add more jobs to the queue
Thread.Sleep(2);
while (true) { while (true) {
if (ICSharpCode.SharpDevelop.ParserService.LoadSolutionProjectsThreadRunning) { if (ICSharpCode.SharpDevelop.ParserService.LoadSolutionProjectsThreadRunning) {
// run OverlayIconManager much more slowly while solution is being loaded // Run OverlayIconManager much more slowly while solution is being loaded.
// this prevents the disk from seeking to much // This prevents the disk from seeking too much
Thread.Sleep(50); Thread.Sleep(100);
} }
AbstractProjectBrowserTreeNode node; AbstractProjectBrowserTreeNode node;
lock (queue) { lock (queue) {

5
src/Main/Base/Project/Src/Internal/Templates/File/FileDescriptionTemplate.cs

@ -86,7 +86,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
/// <summary> /// <summary>
/// Sets meta data properties. /// Sets meta data properties.
/// </summary> /// </summary>
/// <returns>Returns <c>true</c> when the projectItem was changed</returns> /// <returns>Returns <c>true</c> when the projectItem was changed
/// (in ItemType or MetaData)</returns>
public bool SetProjectItemProperties(ProjectItem projectItem) public bool SetProjectItemProperties(ProjectItem projectItem)
{ {
if (projectItem == null) if (projectItem == null)
@ -97,7 +98,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
foreach (KeyValuePair<string, string> pair in metadata) { foreach (KeyValuePair<string, string> pair in metadata) {
projectItem.SetMetadata(pair.Key, StringParser.Parse(pair.Value)); projectItem.SetMetadata(pair.Key, StringParser.Parse(pair.Value));
} }
return itemType != null && metadata.Count > 0; return itemType != null || metadata.Count > 0;
} }
public FileDescriptionTemplate(string name, string language, string content) public FileDescriptionTemplate(string name, string language, string content)

3
src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

@ -564,9 +564,6 @@ namespace ICSharpCode.SharpDevelop
ICompilationUnit parserOutput = null; ICompilationUnit parserOutput = null;
if (fileContent == null) {
fileContent = GetParseableFileContent(fileName);
}
try { try {
if (fileProjectContent == null) { if (fileProjectContent == null) {
// GetProjectContent is expensive because it compares all file names, so // GetProjectContent is expensive because it compares all file names, so

Loading…
Cancel
Save