IDE Support

The SourceMate 3.0 plugin for Flash Builder adds a large number of extremely useful capabilities to Flash Builder. One of these is excellent IDE integration for the Swiz framework. Here are a few of the great features that SourceMate offers when building Swiz applications in Flash Builder.

Configuration

To start with, it provides a Swiz-specific menu for doing common things like configuring Swiz projects and creating new Beans:

Swiz Menu


Swiz project configuration can usually be automatically detected. For cases where a project has an unusual setup, information can be specified manually as well:

Swiz Configuration


Content Assist for Injections and Event Handlers

Once a Swiz project is configured, code-hinting is available to create injections and event handlers. For example, if you type "bean" and trigger content assist (Control-Space or Command-Space), you will be presented with a list of all of the Beans in your BeanProviders:

Bean Content Assist


Choosing a bean and hitting enter will automatically generate a public property with the relevant [Inject] tag. Similarly, if you type "handle" and trigger content assist, you are presented with a list of the events declared in your event packages:

EventHandler Content Assist


Selecting an event and hitting enter will prompt you to decide whether you want to pass the event itself to the event handler method, or pass specific event properties:

EventHandler Content Assist (Properties)


Finally, the [EventHandler] tag and handler method are generated automatically, including any selected event properties that you wish to pass:

EventHandler Content Assist Code


Beans View

The Beans in use by a project can be quickly shown via the Swiz Beans view:

Bean List with Injections


Notice that in addition to listing the Beans, this view also shows you exactly where each of the Beans is injected into other classes.

Events View

A similar view is available to view the events in use by your Swiz application:

Event List with EventHandlers


Again, notice that in addition to showing the events, it lists each event type along with the location of all [EventHandler] metadata which references that event type. This is extremely handy for tracing event flow through an application.

Wrapping Up

The SourceMate team has done a great job with this support for Swiz, and has been very receptive to feedback. We hope that as more people use the tool and take advantage of its Swiz support, even more cool features will be added in the future. They have a free trial, so kick the tires and test out the Swiz support yourself (along with the impressive list of non-Swiz enhancements that SourceMate brings to Flash Builder).