Search code examples
eclipseeclipse-rcpinternal-class

Workaround for using the internal class AboutHandler in RCP for which access is discouraged


I'm aware of why using internal classes is discouraged, and am generally happy to stick to not using them.

However, in my RCP I want to use a command rather than an action to display the About dialog. Hence I have extended org.eclipse.ui.internal.about.AboutHandler for my handler class, which is discouraged.

Is there a workaround available to use this class or rather its functionality?


Solution

  • I think, you could reuse the existing contribution:

    1. Press Alt+Shift+F2 (Ctrl+Shift+F2 on Mac)
    2. Select the About from your Eclipse instance
    3. Will open the Plug-in menu spy that should provide you with the ID of the menu contribution (basically command ID) of the About command.

    If you have the command ID, you could simply specify a menu contribution for the item, as shown in the following tutorial using the cut/copy/paste items.