Developing a DSL Graphical Notation in Java

Creating QR Code in Java Developing a DSL Graphical Notation
CHAPTER 4 Developing a DSL Graphical Notation
QR-Code Maker In Java
Using Barcode drawer for Java Control to generate, create QR Code JIS X 0510 image in Java applications.
Table 4-16 Element
Encoding Bar Code In Java
Using Barcode generator for Java Control to generate, create bar code image in Java applications.
Requirement Node Mapping (continued) Property Diagram Label Features Read Only View Pattern Value Diagram Label RequirementType Requirementtype : Type true {0}
Decoding Barcode In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
Feature Label Mapping
QR Printer In Visual C#.NET
Using Barcode drawer for .NET framework Control to generate, create QR Code JIS X 0510 image in .NET applications.
As you can see, Node Mapping uses the Feature Seq Initializer element to create a new Version instance upon creation of a Requirement and set its major attribute to 1 This is a nice capability of GMF that would be beneficial in EMF as well Table 4-16 gives the details of the Requirements Node Mapping The Requirements node has two Feature Label Mappings The first is for an external label used to display the Requirement s id attribute The second is a Read Only label used to display the type of the Requirement in the center of its circle graphic, as Figure 4-19 shows This works because we changed the Literal property of each Type enumeration to be a single letter: F in the case of FUNCTIONAL, N in the case of NONFUNCTIONAL This is a simple solution, although it s trivial to modify the generated code to return the first character or simply supply a character based on the selected enum Now we turn to our two Requirement link mappings First is the mapping for Requirements that are maintained in the requirements feature of our RequirementGroup class, as shown by the Target Feature property setting It uses the same Diagram Link we ll use in the next mapping, but it has its own Tool, as seen in Table 4-17
QR Code Generation In .NET
Using Barcode drawer for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
Table 4-17 Element Mapping Link Mapping Target Feature Diagram Link Tool Link Mapping Target Feature Diagram Link Tool requirements : Requirement Connection GroupRequirement Creation Tool Group Requirement children : Requirement Connection RequirementChild Creation Tool Child Requirement Requirement Link Mappings Property Value
Create Quick Response Code In VS .NET
Using Barcode printer for .NET framework Control to generate, create QR image in VS .NET applications.
44 Developing a Requirements Diagram
QR Code ISO/IEC18004 Generation In Visual Basic .NET
Using Barcode creator for .NET Control to generate, create QR Code image in .NET framework applications.
The second mapping uses the children containment reference as the Target Feature and has its own Tool Our final mapping is for Dependency links As you will recall from our graphical definition, these are blue dashed lines with open arrow head target decorations We can use them to indicate dependency references between Requirements, as shown in Table 4-18
Make Code 128 In Java
Using Barcode maker for Java Control to generate, create Code 128A image in Java applications.
Table 4-18 Element Mapping Link Mapping Target Feature Diagram Link Tool dependencies : Requirement Connection Dependency Creation Tool Dependency Requirements Dependency Link Mapping Property Value
Generating EAN / UCC - 13 In Java
Using Barcode creation for Java Control to generate, create USS-128 image in Java applications.
444 Generation
Generate GS1 - 12 In Java
Using Barcode generation for Java Control to generate, create UPC Symbol image in Java applications.
As before, we can right-click on our mapping model and select Create Generator Model to bring up the transformation dialog The default requirements gmfgen in the /diagrams folder is fine, so we proceed to the Select Mapping Model page, where our requirementsgmfmap model is already loaded On the next page, we find that our requirementsgenmodel is already selected and loaded as well On the final page, we keep the defaults Use IMapMode and Utilize Enhanced Features of GMF Runtime, and then click Finish We now leave the default generation properties for the moment and generate our diagram plug-in using the Generate Diagram Code option from the file s context menu Launching the runtime workspace lets us create a new requirements diagram using the generated wizard found in the Examples category of the New (Ctrl+N) dialog Figure 4-19 is a sample diagram You ll notice right away that creating two RequirementGroup objects on the diagram, followed by linking these groups using the Child Group tool, requires pressing F5 to invoke a refresh to see the link We need to modify the generated code to invoke a canonical update to avoid this, as we did in our mindmap with the override of handleNotificationEvent()
Bar Code Encoder In Java
Using Barcode creator for Java Control to generate, create barcode image in Java applications.
CHAPTER 4 Developing a DSL Graphical Notation
Encode Bar Code In Java
Using Barcode generator for Java Control to generate, create barcode image in Java applications.
G001
Leitcode Drawer In Java
Using Barcode generation for Java Control to generate, create Leitcode image in Java applications.
G002
Code 39 Extended Recognizer In .NET
Using Barcode scanner for .NET Control to read, scan read, scan image in VS .NET applications.
G003
Read Data Matrix ECC200 In .NET Framework
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET applications.
R001
EAN128 Creation In VS .NET
Using Barcode encoder for .NET Control to generate, create GTIN - 128 image in .NET applications.
R002
ECC200 Drawer In VS .NET
Using Barcode printer for VS .NET Control to generate, create Data Matrix image in .NET framework applications.
R004
Decoding Code 128 Code Set B In .NET
Using Barcode decoder for .NET Control to read, scan read, scan image in .NET applications.
R003
Paint UCC.EAN - 128 In .NET
Using Barcode generation for ASP.NET Control to generate, create EAN128 image in ASP.NET applications.
R006
Scan UPCA In VS .NET
Using Barcode scanner for .NET framework Control to read, scan read, scan image in .NET applications.
R005
Figure 4-19
Requirements dependency diagram
445 ToolTips
Because we have decided not to clutter our dependency view by displaying only the ID of each Requirement and RequirementGroup, we need to populate a ToolTip with the Requirement s title This provides a convenient way to browse the diagram with the mouse but not have to select each element and look in the Properties view to see its information For now, we just display the title attribute value in a Label by modifying the createMainFigure() method of the RequirementEditPart class, as follows:
/** * Creates figure for this edit part * * Body of this method does not depend on settings in generation model, * so you may safely remove <i>generated</i> tag and modify it * * @generated NOT */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figuresetLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figureadd(shape); contentPane = setupContentPane(shape);