public ModuleSchemaItem (AddinProjectFlavor project) : base (
			"Module",
			"Declares an optional extension module",
			new SchemaElement [] {
				new RuntimeSchemaElement (),
				//TODO: filter out the addins already extended by the parent
				new DependenciesSchemaElement (),
				//TODO: extensions in a module should able to extend the dependencies of the module
				new ExtensionElement (project),
			}
		) {}
 public ModuleSchemaItem(AddinProjectFlavor project) : base(
         "Module",
         "Declares an optional extension module",
         new SchemaElement [] {
     new RuntimeSchemaElement(),
     //TODO: filter out the addins already extended by the parent
     new DependenciesSchemaElement(),
     //TODO: extensions in a module should able to extend the dependencies of the module
     new ExtensionElement(project),
 }
         )
 {
 }
		public ExtensionPointSchemaElement (AddinProjectFlavor project) : base (
			"ExtensionPoint",
			"Declares an extension point",
			new [] {
				new SchemaElement ("Description", "Long description of the extension point."),
				new ExtensionNodeDefinitionElement (project),
				new ExtensionNodeSetElement (project),
			},
			new[] {
				new SchemaAttribute ("path", "Path of the extension point."),
				new SchemaAttribute ("name", "Display name of the extension point (to be shown in documentation)."),
			}
		) {}
Exemplo n.º 4
0
 public ExtensionNodeDefinitionElement(AddinProjectFlavor project) : base(
         "ExtensionNode",
         "A type of node allowed in this extension point.",
         new[] {
     new SchemaElement("Description", "Description of what this kind of node represents.")
 },
         new [] {
     new SchemaAttribute("name", "Name of the node type. When an element is added to an extension point, its name must match one of the declared node types."),
     new SchemaAttribute("type", "CLR type that implements this extension node type. It must be a subclass of Mono.Addins.ExtensionNode. If not specified, by default it is Mono.Addins.TypeExtensionNode.")
 }
         )
 {
     this.project = project;
 }
		public ExtensionNodeDefinitionElement (AddinProjectFlavor project) : base (
			"ExtensionNode",
			"A type of node allowed in this extension point.",
			new[] {
				new SchemaElement ("Description", "Description of what this kind of node represents.")
			},
			new [] {
				new SchemaAttribute ("name", "Name of the node type. When an element is added to an extension point, its name must match one of the declared node types."),
				new SchemaAttribute ("type", "CLR type that implements this extension node type. It must be a subclass of Mono.Addins.ExtensionNode. If not specified, by default it is Mono.Addins.TypeExtensionNode.")
			}
		)
		{
			this.project = project;
		}
Exemplo n.º 6
0
 public ExtensionPointSchemaElement(AddinProjectFlavor project) : base(
         "ExtensionPoint",
         "Declares an extension point",
         new [] {
     new SchemaElement("Description", "Long description of the extension point."),
     new ExtensionNodeDefinitionElement(project),
     new ExtensionNodeSetElement(project),
 },
         new[] {
     new SchemaAttribute("path", "Path of the extension point."),
     new SchemaAttribute("name", "Display name of the extension point (to be shown in documentation)."),
 }
         )
 {
 }
 internal static IEnumerable <Extension> GetExtensions(AddinProjectFlavor project, ExtensionPoint extensionPoint)
 {
     //TODO: handle node sets
     foreach (var addin in extensionPoint.ExtenderAddins)
     {
         var modules = project.AddinRegistry.GetAddin(addin).Description.AllModules;
         foreach (ModuleDescription module in modules)
         {
             foreach (Extension extension in module.Extensions)
             {
                 if (extension.Path == extensionPoint.Path)
                 {
                     yield return(extension);
                 }
             }
         }
     }
 }
		internal static IEnumerable<Extension> GetExtensions (AddinProjectFlavor project, ExtensionPoint extensionPoint)
		{
			//TODO: handle node sets
			foreach (var addin in extensionPoint.ExtenderAddins) {
				var modules = project.AddinRegistry.GetAddin (addin).Description.AllModules;
				foreach (ModuleDescription module in modules) {
					foreach (Extension extension in module.Extensions) {
						if (extension.Path == extensionPoint.Path)
							yield return extension;
					}
				}
			}
		}
		public ExtensionNodeElement (AddinProjectFlavor proj, ExtensionPoint extensionPoint, ExtensionNodeType info) : base (info.NodeName, info.Description)
		{
			this.proj = proj;
			this.extensionPoint = extensionPoint;
			this.info = info;
		}
 public ExtensionNodeElement(AddinProjectFlavor proj, ExtensionPoint extensionPoint, ExtensionNodeType info) : base(info.NodeName, info.Description)
 {
     this.proj           = proj;
     this.extensionPoint = extensionPoint;
     this.info           = info;
 }
Exemplo n.º 11
0
 public ExtensionElement(AddinProjectFlavor project) : base("Extension", "Declares an extension")
 {
     this.project = project;
 }
		public ExtensionElement (AddinProjectFlavor project) : base ("Extension", "Declares an extension")
		{
			this.project = project;
		}