Icon and Label Decorators in Eclipse

From time to time, I scratch my head and ask myself: Gee, that file icon looks interesting and different, what does it mean? What I’m wondering about is on Eclipse Icon Decorators. Label and Icon Decorations allow additional information to be displayed in an item’s label and icon. Very powerful. But as with many powerful things: if you don’t know it, it might cause harm or confusion. Unfortunately, that’s not so easy to find out.

Things are best explained with an example. Below are some files in my project view:

Sources in Project View

Sources in Project View

So my source file icon looks like this:

Normal Source File Icon

Normal Source File Icon

But it might look like this as well:

Icon Decorator on Source File

Icon Decorator on Source File

What happened? Looks like someone pinned that icon? The longer answer can be found in Symbol defined or not, that’s the question. The short answer is: that source file has ‘per file‘ settings, and that ‘pin icon overlay‘ tells me this.

But what about this one:

Excluded Overlay

Excluded Icon Decorator

It means that the file has been ‘excluded from build‘ (see again Symbol defined or not, that’s the question):

Excluded from Build

Excluded from Build

But it does not stop here: Icon Decorators can be combined:

Combined Icon Decorators

Combined Icon Decorators

So that file is excluded from the current build, and has special per file settings.

Now let’s have a look a this ProcessorExpert.pe file:

ProcessorExpert.pe Icon

ProcessorExpert.pe Icon

It means that the file is excluded from build, plus it has its own build settings. Interestingly this happens for projects imported from MCU10.1 into MCU10.2? But it is possible bo get rid of it. The first thing is to remove that ‘Exclude resource from build‘ flag as shown earlier). The other step is to reset the resource configuration to default settings:

Reset to default

Reset to default

This will ‘reset’ my icon and settings.

Now the question is: how to know that icon decorator is for what? For Subversion/SVN or CVS they are easily accessible under Window > Preferences:

SVN Label Decorations

SVN Label Decorations

An excellent explanation of all the SVN Icon/Label Decorations can be found in What do the arrow icons in Subclipse mean?.

Otherwise icons might depend on the Eclipse version used. There is an answer to the question “What do the icons in Eclipse mean?  which is replicated here:

Indigo: http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/ref-icons.htm
Helios: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/ref-icons.htm
Galileo: http://help.eclipse.org/galileo/topic/org.eclipse.jdt.doc.user/reference/ref-icons.htm?resultof=%22icon%22

There are also some CDT icons at the bottom of this help page.

Unfortunately, except for things like CVS or SVN, I have not found a comprehensive list of icon or label decorators. I have found this thread which gives some clues. Maybe someone has found a better answer? Until then, it is a continued exploring and learning experience.

Happy Decorating 🙂

Advertisements

7 thoughts on “Icon and Label Decorators in Eclipse

  1. Pingback: FatFs with Kinetis | MCU on Eclipse

  2. Pingback: Traps and Pitfalls: No Hex/Bin/S19 File Created with GNU? | MCU on Eclipse

  3. Pingback: Exclude Source Files from Build in Eclipse | MCU on Eclipse

  4. Pingback: Link to Files and Folders in Eclipse | MCU on Eclipse

  5. Pingback: Tutorial: Using GNU Profiling (gprof) with ARM Cortex-M | MCU on Eclipse

  6. Pingback: GNU Code Coverage on Embedded Target with Eclipse Neon and ARM gcc 5 | MCU on Eclipse

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s