Class EMFSemanticIdConverter.Default
- java.lang.Object
-
- org.eclipse.glsp.server.emf.notation.EMFSemanticIdConverter.Default
-
- All Implemented Interfaces:
EMFIdGenerator,EMFSemanticIdConverter
- Direct Known Subclasses:
SemanticFragmentIdConverter
- Enclosing interface:
- EMFSemanticIdConverter
public static class EMFSemanticIdConverter.Default extends java.lang.Object implements EMFSemanticIdConverter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.glsp.server.emf.notation.EMFSemanticIdConverter
EMFSemanticIdConverter.Default
-
-
Field Summary
Fields Modifier and Type Field Description protected EMFIdGeneratorgenerator
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetOrCreateId(org.eclipse.emf.ecore.EObject semanticElement)Returns a unique identifier for the given element.org.eclipse.emf.ecore.EObjectresolve(java.lang.String semanticId, org.eclipse.emf.ecore.EObject root)Resolves a semantic element based on the given id and the semantic root.
-
-
-
Field Detail
-
generator
@Inject protected EMFIdGenerator generator
-
-
Method Detail
-
getOrCreateId
public java.lang.String getOrCreateId(org.eclipse.emf.ecore.EObject semanticElement)
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:
semanticElement- source element- Returns:
- unique ID
-
resolve
public org.eclipse.emf.ecore.EObject resolve(java.lang.String semanticId, org.eclipse.emf.ecore.EObject root)Description copied from interface:EMFSemanticIdConverterResolves a semantic element based on the given id and the semantic root.- Specified by:
resolvein interfaceEMFSemanticIdConverter- Parameters:
semanticId- semantic id generated throughEMFIdGenerator.getOrCreateId(EObject).root- semantic root element- Returns:
- the semantic element identified by the given semantic id
-
-