Launching Eclipse plug in template

前端 未结 2 1291
耶瑟儿~
耶瑟儿~ 2020-12-22 04:14

I created a Eclipse plug-in project by selecting a plug-in template provides by the eclipse. Then i ran the plug-in it opened another eclipse and the plug-in executed there.

相关标签:
2条回答
  • 2020-12-22 04:41

    As an elaboration of "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 had in his answer. You can do this.

    Step 1 - Export your plugin

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

    Step 2 - Configure your Wizard Options

    1. Select the plug-ins you want to export.
    2. As the destination, choose Install into host
    3. Press Finish

    Step 3 - Confirm unsigned content

    As you are probably not signing your plug-in, but you do trust it, say Yes to the Warning: you are installing software that contains unsigned content.

    Step 4 - Restart Eclipse

    Restart Eclipse when prompted to to enable the plug-ins.

    Result

    You should now see your new plug-ins. To make this example I used the new Plug-in wizard and choose the "Hello, World Command" template. The arrows below point to the contributions in the UI that the plug-in made.

    0 讨论(0)
  • 2020-12-22 04:51

    When you run a plugin (Run As > Eclipse Application) Eclipse starts a new instance of Eclipse including your plugin and uses a new workspace. This enables you to test the plugin without damaging your 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 an RCP you can set the application or product launched in the 'Run > Run Configurations...' entry.

    For example:

    Here I am running a product called 'greg.music.e4.rcp.product'

    0 讨论(0)
提交回复
热议问题