~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
using MonoDevelop.Ide.StandardHeader;
40
40
using System.Text;
41
41
using MonoDevelop.Ide.Gui.Content;
 
42
using MonoDevelop.Ide.CodeFormatting;
42
43
 
43
44
namespace MonoDevelop.Ide.Templates
44
45
{
243
244
                        string content = CreateContent (project, tags, language);
244
245
                        content = StringParserService.Parse (content, tags);
245
246
                        string mime = DesktopService.GetMimeTypeForUri (fileName);
246
 
                        Formatter formatter = !String.IsNullOrEmpty (mime) ? TextFileService.GetFormatter (mime) : null;
 
247
                        CodeFormatter formatter = !string.IsNullOrEmpty (mime) ? CodeFormatterService.GetFormatter (mime) : null;
247
248
                        
248
249
                        if (formatter != null)
249
250
                                content = formatter.FormatText (policyParent != null ? policyParent.Policies : null, content);
339
340
                        if (project != null) {
340
341
                                tags ["ProjectName"] = project.Name;
341
342
                                tags ["SafeProjectName"] = CreateIdentifierName (project.Name);
 
343
                                var info = project.AuthorInformation ?? AuthorInformation.Default;
 
344
                                tags ["AuthorCopyright"] = info.Copyright;
 
345
                                tags ["AuthorCompany"] = info.Company;
 
346
                                tags ["AuthorTrademark"] = info.Trademark;
 
347
                                tags ["AuthorEmail"] = info.Email;
 
348
                                tags ["AuthorName"] = info.Name;
342
349
                        }
343
350
                        if ((language != null) && (language.Length > 0))
344
351
                                tags ["Language"] = language;