1 year ago

#319829

test-img

Björn Beuck

Eclipse PDE plugin is not load in target Platform, debugging works

I try to make my first plugin for Eclipse. To do it, I have defined a Target Platform and has created a small hello world Plugin. It has the Extension Point org.eclipse.ui.startup. When I run the Plugin in debug mode, the target will load and prints a message to the console. All ok.

If I export the same plugin as a "Deployable plug-ins and fragments" directly to the plugin directory of the target and start the target standalone, the plugin will not load. Also check in the Help menu / About / installation Details do not show the plugin.

I make a retry with a standard Eclipse version, it will load the plugin. It is listed in the installation details.

I don't have any idea, why it will not load in the target. The target eclipse is customized eclipse. It works only as framework for the application. I don't know the exact wording for it. It has his own Menu items and views. The starter exe is not named eclipse.exe. It is renamed to .exe also the corresponding config ini.

The ini content is:

-startup
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1100.v20190907-0426
-data
@noDefault
-vmargs
-Xms40m
-Xmx1024m
-Declipse.p2.unsignedPolicy=allow

I started the target also with the -clean option, to reload the plugin cache. No change.

The code is:

plugin.xml

<plugin>
   <extension
         point="org.eclipse.ui.startup">
         <startup class="com.ing.logging.plugin.startup"/>
   </extension>
</plugin>

startup.java

package com.ing.logging.plugin;

import org.eclipse.ui.IStartup;

public class startup implements IStartup {

    @Override
    public void earlyStartup() {
        // TODO Auto-generated method stub
        System.out.println("EsoRemote ESR Labs 2022");
        
    }
}

The Activator class is completely generated by eclipse.

How I can make work the plugin in the target?

Final solution

After many tries, I found a way. I have now the Plugin as project. Beside I have created a Feature Project, with the plugin inside. From the Feature project, in the overview tab, point publishing, I create a "Update site Project".

In the Export wizard on "Install into host. Repository" the local path to the created rep.

This repository can added in the RCP application under Help / "Install new software". Now the plugin can installed to the target. That its on the end.

java

eclipse

plugins

pde

0 Answers

Your Answer

Accepted video resources