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
6
---
6
7
7
8
## Introduction
8
9
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
+
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
11
11
12
## Prerequisites
12
13
13
14
{{% alert="info" %}}
14
-
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/).
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/).
15
16
{{% /alert%}}
16
17
17
-
Before starting this how-to, make sure you have completed the following prerequisites:
18
+
Before starting this how-to, complete the following prerequisites:
18
19
19
20
* Review [how menus work](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu/) in the Web Extensibility API
20
21
* 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.
@@ -25,7 +26,7 @@ Before starting this how-to, make sure you have completed the following prerequi
25
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/).
26
27
{{% /alert %}}
27
28
28
-
The code below uses the `appExplorer` API's`addContextMenu` method to add the menu to all `Microflow` document nodes. When this menu is clicked, the document's 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 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.
The `DocumentContext` payload for the menu action is an object containing a document Id (`{ documentId: string }`). When creating a menu for the `appExplorer`'s`addContextMenu` method, the `DocumentContext`should be used as the context of your menu. The `documentId`will be 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 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
58
58
-
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 it is not used, the menu will not receive the clicked document's ID.
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.
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
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@
2
2
title: "Register New Document Types With a Corresponding Editor"
description: "Describes how to introduce a new document type and set up a custom editor that allows users to edit documents of that type."
5
6
---
6
7
7
8
## Introduction
8
9
9
-
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.
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
11
11
12
## Prerequisites
12
13
@@ -16,13 +17,13 @@ Before starting this how-to, make sure you have completed the following prerequi
16
17
17
18
## Custom Document Model
18
19
19
-
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. If you register an editor (a user-defined UI component) for a specific document type, documents of that type will be displayed in the UI alongside any other built-in document type, such as constants, Java Actions, and pages. Specifically, they will appear in the **New Document** and **Find Advanced** dialogs, context menus for adding documents, the App Explorer, and other UI elements that show Studio Pro documents. You can register custom editors to appear either as tabs or as modal dialogs.
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.
20
21
21
22
## Registering a New Document Type
22
23
23
-
To register a new document type, follow the steps below:
24
+
To register a new document type, follow these steps:
24
25
25
-
1. Generate a new extension named `myextension` as described in the [Get Started](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/) guide.
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/).
26
27
2. Replace the contents of `src/main/index.ts` with the code below:
27
28
28
29
```typescript {hl_lines=["8-24"]}
@@ -244,30 +245,31 @@ To register a new document type, follow the steps below:
244
245
245
246
### RegistertheDocumentType
246
247
247
-
In`src/main/index.ts`, youbeginbyregisteringanewdocumenttype. Onceregistered, youcanperformallCRUDoperationsonit. However, itwillnotappearintheUIuntilaneditorisalsoregistered.
248
+
In`src/main/index.ts`, youregisteranewdocumenttype. Afteryouregisterthedocumenttype, youcanperformallCRUDoperationsonit. However, thedocumenttypedoesnot appear in the UI until you also register an editor.
248
249
249
-
Optionally, youcanprovidea`readableTypeName`todisplayauser-friendlynameinlogsandtheStudioProUIinsteadofthefulltypename. You can also customize serialization of the document contents to a string. By default, the API uses `JSON.stringify` for serialization and `JSON.parse` for deserialization.
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.
0 commit comments