You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/_index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,6 @@ For information on new releases of the Extensibility API see:
20
20
21
21
## Introduction
22
22
23
-
Extensions are self-contained modules which users can add to Studio Pro. This means that with extensibility you can add new features and functionality to Studio Pro. The Extensibility API is an API that allows developers to interact with a curated list of internal systems of Studio Pro. This documentation provides guides and reference documentation for the Extensibility API.
23
+
Extensions are self-contained modules that enhance Studio Pro by adding new features and functionality. The Extensibility API allows developers to interact with a curated set of internal systems, making it easier to customize and expand Studio Pro’s capabilities.
24
24
25
-
The API is provided in two flavors, depending which language you are developing in. C# and web based (via Typescript):
25
+
The API is provided in two sections, depending on the language you are developing in:
Once you have finished development on your extension, you might want to package it into an add-on module so that others can start using it. Once you have created the add-on module, it can then be published to the Mendix Marketplace for your extension users to download into their Studio Pro app.
9
+
After completing development on your extension, you can package it into an add-on module so others can use it. Once packaged, the modulecan be published to the Mendix Marketplace, allowing other users to download it into their Studio Pro apps.
10
10
11
-
To package your extension, you will still need the `--enable-extension-development` command line option turned on. Create a new module in your Studio Pro app containing your dev extension, give it an appropriate name. Open the module's settings form and set it to be an Add-on module. In the `Extension name` dropdown, select the extension you want to package into it.
11
+
To package your extension, follow the steps below:
12
+
13
+
1. Make sure the`--enable-extension-development` command-line option is enabled.
14
+
2. In your Studio Pro app, create a new module and include your development extension.
15
+
3. Give the module a name.
16
+
4. Open the module's settings and in the **Export** tab, choose **Add-on module**.
17
+
5. In the **Extension name** drop-down, select the extension you want to package into it.
After you've created your add-on module with its extension, you can now export it, by right-clicking the module in the App Explorer and choosing `Export add-on module package`, as shown below.
21
+
After you have created your add-on module with its extension, you can export it by right-clicking the module in the **App Explorer** and selecting **Export add-on module package**.
You can now save the add-on module to a location of your choice.
20
26
21
-
# Importing the extension add-on module
27
+
# Importing the Extension Add-on Module
22
28
23
-
Once the add-on module is available to a Studio Pro user, they are now able to add it in their application. They can so so by right-clicking the app in the App Explorer and choosing `Import module package`, as shown below.
29
+
When the add-on module is available to a Studio Pro user, they are now able to add it in their application. This is done by right-clicking the app in the **App Explorer** and selecting **Import module package**.
Once an add-on module containing an extension is imported in the app, Studio Pro will show a warning to the user, asking to trust the extension contained in it. If the user does not choose to trust, the module will still be imported but the extension inside it won't be loaded.
33
+
When an add-on module containing an extension is imported in the app, Studio Pro will show a warning to the user, asking to trust the extension contained in it. If the user does not choose to trust, the module will still be imported but the extension inside it will not be loaded.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/_index.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,25 @@ weight: 20
13
13
14
14
## Introduction
15
15
16
-
Extensions can be written in Typescript or other web languages, described here, or using a C# API which is documented separately in [Extensibility API for C# Developers](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/).
16
+
Extensions can be written in TypeScript or other web languages, described here, or using a C# API, which is documented in [Extensibility API for C# Developers](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/).
17
17
18
18
{{% alert color="info" %}}
19
-
Please note that extension development is only possible by starting Studio Pro with the `--enable-extension-development` feature flag.
19
+
At this time, extension development is only possible with the `--enable-extension-development` feature flag.
20
20
{{% /alert %}}
21
21
22
22
For more detailed information on the web API, see the [Mendix Studio Pro Web Extensibility API reference documentation](http://apidocs.rnd.mendix.com/11/extensions-api/index.html).
23
23
24
24
## Prerequisites
25
25
26
-
* You need at least a basic understanding of the Mendix platform.
27
-
* You need some understanding of the Mendix Model.
28
-
* You need to have some TypeScript development experience.
26
+
To use the Web Extensibility API, you must have:
27
+
28
+
* A basic understanding of the Mendix platform
29
+
* Some understanding of the Mendix Model
30
+
* Some TypeScript development experience
29
31
30
32
## Getting Started
31
33
32
-
For detailed explanation on how to get started with extensions, check out[Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/).
34
+
For detailed information on how to get started with extensions, see[Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/).
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/get-started.md
+12-23Lines changed: 12 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ weight: 2
7
7
8
8
## Introduction
9
9
10
-
Studio Pro extensions can be developed using TypeScript and use standard web development technologies to extend the Studio Pro development environment. This guide shows you how to set up a basic development environment for building an extension using the web extensibility API.
10
+
Studio Pro extensions can be developed using TypeScript and use standard web development technologies to extend the Studio Pro development environment. This document describes how to set up a basic development environment for building an extension using the web extensibility API.
11
11
12
12
For more detailed information, see the [Mendix Studio Pro Web Extensibility API reference documentation](http://apidocs.rnd.mendix.com/11/extensions-api/index.html).
13
13
@@ -16,11 +16,11 @@ For more detailed information, see the [Mendix Studio Pro Web Extensibility API
16
16
You will need the following prerequisites:
17
17
18
18
*[Mendix Studio Pro](https://marketplace.mendix.com/link/studiopro) version 11.2.0 or higher.
19
-
* A development IDE to develop your extensions. We recommend using [Visual Studio Code](https://code.visualstudio.com/).
20
-
*Install the latest version 22.x.x of Node: https://nodejs.org/en/download.
19
+
* A development IDE to develop your extensions. Mendix recommends using [Visual Studio Code](https://code.visualstudio.com/).
20
+
*The latest version 22.x.x of Node: https://nodejs.org/en/download.
21
21
22
22
{{% alert color="info" %}}
23
-
Extensions can be built on any operating system as the underlying framework is cross-platform.
23
+
Extensions can be built on any operating system, as the underlying framework is cross-platform.
24
24
{{% /alert %}}
25
25
26
26
{{% alert color="info" %}}
@@ -35,28 +35,26 @@ This section will show you how to build and test an extension.
35
35
36
36
Create a new app using the **Blank Web App** template.
37
37
38
-
{{% alert color="info" %}}
39
38
You can also open the application directory containing the application `.mpr` file by clicking the **App** menu > **Show App Directory in Explorer** (or **Show App Directory in Finder**) in Studio Pro.
40
-
{{% /alert %}}
41
39
42
40
### Creating the Extension
43
41
44
-
To accelerate your extension development, we provide an extension generator that creates a customizable sample extension.
42
+
To accelerate your extension development, Mendix provides an extension generator that creates a customizable sample extension.
45
43
46
44
To use the generator, navigate to your desired source code directory and run the command `npm create @mendix/extension`. You may be prompted by `npm` to grant permission to install the generator. After installation, you will be guided through a series of questions to help configure your extension.
47
45
48
46
You will be asked the following:
49
47
50
-
* Select the programming language (TypeScript is used in our tutorials)
48
+
* Select the programming language (TypeScript is used in the tutorials)
51
49
* Specify the extension name
52
-
* Choose if you will use React for the extension’s UI
50
+
* Choose if you will use React for the extension’s UI
53
51
54
-
The next two questions, while optional, are highly recommended, as they enable direct debugging and deployment from Visual Studio Code.
52
+
The next two questions, while optional, are highly recommended, as they enable direct debugging and deployment from Visual Studio Code:
55
53
56
54
* Specify the path to the Studio Pro executable (this allows Visual Studio Code to automatically attach to Studio Pro for debugging)
57
-
* Specify the location of the application `.mpr` package. (This allows for automatic deployment of your extension build to your app)
55
+
* Specify the location of the application `.mpr` package (this allows for automatic deployment of your extension build to your app)
58
56
59
-
The final question allows you to select the Studio Pro version you are targeting; we recommend you choose version 11.
57
+
The last question allows you to select the Studio Pro version you are targeting; Mendix recommends choosing version 11.
60
58
61
59
{{% alert color="info" %}}
62
60
On a Windows machine, the Studio Pro executable is typically located at `C:\Program Files\Mendix\<version>\modeler\studiopro.exe`. To find the exact path, follow these steps:
@@ -155,17 +153,8 @@ If the last two questions of the extension generator were answered and you have
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/app-explorer-api.md
This how-to describes how to interact with the App Explorer in Studio Pro.
9
+
This how-to describes how to interact with the App Explorer in Studio Pro. In this example, you create a menu which will show for each microflow in the App Explorer.
10
10
11
11
## Prerequisites
12
12
13
-
This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Please complete that how-to before starting this one. You should also be familiar with command registration as described in [Register a Command Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/command-api/).
13
+
Before starting this how-to, make sure you have completed the following prerequisites:
14
+
15
+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
16
+
* Make sure you are familiar with command registration, as described in [Register a Command Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/command-api/).
14
17
15
18
## Creating a Context Menu
16
19
17
-
In this example, you will create a menu which will show for each microflow in the App Explorer. Use the full name of the document type to specify which type of document a menu should belong to (for example, `Microflows$Microflow` for microflows or `Pages$Page` for pages). The documentation for these document type names can be found at [Access a Mendix Model Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/model-api/).
20
+
{{% alert color="info" %}}
21
+
Use the full name of the document type to specify which type of document a menu should belong to (for example, `Microflows$Microflow` for microflows or `Pages$Page` for pages). For more information about these document type names, see [Access a Mendix Model Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/model-api/).
22
+
{{% /alert %}}
18
23
19
24
The code below does the following:
20
25
@@ -55,12 +60,8 @@ The payload of the command must be an object containing a document Id (`{ docume
55
60
The command must be registered before creating the menu.
56
61
{{% /alert %}}
57
62
58
-
## Conclusion
59
-
60
-
You have seen how to create context menus for a document node in the App Explorer. The menu executes a previously registered command.
61
-
62
63
## Extensibility Feedback
63
64
64
-
If you would like to provide us with additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
65
+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/command-api.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,24 +10,23 @@ This how-to describes how to register a command in Studio Pro from an extension.
10
10
11
11
## Prerequisites
12
12
13
-
This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Please complete that how-to before starting this one. You should also be familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
13
+
Before starting this how-to, make sure you have completed the following prerequisites:
14
+
15
+
* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
16
+
* Make sure you are familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
14
17
15
18
## Register Commands
16
19
17
-
The Commands API allows users to register a reusable command. These commands can be attached to menus and context menus. At this time, two APIs make use of this feature:
20
+
The Commands API allows you to register a reusable command that can be attached to menus and context menus. At this time, two APIs support this feature:
*[App Explorer API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/app-explorer-api/)
21
24
22
-
To register commands, you can call the Commands API `registerCommand`.
23
-
24
-
In the sample code below, we register a command, then attach it to a menu by setting the property `commandId` to the `Menu` object.
25
+
## Using `registerCommand` API
25
26
26
-
{{% alert color="info" %}}
27
-
The `registerCommand` requires a generic type for the command payload once executed. For standalone menus that have a command without payload, you can register it with `<void>`. When using `void`, the generic type declaration can also be left out (for example, `registerCommand<void>(commandId...)` becomes `registerCommand(commandId...)`).
28
-
{{% /alert %}}
27
+
To register commands, use the Commands API `registerCommand`.
29
28
30
-
For commands that require payload, you must make sure you register the command with the exact expected payload object type. See the [App Explorer API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/app-explorer-api/) and [Documents API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/documents-api/) documentation for clear examples.
29
+
In the sample code below, we register a command, then attach it to a menu by setting the property `commandId` to the `Menu` object.
It is also possible to create a context menu that belongs to a document in the App Explorer or a document editor, and that menu can have a registered command attached to it. To do so, you can use the [App Explorer API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/app-explorer-api/) or the [Documents API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/documents-api/).
57
+
## Payloads
58
+
59
+
The `registerCommand` requires a generic type for the command payload once executed.
60
+
61
+
* For commands without payload, use `<void>`. When using `void`, the generic type declaration can also be left out (for example, `registerCommand<void>(commandId...)` becomes `registerCommand(commandId...)`).
62
+
* For commands that require payload, make sure the payload type matches the expected structure.
59
63
60
-
The command registration for commands that interact with documents are slightly different. They require a payload of type `{ documentId: string }`; the backend will return the menu when it is clicked. The `documentId` is the id of the exact document that was interacted with by the menu.
64
+
See the [App Explorer API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/app-explorer-api/) and [Documents API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/documents-api/) documentation for examples.
65
+
66
+
## Context Menu Integration
61
67
62
68
{{% alert color="info" %}}
63
69
The command must be registered before creating any menus that might be attached to it.
64
70
{{% /alert %}}
65
71
66
-
## Conclusion
72
+
You can attach registered commands to context menus in:
73
+
74
+
*[App Explorer API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/app-explorer-api/)
You have seen how to register commands that can be attached to menus in Studio Pro.
77
+
The command registration for commands that interact with documents require a payload of type `{ documentId: string }`. The `documentId` is the id of the exact document that was interacted with by the menu. The backend will return the menu when it is clicked.
69
78
70
79
## Extensibility Feedback
71
80
72
-
If you would like to provide us with additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
81
+
If you would like to provide additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
0 commit comments