Plugin Development: All plugin builds fail to install with 'X must inherit from Sdl.Desktop.IntegrationApi.AbstractRibbonGroup' - Seeking Advice

 


Have tried multiple different plugins both private and public. Has there been any change to Trados 2022 that is modifying RibbonGroup API?

Example Community Plugin I even tried: Sdl-Community/WordCloudRibbonGroup.cs at ebfe90a70d07289128cd75e73f579dad3f00247c · RWS/Sdl-Community (github.com)

If I try to compile this, install, and launch Trados 2022, I end up with the same error everytime. Even starting a new, blank template with the most basic setup for configuring a RibbonGroup yields this error, despite clearly inheriting from the required Abstract class.

Very basic example, which still results in error:

using Sdl.Desktop.IntegrationApi;
using Sdl.Desktop.IntegrationApi.Extensions;
using Sdl.TranslationStudioAutomation.IntegrationApi.Presentation.DefaultLocations;

namespace Sdl.Actions.Sample
{
  [RibbonGroup("MySampleRibbonGroup")]
  [RibbonGroupLayout(LocationByType = typeof(TranslationStudioDefaultRibbonTabs.HomeRibbonTabLocation))]
  class MySampleRibbonGroup : AbstractRibbonGroup
    {
    }
}



.
[edited by: Paul at 8:11 AM (GMT 0) on 13 Dec 2022]
emoji
  • Hi , thank you for reporting this issue.  I have added an item on our board to review this with the internal nr. CRQ-32028

    I will circle back when we have more information.

    emoji
  • Hi  , I have just reviewed this problem you reported aginst the latest version of the code for the plugin you highlighted above Word Cloud. I confirm that it works as expected.

    Steps

    1. Pull the master branch Word Cloud
    2. Compile the project
    3. Run/debug against Trados Studio 2022 CU5


    Can you provide me the stacktrace or exact error that you received?
    Maybe check that your installation of Trados is not compromised.  Perform a repair or install the latest CU5 potentically?

    Let me know how it goes,

    emoji
  • Hi  ,

    So I went ahead and updated to CU5. Now when I compile and load the Word Cloud plugin, i'm not seeing any problems. However, the plugin we're trying to update still shows the same issue. I can still reproduce this problem if I create a brand new template and the only thing it has is the code snipped above. If I build and install that plugin, i'm still seeing the issue here. Adding the complete results from the .sdlerror below.

    Thanks for the help on this.

    <SDLErrorDetails time="12/14/2022 4:18:43 PM">
    <ErrorMessage>Failed to add window command bar extensions.</ErrorMessage>
    <Exception>
    <Type>Sdl.Desktop.Platform.StudioException, Sdl.Desktop.Platform, Version=17.0.0.0, Culture=neutral, PublicKeyToken=c28cdb26c445c888</Type>
    <HelpLink />
    <Source>Sdl.D233088</HResult>
    <StackTrace><![esktop.Platform</Source>
    <HResult>-2146CDATA[ at Sdl.Desktop.Platform.Implementation.StudioWindow.Init(IEventAggregator eventAggregator)
    at Sdl.Desktop.Platform.Implementation.Studio.CreateWindowInternal(Boolean setActive, IEventAggregator eventAggregator)
    at Sdl.Desktop.Platform.Implementation.Studio.Run(ISplashScreen splashScreen, IPluginLoaderService pluginLoaderService, ICommandLineParsingService commandLineParsingService, IUserSettingsService userSettingsService, IEnumerable`1 startUpActions)
    at Sdl.TranslationStudio.Application.Launcher.RunApplication()]]></StackTrace>
    <InnerException>
    <Type>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <HelpLink />
    <Source>Sdl.Desktop.IntegrationApi</Source>
    <HResult>-2146233079</HResult>
    <StackTrace><![CDATA[ at Sdl.Desktop.IntegrationApi.Internal.ExtensionBuilders.RibbonGroupBuilder.Build(IExtension extension, Object defaultInstance, ExtensionArguments arguments)
    at Sdl.Core.PluginFramework.Integration.ExtensionsRepository.AddExtension[TResult](IExtension extension, ExtensionArguments arguments, Func`4 instanceCreator)
    at Sdl.Core.PluginFramework.Integration.ExtensionBuilderFactory.Build[TResult](IExtension extension, ExtensionArguments arguments, Boolean useCache)
    at Sdl.Core.PluginFramework.Integration.ExtensionsFactory.Create[TResult](IExtension extension, ExtensionArguments arguments, Boolean useCache)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.PluginRibbonGroupDescriptor.CreateInstance()
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.PluginRibbonGroup..ctor(IStudioWindow window, PluginRibbonGroupDescriptor descriptor, IConditionInitializer conditionInitializer)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.CommandBarExtensionRegistry.GetCommandBarItemWrappersFromRibbonGroupDescriptor(IStudioWindow window, IConditionInitializer conditionInitializer, Boolean contextMenuLocations, List`1 ribbonGroupItemWrappers, PluginRibbonGroupDescriptor pluginRibbonGroupDescriptor)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.CommandBarExtensionRegistry.GetCommandBarItemWrappers(IStudioWindow window, PluginCommandBarItemTarget target, IConditionInitializer conditionInitializer, Boolean contextMenuLocations, List`1& menuItemWrappers, List`1& applicationMenuItemWrappers, List`1& quickAccessToolbarItemWrappers, List`1& rightSideTabItemsToolbarWrappers, List`1& ribbonTabItemWrappers, List`1& ribbonGroupItemWrappers, List`1& toolBarItemWrappers, List`1& toolBarDescriptors)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.CommandBarExtensionRegistry.GetCommandBarItemWrappers(IStudioWindow window, IEnumerable`1 targets, IConditionInitializer conditionInitializer, Boolean contextMenuLocations, List`1& menuItemWrappers, List`1& applicationMenuItemWrappers, List`1& quickAccessToolbarItemWrappers, List`1& rightSideTabItemsToolbarWrappers, List`1& ribbonTabItemWrappers, List`1& ribbonGroupItemWrappers, List`1& toolBarItemWrappers, List`1& toolBarDescriptors)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.CommandBarExtensionRegistry.AddPluginCommandBarItems(IStudioWindow window, IEnumerable`1 targets, ICommandBar menu, IRibbonApplicationMenu applicationMenu, IRibbonQuickAccessToolbar quickAccessToolbar, ICommandBar rightSideTabItemsToolbar, IToolBarManager toolBarManager, IRibbon ribbon, IConditionInitializer conditionInitializer)
    at Sdl.Desktop.Platform.Implementation.CommandBars.Extensions.CommandBarExtensionRegistry.AddWindowCommandBarExtensions(IStudioWindow window)
    at Sdl.Desktop.Platform.Implementation.StudioWindow.Init(IEventAggregator eventAggregator)]]></StackTrace>
    </InnerException>
    </Exception>
    <Environment>
    <ProductName>Trados Studio</ProductName>
    <ProductVersion>Studio17</ProductVersion>
    <EntryAssemblyFileVersion>17.0.5.14757</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 11 Pro</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>TONYDIAZ87D2\tony</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>TONYDIAZ87D2</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>8369456 MB</PhysicalMemory>
    </Environment>
    </SDLErrorDetails>

    emoji
  • Hi  , I have reviewed this again today, but unable to reproduce the exception that you have mentioned above.

    To confirm, I created a simple plugin integration and added a ribbon group, with an action to demonstrate it is working as expected.  Please download and review this source code project on your side to confirm.

    Sample project source code: MySampleRibbonGroup.zip

    namespace MySampleRibbonGroup
    {
    	[RibbonGroup("MySampleRibbonGroup", "My Sample")]
    	[RibbonGroupLayout(LocationByType = typeof(TranslationStudioDefaultRibbonTabs.HomeRibbonTabLocation))]
    	public class MySampleRibbonGroup : AbstractRibbonGroup
    	{
    	}
    }

    namespace MySampleRibbonGroup
    {
    	public class MySampleRibbonGroupActions
    	{
    		[Action("MySampleRibbonGroupActions_ActionId", typeof(FilesController), 
    			Name = "Action 1")]
    		[ActionLayout(typeof(MySampleRibbonGroup), 3, DisplayType = DisplayType.Large)]
    		public class MySampleRibbonGroupActions_Action1 : AbstractViewControllerAction<FilesController>
    		{
    			protected override void Execute()
    			{
    				MessageBox.Show("Hello, Trados!");
    			}
    		}
    	}
    }



    example:

    Trados Studio screenshot showing a custom ribbon group labeled 'My Sample' with an 'Action 1' button. A message box with 'Hello, Trados!' is displayed over the Files view, indicating the action button works as expected.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:37 PM (GMT 0) on 5 Mar 2024]