Season of KDE 2006
Umbrello UML Modeller: Automatic fields order in UML elements
A Season of KDE 2006 project by ño Sánchez
Mentored by Jonathan Riddell
Project Details
The idea is to improve the way fields are handled in UML elements. The main goal in the project will be add an option to order fields automatically based on some criteria. For example, first the public abstract methods, then the overriden ones... Also, each group should can be ordered using regular expressions in their name, or maybe the number of parameters they have...
Of course, a graphical user interface for this feature should be developed. It should be intuitive enough to be used easily, but also flexible and powerful for those who wants fine control over the arrangement of the fields. An example window of the order selected would be very useful.
As it could be seen, there are a lot of criteria which could be used to order the fields. The designed system should be extensible, so new criteria can be implemented with ease in the future. This could be done either using a scripting language designed ad hoc for this purpose, or making a base system that can be extended subclassing some C++ classes in the code of Umbrello.
Both approaches have benefits and drawbacks that must be taken into account: the scripting approach enables the user to specify the order wanted in a powerful way. However, if the behaviour needs to be programmed in a script language wouldn't be very usable, and developing a graphical user interface to substitute the whole scripting language would be near impossible. On the other hand, the subclassing approach has the benefit that as the order methods are fixed and specified in Umbrello code, an specific interface could be made for each ordering algorithm. As you can infer, the problem here is that it isn't very flexible, as you can only use the ordering algorithms already implemented.
A solution could be a combination of both approaches: fields could be ordered based on a scripting language designed ad hoc for this purpose, but providing dialogs designed specifically to generate the code of the more common algorithms (for example, to order first public, then protected and finally private fields). If the user needs to tweak the order code, that could be done in a specific editing window.
The fields order should can be enabled or disabled per element, and also project wide. Moreover, the configured order should be independent from one element to another.
Deliverables
- Patch against Umbrello SVN tree which implements the features
- Developer documentation including UML Diagrams about the new code
- User documentation explaining how to use the new features
Project Schedule
- Analyze existent code and design the new features
- Implement the new features
- Fix known previous bugs in this area and new ones introduced, if any
[ Edit ]