Flex Builder – What do the Icons in Variables View mean?

Posted on November 14, 2006 | 2 comments

Take a look at a typical Flex Debugging perspective Variables view.
Flex Builder Variables View

There is a lot of images with other symbols on top of them. From red squares, green circles to yellow diamonds with (), C, S etc… icons on top. What do they all mean? Well I am not totally sure myself, but some are obvious.

Flex Builder Variables View Red Square – Red Square
This defines a private variable.

Flex Builder Variables View Green Circle – Green Circle
This defines a public variable.

Flex Builder Variables View Yellow Diamond – Yellow Diamond
This defines a protected variable.

Flex Builder Variables View Orange Like Square Grid – Orange Like Square Grid
This defines a ???? (any one know?) – it defines a package usually but this is used on attributes like x where y in the same object is set to a green circle, making no sense.

Ok now for the overlapping superscript icons.

Flex Builder Variables View C – C icon
This defines a constant variable.

Flex Builder Variables View D – D icon
This defines a dynamic variable.

Flex Builder Variables View Red S – Red S icon
This defines a static variable.

Flex Builder Variables View Getter – Getter icon
This defines that its has a getter.

  • http://www.morearty.com/blog Mike Morearty

    As the guy who implemented these, I can answer your questions…

    In addition to the four you mentioned, there is one more: a blue triangle. That means “internal”. Internal is the default access applied to a variable if you don’t specify what access to use; or you can explicitly use the “internal” keyword to denote this. (The blue triangle, like the green circle, yellow diamond, and red square, comes from Eclipse’s JDT.)

    Okay, now what’s up with that crazy “package” symbol? Well, it means that the variable’s access is scoped by a user-defined namespace. For example:

    private namespace mynamespace = “http://www.morearty.com”;
    mynamespace var myvar;

    Unfortunately, there are a couple of problems with this whole thing. For one thing, as you noticed, there are actually bugs with the package (namespace) icon — we sometimes show that icon on variables that should actually have some other icon.

    But even if we fix that (and we will), there is a bigger problem: All these icons are just too confusing. Especially the blue triangle (internal) and the “package” icon (namespace) — heck, I wrote the code, and yet even I get those two mixed up all the time. It’s too hard to remember five icons, especially when the differences between them are so subtle.

    I’m open to suggestions. One possibility I’ve considered is lumping protected, internal, and namespace-scoped all under the yellow-dismond icon, so there are only three icons: green circle (public), yellow diamond (which you could think of, vaguely, as “halfway between public and private”), and red square (private).

    Any other ideas?

  • Bjorn

    I was confused and joking about this at work yesterday :)

    we were saying, it looks like a package, wtf is it???

    Perhaps internal, protected and namespace should all be diamonds but different colors. I would still like to be able to see whether the var is associated with namespace or the protected identifier.