Home
Cookbook for Developers of ArgoUML
Contents
1. T package whatever The file and version is maintained by cvs using keyword substitution The year in the copyright no tice is maintained manually This differs from the Sun Code Conventions that requires the initial comment to be a c style com ment This is checked by checkstyle e All instance variables are private This is not required by the Sun Code Conventions but an additional requirement for ArgoUML This is checked by checkstyle e Use javadoc for each class instance variable and method In general do not put comments in the body of a method If you are doing something complex enough to need a comment consider break ing it out into its own private commented method This is not required by the Sun Code Conventions but an additional requirement for ArgoUML This is partly checked by checkstyle Checkstyle does currently only warn if a javadoc comment is 109 Standards for coding in ArgoUML omitted for a public protected or default visibility variable or method Indicate places of future modifications with TODO reason This differs from the Sun Code Conventions that uses either XXX or FIXME depending on if it works or not Four spaces should be used as the unit of indentation Tabs must be set exactly every 8 spaces not 4 and represent
2. The purpose of this is to only get the images actually used copied with the document that uses them and not all images e The html is generated by processing the file manual argomanual generated xml The file manual argomanual generated xm is a temporary file that only exists while process ing the xml If editing the xml with a docbook editors you open the file manual argomanual xml and edit the unsubstituted file The differences between the unsubstituted file and the substituted file are so small that it shouldn t make any difference 2 3 3 Troubleshooting the development build 2 3 3 1 Compiling failed Any suggestions It might be that some other developer has made a mistake in checking in things that contain errors or forgotten to check in some files in a change Look at the last couple of hours on the developers mailing list http argoum1 tigris org servlets BrowseList listName dev It is probably on fire Another reason for problems is an unclean local source tree This means that if you have updated differ ent parts of your source tree at different times it might contain inconsistencies If you suspect this first try to fix it by doing build clean and cvs update d before trying to build again If that doesn t work re move your checked out copy completely and get it all again through CVS Another reason might be that you have an build properties or arr gouml build properties file that you have been working with earlier and
3. protected static Action _actionAssoc new CmdSetMode ModeCreatePolyEdge class edgeClass MAssociationImpl class Association The first argument is a GEF class that defines the type of behavior wanted in this case creating a poly edge The second and third arguments are a named parameter used by ModeCreatePolyEdge edgeClass and its value MAssociationImpl class The final argument is a tooltip The tool bar is actually created by defining a method init ToolBar which adds the tools in turn to 49 Inside the subsystems the tool bar a protected member named _toolBar The default constructor for the diagram is declared private since it must not be called directly The de sired constructor takes a name space as an argument and sets up a graph model UseCaseDiagram GraphModel1 layer perspective and renderer UseCaseDigramRenderer for nodes and edges 5 3 3 2 Changing the graph model The graph model is the bridge between the UML meta model representation of the design and the graph model of GEF They are found in the parent directory of the corresponding diagram class and have the general name YYYYDiagramGraphModel java where YYYY is the diagram name in bumpy caps For example the use case diagram graph model is in uml dia gram use_case UseCaseDiagramGraphModel java The graph model is defined as UMLMut ableGraphSupport a child of the GEF class Mutable GraphSupport and should i
4. Default wd localization key for diagrams public final static String DIAGRAM_BUNDLE DiagramType String naming the resource bundle to use for localization Ey protected String _bundle public DiagramHelper pub publi _bundle lic getDiagramResourceBundleKey void setModuleEnabled boolean v bool ean initializeModule publi bool ean inContext Object o return publi bool ean isModul eEnabled pub pub pub Lic lic lic Vector getModul return true true return true lePopUpActions Vector v boolean shutdownModule return true JMenuItem getDiagramMenulItem Object o return null return new JMenulItem Argo localize _bundle diagram_type public String getDiagramResourceBundleKey return DIAGRAM _ BUNDLE The extension of ArgoDiagram is specific to this example the plug in will provide a new ArgoUML diagr am 92 Extending ArgoUML a Important o Don t forget to do the localization stuff because the plug in might be used in all lan guages ArgoUML offers e do the localization stuff not plug in specific but important e create a pluggable resource bundle e create a new pluggable type 1 Create the plug ins interface In the package org argouml application api create an interfac
5. The Verifier does not agree The Verifier agrees with the Resolver about the resolution The Reporter d cks the resolution The Reporter does not accept the resolution The Reporter g gepts the resolution 127 Processes for the ArgoUML project 12 2 Attributes of an issue This is what the different attributes mean and how they are used in the ArgoUML project This is to be read as an addendum to the Tigris definition of the resolutions http argouml tigris org project www docs issue_lifecycle html and for that reason it is not a complete list 12 2 1 Priorities The priorities are used in the following manner in ArgoUML e PI Fatal error These issues are blockers for all releases Examples ArgoUML cannot start Crashes program jvm or computer and Significant loss of user data e 2 Serious error These issues are blockers for stable releases Examples Information lost e 3 Not so serious error Examples Functions not working Strange behavior and Exceptions logged e P4 Confusing behavior Examples Incorrect help texts and documentation Inconsistant behavior UI not updated and Incor rect javadoc e P5 Small problems Examples Spelling errors Ugly icons Excessive logging Missing javadoc 12 2 2 Resolutions e LATER Used to denote that a certain issue cannot be resolved until some special upcoming and planned for event has happened The event in question is noted in the
6. The following are sometimes provided as an override of the parent although for many uses the default is fine public void open enformrthe a tion associated with the open pop up menu on the element at the given index The default provided in the parent just navigates to that ele ment public boolean buBuikPopopeup Menu forthe ligstandwetuimwhethetak should be displayed Any actions will be associated with the item at the given index in the list This is built using UMLListMenulItem which can record the index rather than plain JListItem The default provides open add delete move up and move down with add disabled if there are already as many elements as the upper bound if any for the list open and delete disabled if there are no elements and move up and move down disabled if they cannot be invoked on the given ele ment The default implementation always returns true The following should be declared as needed to support particular pop up functions public void add iPerfotmdbe Actions associated with the add pop up menu on the element at the given index There is no default provided so this must be given if the add 60 Inside the subsystems operation is supported The addAtUtil method see below may prove helpful In this routine you may create a new NSUML entity There seem to be three ways to do this in order of preference 1 use a utility from the MMUtil class 2 use the NSUML Factory class t
7. goUML Besides this there are some improvements to the performance of the pump made in comparison to the situation without the pump The main improvement is that you can register for just one type of event and 35 Inside the subsystems not for all events fired by some model element In this respect the pump works as a filter fmodelelement1 MBase flistenerl MElementListener fmodelelement3 MBase listener MElementListener imodelelement1 MBase S flistenert MElementListener imodelelement2 MBase pump UmiModelEventPump flistener2 MElementListener imodelelement3 MBase flistener3 MElementListener The model event pump will replace all other event mechanisms for model events in the future These mechanisms like UMLChangeDispatch and ThirdPartyEventlisteners for those who are interested are DEPRECATED Do not use them therefore and do not use classes that use them 5 1 3 2 Public API You might wonder how does this all work Well very simple in fact A model event from now on a Event has a name that uniquely identifies the type of the event In most cases the name of the Event is equal to the name of the property that was changed in the model In fact there is even a 1 1 relationship between the type of Event and the property changed in the model There fore most listeners that need Events are only interested in one type of Event since they are only inter ested in the status of 1
8. has for some time been running it on a Cygwin system running build sh assuming that this will be the same as on any UNIX system How it is actually run on a Cygwin UNIX system is also noted Here are the steps to be done when one actually does a release 1 Tag the whole CVS repository with the freeze tag Normally this tag is VERSION_X_Y_Z_F e g VERSION_0_9_7_F The according command line CVS command is cvs rtag VERSION_X_Y_2Z_F argouml Because of a problem on the Tigris site this doesn t work Instead make sure you have a complete checked out copy of ArgoUML go to the root directory argoum1 and run the command cvs tag VERSION_X_Y_Z_F 2 These commands assume that you have set the CVSROOT correctly Make sure it is set to pserver user cvs tigris org cvs 3 Check the key to sign the jar files for java web start This is to make sure that you have a valid key for the purpose of signing the java web start version of the files Since the ArgoUML project and the Tigris organization are loose organizations we cannot buy a real key The keys we use are the unsigned keys that can be generated by anyone using the key tool provided with java A key is generated with the command keytool genkey alias argouml storepass secret By default these keys have a validity of just three 3 months but by giving the validity days the validity can be extended 4 Run the script argoum1 tools bin build release sh and give the answers
9. slot source 58 Inside the subsystems sourceFlow specialization specification state statel state2 state3 stateMachine stereotype stereotypeConstraint stimulus stimulus stimulus2 stimulus3 structuralFeature subject submachine submachineState subvertex supplier supplierDependency tag tagged Value target targetFlow targetScope templateParameter templateParameter2 templateParameter3 top 59 Inside the subsystems e transition e trigger e type e useCase e value e visibility when This list model should then be provided with a number of methods The following are mandatory since they are declared abstract in the parent protected void buRbiBinkis the Hst Of elements Called from targetChanged every time the tar get of the proppanel is changed protected boolearRetsiia tridifl tha entenG bejment 1s vitals e At may be added to the list of ele ments This function is called for many UML elements to determine if it fits in the list Remark The indication MBase is a remainder from the time that ArgoUML included direct references to the NSUML model all over the code Now it is a practical reminder of what we are dealing with amp Warning The following description is old and the property panels have undergone some fundamen tal changes since it was written It would be good if someone that knows how it works now could write a description on how it works now
10. 6 docs ant target 11 Documentation 10 work with 12 Dresden OCL Toolkit 86 E Explorer 31 F fop 6 G GEF 6 GUI Framework 30 70 guitests ant target 13 H Help system 30 71 I 118n 29 72 il8n teams 72 Internationalization 29 72 Internationalization teams 72 Issue Priority 128 Resolution 128 Issues 127 Closing 135 Mailing list 4 Resolving 132 Resolving Duplicate 134 Resolving Invalid 134 Resolving Rejected 134 Resolving Wontfix 134 Verifying Fixed 133 Verifying WORKSFORME 133 J Jason Robbins Dissertation 125 Java 32 66 Javadoc building 9 jdepend 6 JRE 29 JUnit 6 JUnit testing 13 L L10n 72 Language teams 72 list property files ant target 9 137 Index ListResourceBundles 72 Localization 72 LOG 77 log4j 6 Logger 77 Logging 29 M Mailing lists 4 Making a release 18 Martin Skinner Dissertation 125 Model 30 Module loader 31 N Navigator Tree 31 Notation 31 NSUML 6 understanding 94 O Object Explorer 31 OCL 33 85 P Persistence 65 Pluggable interface 31 prepare docs ant target 9 Priorities on Issues 128 Processes 127 Property panels 31 PropertyResourceBundles 72 R Repository contents 106 Resolution of Issues 128 Resolving Duplicate Issues 134 Invalid Issues 134 Rejected Issues 134 Wontfix Issues 134 ResourceBundles 72 Reverse Engineering 31 65 Java 66 Roles 130
11. CVS in the ArgoUML project This means that the editor or the developer goes through the file and removes M on every line or something else that touches every line in the file This is a problem because the subsequent commit will also touch every line in the file making that file unmergeable This means that every developer that had it modified in a branch or in a checked out copy will have no help from CVS when doing his merging Remember that you never know what other developers are working with This is fixed by not doing any such fixes and doing a cvs diff before each check in so that your editor has not done this for you 2 When CVS clients and file systems are not in sync This could result in one of several things Either each line gets an extra empty line when com mitted or the whole file turns out to be on the same line This is the case on several files in the repository at the moment August 2002 Linus and can be cumbersome for the developers These cases should be fixed because the files are no longer readable For the first case remov ing every other line the empty ones can in some cases be done without CVS having problems with merging later on For the second case with a single long line this will be very problematic so even though it might cause problems for other developers it is better to do this as soon as possible When this is fixed let the fix be the only thing done in that commit To avoid this in
12. REVb REVc that changes when the requirement change a text that is the requirement text to imple ment a rationale that is the description on why this is important a stakeholder that is one of the stake holders in the vision for who this is important 3 1 Requirements for Look and feel This describes how the ArgoUML look and feel shall behave 3 1 1 When multiple visual components are showing the same model element they shall be updated in a con sistent manner throughout the application REQ1 REVa Rationale There is no way of telling where the user is looking while working with ArgoUML For this reason he might be terribly confused if some other view that happens to show the same element is not showing the same thing Stakeholder User of ArgoUML 3 1 2 All views of a model element shall be update as soon as the model element is updated REQ2 REVb Rationale If a user makes an update of a part of the model an immediate feedback in all other parts that are currently showing might help him to get it right Stakeholder User of ArgoUML 3 1 3 Editable views of the model should update the model on each keystroke and mouse click REQ11 REVa Rationale If a user makes an update of a part of the model an immediate feedback in all other parts that are currently showing might help him to get it right 23 ArgoUML requirements Stakeholder User of ArgoUML 3 1 4 Any text fields that require validation sh
13. Table 5 1 How to work against the model What NS UML use only JMI MDR_ use only Model subsystem within Model subsystem within Model subsystem Test that an Object o has o instanceof mod CLASSNAME isI m a certain type Melelementtype nstanceOf RefObject o boolean toTest String class d Name boolean e 1 e 1 e m e n t t Y P 39 Inside the subsystems What NS UML use only JMI MDR_ use only Model subsystem within Model subsystem within Model subsystem o boolean Get a single valued modelelement RefFeatured Pp model element from an Mt ype prop obj refGetValue String r Object o 0 getert y model el propName o ement Type pP e r t o Model getFacade gety Object Get a multi valued prop modelelement RefFeatured pP erty from an Object o Mtype prop obj refGetValue String r o geterty Collec propName Collection o tion p e Lr t o Model getFacade get y Iterator or Collection total confusion Create a new model ele MFac CLASSNAME cre ModelEle ment of type Type tory getDefaultFactory atInstance String Type mentDo create Type Fac tory bui mod ele Lea men tty ar gs Model getmain ldpe or Mod elElement Fac tory cre m 0 d e 1 e 1 e m e n E t Yy 40 Inside the subsystems What NS UML use only JMI MDR_ use
14. The UMLSearchableComboBox allows editing the selected item See e g the Operation com bobox on the callevent properties panel 52 Inside the subsystems Then there is a variant with a seperate button for navigation to the property panel for the currently selected item This is supported by theUMLComboBoxNavigator class Used e g for the stereo type field e An editable multiline text area Supported by the UMLTextAreaz2 class Used e g for the text field of a UML Comment Examples of these fields in more detail follow below 5 4 1 1 Adding a simple list field For example we need to add a field to the use case property panel for the extends relationships that de rive from this use case This field consists of a label and a scrollable pane JScro11Pane containing the list JList which may be empty or contain extend relationships from this use case Rather than a straight JList we use its child UMLLinkedList which adds several features to the standard JList specifically for ArgoUML s properties panels The constructor for UMLLinkedList requires two arguments a list model and a flag to indicate whether to show an icon The list model should be a subclass of UMLModelElement ListModel2 a subclass of the Swing DefaultListModel which implements Abst ractListModel The UMLModelElementList Mode12 implements two interfaces one that listens to target changes and one that listens to UML model changes 5 4 1 1 1
15. The list model In our example we create UMLUseCaseExtendListModel Its constructor takes no arguments However we need to provide the parent class with a NSUML event name by invokeing the constructor of the parent class with the event name as parameter A string naming an NSUML event that should force a refresh of the list model A null value will cause all events to trigger a refresh The best way to identify the event you want to use is to look at the NSUML source for the container object MUseCaseImp1 in our example for calls to fireXXX The first argument is the name of the event in our case extend There is no definitive list but from the NSUML source these are all the names of events that are used e action e actionSequence e activator e activityGraph e actualArgument e addition e aggregation e alias 53 Inside the subsystems annotatedElement argument association associationEnd associationEndRole associationRole attribute attributeLink availableContents availableFeature availableQualifier base baseClass baseElement behavior behavioralFeature binding body bound callAction changeability changeExpression child classifier classifierInState classifierRole classifierRole1 client clientDependency collaboration 54 Inside the subsystems collaboration 1 comment communicationConnection communicationLink componentInstance concurrency condition connection constrai
16. This is done by returning false or throwing a Exception from the module enabling method The module loader also provides an API that the well behaving modules can use to test if the mod ules they depend on are enabled The less well behaving module can just throw an exception when they fail to enable themselves properly If a module cannot be disabled because some other module depends on it then this is signaled by re turning false from the disabling method e Where modules are loaded from The modules are loaded from the same places as in the old module loader They can be internally i e available in the core jar file of ArgoUML from the ext directory or if running from JavaWebStart they can be downloaded from the site To reduce the complexity of the downloads let s use it in the simplest possible way organize each module in a package and a jar file have the jnlp file list that jar file as a part and a package entry listing the classes have a file listing optional classes and a GUI that allows the user to download them Once a class is selected in the GUI it is loaded and the JavaWebStart class loader will guaran tee that it is available e The scope of the modules Modules are always enabled and disabled on a per application per jvm basis and not on a per project or per frame basis 5 19 OCL Purpose To allow for editing of strings in the OCL language The OCL is located in org argouml ocl The OCL is a Layer 3 subs
17. What libraries are needed and used by ArgoUML These libraries are provided in the development environment that you get when you check out CVS They are checked by the Java compiler when compiling needed for running ArgoUML and therefore distributed with ArgoUML NSUML the Novosoft UML library ArgoUML project doesn t include the developing of Java classes for the purpose of storing saving and loading an UML Model That work is done by NSUML and is used by ArgoUML GEF graph editing framework available from gef tigris org http gef tigris org It is also recommended that you check out GEF at the same time as you check out ArgoUML be cause many things in Argo relate to GEF and it is quite handy to have the source code available GFF is also residing at Tigris so you can do a simple cvs d user cvs tigris org cvs co gef with the same checkout arguments you had when you checked out ArgoUML to get it e The OCL package to parse and run the Object Constraint Language things Details about the package are available from SourceForge OCL Compiler http dresden ocl sourceforge net log4j a library with infrastructure for logs e antlrall the run time part of the ANTLR tool 2 2 Download from the CVS repository The CVS repository at Tigris is accessible using the pserver protocol The CVS root is cvs at cvs tigris org You use your Tigris login and Tigris password Building from source The first thing you will need to do
18. and what the problem is within that subproduct 4 Post a bug report in that subproducts bug reporting tool or find that a bug report already regis tered I am assuming that there is such a tool for the subproduct in question If there isn t then make the bug report to the person responsible for this product so that we are sure that the problem is commu nicated 5 Accept the issue set it to STARTED and enter the reference from the subproducts bug reporting tool and if possible the URL to the bug reporting tool or to the bug report in question I am assuming that there is a bug reporting tool for the subproducts If there isn t for the product in question then include all communications both ways in the issue You are now responsible to follow up on the upcoming releases of the subproduct If you don t think that you are the best person for this you should be since it was you that found that this problem is in the sub product assign the issue to the right person To follow up you should do the following 1 Look at each new release of that subproduct to see if the bug report is in fact stated as fixed in that release 2 If the bug report is fixed then you weight together the importance of the problem other bug reports that are also problems in ArgoUML that are solved in that release the amount of work needed to fit the new version of the subproduct instead of the old one the planned releases of the subproduct with promi
19. dards for coding in ArgoUML and Section 9 7 How to work Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Vili Change Log When What Who 2004 11 01 2004 10 29 2004 10 19 2004 10 11 2004 09 17 2004 09 16 2004 09 15 2004 08 17 2004 08 17 2004 08 02 2004 07 28 with Eclipse 3 Change to the way we generate documentation The FILE NAME id files are no longer used See Section 2 3 2 Generating documentation Change to the description on how to generate documentation Better explanation of how it works See Section 2 3 2 Generating docu mentation Change to How to Contribute Changed some spelling errors in cookbook in while at it See Sec tion 1 3 How to contribute Changes to description of module loader making the new module loader a fact See Section 5 18 Module loader and Section 6 2 Modules and PlugIns Change to the description on how to extend ArgoUML Now mod ule loader described See Chap ter 6 Extending ArgoUML Changed the meaning of RE SOLVED LATER See 7 f and g in Section 2 6 Making a release and Section 12 2 2 Resolutions Change to design of new module loader See Section 5 18 2 Design of the new Module Loader Deemphasized the layers and in stead describe the subsystem
20. is select the CVS client Most of the description below is about the command line CVS tool which is available for most operating systems Whatever tool you use do not checkout into a directory that contains spaces in a directory name some where in the path E g c Documents and Settings My Documents Java Devel opment violates this advise 3 times Reason You can not build the documentation BTW Building ArgoUML itself works In case you use the command line CVS client the above means that you will set the CVSROOT variable to pserver login cvs tigris org cvs where login is your Tigris login This needs to be done before the first checkout After that the root will be remembered by the checked out copy If you use one of the CVS clients with a graphical user interface like WinCVS GruntSpud or an IDE with a built in CVS client like Eclipse then configuration will be done by filling in fields These fields mean the following e Type pserver e User Your Tigris login name e Host cvs tigris org e Repository cvs If you used the command line CVS client before then your Tigris password is stored in the file cvspass Some graphical UI CVS clients are able to use this password in others you ll have to en ter it again The next thing to do is to login It is done using the command cvs login This only needs to be done once and then the account on your machine remembers this Then you do the actual checking
21. with the diagram in naviga tion_pane gif 123 10 5 Standards For Documentation Writing There is one exception to this and that is the description of the critics in the manual Each paragraph about a critic is instead marked with critics followed by the classname implementing that critic The reason for this is that the intention is to have the manual accessable when pressing the Help button on that critic Generating a link to the correct place in the manual is easier if the class name need not undergo some kind of textual transformation and the implementation doesn t care if a a specific critic is described in a sect1 sect2 sect3 or sect 4 Reorganizing the manual would otherwise affect also the java code The conversion to the correct tagname or really the cor rect URL is currently implemented in the defaultMoreInfoURL method in the org argouml cognitive critics Critic class e Only use glossterm for the term or its abbreviation acronym glossdef and glossseealso within glossentry Other entries are not implemented in the style sheets and so do not appear in the glossary e Use spaces rather than tabs Tabs are generally set so large the text moves over to the right of the page and are not set the same everywhere emacs uses 8 spaces some MS editors use 6 spaces making documents unreadable between users e The indentation size is 2 e Make a new line after each sentence or before expressions The Docbook sour
22. 7 2 Eclipse to help with the ArgoUML coding style 00 eee ee ee eeceneee eens 118 9 7 3 Eclipse to automatically find problems in the code ceeeeeeeeeeceeneeeeee teens 119 9 74 Settings for check Cl pse misasi ss vest sss Gsanassvetacdssesseepess odes sss EEEE E PEOR SPISS 120 9 7 5 R n the TUMittests 2c ccc sce cecse seein Sess A cdots bees E E EEE SEEE 120 10 Standards For Documentation Writing cece eee e cee ce eeee ceca cece eeaeeeae een eenneeeeeeee es 122 10 1 Introd CtiOn 23555 sesust steed pebineohs Gia e EEKE EAEE EA EEEE coerbrecesiaeeacutaeedes 122 10 2 Style eni seror vomeb ge EEEE aE PEE E OOS EE SEERA EE TERESE E POSEES 122 10 3 Document Conventions ssenari iis inesse n Se a oE TEASE E EEE E EEEE 122 10 4 DocBook Convention s v n aE se E E E eS 123 10 5 For Emacs Users soiree a a E oe E N tet ese T EE sh sume SERRER EREE 124 Lie Rurther Reading seen E a E N EE E E E N EE E ASS 125 VT Jason Robbins Dissertation presesses simonie e a anea E es eA R Eee 125 VL Dh ADStrach save dss obs te sad teks E E E E ER ee EE eae Sie 125 VET 2 Where tofindit isip onee oaee e sone ERE E EE Ee ANEDE SEDET 125 11 2 Martin Skinners Dissertation s ssseeesseeerseeserressrrrrsrrerrerrerrererrereerreerereerrereset 125 TVD A ABSa C re eea eera E T Ea E E TEE 125 1122 2 Where to find It cer iimeieneso resene n EE e doses eve sucks ou EEKE EEE ES 126 12 Processes for the Arso UME project rssi pii arris erisera c
23. ArgoUML is giving a complete appearance of being a tool for that language Setting this level of ambition for a language or creating a team for the language is pointless if there is no window system available for the language in questions I mean if neither the people working with Windows Linux KDE or Gnome or java has collected enough interest to do a trans lation of the basic infrastructure there is no point in doing so for ArgoUML My Windows 2k has 80 supported languages so I would think that this is a no issue 3 User environment translation This is the next level of ambition that can be set out by a Language Team that works really well and has plenty of translation resources left It means that not only the ArgoUML tool should be translated but also everything around it that the user sees i e the User Manual the Quick Guide the FAQ the Users part of the ArgoUML Web site Setting this level of ambition for a language is pointless if the problem domain does not exist in that language I mean if the professionals that use UML or other Software Engineering tools in their every day work don t use their native language to discuss UML concepts then there is no use in translating these concepts to their language they will not use the translation because they are more comfortable with the English concepts Note that the UML Specification does only exist in English and a natural part of this level of ambition would probably be to tr
24. B Oo Rot oc Eo mom 133 Processes for the ArgoUML project WORKSFORME 2 Run the specified release of ArgoUML You can also use any later release Use ArgoUML pro vided for downloads or through Java Web Start 3 Test the problem in the issue and verify that the problem is no longer there or the feature is pro vided 4 Do one of the following e Ifthe problem is gone the feature is present put the Issue in Status VERIFIED and add the ver sion of the ArgoUML used for the test in in the comment Remark As an additional activity the verifier may check if the manual needs to be adapted and if so may REOPEN the issue with an explanation text and setting the correct subcompo nent Documentation amp Help e Ifthe problem is still there the feature does not work put the Issue in Status REOPENED with a description of what is still there is still missing Also state what version of ArgoUML used for the test in the comment 5 If you during this have discovered other problems than the one stated in the Issue create new Is sues for those new problems according to the rule for creating Issues 6 Do this as many times as you like until there are no Issues left 12 6 How to verify an Issue that is rejected This can be performed by any member of the project any role There might be special skills involved but it differs widely depending on the nature of the Issue Do the following 1 Pick any issue that is
25. Click the Package symbol on the Edit pane tool bar Click on the dia gram Click the Class symbol on the Edit pane tool bar Click on the diagram Click the Interface sym bol on the Edit pane tool bar Click on the diagram Expected output The Class diagram and the explorer now contains one package one class and one in terface 17 Building from source Do Select the class Drag from the four quick buttons located along the sides of the class and release somewhere on the diagram Click on the fifth quick button bottom left of the class Select the inter face Drag from the quick button located along the bottom of the interface symbol and release some where on the diagram Expected output When releases on the diagram a new class is created both on the diagram where re leased and in the explorer The type of the association corresponds with the quick button type The asso ciation created when clicking the fifth quick button goes back to the class itself 2 6 Making a release The purpose of this chapter is to simplify for the person that is actually doing the release work and to make sure that everything is done in the exact same way every time and nothing is forgotten It is provided with the hopes of being helpful To understand this you need knowledge of how CVS works and how you normally build and test Ar goUML This instruction is supposed to work on a windows system running build bat The author Linus Tolke
26. In the Java perspective select the project argouml i e the icon at the top of the Package Explorer Then in the menu select Project gt Properties Enter Java Build Path Under Source Remove everything Add argouml1 src_new simply add a checkmark in front of the src_new folder icon Also add argouml tests argouml modules junit src and the src directories of all other modules The purpose of this is to have Eclipse recompile these and find compilation errors as soon as your changes to any API has affected them Currently July 2004 some of the modules don t compile Under Libraries Press the Add JARs button and add all files in argoum1 1ib Press the Add JARs button and add the file argouml tools ant 1 4 1 lib xerces 1 2 3 Jjar Press the Add JARs button and add the file argouml tools junit 3 7 junit jar Ev ery time any of these jars is updated in the project you will have to update this in your environment by entering this dialog and adding the new ones Set the Default output folder to argoum1 bin This will not confuse it with any of the ant built things Press OK You will be asked to accept that all resources previously built can be removed Press Yes Eclipse shall rebuild Verify that there are no errors just warnings left among the problems If there are errors in some of the modules you will be able to continue your work in spite of that but it is then perhaps best to remove those modules again from the Source l
27. NEW amp OPENED Look at your personal schedule and how much time you have during the next couple of weeks and compare that to the amount of time you think you will need to spend for solving the issue Compare this to the release plan to see what release your contribution will fit in Accept the Issue and reserve it by assigning it to yourself Set the Target Milestone to the release you have chosen Make sure you have a checked out copy of ArgoUML or else check out a new one How this is done is described in Chapter 2 Building from source Mark the issue as Started this could be done while assigning also Change the code to solve the problem Compile and test your new code This should include developing a JUnit test case to verify that the problem is solved You could also develop the JUnit test case before actually solving the problem If your solution did not work as intended continue changing it until it does If you feel that your estimation of the complexity of the problem and your own abilities and time available was incorrect then change the Target Milestone of the Issue to another one that fits your new estimation This is just a change of plan If you at this point feel that your personal plans have changed so that you won t have time to pur sue the work change the Issue back to NEW with your experiences sofar stated in the comment This means that you are giving up and giving the Issue back to anyone You should a
28. Not used Empty lib A set of jar files This directory contains the jar files of products used by the ArgoUML such as log4j NSUML These are distributed with ArgoUML and have licenses that allow this For clarity the README files and licenses and other distribution details of each used jar will also be stored in this directory Quick summary BSD License Apache License LGPL are OK GPL is not Don t forget to arrange for the modules version and license information to appear when starting ArgoUML and in the About box Take care also to make the versions of these libraries explicit so as to allow people building from sources to figure out exact dependencies Easiest way is to rename the files to include version infor mations the same way as shared libraries in Unix world foo x y z jar bar x y z jar etc modules Contains source level modules of ArgoUML Source level modules are modules that can be compiled and deployed independently after the rest of ArgoUML Each module is located in its own subdirectory This is the list as it looks now March 2003 e Jjscheme Module that allows to extend ArgoUML using scheme 107 CVS in the ArgoUML project e junit Old directory with JUnit tests These should be migrated to and all new JUnit tests should be cre ated in the directory tests e menutest Test module that tests the plug in interface for the menus php Language generating Notation and reverse engineering for PH
29. Round trip Engineering Java 66 run ant target 8 run with test panel ant target 13 S Saving Loading 65 Standards Coding 109 CVS 102 subproducts 135 subsystem 27 T Test cases an example 15 writing 13 Testing ArgoUML 13 13 tests ant target 13 To Do Items 30 80 Tools needed for building 5 used 5 Translators 72 Troubleshooting committing changes 13 development build 12 during the release work 21 U Unit testing of ArgoUML 13 13 Unix compilation 8 V Verifying Works for me Issues 133 W Web Site documentation 10 maintaining 10 Windows Compilation 8 Wizards 42 Workers 130 Writing test cases 13 X XSL style sheets 6 138
30. a clean compile build clean followed by build run or build package The build mechanism does not yet have reliable dependency checker enabled so this is the best way to make sure 5 If you have changed anything that has the potential of affecting something in a totally different part of the code like internal data structure handling of exceptions run all JUnit test cases and start the tool and do some more testing If in doubt run all JUnit test cases 6 Do a cvs update in src_new to make sure that you do not forget to commit any file and to make sure that no one else has committed anything in the mean time Remember that if you do not commit all the files from src_new that cvs update found marked A R and M in the same commit then you would better remove those file from the checked out copy update to get the original version from the repository and start over with the compilation If someone else have updated a file cvs update shown U or no longer pertinent please compile again 7 Commit all files that are included in a change at the same time This reduces the chance of anyone getting an inconsistent set of files by updating in the middle of your commit 8 Commit often Remember that the repository is also a backup copy of your work If your change is so big and involves so many files that you would like to commit it for backup rea 102 CVS in the ArgoUML project sons but it doesn t compile or doesn t
31. a set of source files but instead it is the complete development environment for all work within the ArgoUML project 2 1 1 Which tools do I need to build ArgoUML These are the tools not included in the CVS repository that you need to work with ArgoUML e A computer with a free disk space for your work 100MB is enough to download everything from the repository Currently March 2003 it is 68MB 150MB is enough to download all and build the tool and the documentation Currently March 2003 itis 114MB 250MB is enough to build it all javadocs documentation classes packages e CVS for getting the files and committing source code updates e JDK at least version 1 3 includes the Java compiler 2 1 2 Which tools are part of the ArgoUML development environment These tools are provided by the development environment that you get when you check out from CVS ANT the tool to manage compiling and packaging ANTLR for regenerating the built in parser Building from source JUnit for running the JUnit test cases JDepend for examining the code For building the documentation from docbook format these tools are also provided with the develop ment environment that you get when you check out from CVS e saxon for building documentation from docbook format Docbook XSL style sheets fop for generating PDF versions of the docbook format To build a PDF file with the pictures included you need Jimi 2 1 3
32. all works with the method removeModelEventListener PropertyChangeListener listener Object modelElement Str on the ModelEvent Pump like this Model getPump removeModelEventListener this modelelementIAmInterestediIn IamIn Now your object is not registered any more for this event type 5 1 3 2 3 Hey saw some other methods for adding and removing Yes there are some other method for adding and removing You can add a listener that is interested in ALL events fired by a certain model elements This works with the method addModelEventListener PropertyChangeListener listener Object modelelement As you can see no names of events you can register for here Furthermore you can add a listener that is interested in several types of events but coming from model element This is a convenience method for not having to call the methods explained in section Sec tion 5 1 3 2 1 How do I register a listener for a certain type event more than once It works via addModelEventListener PropertyChangeListener listener Object modelelement String You can pass the method an array of strings with event names in which your listener is interested Thirdly there is a very powerful method to register your listener to ALL events fired by a ALL model el ements of a certain class You can understand that using this method can have severe performance im pacts Therefore use it with care The method is addCl
33. an enhancement Another thing that could be is a bug that appears in very exceptional circumstances and that may have large impact on ArgoUML architecture If the Resolver decides after the investigation that this bug is really not that important or that he is not the right person to solve it he enters his findings as a comment and assigns the issue back to anyone issues argouml and moves along to work on another issue instead e If applicable program and test a solution As this might take considerable time it might be a good idea of the Resolver to assign the issue to himself to reserve the issue He can also signal progress by setting the issue to the state Started e If applicable write test cases e Set the issue in the end on Resolved When the resolver is finished with the issue he puts it in Resolved status and indicates the resolu tion is Fixed Worksforme Invalid Wontfix or Duplicate Skills The resolver needs to know a lot of the insides of the ArgoUML code Java coding standards and also the current status of the project with goals requirements and release plans 12 3 3 The Verifier The Verifier may be neither the Reporter nor the Resolver of the issue The task of the Verifier is to check the quality of the solution by confirming that the solution is complete to the point bug free etc This is an important part of the quality assurance work we do in the ArgoUML project and the object is to make sure that a
34. button_language code properties checkbox_language code properties combobox_language code properties When this is done the first iteration of the Tool translation is completed The work will probably be more maintenance like from here on Joi an existing Language Team Discuss with the Language Team in question by mailing the members They will hopefully have work prepared for you and greet you with open arms add or modify code with localized things This is only applicable for developers working with the ArgoUML Java source 1 Everywhere the user would see a string in the GUI you should localize a key This means that instead of writing a string you write a call to a localizer method with a key label or tag as argument and the localizer method finds the resolution of the key is in one of the property files You select one of the files for you key and name the key accordingly The key is a string The key has a special syntax like this wordl word2 word3 where word is the same as the first part of the filename that the key resides in Example The key action about argouml resides in the files action properties and lan action_guage code properties You will have to call the class org argouml il8n Translator to convert them to wherever they are used This is how a real example would look like import org argouml il8n Translator String localized Translator localize key 2 Add your key and reso
35. defined in the model and your PropPanel for that model element you should make the Fig class 1 For nodes that are Figs that are enclosed figures like FigClass extend from FigNodeMod elElement For edges that are lines like FigAssociation extend from FigEdgeMod elElement The name of the Fig has to start with yes indeed Fig The rest of the name should be equal to the model element name 2 Create a default constructor in the Fig In this default constructor the drawing of the actual figure is done Here you draw the lines and text fields See FigClass and FigAssociation for an ex ample of this 3 Create a constructor FigMyModelelement Object owner Set the owner in this method by calling set Owner Make a method set Owner that overrides it s super Let the method call it s 50 Inside the subsystems super Set all attributes of the Fig with data from it s owner in this setOwner method See se tOwner of FigAssociation for an example 4 Create an overridden method protected void modelChanged This method must be called and is if you implement the fig correctly if the owner changes In this method you update the fig if the model is changed See FigAssociation and FigClass for an example 5 If you have text that can be edited override the method textEdited FigText text In this method the edited text is parsed If the parsing is simple and not Notation specific just do it in textEdited But
36. different in level of support and implementation language Currently C has no reverse engineering but only code generation and a very simple one at that Java class files has only reverse engineering 69 Inside the subsystems ava classfiles 5 10 The GUI Framework 5 11 Purpose Provide an infrastructure with menus tabs and panes available for the other subsystems to fill with actions and contents This subsystem has no knowledge of UML Critics Diagrams or Model The GUI Framework is located in org argouml1 This is implemented directly on top of Swing and Java2 The GUI framework provides the following options e The menu with actions e The tool bar with actions e Explorer was called the Navigator Contains trees with configurable perspectives e Tabbed pane Could contain several different panes Application Purpose to provide the entry point when starting ArgoUML Responsibility to start the ball rolling The Application is located in org argouml application The entry point is called org argouml application Main 70 Inside the subsystems 5 11 1 What is loaded initialized It all begins in _ org argouml application Main set up main application frame org argouml ui ProjectBrowser the project org argouml kernel Project numerous classes and finally as a background thread cognitive support org argouml cognitive Designer and some more classes The ProjectBrowser i
37. explanation is something like javahelp propertypanel cppcodegeneration e owner is a self explaining code for the owner of the branch e g tlach Thierry Lach or mkl Markus Klink Merging branches together is causing some work So please use them sparingly and announce your in tentions before on the mailing list 8 2 1 How do I commit stuff You have made the change tested it and are satisfied with it Do a cvs update d and see that only the files you have changed are marked as modified If files are updated or patched by this command please recompile and test again Do a cvs diff on each of the files and verify that only the lines you have changed are modified Do a single cvs commit for all the files included in the change This reduces the risk that someone else updates in the middle of your work and also reduces the amount of notifications of commits sent out Include changes to documentation and JUnit tests if applicable Don t forget to update the corresponding issue if any in Issuezilla i e set it to RESOLVED FIXED 103 CVS in the ArgoUML project get my update or patch into CVS if I don t have CVS write rights Contact any of the active developers on the list and send them your updates They re very nice about it the first few times Supposing that you have checked out CVS as guest then after you have mailed a diff or file to an ac tive developer and he has entered it in CVS your checked ou
38. for most cases delegate to ParserDisplay See the method parseAttribute in ParserDisplay for an example Stick to the Notation you are using to have the right parsing scheme There is work to be done here but please don t make it an even bigger mess 6 Make an Action that can be called from the GUI If you are lucky you just can use CmdCreateN ode See for examples UMLClassDiagram of using CndCreateNode 7 Adapt the method canAddEdge Object o on subclasses of GraphModel if you are build ing an edge so it will return true if the edge may be added to the subclass Subclasses are for exam ple ClassDiagramGraphModel and UseCaseDiagramGraphModel If you are building a node adapt canAddNode Object o 8 Adapt the method get FigEdgeFor on implementors of GraphEdgeRenderer if you are im plementing an edge so it will return the correct FigEdge for your object If you are implementing anode adapt the method get FigNodeFor on implementors of GraphNodeRenderer In Ar goUML classes like ClassDiagramRenderer implement these interfaces 9 Add an image file for the buttons to the resource directory org argouml Images This image file must be of GIF format and have a drawing of the button image to be used in itself This image is also used on the PropPanel The name of the Image file should be model element gif 10 Add buttons to the action you created on those places in the GUI that have a need for it This should be at least the butt
39. for your understanding of the project and the code Check out the source from CVS and build Subscribe to the dev list The purpose of this is to see what the developers are discussing in the project Monitor the discussions and as soon as you see something discussed where you have an opinion jump right in Familiarize yourself with the code For this a good knowledge of Java is more or less a prerequisite Suggestion on how to go about this a b Take active part in the discussions on the dev list Solve issues registered in Issuezilla Convince someone to commit your changes Establish a relationship with one developer that has volunteered to help you with the commits That developer will check that your code reaches the quality level that we strive for in the project and obeys the design Introduction d Repeat This can go on until the developer helping you knows that you have good knowledge of the project quality and design and the main problem for you two is that the sending waiting com mitting updating et c is extra work 8 Apply for a Developer role This allows you to do commits on your own and you can now increase the pace in which you are working while also increasing your responsibilities in the project This role is granted by the Project leader after he is convinced that you have learned the enough about the project w r t e Understanding and accepting the goals e Understanding wh
40. in ArgoUML This is because ArgoUML is traditionally built as a whole and no subsystems were clearly defined A Facade class provides the most common functions other subsystems want to do when using that subsystems to reduce the need of having to use anything else but the Facade class The Facade class should be very much more stable than the subsystem itself Methods in the Facade should change re ally slowly and only be removed after several months and one stable release of deprecation The Facade class is documented in the class file itself as javadoc and the more complex picture if needed is documented in the Cookbook in Chapter 5 Inside the subsystems e An API with calls to public or protected methods 28 ArgoUML Design The Big Picture Traditionally the subsystems in ArgoUML communicate through public methods and public vari ables and the subsystems as defined by the responsibilities are spread over several packages setting aside the Java visibility rules For this reason it is not well known or documented what public meth ods form part of a subsystem s API and what public methods are internal to a subsystem For this reason always exercise extreme caution when changing the signature of a public method See Sec tion 8 1 How to work against the CVS repository In order to improve things make it very clear when encountering and understanding the purpose of a public method or class if it is part of the sub
41. interface is treated similar to a extended class The objects are placed in rows then that depend on their rank rank 0 1st row rank 1 2nd row below the Ist one etc Example R ank 0 F ank 1 R ank 2 In the next diagram a link goes to an object that is not in the row above 67 Inside the subsystems Rank Q0 Rank 1 Rank 2 In this case insert virtual objects which are linked to the actual target and link to them Rank 0 Rank 1 Rank 2 The objects are sorted within their row then to minimize crossing links between them Compute the av erage value of the vertical positions of all linked objects in the row above Example we have 2 ranks 0 and 1 with 3 classes each 68 Inside the subsystems ABC rank 0 DEF rank 1 We give the super classes an index in their rank assuming that they are already sorted A 0 B 1 C 2 D E F have the following links A B C could be interfaces so I allow links to multiple super classes here D gt C E gt A and C F gt A and B Compute the average value of the indexes D 2 C has index 2 1 link E 0 2 2 1 A 0 C 2 divide by 2 links F 0 1 2 0 5 A 0 B 1 2 links Then sort the subclasses by that value F is 0 5 E is 1 DGs 2 So the placement is ABC here are the links but I can hardly paint them as ASCIIs FED 5 9 Other languages Each other language supported by ArgoUML has its own subsystem They are each
42. is only one 1ib directory e Building Assuming that the subproduct is distributed in a set of jar files add the jar files to the list of files that are to be included when building ArgoUML One place in default properties Four places in build xml targets init tree places prerequisites package two places new target sub check product and One possibly place in About Box java Constructor Notice especially that build xml shall not contain any version information Notice also that the text in About Box java shall not contain anything that needs to be localized but just the subproduct name refer ence and possibly version Check by having some class from the subproduct loaded immediatly when starting ArgoUML and start using build run e Running from modules With the current modules set up in argouml modules the idea is that we are supposed to be able to start ArgoUML from any of the modules directory This means that whenever changing the list of modules you will have to update the classpaths in all these modules Go through the list of files argouml modules build xml and update Check by having some class from the subproduct loaded immediatly when starting ArgoUML and start in each of these directories e Distribution Assuming that the subproduct is distributed in a set of jar files add the jar files to the list of files that are to be included when releasing ArgoUML One place in build xml target dist javawebstart O
43. it to 45 Inside the subsystems CriticUtils rather than putting it in your critic For commented examples to copy look at org argouml pattern cognitive critics CrConsiderSingleton org argouml pattern cognitive critics CrSingletonViolated and org argouml uml cognitive critics CrConstructorNeeded e fix a critique Locate the critique and insert some logging code You should make sure that you understand all the implications of changes therefore it is a good idea to see what makes the critic nag in the first place But rest assured some of the critics haven t been updated to reflect the latest changes in ArgoUML so this is a procedure which is well worth digging into since it gives you also some exposure to re lated NSUML elements e change the text of a critique The texts of the critics should be in the according localization files and resource bundles Be careful in some critics the text is still in the critic but if you change that you will notice that it doesn t have any effect e get my critic to trigger This is a suggested way to troubleshoot if the critic doesn t trigger 1 Check that the settings for critics are enabled Toggle Auto Critique 2 Check that your critic is registered in org argouml uml cognitive critics Init with the right class e g check inheritance structure against UML spec 3 Check that your particular critic is enabled in Browse Critics 4 IMPORTANT Check
44. may have changed the size of the list The de fault just sets a flag which will ensure recalcModelElementSize see above is invoked as needed public Object forRetimlamebyectMiiodaablyamStuing gt thaneepresents an element The default provided in the parent defers this to the container which in turn defers it to the current profile This is usually perfectly satisfactory public void targe athedrykeen the number of elements in the displayed list including none may have changed Default invokes the necessary Swing operations to advise of a change in list size public void target kedswleentthd navigation history has been changed and navigation buttons may need changing Not clear why anything is needed but default recomputes the list size and invokes the necessary Swing operations public void roledApitteof thenSSUNE EmentListenet interface Called when an add event hap pens i e some NSUML object has been added The default provided looks to see if the event is the role name we declared or we are listening to all events and if so looks to see if it relates to an element in our list If so Swing is noti 61 Inside the subsystems fied that the element has been added public void roleRpartcofealid NSUEMLMiveathasterter enterfacee fabled when a remove event hap pens i e some NSUML object has been removed The default provided looks to see if the event is the role name we declared or we are listening to all
45. might still allow the application to continue running Everything known about the reasons for this error condition shall be logged e The WARN level designates potentially harmful situations This is if CG can t find all the informa tion required and has to make something up e The INFO level designates informational messages that highlight the progress of the application at coarse grained level This typically involves creating modules subsystems and singletons loading and saving of files imported files opening and closing files 76 Inside the subsystems e The DEBUG Level designates fine grained informational events that are most useful to debug an ap plication This could be everything happening within the application This list is ordered according to the priority of these logging entries i e if logging on level WARN is en abled for a particular class package all logging entries that belong to the above levels ERROR and FA TAL are logged as well For performance reasons it is advised to do a check before frequently passed DEBUG and INFO log4j messages see Example 5 2 Improving on speed performance The purpose of this test is to avoid the creation of the argument 5 14 2 How to Create Log Entries You should not use System out printin in ArgoUML Java Code The only exception of this rule is for output in non GUI mode like to print the usage message in Main java To make log entries from within yo
46. needs to be done for all components that has the same release scheme Also see that the numbering is the same in all components and that it is in the correct chronological order except for the not yet done releases that come before the already completed c Change the target milestones of all the not yet resolved issues for this release to d Change the target milestones of any fixed issue in component argouml with target milestone to that of the current release This is probably some developer that has fixed an issue by forgot to set the target milestone correctly e Move all issues reported on current to this release for the component argouml These items were reported between the previous version and this version Since current will be reused for the next release they need to be locked to the closest release to where they were found f Reopen RESOLVED REMIND This can also be a good time to change all RESOLVED REMIND Search for them and Re open them g Check RESOLVED LATER It could also be good to check that all RESOLVED LATER has a valid target milstone must be an upcoming milestone Search for them and Reopen the ones that havn t Also if the 20 Building from source milestone denotes or is going to be resolved in the upcoming release Reopen them with a comment that they are now active Make announcements Write a News announcements and a short note on the dev users and announce lists
47. not the same as the version in the comment then this probably means that problem was fixed in some release without anyone noticing that this prob 129 Processes for the ArgoUML project lem was fixed 12 3 Roles Of The Workers The roles described below are per issue i e for every issue there is at least a reporter a resolver and a verifier Hence each person involved in issues for the ArgoUML project can at the same time have different roles and consequently has issues to report issues to close issues to resolve and issues to ver ify 12 3 1 The Reporter The Reporter is the person who enters the issue in Issuezilla Skills The reporter is an ArgoUML user should not need any knowledge of what the ArgoUML project is actually doing Responsibilities e Report an issue The address to enter new issues is _ http argouml tigris org issues enter_bug cgi http argouml tigris org issues enter_bug cgi For entering new issues registering as described in 1 3 is not required e Answer clarification requests Occasionally the developers of ArgoUML need to request the Reporter more information to be able to solve the issue correctly Another way of putting it is to say that if the issue was reported without some vital information the Reporter has some more work to do e Close the issue This applies to an issue that is in verified state only At the end of processing the issue the reporter has the final word
48. number sb append i sb append is sb append entry i toString LOG debug sb toString If the entry i is some object with a lot of calculations when toString is called and the logging state ment is passed often some action needs to be taken If the toString methods are simple you are still stuck with the overhead of creating a StringBuffer and a String from the sb toString statement 78 Inside the subsystems 5 14 3 How to Enable Logging log4j uses the command line parameter Dlog4j configuration URL to configure itself where URL points to the location of your log4j configuration file Example 5 3 Various URLs org argouml resource filename lcf o http localhost shared argouml filename lcf file home username filename Ilcf 3 Reference to a configuration file filename lcf within argouml jar Reference to a configuration file filename lcf on a remote server localhost Reference to a configuration file filename lcf on your localmachine 5 14 3 1 when running ArgoUML from the command line There are currently two possibilities of running ArgoUML from the command line 1 Run ArgoUML using argouml jar 2 Run ArgoUML using the ant script In the first case the configuration file is specified directly on the command line whereas in the latter case this parameter is specified in the build xml which in that case needs to be modified Ar goUML is then started as
49. only Model subsystem within Model subsystem within Model subsystem pel to create them com pletely empty Delete a model element Model getUmlFactory delete ob ject Register for notification MBase MDRChangeSource _ Model getPump addMo that a model element Ob 0 addMElementListener obj addChangeListener delEventLis ject o has changed MElementListener el tener PropertyChangeLi stener li Object o String eventnames Register for notification Not possible MDRChangeSource Model getPump addMo on all model elements of obj refClass addChang delEventLis a certain type Type eListener tener PropertyChangeLi stener li Object Model getMetaTypes g etMWODELELEMENT TYPEQ String event names How do I get the model new XMI new XMIWriter Handled by the Persis as XMI on the stream Writer MModel m tence subsystem Stream Writer Stream gen 5 1 5 How do I add a new model element Make a parameterless build method for your NSUML model element in one of the UML Factories for instance CoreFactory Stick to the UML 1 3 spec to choose the correct Factory The pack age structure under org argouml model uml1 follows the chapters in the UML spec so get it and read it In the build method create a new model element using the appropriate create method in the factory The build method e g is a wrapper around the create method For all elements there ar
50. out cvs checkout directory The CVS repository directories you need to check out to work with ArgoUML are argoum1 1ib argouml tools argouml src_new argouml src and argouml tests If you want to build the documentation you check out the directories argouml lib argouml1 tools and argouml documentation If you want to work with the web site you check out the directory argouml www If you give the argument argoum1 all of ArgoUML is checked out That is no problem except for the extra use of bandwidth and disk space but if you have plenty of both get it all and eventually you will see how everything is used for a purpose in the project If you don t want to acquire a Tigris login to do this you can use the guest account with the password guest Since the checked out copy remembers the login you used to do the check out if you do this you will have to remember to delete this copy and start over if you get a developer role in the project and want to do commits directly 2 3 Build Process The ArgoUML build process is driven by ANT and it is highly recommend that you stick to that There are people known to build from JBuilder or Netbeans but always make sure that your work compile with the plain vanilla build process Building from source Ant is a tool written in Java developed for Apache that reads an XML file with rules telling what to compile to what result and what files to include in what jar file The rule file is
51. tArg name String value Object void Age tArginame String Object getAngs0 Hashtable setArgs h Hashtable void toDolte midm Object dsgr void CrConside Singleton C rConside rSingletong Resdi s String void predicate 2 dm Object dsgr Designer boolean from org argouml cognitice critics CrUML from org argouml uml cognitice critics CAREFUL attribute s and methods missing from org argouml patte rn cognitive critics 43 Inside the subsystems Critics are currently located in org argouml cognitive critics These are basic critics which are very general in nature For example ArgoUML keeps nagging when Model elements overlap which makes the Diagram hard to read This package also contains the base classes for the handling org argouml uml cognitive critics These are Critics which are directly related to UML issues well more or less For example it will nag when a class has too many operations because that makes it hard to maintain the particular class This package also contains Wizards used by these Critiques org argouml pattern cognitive critics These are critics related to patterns Currently they deal only with the Singleton pattern org argouml language java cognitive critics These are critics which deal with java specific issues Currently this is only a warning against model ing multiple inheritance Th
52. that is doing some thing If in doubt remove those files 12 Building from source If nothing helps ask the developers mailing list mailto dev argoum1 tigris org 2 3 3 2 Can t commit my changes You need to have a developer role in the ArgoUML project If you don t then you cannot do commit yourself Discuss what you have done and how best to test it on the developers mailing list mailto dev argoum tigris org Eventually someone will commit it for you Furthermore the checkout of your copy needs to be done with your Tigris id that has the Developer role If you for some reason have earlier checked out a copy as guest and then made modifications changed the CVSROOT variable you still cannot commit changes done in the repository since the checked out copy contains information on who checked out For this reason it is best to apply for an Observer role in the project if you are going to work with the source at all The Observer role is probably granted within a couple of days we welcome everybody and then you can check out with your Tigris id This means that when you eventually are granted a Developer role you can continue working with the same checked out copy 2 4 The JUnit test cases ArgoUML has a set of automatic test cases using JUnit framework for testing the insides of the code The purpose of these are to help in pin pointing problems with code changes before even starting Ar goUML The JUnit test cases are
53. the branch in question If not this could be any checked out copy of the source that does not contain any uncommitted changes 2 Enter the argouml directory cd argouml or chdir argoum 3 Move the checked out copy that you are working on to the main branch cvs update A 4 Merge the changes from the branch into your checked out copy cvs update j work_xxxyyy_myname 5 Compile and run all your tests again This is to verify that the merge was all right no one else had done any changes that in the meantime that has in any way modified the work made in the branch 104 CVS in the ArgoUML project 6 Commit your changes in the main branch cvs commit m xxxyyy entered in the main branch 7 Discontinue your branch From this point on it is important that you do not reuse your branch for any work Only check it out for the purpose of examining how things were in the branch Make sure that all other devel opers that have been looking at your branch also knows that it is discontinued look at someone else s work in a branch You need the name of the branch i e the work_xxxyyy_hisname There are two alternatives e Check out ArgoUML or part of it on that branch cvs co r work_xxxyyy_hisname argouml e Update your copy of ArgoUML to be on that branch cvs update r work_xxxyyy_hisname Make sure that your copy does not have any uncommitted code or else your uncommitted code will be present in your checked out copy on the b
54. the following e Ifyou are satisfied put the Issue in Status CLOSED e If you are not satisfied but the problem is solved as it is written in the Issue put the Issue in Sta tus CLOSED and open a new Issue with the rest of the problem e If you are not satisfied and the problem is not solved put the Issue in status REOPENED with a description on what you are not satisfied with 12 8 How to relate issues to problems in sub products ArgoUML uses products internally and is very dependant on that these products are functioning well This are products like GEF NS UML ocl log4j xerces jre Occasionally a problem found in ArgoUML is found to be a problem in one of these subproducts and cannot or is extremely complicated to fix within ArgoUML If this happens this is the way to handle this problem This can be performed by any member of the project any role There might be special skills involved depending on the nature of the problem In this description issue means a issue in issuezilla bug re port means a bug report in some other project and problem denotes the conceptual problem Do the following 135 Processes for the ArgoUML project 1 During your examination of an issue you find that the problem is in one of the ArgoUML subprod ucts GEF NS UML ocl jre 2 Make sure that the issue is assigned to you 3 Write a comment in the issue stating which one of the subproducts that has the problem
55. the label for the field and addField to add the associated scroll pane The second argument of each of these identifies the index of the caption field pair in the vertical column of the grid for this property panel The third argument identifies the column index The final argument is a vertical weighting to expand the field if there is room in the property tab This is usually set to the same non zero value for all fields and corresponding captions that can have multiple entries so they ex pand equally If none of the fields should expand the caption only of the last field in each column should be given a non zero value Adding Property Tab Tool bar Buttons These are added by creating new instances of PropPanelButton you don t need to assign them to anything just creating will do This has six arguments e The container i e this property panel usually just use this e The panel for the buttons Use but tonPanel which is inherited from PropPanel e The icon Lots of these are already defined in PropPanel e The advisory text for the button Use localize string to ensure international portability e The name of the method to invoke when this button is used Some of the standard ones e g for navi gation are provided but you will need to write any specials e The name of the method if any to invoke to see if this button should be enabled Use nu11 if the button should always be enabled In our example the extend prope
56. to enable modules from within a running ArgoUML This module system is the extension capability to the ArgoUML tool It will give developers of Ar goUML and developers of applications running within the ArgoUML architecture the ability to add additional functionality to the ArgoUML environment without modifying the basic ArgoUML tool This flexibility should encourage additional open source and or commercial involvement with the open source UML tool The module extensions will load when ArgoUML starts When the modules are loaded they have the capability of attaching to internal ArgoUML architectural elements Once the plugins are attached the plugins will receive calls at the right moment and can perform the correct action at that point Modules can be internal and external The only difference is that the internal modules are part of the argouml jar and the external are delivered as separate jar files e Plugins Note Ce g This description is for the old moduleloader A plug in in ArgoUML is a module that implements the org argouml application api Pluggable interface The Pluggable interface acts as a passive dynamic component i e it provides methods to sim plify the attaching of calls at the correct places There are several Pluggable interfaces that each simplify the addition of one kind of object Examples PluggableMenu PluggableNotation One Module can implement several Pluggable interfaces This is essentially and implement
57. to look at the result or when you want to present the final result on the web site There are currently three different books generated in this way each into its own directory They are 10 Building from source cookbook this document manual and quick guide They are all generated and stored in the exact same way except for the name of the directory that is one of cookbook manual or quick guide Below I will reference these directories using book When a new version of the documentation is to be made available on the web site the responsible docu ment release person does the following 1 He checks out everything needed and a copy of the argoum1 www If wanted the CVS repository could be tagged and then the tag can be checked out This makes it possible to know exactly how a certain version of the documentation was generated 2 The documentation is generated using build docs This generates all three books and the result appears in argouml build documentation defaulthtml book argouml build documentation printablehtml book and argouml1 build documentation pdf book This has been done several times before while preparing the release so no problems are expected If there are problems then the preparations were not good enough and the process is best stopped right here 3 All the old files are removed from the checked out copy of argouml www documentation defaulthtml book argouml www documentation printablehtm
58. usual with build run Example 5 4 Command Line for argouml jar localhost billy java Dlog4j configuration URL jar argouml jar Example 5 5 Modification of build xml lt gt lt Run ArgoUML from compiled sources gt lt gt lt target name run depends compile gt lt echo message Executing Name gt lt Uncomment the sysproperty and change the value if you want gt lt java classname org argouml application Main fork yes classpath build dest classpath gt 79 Inside the subsystems lt sysproperty key log4j configuration value org argouml resource filename lcf gt lt sysproperty gt lt java gt lt target gt 5 14 3 2 when running ArgoUML from WebStart To view the console output the WebStart user has to set Enable Java Console in the Java Web Start preferences In the same dialog there is also an option to save the Console Output to a file As you cannot provide any userspecific parameters to a WebStart Application from within WebStart it is currently not possible to choose log4j configuration when running ArgoUML from Java Web Start 5 14 3 3 when running ArgoUML from NetBeans At the time of writing this paragraph it is not possible to set the logging configuration file on a per project basis in NetBeans Instead the Global Options of Debbuging and Execution Execution Types External Execution External Proce
59. work or for some other reason should not confuse the main branch in CVS create a branch to work in Then when your work is complete you merge the branch into the main branch Rationale These ground rules is for the purpose of not stopping or hindering the work for anyone Re member that there might be several developers working with different agendas and different efficiency slower or faster and the commits is the melting point of this Perspective If this will take you an extra two minutes before every commit remember that if you com mit something that will not work this will take everyone else guess 10 persons the extra time of look ing at the compilation error or see the tool crash 1 minute wonder why 1 minute search for the error in his own changes 3 minutes search for the error somewhere else 1 minute glance at the mailing list to see if someone else has noticed this and send a mail 1 minute wait for some response 1 hour wait update 1 minute compile 1 minute This amounts to 10 hours wait and 1 5 hours extra work for all developers in the project 8 2 Creating and using branches We use the following standards in ArgoUML Released versions get the tag VERSION_X_X_X Developers working on code with an unspecified due date are requested to put the code into a branch if it is deemed useful that the code can be shared Developer branches follow the scheme work_explanation_owner where e work is a literal e
60. 1 What the ModuleLoader does The ModuleLoader is looking for module jars It actually scans through all jars available in the ext direc tory See Edit Settings Environment tab If you turn on logging on the debug level while running Ar goUML you should be able to see what jar files it finds and what it does with them A module jar contains the classes resources and a manifest file The manifest file points out the class to be loaded Also notice that the Specification Title and Vendor must be specified correctly for this to work 5 18 2 Design of the new Module Loader The plan is to implement this new Module Loader then have them both working side by side for several releases two stable releases and if we all are happy with it then remove the old module loader Design e We use a Loadable Proxy Pattern for the modules e Each module can be enabled and disabled individually Dependencies between modules is allowed although not yet handled gracefully e Each module is required to have one 1 class that implements ModuleInterface That class and all other classes that constitute the module needs to be made available for some class loader either by including it in the classpath or by letting the module loader hunt for it e The modules are allowed to use all the APIs available from all the subsystems within ArgoUML and from other modules This is a big improvement over the old module loader in that e We use the same AP
61. 1 7 There shall be no indication of an exception on the screen or in the log if it has occured merely because of a user mistyping or not being aware of UML syntax REQ3 REVa Rationale An exception in the log or on the screen is always the sign of a serious error in the application that should be reported as a DEFECT If a mistyping generates such a problem the user might loose in terest in ArgoUML as a tool because he percieves it as not working correctly Stakeholder User of ArgoUML 24 ArgoUML requirements 3 1 8 All text fields shall have context sensitive help As follows 1 A tooltip that explains the data and format expected by the particular field This can be omitted when there is a header stating the data of the field and the format is obvious 2 Pressing F1 or choosing help from the menu shall display a popup window explaining for data and format required by the current input field Input focus shall be left on the field during any user in teraction with the popup dragging scrolling or closing REQ4 REVa Rationale Throughout a complex application like ArgoUML there are lots of text fields Unless there is a possibility to always get this kind of help the user might not be able to make out what he is actually supposed to do in that field Stakeholder User of ArgoUML 3 2 Requirements for UML 3 2 1 ArgoUML shall be a correct implementation of the UML 1 3 model REQ5 REVa Rationale The vision of
62. 2 indents This is exactly as it is stated in the Sun Code Conventions It is here just for the emphasis This is checked by checkstyle If possible use lines shorter than 80 characters wide This is exactly as it is stated in the Sun Code Conventions It is here just for the emphasis This is checked by checkstyle Checkstyle ignores three kinds of lines in this check because of the historical use of long class names and package names These are lines that contain what Id ever import statements and javadoc comments with see tags Open brace on same line at end Both for if while for and for class and functions definitions This is exactly as it is stated in the Sun Code Conventions It is here just for the emphasis Use deprecation when removing public and protected classes methods and attributes Whenever you have a public or protected method or attribute in a class or a public class that you want to remove change the signature in an incompatible way or make change visibility for you shall always deprecate it first After the next stable release you or someone else can remove it In the future when the subsystems are well defined and it is clear what public or protected methods attributes or classes that are part of a certain subsystem s exported interface we can allow an excep tion to this rule for methods attributes and classes that are not See Section 4 2 Relationship of the subsystems Write deprecation
63. 3 01 2005 02 01 2005 01 30 2005 01 29 2005 01 26 2005 01 07 2004 12 30 Change to process for verifying issues Any release after the one where the issue is fixed can be used for verifications See Sec tion 12 5 How to verify an Issue that is FIXED Change to description of how to build src directory is now in volved See Chapter 2 Building from source Removed the modules compo nent See 7 Change to Model subsystem See Section 5 1 Model 34 Se tion 5 3 Diagrams Added the Persistence subsystem More work is needed See Section 5 5 Persistence Change to the description on how to use the Model subsystem the ModelFacade does not exist any more See Section 5 1 4 How to work against the model Change to Model subsystem chapter Removed references to UmlEventPump and clearified how to remove elements using the UmlFactory See Sec tion 5 1 3 2 1 How do I register a listener for a certain type event and Section 5 1 4 How to work against the model Change to requirement of JDK version support See Sec tion 3 3 1 Choice of JRE Ar goUML will support any JRE compatible with a Sun specifica tion of any JRE from Sun that has not begun the Sun End of Life EOL process Added copyright notices to the files Change the default year in the copyright notices Yes I am a lit tle early See Chapter 9 Stan
64. Announcer should make sure that he she is already subscribed to all lists with a reference to the news item The announcement shall include a statement on what kind of release this is information on what has changed for stable releases this is a list of what has changed since the last stable release the list of resolved issues a list of serious known problems with this release stable releases shouldn t have any technical details on how the release was built and the plan for the following release Freshmeat currently Thierry Lach does the Freshmeat announcements which require a login so just inform him 2 6 1 The release did not work This shouldn t happen This really shouldn t happen The reason that this has happened is that one of the developers has made a mistake You now must de cide a way forward 2 6 1 1 Fix the problem yourself If the problem is obvious to you and you can fix it quickly do so This is done by doing the following Make the release tag into a branch cvs rtag b r VERSION_X_Y_Z FBRANCH_ X Y Z Update your checked out copy to be on that branch cvs update r BRANCH_X Y Z Fix the problem in your checked out copy Commit the problem in the branch cvs commit m Fix of problem blabla Continue the build process This is done by restarting the build dist release command and from that point on working in the branch instead of at the tag Explain to the culprit what mistakes he has made and how to fix
65. ArgoUML is to provide a tool that helps people work with an UML model The UML model might later on be used in some other tool If the implementation is not correct then Ar goUML will not be compatible with that other tool or the user will be confused There might be a lot of tough decisions when it comes to if it is ArgoUML or some other tool that deviates from the UML 1 3 but there shall never be any doubt that the intention of ArgoUML is to implement UML correctly Stakeholder User of ArgoUML 3 2 2 ArgoUML shall implement everything in the UML 1 3 model REQ6 REVa Rationale The ambition is to implement all of UML This means that no matter how you use UML Ar goUML will always be a working tool Stakeholder User of ArgoUML 3 3 Requirements on java and jvm 3 3 1 Choice of JRE ArgoUML will support any JRE compatible with a Sun specification of any JRE from Sun that has not begun the Sun End of Life EOL process 25 3 3 2 3 3 3 ArgoUML requirements REQ7 REVb Rationale The JREs and the adjoining libraries especially swing are always improving to include new features and new ideas The developers of ArgoUML would like to use these new features Note J2SE 1 3 1 begun its Sun End of Life EOL process on October 25 2004 Stakeholder Developers of ArgoUML Download and start It shall be possible to install ArgoUML locally on the machine and use without Internet connection REQ8 REVa Rationale ArgoUM
66. Cookbook for Developers of ArgoUML An introduction to Developing ArgoUML Edited by Linus Tolke Markus Klink Cookbook for Developers of ArgoUML An introduction to Developing ArgoUML by Linus Tolke and Markus Klink The purpose of this Cookbook is to help in coordinating and documenting the development of Ar goUML This version of the cookbook is loosely connected to the version 0 18 1 of ArgoUML Copyright c 1996 2005 The Regents of the University of California All Rights Reserved Permission to use copy modify and distribute this software and its documentation without fee and without a written agreement is hereby granted provided that the above copyright notice and this paragraph appear in all copies This software program and documentation are copyrighted by The Regents of the University of California The software program and documentation are supplied AS IS without any accompany ing services from The Regents The Regents does not warrant that the operation of the program will be uninterrupted or error free The end user understands that the program was developed for research purposes and is advised not to rely exclusively on the pro gram for any reason INNO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DI RECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING LOST PROFITS ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN AD
67. Is for the modules that we use within ArgoUML meaning that we implement at document it only once This replaces the Pluggable class at every point where ArgoUML can be augmented e We can have the module have different classes to register at different parts of ArgoUML e We can have dynamic registrations that the module add and remove over time depending on some criteria that the module decides e We don t need to search through all modules at every possible point where ArgoUML can be augmented 84 Inside the subsystems Just as in the old solution whenever a module needs to do something to ArgoUML there needs to be implemented an API possibly with registration deregistration and callbacks e All modules that can be found are examined at startup They can be enabled and disabled individu ally from a special available modules window but have a default state that applies if the user hasn t taken action Currently the default state is enabled e Dependency between modules If a module cannot be enabled because some other module needs to be enabled first or because some part of ArgoUML needs to be initialized first this is a problem This is because the initial implemen tation is such that we have no register of dependencies The solution suggested is that the module loader persists in it s attempts to enable a module so that the order among the modules is not important For this to work the modules needs to signal when they fail
68. L is an application that edits an UML model There is no need to have any network defined while doing this Stakeholder User of ArgoUML Console output Logging or tracing information shall not be written to the console or to any file unless explicitly turned on by the user REQ9 REVa Rationale ArgoUML is an application that edits an UML model Any information written to anywhere but the files that the user specifies the user won t know what to do with and it will be perceived as garbage generated by the ArgoUML application Stakeholder User of ArgoUML 3 4 Requirements set up for the benefit of the development of ArgoUML 3 4 1 Logging The code shall contain entries logging important information for the purpose of helping Devel opers of ArgoUML in finding problems in ArgoUML it self REQ10 REVa Rationale When the developers are searching for some problem or when they ask any of the users to help them pinpoint some problem such logging messages are very helpful Stakeholder Developers of ArgoUML 26 Chapter 4 ArgoUML Design The Big Picture Currently this is more of a base for discussion and ambition but hopefully this will mature and prove useful The code within ArgoUML is separated in subsystems that each have a few responsibilities In Issuezilla each subsystem has its issues sorted in a subcomponent with the same name as the subsys tem Furthermore the Diagrams subsystem has a set of subcompone
69. P CPP Code generation for C e csharp Code generation for C src Source code This will contain one directory for each subsystem within ArgoUML They will all compile and be tested with controlled dependencies to other subsystems The upcoming structure is used for the different language part of the internationalization subsystem under i18n language src_new All source code for ArgoUML including pictures of icons tests All source code for JUnit tests of everything that is in the src_new directory See Section 2 4 The JUnit test cases tools All tools used during the build process Tools also have the readme files licenses and other distribution files stored in this directory in much the same way as the libraries in 1ib However the requirement on the license is different The tools are never distributed with ArgoUML but merely used in the development of ArgoUML so it is enough to have a license that does not allow distribution Quick summary BSD License Apache li cense LGPL GPL Freeware are OK WWW This is all the static contents of the web site See Section 2 3 2 1 How the ArgoUML web site works 108 Chapter 9 Standards for coding in ArgoUML 9 1 Rules for writing Java code The coding style for ArgoUML is the following e Each file starts with some header info file version info copyright notice Like this Id Copyright c 2005 The Regents of the University of Californ
70. RESOLVED INVALID WONTFIX or DUPLICATE that you have not raised nor solved The chosen issue need not be connected to an available release The list of all RESOLVED INVALID RESOLVED WONTFIX and RESOLVED DUPLICATED _ issues reso lu tion IN VA 134 Processes for the ArgoUML project amp resolution WONTFIX amp resolution DUPLICATE 2 Read through the description provided 3 Do one of the following e If you agree with the statement and feel that the rejection is done for correct reasons put the Is sue in Status VERIFIED e If you don t agree put the Issue in status REOPENED and give a description as to why you don t agree 4 Do this as many times as you like until there are no Issues left 12 7 How to Close an Issue This is performed by the person that originally raised the Issue or by the QA responsible for that area You need to be a member of the project any role This can also be done by someone who would raise the issue but did not because it was already present in Issuesilla 1 Pick any Issue that is Verified and that you have raised or that you have found and refrained from raising because somebody else already had written it The list of all VERIFIED issues http argoum tigris org issues buglist cgi component argouml amp issue_status VERIFIED 2 See that you are satisfied with the solution This could involve reading through the resolution and starting the tool to verify it 3 Do one of
71. This run configuration is remembered by Eclipse so after this the drop down next to the Run tool can be used In the same way you can make other run configurations for the other ant targets in the build xml file Once you have found a failing test case and would like to investigate that further you can run it as a JU nit test case from within Eclipse making full use of the Eclipse debugger This is done by browsing to the test case in the package explorer you browse to argouml gt tests gt whatever package gt whatever class right click on it and select Run gt Debug JUnit Test 121 Chapter 10 Standards For Documentation Writing 10 1 10 2 10 3 Introduction The documentation currently manual cookbook and quickguide is written using DocBook XML V4 1 2 http www oasis open org docbook This section covers some conventions for use of DocBook and for the documentation in general It also includes some information for tooling configura tion e g for Emacs with the psgml package Style e We in the documents means the persons reading the document For the Quick guide and User Manual this means the user using ArgoUML For the Cookbook this means the developer working with improving ArgoUML e I in the document refers to the author and is only used to denote the authors personal opinion Avoid using it e Use the active voice e Use plain rather than elegant language e Use specific and concrete
72. Try to keep the test cases as short as possible There is no need in cluttering them up just to beautify the output Prefer Example from JUnit FAQ public void testIndexOutOfBoundsExceptionNotRaised throws IndexOutOfBoundsException ArrayList emptyList new ArrayList Object o emptyList get 0 over public void testIndexOutOfBoundsExceptionNotRaised try ArrayList emptyList new ArrayList Object o emptyList get 0 catch IndexOutOfBoundsException iobe fail Index out of bounds exception was thrown because the code is shorter easier to maintain and you get a better error message from the JUnit frame work A lot of times it is useful just to run the compiler to verify that the signatures are correct on the inter faces Therefor Linus has thought it is a good idea to add methods called compileTestStatics compileTestConstructors and compileTestMethods that was thought to include correct calls to all static methods all public constructors and all other public methods that are not otherwise tested These methods are never called They serve as a guarantee that the public interface of a class will never lose any of the functionality provided by its signature in an uncontrolled way in just the same way as the test methods serve as a guarantee that no features will ever be lost 14 Building from source Example 2 1 An example without javadoc comments package org argouml
73. UML uses several factories and helper classes to manipulate the NSUML model The NSUML model itself does not define enough business logic to be directly used and the factories and helper classes provide a set of interfaces that wraps all functions of NSUML Per section of chapter 2 of the UML 1 3 specification there is one factory and one helper The factories contain all methods that deal with creating and building model elements The helpers con tain all utility methods needed to manipulate the model elements Both helpers and factories and the Facade and ModelEventPump are interfaces that are fetched through static methods in the Model object Each implementation must provide objects for each of these inter faces In the NSUML implementation factories also contain delete methods but they are only used internally within the Model subsystem Factories The factories contain in most cases a create method for each model element Example createClass resides in CoreFactory interface Besides that there are several build methods to build classes The build methods have a signature like public Object buildMODELELEMENTNAME params Each build method verifies the wellformedness rules as defined in the UML spec 1 3 The reason for this is that NS UML does not enforce the wellformedness rules even though non well formed UML can lead to non well formed XMI which leads to saving loading issues and all kinds of illegal st
74. VISED OF THE POSSIBILITY OF SUCH DAMAGE THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MER CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS BASIS AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE SUPPORT UPDATES ENHANCEMENTS OR MODIFICATIONS Table of Contents T Change Logs reeeo iera paa r EEEE EE E Ea OEO PRSES beads EIOP EEE ETSE VES EE ETRAS 8 T Introductioissn onirin e e e E a E E vee eve beads E eee ES REE 1 VV Thanks oi oeer e E A ob da T E E AES 1 12 About the Projecto oc cscpscness ph vse eE Er E PEE EE o EEN EINE EAR SET EERE SRE 1 1 3 HOW fo Contribute 2 e e r E A E E E E E E E dy 1 14 Aboutthis Cookbook dis eaaa AE E EE E ENR Na ESES Nes 3 1 4 1 In this Cookbook you will find 0 eee cceece ee ceeeceeeeaeeeaeeeu sean eeaes 3 1 4 2 In this Cookbook you will not find 0 ee eee eee ce eece teen seca een eene eens 3 13 JMailing Lists ai c cd r cal vere AE Acetate calles Ra dar chad cacti Mec adhe werent acetate 4 2 Building TromSOure sssri nie eiae bar ae Tees shia he aea eaten aeptag hea a EE E 5 2 1 Getting Started oiii esns eren ar E E E E EE EAEE E Soon eteby 5 2 1 1 Which tools do I need to build ArgoUML sssnesessesssuerrssrerrsresrrsresrrersrreees 5 2 1 2 Which tools are part of the ArgoUML development environment 5 2 1 3
75. What libraries are needed and used by ArgoUML 0 eee eeeeeeee eens 6 2 2 Download from the CVS repository 00 cee eee cece cence eee ne ce ne ceueeeeeeeeeeeeeaeseaeeeges 6 235 Build ProCess srren hii aetna seer sap veccttay Sec dibedscoblunys eg saludo eens o a EE 7 2 3 1 How ANT is run from the ArgoUML development environment 5 8 2 3 2 Generating documentation cece eeceeecceece ence eeceeeceeeeaeecaeeea tees een eeaeeees 10 2 3 3 Troubleshooting the development build 0 0 0 0 eee ee cece eee eee eee eeeeee es 12 2A The JUDIE teSt CASES 223 x an edhe Segoe fa ww Sayan daa Uae aS T EE EN E echtay wees 13 2 4 1 HOW to Write atest Cases oen en than Seeyes Logi Sey saan E EAEE RS 13 2 5 Manual Test Cases morsi oee ane e aa EEEE ES bs seg engaus woes cobapseceoas eee eee yeast 16 2 5 1 Running the manual tests siisii ori sesar oest sani o EEE REEE EEEE EE SPESE 16 2 5 2 Writing the manual tests 0 eee cece eee eeceeeeeeeea ceca eeaaeeae eeu eeneeeeeeeeees 16 2 9 3 Fhe list OF teSts oi isscseten sae eotiads costes atn E E EE AE e seaweeds 17 2 6 Making a release ncnio saosna aerer EEEE EEEE is cues N EEEE AEE EEEE 18 2 6 1 The release did not WOTK seirinin er Erer EROR NEES Erna APARAS EE PVE E ETONE ESER ASS 21 3 ArgoU ME Tequirements asa aaa a e a e E A a 23 3 1 Requirements for Look and feel seeeseeeeeeieserestrssrrerrrerrrerrrssrrerrrerrrerrreeresereeeee 23 3 1 1 When mu
76. ackage org argouml uml reveng java holds the Java specific parts of the current RE code C RE might go to org argouml uml reveng cc or so How is the grammar of the target language imple 66 Inside the subsystems mented It s an Antlr http www antlr org grammar based on the Antlr Java parser example The main differ ence is the missing AST Abstract Syntax Tree generation and tree parser So the original example gen erates an AST a treelike data structure and then traverses this tree while the ArgoUML code parses the source file and generates NSUML objects directly from the sources This was done to avoid the memory usage of an AST and the frequent GC while parsing many source files 5 8 4 Which model diagram elements are generated The context classes hold the current context for a package class etc When the required information for an object is available the corresponding NSUML object is created and passed to the DiagramInterface to visualize it 5 8 5 Which layout algorithm is used The classes in org argouml uml diagram static_structure layout hold the Class diagram layout code No layout for other diagram types yet It s based on a ranking scheme for classes and interfaces The rank of a class interface depends on the total number of direct or indirect super classes So if class B extends A with rank A 0 then rank B 1 If C extends B then rank C 2 since it has 2 super classes A B An implemented
77. aeenenes 100 8 EV Sin the ArSoUME project sis cin sts ccevena tesa Se cutensevdtgee oaebencw ogous jogs Sugden ce uae dosaguesdaenteet Saksa 102 8 1 How to work against the CVS repository cece eecceeceeeceeeceeeeu essa eens eene eens 102 8 2 Creating and using branches erener svacsssiwsl eeo e a EA S ESER EE EES ERS 103 8 201 HOW do Tael sek cence diss Secs 0 bb sh cee eat E E N E E AE TO S 103 8 3 Other SVS COMMENDS sssi de yeatens soe tdas das a Sean dee geet a e Mesos wes eaeee S 105 8 4 CVS repository CONtENES 2 0 cece cece ence neces n EEEE ceca seas seas EE AE EEEn ie 106 9 Standards for coding in ATQOUML css ccesccescasscscsnss se oteugsaedeasspsscbaagssedeeasssnetaagssebsavapesobeods 109 9 1 Rules for writing Java code 2 0 0 e cece cece ceec sec cece a eee cena eens ceneeeeeeeeeeeeeeeeseeseaeeeges 109 9 2 Rules for the building process sisri aaee cece cece eens aapa N ES ET ESEESE 112 9 3 Checklist for using subproducts 0 ce cee ceee eee eeceeeceeeea seca seca eens eeaeeeueeeneeeeeeeeees 112 94 Settings forEclpse 2 oriana otis ese tcbussa seat anaa RE E NEEE TEESE EE ITEE 114 95 Settings Tor NetBeans sanoe setae ere dae daatavves ee E E E ea aE 115 9 6 Settings Tor EMAC Sane a an ea E E E be od S N dah SES 115 9 7 ow to work With Eclipse 3 asen c x deen senhen a r a pe a E EN EEIE PARN EREN 116 9 7 1 Checking out through Eclipse seesneseesseeessuerrsrrrerrresrrrrerrerrsrrerrerrerreresee 116 9
78. and de tails of the features of each artifact type 2 An Index 7 2 4 Actions Priorities and Questions This section has two serious problems Firstly I Linus Tolke 2004 think Jeremy Bennet wrote this and then started and has completed a lot of the items so they could be checked off Secondly keeping this list in a docbook document is not a good idea It is better to make issues in Issuezilla of it that can be in dividually closed I Linus Tolke 2004 will make issues of the things I think are left to be done and re move this section unless someone beats me to it 7 2 4 1 Actions and priorities Here s my first call for what needs to be done in priority order From the comments made over the last few days I think the first 5 items won t take very long meaning effort can concentrate on the main stuff 1 Get buy in for the approach Completed 2 Agree document structure broadly Completed 3 Choose a suitable example to run throughout 4 Break into several files XML entities to make the manual more manageable Completed 5 Identify all existing sources of material to be reused 6 Get writing I Jeremy Bennet 2002 suggest the priorities here are a User Manual sections relating to ArgoUML diagrams and artifacts assume the reader knows UML already and allows a quick advance by pulling together a lot of existing material User Manual examples User Manual sections relating to additional ArgoUML cogn
79. anslate that 4 Development environment translation Here I mean that everything that the developer of ArgoUML sees is translated We don t do this in the ArgoUML project This begins with this Cookbook then the Developers part of the ArgoUML web site and also in cludes the javadoc comments in the code of ArgoUML and design documentation of included pack ages such as GEF NSUML 73 Inside the subsystems 5 13 3 How do I f1X an incorrect or missing translation This is the responsibility of the language team Send your corrections to the correct team by mail or enter an issue in issuezilla The language team members are listed in the Developer Zone If the language team does not do its work quickly enough or well enough in your opinion please volunteer to help them out by joining the team If the language team does not respond contact the project leader verify that all translations are up to date Run checkstyle on the i18n parts This is done from argouml1 src_new with the checkstyle 118n target Search for comments on keys Observe that the reported filenames are in the argouml build directory even if the changes are supposed to be made in argouml src il8n language src org argouml1 il8n start a new Language Team Contact the project leader to discuss this He will create the team once he is convinced that you have understood the responsibilities The Language Teams are listed on the we
80. are changed programmatically the methods distinguish between them InsertUp date and removeUpdate are both handled via the protected method handleEvent Han dleEvent updates the property in UMLTextProperty if it is really changed If the update comes via user input it is checked if it is valid input If it is not a JOoptionPane is shown with a warning and the change is not committed into the model If it is not via user input the input is not checked and the property is set If the property is set the update method is called The implementation of FocusListener makes sure that the checking of user input only happens when focus is lost Otherwise it would not be possible to enter intermediate values that are not legal For instance say the value class is not legal Without the implementation of FocusListener it would not be possible to enter class diagram since handleEvent would pop up a warning message box The method update updates both the actual JText field as the diagram as soon as some property is set The updating of the diagram is done by calling the damage method of the figs that represent the property on the diagram 5 5 Persistence Purpose To transform all data that is to be stored into a file To read a file and create the model ele ments and diagrams from the contents The Persistence subsystem is located in org argouml persistence 5 6 Reverse Engineering Subsystem Purpose Point where the diff
81. area for the ArgoUML product Be the central point of the ArgoUML user commu nity Be the central point of the ArgoUML devel opment project References to all the other parts of the docu mentation Current project information like the contents of the up coming releases and the plan for the nearest fu ture Easy access illustra tion for users to be Some illustrations that do not work well in the other parts of the docu mentation This is done as a complement to the other parts Examples tours The manual and quick guide Users of ArgoUML Per sons that want to evalu ate ArgoUML for the purpose of starting to use it Persons that are train ing to use UML and Ar goUML Describe how ArgoUML is installed and used De scribe how UML is used with ArgoUML Complete installation in structions for all sup ported installation schemes Complete de scription on how to use ArgoUML in your project Complete refer ence on how to use Ar goUML Help texts within the Users of ArgoUML Give a quick help with a A complete set of quick running ArgoUML specific feature or but help and explanations ton Give short explana tions of all commands and actions The FAQ Users of ArgoUML Cope for shortcomings in A list of issues that are Members of the users mailing list ArgoUML the help text the Manual and quick guide and the web site not addressed in the other part of the docu m
82. assModelEventListener PropertyChangeListener listener Object modelClass There are also methods that allow you to register only for one type of event fired by all model elements of a certain class and to register for a set of types of events fired by all mod elements of a certain class Of course you can remove your listeners from the event pump This works with methods starting with 37 Inside the subsystems remove instead of add 5 1 3 3 Tips 1 Don t forget to remove your listener from the event pump if it s not interested in some event any more If you do not remove it that s gonna cost performance and it will give you a hard time to debug all the logical bugs you see in your listener 2 When you implement your listener it is wise to NOT DO the following propertyChanged MElementEvent event do my thing for event type 1 do my thing for event type 2 ete This will cause the things that need to be done for event type 1 to be fired when event type 2 do ar rive This still happens at a lot of places in the code of ArgoUML most notably in the modelChanged method of the children of FigEdgeModelElement 5 1 3 4 Possible investigation points and improvements 5 1 4 Should we use our own event types Should we replace the MElementListener with PropertyChangeListener and MEle mentEvent with PropertyChangeEvent One reason we havn t done so yet is that it involves a lot of work and t
83. assword Work gt cvs checkout argouml documentation argouml tools argouml lib Work gt set JAVA_HOME C Programs jdkwhatever Work gt cd argouml documentation Work argouml documentation gt build defaulthtml Cs Cs Ce Ge Cy Cs The html version of the Cookbook Quick Guide and User Manual are built and the result end up in C Work argouml build documentation defaulthtml cookbook C Work argouml build documentation defaulthtml quick guide and C Work argouml build documentation defaulthtml manual respectively cP Note From here on it is the old text that is more or less Publishing ArgoUML to be reworked 2 3 2 1 How the ArgoUML web site works Tigris provides the ArgoUML site to be edited through CVS Everything that is checked in under ar gouml www becomes immediately available at the URL http argoumltigris org with some added decorations Example The file argouml www project html is available at http argouml tigris org project html This is the way the site is maintained and updated 2 3 2 2 The ArgoUML documentation For the ArgoUML project the same documentation shall be available in both HTML PDF and javahelp To this end the documentation is written in docbook XML and generated into two versions of HTML one page per chapter and one page for the whole book PDF and javahelp We have tools that does the conversion from docbook XML to HTML and PDF The conversion is done whenever you need
84. ates of Ar goUML 34 Inside the subsystems If you want to create an element you shall use the build or create methods in the factories You are strongly advised to use a build method or if there is none that suits your needs to write a new one reusing the already existing build methods and utility methods in the helpers The reason for this is that the event listeners for the newly created model element are setup correctly Question Am I allowed to call the factories from any thread Answer The current checks are not writ ten to allow for multiple threads so don t 5 1 2 Helpers The helpers contain all utility methods for manipulating model elements For example they contain methods to get all model elements of a certain class out of the model see getAllModelele ment sOfKind in ModelManagementHelper To find a utility method you need to know where it is As a rule of thumb a utility method for some model element is defined in the helper that corresponds with the section in the UML specification For example all utility methods for manipulating classes are defined in CoreHelper There are a few exceptions to this rule mainly if the utility method deals with two model elements that correspond to different sections in the UML specification Then you have to look in both corresponding helpers and you will probably find what you are searching for Question Am I allowed to call the helpers from any thread Answer The c
85. ation of the Dynamic Linkage pattern as described in Patterns in Java Volume 1 by Mark Grand ISBN 0 471 25839 3 The whole of ArgoUML Core is the Environment the classes inheriting Pluggable are the AbstractLoadableClass 6 2 2 Modules 6 2 2 1 Module Architecture for the old implementation The controlling class of the module plugin extension is org argouml application modules ModuleLoader ModuleLoader is a singleton cre ated in the ArgoUML main initialization routine ModuleLoader will e read in the property file e for each of the classes found 1 create the specified classes 2 call initializeModule on this class 3 place the class object into the internal list of modules 88 Extending ArgoUML 6 2 2 2 The ArgoModule interface used in the old implementation Each class must derive from the ArgoModule interface This interface provides the following meth ods String getModuleName void String getModuleDescription void String getModuleVersion void String getModuleAuthor void provides information about the ArgoUML module boolean initializeModule void initializeModule is called when the class loader has created the module and before it is added into the modules list init ializeModule should initialize any required data and or attach itself as a listener to ArgoUML actions initializeModule for all modules is invoked after the rest of ArgoUML has been initialized and loaded Any menu modification
86. ations and Reverse En gineering e Other languages Code generation Reverse engineering Languages are plugged into the notation the import reverse engineering and code generation See Section 5 9 Other languages 32 ArgoUML Design The Big Picture Critics and checklists This is the critics The Critics Subsystem is described in detail in Section 5 2 Critics and other cognitive tools This is the editing of the OCL strings The OCL Subsystem is described in detail in Section 5 19 OCL Model OCL Other languages To do Items 33 Chapter 5 Inside the subsystems e Warning This chapter is currently under rework with new subsystem organization Things that are not actually in place are TargetManager 5 1 Model 9 1 1 Purpose to provide the data structures that keep track of the element in the UML model This comes with a complete set of methods to modify the model and register interest in changes to the model The Model is located in org argouml model The Model is a Model subsystem See Section 4 4 Model subsystems This is currently implemented using NSUML internally to implement the UML model The plan is to re place NSUML with some JMI compliant model instead probably MDR and for that reason all APIs to the Model subsystem using NSUML objects are to be replaced by interfaces without NSUML object and eventually removed Argo
87. b page of language teams on the Tigris site As soon as the language code and names at least one are in place the team is created From that point it is the Language Team s responsibility to do a good job find the languages internationalization code for the language your instance of ArgoUML is at tempting to run with en es en_GB The one you are currently using is shown in the Versions information in the about box Help Menu gt About ArgoUML Menuitem gt Version tab just after the Operating System information Search for the text looking like this Language sh Country KR This example means that you have your computer set to Swahili as spoken in Korea I think Notice that the Language and Count ry are localized and could appear in your language start the translation work This is only applicable for members of the language team Look at the files in org argoum1 il18n under argouml src_new Translate all the values in each of these files This is a lot of extremely qualified work including searching well known literature on UML and Software Engineering in order to get the correct terms for the domain Discuss with other UML and Software Engineering professionals with the same native language to get it right 74 Inside the subsystems Create the files with the translations and store them in argouml src il8n languagesrc org argouml il8n They will have names like ac tion_language code properties
88. c ntisas sassad a ta sea E neh boas sethades watinnee Ea e EES 85 6 Extending ArgoUML ossei erne Ena eE oe rE EE EEEE teedesiabuctossaeyecesth ecw rede 87 GLOW dO Tse e EE E sss sete E EE E E ET 87 6 2 Modules and Plug INS esotere u ne e be losses cue e r E E SE E EEEE E EET 87 6 2 1 Differences between modules and plugins eee cece eee cee ce eeceeeeneeenes 87 6 22 MOCUIES nors sua isnnvendcospeorssr a A E eeiwes E E E AREAS E 88 6 23 PIM SINS jee e E E E E E E A ce toe EE ERN 91 6 2 4 Tip for creating new modules from Florent de Lamotte 1 0 0 0 eee 94 6 3 How are modules organized in the java code cee cece eeee seen eee eece een eeneeeneeeeeees 94 6 3 1 Requirements on MOduIeS eee cece yeep rop EPEN E pE ESE DEEPER 95 63 2 HOw do Tite ea E A E AA E A AE tease EDET 95 7 Organization of ArgoUML documentation sseessseeseesessreresrrerrsrrerrreerrrererreersreerreeesrese 96 TAG OVELVIEW aeie r er nee e AEREE ce Boat EE EE EKEREN TE EKEN 96 1 2 User Manu l Plans irissen sron orreee sarees a sa o eE P tia og es biteaseeefeences PUTS SSS 98 7 2 1 Target Audiences for the User Manual sieeeseesseeessrerrsrrerrererrrrrssrerreree 98 7 2 2 Goals forthe User Manual ierosmi rsen a ee aiga ties 98 7 2 3 Suggested Manual Structure 2 0 0 0 cece cece eee ce cece eeee cena cen eeaeeeeeeeeeees 99 7 2 4 Actions Priorities and Questions cc ceccccec eee ece cece ee cece ee eeeeneeeeaeeeene
89. ce is source that is handled by CVS When structuring the text the parts are paragraphs sentences and words By having each sentence on a line of its own it is easier to see what sentences has been changed and what has not in the diff reports from CVS The contributions that Jeremy Bennet did for the 0 10 User Man ual are not written like this Change it while changing the paragraphs e All block graphics should be encapsulated within figure allowing reference from around the text Set attribute float to 1 to allow the figure to float makes life easier for printed version e All block graphics should be provided through mediaobject and provided with both an ima geobject and comprehensive description ina textobject This gives the potential of meaning ful content where a diagram cannot be displayed for any reason Where appropriate the mediaob ject should be wrapped by screenshot e Inline graphics can be done through inlinegraphic rather inlinemediaobject A textual alternative is of little value in these circumstances Where appropriate the mediaobject should be wrapped by guiicon For Emacs Users If you use the psgml library within emacs then editing and verifying XML gets easier Information on using this facility is inluded with psgml e Emacs local variables appear in a few lines of comment at the bottom of each XML file Please don t delete these e Adding setq sgml set face t to your emacs file will cause all tags and ent
90. chanism to guarantee correct ness Notice also that you shouldn t localize log entries comments exception names names of environ ment variables and tags and tokens used in save files This is because the development project of ArgoUML is a one language community en_US and the users of ArgoUML would want to be able to run an ArgoUML localized differently with otherwise the exact same settings loading and saving the same files 5 14 Logging Purpose to provide an api for debug log and trace messages The purpose of debug log and trace messages is To provide a mechanism that allows the developer to enable output of minor events focused on a specific problem area and to follow what is going on inside ArgoUML The Logging is located in org argouml The Logging is a Layer 0 subsystem Logging is currently implemented using log4j ArgoUML uses the standard log4j http jakarta apache org log4j logging facility The following sec tions deal with the current implementation in ArgoUML By default logging is turned off and only the version information of all used libraries are shown on the console 5 14 1 What to Log in ArgoUML Logging entries in log4j belong to exactly one level e The FATAL level designates very severe error events that will presumably lead the application to abort Everything known about the reasons for the abortion of the application shall be logged e The ERROR level designates error events that
91. dTrigger UML Meta Class where UML Meta Class is a UML Meta Class with ini tial lower capital e g associationEnd The intention is that critics should only trigger for ele ments or children of particular UML meta classes I Jeremy Bennett February 2002 believe this code is not yet working so you can probably leave it out You can have multiple calls to this method for different meta classes After this add a method public boolean predicate2 Object dm Designer dsgr This is the decision routine for the critic dm is the UML entity an NSUML object that is being checked The second argument dsgr is for future development and can be ignored The Critic class conveniently de fines two boolean constants NO_PROBLEM and PROBLEM_FOUND to be returned according to whether the object is OK or triggers the critic dm may be any UML object so the first action is to see if it is an artifact of interest and if not return NO_PROBLEM The remaining code should examine dm and return NO_PROBLEM or PROBLEM_FOUND as appro priate Having written the code you need to add the text for the headline and description to the cognitive re source bundles These are in the package org argouml il8n in the file crit ics properties You need to add two keys for the head and description which will be named respectively critics CrxxxxxYyyyZzzz head and criticsCrxxxxxYyyy2Zzzz desc There are plenty of examples to look at there The other files
92. e already create methods thanks Thierry For some elements there are already build methods If you need one of these elements use the build method before you barge into building new ones Initialize all things you need in the build method as far as they don t need other model elements In the UML spec you can read which elements you need to initialize See for example buildAttribute for an example If you need to attach other already existing model elements to your model element make a buildXxXxx MModelelement toattachl method in the factory where you made the build method Don t ever call the create methods directly If we use the build methods we will al ways have initialized model elements which will make a difference concerning save load issues for example Now you probably also need to create a Property Panel and a Fig object See Section 5 3 3 5 Creating a new Fig explanation 2 create a new create method Create it in the correct factory create a new utility method Create it in the correct helper 41 Inside the subsystems 5 2 Critics and other cognitive tools 5 2 1 Purpose to provide cognitive help for the User This help is based on the current model that the User works with The Critics are located in org argouml cognitive The Critics is a Loadable subsystem See Section 4 6 Loadable subsystems The Critics subsystem depends on the Model that it works against to take a
93. e Base class for Wizards is org argouml kernel Wizard Checklists are located in the package org argouml cognitive checklist Helper classes for To Do Items To Do Pane Wizards and the Knowledge Types are located in the pack age org argouml cognitive ui 5 2 2 How do 1 create a new critique Currently the only way to add a new critique is to write a class that implements it so that is described here There have however been ideas on a possibility to build critics in some other way in the future as a set of rules instead of java code Create a new critic class of the form CrXxxxYyyyZzzz extending CrUML Typically your new class will go in the package org argouml uml cognitive critics but it could go in one of the other cognitive critics packages Write a constructor which takes no arguments and calls the following methods of CrUML e setHeadline to set up the locale specific text for the critic headline the one liner that appears in the to do pane and the critic description the detailed explanation that appears in the to do tab of the details pane The String parameter is ignored e addSupportedDecision UMLDecision decAAAA where AAAA is the design issue category this critic falls into examples include STORAGE PATTERN METHODS e setPriority ToDoItem BBB_PRIORITY where BBB is one of LOW MEDIUM or HIGH to set the 44 Inside the subsystems priority for the critic in the to do pane e ad
94. e Name field Supported through the UMLTextFieldz2 class e A drop down box aka combobox of options that can be selected Supported by the UMLCom boBox2 class Used e g for the type of a parameter e A check box This one does not use a seperate model class thanks to the simplicity of the repre sented boolean value Supported by the UMLCheckBox2 class Used e g for the concurrency checkbox on a composite state e lt A radio button These always come in a group Supported by the UMLRadioButtonPaneli class Used e g for selecting the visibility on the properties panel of a class e A list Used e g for the Generalizations field on the proppanel of a class The non editable list is supported by the UMLList2 class and its child UMLLinkedList The latter also exists in the form of UMLMutableLinkedList which allows adding creation and deleting elements by popup menu Used e g for the subvertex list for a composite state The list model is usually provided by a sub class of UMLModelElement ListMode12 There is a variant UMLModelElementOrderedListModel2 intended for ordered links which adds a few items to the pop up menu allowing sorting This latter model is used e g for attributes of a class e A drop down box of options that can be selected This one exists in several versions each having different possibilities The most simple version is the UMLComboBox2 The UMLEditableComboBox allows editing the selected item
95. e framework with menus tabs and panes available for the other subsystems to fill with ac tions and contents The GUI Framework Subsystem is described in detail in Section 5 10 The GUI Framework e Help system Not yet implemented This is the subsystem that the other subsystems can call to present some help for the user The Help System Subsystem is described in detail in Section 5 12 Help System 30 ArgoUML Design The Big Picture Logging GUI Framework To do Items Help System 4 5 View and Control subsystems These subsystems rely on model subsystems in order to do their work Diagrams This is the diagram view of the model The notation is a property that belongs in the Diagrams so the different language register their provided notation in the Diagrams subsystem The Diagrams Subsystem is described in detail in Section 5 3 Diagrams Property panels This is the property panel view of the model The Property Panels Subsystem is described in detail in Section 5 4 Property panels Explorer This is the tree view of the model The Explorer Subsystem is described in detail in Section 5 17 Explorer Code Generation This is the common code for and the point where each language with Code Generation possibility registers The Code Generation Subsystem is described in detail in Section 5 7 Code Generation Subsystem Reverse Engineering This is the common code for and the p
96. e menu item Look at the modules junit and menutest for examples of how to add to menus using the Pluggable Menu interface The implementation of inContext that you provide should be similar to public boolean inContext Object o if o length lt 2 return false if o 0 instanceof JMenuItem amp amp Create Diagrams equals o 1 return true return false The string Create Diagrams is a non localized key string passed in ProjectLoader at about line 440 in the statement appendPluggableMenus _createDiagrams Create Diagrams There is no restriction on a single class implementing multiple plugins quite the contrary that is 91 Extending ArgoUML one of the reasons for providing the generic Pluggable interface that PluggableThings extend create a pluggable notation create a pluggable diagram Let s say we want to enable a new diagram type as a plug in We use the interface PluggableDiagram that uses a method that returns an JMenultem object public JMenulItem getDiagramMenulItem The returned menu item will be added to the diagrams menu to allow to open a new diagram of this type In this example we do this by creating a helper class in the package org argouml application helpers that implements the created plug in interface PluggableDiagram and call it DiagramHelper pub imp lic abstract class DiagramHelper extends ArgoDiagram lements PluggableDiagram
97. e that extends Pluggable in the same package The class name must begin with Pluggable TA Note l One of the main purposes of a plugin is to provide the capability to add an exter nally defined class that will be used by ArgoUML in the same way as a similar in ternal class This means that modifications are needed all over ArgoUML in order to call the pluggable interface Therefore this must be done in ArgoUML itself and cannot be done in any module It now inherits from ArgoModule the methods public boolean initializeModule public boolean shutdownModule public void setModuleEnabled boolean tf public boolean isModuleEnabled public String getModuleName public String getModuleDescription public String getModuleVersion public String getModuleAuthor public Vector getModulePopUpActions Vector popUpActions Object context public String getModuleKey and from Pluggable the methods public boolean inContext Object context 93 Extending ArgoUML and thus provides the basic mechanism that plug ins need 2 Decide in what context this is to be enabled and add calls there It is useful for those plugins which actually use context to provide a helper method Object buildContext classtypel parameterl classtype2 parame ter2 which will serve two purposes First it will provide a simple way of creating the Object parameter Second it hel
98. efore the actual logging statement saves the overhead of all the con catenations data conversions and temporary objects that would be created otherwise Even if logging is turned off for DEBUG and or INFO level Example 5 2 Improving on speed performance if LOG isDebugEnabled LOG debug Entry number i is entry il if LOG isInfoEnabled LOG info Entry number i is entry il Ge Warning Since this has a big impact also on the readability only use it where it is really needed like places passed several times per second or hundreds of times for every key the user presses For more information go to the log4j homepage at _http jakarta apache org log4j http jakarta apache org log4j 5 14 2 1 Reasoning around the performance issues Most of the log statements passed in ArgoUML are passed with logging turned off This means that the only thing log4j should do is to determine that logging is off and return Log4j has a really quick algo rithm to determine if logging is on for a certain level so that is not a problem The problem is instead explained by noticing the following log statement int iy LOG debug Entry number i is entry il It is quite innocent looking isn t it Well that is because the java compiler is very helpful when it comes to handling strings and will convert it to the equivalent of StringBuffer sb new StringBuffer sb append Entry
99. ehavior of the other The classes involved in this particular example have all been well commented and have full Javadoc de scriptions to help when examining the code You will need to read the description here in conjunction with looking at the code 5 3 3 How to add a new Fig The new item must be added to the tool bar Both the graph model and diagram renderer for the diagram will need modifying for any new fig object 5 3 3 1 Adding to the tool bar Find the diagram object in uml diagram XXXX ui UMLYYYYDiagram java where XXXX is the diagram type lower case and YYYY the diagram type bumpy caps For example uml dia gram use_case ui UMLUseCaseDiagram java This will be a subclass of UMLDiagram in uml diagram ui UMLDiagram java Each tool bar action is declared as a protected static field of class Action initiated as a new Cmd CreateNode for nodal UML elements or a new CmdSetMode for behavior or creation of line UML elements These classes are part of the GEF library The common ones select broom graphic annotations are inherited from UMLDiagram the diagram specific ones in the class itself For example in UMLUseCaseDiagram java we have the following for creating Use Case nodes protected static Action _actionUseCase new CmdCreateNode ModelFacade USE_CASE UseCase The first argument is the class of the node to create from NSUML the second a textual tool tip For creating associations we have
100. el 0 ee 25 3 3 Requirements On java and JVM ee eee cece ce eeceeeceeeeeeeceeeeeeseeeea seca sean eean eens eegs 25 3 3 1 Choice of JRE ArgoUML will support any JRE compatible with a Sun specifi cation of any JRE from Sun that has not begun the Sun End of Life EOL process 25 3 3 2 Download and Start sessir einen E E as shed bes EEE EE EER see ENE et 26 3 3 3 Console output Logging or tracing information shall not be written to the con sole or to any file unless explicitly turned on by the user 0 0 0 0 cece cece eeeeeeee ee eeee ee 26 iv Cookbook for Developers of ArgoUML 3 4 Requirements set up for the benefit of the development of ArgoUML ee 26 3 4 1 Logging The code shall contain entries logging important information for the purpose of helping Developers of ArgoUML in finding problems in ArgoUML itself outhegseay ne e o a a paneanysn E wed aeieth tonuss suucesitebs atu cduvtandfns OR E 26 4 ArgoUML Design The Big Picture 0 0 0 0 eee cee eee cence EE ceca cena eean S E E R 27 4 1 Definition Of subsystem nin ni Ea E E E 27 4 2 Relationship of the subsystems essesseesseesrssresrrrrsrrerrsrrerrsrrsrrrersreeessrerrsreerreees 28 4 3 Low levelisuDsyStems ssie iiaee oroia eos es S aE need ses seSusssvecs agp vetaanse sores 29 4 4 Model SUbSYStEMS esos eros eo E EEEO ES EEE EEE E EEE EEE ET 30 4 5 View and Control subsystems cipsi aeneae iaa ea e oasa i iE 31 4 6 Loadab
101. ene dstsdaess sbotasapeessaenpesrtess 72 5 13 2 Ambitions for localization 2 0 0 0 cece ceeeceeccnec cece ce eeneeeae een eeneeeneeeeeeeees 73 5133 HOW dO Ices e a E EAT cae be Me ea aa ase a ea 74 DAA LOS SING ernai E reales ngwer oes wuness baie teets vetees Svea etodvaunieel Sent adee ny settee Guns SAA 76 5 14 1 What to Log in ArgoUML 00 ccc cece nce e cea eee ne eeneeeeeeeeeeeeeeeeeaeeeaes 76 9 14 2 How to Create Log Entries o senesinin nET se AE K REE a SEES 77 5 14 3 How to Enable Logging 00 E E E E a cena S 79 5 14 4 How to Customize Logging seoir ense ea eepe OEE EOR EEE EE OR EE aS 80 14S References iaso taaie e o ee cose ovis E AOE EE EE i 80 9 19 TRE with Utils dateerden a eta det cate sabe a E R E TE ETa 80 5 16 To doitems rarei en L E E KEERT EEEE EE A EE TEE E EE say ES 80 oA D e KO A CEEE EE E ET E AT 81 5 1 FLReQuireMents icas set ver eaeSeye nese E Bid noe EE EEE laubeees ccs devta anges 81 317 2 Public APIs and SPIS eni ee eta ea Ea E a aa 81 Cookbook for Developers of ArgoUML 5 17 3 Details of the Explorer Implementation 0 0 cceeeeeseeccneeceueeeeeecenueeeenees 82 DATA OW ON P A E E NEE SE pan dacw ete E TEE 82 5 18 Mod le loade T en a e eee ee Webel Ga eet cate ee SN 84 5 18 1 What the ModuleLoader does 0 0 0 0 cece cece ceeecneeceeeca cece cena eeueeneeeaeeeeees 84 5 18 2 Design of the new Module Loader 0 eeccee ce eece teen teen teen eeneeeaes 84 S T9 OCT es es
102. entation It is written in questions an swers format and the contents is governed by the issues discussed re cently in the user com munity 97 Organization of ArgoUML documentation The Cookbook the User Manual and the Quick Guide are all written in docbook and generated into HTML and PDF during deployment See Chapter 10 Standards For Documentation Writing for details on how to write these 7 2 User Manual Plans The User Manual is a very separate part of the ArgoUML project It is independent of the rest of the project w r t updates deliveries ambition and plans The development of the User Manual is more or less a project of its own Since autumn 2003 we also have an appointed sub project leader for this This Responsibility is called Editor for the User Manual and Quick Guide and is held by Michiel van der Wulp This section describes the ambition and plans for the User Manual 7 2 1 Target Audiences for the User Manual Target audiences are the following e Experienced users of UML in OOA amp D perhaps with other tools who wish to transfer to Ar goUML e Designers who know OOA amp D and wish to adopt a UML based process In the longer term it would be desirable to also target the following e Those who are learning design and wish to start with a UML based OOA amp D process e People interested in modularized code design with a GUI 7 2 2 Goals for the User Manual The goals are in priorit
103. er objects Note the Explorer used to be called the Navigator The Explorer is located in org argouml ui explorer and sub packages The Explorer is a Layer 2 subsystem See Section 4 5 View and Control subsystems 5 17 1 Requirements The Explorer must react to user and application events User events include e RI selection of a node which must notify the other views to make the same selection e R2 right click on a node which brings up a pop up menu e R3 selection of another perspective in the Combo box which must change the explorer to that per spective A perspective provides a different view of the model that will focus on one or other part of the model e R4 node expansion and collapse e R5 It is possible to drag name space nodes on to other name space nodes Dropping a name space node onto another will if the destination name space is a valid one update the explorer and model e R6 sorting of nodes with a particular Ordering an ordering is a comparator that orders child nodes in the explorer e g by name and or type R7 copy diagram to clipboard functionality for windows java 1 4 users R8 tool tip showing node name and type R9 standard multiple discontinuous selection with mouse and keyboard R10 the user can configure the perspectives using a dialog Perspectives can be added deleted re named reordered and duplicated Perspective rules can be added and removed from a perspective The chan
104. ere we are in the development process e Understanding the terminology used in the project e Understanding how we use CVS in the project e Understanding the set of tools ant JUnit and how to use them 9 Focus your work in a specific area Everybody has different interests and the best contribution is made when someone is allowed to pursue his own interests Hopefully ArgoUML provides you with interesting challenges to your taste 10 Accept responsibility for a specific area With this you are part of the core team developing ArgoUML 1 4 About this Cookbook This document the Cookbook for Developers of ArgoUML is provided with the hopes of being helpful for the developers of ArgoUML when it comes to learning and understanding how ArgoUML work in order to improve on its functions and features It can also be of interest for persons that wish to analyze the ArgoUML project for whatever purpose that may be 1 4 1 In this Cookbook you will find Information on how to compile ArgoUML Information on how different features of ArgoUML are implemented Information on how you should add modules and Plug ins to ArgoUML Information that you as a developer of ArgoUML need to know about how the project is organized and how to contribute 1 4 2 In this Cookbook you will not find Introduction You will not find information on how to install and use ArgoUML You will not find information on what UML is and if or how you sh
105. erent languages register that they know how to do reverse engineering and common reverse engineering functions for all languages The Reverse Engineering is located in org argouml uml reveng The Reverse Engineering Subsystem is a Control subsystem See Section 4 5 View and Control sub systems 5 7 Code Generation Subsystem Purpose Point where the different languages register that they know how to do code generation and common functions for all languages The Code Generation is located in org argouml language The Code Generation subsystem is a Control subsystem See Section 4 5 View and Control subsys tems Currently up until April 2004 very much of this subsystem is located in 65 Inside the subsystems org argouml uml generator and we have a need to modify the interfaces of the subsystem to no longer include any NSUML types This move will be carried out by creating new interfaces in org argouml language and deprecating the old ones This is my Linus Tolke suggested way of how it is going to work The different languages or notations supplied with ArgoUML are found in sub packages of link org argouml language Any definition or foundation interfaces are found in the directory org argouml language Any helper classes such as abstract implementation classes are also found in org argouml language At boot time each language registers their interfaces in the org argouml language Language reg
106. errupted or error free Th nd user understands that the program was developed for research purposes and is advised not to rely exclusively on the program for any reason IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING LOST PROFITS ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION EV EN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 118 Standards for coding in ArgoUML UCH DAMAGE THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY S l WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS BASIS AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE SUPPORT UPDATES ENHANCEMENTS OR MODIFICATIONS package_declaration typecomment S type_declaration 9 7 3 Eclipse to automatically find problems in the code This instruction is to set up Eclipse to automatically find what in the ArgoUML project could be con sidered problems in the code You can apply these individually depending on what level of help you need in your coding I L
107. ese tabs Only things diverting from the Eclipse defaults are listed e Style gt Possible accidental boolean assignment Warning e Advanced gt Local variable declaration hides another field or variable Warning e Advanced gt Field declaration hides another field or variable Warning e Find Code that shall be removed 119 Standards for coding in ArgoUML In the menu select Window gt Preferences Then select Java gt Compiler Suggested settings for these tabs Only things diverting from the Eclipse defaults are listed e Unused code gt Local variable is never read Warning e Unused code gt Parameter is never read Warning e Unused code gt Unused or unread private members Warning e Unused code gt Unnecessary semicolon Warning e Unused code gt Unnecessary cast or instanceof operation Warning e Unused code gt Unnecessary declaration of thrown checked exception Warning 9 7 4 Settings for checkclipse 9 7 5 Checkclipse is a plugin for Eclipse wich needs to be installed seperately It enables style checking ac cording the rules set for the ArgoUML project In the Java perspective select the project argouml i e the icon at the top of the Package Explorer Then in the menu select Project gt Properties select Checkclipse appears only if checkclipse is correctly in stalled and then fill the fields like this e Enable Checkstyle Checked e Checkstyle Configuration F
108. esign tools ArgoUML is an object oriented design tool that includes several novel features that address the identified cognitive needs of software designers Each feature is explained with respect to the cognitive theories that inspired it and the set of features is evaluated with a combination of heuristic and empirical techniques 11 1 2 Where to find it LINK Robbins Dissertation http argoum1 tigris org docs robbins_dissertation 11 2 Martin Skinners Dissertation Enhancing an UML Modeling Tool with Context Based Constraints for Components 11 2 1 Abstract Noch vor der Erstellung eines detaillierten Entwurfs hilft ein Spezifikationsmodell eines komponenten basierten Systems dabei Probleme so fr h im Entwicklungsprozess wie m glich zu entdecken Die Sprache CCL Component Constraint Language wurde bei CIS entwickelt und erlaubt den Entwickler Contextbased Constraints dem Spezifikationsmodell hinzuzuf gen Dadurch entsteht ein Modell das tiber die Beschreibung der statische Struktur des Systems hinausgeht Zur Zeit existiert allerdings kein Werkzeug dass das Komponentenspezifikationsmodell in den Entwicklungsprozess integriert Ziel dieser Diplomarbeit war der Entwurf eines solchen Werkzeugs um die Philosophie des Continuous Software Engineering CSE zu unterstiitzten Before starting a detailed design a specification model of the component based system assists the soft ware developer in early problem detection a
109. esting Change the implementation of the Event pump itself Not the API but the implementation At the moment the event pump does not use the AWT Event Thread for dispatching events This can make ArgoUML slow in the perception of the user Use the standard data structure that Swing uses for event registration i e javax swing EventListenerList Would this be an improvement How to work against the model NS UML is used within the Model subsystem to keep all data structures in place Eventually we will change that to JMI MDR that is newer and better and will take us into UML 1 4 UML 1 5 and UML 2 0 Working directly against NS UML or JMI MDR will make changes in the NS UML or JMI MDR affect large portions of the code For this reason we have in the Model subsystem a set of classes that lay between the NS UML and JMI MDR that hides the APIs of NS UML or JMI MDR between some thing that will not change while moving between them This is the API classes of the Model subsystem i e Factories Helpers Event Pump where to register for changes Here follows a list of how different things are done for the purpose of making the transition easy Every thing within ArgoUML should access the Model subsystem through the interfaces in the org argouml model package The NS UML or JMI MDR and whatever other implementation we could eventually come up with would provide the implementation of those interfaces 38 Inside the subsystems
110. eveloping releasing and run ning ArgoUML This automated use must be able to run without relying on access to some server and without user intervention The API documentation of the subproduct assumed to be javadoc we can use from some web site belonging to that subproduct Rationale In the ArgoUML project we want to make it as easy as possible for our users to install Ar goUML We also want to make it as easy as possible for our developers to get their development en vironment working and for the release manager to prepare the releases Roadmap The project developing the subproduct must have a plan that fits the ArgoUML plan for the future Rationale If a subproduct will soon go somewhere else i e stop doing what we require or stop sup porting what we require then we will soon have troubles with that subproduct Working project The project that develops the subproduct should be a working project Check that there is some per son responsible for it preferably with a team or organization backing him Check that there is a plan for upcoming releases Check that there is a way to report bugs and enhancement requests Rationale We don t want to rely on a subproduct where there is no chance of ever getting a bug that we encounter fixed We are also part of an ever evolving world Soon we want the tool to do more for us We should then be able to wish that and eventually get an updated subproduct Notice that we should not and don t
111. events and if so looks to see if it relates to an element in our list If so Swing is noti fied that the element has been removed public void recovthesedf ah z quiitedanqpatitofthe NSUMb bv rthistenen int rfacRoWhichamSet final MElementEvent p1 nppwell idocwme enied dnceach aserth defiai tmmptemeantatiop r computes cheroid property Set final MElemerst ty em advises Swing that the entire list has changed Needs more investiga tion public void navigategies MMadagattdm int specif dFobject as part of the NavigationListener interface The default in the parent just invokes navigateTo on the container ultimately PropPanel The following utility routines are also provided in the parent They are not normally overridden public int getUppget Beyuppey bound 1 is used if there is none public void setUpseeths appet bound fdw8oseddf there is none public final Str inetpropethe WOEMiLy dyent name being monitored null if all are being moni tored protected final inaturmseth louiab riofretemtediszia the list Invokes recalcModelElement Size see above if necessary final Object get Tretumestthe NSUML object associated with the container some child of Prop Panel usually that holds this list model final UMLUserInt eetfamsethorthe comtainee GOmetchildeof ropPanel usually that holds this list model public int getSizettyns the size of the list Including if there are no elements in
112. for British English Spanish respec tively are the responsibility of the corresponding language team Notify the language teams that there is work to be done In method Init of the class org argouml uml cognitive critics Init add two statements private static Critic crxxxxxYyyyZzzz new CrxxxxxYyyyZzzz ae Agency register crxxxxxYyyyZzzz DesignMaterialCls If you want to add a critic to a design material which is not already declared for example the Extend class you will have to add a third statement to the Init method as well which is java lang Class XxxYyyyZzCls MXxxYyyyZzImpl class where MXxxYyyyZzImp1 class should be part of the NovoSoft UML package Finally you should get a new section added to the user manual reference section on critics The pur pose of this is to collect all the details and rationale around this critic to complement the short text in the description It should go in the ref critics xml file and have an id tag named critics CrXxxYyyyZz2ZZ write the test in a critique The critiques tests are essentially a combination of conditions that are to be fulfilled The conditions are often simple tests on simple model elements The class org argouml cognitive critics CriticUtils contains static routines that are commonly needed when writing predicatez2 for example to test if a class has a constructor If you find you are writing code that may be of wider use than just your critic you should add
113. ges are saved to the user properties If there are user perspectives when ArgoUML starts it loads these otherwise it loads a default set of perspectives Application events include e R11 change in selection in another view any relevant rows to be highlighted e R12 the UML model changes the tree must update to reflect additions deletions and name changes in the model e R13 change of project the tree must update the root node should be expanded with the default dia gram selected 5 17 2 Public APIs and SPlIs The Explorer Subsystem provides will provide the following APIs e APII Addition Removal of a Perspective from the PerspectiveManager Status implemented e API2 Addition Removal of a Perspective Rule from a Perspective Status implemented 81 Inside the subsystems e API3 Selection of the Perspective to be displayed by the Explorer Status not implemented e API4 Selection of Ordering for Explorer nodes an Ordering is a comparator that orders child nodes in the Explorer Status not implemented The Explorer Subsystem provides will provide the following SPIs e SPI1 Configurable Node pop up menu Status not implemented e SPI2 New PerspectiveRules can be defined and registered with the library of available rules Sta tus not implemented e SPI3 New Orderings can be defined and registered with the available orderings an ordering is a comparator that orders child nodes in the explorer Stat
114. h and tcsh you will instead have to write setenv JAVA_HOME where you have installed jdk 2 Change the current directory to the directory you are building cd your checked out copy of argouml src_new 3 Start ant using build sh This gives you a list of targets with descriptions Compile and run ArgoUML using build sh run You can do this over and over again when you have modified something or want to compile and run again 2 3 1 2 Compiling for Windows Building from source 1 set JAVA_HOME where you have installed jdk 2 Change the current directory to the directory you are building chdir your checked out copy of argouml src_new 3 Start ant using build This gives you a list of targets with descriptions 4 Compile and run ArgoUML using build run You can do this over and over again when you have modified something or want to compile and run again If you do this from Cygwin you work just like for Unix 2 3 1 3 Customizing and configuring your build It is possible to customize your compilation of ArgoUML If you issue the command build list property files you can see what files are searched for properties Don t change the argouml src_new default properties file unless you are working with updating the development environment itself Instead create one of the other files locally on you ma chine The properties in these files have precedence over the properties in argouml src_new default properties Remember tha
115. he issue number This allows the tigris web site to generate links when viewing the manual source e Do not write currently Better write either in version 0 14 if you mean in the stable version 0 14 of ArgoUML or in version amp argoversion if you mean in the current version of the document as defined in default properties when the document is deployed There are some old refer ences to current or currently also If you encounter them try to remove them e For documents that contain an index Add indexterms while doing changes Creating the index is a good idea and we eventually should have indexterms all over Initially the manual was written with out useing indexterms at all They have been added generously on certain parts but that makes the in dex strangely biased Capitalize the part of the indexterms that are terms Don t use the tertiary level of the index terms but use only two alternatives Only primary and pri mary secondary If you are unsure when to use primary or primary secondary use the small word ap proach I e if the indexterm contains a small word typically to of for in and normally not capital ized let the secondary start with that small word When using primary secondary see that you get the same kind of word as used before in the index especially when it comes to differences in singular plural form Also create other indexterm by turning the phrase to as many permutations that you can think
116. he can check the result and if he agrees with the solution close the issue himself Closing an issue requires at least observer role in the ArgoUML project e Reopen the issue This applies to an issue that is in verified state only The reporter has the final word he can check the result and when he does not agree that the solution is correct he can reopen the issue himself Reopening an issue requires at least observer role in the ArgoUML project 12 3 2 The Resolver The Resolver is the software developer who attempts to resolve the issue Doing so requires at least ob server role The developer role is only needed to commit things into CVS e g submit changed Java code scripts or documentation Remark Someone who does not have the developer role but solves the issue and convinces someone else to commit the solution is still the Resolver even though he cannot commit things into CVS The goal of the Resolver is to progress the issue to the status of Resolved The resolver may be the 130 Processes for the ArgoUML project same person as the reporter Responsibilities e Decide usefulness if this issue is really a bug or enhancement and if it is worth solving The Resolver has to decide if solving the issue is really a useful improvement for ArgoUML The Reporter of the issue may very well be mistaken in entering a bug issue for what is in fact a feature or entering an enhancement issue which is not really
117. he person that resolved them or someone else Someone risk to think that there is nothing left to do since it is resolved and if so his options of doing work are reduced which could lead to that he actually does less with ArgoUML than he else would To amend this we have made two things 1 Decided that we don t use the RESOLVED REMIND states 2 At every release as part of the release process clean up issues that for some mysterious reason ended up in these states See Section 2 6 Making a release 7 f If you plan to solve an issue now assign it to you start it and set the target milestone to the release you plan to have it solved This will signal to everyone that you have the responsibility will pursue it and your time plan If you don t plan to solve this now leave it in the up for grabs pile as not resolved Somebody else might want to work with it If you know that an issue cannot be resolved now because it requires that another issue is solved be fore register the other issue as depends on and leave the issue in the up for grabs pile as not re solved If you know that an issue cannot be resolved now because it requires some big event to take place put the milestone for that event in the target milestone and resolve the issue as RESOLVED LATER WORKSFORME This means that it works in a released version of ArgoUML State the version in the comment If the version stated by the reporter in the issue is
118. i eE EEEE OIE GE iS 127 12 1 The big picture forIssueSs sni a essere E E S E a a 127 12 2 Attributes of AN ISSUE scisscascdiste ses tas osiategpestoseeeseestag Veannates sense eabasboneiisaeseasseaaeateaes 127 vi Cookbook for Developers of ArgoUML 1221 Priorities ren Sse eS o ya ck hay Sees eee Vaan oye ak Renee E De ee Le ye ee EN 128 122 2 RESOlUIONS 3 fon8 fa coor oced NEA E TEE EE E AET 128 1273 Roles OF The W Oren v5 3255 fads chs ia5 oe Pe oo eo aes wag aaa ae dd eins eee aa ag Ge Poon cee 130 12321 THe RePOrter syrran ope nema e Sean a sk Sante ad oghweane eee eed vhs Conese EEE 130 12 Bi Ze Ne RESO ERs sce acsseelovedei ae E Eea iw Pe esta oven 130 12 3 3 The Vere seimi ernis ies e E E E etek Ses sete ba aE ARREARS A bee bee 131 12 4 How to resolve an ISsue mirisne kE C EE E E E ER EERE at 132 12 5 How to verify an Issue that is FIXED n sessssessssessrsresrrerrrrrsrrrrsrrerrsrrerrereserresrreeesre 133 12 6 How to verify an Issue that is rejected 2 0 0 0 eee cece eee ceee ce eeca cece eens eeneenneennees 134 12 7 Howto Glose an Issue meyi seria xt bourses datas eaehaahs oansaes oven task rads Paseats EE 135 12 8 How to relate issues to problems in subproducts cceeeeeeeeee eee eeeeeceeeeeeeeneees 135 EE AE E tin ens basa A acts Dien nse rec tel Meme weined att heeeiuu see tek sao lon dee ld 137 Vil Change Log Table 1 Changes done When What Who 2005 03 10 2005 03 06 2005 0
119. ia All Rights Reserved Permission to use copy modify and distribute this software and its documentation without fee and without a written agreement is hereby granted provided that the above copyright notice and this paragraph appear in all copies This software program and documentation are copyrighted by The Regents of the University of California The software program and documentation are supplied AS IS without any accompanying services from The Regents The Regents does not warrant that the operation of the program will be uninterrupted or error free Th nd user understands that the program was developed for research purposes and is advised not to rely exclusively on the program for any reason IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT INDIRECT SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING LOST PROFITS ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS BASIS AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE SUPPORT UPDATES ENHANCEMENTS OR MODIFICATIONS
120. ided if this checklist would have been in place when NSUML was taken into the project but some more appearant risks with subproduct candidates might be Here is the list of things to check in the subproduct and to discuss with yourself and maybe with the Ar goUML development team before considering to use it in the ArgoUML project e License We must be allowed to develop against release with distribute and use the subproduct indefinately without monetary or other compensation Rationale We have no money in the ArgoUML project we don t want to have money in the Ar goUML project We have no organization that can enter agreements and live up to them We don t want to require our users to enter agreements to use ArgoUML e Java version The subproduct must have a policy that matches the ArgoUML project policy on java version re quirements Rationale The ambition for ArgoUML is to be a working tool for as many people as possible Java is still under development and there are nice features available in future releases In ArgoUML we have a plan for how to handle this It is to always support two major releases of Java currently JDK 1 3 and 1 4 We cannot have a subproduct that restricts us in this aspect 112 Standards for coding in ArgoUML Distribution We require the subproducts to make it possible for us to take the distribution enter it in our CVS repository and write rules to automate the use of the subproduct while d
121. ile ar gouml tools checkstyle checkstyle_argouml xml e Checkstyle Properties File argouml tools checkstyle checkstyle properties e File Filter Definition argouml tools checkstyle checkclipse filefilters Leave the two other fields empty Run the JUnit tests There is perhaps some fancy way of doing this but while we figure that out this revert to ant way can be used to run the tests 1 Inthe menu select Window gt Preferences Select Ant gt Runtime at the left hand side Select the tab Classpath Select Ant Home Entries 2 Press the Add Jars button and add optional jar from argouml tools ant 1 4 1 3 Press the Add Jars button and add all jars from argouml tools ant 1 4 1 1lib 4 Press the Add Jars button and add jdepend jar from argouml tools jdepend 2 21ib 5 Press the Add Jars button and add junit jar from argouml tools junit 3 8 1 6 Press OK to store the new Ant classpath entries 120 Standards for coding in ArgoUML These first items need only be done once as a set up 7 Run ant with the alltests target This is done by selecting in the menu Run gt External Tools gt External Tools This will open the Create manage and run configurations dialog Select the Ant Build at the left and press the New button Rename to ArgoUML AllTests Then in the Targets tab select the alltests target deselect all other targets press the Apply button and fi nally press Run
122. in keeping up with the current literature in the domain of ArgoUML 3 Help with the improvements on ArgoUML by pin pointing where ArgoUML needs to be modified to allow for localization As ArgoUML is originally built without localization we still have places in the GUI that is not lo calizable just by modifying the resource bundles Each such place is a Defect and shall be cor rected 4 See that the used libraries also provide their part in that language 72 Inside the subsystems This is mostly GEF since GEF is central both when it comes to the fact that it has localized strings of its own but also because it handles parts of the localization This means discussing with the teams developing the underlying package as to how best to provide the localization for those parts Either by providing localization for that team to include in the pack age or by having ArgoUML overriding that package in that respect 5 13 2 Ambitions for localization Let me Linus Tolke May 2002 try to define the levels of ambition for us to try to make it possible to discuss where we are going 1 No translation This is the lowest level of ambition that is a do nothing level This goes for all languages where we have not done anything like Swahili Polish South African English 2 Tool translation This is the basic level of ambition that each Language Team should aim for It means that within ArgoUML all strings are localized so that
123. ind the entry labeled argo ext dir Create that directory if it does not already exist e Copy the plug in jar and any other jars required by it into that directory e Start up ArgoUML again and you should see the plug in s startup banner if it has one of course 95 Chapter 7 documentation Linus Tolke Organization of ArgoUML This chapter contains written down ideas on what goes into what part of the documentation These ideas are formu lated by Linus Tolke 7 1 Overview There are seven significantly different bits of documentation in the ArgoUML project By documenta tion I mean some information of the product that is developed alongside the product and that has a per sistent value 1 The code variable names class names 2 The javadoc 3 The cookbook 4 The web site in CVS 5 The manual and quick guide 6 Help texts within the running ArgoUML 7 The FAQ These different bits have all different purpose and audience and the purpose of this chapter is to try to define that Table 7 1 Bits of documentation Bit Audience Main purpose Contains The code 1 Other developers that will maintain and improve on the code 2 The compiler Implement ArgoUML in a maintainable and un derstandable way See Chapter 9 Standards for coding in ArgoUML for details on how to write the code The javadoc Developers writing code that communicates or in other ways interact w
124. inus Tolke recommend that you set them all on the Warning level This makes them visible for you You can then decide to fix them or not depending on how you feel about the code you are working with e Compiler compliance level See in the menu Window gt Preferences Then select Java gt Compiler At the right hand side se lect the tab Compliance and classfiles gt Compiler compliance level 1 4 In the ArgoUML project we have decided to keep source compliance to JDK 1 4 See Section 3 3 1 Choice of JRE ArgoUML will support any JRE compatible with a Sun specification of any JRE from Sun that has not begun the Sun End of Life EOL process This setting enables Eclipse to tell you where some JDK 1 5 features has creaped in e Find forgotten and incorrect javadoc comments In the menu select Window gt Preferences Then select Java gt Compiler Suggested settings for these tabs Only things diverting from the Eclipse defaults are listed e Javadoc gt Malformed javadoc comments Warning Private Report errors in tags e Javadoc gt Missing javadoc tags Warning Protected Check overriding and implementing methods These problems are also found by Checkstyle so if you are running checkclipse See Sec tion 9 7 4 Settings for checkclipse put this in Ignore instead e Code that hides other code In the menu select Window gt Preferences Then select Java gt Compiler Suggested settings for th
125. iption on what to do an what to expect This is a description in plain English telling the tester exactly what to do and what to expect If this description doesn t work or is ambiguous in any way the tester should consider the test to be DE FECT and report it in Issuezilla This is probably best written like this Do whatever Expected output whatever Do whatever Expected output whatever 2 5 3 The list of tests This section contains all the tests each in a subsection of its own 2 5 3 1 Modules are enabled TEST1 REVa Does not test any current requirements Preparations Download and install ArgoUML together with the modules Do Start in a window that allows you to see the output on Stdout Expected output Loaded Module Java from classes Loaded Module GeneratorCpp Loaded Module GeneratorCSharp Loaded Module GeneratorPHP Do Press F7 or select menu Generation gt Generate All Classes Expected output A window pops up with Class Name Java Cpp CSharp and PHP Do Select menu File gt Import sources then open the drop down box Select language for import to the far right Expected output The drop down box contains Java and Java from classes 2 5 3 2 Class diagram TEST2 REVa Requirements tested Section 3 2 1 ArgoUML shall be a correct implementation of the UML 1 3 model and Section 3 2 2 ArgoUML shall implement everything in the UML 1 3 model Do Select the Class Diagram
126. ist in the Java Build Path Select the class with the main method In the Java perspective select the project argouml i e the icon at the top of the Package Explorer Then in the menu select Run gt Run This will open the dialog for creating managing and run ning Run Configurations Select Java Application on the left and press the New button Name the configuration Run Ar goUML and press the Search button in the Main class box In the new dialog that appears Choose Main Type simply press OK This sets the Main class to org argouml application Main 117 Standards for coding in ArgoUML Press the Run button This will start ArgoUML From now on you can start ArgoUML by a single press on the Run icon in the toolbar 7 Verify that you can start ArgoUML from the debugger within Eclipse You can do this by clicking on the Debug icon in the toolbar 9 7 2 Eclipse to help with the ArgoUML coding style This instruction is to set up Eclipse to work according to the ArgoUML Coding standards If this is not done correctly you will most likely find that you will have to do a lot of manual edits every time Eclipse has touched the code You have your tool working against you instead of for you On the other hand these settings affect your Eclipse Workspace rather than the ArgoUML project settings so if you have other projects in the same Eclipse Workspace there might be conflicts For this reason it might be a go
127. ister e Languages that generates a Notation implement the Notat ionGenerator interface e Languages that edits or parses the Notation implement the Notat ionEditor interface e Languages that generates Code templates implement the CodeGenerator interface e Languages that reverse engineer Code implement the CodeReverseEngineer interface Full MDA implementations of languages is not currently discussed I Linus April 2004 does not under stand how it is supposed to work 5 8 Java Code generations and Reverse Engi neering 5 8 1 5 8 2 5 8 3 Purpose two purposes to allow the model to be converted into java code and updated either in java or in the model to allow some java code to be converted into a model The java things are located in org argouml language java The Java subsystem is a Loadable subsystem See Section 4 6 Loadable subsystems How dol Which sources are involved The package org argouml uml reveng is supposed to hold those classes that are common to all RE pack ages At the moment this is the Import class which is mainly responsible to recognize directories get their content and parse every known source file in them These are only java files at the moment but there might be other languages like C in the future With this concept you could mix several lan guages within a project The DiagramInterface is used to visualize generated NSUML meta model ob jects then The p
128. it It is now his responsibility to make sure that the problem will not appear in the next version He can do this either by merging in your fix or by fixing the problem in some other way At this point an in detail description of how poor programming skills the culprit has and how ugly his mother is is probably in place but please keep it constructive Remember you might be mistaken when you guess who the responsible is 21 Building from source 2 6 1 2 Delay the release waiting for someone to fix the problem Create the branch as described in Section 2 6 1 1 Fix the problem yourself Then tell the culprit and everyone on the developer list what the problem is and that it is to be fixed in the release branch a s a p Monitor the changes made to the branch to verify that no one commits anything else but the solutions to the problems When you get notified that it is completed update your checked out copy and continue the release work 22 Chapter 3 ArgoUML requirements Linus Tolke This chapter contains a description on how ArgoUML should work and behave for the users These things might not be implemented yet and the solutions might not even be clear but it is a defini tion of the goal The fact that it is not implemented or doesn t work as stated here should be registered as a bug in the bug registering tool Every requirement has a number REQ1 REQ2 REQ3 that never changes a revision REVa
129. it works can generate the documentation like described above and examine the result in argoum1 build It is only the last part about checking in and uploading the result under argouml www documentation that requires write access in the CVS and some con figuration management since it more or less is releasing the manual In order to do this you need to check out the whole of the argouml document ation directory You also need the directory argouml lib and argouml tools that contain the tools used ANT Fop saxon The subdirectories of argouml documentation cookbook manual and quick guide each contain one of the three books The subdirectory docbook setup contains two things It contains the configuration files that control how the generation is done It contains the XSL rules for all the genera tion The subdirectory images contains all the required pictures for all the books When in the documentation you run build sh defaulthtml or one of the other targets that builds the documentation all books are built What happens is the target internal dispatcher e The manual argomanual xml is copied by ant to argomanual gener manual ated xmi while doing substitution of tokens VERSION to become the version as specified in default properties e The file manual argomanual generated xml is processed by the special docbook setup create imglist xs1 xsl script that generates a list of included images e All included images are copied
130. ith this class Make it easy to see what the functions of every class are and how to use them Description of the func tions of all classes all public and protected methods variables and constants The cookbook Developers writing code maintaining the docu Make it easy to learn how ArgoUML works Instructions on how to add new functions and 96 Organization of ArgoUML documentation Bit Audience Main purpose Contains mentation or the web site and how to extend it Be a collection of knowl edge around how every thing is set up Be a store of the agreed solution around fundamental de sign decisions i e design decisions that are so big that it is meaningless to store them in the javadoc Be a collection of knowledge around how and why the project makes certain decisions behavior Instructions on how to do the chores around maintenance build a release publish a release build the docu mentation part of the re lease test ArgoUML test the documentation Agreed project rules like what level of quality is aimed for and descrip tion of processes that achieves that level The web site in CVS Everyone i e developers in the project users of the product people searching for UML tools for the purpose of trying testing evaluating and using the tools Be an entry point for the other parts of the docu mentation Be the main download
131. ities to ap pear in boldface e Adding setq sgml auto activate dtd t to your emacs file will ensure the Doc Book DTD is parsed as soon as the file is loaded 124 Chapter 11 Further Reading 11 1 Jason Robbins Dissertation Cognitive Support Features for Software Development Tools The dissertation of Jason Robbins is a MUST READ for everyone concerned about ArgoUML Be care ful though since it is based on an old version of ArgoUML but many of the concepts remain intact 11 1 1 Abstract Software design is a cognitively challenging task Most software design tools provide support for edit ing viewing storing sharing and transforming designs but lack support for the essential and difficult cognitive tasks facing designers These cognitive tasks include decision making decision ordering and task specific design understanding To date software design tools have not included features that specif ically address key cognitive needs of designers in part because there has been no practical method for developing and evaluating these features This dissertation contributes a practical description of several cognitive theories relevant to software de sign a method for devising cognitive support features based on these theories a basket of cognitive sup port features that are demonstrated in the context of a usable software design tool called ArgoUML and a reusable infrastructure for building similar features into other d
132. itions the new mod ule loader shall be used 6 1 How do l e get the according NS UML element for a given FigXXX class Each FigXXX implements the method getOwner which returns the appropriate owner element which is responsible for this Fig element e get the according Fig element for a given MModelElement for this one needs to iterate through all fig elements and invoke getOwner Compare the result with the given MModel elElement Element Beware that there might be more than one Fig Element per MMod 6 2 Modules and Plugins The ArgoUML tool provides a basis for UML design and potentially an executable architecture environ ment for more specialized applications This is solved by a clear interfaces between the ArgoUML core and the extensions Extensions are called modules 6 2 1 Differences Note between modules and plugins This description is only relevant for the old moduleloader since the plugins concept is not used in the new one In the old moduleloader implementation the classes within the modules that attach to ArgoUML core are called plugins In the new moduleloader implementation they don t have any special name e Modules A module is a colle ction of classes and resource files that can be enabled and disabled in ArgoUML Currently this is decided by the modules availability when ArgoUML starts but in the future it could 87 Extending ArgoUML be made possible
133. itive design features 100 Organization of ArgoUML documentation d User Manual sections relating to UML for readers who don t know UML e Completion of Reference Manual material 7 Create an index Completed 7 2 4 2 Remaining Questions 1 The current manual shows copyright held by Phillipe and no legal notice What is the position of this material Solved 101 Chapter 8 CVS in the ArgoUML project 8 1 How to work against the CVS repository The CVS repository is a shared resource in the project This means that once you commit your stuff it has the potential of getting in the way of everybody else s work in the project For this reason special considerations are needed This chapter describes the how you should do to limit the risk of causing someone else problems When you have done all the work and all the testing and are about to commit something please do 1 Compile ArgoUML build run or build package This goes for all changes even changes in comments 2 If your changes include removing files make a clean compile build clean followed by build run or build package 3 If your changes include removing public or protected operations and attributes make a clean com pile build clean followed by build run or build package The build mechanism does not yet have reliable dependency checker enabled so this is the best way to make sure 4 If your changes include adding abstract operations make
134. itorPane is set via the set Target method of the pane This method is called by the set Target method of the ProjectBrowser The pane s set Target method will call each set Target method of each tab that is an instance of TabModelTarget Besides setting the target of the tabs the set Target method also calls Mult iEditorPane select Object o This selects the new target on a tab This probably belongs in the set Target method of the individual tabs and diagrams but that s how it s implemented at the moment 5 3 1 1 How do l e adda new tab to the MultiEditorPane Create a new class that s a child of JPanel and put the following line in argo ini multi fully classified name of new tab class 5 3 2 How do I add a new element to a diagram To add a new element to a diagram two main things have to be done 48 Inside the subsystems 1 Create new Fig classes to represent the element on the diagram and add them to the graph model org argouml uml diagram xxxx XxxxDiagramGraphModel java and renderer org argouml uml diagram xxxx ui XxxxDiagramRenderer java 2 Create a new property panel class that will be displayed in the property tab window on the details pane This is described in Section 5 4 Property panels Throughout we shall use the example of adding the UML Extend relationship to a use case diagram This allows two Use Cases to be joined by a dotted arrow labeled extend to show that one extends the b
135. l book 4 New files are copied into the checked out copy of www on top of the previous files there replacing them All the files are copied from argouml build documentation defaulthtml1 book to argouml www documentation defaulthtml book The same for printablehtml and pdf 5 No longer used files in argoum1 www document ation are removed from CVS and new files are added cvs n update Watch for Missing and Unknown files The missing files are scheduled to be removed by cvs remove each of the missing files The Unknown files are scheduled to be added by cvs add each of the added files This removing of missing files and adding of unknown files may seem backward but it is from the perspective of CVS The missing files are the ones that were present in the previous version of the documentation and do not have a replacement either because that chapter does not exist anymore or that the tool generates filenames differently The Unknown files are files with filenames that for the same reason appear from one version of the documentation to the next 6 Commit the changes thus publishing it on the web site cvs commit m New version of the documentation published 7 The PDF book is uploaded to the download page 11 Building from source 2 3 2 0 How we work with documentation The developers or authors that work with the documentation or with the tools to generate the documen tation or anyone else interested in how
136. ldBeEnabled 15 Building from source 2 5 Manual Test Cases 2 5 1 The manual test cases are here to help us test ArgoUML in order to cover things that are not testable with the JUnit test cases Since it is a little bit more cumbersome to run them a tester must read the test cases understand what he is supposed to do do it and document the result we try to go as far as possi ble with the JUnit test cases and have as few manual test cases as possible I e If one of these tests can be converted into a JUnit test case we shall try to do so because it can save us a lot of time On the other hand there are several things that cannot possibly be tested with JUnit tests so there probably are a lot of Manual Test Cases to be written Running the manual tests Anyone can run the manual tests on any version of ArgoUML If it doesn t work i e the expected result is not seen then this is a defect in that version of ArgoUML and should be reported using Issuezilla At every release the ambition is to run through all manual tests Initially when the amount of manual tests is small this is done by the release responsible while testing the newly compiled release Later on when the amount of manual tests makes it unpractical to this during the release work the work can be done by anyone or any group of people within the project after a development release is made and be fore a stable release is made A signed stateme
137. le Subsystems essnee Sa eE EE E Sean sep veen sons vedurensshansep enestonys 32 5 Inside the SUDSYSLEMS sirep uee e E sees E a E E E E OERE 34 DAL Model aaura ae E Bae Meee E a E N E AE IE a NE NE 34 Del HB AClOLISS 55 E E E eat Sa ete ee bet eee eh aes tekanaaey 34 5 12 ACI POEs 2 ve casings vuanasea ves eess o e label emu cau vets eters E o NEEE EEEN EEEE 35 5 1 3 The model event pump re ae ee cece cece eens AEE E E eens RE EES 35 5 1 4 How to work against the model 20 0 0 eee cence ee ceeeceeeeaeeea seca eenneenes 38 D153 HOW dO Lie EE EE niwed gest eeadehs see ecds vt eho edisvteesstieo ed asieredes 41 5 2 Critics and other Cognitive tools s riire guests nese sbobaasdseoseessebvteagaseeness ss obeeas 42 3 2 1 Main Classes occs sven ches e esa Seva see a E ei adstegs dda E SE REES 42 92 2 HOW dO Lis is scch is ahereasea batts ssaustes E ee eteasae sab obeg eet ddbae E EE T bene 44 5 2 3 org argouml cognitive critics Class diagram 2 2 0 0 00 cee eee eeeece neces ce ener ence ee ee 46 DS DiasramiS os scat a eee stay tec G Tn E sa Ade AN E eae eG Ole ea novoneee Sayed EE aes O EEES 47 9 331 Mult editor pane x sos fs0e secaceiaaeeseagnsee a has abu iaee E ee E RET S 47 5 3 2 How do I add a new element to a diagram 0 0 0 0 cece eee cece ce ee ceeece ener eeee ees 48 5 33 HOW to add anew Fig co deeso pe EAS svgs vedey ob aE OE EENS SERE 49 3 4 Property panels onnensa e E E E A wiketec E e eN 51 5 4 1 Adding
138. ll decisions and the To Do Items used to present the information This subsystem contains the following main class types e Critics provide help to find artifacts in the model that do not obey simple design rules or best practices e Checklists provide help for the user to suggest and keep track of considerations that the user should make for each design element Checklists are currently 0 9 5 and 0 9 6 turned off e ToDoltems provide a way for the Critics to communicate their knowledge to the User and let the User start Wizards e Wizards are step by step instructions that fix problems found by the Critics Main classes Here is an illustration of the main classes implementing critics 42 Inside the subsystems C riticd getC riticke yo ConfigurationKey getC riticCategoryd String getC riticName 0 String critique dm Object dsgr void postite miite m dm Object dsgr void predicate dm Object dsgr boolean stillValid i dsgr boolean supportsid boolean getSupportedDecisionsd Vector addSupportedDecision d void Supportsig boolean getSupportedGoalsd Yector addSupportedGoalig void containsKnowledge Type type String boolean add Knowledge Type itype String void getKnowledge Type sO YectorSet setKnowledge Type sikt YVectorSet void setKnowledge Type sitl String void setKnowledge Type sitl String t2 String void
139. lso assign it back to issues argouml or if you know someone else in the ArgoUML team that will continue the work assign it to him Remember not to commit your changes in the main branch but please com mit your changes if any into a work branch and state the name of the branch in the issue That will make it possible for someone to make use of your work so far Commit your changes and the JUnit test cases stating the number of the Issue in the comment If you don t have a developer role in the project this involves sending your changes to someone who has and then convincing him to commit them for you Resolve the Issue with the resolution FIXED Sit back and feel the personal satisfaction of having completed a something that will be part of the ArgoUML product 132 Processes for the ArgoUML project 11 If you during this have discovered other problems create new Issues stating those new problems according to the rule for creating Issues 12 5 How to verify an Issue that is FIXED This can be performed by any member of the project any role There might be special skills involved but it differs widely depending on the nature of the Issue Do the following 1 Pick any Issue that is RESOLVED FIXED or WORKSFORME and that you have not raised nor solved and that is included in a release Target milestone set to a release available on the site The list of all RESOLVED FIXED and RESOLVED WORKSFORME issues reso lu
140. ltMutableTreeNodes Ex plorerTreeNodes that maintain their own order on child nodes this will typically be an alphabeti cal order on the model element names However it could be enhanced to include more powerful or ders like total subtree size 3 The model uses the third part of the Explorer design PerspectiveRules to add child nodes to the leaves of the tree The structure of the tree is wholly dependent on the collection of Perspec tiveRules that together provide a specialized view of the UML model This is very flexible and ex tensible The org argouml ui explorer rules package contains a default set of PerspectiveRules Each node is displayed with a name and an Icon representing the type of node it is in the UML model This is done using the org argouml uml ui UMLTreeRenderer for the Icon and the text is produced in the convertValueToText method in org argouml ui explorer ExplorerTree 5 17 4 How do I e add another perspective e The perspectives can be configured using the 82 Inside the subsystems org argouml ui explorer PerspectiveConfigurator by the User The changes to the pre defined built in defaults are stored in the argo user properties file e Ifyou want to do this as part of an extension to ArgoUML then you should use see above APIs 1 2 and 3 and SPI 2 The functions needed are present in the PerspectiveManager mprove the PopUp menu There is no way of doing this cu
141. ltiple visual components are showing the same model element they shall be updated in a consistent manner throughout the application ee 23 3 1 2 All views of a model element shall be update as soon as the model element is Updated eins ieee cleo delice ie tea aay ath O eco NEINS 23 3 1 3 Editable views of the model should update the model on each keystroke and MOUSE click eneon iron eroa soak oghk He sees T oboe teen E E oes BAe teks 23 3 1 4 Any text fields that require validation should not be editable directly from a VEM a Feit eae bes tee EEE erence hase coeds OEE sab EEVEE E bo EE Laban eee 24 3 1 5 With dialogs the model is not updated until the dialog is accepted by the user with valid fields vce cos sous ook seus doves oydebesdots ina ge iane E EE e gested ESETE E vee s 24 3 1 6 The user shall receive some visual feedback during the edit process of textual UML to indicate whether the text represents valid UML syntax cee 24 3 1 7 There shall be no indication of an exception on the screen or in the log if it has occured merely because of a user mistyping or not being aware of UML syntax 24 3 1 8 All text fields shall have context sensitive help esseeceeeeeeeeeceeneeeeee eee 25 3 2 Requirements fo UME eein en e aere aa Ee e S A EEEE EAA EES 25 3 2 1 ArgoUML shall be a correct implementation of the UML 1 3 model 25 3 2 2 ArgoUML shall implement everything in the UML 1 3 mod
142. lution in English U S in the non localized properties file in ar gouml src_new org argoum1 il18n and test that the GUI looks good for the default language Which property file ArgoUML will eventually use depends on the localization settings of the running ArgoUML instance While developing you should use en_US or some language that does not have a translation so that you can work with the default language 3 Contact all language teams so that they can update their files Currently November 2003 there is a great confusion as to where we stand on the different translations For this reason we can t say if any language team is up to date with the changes and served by such a contact 75 Inside the subsystems 4 If you have strings that are sentences where you have dynamic values like a file name a class name or some property to enter at a certain place remember that all languages would not write it exactly like that Use MessageFormat to build every such sentence There is a conve nience function for this in Translator called messageFormat Notice that if you somewhere change the meaning of a specific localized thing it would be a good idea to use a new key for the new meaning This will make it easier for the translation team to spot the modification There allegedly are tools in the java world to spot this kind of changes Until we have the tools and processes in place to handle them it is better to rely on this simpler me
143. menu actions that start the help and other documentation To provide infrastruc ture that makes context sensitive help possible The Help System is not yet implemented The Help System will be located in org argouml help The Help System is a Model subsystem See Section 4 4 Model subsystems Javahelp or some other help function will probably be used 71 Inside the subsystems 5 13 Internationalization Purpose to provide the infrastructure that the other subsystems can use to translate strings to provide the infrastructure that makes it possible to plug in new languages to administer the default English U S language to administer all supported languages The Internationalization is located in org argouml1 i18n in the class path In the checked out copy of ArgoUML it is located partly in argouml src_new org argouml il8n functionality and non localized default language US English and partly in argouml src il8n languagesrc org argouml all files for a specific language The Internationalization is an Infrastructure subsystem See Section 4 3 Low level subsystems In ArgoUML internationalization sometimes called i18n is done using the property files i e Proper tyResourceBundles We used to have ListResourceBundle classes instead but they are all gone by 0 15 3 5 13 1 Organizing translators The problems with internationalization are not so much the technical problems as to how it works but more s
144. mplement Mut ableGraphModel GEF 5 3 3 3 Changing the renderer The renderer is responsible for creating graphic figs as required on the diagram It is found in the same directory of the corresponding diagram class and has the general name DiagramRen YYYYderer java where YYYY is the diagram name in bumpy caps For example the use case dia gram graph model is in uml diagram use_case ui UseCaseDiagramRenderer java This provides two routines getFigNodeFor which provides a fig object to represent a given NSUML node object and getFigEdgeFor which provides a fig object to represent a given NSUML edge object In our example we must extend getFigEdgeFor so it can handle NSUML MExtend objects producing a FigExtend 5 3 3 4 Creating a new Fig explanation 1 New objects that are to appear on a diagram will require new Fig classes to represent them In our exam ple we have created FigExtend They are placed in the same directory as the diagram that uses them The implementation must provide constructors for both a generic fig and one representing a specific NSUML object It should provide a setFig method to set a particular figure as the representation It should provide a method canEdit to indicate whether the Fig can be edited It should provide an event handler modelChanged to cope with advice that the model has changed 5 3 3 5 Creating a new Fig explanation 2 Assuming you have your model element already
145. n t matter Just press Yes or No The download takes a while since the download is around 60Meg Remark If you are on a modem or other low bandwidth connection this is not recommended since you will download all of the web site the source for the documentation and all modules things that you could do without unless you would want to work on them If you find a way to do this with less bandwidth use please help improving this description Theoretically we can come down to around 16Meg which would take around two hours on a 56K modem 3 Build using ant Browse to argouml src_new build xml select the build xm1 file right click on it and 116 Standards for coding in ArgoUML do Run Ant This pops up the External Tools pop up with the Targets tab already selected Se lect compile default target in the Targets tab deselect all other targets and finally press Run a Warning Remark from MVW This did not work for me I first had to set the Java Build path as described below Please confirm or deny this statement so that I can adapt this expla nation There are some files that are built using rules in the build xml file This is the antlr files and the file containing a version Refresh the project This must be done after having built using ant to find the newly created java files Select the top resource of the argouml project in the Navigator on the left right click and select Refresh Set build path
146. n that he has made a misstake and upgrade ArgoUML to a version of that library without that method or class deprecated If it is within ArgoUML discuss it with the person who actually did the deprecation or in the devel opment team Comment There is an ongoing work probably perpetually to change the calls to deprecated meth ods and classes that has been deprecated after used in ArgoUML This is a normal part of improving ArgoUML If this work is too slow it makes it impossible to upgrade to new versions of different subtools This problem is seen by the person responsible for sourceing of the subtool when actu ally trying to upgrade the subtool See Section 12 8 How to relate issues to problems in subprod ucts Don t use very long package and class names To make the code readable keep class names shorter than 25 chars and have at most four levels of packages Historically in the ArgoUML design a deep package structure has been used There are several places in the code where the package structure is mimicing the UML hierarchy of objects resulting in impossibly long package names like org argouml model uml behavioralelements collaborations classname and org argouml uml ui behavior common_behavior classname While establishing the subsystems we use a two level approach much like the rest of the java world For the subsystem API we always use org argouml subsystem package name i e the classes are in the subsystem s director
147. named build xml There is one of those in every separate build directory src_new src whatever documentation and modules whatever 2 3 1 How ANT is run from the ArgoUML development environment For your convenience the ant tool of the correct version is present in the CVS repository of ArgoUML in the file argouml tools ant 1 4 1 lib ant jar Normally ant is started with the command tools ant 1 4 1 bin ant arg and in the modules tools ant 1 4 1 bin ant arg On windows the command tools ant 1 4 1 bin ant arg runs the pro gram ant bat To keep you from having to write this and keeping track if you are working with a module or not there are two scripts one for Unix and one for Windows that are called build sh and build bat re spectively present in most of the directories that contain a build xml file These two scripts run the equivalence of the above paths By setting JAVA_HOME to different values you can at different times build with different versions of JDK and java To use different versions of ANT you are responsible for installing your own version Also you must execute where ever you placed your new ant target rather than build target 2 3 1 1 Compiling for Unix Here is what you need to do in order to compile and run your checked out copy of ArgoUML under Unix 1 JAVA_HOME where you have installed jdk export JAVA_HOME This is for sh style shells like sh ksh zsh and bash If you use csh style shells like cs
148. nd of the main initialization routine the selected modules are enabled The original idea was to do this several times during the main routine to allow for modules to add command line arguments add languages and make functions available for batch command but the example used for testing loaded the ProjectBrowser too early and the result wasn t so good I Linus hopes this can be eventually fixed 6 2 2 4 The Modulelnterface interface in the new implementation Each class used by the ModuleLoader2 must implement the ModuleInterface interface This interface has methods for enabling disabling and identifying the module When a module is enabled it is expected to register some class wherever it affects ArgoUML using the interfaces provided there Since the same interfaces and registration mechanism is used internally within ArgoUML there is a small likelyhood that there already is an interface and a possibility to register If there isn t ArgoUML cannot currently be extended at that point If you still need ArgoUML to be ex tended at that point you will have to work in getting this interface or registration mechanism imple mented within ArgoUML This could also be another module that has to be amended Classes administered by the module that registers to whatever place of ArgoUML they are interested in does not need to have any connection to the module loader They are written exactly as if they would have been if they were part of the c
149. ne place in manifest template Class Path In each of the Java Web Start files resources In the Info plist ClassPath Check by having some class from the subproduct loaded immediatly when starting ArgoUML and start with java jar argouml jar using each of the Java Web Start files and from the Appbund on a Mac See Section 12 8 How to relate issues to problems in subproducts for a discussion on how to handle bugs found in subproducts and updates of the version of a subproduct 9 4 Settings for Eclipse 2 These style guides correspond to the following settings in Eclipse 2 e In Preferences gt Java gt Code Formatter gt New Lines None of the boxes Insert a new line before opening brace Insert new lines in control statements Clear all blank lines Insert new line between else if or Insert a new line inside an empty block are checked e In Preferences gt Java gt Code Formatter gt Line Splitting 114 Standards for coding in ArgoUML Maximum line length is 80 e In Preferences gt Java gt Code Formatter gt Style None of the boxes Compact assignment or Indentation is represented by a tab are checked Number of spaces representing a tab 4 This should probably be read as Number of spaces repre senting a level of indentation e In Preferences gt Java gt Java Editor gt Appearance Displayed tab width 8 Insert space for tabs see Formatting preferences checked The
150. nedElement constrainedElement2 constrainingElement constraint container contents context createAction defaultElement defaultValue deferrableEvent deploymentLocation discriminator dispatchAction doActivity dynamicArguments dynamicMultiplicity effect elementImport elementImport2 elementResidence entry 55 Inside the subsystems event exit expression extend extend2 extendedElement extender extenderID extension extensionPoint feature generalization guard icon implementationLocation include include2 incoming initial Value instance instantiation inState interaction internalTransition isAbstarct isAbstract isActive isAsynchronous isConcurent isDynamic 56 Inside the subsystems isInstantiable isLeaf isNavigable isQuery isRoot isSpecification isSynch kind link linkEnd location mapping message messagel message2 message3 message4 method modelElement modelElement2 multiplicity name namespace nodeInstance objectFlowState occurrence operation ordering outgoing ownedElement 57 Inside the subsystems owner ownerScope package parameter parent participant partition partition powertype powertypeRange predecessor presentation qualified Value qualifier raisedSignal receiver reception recurrence referenceState representedClassifier representedOperation requiredTag resident residentElement script sendAction sender signal
151. need to do this in a passive way We should explain to the subprod uct team what we want and why Especially for subproducts that we have already in ArgoUML but also for project that we consider taking in This is to increase the likelyhood that they will have us in mind when planning and evolving Here are the steps to go through and the recommended order once the decision is taken to use the sub product in ArgoUML Documentation Describe in the Cookbook in the appropriate subsystem section what part of the problem that the subproduct solves and how it is used in ArgoUML Javadoc Enter the package list file in a special directory under argouml 1lib javadocs Update the list of links used when building the javadocs One place in default properties One or two places in build xml targets javadocs and javadocs api Test by referencing some class from the subproduct building the javadoc and check that the link is working Repository Assuming that the subproduct is distributed in a set of jar files add the jar files to the 1ib directory in a versioned way together with the license file Use filenames like 113 Standards for coding in ArgoUML jar and subproduct LICENSE txt A future plan is to have each subsystem in their own directory If the subproduct in question belongs to a subsystem that is moved to a separate directory you should put it in the 1ib directory for that subsystem For the time being there
152. nitializes the menu tool bar status bar and the four main areas navigation pane org argouml ui NavigatorPane editor pane org argouml ui MultiEditorPane to do pane org argouml cognitive ui ToDoPane and details pane org argouml ui DetailsPane Then the actual project is set to either a read from file project see ArgoParser SINGLETON readProject URL and Ar goParser SINGLETON getProject in org argouml xml argo ArgoParser or a newly generated project see Project makeEmptyProject 5 11 2 Details pane Currently May 2003 the Details pane contains several tabs Property Panels See Section 5 4 Property panels Critics explanations and wizards belonging to the Critics subsystem See Sec tion 5 2 Critics and other cognitive tools Documentation Style Source Constraints an OCL con straints of the current object See Section 5 19 OCL and Tagged values 2 Warning It is not clear in what subsystem Documentation Style Source and Tagged values belong 5 11 2 1 How do l e add a tab in the Details Panel Create your TabXXX class in org argouml uml ui by copying from another TabYYY java e g TabSrc TabStyle Then register your TabXXX in org argouml argo ini by adding a line giving the compass point to place the tab Like south TabXxXX e remove a tab from the Details Panel Remove the line for the tab from org argouml argo ini 5 12 Help System Purpose to provide the
153. nt with list of run tests including version number a list hopefully empty of failed tests together with their Issuezilla DEFECT number the host type OS JDK version ArgoUML version shall be mailed to the dev list when these tests are completed 2 5 2 Writing the manual tests Adding a new manual test to the group of already existing manual tests or improving one of the existing tests helps the project forward Remember that the first priority is to test things with the JUnit tests be cause they can be to some extent run automatically and have their result reported automatically but then manual tests are the next big improvement Every test has several attributes to make sure that we can identify the test and help the developers and testers e A name This name is the title of the subsection where the test is described A number These start with TEST1 and are allocated in sequence and maintained manually in this document TEST2 TEST3 TEST4 They are never reused when made available by removing a test case e A revision Every test case has a revision These start with REVa and are increased with one every time the test case is changed e A list of requirements tested This list is references to the requirements as stated in Chapter 3 ArgoUML requirements e Preparations i e what to do before the test This is Optional The default is that you have just started ArgoUML 16 Building from source e A descr
154. nts for issues connected to the spe cific diagrams This chapter gives an overall picture with a list of subsystems their dependencies and their main re sponsibility Chapter 5 Inside the subsystems explains each subsystem in detail The subsystems are organized in layers The purpose of the layers is to make it easy to see in what direc tion the dependencies are and thus allow us to know what dependencies are to be removed in the cases where we have circular dependencies This will also allow us to know which other subsystems that are involved when testing a subsystem 4 1 Definition of subsystem All ArgoUML code is organized in subsystems Each subsystem has e A name e A single directory Java package where it resides Subparts of the subsystem can reside in subdirectories of this directory Auxiliary parts imple mented in other products of the subsystems can reside somewhere else Notice that each other prod uct used by ArgoUML is in the design located within one of the existing subsystems This means that a change of version or indeed a change of choice of such a sub product is an internal matter for the subsystem and should ideally not affect any other subsystem All public and protected methods of all public and protected classes in this directory constitute the API of that subsystem e A section in the chapter Chapter 5 Inside the subsystems The section shall for each subsystem contain the responsibilities the
155. o create what you want 3 use new on a MXXXImp1 class Whilst 1 is best most of the MMUtil routines are not yet general enough Be sure to set it up don t forget e g namespace etc Remember also to change anything that references the newly created entity e Warning The NSUML routines generally set up the other end of a rela tionship automatically if you set up one end If you try to do both on a NxM relationship you will probably end up doing it twice If you do encounter this the rule of thumb is to explicitly set the ordered end if you do it the other way round NSUML will as sume you mean the other end to be at the end of its ordered list public void deletReffonm thnaictions associated with the delete pop up menu on the element at the given index There is no default provided so this must be given if the delete operation is supported public void movelReffonm thnakttons associated with the move up pop up menu on the element at the given index There is no default provided so this must be given if the move up operation is supported public void movelRewfotmrthe ctas Associated with the move down pop up menu on the ele ment at the given index There is no default provided so this must be given if the move down operation is supported The following normally use the default method but may be declared to override methods in the parent public void resetGalled When an external event
156. o the problems are with getting keeping and coordinating the correct competences to do the job This comes from the fact that by necessity the different persons working with internationalization have different native languages and that complicates the communications To handle this problem for GNU applications there is a community set up around gettext with one lan guage team per language working with all gettext applications There are also tools to help the transla tor do his job delivered with gettext that are the same for all the applications In each of these lan guage teams discussions are held that ensure a consistent use of words over all these applications It is for me Linus Tolke May 2002 unclear if and how such a community exists for Open Source Java tools and ArgoUML cannot simply benefit from the gettext communities since we don t use gettext and cannot use the same tools To get things done we organize our own Language Teams with ArgoUML Each language team is actu ally just one or several persons that know that language and are eager to work with translating Ar goUML The language team has the following responsibilities 1 All localized strings and resources shall be translated into the language This is a constant work with keeping up with the changes that will be made to the ArgoUML code since ArgoUML is under fast development 2 The terminology used shall be correct This requires work
157. oUML 9 2 Rules for the building process For the build xml files we use the following rules e Be careful when downloading stuff ArgoUML is supposed to be a self contains development environment Some times it is better to have things downloaded from the ant script instead of from the cvs repository In that case separate the download targets from the target that does building so that it is easy for everyone to know when their development machine is working against the internet and when it is not e Public targets shall have description Non public targets shall not have description write xml com ments or echos instead e Use ant builtins for everything ArgoUML is supposed to be a self contains development environment If you feel tempted to use other tools perl sed nsgmls don t They are probably not present in all environments where we want to run a development environment 9 3 Checklist for using subproducts Linus Tolke In the ArgoUML project we use several subproducts to solve parts of the problem for us These subprod ucts are an important part of the ArgoUML tool and must be handled in a good way if ArgoUML is go ing to be successful When this is written March 2004 we have had problems with the discontinuance of one of the subprod ucts NSUML and will continue to have it for well some time in the future until we have managed to replace it The problem with NSUML could probably not have been foreseen or avo
158. od idea to do the ArgoUML work in an Eclipse Workspace separate from your other projects e Code conventions See in the menu Window gt Preferences Then select Java gt Code Style gt Code Formatter Set the Code Formatter to Java conventions built in e TAB character width is 8 See in the menu Window gt Preferences Then select Java gt Editor Then select the tab Appear ance Set the Displayed tab width to 8 e New file templates See in the menu Window gt Preferences Then select Java gt Code Style gt Code Templates At the right hand side open the tree for Comments and set the Code Templates for Overriding methods to S see_to_overridden In the same tree for Code Templates open the Code node and select New Java Files Set it to S Id s Copyright c 2005 The Regents of the University of California A 1 Rights Reserved Permission to use copy modify and distribute this software and its documentation without fee and without a written agreement is hereby granted provided that the above copyright notice and this paragraph appear in all copies This software program and documentation are copyrighted by The Regents of the University of California The software program and documentation are supplied AS IS without any accompanying services from The Regents The Regents does not warrant that the operation of the program will be unint
159. of 10 4 DocBook Conventions e The top level document of the document is in documentname in copied to document name xml by the build script Each chapter or preface glossary appendix etc is a separate file defined as a system entity and included from this top level file e There are some useful entities defined for common terms in the beginning of this top level docu ment E g use of amp argouml will ensure consistent naming of the product ArgoUML and allow us to change it later to Argo UML Argouml or whatever In the build script there is some magic that translates tagname to a real value E g VERSION in the documentname in file into what ever in the documentname xml file e XML comments are used throughout to explain what various sections are trying to achieve e Cross referencing requires use of id attributes Many of these used in the manual are of the fol lowing format but the use of this format is not obligatory any more To avoid confusion use a prefix of ch for chapter app for appendix s for sectl through sect5 fig for figure tab for table and gl for glossentry A second prefix of tut or ref is allowed to distinguish tutorial and reference material The re mainder of the tag should be descriptive but concise with words separate by underscore Where a graphic is involved this remainder should correspond to the file name For example fig ref navigation_pane for a figure showing the explorer
160. of such an operation today navigate programmatically to a certain explorer element so that its path is exploded In general you can t The Explorer tree is lazy in that it only explores the parts of the tree that the user has opened And since the GoRules are general navigating to them would require a complete tree search Which is also complicated by the fact that the answer is not unique and there can be branches with infinite depth In reality it would be possible to create an algorithm to search out one occurrence of an element since the model only contains finitely many elements and I assume that no one will add go rules that add branches of infinite length that does not infinitely often contain elements from the model but I don t think anyone has don t it Obviously finding all occurrences cannot be done 83 Inside the subsystems 5 18 Module loader Purpose to provide the mechanisms to load and unload the auxiliary modules The Module loader is located in org argouml moduleloader An old module loader is located in org argouml application modules ModuleLoader with interfaces Pluggable in org argouml application api Eventually this will be removed It is the modules responsibility to connect and register to the subsystem or subsystems it is going to work with using that subsystem s API Facade or Plug in interface For details on how to build a module see Section 6 2 Modules and PlugIns 5 18
161. oint where each language with Reverse Engineering possibil ity registers The Reverse Engineering Subsystem is described in detail in Section 5 6 Reverse Engineering Sub system Module loader 31 ArgoUML Design The Big Picture This is the load mechanism for loading all loadable subsystems and other modules into ArgoUML The Module Loader Subsystem is described in detail in Section 5 18 Module loader Property Panel Navigator Panel Reverse Engineering Code Generation Module Loader 1 le a N youl oA 1 se l AA i ae Vv vo Wie GUI Framework Model I The subsystems are all started and initiated from the Application subsystem The Application subsystem starts the ball rolling The Application subsystem is described in detail in Section 5 11 Application Application 1 1 1 R 1 ax 1 I 1 1 1 1 1 1 1 i i 1 t 1 1 1 F gt T a Exporer To do Items 4 6 Loadable subsystems These subsystems are eventually connected through the pluggable interfaces provided by the control subsystems This means that they can be individually enabled and disabled using the module loader Note The module loader does not really have this possibility currently August 2004 e Java Code generation Reverse engineering This is the ArgoUML connection to the Java language The Java Subsystem is described in detail in Section 5 8 Java Code gener
162. omplete tree is uploaded to ar gouml upload on the site 19 Building from source g Tag the whole repository with the release tag This tag is VERSION_X_Y_2 e g VERSION_0_9_7 The according command line CVS command is cvs tag VERSION_X_Y_Z when your are standing in the argoum1 directory Test the release manually The purpose of this is to make sure that there isn t any problem introduced by the release procedure and that the jar files contains the correct list of jars Either the ArgoUML VERSION tar gz or ArgoUML VERSION zip file is tested Unpack start using the command java jar argouml jar and do some ad hoc testing If the tests did not pass See Section 2 6 1 The release did not work Open the repository for commits towards the next version This is done by setting the argo core versionin default properties to Number of next release committing and telling everyone on the developers mailing list Notice that this cannot be done in the tagged copy but you either need to go back to your other working tree or need to check out the file argouml src_new default properties specifically to do this Go through Issuezilla and check things Things to check are a That there is a Version created in Issuezilla for the newly created release The purpose of this is to make it possible for everyone to report bugs on the new release b Make sure that the upcoming releases have target milestones created for them This
163. on are provided in org argouml uml ui Typically the constructor for the new proppanel class invokes the parent constructor and then builds the fields required on the property tab The parent constructor may need an icon If you need a new icon it should be placed in org argouml Images and a call to lookupIcon made note that this is a utility method of the parent PropPanel class For our example we had to add Extend gif Finally the property panel must be added to the list of property panels in the run method of the TabProps class with a new call of panels put If you don t do this navigation listeners won t know about it The content of the property panel is created as a grid with columns 1 column if there are only a few fields 2 or 3 if there are more Each row of each column contains a caption i e label and its corre sponding field A caption and its field may be added with one of a small number of utility methods which shield you from the layout stuff addField and addSeperator A button may be added to the toolbar with the utility method addButton Every field is built from Java Swing components However these are extended by ArgoUML to help in the provision of action methods for fields in the property tab Several fields involve lists and these re quire in addition list models to compute the members of the list The fields that you might add to a property panel include e Simple editable text For example th
164. on bar in each diagram where you can draw your model element Proba bly the parent of your model element e g class in case of operation will want a button too so add it to the PropPanel of the parent In case of the diagrams add it in UMLdiagram java so in UMLClassDiagranm if it belongs there In case of the PropPanels most of them don t use ac tions they implement them directly as methods in the PropPanel themselves Please don t do that but use an action so we have one place of definition 5 4 Property panels Purpose to provide a form view of the diagrams and objects in the model The contents of the model is modifiable The Property panels will be located in org argouml uml The Property panels is a View subsystem See Section 4 5 View and Control subsystems The PropPanels for the diagrams are in org argouml uml diagram ui and the property panels for UML objects are in org argouml uml ui UML path 5 4 1 Adding the property panel Property Panels for UML model elements are found as class PropPane1 XXX java where XXX is the UML meta class They are in sub packages of org argouml uml ui corresponding to the XXX NSUML packages which in turn correspond to their section in the chapter 2 of the UML 1 3 spec 51 Inside the subsystems So for our example we create a new class PropPanelExtend in package org argouml uml ui behavior use_cases Any associated classes that do not fall into the UML classificati
165. ore ArgoUML 6 2 2 5 Using Modules When modules are used they can t be distinguished from the rest of the ArgoUML environment 6 2 2 6 How do l e tell when a module is enabled The method isEnabled in ModuleLoader2 returns true if the module with that name is enabled and false otherwise P Note This only works for modules enabled in the new module loader For modules loaded using the old module loader it is not possible to determine if they are enabled 90 Extending ArgoUML 6 2 3 Plugins Note This description is for the old moduleloader 6 2 3 1 Plugin Architecture Each class must derive from the Pluggable interface In addition to the methods declared in Argo Module which Pluggable extends see Section 6 2 2 2 The ArgoModule interface used in the old implementation the interface provides the following method boolean inContext Object context inContext allows a plug in to decide if it is available under a specific context One example of a plugin with multiple criteria is the PluggableMenu PluggableMenu requires the first context to be a JMenultem which wants the PluggableMenu attached to as the context so that it can de termine that it would attach to a menu The second context is an internal non localized description of the menu such as File or View so that the plugin can further decide 6 2 3 2 How dol e create a pluggable settings tab e create a pluggabl
166. org argouml your package name where your package name is the name of your addition 6 3 2 How do l e create a new source code module Suggestion copy from the menutest module as described here Make a copy of argouml modules menutest into argouml modules your name Add any jar you need to argouml modules your name lib and add references to each of the jars in argouml modules your name build xml Edit argouml modules your name module properties Edit argouml modules your name src org manifest mf Reorganize the source files as necessary Remove the directory argouml modules your name src org argouml ui and create your own classes like org argouml your package name in argouml modules your name src org argouml your package name e get Argo to use a plug in oP Note This description is for the old module loader Once you ve created a jar file with a plug in in it you need to make sure that Argo can find the jar to be able to execute it If you are using a standard ArgoUML source structure then you should be able to execute build install or ant install in the source directory of the plug in This will copy the jar file to the proper di rectory in the main ArgoUML build target You can test your plug in by running build run in the src_new directory If you need to install the jar the hard way try the following steps e Start up ArgoUML e Go to the menu Edit gt Settings and look at the Environment tab F
167. ould not be editable directly from a view REQ12 REVa Rationale If a text field requires validation there exists by definition a possibility that the text field is in an invalid state at any time during editing Therefore the model cannot be updated until the field is completed in a valid state or rejected Stakeholder User of ArgoUML TODO Is this the correct stakeholder 3 1 5 With dialogs the model is not updated until the di alog is accepted by the user with valid fields REQ13 REVa Rationale It is a common feature of GUIs that a dialog displays a snapshot of its model at the time of creation and only updates that model on the user acceptance of the entire dialog This is a familiar look and feel for users Stakeholder User of ArgoUML 3 1 6 The user shall receive some visual feedback dur ing the edit process of textual UML to indicate whether the text represents valid UML syntax REQ14 REVa Rationale Writing a correct syntax of anything is complicated Good compilers are helpful in pinpoint ing where the problem is what line and what token is in error The text fields in ArgoUML are not de veloped in the same way as source code and we have no compiler step to verify it all Instead this valida tion needs to be done while editing meaning that the user needs all the help he can get to as quickly as possible get the syntax right TODO Is this the correct motivation for this Stakeholder User of ArgoUML 3
168. ould use it in your project You will not find information on how to convince your project to use ArgoUML as a modeling tool 1 5 Mailing Lists All developers MUST subscribe to the mailing list for developers Please find the details at http argouml tigris org servlets ProjectMailingListList It is also recommended to join the CVS and Issues mailing lists Both give you a good idea of what is going on Developers should also work with Issuezilla registering or fixing problems found by them selves and others Chapter 2 Building from source If you are in a hurry Work gt set Work gt cvs Work gt cvs G C C C Work gt set G G CVSROOT pserver guest cvs tigris org cvs login checkout use guest as password argouml sre argouml src_new argouml tools argouml lib JAVA_HOME C Programs jdkwhatever Work gt cd argouml src_new Work argouml src_new gt build run A window from the newly compiled ArgoUML opens after a while That was the compact version for Windows JDK Note JDK cannot be installed in a directory that contains space in its name If you don t understand this or it doesn t work read the rest of the chapter that describes why and how in more detail 2 1 Getting started In order to develop with ArgoUML it is absolutely mandatory to get the CVS version of ArgoUML How this is done is described in Download from the CVS repository Notice that the CVS contents is not only
169. out 7 2 3 1 Tutorial Manual Structure 1 Introduction a Origins and overview of ArgoUML b Scope of the User Manual Include cross reference to other documentation Cookbook FAQ Quick Guide on line help ArgoUML website etc c Overview of the User Manual Explains that ArgoUML will be explained in the context of an OOA amp D process and with an example running through d Assumptions At this stage assume the user knows OOA amp D but not UML 2 UML Based OOA amp D a Background to UML what it is history etc b UML based processes for OOA amp D c ArgoUML Basics projects drawing exploring details d What ArgoUML has that other tools are missing critics to do list based in cognitive psychol ogy theory e The Case Study 3 Requirements Capture a Use Case Diagrams this section will be relatively large because its the first time we use Ar goUML to create something 4 Analysis a Concept Class Diagrams b System Sequence Charts and Collaboration Diagrams c System State chart Diagrams 5 Design 99 Organization of ArgoUML documentation a Class Diagrams for Realization b Sequence Charts and Collaboration Diagrams for Realization c State chart Diagrams for realization d Package Diagrams 6 Build a Deployment Diagrams b Code Generation in ArgoUML 7 2 3 2 Reference Manual Structure 1 Material on each of the diagram types each of the artifacts that can appear on the diagrams
170. package name the API the Fa cade if any all the plug in interfaces if any and documents the insides of the subsystem Each subsystem can have e a Facade class The facade can be used by all other subsystems when using the subsystem The Facade class is called SubsystemNameFacade and is located in the subsystem package How it is used is primarily documented in the class file itself as javadoc but the more complex pic ture is documented in the Cookbook in Chapter 5 Inside the subsystems e Plug in interfaces 27 ArgoUML Design The Big Picture These are Facade objects where modules or plug ins can connect themselves to modify or augment the behavior of that subsystem e The plug in interfaces are also all located in the subsystem package and called SubsystemNameP luginPluginType Example ModelPluginDiagram ModelPlugin Type e If the subsystem uses a callback technique the callback is always made to an interface defined by the subsystem The interface is also in the subsystem package and it is called Plug SubsystemNameinTypeInterface Example ModelDiagramInterface ModelTyp Interface ClassFromSomeOtherComponent ComponentPluginWhatevert PluggableClass1 ComponentPluginWhatever2 PluggableClass2 4 2 Relationship of the subsystems Each subsystem that is used by other subsystems provide two ways for other subsystems to use them e The Facade class The use of Facade class is not wide spread
171. pment environment fitting ArgoUML There are several sets of instructions here depending that you can apply separately depend ing on how much of the ArgoUML knowledge you would want to include in your Eclipse If any of these instructions don t work or could be improved in some way please help in making them better Checking out through Eclipse This instruction is if you want to use Eclipse to download the source and it takes you up to where you can start ArgoUML from the source 1 Set up the CVS Repository Change to the CVS Repository perspective and select Add CVS Repository Then enter the follow ing information e Host cvs tigris org e Repository path cvs e User Your Tigris username e Password Your Tigris password e Connection type pserver default e Use Default Port default 2 Check out In the CVS Repository Exploring perspective unfold the newly created repository called some thing like pserver yourname cvs tigris org cvs and within it HEAD Select the argouml project right click on it and do Check Out As Check out as a project config ured using the New Project Wizard Press the button Finish Select Java Project and press Next Type the new project name argouml and press Next Ignore the build path settings We will come back to them later Press Finish which starts the checking out process You are probably directed to the Java Perspective with a question if you want or not At this point it does
172. property TODO What thread will I receive my event in What locks will be held by the Model while I receive my event i e is there something I cannot do from the event thread In the case described above the most common one you only have to subscribe with the pump for that type of event This is explained in section Section 5 1 3 2 1 How do I register a listener for a certain type event and Section 5 1 3 2 2 How do I remove a listener for a certain event Besides the case that you are interested in only one type of event or a set of types there are occasions that you are interested in all events fired by a certain model element or even for all events fired by a cer tain type of model element For these cases the pump has functionality too This is described in section Section 5 1 3 2 3 Hey I saw some other methods for adding and removing 36 Inside the subsystems 5 1 3 2 1 How do I register a listener for a certain type event This is really very simple Use the model addModelEventListener PropertyChangeListener listener Object modelelement String like this Model getPump addModelEventListener this modelelementIAmInterestedin IamInter Now your object this gets only the Events fired by modelElementIAmInterestedIn that have the name IamInterestedInThisEventnameType 5 1 3 2 2 How do I remove a listener for a certain event This is the opposite of registering a listener It
173. ps to document the context parameters within the class itself Again using P luggableMenu as an example it contains the function public Object buildContext JMenuItem parentMenulItem String menuType which is used as follows if module inContext module buildContext _help Help _help add module getMenulItem _help Help 6 2 4 Tip for creating new modules from Florent de Lamotte 6 3 code cr Note This description is for the old moduleloader Florent wrote a small tutorial for creating modules It can be found on the ArgoPNO website http argopno tigris org documentation argoum html How are modules organized in the java The previous section describes how modules and plug ins are connected on the java level totally inde pendent of how they are actually linked into ArgoUML Within the ArgoUML project some parts of the code are for different reasons developed and kept sepa rate from the main ArgoUML source code These parts can be modules or plug ins on the java level but on the source code level they are called modules This section describes how they are organized and how you create such source code modules 94 Extending ArgoUML 6 3 1 Requirements on modules New modules that are added to ArgoUML shall reside in whole new packages Either you put your mod ule classes in your own domain your package name or if you want to emphasize the connec tion to ArgoUML you can use
174. ranch This could on the other hand be useful if you want to test if your uncommitted code works also with the additions on that branch 8 3 Other CVS comments This is included in the cookbook because it seems that there are persons within the project that don t have the in depth knowledge of CVS nor the interest or need to acquire it For that reason some simple questions are answered here for use of CVS in the project Why do I get double lines Why do I get M at the end of each line Why do I get the whole checked out file on a single line CVS is line oriented It stores in the repository the concept of a new line after each line It is the CVS clients the program you have installed on you machine responsibility to convert the concep tual new line to the correct new line character on your system P Note This is only so for normal files not marked with kb in CVS If files are moved from one system to another or for that matter checked out on one system and used and edited on another NFS SMB this is not done correctly There could also be CVS clients out there not doing this correctly Systems known to the author Linus Tolke are Unix uses LF DOS Windows uses CR LF Mac uses CR Most of the time this really doesn t matter because the editors and java compiler on all systems are very forgiving There are however some cases when this is cumbersome 1 When an editor or developer decides to fix it 105
175. re seems to be no way of having tabs set at width 8 and the indentation level set at 4 at the same time so we must let Eclipse generate code without tabs to obey the Sun Coding standard 9 5 Settings for NetBeans Linus Tolke These style guides correspond to the following settings in NetBeans e In Tools gt Options gt Editing gt Editor Settings gt Java Editor Tab Size 8 e In Tools gt Options gt Editing gt Indentation Engines gt Java Indentation Engine Add Newline Before Brace False Add Space Before Parenthesis False Expand Tabs to Spaces False Number of Spaces per Tab 4 Should probably be read as Number of Spaces per indentation level 9 6 Settings for Emacs Linus Tolke These style guides correspond to the default java settings in Emacs java c basic offset 4 c comment only line offset 0 0 c offsets alist inline open 0 topmost intro cont statement block intro knr argdecl intro 5 substatement open label statement case open statement cont arglist intro c lineup arglist intro after paren arglist close c lineup arglist access label 0 inher cont c lineup java inher func decl cont c lineup java throws 115 Standards for coding in ArgoUML 9 7 How to work with Eclipse 3 9 7 1 Linus Tolke If you are running Eclipse 3 you can find information on how to set the develo
176. residing in a separate directory and run from ant targets in the src_new build xml They are never distributed with ArgoUML but merely a tool for developers By running the command build tests guitests in src_new these test cases are started each in their own jvm Each test case writes its result on the Ant log The result is also generated into a set of files that can be found at build test reports junit output html index html The test cases java source code is located under argouml tests org argouml 2 4 1 How to write a test case Now this will make all you java enthusiasts go nuts We have both class names and method names with a special syntax 2 4 1 1 About the Test case Class The name of the test case class starts with Test i e Capital T then small e s and t or GUITest i e Capital G U I T then small e s t The reason for this is that the special targets in src_new build xml search for test case classes with these names If you write a test case class that does not comply to this rule you still can run the test cases in this class manually by starting with build run with test panel but it wont be known and run by other developers and automatic build mechanisms so don t do it Test case classes that don t require GUI components in place have filenames like Test java They must be able to run on a headless system To make sure that this works always run your newly devel oped test cases with build tests u
177. resolved issue is in fact resolved The test must be done on the Target Milestone version of the issue or any later version released to the public Responsibilities e Check that the issue is solved in the stated version of ArgoUML e Mark the issue as verified If the Verifier can conclude that the problem does not exist or the feature enhancement is now present the issue is marked as verified e Reopen the issue if the solution is not fully correct If the solution is not correct or the feature enhancement does not work it is the duty of the Verifier to reopen the issue Skills The verifier needs only to focus on that issue how the problem in it is formulated He doesn t need to know how it is actually solved 131 Processes for the ArgoUML project 12 4 How to resolve an Issue This can be performed by any member of the project any role Persons without the Developer role need a person with the Developer role to actually commit the work if the resolution involves changing some artefact There might be special skills involved but it differs widely depending on the nature of the Issue Do the following 10 Pick any Issue that is NEW or REOPENED that you from the description think that you are able to solve Best result if you also find some Issue that you really feel needs to be solved The list of all of them is sue_status RE http argoum1 tigris org issues buglist cgi component argouml amp issue_status
178. rfaceComponent there are several other interfaces of interest One of them is MMElement Listener Every time a MModelElement is changed this will fire an MEvent to UMLChangeDispatch UMLChangeDispatch will dispatch these events to all containers implementing UMLUserInter faceComponents interested in this event including UMLText Field It will also dispatch the event to all children of an interested container implementing UMLUserInterfaceComponent By this it is only necessary to register a PropPanel which holds an UMLTextField at UMLChangeDis patch to dispatch the event to the UMLTextField too MMelementListener knows several methods of which only one is of interest to UMLText Fields 64 Inside the subsystems e propertySet Called every time a property in a MModelElement is set This method calls update too if the UMLTextProperty really is affected Furthermore UMLTextField implements DocumentListener This is very typical for UML TextField At the moment it is not possible to change the style of the text in the UMLTextField Therefore the method changedUpdate does not have a body This method is only called when a DocumentEvent occurs that changes the style layout of the text The methods insertUpdate and removeUpdate are respectively called when a character is added to the document UMLText Field contains or removed Since both methods are called when there is true user input and when the contents of the document
179. rgument of type baseClass sets that entry al lowVoid if true will allow an empty entry for the box baseClass is the NSUML meta class from which all entries must descend useModel is t rue to consider all the elements in the standard profile model for inclusion so the Java types standard stereotypes etc For our PropPanelExtend we provide a predicate routine the call for the base field is UMLComboBoxModel this isAcceptableUseCase base getBase set Base true MUseCase class true i and we define the methods isAcceptableUseCase getBase and setBasein PropPanelE tend 5 4 1 6 How UMLTextField works This information is provided by Jaap Branderhorst September 2002 UMLTextField implements several kinds of event listeners e MMelementListener e DocumentListener e FocusListener Furthermore it is a UMLUserInterfaceComponent Since it is an UMLUserInterfaceComponent it must implement targetChanged and targe tReasserted TargetChanged is called every time the UMLTextField is selected targe tReasserted is of no interest for UMLText Field It plays a role in keeping history but since his tory is not really implemented at the moment in ArgoUML it is of no interest target Changed does two things e It calls the targetChanged method of the UMLTextProperty this UMLText field is show ing e Itcalls the update method The update method is described further on Besides UMLUserInte
180. rrently without modifying the core of ArgoUML You could use SPI1 when it gets implemented extend the Explorer in other ways The best way is to use the above APIs SPIs if they are not implemented then it would be best to im plement them and feedback your improvements to the ArgoUML project so that your code works on a recognized public API that will be maintained in the future add new rules for new model elements You should create a GoRule PerspectiveRule in org argouml ui explorer rules There are plenty of examples to look at The important things to get right is of course that e you return the right children e return the objects that the TreeModel must listen to to know when to update the node and the list of immediate children After that you must register your GoRule in org ar gouml ui explorer PerspectiveManager e add it to the list in loadRules e perhaps add it to some of the default perspectives in oldLoadDefaultPerspectives I guess And then I think it should just be a matter of recompiling and possibly switching to the perspective you added your rule to tell the explorer to refresh You are not supposed to The TreeModel is supposed to listen to events and refresh affected parts And this is where the lack of events for adding diagrams creates a problem Obviously it would be possible to add an operation somewhere to revalidate the expanded parts of the Explorer but I m not aware of the existence
181. rt in the ArgoUML project as such and should help to transfer the knowledge from the old experts to them Please feel free to send more questions and or answers to the dev mailing list mailto dev argouml tigris org 1 3 How to contribute You can help there are big tasks and small tasks waiting for you Here is a suggestion on how you could become part of the ArgoUML Project This could be perceived as a ladder to climb but remember that if so it is firstly a ladder of levels of commitment and time spent by you You get no price for climbing higher you just get more responsibility in the project 1 Use ArgoUML 2 Report found bugs There are bugs in ArgoUML When you use ArgoUML you might encounter them where you least expect it To help make sure they are known about i e that there exists an issue in Issuezilla de scribing the problem You need to be a registered user at Tigris to report bugs but notice that to add further comments to the issue you also need to have gotten a Role in the ArgoUML project 3 Subscribe to the users mailing list Discuss how you use ArgoUML in your project and how you promote ArgoUML in your organiza tion You can also help other users with their ArgoUML related problems 4 Apply for an Observer role This shows that you are committed to the project and also allows you to comment on issues 5 Familiarize yourself with the project and how we work Suggestion on how to go about this a Read thro
182. rty panel has a add extension point button with a method newEx tensionPoint that we provide to create a new use case Support for stereotypes The PropPanel should override the following note the spelling of the method name protected boolean isAcceptibleBaseMetaClass String baseClass Returns true if the given base class is a class of the target in the PropPanel This is used to determine what stereotypes may be shown for this property panel Other sorts of fields Another sort of field that may be useful is the ComboBox This is useful to allow users to select from a pre defined list of alongside a navigation arrow to go to the selected entry For example this is used to provide drop down lists for the base and extension use cases of an Extend re lationship in PropPanelExtend The model behind the drop down is created by using UMLComboBoxModel UMLComboBox 63 Inside the subsystems Model container predicate vent getter setter allowVoid base Class useModel The container is the PropPanel where we are setting up this ComboBox the predicate is the name of a public method in that PropPanel that given a model element determines if it should be in the drop down the event is the NSUML MElementEvent name we are looking for see earlier for the list getter is the name of a public method in the PropPanel that yields the current entry in the combo Box of type baseClass setter with a single a
183. s in groups according to the MVC pattern See Chapter 4 Ar goUML Design The Big Picture and Chapter 5 Inside the subsys tems Change to the definition of the priorities Now they are defined in terms of how much release blocker they are See Sec tion 12 2 1 Priorities Added rationale for not using RE SOLVED REMIND or RE SOLVED LATER See Sec tion 12 2 2 Resolutions Reorganized the description on how to use Eclipse 3 Added in structions on how to use the Eclipse JUnit test runner See Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke Linus Tolke ix Change Log When What Who Section 9 7 How to work with Eclipse 3 2004 07 25 Added this Change Log See Linus Tolke Change Log Chapter 1 Introduction 1 1 Thanks We the authors would like to take the opportunity to thank everyone involved in the creation of this documentation and especially the people behind setting up the DocBook environment In particular thanks go out to Alejandro Ramirez Phillipe Vanpeperstraete and Andreas Rueckert Thank you 1 2 About the project ArgoUML is an open source project so it depends on people that volunteer to work on it Especially in the area of development there is still so much to do This Cookbook is dedicated to everyone interested in taking pa
184. s or system level resources should already be available when the module initialization process is called initializeModule should return true if the initialization is successful or if no initialization is necessary The only available mechanism for handling dependencies between modules is the order in which they are read from the file void shutdownModule void The shut downModule method is called when the module is removed It provides each module the capability to clean up or save any required information before being cleared from memory void setModuleEnabled boolean tf boolean isModuleEnabled void Reserved for future implementation Vector getModulePopUpActions void Reserved for future implementation The plan is to have this called for each module when the module should add its entries in PopU pActions 89 Extending ArgoUML String getModuleKey void Returns a string that identifies the module 6 2 2 3 Module Architecture for the new implementation The controlling class for the new implementation is org argouml moduleloader ModuleLoader2 It is a singleton created when first used It is first used in the main initialization routine When created it searches through all available modules and creates a list of their main objects implementing ModuleInterface Currently September 2004 this also means that the found mod ules are by default selected i e they are marked to be enabled At the e
185. s soon as possible in the development process The Compo nent Constraint Language CCL developed at CIS enables the developer to add context based con straints CoCons to a component specification model This produces a model which goes beyond the simple description of the system s static structure At this time there is no tool to integrate the compo nent specification model into the development process The goal of this master s thesis was to design such a tool thereby supporting the Continuous Software Engineering CSE philosophy 125 Further Reading 11 2 2 Where to find it LINK Martin Skinners dissertation http www cocons org publications CCL_plugin_for_ArgoUML pdf 126 Chapter 12 Processes for the ArgoUML project This chapter contains processes used when working with the ArgoUML project These processes are provided with the hope of being helpful for the members of the project and if they feel too complicated ambitious or overworked please raise the issue of simplifying them on the devel opers mailing list mailto dev argoum tigris org 12 1 The big picture for Issues Here is the big picture of the life of an Issue Resolver exfmines the issue amp ssbe for himself g solution immediatly Resolver haajfound the solution Resolver has found that this is the same as some other issue Resolver commi ion esolyerhas found that no change is needed Resolved Duplicate
186. ses to solve other bug reports and the current release plan of ArgoUML From this you decide wether it is time to do the update of the subproduct within ArgoUML or to wait 3 If you decide that it is time to update you assign all issues against that subproduct to you if not al ready then you do the work The work is to add the new version of the subproduct to ArgoUML do all the needed work within ArgoUML to fit the new version test and commit everything put the issues indeed fixed in RESOLVED FIXED and close the bugs registered in the subproducts bug reporting tool 136 Index A ANT 5 7 how it is used 8 Ant target clean 12 docs 11 guitests 13 list property files 9 prepare docs 9 run 8 run with test panel 13 tests 13 ANTLR 5 ArgoUML Design 27 argouml build properties 9 B build properties 9 build xml 8 Building ArgoUML 7 javadoc 9 tools 5 C Check lists 42 Checking out from CVS 6 checklists 33 clean ant target 12 Code Generation 31 65 Code generation Java 66 Coding Standards 109 Compiling customized 9 Cygwin 9 Unix 8 Windows 8 component 27 Constraints 85 Contents of the CVS repository at Tigris 106 Critics 33 42 CVS branches 103 checking out from 6 how to work with 102 Mailing list 4 standards 102 CVS repository contents 106 Cygwin Compilation 9 D default properties 9 Details Panel 70 Developers Mailing List 4 Diagrams 31 47 Docbook
187. setKnowledge Type sitl String t2 String t3 String void static reasonCode Forts String int getTrigge rMaskd long addTrigge ris String void matchReason patte rnCode long boolean expandide sc String offs VectorSet String getC larifie rd Icon j addControlRec name String controlData Object Object getControlReciname String Object isEnabled boolean setEnabled e boolean void snoozeOrde rd woid snooze 0 void unsnooze 0 void isRelevantToDecisions dsgr boolean isRe le vantToGoals dsgr boolean make Wizard ite m Wizard getWizardC lass ite m Class initWizard w Wizard void getDecisionCategoryd String Hse tDecisionCategoryic String void getC riticT ype 0 String getExpe rtEmaild String setEx pe rtEmailfaddr String void ge tHeadline idm Object dsgr String ge tHeadline offenders YectorSet dsgr String getHeadline String se tHeadline th String void getPriorityloffe nde rs VectorSet dsgr int setPriority p int void getPriorityd int getDe scription offenders YectorSet dsgr String setDe scriptionid String void getDe scriptionTe mplate 0 String 1 ge thtore InfoURLioffe nders VectorSet dsgr String setMore InfoURL m String void gethtore InfoURLO String Hse
188. sing jdk1 4 or later Test case classes that do require GUI components in place have filenames like GUITest java 13 Building from source We should try to get as many tests from a GUITest class to the corresponding Test class because the latter are run by automatic builds regularly Every class org argouml x y z stored in the file src_new org argouml x y z java should have a JUnit test case class called org argouml x y Testz stored in the file tests org argouml x y Testz java containing all the Unit Test Cases for that class that don t need the GUI components to run Tests that do need GUI components to run should be part of a class named org argouml x y GUITestz stored in the file tests org argouml x y GUITestz java If you only want to run your newly written test cases and not all the test cases you could start with the command build run with test panel and give the class name of your test case like org argouml x y Testz or org argouml x y GUITestz You will then get the output in the window You could run all tests in this way by specifying the special test suite org argouml util DoAllTests in the same way Every test case class imports the JUnit framework import junit framework and it inherits Test Case i e junit framework TestCase 2 4 1 2 About the Test case Method Methods that are tests must have names that start with test i e all small t e s t This is a require ment of the JUnit framework
189. ss need to be changed Example 5 6 External Execution Property Arguments cp filesystems classpath library Dlog4j configuration URL classname arguments 5 14 4 How to Customize Logging There are some sample configuration files provided in org argouml resource Modify these ac cording to your needs Or alternatively you can try configLog4j http www japhy de configLog4j to assist yourself in creating a log4j configuration file 5 14 5 References e The log4j project homepage at http jakarta apache org log4j http jakarta apache org log4j e The configlog4j homepage at http www japhy de configLog4j http www japhy de configLog4j 5 15 JRE with utils Purpose to provide the infrastructure to run everything The JRE is an infrastructure subsystem See Section 4 4 Model subsystems It is not distributed with ArgoUML but considered to be a precondition in the same respect as the user s host This is a Java3 JRE so swing and awt can be used together with reflection 5 16 To do items 80 5 17 Inside the subsystems Purpose To keep track of the To do items Items are generated and removed automatically by the crit ics They could also be created by other means The To do items are located in org argouml The To do items is a Model subsystem See Section 4 4 Model subsystems Explorer Purpose to provide tree views of the model elements diagrams and oth
190. statements like this deprecated by your name in the upcoming release Use link whatever a complete explanation on what to do instead This is not checked by checkstyle Rationale This is part of the Do Simple Things development approach that we use in ArgoUML ArgoUML is a big project with lots of legacy code that we do not know exactly how it works Dep recation shows the intent between decision to remove a method and the point where it is actually re moved and this without breaking anything of the old code There are also modules or plugins that we might know nothing about that could be loaded by some user to run within ArgoUML to add func tionality It is for the modules and plugins that we always save deprecated methods to the next stable release It makes it possible for the module developers to do work during the unstable releases and release at the same time as ArgoUML releases its stable release 110 Standards for coding in ArgoUML Don t use deprecated methods or classes Rationale Deprecation is an indication that a class is to be removed We always want to build Ar goUML in a way that allows for future updates of everything Using things that are on the way out already when doing the implementation is for this reason not allowed Rationale 2 If you feel like you really want to use a method that is deprecated instead of the replace ment you should first convince the person responsible for doing the deprecatio
191. structure subsystems that just are there for every other subsystem to use They are all insignificant enough not to be mentioned when listing dependencies Logging Calls can be spread all over that would go through some rule set and then end up on file on the out put or not at all Internationalization This is the set of files that is a repository of localized strings Every other module uses these strings in all communications with the user The Internationalization Subsystem is described in detail in Section 5 13 Internationalization JRE with utils Every other subsystem can use the classes available with the JRE 29 ArgoUML Design The Big Picture Logging Internationalization RE Swing 4 4 Model subsystems These subsystems do not rely on any other part of ArgoUML to do their work except the infrastructure They can all be tested in full individually i e independent of any other subsystem e The Model The Model contains a modifiable storage of the UML model and the diagrams The Model presents several different interfaces and access methods for the information Among other things the information can be saved loaded examined and observed The Model is described in detail in Section 5 1 Model e To do items This is the To do items They can be created deleted and saved The To Do Items Subsystem is described in detail in Section 5 16 To do items e The GUI Framework This is th
192. system s API or not by improving the javadoc for that method or class Try to help in moving the public API methods and classes from wherever to the subsystem s direc tory package using the proper deprecation procedure In order not to worsen things always add new API classes and methods in the subsystem s directory package This way of communicating is still to be used when it is not convenient to use the Facade for a spe cific use of that subsystem Notice that the Facade is normally a part of the API or a simplified version of the API For each subsystem X in ArgoUML that uses the subsystem Y the designer of the subsystem X must decide if he wants to use the API of Y when using the subsystem Y putting a set of import org argouml Y internals blabla statements in each file of subsystem X that uses subsystem Y or use the Facade class of subsystem Y putting only one import org argouml Y YFacade in each file in the subsystem X that uses subsystem Y The API solution makes the subsystem X depending on the subsystem Y meaning that when we change the API of the subsystem Y we must also change subsystem X The facade calls solution doesn t make the subsystem X depending on the API of subsystem Y but just the Facade of subsystem Y The choice between the usage of the API or the Facade shall be stated in the Cookbook s description of subsystem X in the list of used subsystems 4 3 Low level subsystems These subsystems are infra
193. t copy contains the change but is not in sync and the next cvs update will result in an merge error The simplest way to solve this is to do re move all files modified by you before doing the cvs update The cvs update will restore all the files from the CVS repository and you can start with the next update get a list of the currently active working branches You can t from CVS You need to follow the announcements of created and discontinued branches on the mailing list to know what branches are interesting create a branch for my work on xxxyyy and start work on that branch This assumes that you have a checked out copy of ArgoUML 1 Change directory to the directory where ArgoUML is checked out 2 Enter the argouml directory cd argouml or chdir argouml 3 Create your branch cvs tag b work_xxxyyy_myname myname is is a self explaining code for you your Tigris login 4 Change your checked out copy to be on the branch cvs update r work_xxxyyy_myname 5 Do your work 6 Check in your changes in the branch cvs commit m Blablabla file 7 Continue working and checking in move my work from my working branch into the release This is done when your work with the feature xxxyyy is finished and you have decided received clearance to enter it in the main branch 1 Change directory to the directory where ArgoUML is checked out If you are just working on one feature at a time this is the place where you have a checked out copy on
194. t if you do this you have modified your development environment To be sure that you will not break anything for anyone else when checking in things developed using this modified environ ment remove these files temporarily for the compiling and testing you do just before you commit 2 3 1 4 Building javadoc By running ANT again using build prepare docs the javadoc documentation is generated and put into argouml build javadocs 2 3 1 5 Building one of the modules If you want to run ArgoUML with modules enabled the build xm1s are set up to do this in two ways 1 Test just one module a Build ArgoUML the package This is done with ant package in the argouml src_new directory b Run the module This is done with ant run command in the argouml modules whatever directory 2 Test several modules together a Build ArgoUML the package This is done with ant package in the argouml src_new directory Building from source b Compile and install the modules This is done with ant install command in each of the argouml modules whatever directories c Start ArgoUML This is done with ant run in the argoum1 src_new directory This will start ArgoUML with all modules available 2 3 2 Generating documentation This describes how the documentation is generated i e both what to do and how the setup works If you are in a hurry Work gt set CVSROOT pserver guest cvs tigris org cvs Work gt cvs login use guest as p
195. target milestone Events can be things like dropping support for a jdk version changing the version of UML that we support or replacing some central mechanism within ArgoUML Once they have a target milestone registered they are considered events e REMIND Not used 128 Processes for the ArgoUML project Rationale Each issue have basically four states NEW STARTED REOPENED To be resolved RESOLVED To be verified VERIFIED To be closed CLOSED Finished The statistics is based on this and persons looking for issues to resolve look among the To be re solved group the web pages to help in this are set up in this way This is also in synch with our re lease process Looking at it from a single persons perspective an issue is either a I could work with this issue but I currently don t I work with this one or I am now done with my work on this issue For a re solver this is corresponds to NEW REOPEN for the first group STARTED for the second and RE SOLVED for the third For a verifier this corresponds to RESOLVED for the first group and VERI FIED for the third group The RESOLVED REMIND does not fit this They risk to be verified because the rest of our process urges people to resolve issues that are RESOLVED in which case they are probably lost They risk to be hanging in the RESOLVED state because nobody understands where they should go from there It is not clear who is responsible to move them forward T
196. terms rather than vague generalities e Break up your writing in short sections Each section dealing with one topic e Use the present tense e Opt for an informal rather than a formal style Document Conventions e All titles of chapters sections etc are capitalized throughout e All titles of figures tables etc have the first word only capitalized e Spelling is US English According to The Webster s Second Unabridged e Use full URLs throughout all documents Rationale These documents may also be published in other formats then html on the ArgoUML web site e Do not include lists of what changes have been done to the files This information is kept by CVS the version control tool This is changed since Jeremy Bennet did the work for the 0 9 0 10 User Manual and there might still exist such lists Remove them while changing the files The Cookbook has a Change Log See Change Log that is updated for every significant change but that is for the purpose of making it easier for the readers e When problems in the current implementation of ArgoUML are mentioned or perhaps even empha 122 Standards For Documentation Writing sized using the warning tag include the issue number in a sgml comment in the source so that it is easy to know if this problem has been fixed when revising the document The issue should be men tioned in the format issue xxx i e there should only be a space between the word issue and t
197. that the design material is actually found in org argouml uml cognitive critics ChildGenUML This method is incomplete and might not find all model elements 5 2 3 Org argouml cognitive critics class diagram 46 Inside the subsystems 5 3 Diagrams 5 3 1 Purpose to keep the information of objects in diagrams and to generate a graphical view The contents of the diagrams and also the Uml elements that are represented are modifiable from the diagrams TODO Notation The Diagrams are be located in org argouml uml diagram The Diagrams is a View subsystem Section 4 5 View and Control subsystems The Diagrams are depending on the Model subsystem and the GUI framework Multi editor pane The multi editor pane is the pane with the diagram editor in it Normally it is placed in the upper right corner of the application One of the feature requests is to make the pane dockable so maybe it won t be there in the future The multi editor pane consists of tabs that hold editors as you can see in the class diagram 47 Inside the subsystems Salntentacer gt TabbedPane TabSp awnable MiultiE ditorF ane At the moment there is only one editor tab in place This is the TabDiagram that shows an UMLDia gram the target The TabDiagram is spawn able This means that the user can double click the tab and the diagram will spawn as a separate window The target of the MultiEd
198. the future always do a cvs diff before doing your change to make sure that only the lines that you have actually modified will be changed by CVS and not the whole file Files that are binary that shall be stored in CVS shall be marked as binary They are marked with the admin flag kb This means that the line ending conversion mechanism will not be applied on those files and they will be exactly the same on all systems This is good for jars GIFs and other such files 8 4 CVS repository contents This chapter describes what parts of the CVS repository is used for what purpose This is a rather terse collection Further details on specific parts can sometimes be found elsewhere in this document This chapter is organized as the CVS repository itself and everything is in alphabetical order e build Directory where the built things end up There is actually no real need to keep this in CVS It is there just as a place holder cont Not used Empty e documentation 106 CVS in the ArgoUML project Directory where the source of the documentation is e cookbook XML source code for this cookbook e docbook setup XML Tools and configuration files used for the formatting of the documentation from the XML source to HTML and PDF e images Pictures for all documents are collected here e javahelp Not used Empty e manual XML source code for the User Manual e quick guide XML source code for the Quick Guide extra
199. the model but the list has a default text when empty public Object get tvemscthe Alerpentatthelgiz n index in the list static protected h tpsliaartritmg tha dadd thhihdtionl hewhtdmns addkdcat TeecspeortiedMiidetahE lement newltem int indetk given oldCollection static protected hedpsainuwriting thet mowealpeUfnndtidho Saps thmelethdiits hi effsetomdexnt index and index 1 Not clear why it doesn t return a Collection static protected hedpsan wtritingithe tmowyddvonintindtionc Swhps the etentehtscat bifsets imdex int index and index 1 Not clear why it doesn t return a Collection static protected IMipsda Writmgdht get hemeaAt At i Fimdd thetelementai a specifonind mt index Cla requiredClass The last argument is ignored 5 4 1 2 Building the field By convention the background of the list is set to the same as the background of the PropPanel and the foreground to Color blue 62 5 4 1 3 5 4 1 4 5 4 1 5 Inside the subsystems The list is then added to a JScrollPane Although ArgoUML has historically not used scrollbars JScrollPane VERTICAL_SCROLLBAR_NEVER and JScroll Pane HORIZONTAL_SCROLLBAR_NEVER it is more helpful to permit at least a vertical scrollbar where needed JScrollPane VERTICAL_SCROLLBAR_AS NEEDED and JScroll Pane HORIZONTAL_SCROLLBAR_AS_ NEEDED Finally the inherited method addCaption is used to add
200. the property pa l onesta e Rea E aes 51 5 5 Persistence osien tea ies E EE SE E EERE E EEEE ES bebe EES 65 5 6 Reverse Engineering Subsystem sii rsss rnei arino sses sseni oe irsk PERESEIS EE pE PETE EEEE 65 5 7 Code Generation Subsystem sssssssrssserrsresrrsresrrrrerrerrsrrerreresrrreesrreesrreerereeereeen 65 5 8 Java Code generations and Reverse Engineering seeessseerssresrrsrssrrrrsrrerrsrerrreees 66 5 8 12 HOW dO Tes APESE EOE EE 66 5 8 2 Which sources are inVOlVed 0 0 0 eee cee eee cece ce ee ce oses pad ernes st PENE 66 5 8 3 How is the grammar of the target language implemented eee 67 5 8 4 Which model diagram elements are generated 2 0 0 0 cece cee cee cee c eee eeeeee es 67 5 8 5 Which layout algorithm is used 2 0 cee cece cece ce ence ece eee eeeeeeeeeeseeeeneeeaes 67 DO Otherlaneuages recs fcc ki E a Tic ee lat E E ech E a peed ea Seteaaibis sees 69 3 10 The GUI Frame works esee aea dodge a poe heeds bau debeueat A N IESER 70 SATA ppl Cation sie sae gel T Was eal ele Se Aue OH Mos tds ease a an eae ose 70 5 11 1 Whatis loaded mitialized sisisi rniii rosis risses tonais resres ordai 71 511 2 Details pane cise ccsegeseeds heet ge rE E EEn E O E EEE E EESE 71 D1 2 Help System nerne m ee T E E E EEE EEE ESE 71 5 13 Internationalization 2 2 00 cece E EERE EKE EEE AEE F EEEE EEEE NEE EES AEE 72 9 13 1 Organizing translators 2 2 ciscoc sc os acs dosgeas susteagaed d
201. to the ques tions This will a Check out the source in a new directory The new directory is named after the freeze tag that you give 18 Building from source Make the ant executable with the command chmod x tools ant 1 4 1 bin ant Build the release This is done in the argoum1 src_new directory of the newly created copy by issuing the command build dist release Linus It takes around 2 minutes on my machine JDK1 3 1_10 Intel 1400MHz on batteries 512MB February 2004 It takes around 10 min utes on my machine JDK1 3 1_01 Intel 7O0OMHz 256MB May 2003 It takes around 30 min utes on a Lysator machine simultaneously doing a lot of other things JDK1 3 1_06 Sun4d 256MB July 2003 This should create the directory argouml argouml VERSION with the files ArgoUML VERSION libs tar gz ArgoUML VERSION libs zip ArgoUML VERSION modules tar gz ArgoUML VERSION modules zip Ar goUML VERSION src tar gz ArgoUML VERSION src zip VER ArgoUML SION app tgz ArgoUML VERSION tar gz ArgoUML VERSION zip and index html There should also be a subdirectory argouml argouml VERSIONjws with jar and jnlp files The jar files in the subdirec tory differ from the jar files in the zip and tar archives in that they are signed using your key Run through the automatic tests There are two sets of automatic test cases e The JUnit test cases in argouml tests are run by issuing the command build alltests in the argouml src_ne
202. ugh most of the User manual and install and run the latest version of ArgoUML b Subscribe to the issues list You will get updates on all issues so you can monitor what we are doing in the project It could be a lot of mails If it turns out you don t like watching issues in this way you unsub Introduction h scribe Subscribe to the CVS list You will get updates on all changes that are done to code documentation and the web site It could be a lot of large mails If it turns out you don t like watching what is going on in the project in this way you unsubscribe Read the process part of the Developers Cookbook at Chapter 12 Processes for the ArgoUML project This will give you the idea of how the ArgoUML project attempts to release with good quality and especially how we use Issuezilla Get the Observer role granted From this on you can comment on bugs yourself directly in Issuezilla You can also verify issues according to the verification process see Section 12 5 How to verify an Issue that is FIXED This will help you understand the terminology used in the project and also gives you an idea of the current quality of ArgoUML and what needs to be done in the future This is also a very low commitment level task that could be completed in a couple of minutes depending on your choice of issue Read the rest of the Developers Cookbook There is a lot of stuff discussed in here that is interesting
203. uml ui import junit framework public class GUITestUMLAction extends TestCase public GUITestUMLAction String name super name Testing all three constructors public void testCreatel UMLAction to new UMLAction new String hejsan assert Disabled to shouldBeEnabled public void testCreate2 UMLAction to new UMLAction new String hejsan true assert Disabled to shouldBeEnabled public void testCreate3 UMLAction to new UMLAction new String hejsan true UMLAction NO_ICON assert Disabled to shouldBeEnabled and the corresponding no GUI class package org argouml uml ui import junit framework public class TestUMLAction extends TestCase public TestUMLAction String name super name Functions never actually called Provided in order to make sure that the static interface has not changed private void compileTestStatics boolean t1 UMLAction HAS_ICON boolean t2 UMLAction NO_ICON UMLAction getShortcut new String UMLAction getMnemonic new String private void compileTestConstructors new UMLAction new String new UMLAction new String true new UMLAction new String true true private void compileTestMethods UMLAction to new UMLAction new String to markNeedsSave to updateEnabled new Object to updateEnabled to shou
204. ur own classes you just need to follow the three steps below 1 Import the org apache log4j Logger class 2 Geta Logger 3 Start Logging Example 5 1 For log4j version 1 2 x import org apache log4j Logger public class theClass private static final Logger LOG Logger getLogger theClass class public void anExample LOG debug This is a debug message LOG info This is a info message LOG warn This is a warning LOG error This is an error LOoG fatal This is fatal The program stops now working Notice that we in the ArgoUML project have decided to have all loggers private static final with a static initializer The reason for making them private is that this reduces the coupling between classes i e there is no risk that one class uses some other class Logger to do logging The reason for making them static is that our classes are more or less all either lightweight like a representation of an object in the model or a singleton For the lightweight classes having a reference to a logger object per object is a burden and for the singleton objects it doesn t care if the logger is static or not The reason for making this final is that it shall never be modified by the class The reason for having a static initializer is that then all classes can do this in the same way and we don t ever risk to forgot to create the Logger 77 Inside the subsystems For performance reasons a check b
205. urrent checks are not written to allow for multiple threads so don t 5 1 3 The model event pump 5 1 3 1 Introduction Late 2002 the ArgoUML community decided for the introduction of a clean interface between the NSUML model and the rest of ArgoUML This interface consists of three parts 1 The model factories responsible for creation and deletion of model elements 2 The model helpers responsible for utility functions to manipulate the model elements and 3 The model event pump responsible for sending model events to the rest of ArgoUML The model factories and the model helpers are described in Section 5 1 1 Factories and Section 5 1 2 Helpers respectively In the beginning of 2003 in the work to replace NSUML the need for this interface not to use any NSUML classes was seen The ModelFacade was introduced to wrap model factories model helpers and direct calls to NSUML but not the model event pump In April 2004 a ModelEventPumpinterface was introduced to wrap the UmlModelEventPump using Property ChangeEvents The model event pump is the gateway between the model elements and the rest of ArgoUML Events fired by the model elements are caught by the pump and then pumped to those listeners interested in them The main advantage of this model is that the registration of listeners is concentrated in one place see picture This makes it easier to change the interface between the model and the rest of Ar
206. us not implemented The APIs collectively represent the Explorer subsystem facade and the SPIs represent plug ins 5 17 3 Details of the Explorer Implementation The Explorer is currently shown in the Explorer Pane org argouml ui NavigatorPane the upper left hand pane of ArgoUML Except for the Explorer Pane The Explorer is located in org argouml ui explorer The explorer has been refactored since version 0 15 2 so that it has a slightly more standard Java Swing implementation The explorer perspectives provide the different views of the project They are implemented by sets of PerspectiveRules that get the child nodes for any parent node in the tree The Explorer has 3 main subcomponents a customized JTree a customized TreeModel and an interface for generating child nodes in the tree which forms the tree Perspective 1 The JTree org argouml ui explorer ExplorerTree has been customized to maintain consistent se lection state with the other model views It provides a pop up menu ExplorerPopup for perform ing actions on specific model elements There is specific functionality in DnDExplorerTree for Drag and drop and in ExportExplorer for copy diagram to clipboard 2 The TreeModel is a customized DefaultTreeModel that listens to changes in the UML model The JTree builds the tree model as the user expands nodes this minimizes the size of the model to those part that the user is interested in The TreeModel contains custom Defau
207. w directory Linus It takes around 10 minutes on my machine JDK1 3 1_10 Intel 1400MHz on batteries 512MB February 2004 It takes around 12 minutes on my machine JDK1 3 1_01 Intel 7OOMHz 256MB May 2003 It takes around three 3 hours on a Lysator machine simultaneously doing a lot of other things and the X session over a 5OKB s modem JDK1 3 1_06 sun4d 256MB July 2003 There should not be any failed tests See details on where to find the result in Section 2 4 The JUnit test cases e The JUnit test cases in modules junit are run by invoking JUnit tests from the Tools menu specifying the Test Case TestAll and running without Reload classes every run checked in the ArgoUML window that opens See details in Section 2 4 The JUnit test cases No problems shall be found If the tests did not pass See Section 2 6 1 The release did not work Build documentation and copy it While connected to the internet you download the docbook xsl and JimiProClasses zip The docboox xsl is downloaded by issueing the command build docbook xsl get The JimiPro Classes zip is downloaded from Sun Instructions for this is in the fop README file ar gouml tools fop 0 20 3 README The PDF versions of the documentation shall be copied from the build docu mentation pdf pdf to argouml version basename version Upload the files onto the Tigris website A tree with all files is located in argouml version This c
208. y and all subsystems have package names that is a single level below org argouml If a subsystem is really complex or will be complex w r t the amount of classes meaning more than 50 files with classes we create new packages with internal classes on a single level below the subsystem package This is the plan for the subsystems and new classes Don t move old classes just yet That would cre ate more confusion that it would help For everything else follow Code Conventions for the Java Programming Language http java sun com docs codeconv html CodeConvTOC doc html called Sun Code Conventions Some of these rules are marked with a comment that they are checked by a checkstyle Checkstyle is a tool available with the ArgoUML development environment preconfigured for these rules The current configuration can be found in argouml tools checkstyle checkstyle_argouml xml To run checkstyle run the command build checkstyle from the argouml1 src_new directory This re quires you to have checked out the directories argouml1 tools argouml tests and argouml src_new The last couple of checkstyle result are also available in the Xenofarm result Checkstyle will also check some of the rules from the Sun Code Conventions that are not stated here Furthermore checkstyle nags about when the order of modifiers does not conform to the suggestions in the Java Language Specification Section 8 1 1 8 3 1 8 4 3 111 Standards for coding in Arg
209. y order 1 A tutorial style explanation of ArgoUML in the context of an OOA amp D process 2 Descriptive reference material on all components of ArgoUML 3 Keep boundaries clearly defined to avoid duplication with the Cookbook FAQ Quick Guide on line help etc I probably Jeremy Bennet in 2002 think the existing User Manual is a good start particularly towards the second of these goals 7 2 2 1 What the User Manual is not currently To keep the effort feasible the user manual should avoid the following at least initially e Providing a quick overview the Quick Guide already does this e Listing all the errors and what they mean The help system does this one day the manual will link 98 Organization of ArgoUML documentation to that e Explaining the internal workings of ArgoUML The cookbook combined with Jason Robbins disser tation is already a good start for this 7 2 3 Suggested Manual Structure Here are my Jeremy Bennet 2002 thoughts I think the user manual is really a set of two books the tutorial manual corresponding to Part I of the current manual and the reference manual Part II of the current manual I Jeremy Bennet 2002 suggest that the tutorial book be based around an OOA amp D process any pref erences and that each UML concept is introduced with each step of the process followed by an expla nation of how to do it under ArgoUML A simplecase study will be needed through
210. ystem See Section 4 6 Loadable subsystems The OCL editor GUI interface is org argouml uml ui TabConstraints shown in the bottom right hand panel details panel org argouml ocl ArgoFacade adapts the tudresden ocl gui OCLEditor for Ar goUML There are some other helper classes in org argouml oc1 with names beginning with OCL but they are used for other purposes Historically GEF uses OCL as a kind of template language to con vert the UML diagrams to pgml and back again it doesn t have anything to do with OCL constraints in your UML model 85 Inside the subsystems ArgoFacade is reused by GeneratorJava and TabConstraints Currently this subsystem is more or less only Dresden OCL Toolkit and adaptation Because of a problem with the interpretation of the UML specification and the OCL specification the implementation of constraints in ArgoUML is only possible for Classes Interfaces and Features Attributes and Operations See Issue 1805 http argoum1 tigris org issues show_bug cgi id 1805 86 Chapter 6 Extending ArgoUML This section explains some general concepts which come in handy when developing additions to Ar goUML i Warning There are two module loading mechanisms the old one and the new one This is so because we have made a change of the design used for this in order to simplify the writing of modules Eventually the old module loader will be removed so for all new add
Download Pdf Manuals
Related Search
Related Contents
File Trust Oxxtron Istruzioni per l`uso Asciugatrice 全てダウンロード AVERTISSEMENT SUR L`EPILEPSIE Korg 2E User's Manual Copyright © All rights reserved.
Failed to retrieve file