Book a Demo

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.


Messages - MattAdamson

Pages: 1 [2]
16
Sorry should have clarified that I meant visual compare in terms of the diagrams.

I downloaded Rhapsody and couldn't see any feature to compare two UML diagrams indicating the changes on the actual diagram e.g. new operations highlighted in a certain colour

17
Thanks however I'd appreciate it if anyone has thoughts in relation to features they'd like to see.

Also do any other UML products provide this feature. I couldn't see this in Rational Rose Enterprise or Visual UML, surely someone has written one?

18

I was thinking of developing an addin to allow visual comparison of two models and would like your thoughts.

The tool was going to be used in conjuction with the standard compare utility to allow more detailed and structured differencing however I'd like the visual diagram differencing to focus on key things we notice change with design revisions namely

1) New elements
2) Elements removed
3) New / removed / changed attributes and operations to elements.
4) New / removed connections between classes

You can easily obtain the differences between two packages as an XML file. I was going to parse the XML file to extract the specific differences and then draw all the elements in the diagram and colour different elements / attributes / operations / connectors to indicate whether there were new / removed or changed.
If the notes had also changed for any of these types of elements it would also be indicated with a different colour.

As the automation model doesn't show elements which have been removed and also provides no support for colouring specific operations / attributes you can't use the EA object model to draw a new diagram. The only approach I was thinking of was drawing on a .NET user control embedded within a new tab created with AddTab

I thought this would be really useful for design reviews when most of the time changes focus on specific diagrams where it is useful to see the changes without having the traverse through the tree hierarchy of the compare utility.

Thoughts?

19
Inconsistency, i.e. having to check the return value and whether an exception is thrown.

20

:-[, if checking Update should be ! Update

21
Guys,

I'm not overly happy with the inconsistent in the object model between methods throwing exceptions or using return values e.g. many Update methods contain a boolean flag. If this fails the documentation indicates GetLastError should be called to extract the error.

I've never had an issue with Update methods failed, only exceptions raised until now. I have the following code

EA.Connector sourceElementConnector = (EA.Connector)sourceElement.Connectors.AddNew("",
                                                              "Association");
sourceElementConnector.SupplierID = ((EA.Element)targetElement).ElementID;
sourceElementConnector.Stereotype = stereotype;

if(sourceElementConnector.Update())
{
       throw new ApplicationException(String.Format("Failed to associate elements and update source connector for source element name='{0}' Err='{1}'",
sourceElement.Name,
sourceElementConnector.GetLastError()));

Has anyone else had this issue, is there any other way to extract error information here. Should I be accessing the GetLastError method on another object other than the one for which the Update method failed.


22
If your developing in Visual Studio .NET be sure to enabled the debugger features to break on either specific types or ALL exceptions when they occur.

This will cause the debugger to break at the line of code cause the exception. Obviously only useful when it's your code causing the exception and not deep within the EA code whicih will provide you with a call stack in the assembly code.

23
Automation Interface, Add-Ins and Tools / Using Sequence Diagrams elements
« on: November 01, 2006, 06:11:27 am »

Has anyone much experience reviewing the elements in sequence diagrams such as fragments and parts of fragments. I can't see an easy way to extract this, a fragment seems to be an Element type within the object model.

I've worked out how to find the connectors for a specific sequence diagram and detail such as the lifecycle attribute i.e. whether it's new or destroy and also information part of the message such as the parameters passed.


24
Yes, the diagramLinks property doesn't actualy work on sequence diagrams. I received this response from Aaron Bell ( Sparx )

"Sequence diagrams can be traversed through automation to a degree at least, but they behave a little differently to other diagrams.  One main difference is that there do not seem to be any DiagramLink references for the sequence connectors.  Instead, you must retrieve the DiagramObject references, obtain the Elements they reference, then iterate on their Connectors where Connector.Type = "Sequence" and Connector.DiagramID = the ID of the current diagram

25
I managed to get this working using automation code

foreach(EA.Diagram diagram in allDiagramList)
{
 if(diagram.Type == "Sequence")
 {
    // Enumerate each connector in diagram and see
    // whether the method entered matches
    Boolean diagramAdded = false;

    foreach(EA.DiagramObject diagramObject in diagram.DiagramObjects)
    {
        EA.Element element = repository.GetElementByID(diagramObject.ElementID);





         foreach(EA.Connector connector in element.Connectors)

{

    if(
connector.Type == "Sequence" &&


connector.DiagramID == diagram.DiagramID)

{








if(Regex.Match(
connector.Name,

methodNameTextBox.Text,

RegexOptions.IgnoreCase).Success)


{



diagramsListBox.Items.Add(diagram.Name);



diagrams.Add(diagram);









diagramAdded = true;









break; // for


}
                    }

}






if(diagramAdded)

{

   break; // for

}
           }
        }
    }

26
I would really like to be able to search for all sequence diagrams which show a specific method being used on an object.

This would be a great way to cross check that all new operations defined on a class had an appropriate sequence diagram to show how the method is used i.e. it's interaction with other classes / methods and other classes / methods interaction with itself.

I assume this would be possible with automation however it would be good to have the feature in the product too. Has anyone achieved this with automation.

27
Automation Interface, Add-Ins and Tools / Re: Generate C++ Addin
« on: October 12, 2006, 11:28:47 pm »
I don't understand why you need to register for COM interop, you would usually only do this for a .NET component.

I'm not aware of any C++ example add ins on the sparx website, strange perhaps given EA is written in C++. I would assume the technique would be to

a) Use the #import directive to import the EA.tlb in the C:\Program Files\Sparx Systems\EA directory.
b) Create a normal ATL object and define appropriate methods such as String EA_Connect(EA.Repository repository).
c) Create your registry key using the same .reg file which ships with the other add in samples, using the full prog id of your component.

28

I was thinking of developing an add in to automate the creation of a user interface model. The add in could automatically draw the user interface screen and it's component elements given a specific application.

Does anyone have ideas of features they'd like to see implemented?

Pages: 1 [2]