Running an Eclipse Template in a Template

I created an Eclipse plug-in project by selecting the plugin template provided by eclipse. Then I launched the plug-in and it opened another eclipse and the plugin was executed there. Why? is it a plugin that accepts an eclipse application class to create a working environment?

+1
source share
2 answers

As a development "If you want to run the plugin in your main workspace, you will have to export the plugin and install it in your main Eclipse." that @ greg-449 was in his answer. You can do it.

Step 1 - Export Your Plugin

From the File menu, select Export ... and then select the Deployable plug-ins and fragments wizard.

step1

Step 2 - Configure Wizard Settings

  • Select the plugins you want to export.
  • As the destination, select Install into host
  • Click Finish

step2

Step 3 - Confirm Unsigned Content

Since you probably do not sign your plugin, but trust it, say β€œYes” to the warning: you are installing software that contains unsigned content.

step3

Step 4 - Restart Eclipse

Restart Eclipse when prompted to enable plugins.

step4

Result

You should now see your new plugins. To make this example, I used the new plug-in wizard and selected the "Hello, World Command" template. The arrows below indicate the contribution to the user interface that the plugin made.

step5

+3
source

When you start the plugin (Run as> Eclipse Application), Eclipse launches a new instance of Eclipse, including your plugin, and uses the new workspace. This allows you to test the plugin without damaging the main Eclipse installation and workspace.

If you want to run the plugin in your main workspace, you will have to export the plugin and install it in your main Eclipse.

If you want to run your plugin as part of RCP, you can install the application or product running in the "Run> Run Configurations ..." entry.

For instance: enter image description here

Here I launch a product called "greg.music.e4.rcp.product"

+2
source

Source: https://habr.com/ru/post/1233573/


All Articles