Skip to content

Commit 68fa5e9

Browse files
committed
Review
1 parent c962f89 commit 68fa5e9

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

  • content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos/create-menu-extension.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ public class MyMenuExtension(IMessageBoxService messageBoxService) : MenuExtensi
6969

7070
Build your extension and press <kbd>F4</kbd> in Studio Pro. Menu items are placed under a corresponding menu with the extensions name. For example, if your extension is named *My Extension*, your menu items will be located under the **Extensions** > **My Company** sub-menu.
7171

72-
The Extensibility API provides you with several services you can use and they are injected into your extension classes by using the `ImportingConstructor` attribute.
72+
The Extensibility API provides several services you can use and are injected into your extension classes by using the `ImportingConstructor` attribute.
7373

74-
It is also possible to get notified when your extension has been successfully loaded into Studio Pro and also just before it gets unloaded. It is as simple as subscribing to the `ExtensionLoaded` and `ExtensionUnloading` events.
74+
## Subscribing to Extension Events
75+
76+
You can be notified when your extension has been successfully loaded and unloaded from Studio Pro by subscribing to the `ExtensionLoaded` and `ExtensionUnloading` events.
7577

7678
```csharp
7779
using Mendix.StudioPro.ExtensionsAPI.UI.Events;
@@ -92,23 +94,24 @@ public class MyMenuExtension() : MenuExtension
9294

9395
## Debugging Your Extension
9496

95-
1. Make sure that the current version of the extension code is loaded in Studio Pro.
96-
2. Attach to Studio Pro process in Visual Studio debugger as follows:
97-
1. On the **Debug** menu, open the **Attach to Process** dialog box (or press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>P</kbd>).
98-
2. Search for `studiopro.exe` among the processes.
99-
3. Select the only found process (or the one with correct title, if you have many) and select **Attach**.
97+
1. Ensure the latest version of the extension code is loaded in Studio Pro.
98+
2. Attach the Visual Studio debugger to Studio Pro:
99+
1. Go to **Debug** > **Attach to Process** dialog box (or press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>P</kbd>).
100+
2. Search for and select `studiopro.exe`.
101+
3. Click **Attach**.
100102

101-
3. Add a Breakpoint inside `Action` delegate in `MyMenuExtension.GetMenus()`. It will be hit when you click **Extensions** > **MyCompany** > **Say hello** menu item.
103+
3. Add a breakpoint inside the `Action` delegate in `MyMenuExtension.GetMenus()`.
104+
4. Trigger the breakpoint by clicking **Extensions** > **MyCompany** > **Say hello** menu item.
102105

103106
## Adding a NuGet Dependency
104107

105-
You can freely use [NuGet packages](https://www.nuget.org/) from extensions to access reusable .NET libraries. The following one-time additional setup is required:
108+
You can access reusable .NET libraries via [NuGet](https://www.nuget.org/) Follow the steps below for a one-time setup:
106109

107-
1. Open your extension project `.csproj` file by right-clicking **Solution Explorer** > **Edit Project File**.
108-
2. Add the following line into the first `<PropertyGroup>`:
110+
1. In Visual Studio, open your extension project `.csproj` file by right-clicking **Solution Explorer** > **Edit Project File**.
111+
2. Add the following line inside the first `<PropertyGroup>`:
109112

110113
```xml
111114
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
112115
```
113116

114-
Then you can add a NuGet dependency, for example, using the **Manage NuGet Packages** menu.
117+
3. Use the **Manage NuGet Packages** to add a dependency.

0 commit comments

Comments
 (0)