Caution
Version 1.x.x is not compatible with previous versions 0.x.x
This is an extension for StarUML.io S/W which aids the users to generate UUIDs for each selected element of their models in order to make references these elements, at documentation and/or the source code.
The UUIDs are generated as:
-
A new Tag inside the element, wherever it's permittable.
-
The Tag has always name
UUID: <uuid>and is ofstringkind. At it'svaluefield it contains an empty string, which can be used for any user cause.- The
uuidis generated using thecrypto.randomUUID()algorithm and it's of the UUID v4 standard format like:e4f3c066-87a6-487d-9e89-514b58ab60a2 - To this end, tags are named as
UUID: e4f3c066-87a6-487d-9e89-514b58ab60a2
- The
-
Because the UUID is on the name of the tag, it's possible the UUID tags to be searched and referenced even from the HTML Docs export, from the Index page, as shown below. From there it's possible using the backwards linking to identify, for example, that the UUID
e6d731ab-181a-457f-a103-b16a6df01d80which is somewhere stored in documentation or source code as reference, corresponds to "Class 2" element:

Important
If you have already installed the extension StarUML-ModelIdCopyAndSelect it's proposed to uninstalled it first, because it's uses the same shortcuts with this "StarUML-AddModelUUID-CopyAndSelect" extension.
Note
The following information is rereferred to the version 1.0.1.
Below is shown this extension's menu.
There are 4 options:
-
Generate UUID in Clipboard: It generates a UUID and copies it to Clipboard thus the user to be able to paste it anywhere he may need. So it may be useful if for any case, there is the need to update manually a UUID with another.
-
Add+Copy Model's Tag UUID: User must have first select an appropriate element/model. If the selected element/model has not the
UUIDtag, that tag is created with a new UUID first. Then the UUID value which exist in theUUIDtag of the selected element/model is copied to clipboard and is available to the user to use it for reference in documentation or source code. -
Select Model by it's Tag UUID: The user is expected to have copied the wanted UUID from the documentation or source code to the clipboard. Then using this functionality the extensions finds the tag containing the value of the user's UUID, and auto-selects the parent element of the tag in the Model Explorer. To this end, with Ctrl+E the user can find directly the element/model with the wanted UUID in the Explorer window, and with Ctrl+D to also find it in a used diagram.
-
Check for errors on UUID Tags: This enables currently two kinds of checks
-
Check for Duplicated UUIDs: While the idea behind the UUIDs is to be unique in a global scale, this tool checks if there are any
UUIDtags with the same uuid value in their name. If this is the case, then this option copies to Clipboard a report like the following example, where the parentsnameand_idfields where duplicated UUID tags found are provided:- Duplicated UUID[ca566449-742f-4536-8cfd-dc27fab351f3] detected at elements with parent _id's: name: [Untitled], _id: [ AAAAAAFF+h6SjaM2Hec= ] name: [Model], _id: [ AAAAAAFF+qBWK6M3Z8Y= ]► Notice that these
_ids are not unique and not safe to use, but still can be easily accessed and used in a similar manner using the corresponding extension StarUML-ModelIdCopyAndSelect. However have in mind that using this old extension it may re-wire the shortcuts Alt+Shift+C and Alt+Shift+V (see the "important" note above). -
Check for Multiple UUID tags under elements: If more than one UUID tags are existing under a single element, this check will provide an error along with all relative information thus the user to manually correct the situation. The result is copied to the clipboard as a form of:
- Multiple UUID Tags found at element [Untitled] with _id [ AAAAAAFF+h6SjaM2Hec= ] UUID: a1991a16-5521-4f36-8796-703abf315bbc UUID: aa566449-742f-4536-8cfd-dc27fab351f3
-

