Defining Extension Points
Define the following extension points in the manifest using the extension:
- Ribbon
- Events
- Commands
Extension Point Details
For details on extension points, see Extension Points.
Implementation Example
This example shows a simple implementation of an extension point that defines one button to execute the functionality of the extension.
- Define
ribbonrepresenting the ribbon configuration andcommandsrepresenting the commands to be executed in theextensionPointssection. - Define controls such as tabs, groups, and buttons that make up the ribbon.
- Assign commands to be executed to the buttons.
In this example, the
extensionPoints.ribbon.tabs[0].groups[0].controls[0].commandproperty is set to the command IDCommand.SayHello, which will be defined later.
- The command defines the ID, title, and command handler function name of the command to be executed.
In this example, the
extensionPoints.commandsproperty defines the command with IDCommand.SayHelloas the first execution command.
The nameSayHelloin theextensionPoints.commands[0].execFuncproperty is the function name of the command handler that will be implemented in the entry point's executable program.
- C#
- Python
{
//Extension definition
"name": "HelloWorld",
"main": "main.cs",
"lifecycle": "application",
//Extension point definition
"extensionPoints": {
//Ribbon
"ribbon": {
"tabs": [
//Ribbon tab
{
"id": "HelloWorld.MainTab",
"label": "HelloWorld",
"orderBefore": "System.View",
"groups": [
//Groups within ribbon tabs
{
"id": "HelloWorld.FirstGroup",
"label": "Group 1",
"controls": [
//Button
{
"id": "HelloWorld.SayHelloButton",
"type": "Button",
"label": "Say Hello",
"imageLarge": "images/About.png",
"command": "Command.SayHello"
}
]
}
]
}
]
},
/Command
"commands": [
{
"id": "Command.SayHello",
"execFunc": "SayHello"
}
]
}
}
{
/Extension definition
"name": "HelloWorld",
"main": "main.py",
"lifecycle": "application",
/Extension point definition
"extensionPoints": {
/Ribbon
"ribbon": {
"tabs": [
/Ribbon tab
{
"id": "HelloWorld.MainTab",
"label": "HelloWorld",
"orderBefore": "System.View",
"groups": [
/Groups within the ribbon tab
{
"id": "HelloWorld.FirstGroup",
"label": "Group 1",
"controls": [
/Button
{
"id": "HelloWorld.SayHelloButton",
"type": "Button",
"label": "Say Hello",
"imageLarge": "images/About.png",
"command": "Command.SayHello"
}
]
}
]
}
]
},
/Command
"commands": [
{
"id": "Command.SayHello",
"execFunc": "say_hello"
}
]
}
}
JSON Schema
Useful for Manifest Editing [JSON The schema definition (manifest.schema.json) is available on GitHub (https://github.com/denso-create/NextDesign-Samples/blob/main/references/manifest.schema.json). Please download and use it.