Telerik® JustDecompile™ by Progress

Plugin UI Basics

A plugin can display its own UI elements at a number of predefined, named locations in Justdecompile UI. These locations are called "regions".

JustDecompile uses Prism regions to implement this functionality. Regions can be accessed by a plugin through the Region Manager (IRegionManager) Prism service.

The Region Manager Service

An instance of the Region Manager service is created by the MEF engine when application is started. Plugins can get a reference to this instance by decorating a local variable of type IRegionManager with the Import attribute.

private IRegionManager regionManager;
<Import> _
Private regionManager As IRegionManager

MEF provides an IPartImportsSatisfiedNotification interface that enables implementers to be notified when a part's imports have been satisfied. It contains a single OnImportsSatisfied() method, which is called when a part's imports have been satisfied and it is safe to use.

public class PluginModule : IModule, IPartImportsSatisfiedNotification
        public void OnImportsSatisfied()
            this.regionManager.AddToRegion("AssemblyTreeViewContextMenuRegion", assemblyNodeContextMenu);

<ModuleExport(GetType(PluginModule))> _
Public Class PluginModule
        Implements IModule
        Implements IPartImportsSatisfiedNotification

    Public Sub OnImportsSatisfied()
        Me.regionManager.AddToRegion("AssemblyTreeViewContextMenuRegion", assemblyNodeContextMenu)
    End Sub


End Class

Regions List