Project natures allow a plug-in to tag a project as a specific kind of project. For example, the Java development tools (JDT) use a "Java nature" to add Java-specific behavior to projects. Project natures are defined by plug-ins, and are typically added or removed per-project when the user performs some action defined by the plug-in.
A project can have more than one nature. However, when you define a project nature, you can define special constraints for the nature:
one-of-nature - specifies that the nature is one of a named set. Natures in a set are mutually exclusive; that is, only one nature belonging to the set can exist for a project.
requires-nature - specifies that the nature depends on another nature and can only be added to a project that already has the required nature.
To implement your own nature, you need to define an extension and supply a class which implements IProjectNature.
The workspace supports the notion of an incremental project builder (or "builder" for short"). The job of a builder is to process a set of resource changes (supplied as a resource delta). For example, a Java builder would recompile changed Java files and produce new class files.
Builders are confgured on a per-project basis and run automatically when resources within their project are changed. As such, builders should be fast and scale with respect to the amount of change rather than the number of resources in the project. This typically implies that builders are able to incrementally update their "built state".
Eclipse Article:
Plugin.xml configuration:
<extension id="mynature" name="My Nature" point="org.eclipse.core.resources.natures"> <runtime> <run class="com.xyz.natures.MyNature"/> </runtime> <builder id="com.xyz.myplugin.mybuilder"/> </extension> <extension id="mybuilder" name="My Builder" point="org.eclipse.core.resources.builders"> <builder hasNature="true"> <run class="com.xyz.builders.MyBuilder"/> </builder> </extension>
Append Icon to new project type on project navigator:
<extension point="org.eclipse.ui.ide.projectNatureImages"> <image icon="icons/javafx_icon.png" id="com.sun.javafx.eclipse.core.natureImage" natureId="com.sun.javafx.eclipse.core.javafxNature"> </image> </extension>
This extension point is used to associate an image with a project nature. The supplied image is used to form a composite image consisting of the standard project image combined with the image of its nature. The supplied image is drawn over the top right corner of the base image.
Howto create a new project nature in Eclipse
Decorators
Your plug-in can use decorators to annotate the images for resources and other objects that appear in the workbench views. Decorators are useful when your plug-in adds functionality for existing resource types. Many of the standard workbench views participate in showing decorations.
Decorators Guide
Dextension point