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/tab-api.md
This how-to describes how to open a tab in Studio Pro from an extension. This tab will contain your web content.
9
+
This document describes how to open a tab in Studio Pro from an extension that contains your web content.
10
10
11
11
## Prerequisites
12
12
13
-
{{% 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
-
{{% /alert%}}
13
+
{{% alert color="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, 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
+
{{% /alert%}}
16
16
17
17
Before starting this how-to, make sure you have completed the following prerequisites:
18
18
19
-
* 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.
20
-
*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/).
19
+
* This document uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that document before starting this one.
20
+
*Familiarize yourself with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
21
21
22
22
## Opening a Tab
23
23
24
-
Create a menu item to open the tab. This is done inside the `loaded` method in `Main` class, as described below. For more information, see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
24
+
Create a menu item to open the tabinside the `loaded` method in the`Main` class, as described below. For more information, see [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
25
25
26
-
In a listener event called `menuItemActivated` the `studioPro.ui.tabs.open(<tabinfo>, <uispec>)` call opens a new tab where:
26
+
In a listener event called `menuItemActivated`, the `studioPro.ui.tabs.open(<tabinfo>, <uispec>)` call opens a new tab where:
27
27
28
-
*`<TabInfo>` is an object containing the `title` of the tab, which will be shown in the title bar of your tab in Studio Pro.
28
+
*`<TabInfo>` is an object containing the `title` of the tab, which appears in the title bar of your tab in Studio Pro
29
29
*`<uispec>` is an object containing two required properties:
30
30
31
-
*`componentName` – the name of the extension prefixed with "extension/"; for example, "extension/myextension" in the following example
31
+
*`componentName` – the name of the extension prefixed with "extension/" (for example, "extension/myextension")
32
32
*`uiEntryPoint` – the name mapped from the `manifest.json` file
33
33
34
34
{{% alert color="info" %}}
35
-
Whenever the tabs API `open` method is called, the `TabHandle` returned must be tracked by the extension so that it can be closed later by calling the `close` method.
35
+
Track the `TabHandle` returned when you call the tabs API `open` method so you can close it later by calling the `close` method.
36
36
{{% /alert %}}
37
37
38
38
To open a tab called **My Extension Tab**, add the following code to the main entry point (`src/main/index.ts`):
@@ -91,7 +91,7 @@ In this example, there is a dictionary that uses the parent menu id as the key t
91
91
92
92
In the previous example, the `uiEntryPoint` property of the `<uispec>` object had the value `tab`. This value must match the one from the manifest.
93
93
94
-
If you want multiple tabs in your extension, you need to structure the folders and set up the manifest file correctly. To do this, follow these steps:
94
+
To add multiple tabs in your extension, structure the folders and set up the manifest file correctly. Follow these steps:
95
95
96
96
1. Add a new method `createTabSpec` in your `Main` class.
97
97
@@ -107,7 +107,7 @@ If you want multiple tabs in your extension, you need to structure the folders a
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/version-control-api.md
This how-to describes how to display version control information in Studio Pro. The extension adds a menu item that, when clicked, shows details about the current version control system, branch, and last commit.
9
+
This document describes how to display version control information in Studio Pro. The extension adds a menu item thatshows details about the current version control system, branch, and last commit when clicked.
10
10
11
11
## Prerequisites
12
12
13
-
{{% alert="info" %}}
13
+
{{% alert color="info" %}}
14
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
-
{{% /alert%}}
15
+
{{% /alert%}}
16
16
17
17
Before starting this how-to, make sure you have completed the following prerequisites:
18
18
@@ -21,19 +21,19 @@ Before starting this how-to, make sure you have completed the following prerequi
21
21
22
22
## Showing Version Control Information
23
23
24
-
The extension creates a menu item named **Current version control system**. When the menu is activated, it fetches version control details (system type, branch, last commit) and displays them in a message box.
24
+
The extension creates a menu item named **Current version control system**. When you activate the menu, it fetches version control details (system type, branch, last commit) and displays them in a message box.
25
25
26
26
### Set Up the Extension Structure
27
27
28
-
In the example below, you create one menu item that will show version control details in a message box.
28
+
In the example below, you create one menu item that shows version control details in a message box.
29
29
30
-
It performs the following actions:
30
+
The extension performs the following actions:
31
31
32
32
1. Creates a menu item named **Current version control system**
33
-
2. When clicked, it retrieves the version control information which includes:
34
-
* The type of version control system (for example, Git)
35
-
* Current branch name
36
-
* Last commit details (SHA, author, message, and date)
33
+
2. When clicked, retrieves version control information, including the following:
34
+
* The type of version control system (for example, Git)
35
+
* Current branch name
36
+
* Last commit details (SHA, author, message, and date)
37
37
3. Displays this information in a message box
38
38
39
39
Replace your `src/main/index.ts` file with the following:
0 commit comments