Code Engineering Using UML Models
Total Page:16
File Type:pdf, Size:1020Kb
Code Engineering Using UML Models Enterprise Architect is an intuitive, flexible and powerful UML analysis and design tool for building robust and maintainable software. This booklet describes the code engineering facilities of Enterprise Architect. Copyright © 1998-2010 Sparx Systems Pty Ltd Enterprise Architect - Code Engineering Using UML Models © 1998-2010 Sparx Systems Pty Ltd All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. Printed: May 2010 Special thanks to: Publisher All the people who have contributed suggestions, examples, bug Sparx Systems reports and assistance in the development of Enterprise Architect. The task of developing and maintaining this tool has been greatly Managing Editor enhanced by their contribution. Geoffrey Sparks Technical Editors Geoffrey Sparks Simon McNeilly Vimal Kumar Henk Dekker Contents I Table of Contents Foreword 1 Code Engineering 2 Reverse Engineering................................................................................................................................... 4 Import Source.......................................................................................................................................................... Code 5 Notes on Source.......................................................................................................................................................... Code Import 6 Import a Directory.......................................................................................................................................................... Structure 8 Import Binary.......................................................................................................................................................... Module 9 MDG Integration.......................................................................................................................................................... and Code Engineering 10 Classes Not.......................................................................................................................................................... Found During Import 10 Synchronize.......................................................................................................................................................... Model and Code 10 Generate................................................................................................................................... Source Code 12 Generate.......................................................................................................................................................... a Single Class 13 Generate.......................................................................................................................................................... a Group of Classes 14 Generate.......................................................................................................................................................... a Package 15 Update Package.......................................................................................................................................................... Contents 16 Namespaces.......................................................................................................................................................... 17 Code Generation................................................................................................................................... From Behavioral Models 19 SW Code.......................................................................................................................................................... Generation - State Machine Diagrams 19 Java .........................................................................................................................................................Code Generated From State Machine Diagram 20 State Machine.......................................................................................................................................................... Modeling For HDLs 23 Code Generation.......................................................................................................................................................... - Interaction Diagrams 26 Code Generation.......................................................................................................................................................... - Activity Diagrams 27 Code Engineering................................................................................................................................... Settings 32 Source Code.......................................................................................................................................................... Engineering 32 Source......................................................................................................................................................... Code Options 32 Import Component......................................................................................................................................... Types 33 Options......................................................................................................................................................... - Code Editors 34 Options......................................................................................................................................................... - Object Lifetimes 35 Options......................................................................................................................................................... - Attribute/Operations 36 Code......................................................................................................................................................... Page for Source Editing 37 Local Paths.......................................................................................................................................................... 38 Local Paths.......................................................................................................................................................... Dialog 39 Language.......................................................................................................................................................... Macros 39 Set Collection.......................................................................................................................................................... Classes 41 Language.......................................................................................................................................................... Options 42 ActionScript......................................................................................................................................................... Options 43 Ada 2005......................................................................................................................................................... Options 43 C Options......................................................................................................................................................... 44 C# Options......................................................................................................................................................... 45 C++ Options......................................................................................................................................................... 46 Delphi......................................................................................................................................................... Options 47 Delphi Properties......................................................................................................................................... 48 Java .........................................................................................................................................................Options 51 PHP .........................................................................................................................................................Options 51 Python......................................................................................................................................................... Options 52 SystemC......................................................................................................................................................... Options 53 VB.Net........................................................................................................................................................