Class AttributeIdGenerator
- java.lang.Object
-
- org.eclipse.glsp.server.emf.idgen.AttributeIdGenerator
-
- All Implemented Interfaces:
EMFIdGenerator
public class AttributeIdGenerator extends java.lang.Object implements EMFIdGenerator
An ID generator that uses the ID attribute of a given EObject. This generator should only be used if it is ensured that all elements have an id attribute set.- See Also:
EClass.getEIDAttribute()
-
-
Constructor Summary
Constructors Constructor Description AttributeIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetOrCreateId(org.eclipse.emf.ecore.EObject element)Returns a unique identifier for the given element.
-
-
-
Method Detail
-
getOrCreateId
public java.lang.String getOrCreateId(org.eclipse.emf.ecore.EObject element)
Description copied from interface:EMFIdGeneratorReturns a unique identifier for the given element. The same element must always return the same id and should not conflict with other elements.- Specified by:
getOrCreateIdin interfaceEMFIdGenerator- Parameters:
element- source element- Returns:
- unique ID
-
-