Self-maintaining diagrams in Enterprise Architect with EA-Matic

With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.

This example shows how to make diagrams that maintain themselves to make sure they are always up-to-date.

The idea is that we want a diagram that shows all the relations of the owning object. The diagram should always be up-to-date without manual intervention.

EA-Matic auto_diagram

To indicate that this diagram is an automatic diagram we nest it under the class and prefix it with AUTO_ and on the diagram we place the owning object and its related elements

EA-Matic self-maintaining diagram

Usage of Enterprise Architect Add-in Framework

This script also illustrates how you can use the Enterprise Architect Add-in Framework within your script.

This extensive open source framework is the basis for the add-ins EA-Matic and EA Navigator, and offers a much more functional interface to the model then the standard EA API.

This code inializes the model object with the current Repository

'gets a new instance of the EAAddinFramework and initializes it with the EA.Repository
function getEAAddingFrameworkModel()
    'Initialize the EAAddinFramework model
    dim model
    set model = CreateObject("TSF.UmlToolingFramework.Wrappers.EA.Model")
    model.initialize(Repository)
    set getEAAddingFrameworkModel = model
end function

It is then further used to get the ConnectorWrapper based on the ElementID from the Info object

set connector = model.getRelationByID(connectorID)

This connector is then used to access the elements that are connected by this Connector

 'get the related elements
 dim relatedElements
 set relatedElements = model.toArrayList(connector.relatedElements)

Note that we need to use model.toArrayList to convert the C# generic List<> that cannot be used by VBScript to an ArrayList that can be used.

The code

Download the complete script: EA-Matic Self-maintaining diagram

In the first part we use the magic EA-Matic keyword to in order to tell EA-Matic it should use this script.

We also declare the important ID’s of the selected connector so we can compare that with the ID’s of this connector once it has changed.

The first event we use is the EA_OnPostNewConnector. This event will be fired after you create a new connector in EA.
In this event we add the newly related elements to each others auto-diagram, if any.

!INC Local Scripts.EAConstants-VBScript

' EA-Matic
' This script, when used with EA-Matic will maintain auto-updating diagrams for elements.
' A nested diagram with prefix AUTO_ will be considered an auto-updating diagram.
' The diagram will keep track of all elements related to the owner of the auto diagram.
'
' Author:     Geert Bellekens
' EA-Matic: http://bellekens.com/ea-matic/
'
'maintain a reference to the connector in context
dim contextConnectorID
dim oldClientID
dim oldSupplierID

'a new connector has been created. Add the related elements to the auto-diagram
function EA_OnPostNewConnector(Info)
     'get the connector id from the Info
     dim connectorID
     connectorID = Info.Get("ConnectorID")
     dim model
     'get the model
     set model = getEAAddingFrameworkModel()
     dim connector
     set connector = model.getRelationByID(connectorID)
     'get the related elements
     dim relatedElements
     set relatedElements = model.toArrayList(connector.relatedElements)
     'for i = 0 to attributes.Count - 1
     if relatedElements.Count = 2 then
        'once with the first
        addRelatedElementoAutoDiagram relatedElements(0), relatedElements(1), model
        'then with the second
        addRelatedElementoAutoDiagram relatedElements(1), relatedElements(0), model
     end if
end function

'adds the related element to the auto_updatediagrams if any
function addRelatedElementoAutoDiagram(element,relatedElement, model)
    'get the diagram owned by this element
    dim ownedDiagrams
    set ownedDiagrams = model.toArrayList(element.ownedDiagrams)
    for each diagram In ownedDiagrams
        'check the name of the diagram
        if Left(diagram.name,LEN("AUTO_")) = "AUTO_" then
            'add the related element to the diagram
            diagram.addToDiagram(relatedElement)
        end if
    next
end function

The next part deals with the deletion of a connector. Each time a connector is about to be deleted EA fires the EA_OnPreDeleteConnector event.
We remove the connected elements from their respective auto-diagrams, but only if this connector was the last connector between the two elements.

' A connector will be deleted. Remove the elements from the auto-diagram
function EA_OnPreDeleteConnector(Info)
     'get the connector id from the Info
     dim connectorID
     connectorID = Info.Get("ConnectorID")
     dim model
     'get the model
     set model = getEAAddingFrameworkModel()
     dim connector
     set connector = model.getRelationByID(connectorID)
     'get the related elements
     dim relatedElements
     set relatedElements = model.toArrayList(connector.relatedElements)
     'for i = 0 to attributes.Count - 1
     if relatedElements.Count = 2 then
        'we only need to remove the related element if they are not connected anymore after deleting the connector
        'so only if there is only one relationship between the two elements
        if sharedRelationsCount(relatedElements(0), relatedElements(1), model) <= 1 then
            'once with the first
            removeRelatedElemenFromAutoDiagram relatedElements(0), relatedElements(1), model
            'then with the second
            removeRelatedElemenFromAutoDiagram relatedElements(1), relatedElements(0), model
        end if
     end if
end function

'returns the number of relations that connecto both elements
function sharedRelationsCount(elementA, elementB, model)
    'start counting at zero
    sharedRelationsCount = 0
    'get the relationships for both objects
    dim relationsA
    set relationsA = model.toArrayList(elementA.relationships)
    dim relationsB
    set relationsB = model.toArrayList(elementB.relationships)
    for each relationA in relationsA
        for each relationB in relationsB
            'if both relations have the same ID then we have a shared relation
            if relationA.id = relationB.id then
                sharedRelationsCount = sharedRelationsCount +1
            end if
        next
    next
end function

' Removes the related element from the auto update diagram if any.
function removeRelatedElemenFromAutoDiagram(element,relatedElement, model)
    'get the diagram owned by this element
    dim ownedDiagrams
    set ownedDiagrams = model.toArrayList(element.ownedDiagrams)
    for each diagram In ownedDiagrams
        dim diagram
        set diagram = ownedDiagrams(i)
        'check the name of the diagram
        if Left(diagram.name,LEN("AUTO_")) = "AUTO_" then
            'Removing elements from a diagram in unfortunately not implemented in the EAAddinFramework so we'll have to do it in the script
            dim eaDiagram
            set eaDiagram = diagram.wrappedDiagram
            for i = 0 to eaDiagram.DiagramObjects.Count -1
                dim diagramObject
                set diagramObject = eaDiagram.DiagramObjects.GetAt(i)
                if diagramObject.ElementID = relatedElement.id then
                    'remove the diagramObject
                    eaDiagram.DiagramObjects.Delete(i)
                    'refresh the diagram after we changed it
                    diagram.reFresh()
                    'exit the loop we have delete the diagramobject
                    exit for
                end if
            next
        end if
    next
end function

The next part deals with the diagram being opened, or shown. Since we are adding elements automatically, we want to use EA’s automatic layout to make the diagram presentable. The downside of this however is that EA also opens the diagram when doing a layout. So instead of doing an auto-layout directly after editing the diagram, we do one as soon as the user opens the diagram, or switches to an already opened diagram. We use the events EA_OnPostOpenDiagram and EA_OnTabChanged

'autodiagrams are automatically layouted when opened
function EA_OnPostOpenDiagram(DiagramID)
    dim model
    'get the model
    set model = getEAAddingFrameworkModel()
    layoutAutoDiagram DiagramID, model
end function

'autodiagrams are automatically layouted when we tab is switched to them
function EA_OnTabChanged(TabName, DiagramID)
    if  DiagramID > 0 then
        dim model
        'get the model
        set model = getEAAddingFrameworkModel()
        layoutAutoDiagram DiagramID, model
    end if
end function

'layout the auto diagram
function layoutAutoDiagram(diagramID, model)
    dim diagram
    set diagram = model.getDiagramByID(DiagramID)
    'if the diagram is an auto diagram then we do an automatic layout
    if Left(diagram.name,LEN("AUTO_")) = "AUTO_" then
        'auto layout diagram
        dim diagramGUIDXml
        'The project interface needs GUID's in XML format, so we need to convert first.
        diagramGUIDXml = Repository.GetProjectInterface().GUIDtoXML(diagram.wrappedDiagram.DiagramGUID)
        'Then call the layout operation
        Repository.GetProjectInterface().LayoutDiagramEx diagramGUIDXml, lsDiagramDefault, 4, 20 , 20, false
    end if
end function

The only thing left now is to update the diagram in case a user changes a connector, and for instance drags one of the ends to another element. In order to do this we need to record the id’s of both ends of the connector once it is selected in EA_OnContextItemChanged and compare that to the id’s of this same connector after it has been changed in EA_OnNotifyContextItemModified

'keep a reference to the selected connector
function EA_OnContextItemChanged(GUID, ot)
    'we only do something when the context item is a connector
    if ot = otConnector then
        dim model
        'get the model
        set model = getEAAddingFrameworkModel()
        'get the connector
        dim contextConnector
        set contextConnector = model.getRelationByGUID(GUID)
        'MsgBox(TypeName(contextConnector))
        contextConnectorID = contextConnector.id
        oldClientID = contextConnector.WrappedConnector.ClientID
        oldSupplierID = contextConnector.WrappedConnector.SupplierID
    end if
end function

'a connector has changed, we need to update the auto-diagrams
function EA_OnNotifyContextItemModified(GUID, ot)
    'we only do something when the context item is a connector
    if ot = otConnector then
        dim model
        'get the model
        set model = getEAAddingFrameworkModel()
        'get the connector
        dim changedConnector
        set changedConnector = model.getRelationByGUID(GUID)
        'check if we are talking about the same connector
        if changedConnector.WrappedConnector.ConnectorID = contextConnectorID then
            dim supplier
            dim client
            'check the client side
            if changedConnector.WrappedConnector.ClientID <>  oldClientID then
                'get supplier
                set supplier = model.getElementWrapperByID(changedConnector.WrappedConnector.SupplierID)
                'remove old client from supplier and vice versa
                set client = model.getElementWrapperByID(oldClientID)
                if not client is nothing then
                    removeRelatedElemenFromAutoDiagram supplier,client, model
                    removeRelatedElemenFromAutoDiagram client, supplier, model
                end if
                'add new client
                set client = model.getElementWrapperByID(changedConnector.WrappedConnector.ClientID)
                addRelatedElementoAutoDiagram supplier,client, model
            end if
            'check the supplier side
            if changedConnector.WrappedConnector.SupplierID <> oldSupplierID then
                'get client
                set client = model.getElementWrapperByID(changedConnector.WrappedConnector.ClientID)
                'remove old supplier from client and vice versa
                set supplier = model.getElementWrapperByID(oldSupplierID)
                if not supplier is nothing then
                    removeRelatedElemenFromAutoDiagram client,supplier, model
                    removeRelatedElemenFromAutoDiagram supplier,client, model
                end if
                'add new supplier
                set supplier = model.getElementWrapperByID(changedConnector.WrappedConnector.SupplierID)
                addRelatedElementoAutoDiagram client,supplier, model
            end if
        end if
    end if
end function

Prevent accidental deletes with EA-Matic

With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.

This example shows how you can prevent deleting elements that are still being used as a type in either an attribute or parameter.

The script uses the EA_OnPreDeleteElement event to first check whether the element is not still used.

If an attribute using this element as type is found then the element is not deleted and the user is informed with a messagebox.

EA-Matic cannot delete attribute

If it isn’t used as attribute but is used as a type in a parameter or the return type of an operation you get the following messagebox:

EA-Matic cannot delete parameter

Usage of Enterprise Architect Add-in Framework

This script also illustrates how you can use the Enterprise Architect Add-in Framework within your script.

This extensive open source framework is the basis for the add-ins EA-Matic and EA Navigator, and offers a much more functional interface to the model then the standard EA API.

This code inializes the model object with the current Repository

set model = CreateObject("TSF.UmlToolingFramework.Wrappers.EA.Model")
model.initialize(Repository)

It is then further used to get the element based on the ElementID from the Info object

set element = model.getElementWrapperByID(elementID)

The element then gives us access the attributes and parameters using this element by means of

set usingAttributes =  model.toArrayList(element.getUsingAttributes())
set usingParameters = model.toArrayList(element.getUsingParameters())

Note that we need to use model.toArrayList to convert the C# HashSet that cannot be used by VBScript to an ArrayList that can be used.

The code

Download the complete script: EA-Matic Prevent accidental deletes

option explicit
'EA-Matic

function EA_OnPreDeleteElement(Info)
     'Start by setting false
     EA_OnPreDeleteElement = false
     dim usage
     'Initialize the EAAddinFramework model
     dim model
     set model = CreateObject("TSF.UmlToolingFramework.Wrappers.EA.Model")
     model.initialize(Repository)
     'get the elementID from Info
     dim elementID
     elementID = Info.Get("ElementID")
     'get the element being deleted
     dim element
     set element = model.getElementWrapperByID(elementID)
     'Manual override is triggered by the name. If it starts with DELETED_ then the element may be deleted.
     if Left(element.name,LEN("DELETED_")) = "DELETED_" then
        'OK the element may be deleted
        EA_OnPreDeleteElement = true
     else
        dim usingAttributes
        set usingAttributes =  model.toArrayList(element.getUsingAttributes())
        'Check if the element is used as type in attributes
        if usingAttributes.Count = 0 then
            'Check if the element is used as type in a parameter
            dim usingParameters
            set usingParameters = model.toArrayList(element.getUsingParameters())
            if usingParameters.Count = 0 then
                'OK, no attributes or parameters use this element, it may be deleted
            EA_OnPreDeleteElement = true
            else
                usage = "parameter(s)"
            end if
        else
            usage = "attribute(s)"
        end if
     end if
     if EA_OnPredeleteElement = false then
          'NO the element cannot be deleted
          MsgBox "I'm sorry Dave, I'm afraid I can't do that" & vbNewLine _
          & element.name & " is used as type in " & usage , vbExclamation, "Cannot delete element"
     end if
end function

Using the add-in menu with EA-Matic

With EA-Matic you can develop add-ins for Enterprise Architect using the built-in scripting feature of EA.

This example shows how to use the add-in menu to add your own menu and menu option, and react to the user clicking such a menu option.

With this script you can use menu options as a regular add-in would

EA-Matic Menu in Action

Download the complete script: EA-Matic MenuHandling

Step 1: defining the menu

'EA-Matic
'Tell EA what the menu options should be
function EA_GetMenuItems(MenuLocation, MenuName)
	if MenuName = "" then
		'Menu Header
		EA_GetMenuItems = "-&MyAddinMenu"
	else
		if MenuName = "-&MyAddinMenu" then
			'Menu items
			Dim menuItems(1)
			 menuItems(0) = "TreeViewMenu"
			 menuItems(1) = "DiagramMenu"
			 EA_GetMenuItems = menuItems
		 end if
	end if
end function

Step 2: define the menu state

'Define the state of the menu options
function EA_GetMenuState(MenuLocation, MenuName, ItemName, IsEnabled, IsChecked)
	if MenuName = "-&MyAddinMenu" then
		Select Case ItemName
			case "TreeViewMenu"
				if MenuLocation = "TreeView" then
					IsEnabled = true
				else
					IsEnabled = false
				end if
			case "DiagramMenu"
				if MenuLocation = "Diagram" then
					IsEnabled = true
				else
					IsEnabled = false
				end if
		end select
	end if
	'to return out parameter values we should return an array with all parameters
	EA_GetMenuState = Array(MenuLocation, MenuName, ItemName, IsEnabled, IsChecked)
end function

Step 3: React to user clicking a menu option

'react to user clicking a menu option
function EA_MenuClick(MenuLocation, MenuName, ItemName)
	 	if MenuName = "-&MyAddinMenu" then
		Select Case ItemName
			case "TreeViewMenu"
				Dim Package
				Set Package = Repository.GetTreeSelectedPackage()
				MsgBox ("Current Package is: " & Package.Name)
			case "DiagramMenu"
				Dim Diagram
				Set Diagram = Repository.GetCurrentDiagram()
				MsgBox("Current Diagram is: " & Diagram.Name)
		end select
	end if
end function

How to use the Enterprise Architect Add-in Framework

Since I started writing the EA Navigator and other tools the code has been open source and available on Github. The code is split up in a tool-specific part for the EA Navigator and some other tools, and a framework that can be used to build your own tool.

 Downloading

The code for the framework and the tools is published on GitHub, a version control repository “in the cloud”, which is free for public repositories. The easiest way to download the code is to install GitHub for Windows. That allows you use the Clone in Desktop button on Github.

Clone in Desktop

You can also download the ZIP, but then you’ll have to rename the packages to their original name. To be able to use the framework you’ll need two repositories

If you want to see how the EA Navigator uses the framework you’ll need

Make sure you put all the projects in the same directory as otherwise the references would be broken.

 Compiling

The code for the EA Add-in framework is written in C# using SharpDevelop. You can also open it with Visual Studio or another C# IDE, but then you’ll have to remove the wix projects from the solution.

You can open the complete code in either the Enterprise-Architect-Toolpack \Total Solution.sln or in case you only downloaded the framework then Enterprise-Architect-Add-in-Framework\Total Solution.sln but make sure to start you IDE as administrator.

Before compiling check the reference to Interop.EA. I’ve set it to point to C:\Program Files (x86)\Sparx Systems\EA\Interop.EA.dll but if you have EA installed in another directory you’ll need to replace the existing reference.

Once the references are OK you should be able to compile the solution without any issues.

 The pattern

UML Tooling Framework
To be able to understand the architecture of the framework you’ll have to understand the pattern behind it.

On the right you see a diagram of the general modelling tooling pattern. This pattern describes how to create tools that extend the features of a standard modelling tool in order to support the modelling method used.

This is the pattern I use whenever I develop an Enterprise Architect add-in for a client.

The LanguageObject is an interface that represent the object of the modelling language. In the case of UML each meta class of the meta model is represented as an interface. The LanguageObjects are completely independent of the modelling method or modelling tool used. Once finished this layer hardly ever changes.

The LanguageObject is then implemented by the ToolWrapper. There will be a ToolWrapper layer for each supported case tool. The ToolWrapper wraps the ToolObjects of the case tools API using the adapter pattern.

The MetaObject is only required when you are implementing a tool for a specific modelling method. These MetaObjects represent the meta classes of the modelling methods meta model. They wrap the LanguageObject using the adapter pattern. General tools that are not specific to any modeling method, such as the EA Navigator can skip this layer and use the LanguageObjects directly.

The Client is the actual tool. It only uses the MetaObjects to actually do its job.

In order for this pattern to actually work, it is really important that the dependencies and layers are respected.

 The architecture

To make an add-in you’ll always need three components similar to the three repositories on GitHub. You can see how these component map onto the pattern on the diagram.

Add-in Architecture

UML Tooling Framework

The UML Tooling framework implements the LanguageObjects of the pattern for the UML language. Each element of the UML meta model is represented as a interface defining all attributes and operations as defined in the UML Superstructure.UML Tooling Framework Code

Enterprise Architect Addin Framework

This component implements the ToolWrappers of the pattern. This component actually knows about the Enterprise Architect API. It hides all the ugliness of the API behind a clean set of UML interface implementations. There is a also a bunch of helper functions and stuff like that to make things a bit easier to work with.

EA Addin Framework Code

The Enterprise Architect Add-in Framework also contains an abstract add-in class EAAddinBase that you can inherit from to quickly create a new add-in.

The add-in component

The add-in component is the part that is specific to the add-in. It contains the actual logic and behavior that needs to be executed. This is also that part that you tell Enterprise Architect about. EA will then call the prescribed methods such as EA_GetMenuItem or EA_MenuClick on the AddinClass  at the appropriate moments.

When done correctly only the EA_ operations use API objects in their parameters. The first thing they should do is create the appropriate wrapper class and execute the required behavior on that wrapper. We cannot avoid the dependency to EA’s API because of the parameters in the EA_ methods, but it should be restricted to the parameters only. Make sure the only class that depends on Interop.EA.dll is the AddinClass, and leave this class as bear bones as possible. All functionality should go into functional classes who don’t depend on Interop.EA.dll.

You could even consider to split the MyAddin.dll into two parts, one for only the AddinClass, and one for the functional classes. This would definitely be the preferred architecture once you have multiple add-ins that somehow can re-use some of the functional classes.

 More resources

 Related articles

Source code on GitHub

Sparx Systems

EA User Group Event Utrecht

On the 5th of February 2014 there’s a new EA User Group event in Utrecht in the Netherlands

Enterprise Architect

I will be doing a demonstration of how you can actually create an EA add-in in 10 minutes, based on the Tutorial on this blog.

Below the full agenda of the event.
For more details and booking visit http://eausergroup.com/

I’m looking forward to meeting all of you there.

Agenda Utrecht

EA Navigator 2.4 released

The main new feature of the version 2.4 of the EA Navigator is the Quicksearch. The Quicksearch feature is undoubtedly the fastest way to find anything in a (large) EA model. It is the type of feature which makes you wonder how you could live without it all that time before.

Developing the Quicksearch function was far from easy. I wanted something that resembles what Google does when you start typing, and I started things with a standard Windows Forms ComboBox. But after a while tinkering I finally had to give up and I started my own user control from scratch, combining a TextBox and a ListBox.

Furthermore the EA Navigator now no longer a strictly read-only add-in. With the feature to add an element to a diagram it now is able to make changes to a model for the first time.

Ad last but not least a lot of painfully boring work went into adding all the icons. The EA Navigator now uses more then 90 different icons in its tree.

What’s new in EA Navigator 2.4

Here are the changes for version 2.4.

Quicksearch

The Quicksearch feature is the new textbox on the top right of the EA Navigator window.

Quicksearch

Start typing in the Quicksearch box and you will get a list of all things in the model who’s name start with whatever you have typed.

Quicksearch_dropped

Hovering an item in the dropdown list will show you it’s fully qualified name in the tooltip.

Selecting an item will select it in the EA Navigator tree.

The Quicksearch also comes with a whole bunch of new options

Quicksearch_options

You can choose which types of items to search for, and with the Actions you can choose what to do when an item from the Quicksearch is selected.

Link to Element Feature navigation.

EA has the possibility to define links between features of an element such as Attributes or Operations using the Connect to Element Feature feature, which is very useful in a lot of situations.

Visually EA shows which feature is linked using brackets next to the connected Attribute or Operation.

LinkToElementFeature

The is all nice and dandy, but the downside of the story is that you can only see which features are linked by looking at the diagram.

Now with the EA Navigator you can simply navigate from one feature to the other

NavigateLinkToElementFeature

Add to Diagram

The add to diagram button will add the selected element in the EA Navigator tree to the currently opened diagram.

AddToDiagram

The element will be added to the top left corner of the diagram.

Navigate to GUID

A new button has been added that allows you to navigate to a GUID of an item in EA.

NavigateToGUID

Each item, elements, attributes, operations, diagrams, etc… has a unique id in the form of a GUID (example: {C06EF618-D57C-4f63-BF64-F5A5265694AE}).

Pressing the Navigate to GUID button will allow you to go to that element using it’s GUID. If there’s already a GUID in your windows clipboard then the EA Navigator will use that one. If not the EA navigator will show a dialog where you can past (or type) the GUID.

For elements shown in the project browser you can easily copy the GUID to your clipboard using the context menu Copy Reference|Copy Node GUID to Clipboard

CopyGUIDClipBoard

New Icons

The EA Navigator now shows correct icons for all possible element types in EA allowing you to easily see the difference between Use cases, Classes, Activities, etc..

The icons had become even more more important because of the Quicksearch function. When searching for an element it is especially useful to immediately which type it is.

Icons

Over 70 new icons has been added bringing the total number of icons used by the EA Navigator to 92.

Downloads

More Information

More information about the EA Navigator add-in for Enterprise Architect can be found here:

EA User Group European Seminar

I’ll be presenting two sessions soon at the EA User Group Seminar.

Below the full agenda of the event. For more details and booking visit http://eausergroup.com/

Enterprise Architect

Agenda – Wednesday 15th May 2013


The event tracks are;

  • Track 1 – Setting up projects for success with EA
  • Track 2 – Project Delivery with EA
  • Track 3 – Implementation & lessons learnt

The agenda for the day will be as follows;

Dunstan Thomas

09:00 – 09:45

  • Exhibition, Coffee & Welcome

09:45 – 10:30

  • Keynote – Modelling Software Intensive Systems with Doug Rosenberg

10:30 – 10:45

  • RefreshmentsLieberLieber

10:45 – 11:30

  • Track 1 – Writing Use Cases in EA with Ian Mitchell.
  • Track 2 – BPMN 2.0 with Phil Chudley.
  • Track 3 – User Story: EA usage at ACV with Geert Bellekens.

11:45 – 12:30

  • Track 1 – MDG Profiles & Toolboxes with Phil Chudley.EADocX
  • Track 2 – SysML with Roman Bretz.
  • Track 3 – User Story: EA usage at Evry with Knut Paulsen.

12:30 – 13:30

  • Lunch & Exhibition

13:30 – 14:15

  • Track 1 – Fifty Enterprise Architect tricks with Peter Doomen.
  • Track 2 – Analyser Workbench with Daniel Siegl.
  • Track 3 – Open Session 1: Testing – Chair Knut Paulsen.

14:30 – 15:15

  • Track 1 – Modelling with Enterprise Architect – What’s in it for the PM? With Jackie Mitchell.
  • Track 2 – EA Navigator with Geert Bellekens .
  • Track 3 – Open Session 2: Collaborative use of EA – Chair Simon Beck

15:15 – 16:30

  • Refreshments, Exhibition and Q&A with speakers & organisers.

 

EA Navigator 2.3 released

The focus of version 2.3 of the EA Navigator is usability.

As a user myself I’m in a good position to evaluate the user-experience of the tool, and I felt the EA Navigator was coming short on that aspect. So I decided to do something about that.

One of the most important improvements, and also the most difficult one, is the switch to background processing.

With all the new features in the latest version I (and other users too) noticed that the EA Navigator was seriously slowing down EA itself. The problem was the fact that the EA Navigator needed some time to build the whole tree for the selected element, and EA was waiting for the add-in to finish before continuing.

On a small local .eap file that effect wasn’t really noticeable, but on large DBMS repositories it became a serious problem, so much even that some users even preferred to uninstall the EA Navigator because of it.

To solve this issue I started experimenting with multithreaded processing. The idea that, after a new element was selected, that the EA Navigator would start loading the element in a background thread. That allows us to return the control to EA almost immediately. The result is that the user doesn’t need to wait for the EA Navigator to finish before continuing to use EA.

What’s new in EA Navigator 2.3

Here are the changes for version 2.3.

Performance improved

The overall performance has been improved by doing the time consuming work of the EA Navigator in a background thread.
When several elements are being selected before the EA Navigator has finished loading them they will get queued. So now you might notice now and then that the EA Navigator is catching up after you finished clicking.

New Toolbar

The new toolbar allows fast access to functions such as Select in Project BrowserOpen Properties, or To FQN.
There’s also a button for the new Settings dialog, and the About dialog

New Settings

You can now configure certain options in the EA Navigator. The options are stored on a per user basis in a config file in the user profile.

The available options are:

  • Doubleclick action:
    Decide what the EA navigator should do when you double-click on a node.
  • Show Toolbar:
    Show or hide the toolbar.
  • Show Context Menus:
    Show or Hide the Navigate context menu when right clicking on an element.
  • Track Selected Element:
    Controls whether or not the EA Navigator load the selected element in the navigator window.

Open in Navigator

If you have disabled tracking of the selected element in the settings then you have a new context menu option load the element in the navigator window.

Select relevant element when opening diagram

When opening a diagram via the Navigator window the relevant element will be selected. So if you open a sequence diagram from under the Operation/Diagrams section the message calling that operation will be selected

Show stereotypes in names of elements

Elements now show their stereotypes in the navigator window.
Up to 20 characters of stereotype information will be show. Multiple stereotypes are separated by a comma, and if there’s more than can be displayed there will be two dots at the end to indicate that.

Downloads

More Information

More information about the EA Navigator add-in for Enterprise Architect can be found here:

EA Navigator 2.2 released

Since the release of version 2.1 the EA Navigator has been quite stable. Not much need for major improvements or bugfixes.

So version 2.2 has been about little changes and updates.

The most remarkable new feature is the new context menu with the ability to open the properties dialog of an element. Not remarkable because of the feature itself, but because of the loops and holes I had to jump through to get that part working. Opening the properties dialog is not really a supported API function of EA, so I had to resort to using an undocumented CustomCommand function to hack my way into it. Unfortunately I never got it working for messages.

What’s new in EA Navigator 2.2

Open Properties via new context menu

Each element in the navigator now has a context menu when you right-click on it.

Open Properties  opens the properties dialog of the element.

Select in Project Browser  selects the element in the project browser, just like a double-click would.

Fully Qualified name in the tooltip

Hovering above an element will show the fully qualified name of that element in the tooltip.

This helps to quickly see where that element is coming from (and if you need that one, or another one).

Communication Diagrams

Next to sequence diagrams you can also have messages on Communication Diagram (the old Collaboration Diagrams). Version 2.2 now also supports Communication Diagrams the same way it supports Sequence Diagrams.

This feature was requested by Chris on Github.

Datatypes and Enumerations

Datatypes and Enumerations are now also supported the same way as classes.

Downloads

More Information

More information about the EA Navigator add-in for Enterprise Architect can be found here:

EA Navigator is now an official Sparx Systems 3rd party add-in

I’m proud to announce that the EA Navigator has made the “official” Sparx Systems 3rd party add-in list.

Sparx Systems doesn’t just publish any add-in for Enterprise Architect. Each add-in on the list has been demonstrated to the the people of Sparx, and only if they approve it it will be added to the list.

So a couple of week ago I had an appointment to do a web conference with Sparx to do a little demo of my add-in.

Now they have approved it and the part about the EA Navigator has been published, and it even has its own url for direct navigation: http://www.sparxsystems.com/products/3rdparty.html#EAnavigator.

This is how it looks like: