eaUtils - Sparx Enterprise Architect add-in

Utilities for your EA models: sort elements, generate alias, diagram breadcrumb navigation...

Page d'accueil (version francaise)TwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn

Section 9. Sort elements or diagrams in a package tree

package tree sorting feature in eautils enterprise architect addin

This help article describes the use of eaUtils sorting features on a package tree to sort diagrams, or elements within the selected packages by aliasstereotypetagged valuename or object id.

 

This feature runs from a package selected in the Project Browser. Once launched, it displays the tree branch for the selected package, where each package can be selected so its diagrams or elements can be sorted . If the selected package doesn't contain any sub package, the standard sorting dialog window is displayed.

Enable the Package Tree in eaUtils settings

The Package Tree setting is disabled by default i.e. eaUtils sorting features can be run on a selected package or element.

To use the package tree sorting feature, eaUtils settings must be modified: enable Process the package tree option in the Sort By tab.

eautils addin for enterprise architect sparx sort by setting package tree

eaUtils package tree sorting

Elements Sorting

Having the package tree setting enabled, elements within the branch can be sorted via a right click on the main package > Specialize > eaUtils > [Browser] Sort elements.

package tree sorting option in sparx enterprise architect addin

Unless the package doesn't contain any child package, the following dialog window is opened, prompting to select the packages to process within the current tree:

sparx systems enterprise architect addin eaUtils package tree sorting window

Below is a summary of the available actions or information:

  • Sorting option: select between Alias, Name, Object ID, Stereotype, and Tagged Value.
  • Status: set to Ready until the sorting is running, changing the status to Busy.
  • Current Settings: summary of the sorting settings.
  • Reload the updated packages in the browser: enabled by default to access the new sorting after execution, this option can be disabled to save time in running eaUtils (a project reload is required after to see the changes).
  • Edit Settings: button to edit and update the settings.
  • Select all/none: enable or disable all packages within the displayed tree.
  • Expand or Collapse All: expand or collapse all nodes (packages) in the tree.
  • Tree: packages within the tree are displayed and can be individually enabled or disabled. Any locked package is greyed out and followed by (Locked).
    • Note: Root nodes are always disabled and marked as locked as they never contain elements to sort.
  • Cancel : close this window.

Until at least one package is selected, the OK button is disabled.

Once sorting option is defined (e.g. Alias), and the package selection is complete, click on OK.

eautils addin sort by package tree confirmation enterprise architect

Whilst eaUtils sorting by feature is running, the progress is updated as packages are processed.

eautils addin sparxsystems enterprise architect sort by package tree progress busy

  • PROCESSED package means the content has been sorted, it hasn't been reloaded yet to see the results in the browser. This state is not shown when the "Reload" option is disabled.
  • DONE package has its content sorted. If the "Reload" option is enabled, its content has been reloaded in the browser.

Once completed, all selected packages are marked as DONE, and a message confirms the number of updated packages. The message "RELOADING THE PACKAGE CONTENT.. [DONE]" means that all packages have been reloaded.

eautils package tree sorting addin enterprise architect completed

Diagram Sorting

Diagrams within the branch can be sorted via a right click on the main package > Specialize > eaUtils > [Browser] Sort diagrams.

In the example below, diagrams within all selected packages are about to be sorted by Created date (descending order) i.e. from the oldest to the most recently created diagram, and the packages content will not be reloaded. One of the packages is locked and cannot be selected, processed.

sparx-ea-addin-eautils-package-tree-sortdiagrams

Result: since the option to reload the selected packages was disabled, a message suggests reloading the EA project to see the changes.

sparx-ea-addin-eautils-package-tree-sortdiagrams

Default Order

Is it possible to reset the default order on the selected packages by running Specialize > eaUtils > [Browser] Reset Elements sort order.

Result: