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/web/web-extensions-howtos/app-explorer-api.md
description: "Describes how to interact with the App Explorer in Studio Pro by creating a context menu for microflows."
5
+
description: "Describes how to use the App Explorer API in Studio Pro to create a context menu for microflows."
6
6
---
7
7
8
8
## Introduction
9
9
10
-
This how-to describes how to interact with the App Explorer in Studio Pro. In this example, you create a menu that displays for each microflow in the App Explorer.
10
+
This how-to describes how to interact with the App Explorer in Studio Pro. In this example, you create a context menu that displays for each microflow in the App Explorer.
11
11
12
12
## Prerequisites
13
13
14
-
{{% alert="info" %}}
14
+
{{% alert color="info" %}}
15
15
If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/).
16
-
{{% /alert%}}
16
+
{{% /alert%}}
17
17
18
18
Before starting this how-to, complete the following prerequisites:
19
19
@@ -26,7 +26,7 @@ Before starting this how-to, complete the following prerequisites:
26
26
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/).
27
27
{{% /alert %}}
28
28
29
-
The code below uses the `appExplorer` API `addContextMenu` method to add the menu to all `Microflow` document nodes. When you click this menu, the document ID is sent as an argument through the `DocumentContext` argument parameter of the menu.
29
+
The code below uses the `appExplorer` API `addContextMenu` method to add the context menu to all `Microflow` document nodes. When you click this menu, the document ID is sent as an argument through the `DocumentContext` argument parameter.
The `DocumentContext` payload for the menu action is an object containing a document ID (`{ documentId: string }`). When you create a menu for the `appExplorer``addContextMenu` method, use the `DocumentContext` as the context of your menu. The `documentId` is the ID of the document the menu is attached to (in this example, the exact`Microflow` node in the App Explorer).
57
+
The `DocumentContext` payload for the menu action is an object containing a document ID (`{ documentId: string }`). When you create a menu for the `appExplorer``addContextMenu` method, use `DocumentContext` as the context of your menu. The `documentId` is the ID of the document the menu is attached to (in this example, the specific`Microflow` node in the App Explorer).
58
58
59
-
As explained in the [menu documentation](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/), the `DocumentContext` is not necessary to add your menu to Studio Pro. However, if you do not use it, the menu will not receive the clicked document ID.
59
+
As explained in the [menu documentation](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/), `DocumentContext` is not required to add your menu to Studio Pro. However, if you do not use it, the menu will not receive the clicked document ID.
60
60
61
61
## Extensibility Feedback
62
62
63
-
If you would like to provide additional feedback, you can complete a small[survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
63
+
If you would like to provide additional feedback, you can complete a short[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/custom-blob-document-api.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,21 +7,21 @@ description: "Describes how to introduce a new document type and set up a custom
7
7
8
8
## Introduction
9
9
10
-
This how-to describes how to introduce a new document type and set up a custom editor for users to edit documents of that type.
10
+
This how-to describes how to introduce a new document type and set up a custom editor that allows users to edit documents of that type.
11
11
12
12
## Prerequisites
13
13
14
14
Before starting this how-to, make sure you have completed the following prerequisites:
15
15
16
-
*[Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/).
16
+
*[Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/)
17
17
18
18
## Custom Document Model
19
19
20
20
Studio Pro allows you to extend its metamodel by adding custom document types. These documents can store arbitrary data that can be serialized as strings. When you register an editor (a user-defined UI component) for a specific document type, documents of that type appear in the UI alongside built-in document types such as constants, Java actions, and pages. They appear in the **New Document** and **Find Advanced** dialogs, context menus for adding documents, the App Explorer, and other UI elements that display Studio Pro documents. You can register custom editors to appear as tabs or as modal dialogs.
21
21
22
22
## Registering a New Document Type
23
23
24
-
To register a new document type, follow these steps:
24
+
To register a new document type, do the following:
25
25
26
26
1. Generate a new extension named `myextension` as described in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/).
27
27
2. Replace the contents of `src/main/index.ts` with the code below:
@@ -64,7 +64,7 @@ To register a new document type, follow these steps:
@@ -245,13 +245,13 @@ To register a new document type, follow these steps:
245
245
246
246
### RegistertheDocumentType
247
247
248
-
In`src/main/index.ts`, youregisteranewdocumenttype. Afteryouregisterthedocumenttype, youcanperformallCRUDoperationsonit. However, thedocumenttypedoes not appear in the UI until you also register an editor.
248
+
In`src/main/index.ts`, youregisteranewdocumenttype. Afteryouregisterthedocumenttype, youcanperformallcreate, read, update, anddelete (CRUD)operationsonit. However, thedocumenttypedoes not appear in the UI until you also register an editor.
249
249
250
250
Optionally, youcanprovidea`readableTypeName`todisplayauser-friendlynameinlogsandtheStudioProUIinsteadofthefulltypename. You can also customize how the document contents serialize to a string. By default, the API uses `JSON.stringify` for serialization and `JSON.parse` for deserialization.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dialog-api.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ It also describes how to show a progress dialog that follows a sequence of steps
12
12
13
13
## Prerequisites
14
14
15
-
{{% alert="info" %}}
15
+
{{% alert color="info" %}}
16
16
If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to the Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/).
17
-
{{% /alert%}}
17
+
{{% /alert%}}
18
18
19
19
Before starting this how-to, complete the following prerequisites:
20
20
@@ -23,11 +23,11 @@ Before starting this how-to, complete the following prerequisites:
23
23
24
24
## Opening a Modal Dialog
25
25
26
-
Create a menu item to open the dialog inside the `loaded` event in the main entry point (`src/main/index.ts`). For more information, see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
26
+
To open a modal dialog, create a menu item inside the `loaded` event in the main entry point (`src/main/index.ts`). For more information, see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
27
27
28
-
In a listener event called `menuItemActivated`, the`studioPro.ui.dialogs.showModal(<dialogInfo>, <uiSpec>)`call opens a new dialog. The parameters are:
28
+
In the `menuItemActivated` listener event, call`studioPro.ui.dialogs.showModal(<dialogInfo>, <uiSpec>)`to open a new dialog. The parameters are:
29
29
30
-
*`<dialogInfo>` – An object containing the `title` of the dialog, which is shown in the title bar of your dialog in Studio Pro. It also contains the `contentSize` object, where you can provide `height` and `width` dimensions for the dialog.
30
+
*`<dialogInfo>` – An object containing the `title` of the dialog (shown in the title bar of your dialog in Studio Pro) and the `contentSize` object, where you can provide `height` and `width` dimensions for the dialog.
31
31
*`<uiSpec>` – An object containing two required properties and one optional property:
32
32
33
33
*`componentName` – The name of the extension prefixed with `extension/`. For example, `extension/myextension`.
@@ -40,7 +40,7 @@ When the `showModal` method is called, it returns a `Promise` of `unknown` or `n
40
40
In the example below, the dialog contains a form where an object is modified and then returned when the dialog closes.
41
41
{{% /alert %}}
42
42
43
-
An example of the main entry point (`src/main/index.ts`) to open a modal dialog called *My Extension Dialog* looks similar to the following:
43
+
The following example shows the main entry point (`src/main/index.ts`) that opens a modal dialog:
In the previous example, the `uiEntryPoint` property of the `<uispec>` object has the value `dialog`. This value must match the one in the manifest. The following example shows the dialog under the `ui` property:
80
80
@@ -197,8 +197,7 @@ In the previous example, the `uiEntryPoint` property of the `<uispec>` object ha
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dockable-pane-api.md
description: "Describes how to create and manage a dockable pane using the web extensions API in Studio Pro."
5
6
---
6
7
7
8
## Introduction
8
9
9
-
This how-to describes creating and managing a dockable pane using the web extensions API. A dockable pane is a web view that can be docked and moved within the Studio Pro user interface. Examples of dockable panes in Studio Pro include the following:
10
+
This how-to describes how to create and manage a dockable pane using the web extensions API. A dockable pane is a web view that can be docked and moved within Studio Pro. Examples of dockable panes in Studio Pro include the following:
10
11
11
12
* Marketplace
12
13
* Errors
@@ -15,12 +16,12 @@ This how-to describes creating and managing a dockable pane using the web extens
15
16
16
17
## Prerequisites
17
18
18
-
{{% alert="info" %}}
19
+
{{% alert color="info" %}}
19
20
If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to the Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/).
20
-
{{% /alert%}}
21
+
{{% /alert%}}
21
22
22
23
* This how-to uses the app created in [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one.
23
-
*Be familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
24
+
*Familiarize yourself with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
24
25
25
26
## Creating a Dockable Pane
26
27
@@ -100,7 +101,7 @@ Alter the `build-extension.mjs` and `manifest.json` files to bind to the correct
100
101
101
102
### Altering `build-extension.mjs`
102
103
103
-
Instruct esbuild to produce JavaScript modules that correspond to `src/ui/tab.tsx` and `src/ui/dockablepane.tsx`. To do this, change the call to `entryPoints.push`in line 16:
104
+
Instruct esbuild to produce JavaScript modules that correspond to `src/ui/tab.tsx` and `src/ui/dockablepane.tsx`. To do this, change the call to `entryPoints.push`on line 16:
104
105
105
106
```typescript
106
107
entryPoints.push({
@@ -157,7 +158,7 @@ else {
157
158
}
158
159
```
159
160
160
-
This ensures esbuild considers these two `.tsx` files as entrypoints and produces JavaScript modules in the `dist` folder corresponding to the name in `out`.
161
+
This ensures that esbuild considers these two `.tsx` files as entry points and produces JavaScript modules in the `dist` folder corresponding to the name in `out`.
161
162
162
163
### Altering `src/manifest.json`
163
164
@@ -285,6 +286,6 @@ The `loaded` method should now look like this:
0 commit comments