Back to top

vogella training Training Books

Eclipse Fragment Projects - Tutorial

Lars Vogel

Version 2.3

24.06.2012

Revision History
Revision 0.1 30.11.2008 Lars
Vogel
created
Revision 0.2 - 2.3 20.04.2009 - 24.06.2012 Lars
Vogel
bug fixes and enhancements

Eclipse Feature Project

This tutorial describes the purpose and usage of Eclipse fragment projects


Table of Contents

1. Overview
2. Usage
3. Thank you
4. Questions and Discussion
5. Links and Literature
5.1. Eclipse resources
5.2. vogella Resources

1. Overview

A fragment project is always defined for a host project. At runtime the fragment project is merged with its host project and for the runtime both projects are just one.

Fragment project are always optional for their host plug-in.

To create a fragment project select FileNewOther...Plug-in DevelopmentFragment Project.

2. Usage

Fragment project are typical used for containing the tests. This way the tests can access the host plug-in classes, even if the host plug-in does not define them as external API. Sometimes tests are also contained in normal plug-ins, in this case they can only test the external API for other plug-ins.

Another typical usage examples for fragment projects are translations and native code. A new translation can be contributed to a plug-in via a fragment project. SWT makes use of fragment projects to factor out it native code parts.

3. Thank you

Please help me to support this article:

Flattr this

4. Questions and Discussion

Before posting questions, please see the vogella FAQ. If you have questions or find an error in this article please use the www.vogella.com Google Group. I have created a short list how to create good questions which might also help you.

5. Links and Literature

5.1. Eclipse resources

5.2. vogella Resources

vogella Training Android and Eclipse Training from the vogella team

Android Tutorial Introduction to Android Programming

GWT Tutorial Program in Java and compile to JavaScript and HTML

Eclipse RCP Tutorial Create native applications in Java

JUnit Tutorial Test your application

Git Tutorial Put everything you have under distributed version control system