How to morph a fragment into a plug-in?

319 Views Asked by At

I need to turn Eclipse fragments into plug-ins. Haven't found any wizard to support this.

So I've created a plugin.xml and edited the MANIFEST.MF to look exactly like a plug-in project does. Still, Eclipse somehow detects it's not a plug-in: for example it asks for a Host-plugin.

Also checked .project file, nothing seems to indicate "fragmentness".

Why I need this: Fragments were used for Unit-testing; but they're rather inconvenient: any modification in them triggers a chain of builds, and they block the exporting of individual plug-ins, unless their project is closed.

Solution As Greg suggested it was the 'Fragment-Host:' option that did the trick. And as Rüdiger wrote; the project had to be closed/reopened for eclipse to acknowledge the change.

1

There are 1 best solutions below

1
On BEST ANSWER

The fragment host is specified in the fragment's MANIFEST.MF:

Fragment-Host: host.plug.in

you will need to remove that.

However many fragments rely on code from their host plugin so it may not be possible to just convert the fragment.