Scenario: Code+UML in parallel
In the early concept OOA/D phase, I need to model in code and in UML in parallel, i.e. I write C# code for the new functionality and need to visualize it in Umbrello, as it’s quite complex with generics over generic, abstracts, interfaces etc.
The code-importer works quite fine, the initial 1st read-in, but the iterative model adjustments process is PITA in Umbrello as-is.
Process of evolving the OOA/D model
- I code the basics into C# to get warm and understand the basic key-points - and when it gets tougher:
- I import the initial code into Umbrello with “Import from directory”
- I create new diagrams, create associations as helpful to break down the complexity
- I realize new aspects, which my code doesn’t implement yet, so I extend/refactore the code
- I must “Import from directory” again, which has as-is these ugly issues:
AS-IS Issues
- In re-using the “Import from directory” function, I need to navigate the whole long path up to the folder originally used for the initial import
- Clicking on the folder name even tries to edit it instead of drilling it down deeper the dir-hierarchy
- After the import is done, Umbrello simply doesn’t recognized the same-named classes uder different namespaces and puts renamed props as additional props into the model
Nice2Have behavior
- Umbrello should have a ‘resync’ function, which takes (or selects a default) the path from the initial import
- When a same-named class is found, but from a different namespace/package, it should recognize it as moved
- The class props should removed those removed (renamed) props, not just simply adding them again (I’m fully clear it’s not possible to distinct between renamed vs. old deleted + some new added cases)
- The source-of-truth behavior (C# vs. UML) could be selected in the sync-wizard, so the old props stay in UML and new ones are added vs. everything is just added from the code, to leave those in-code-not-existing props in the UML model
This would make the tool so much usable for round-tripping code-UML
!
Also, another feature in this iterative modeling context is to have a button, which copies the whole XMI/xml payload into the clipboard, as tools like Gemini can read this perfectly! This is actually a PITA w/out Umbrello model, as the C# classes/ifaces/enums are scattered through many files, so copying them into AI prompt is a nightmare - I’ve found out the easiest method is to send AI the whole Umbrello XML content and then discuss it - Gemini even recognizes the placement and notes from Umbrello payload, so it’s a gold worth feature and actually more useful then discussing POCO files. But to get the XML content is PITA: in Rider, I have to add an “External tool” for opening the .xmi in Umbrello and the default action set to “edit XML”, just to have it handy right from Rider. Better would be to have just opening Umbrello when clicking it and in Umbrello to have a btn like “Copy XMI to clipboard”.
TY very much for listening and coding Umbrello
,
Andrej