You can apply a pattern you have
designed in a runtime instance of the developer workbench to test
for errors. Errors are reported back to the Console view of the developer
workbench and the Eclipse PDE error log view of the runtime workbench.
Before you begin
This topic discusses some basic
steps to follow when you are debugging a pattern by using the both
the developer and runtime workbenches. It assumes that you have both
a developer and a runtime instance of the workbench running.
About this task
Before you test a pattern, you can add debug messages
to the hot spots to trace the process sequence for expansion and update
methods. Trace messages are displayed in the developer workbench Console view.
If you included breakpoints in your
pattern code; they are listed and controlled in the Breakpoint view
in the developer workbench. You can resume pattern processing after
a reaching a breakpoint by clicking .
For details on
applying patterns, refer to the topics on applying patterns. As every
pattern is unique, there is no single method to test patterns. The
following instructions are options to modify the pattern. Parameters
with dependencies invoke multiple methods for each command when a
change occurs to a supplier parameter.
Procedure
To test your pattern, do one or more of the following
steps: - Add an argument to each template parameter by using
the Apply pattern wizard or drag and drop gestures. The expansion method that handles added values are invoked.
- Delete each argument by using the Undo or Delete from
Model menu items. The expansion method that handles
removed values is invoked.
- Replace an argument with another. This action invokes an method for handling removed values and then
a method for handling added values.
- Reapply the pattern to reevaluate all arguments bound
to the pattern instance. Reapplying a pattern updates
any arguments that were bound and then modified outside of the pattern.
- Unapply the pattern to invoke a remove of all arguments. This action removes the pattern.
- Unbind a single argument to invoke a remove method. The expansion method for handling removed values is invoked.
Results
After you have satisfactorily tested all patterns in a library,
package the pattern library as a RAS pattern asset. To do this, you
export it by using the
Pattern Authoring view. As a RAS pattern asset, patterns are easily distributed for use
by other developers. When imported, the RAS pattern asset is installed
as a pattern plug-in and is listed in the
Pattern Explorer view and the Pattern Repository or the RAS
Asset Explorer view.