Java Reference
In-Depth Information
3.3.4 Generate and Run
The last thing to do is generate our mindmap plug-ins and code. Technically, we
don't need to generate code at this time because we plan to leverage dynamic
instances as long as we can in the development of our DSLs. However, for those
new to EMF, it's worthwhile to continue with generation at this point to see how
things work. This is accomplished by right-clicking the root of the mindmap.
genmodel in the editor tree and selecting Generate All . This generates our model
code, edit code, editor code, and test skeletons, each in their own plug-in proj-
ects. We don't need the generated editor code because a diagram provides our
primary means of working with mindmap instance models. For now, we can con-
tinue by running the generated editor to verify our model and configuration.
To run our plug-ins and test the functionality of our editor, we need to be in
the Plug-in Development Environment perspective to gain access to the appro-
priate Run option. Select Run
Run C) and cre-
ate a new Eclipse Application run configuration named requirements in a
directory named runtime-requirements . Figure 3-5 is an image of this dia-
log. Figure 3-6 shows the Arguments page with some arguments for launching
on Mac OS X. We use this launch configuration throughout our development of
the sample projects, hence the general requirements name.
Open Run Dialog (Ctrl+3
TIP
If you get tired of adding arguments to your launch configurations each
time you create one, navigate in the Preferences dialog to Plug-In
Development Target Platform Launching Arguments and
enter them in the field provided.These values will be copied into any new
launch configuration you create.
Run this configuration to launch a new instance of Eclipse with the new
plug-ins installed. We could trim the plug-in list to launch only those plug-ins we
need for our application. This makes launching faster and keeps us aware of our
underlying plug-in dependencies. In Chapter 8, “DSL Packaging and
Deployment,” we fine-tune our launch settings before creating our product con-
figuration.
 
Search WWH ::




Custom Search