简体   繁体   中英

Prevent Eclipse Add required plug-ins from adding fragments

I am working on RCP application which contains plug-ins(functionality) and fragments(tests) in Eclipse Luna. "Add required plug-in" adds plug-in with all its fragments even if fragment isn't necessary. How can I force eclipse to make absolute minimum with "add required plug-ins" action? (just adding plug-in without fragment)

Here is 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:...

If dependencies are marked as "optional" you can uncheck the box "include optional dependencies when computing required plugins" to avoid including them.

Otherwise my workaround approach is to select appropriate plugins by hand (usually by deselecting them after "select required" action) then save the "run configuration" and share it on the source versioning system for reuse. Unfortunately this is not very resistant to platform changes, eg fragments appropriate for linux64 are not the same as win64 in my fragment examples. So name the configurations appropriately.

For tests, I've had some success automating deployment of eclipse + install of specific features using command-line, where with some scripting you can control the plugins and versions you are using with more ease than using the click-click gui.

Again this allows to build and store eclipse configurations in some reusable form. Debug is accomplished by checking out the projects you are debugging in the eclipse built from command line, then running a vanilla debug instance "all platform and workspace plugins". You do need JDT+debug components though, so for RCP I'm not sure how that would work.

Fragments are a pain, in my experience, consider using features if you can, the ui and p2 system deal with it much better.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM