Extension definition
Overview
In the extension definition, you define information that pertains to the entire extension.
Extension definition elements
key | value description | required? |
---|---|---|
name | any name that is unique across all extensions | required |
displayName | extension display name 1 | - |
description | extension description 1 | - |
icon | extension icon 1 | - |
version | extension version 1 | - |
publisher | extension publisher 1 | - |
license | extension license 1 | - |
homepage | extension homepage URL 1 | - |
categories | array of category names to which the extension belongs 1 | - |
env | extension operating environment 1 | - |
main | file name that is the entry point of the executable program (script or DLL) | required |
lifecycle | extension lifecycle. Either application or project . | Required |
baseProfile | Profile name of the project for which the extension is valid. If the extension is valid in multiple profiles, list the profile names separated by commas. If the profile name is specified in the format *.package name , the extension is valid in profiles that have that package name in the first hierarchy of the profile (for example, *.UML ). If the value is * , the extension is valid in all projects. The extension is valid only if project is specified for lifecycle. | - |
baseProfiles | Profile names and versions of the project for which the extension is valid. ・ [name] : Specify the profile name. (Only one specification) ・ [version]: Specify the version range to be valid. (All versions are allowed when omitted) If multiple profiles are specified, list the profile names and versions in the collection. For information on interval notation for version ranges, see here. This is only effective if project is specified for lifecycle. | - |
extensionPoints | Extension extension point definition | - |
runtime | Extension execution environment definition | - |
- If both baseProfile and baseProfiles are defined, the logical OR of the respective definitions will be effective.
If baseProfile and baseProfiles are not defined, it will be effective for all projects.
Example of definition for each lifecycle
For application lifecycle
manifest.json
{
"name": "HelloWorld",
"displayName": "Hello World",
"description": "Displays Hello World on the screen.",
"main": "entrypoint.cs",
"lifecycle": "application", //Application lifecycle
"extensionPoints": {
...
}
}
For project lifecycle
manifest.json
{
"name": "HelloWorld",
"displayName": "Hello World",
"description": "Displays Hello World on the screen.",
"main": "entrypoint.cs",
"lifecycle": "project", //Project lifecycle
"baseProfile": "Target profile name", //Profile name of the project where the extension is enabled
"baseProfiles": [
{
"name": "Target profile name A", //Profile name of the project where the extension is enabled
"version": "[1.0,2.0)"
}, //Valid version range
{
"name": "Target profile name B", //Profile name of the project where the extension is enabled
"version": "[1.0,)"
} //Valid version range
],
"extensionPoints": {
// ...
}
}
Example of definition for each implementation method
For C# script
manifest.json
{
"name": "HelloWorld",
"displayName": "Hello World",
"description": "Displays Hello World on the screen. ",
"main": "main.cs", //Specify the script file
"lifecycle": "project",
"baseProfile": "Target profile name",
"baseProfiles": [
{ "name": "Target profile name A", "version": "[1.0,2.0)" },
{ "name": "Target profile name B", "version": "[1.0,)" }
],
"extensionPoints": {
// ...
}
}
manifest.json
{
"name": "HelloWorld",
"displayName": "Hello World",
"description": "Displays Hello World on the screen. ",
"main": "helloworld.dll", //Specify the DLL file
"lifecycle": "project",
"baseProfile": "Target profile name",
"baseProfiles": [
{ "name": "Target profile name A", "version": "[1.0,2.0)" },
{ "name": "Target profile name B", "version": "[1.0,)" }
],
"extensionPoints": {
// ...
}
}
Detailed definition example
manifest.json
{
"name": "HelloWorld",
"displayName": "Hello World",
"description": "Displays Hello World on the screen. ",
"icon": "resources/About.png",
"version": "1.1.0",
"publisher": "DENSO CREATE INC",
"license": "Subject to the Next Design License Agreement. Copyright (C) 2019 DENSO CREATE INC.",
"homepage": "https://www.denso-create.jp",
"categories": ["Common"],
"env": {
"nextdesign": "1.1.0"
},
"main": "main.cs", //Specify the script file
"lifecycle": "project",
"baseProfile": "Target profile name",
"baseProfiles": [
{ "name": "Target profile name A", "version": "[1.0,2.0)" },
{ "name": "Target profile name B", "version": "[1.0,)" }
],
"extensionPoints": {
// ...
},
"runtime": {
// ...
}
}