MonoUML, 200707
And the MonoUML milestone 200707 is here.
MonoUML Core and MonoUML Reverse Engineering APIs are released:
Enjoy and wait for milestone 200710.
And the MonoUML milestone 200707 is here.
MonoUML Core and MonoUML Reverse Engineering APIs are released:
Enjoy and wait for milestone 200710.
I’m one step closer (and a week!!) to release our newest Reverse Engineering CIL plugin, there are some things to change, such as to allow Lists as settings parameters, upgrade the MonoUML tab for editing Template parameters/bindings and some not-yet-found bugs, if any.
After searching and searching finally got the Nokia 770, is a great piece of hardware, isn’t slow and mediocre as many reviewers said, neither heavy or useless.
Why did I get it? Because I’ve always wanted to implement an algorithm to “draw UML”.
Using Templates is supported by nUML, so after doing some refactoring to current CIL plugin, you can see the results:
However there’s missing the Tab-specific widgets for editing this Template information.
There are two goals with this new Reverse Engineering API:
To accomplish second goal I decided to use Cecil instead of Reflection because, IMO, Cecil has a cleaner API (not yet documented, but going to sources helps and, of course, you can always ask) and thinking on the future we might read the full assembly (including method body, for example) to define some diagrams, such as Sequence Diagram.
Most notable difference between first version and this new one, is the 2.0 CIL support, and reverse engineering Generics isn’t that easy, to do so the following are my ideas to face and finish both implementations:
using System;
using System.IO;
using NUml.Xmi2;
using NUml.Uml2;
class MainClass
{
public static void Main(string[] args)
{
DataType TObj = Create.DataType ();
TObj.Name = "TKey";
DataType KObj = Create.DataType ();
KObj.Name = "TValue";
TemplateSignature signature = Create.TemplateSignature ();
ClassifierTemplateParameter T = Create.ClassifierTemplateParameter ();
ClassifierTemplateParameter K = Create.ClassifierTemplateParameter ();
T.Signature = signature;
T.Default = TObj;
K.Signature = signature;
K.Default = KObj;
signature.Parameter.Add (T);
signature.Parameter.Add (K);
Class klass = Create.Class ();
/* Systems.Collection.Dictionary`2[TKey , TValue] emulation */
klass.Name = "Dictionary";
klass.OwnedTemplateSignature = signature;
SerializationDriver driver = new SerializationDriver ();
driver.AddSerializer (new NUml.Uml2.Serialization.Serializer ());
driver.Serialize (new object [] { klass, T, K, TObj, KObj },
Console.OpenStandardOutput(), "urn:numl.sourceforge.net:testing:templates");
}
}
If you are wondering about Templates and so on, UML 2 Super Structure (05-07-04) defines them from page 600 to 631, go ahead.
Due to most recent GtkSourceview version (not yet released) uses a new language file format I needed to upgrade the oldest one. Newer language version doesn’t provide (yet) a visual validation for your OCL file however guides you by highlighting your written code.
If you want to test it, get GtkSource sources and compile it (of course copy the .lang file also).
I haven’t yet started to develop the OCL edit because need to finish, first, Reverse Engineering API and then migrate MonoUML to Mono.Addins.
Rodolfo talks about nUML‘s (UML library for .NET) latest release. See his blog (spanish) or read his announce on mono mailing list.
Congratulations!
BTW. nUML is one of the most important components used in MonoUML, if you want to contribute to MonoUML you may want to help nUML by improving it.