-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix filling in guid when adding a new component/command to an existin…
…g project. Also fix creating new GH commands so it doesn't always have the project name, but the new name you typed in.
- Loading branch information
Showing
10 changed files
with
44 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using MonoDevelop.Ide.Templates; | ||
using MonoDevelop.Projects; | ||
using System.Text.RegularExpressions; | ||
|
||
namespace MonoDevelop.RhinoDebug | ||
{ | ||
public class RhinoFileTemplate : TextFileDescriptionTemplate | ||
{ | ||
public override string CreateContent(Project project, Dictionary<string, string> tags, string language) | ||
{ | ||
var content = base.CreateContent(project, tags, language); | ||
var keys = new Dictionary<string, Guid>(StringComparer.OrdinalIgnoreCase); | ||
return Regex.Replace(content, @"\$\{Guid\d+\}", match => | ||
{ | ||
if (!keys.TryGetValue(match.Value, out var key)) | ||
{ | ||
key = Guid.NewGuid(); | ||
keys.Add(match.Value, key); | ||
} | ||
return key.ToString(); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using System; | ||
using System; | ||
using Rhino; | ||
using Rhino.Commands; | ||
using Rhino.Geometry; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using System; | ||
using System; | ||
using Rhino; | ||
using Rhino.Commands; | ||
using Rhino.Geometry; | ||
|