Skip to content

Best practice for assigning IDs? #1265

Answered by ndoschek
dmm9 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dmm9,

Thank you for reaching out!

Overall, I'd like to mention the concept of the *IdGenerator, particularly in the context of the Java implementation of the GLSP server.
It seems you're likely using this based on the code snippet you shared.
The *IdGenerator is essential for generating IDs for GModelElements and therefor for managing the model elements, for example in the GModelIndex.

For example, if you use EMFDiagramModule as a base implementation, it is necessary to bind an available EMFIdGenerator.
There are different implementations available already, just to name two here:

  • FragmentIdGenerator - creates the same IDs as you mentioned above, i.e. EMF URI fragments as element IDs
  • U…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dmm9
Comment options

Answer selected by dmm9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants