Prevent Eclipse Add Required Plugins from Add Snippets

I am working on an RCP application that contains plugins (functionality) and fragments (tests) in Eclipse Luna. "Add required plugin" adds a plugin with all its fragments, even if a fragment is not needed. How to make eclipse do an absolute minimum with the action "add necessary plugins"? (just add the plugin without fragment)

Here is a snippet of my manifest:

Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: My Plugin Bundle-SymbolicName: com.something.myplugin;singleton:=true Bundle-Version: 1.0.0 Bundle-Vendor: XYZ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Eclipse-ExtensibleAPI: true Require-Bundle:... Export-Package:... 
+6
source share
1 answer

If the dependencies are marked as “optional”, you can uncheck the box “include optional dependencies when calculating the necessary plug-ins” to avoid including them.

Otherwise, my approach to the workaround is to manually select the appropriate plugins (usually by canceling them after the “select the required” action), then save the “launch configuration” and share it in the original version control system for reuse. Unfortunately, this is not very resistant to platform changes, for example. fragments suitable for linux64 do not match win64 in my sample fragments. Therefore, specify the configurations accordingly.

For the tests, I had several successes in automating the deployment of eclipse + installation of certain functions using the command line, where with some scripts you can manage the plugins and versions that you use with more ease than by clicking with a mouse click.

Again, this allows you to create and store eclipse configurations in some reusable form. Debugging is done by checking projects that you are debugging in eclipse built from the command line, and then running the vanilla debug instance “all workspace platforms and plugins”. You need JDT + debugging components, so for RCP I'm not sure how this will work.

Fragments are a pain, in my experience, consider using functions, if you can, the ui and p2 system can handle this much better.

0
source

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


All Articles