Skip to content

Commit 73bd0e2

Browse files
committed
Merge branch 'development'
2 parents 68206e1 + 5c87ccc commit 73bd0e2

766 files changed

Lines changed: 3142 additions & 1117 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ When you clone the repo, keep the following in mind:
2525

2626
#### Installing Dependencies
2727

28-
1. Download and install the LTS version of [Node.js](https://nodejs.org/en/download/).
28+
1. Download and install the LTS version of [Node.js](https://nodejs.org/en/download/prebuilt-installer).
2929
1. In a terminal at the root of the repository, run `npm install`.
3030

3131
### Running the Server

content/en/docs/apidocs-mxsdk/apidocs/build-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ An object with the following key-value pairs:
141141
* Uploading
142142
* Failed
143143
* *Size* (Long) : Size of the package in bytes
144-
* *Url* (object): A json object containing the following:
144+
* *Url* (object): A JSON object containing the following:
145145

146146
* *Location* (String): The URL pointing to the package file.
147147
* *TTL* (Long): How long the URL is valid (in seconds).

content/en/docs/apidocs-mxsdk/apidocs/deploy-api-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ Content-Disposition: form-data;
607607
--MultipartBoundary--
608608
```
609609

610-
Curl example:
610+
curl example:
611611

612612
```bash
613613
curl -v -F "file=@%USERPROFILE%/Documents/Mendix/calc-main/releases/calc_1.0.0.45.mda" -X POST -H "Mendix-Username: richard.ford51@example.com" -H "Mendix-ApiKey: 26587896-1cef-4483-accf-ad304e2673d6" "https://deploy.mendix.com/api/1/apps/calc/packages/upload?name=calc_1.0.0.45.mda"

content/en/docs/apidocs-mxsdk/apidocs/deploy-api-2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Content-Disposition: form-data;
7070
--MultipartBoundary--
7171
```
7272

73-
Curl example:
73+
curl example:
7474

7575
```bash
7676
curl -v -F "file=@%USERPROFILE%/Documents/Mendix/calc-main/releases/calc_1.0.0.45.mda" -X POST -H "Mendix-Username: richard.ford51@example.com" -H "Mendix-ApiKey: 26587896-1cef-4483-accf-ad304e2673d6" "https://deploy.mendix.com/api/v2/apps/calc/packages/upload?name=calc_1.0.0.45.mda"

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/add-menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ weight: 15
88

99
This how-to describes how you can add a menu that contains submenus, some of which also contain submenus of their own. Before you start this how-to, it is recommended to [create a menu extension](/apidocs-mxsdk/apidocs/extensibility-api/create-menu-extension/) first.
1010

11-
You can download the example in this how-to in [this Github repository](https://github.com/mendix/ExtensionAPI-Samples).
11+
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples).
1212

1313
## 2 Creating Menu Extension Class
1414

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/build-todo-example-extension.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ In this section, you will add a view model to store our view data:
198198
using Mendix.StudioPro.ExtensionsAPI.UI.WebView;
199199

200200
namespace Mendix.ToDoExtension;
201-
{
202-
public class ToDoListDockablePaneViewModel : WebViewDockablePaneViewModel
201+
202+
public class ToDoListDockablePaneViewModel : WebViewDockablePaneViewModel {
203203

204204
private readonly Uri _baseUri;
205205
private readonly Func<IModel?> _getCurrentApp;
@@ -551,34 +551,35 @@ You also need to handle loading and saving of the todo data.
551551

552552
In this section, you will add a menu item to the toolbar that will allow you to select the ToDo list from a menu item.
553553

554-
1. Create a `MenuBarExtension`.
555-
2. Add another class and call it `ToDoListMenuBarExtension.cs`.
554+
1. Create a `MenuExtension`.
555+
2. Add another class and call it `ToDoListMenuExtension.cs`.
556556
3. Replace the contents of the file with the following code:
557557

558558
```csharp
559-
using System.ComponentModel.Composition;
560-
using Mendix.StudioPro.ExtensionsAPI.UI.Menu;
561-
using Mendix.StudioPro.ExtensionsAPI.UI.Services;
562-
563-
namespace Mendix.ToDoExtension;
564-
565-
[Export(typeof(MenuBarExtension))]
566-
public class ToDoListMenuBarExtension : MenuBarExtension
559+
using System.Collections.Generic;
560+
using System.ComponentModel.Composition;
561+
using Mendix.StudioPro.ExtensionsAPI.UI.DockablePane;
562+
using Mendix.StudioPro.ExtensionsAPI.UI.Menu;
563+
using Mendix.StudioPro.ExtensionsAPI.UI.Services;
564+
565+
namespace Mendix.ToDoExtension;
566+
567+
[Export(typeof(Mendix.StudioPro.ExtensionsAPI.UI.Menu.MenuExtension))]
568+
public class ToDoListMenuBarExtension : MenuExtension
569+
{
570+
private readonly IDockingWindowService _dockingWindowService;
571+
572+
[ImportingConstructor]
573+
public ToDoListMenuBarExtension(IDockingWindowService dockingWindowService)
567574
{
568-
private readonly IDockingWindowService _dockingWindowService;
569-
570-
[ImportingConstructor]
571-
public ToDoListMenuBarExtension(IDockingWindowService dockingWindowService)
572-
{
573-
_dockingWindowService = dockingWindowService;
574-
}
575-
576-
public override IEnumerable<MenuViewModelBase> GetMenus()
577-
{
578-
yield return new MenuItemViewModel("To Do List", new[] { "View" }, "Stories")
579-
{ Action = () => _dockingWindowService.OpenPane(ToDoListDockablePaneExtension.PaneId) };
580-
}
575+
_dockingWindowService = dockingWindowService;
581576
}
577+
578+
public override IEnumerable<MenuViewModel> GetMenus()
579+
{
580+
yield return new MenuViewModel("To Do List", () => _dockingWindowService.OpenPane(ToDoListDockablePaneExtension.PaneId));
581+
}
582+
}
582583
```
583584

584585
## 9 Adding a Web-based User Interface
@@ -591,7 +592,7 @@ Up to now you have been adding all the logic that will allow your extension to r
591592
2. In the folder, add two files:
592593

593594
* A HTML page that contains the layout of the user interface. Call it `index.html`
594-
* A Javascript file that contains the client side logic for the user interface. Call it `main.js`
595+
* A JavaScript file that contains the client side logic for the user interface. Call it `main.js`
595596

596597
3. Open `index.html`.
597598
4. Replace its contents with the following:
@@ -640,7 +641,7 @@ Up to now you have been adding all the logic that will allow your extension to r
640641
</html>
641642
```
642643

643-
5. Open `main.js` and add the Javascript logic by replacing the contents of the file with the following:
644+
5. Open `main.js` and add the JavaScript logic by replacing the contents of the file with the following:
644645

645646
```js
646647
function postMessage(message, data) {
@@ -716,7 +717,7 @@ Up to now you have been adding all the logic that will allow your extension to r
716717

717718
This HTML page is self-explanatory, as you are providing a very simple interface with some added css styling provided by Tailwind CSS.
718719

719-
Within the Javascript file, you need to add some logic so that the web view can communicate with your extension logic correctly.
720+
Within the JavaScript file, you need to add some logic so that the web view can communicate with your extension logic correctly.
720721

721722
You add a small helper function to simplify the call to the browser API:
722723

@@ -726,7 +727,7 @@ function postMessage(message, data) {
726727
}
727728
```
728729

729-
You also need to perform some initialization to ensure that you can respond to messages send to javascript and
730+
You also need to perform some initialization to ensure that you can respond to messages send to JavaScript and
730731

731732
```javascript
732733
// Register message handler.
@@ -746,7 +747,7 @@ It is important to set these two `index.html` and `main.js` files to *Copy alway
746747

747748
## 10 Setting up Communication Between the User Interface and Extension {#set-up-communication}
748749

749-
So far you have configured the extension to be usable in Studio Pro. You added support for storing the to do items. You also added a user interface that users can interact with. The last step in this process is to link the extension c# logic with the web based javascript logic.
750+
So far you have configured the extension to be usable in Studio Pro. You added support for storing the to do items. You also added a user interface that users can interact with. The last step in this process is to link the extension c# logic with the web-based JavaScript logic.
750751

751752
1. Start with adding a utility class to help simplify the way you interact with web responses. Call the file `HttpListenerResponseUtils.cs`.
752753
2. Replace the contents of the file with the following:

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/create-context-menu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ It is possible to add a context menu to an `IEntity` in Studio Pro or to a `IDoc
1010

1111
This how-to describes how you can add a context menu to an entity. Before you start this how-to, it is recommended to [create a menu extension](/apidocs-mxsdk/apidocs/extensibility-api/create-menu-extension/) first.
1212

13-
You can download the example in this how-to in [this Github repository](https://github.com/mendix/ExtensionAPI-Samples).
13+
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples).
1414

1515
## 2 Creating an Entity Context Menu Extension Class
1616

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/create-dockable-pane.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ weight: 5
88

99
This how-to describes how you can add a custom dockable web pane window to Studio Pro. Before you start this how-to, it is recommended to [create a menu extension](/apidocs-mxsdk/apidocs/extensibility-api/create-menu-extension/) first.
1010

11-
You can download the example in this how-to in [this Github repository](https://github.com/mendix/ExtensionAPI-Samples).
11+
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples).
1212

1313
## 2 Creating a Dockable Pane Extension Class
1414

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/create-menu-extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can download the example in this how-to in [this GitHub repository](https://
1414

1515
1. Create a new project in Visual Studio based on `C# Class Library` template.
1616
2. Choose a name for the project. Use a format similar to `MyCompany.MyProject.MendixExtension`, but it is not a hard requirement.
17-
3. Choose `.NET 6.0` Framework.
17+
3. Choose `.NET 8.0` Framework.
1818
4. Add `Mendix.StudioPro.ExtensionsAPI` NuGet package to the project references. Pick the version that does not exceed the Studio Pro version you installed. To do so, perform the following steps:
1919
1. Include a reference to the Extensions API [NuGet package](https://www.nuget.org/packages/Mendix.StudioPro.ExtensionsAPI):
2020
2. Add new file named `manifest.json` to your project. Put the following content into it:

content/en/docs/apidocs-mxsdk/apidocs/extensibility-api/extensibility-api-howtos/create-modal-web-view.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ weight: 7
88

99
This how-to describes how you can create a new web view hosted inside a modal dialog. You will then open the modal from a new menu item.
1010

11-
You can download the example in this how-to in [this Github repository](https://github.com/mendix/ExtensionAPI-Samples)
11+
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples)
1212

1313
## 2 Adding a View Model for Your New Modal
1414

0 commit comments

Comments
 (0)