Skip to content

Commit 2c6b037

Browse files
committed
Review
1 parent 9d7a991 commit 2c6b037

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/tab-api.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/tab-api/
66

77
## Introduction
88

9-
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.
1010

1111
## Prerequisites
1212

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 %}}
1616

1717
Before starting this how-to, make sure you have completed the following prerequisites:
1818

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/).
2121

2222
## Opening a Tab
2323

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 tab inside 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/).
2525

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:
2727

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
2929
* `<uispec>` is an object containing two required properties:
3030

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")
3232
* `uiEntryPoint` – the name mapped from the `manifest.json` file
3333

3434
{{% 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.
3636
{{% /alert %}}
3737

3838
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
9191

9292
In the previous example, the `uiEntryPoint` property of the `<uispec>` object had the value `tab`. This value must match the one from the manifest.
9393

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:
9595

9696
1. Add a new method `createTabSpec` in your `Main` class.
9797

@@ -107,7 +107,7 @@ If you want multiple tabs in your extension, you need to structure the folders a
107107
}
108108
```
109109

110-
2. Add three folders inside the `ui` folder, one for each tab you want to display contents for.
110+
2. Add three folders inside the `ui` folder, one for each tab you want to display content for.
111111
3. Create an `index.tsx` file in each folder.
112112
4. Put the following code in each `index.tsx` file (this example is for **tab3**):
113113

@@ -129,7 +129,7 @@ If you want multiple tabs in your extension, you need to structure the folders a
129129

130130
In this example, you will add three tabs: **tab1**, **tab2**, and **tab3**.
131131

132-
{{< figure src="/attachments/apidocs-mxsdk/apidocs/extensibility-api/web/tabs/ui_folder_structure.png" width="200" >}}
132+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/extensibility-api/web/tabs/ui_folder_structure.png" alt="" width="200" >}}
133133

134134
5. Create listener events in the `Main` class to open each of the three tabs. The `Main` class will then look like this:
135135

@@ -204,7 +204,7 @@ If you want multiple tabs in your extension, you need to structure the folders a
204204
}
205205
```
206206

207-
7. Update `build-extension.mjs` to match the manifest with an entry for each tab. Add entry points for each tab to the `entryPoints` array and make sure the variable `appDir` stays unaltered, as follows:
207+
7. Update `build-extension.mjs` to match the manifest with an entry for each tab. Add entry points for each tab to the `entryPoints` array and ensure the `appDir` variable stays unaltered, as follows:
208208

209209
```javascript{hl_lines=["16-20"]}
210210
import * as esbuild from 'esbuild'

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/version-control-api.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/version-control-api/
66

77
## Introduction
88

9-
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 that shows details about the current version control system, branch, and last commit when clicked.
1010

1111
## Prerequisites
1212

13-
{{% alert="info" %}}
13+
{{% alert color="info" %}}
1414
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 %}}
1616

1717
Before starting this how-to, make sure you have completed the following prerequisites:
1818

@@ -21,19 +21,19 @@ Before starting this how-to, make sure you have completed the following prerequi
2121

2222
## Showing Version Control Information
2323

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.
2525

2626
### Set Up the Extension Structure
2727

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.
2929

30-
It performs the following actions:
30+
The extension performs the following actions:
3131

3232
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)
3737
3. Displays this information in a message box
3838

3939
Replace your `src/main/index.ts` file with the following:

0 commit comments

Comments
 (0)