Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - QuarksUndCo

Pages: [1]
1
Bugs and Issues / Multiple Inheritance Problem when parsing methods
« on: January 09, 2008, 10:50:18 am »
Hi all,

I do not know if this is a bug of EA but it seams like one.
Problem is, when parsing the UML model with the following code, not all methods will returned in the collection, specially the MI one.
c# code sample:
foreach (Method oMethod in oClass.MethodsEx)
{
//... do something with...
oMethod.Name
}
If multiple inheritance is used, and each superclass of oClass defines a method with same methodname, possibly different parameters, only one method of a superclass is returned in the collection.

Any hints?

Thanks,
Wolfgang

2
hi group,
how can i navigate from a reference frame defined in an use case diagram to the interaction diagram. The reference frame is of type "InteractionOccurences" and the interaction diagram is of type "sequence".

thanks all
Wolfgang

3
Hi News Group,

I like to generate a Sequence Chart with objects and messages using the automation interface. When doing this with the follwing code, I get an exception in the connector update() method. What's wrong with my c# code? Any hints?

// first generate a sd
var x = 200;
            var diagram = (IDualDiagram)oPackage.Diagrams.AddNew(oEADMLSequence.Name, "Sequence");

            if (diagram.Update() == false)
            {
                Console.WriteLine(diagram.GetLastError());
            }
            diagram.Notes = "Diagram was generated by myTool";
            diagram.Update();
// create first object in SD
                        var o1 = (Element)oPackage.Elements.AddNew("o1", "object");
                        o1.Update();
                        shownElementList.Add(o1);
                        // add element to diagram - supply optional rectangle co-ordinates
                        var client = (DiagramObject)diagram.DiagramObjects.AddNew(string.Format("l={0};r={1};t=200;b=400;", 200 + x, 400 + x), "");
                        Console.WriteLine("{0} {1} {2} {3}", client.left, client.right, client.top, client.bottom);
                        client.ElementID = o1.ElementID;
                        client.Update();
x += 300;

// create 2.nd object in SD
                        var o2 = (Element)oPackage.Elements.AddNew("o2", "object");
                        o2.Update();
                        shownElementList.Add(o2);
                        // add element to diagram - supply optional rectangle co-ordinates
                        var supplier = (DiagramObject)diagram.DiagramObjects.AddNew(string.Format("l={0};r={1};t=200;b=400;", 200 + x, 400 + x), "");
                        Console.WriteLine("{0} {1} {2} {3}", supplier.left, supplier.right, supplier.top, supplier.bottom);
                        supplier.ElementID = o2.ElementID;
                        supplier.Update();

// create a message connector of type "sequence" between o1 and o2
                var con = (EA.Connector)oClient.Connectors.AddNew("msg1", "sequence");
                con.SupplierID = oSupplier.ElementID;
                con.DiagramID = diagram.DiagramID;
                //con.SequenceNo = 1;
                con.TransitionAction = "Call";
                con.TransitionEvent = "Asynchronous";
                con.TransitionGuard = "retval=void;";
                con.Direction = "Source -> Destination";
                Console.WriteLine("{0} {1} {2} {3} {4} {5} {6} {7} {8}", con.Name, con.SequenceNo, con.ClientID, con.SupplierID, con.MetaType, con.DiagramID, con.TransitionGuard, con.StyleEx, con.TransitionAction);
                con.Update();
                oClient.Connectors.Refresh();

Problem is, when calling the method "con.Update()" I get the following DAO exception:
"DAO.Recordset [3022]
Die von Ihnen vorgenommenen Änderungen an der Tabelle konnten nicht vorgenommen werden, da der Index, Primärschlüssel oder die Beziehung mehrfach vorkommende Werte enthalten würde. Ändern Sie die Daten in den Feldern, die gleiche Daten enthalten, entfernen Sie den Index, oder definieren Sie den Index neu, damit doppelte Einträge möglich sind, und versuchen Sie es erneut."


Any help is really appreciated.
Regards,
Wolfgang

Pages: [1]