Okay Mark All diagrams now implement one of the interfaces in org.argouml.model
Check against that the diagram you are interested in implements one of those interfaces rather than checking its actual class. Cheers Bob On 30 July 2011 09:46, Bob Tarling <bob.tarl...@gmail.com> wrote: > Revisiting how this works I wonder if enums is the best choice here. > > I understand that there may be some modules out there that have > invented their own diagram types. An enum in core argouml would > restrict the lists of diagrams to our own core types with no way for > anyone to extend this list. > > Interfaces I think is the way to go here. ArgoPrint can test if a > specific interface is implemented by a diagram. Modules creating their > own diagram will be free to define their own interface. > > In org.argouml.model there are already some empty interfaces defined > ClassDiagram, ActivityDiagram etc. This I believe is left over work > from an old attempt to implement the diagram interchange model through > our model interface, those interfaces are not actually used at the > moment. We can begin to use those now though for this purpose. > > I'll change all our diagram types to implement one of those interfaces > and then Markcan do the required changes in ArgoPrint to recognise > those. > > Regards > > Bob > > > On 29 July 2011 18:35, Bob Tarling <bob.tarl...@gmail.com> wrote: >> Diagrams register themselves with argouml by the DiagramType enum (you >> may prefer to use this rather than you own defined constants). The >> problem is that the ArgoDiagram interface has no getDiagramType() >> method for you to use. We must get that added to the interface so that >> you can inspect it. > ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2806681 To unsubscribe from this discussion, e-mail: [dev-unsubscr...@argouml.tigris.org]. To be allowed to post to the list contact the mailing list moderator, email: [li...@tigris.org]