This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 95
FileTemplate Extension
Caleb Morris edited this page Nov 8, 2015
·
1 revision
Home > Reference Manual > FileTemplate Extension |
---|
Extension path to create a file template addin.
Attribute | Description |
---|---|
id | Identifier for node. Can be used with insertion |
file | Name of the file where the template is stored |
resource | Name of the resource where the template is stored |
insertafter | ID of an existing extension after which to insert this |
insertbefore | ID of an existing extension before which to insert this |
Example/ExampleProject/Properties/AddinInfo.cs
using Mono.Addins;
[assembly:Addin (
"ExampleAddin",
Namespace = "Example",
Version = "0.0.1"
)]
[assembly:ImportAddinFile ("Example.xft.xml")]
Example/ExampleProject/Properties/Manifest.addin.xml
<?xml version="1.0" encoding="UTF-8"?>
<ExtensionModel>
<Extension path="/MonoDevelop/Ide/FileTemplates">
<FileTemplate id ="ExampleFileTemplate" file = "Example.xft.xml"/>
</Extension>
</ExtensionModel>
Example/ExampleProject/Example.xft.xml
<Template Originator="Author Name" Language="Text" Created="11/07/2015" LastModified="11/07/2015">
<TemplateConfiguration>
<_Name>Example Template</_Name>
<Icon>md-text-file-icon</Icon>
<_Category>Misc</_Category>
<ProjectType>DotNet</ProjectType>
<_Description>Creates an example template.</_Description>
<DefaultFilename>Example</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
<ProjectResource>
<File name="${Name}.example">
<![CDATA[<?xml version="1.0" encoding="utf-8"?>
Default Created Content
]]>
</File>
</ProjectResource>
</TemplateFiles>
<FileOptions/>
</Template>
- Extension Points and Extensions
- Querying Extension Points
- Type Extension Metadata
- Data-only Extension Points
- Data Files and Resources
- About Lazy Loading
- Thread Safety
- The Add-in Registry
- Addin Discovery
- Creating and Managing Add-in Packages
- Advanced Concepts