Interface ISymbolicNameServiceDelegate


  • public interface ISymbolicNameServiceDelegate
    Clients may implement this interface to contribute custom symbolic name processing logic.

    All the methods defined by this interface fall into two groups: the ones that deal with common symbolic names and the ones that deal with context specific symbolic names. Common names are used in most contexts. They uniquely identify the object they belong to, thus may be resolved even when no context is specified. Context specific names are usually not unique thus they can be resolved only when the usage context is known. Context specific logic if provided overrides common logic.

    Note that the methods dealing with common symbolic names may return non-null value when the target object or symbolic name belongs to the same subsystem the delegate belongs to, whereas the methods dealing with context specific names may return non-null value when the context object belongs to the same subsystem the delegate belongs to.

    Delegates are registered via com._1c.g5.v8.dt.core.symbolicNameServiceDelegates extension point.

    See Also:
    ISymbolicNameService
    • Method Detail

      • convertCommonSymbolicNameToUri

        org.eclipse.emf.common.util.URI convertCommonSymbolicNameToUri​(String name,
                                                                       org.eclipse.emf.ecore.EClass targetType,
                                                                       IBmEngine engine)
        Converts common symbolic name to URI.
        Parameters:
        name - The symbolic name to convert, may not be null.
        targetType - The target object type, may be null.
        engine - The BM engine, may not be null.
        Returns:
        URI or null if the name is not supported by this delegate.
      • convertContextSpecificSymbolicNameToUri

        org.eclipse.emf.common.util.URI convertContextSpecificSymbolicNameToUri​(String name,
                                                                                org.eclipse.emf.ecore.EObject contextObject,
                                                                                org.eclipse.emf.ecore.EReference contextFeature,
                                                                                String contextTopObjectFqn,
                                                                                IBmEngine engine)
        Converts context specific symbolic name to URI.
        Parameters:
        name - The symbolic name to convert, may not be null.
        contextObject - The context object, may not be null.
        contextFeature - The context feature, may not be null.
        contextTopObjectFqn - The context top object FQN, may not be null.
        engine - The BM engine, may not be null.
        Returns:
        URI or null if the context object is not supported by this delegate or no specific logic is required in this context.
      • convertUriToCommonSymbolicName

        String convertUriToCommonSymbolicName​(org.eclipse.emf.common.util.URI targetUri)
        Converts URI to common symbolic name.
        Parameters:
        targetUri - The URI to convert, may not be null.
        Returns:
        symbolic name or null if the URI is not supported by this delegate or it cannot be converted to a symbolic name (e.g. the target object does not have a symbolic name).
      • convertUriToContextSpecificSymbolicName

        String convertUriToContextSpecificSymbolicName​(org.eclipse.emf.common.util.URI targetUri,
                                                       org.eclipse.emf.ecore.EObject contextObject,
                                                       org.eclipse.emf.ecore.EReference contextFeature)
        Converts URI to context specific symbolic name.
        Parameters:
        targetUri - The URI to convert, may not be null.
        contextObject - The context object, may not be null.
        contextFeature - The context feature, may not be null.
        Returns:
        symbolic name or null if the context object is not supported by this delegate or no specific logic is required in this context.
      • generateCommonSymbolicName

        String generateCommonSymbolicName​(org.eclipse.emf.ecore.EObject targetObject)
        Generates common symbolic name.
        Parameters:
        targetObject - The object to generate symbolic name for, may not be null.
        Returns:
        symbolic name or null if the target object is not supported by this delegate or the object does not have a common symbolic name.
      • generateContextSpecificSymbolicName

        String generateContextSpecificSymbolicName​(org.eclipse.emf.ecore.EObject targetObject,
                                                   org.eclipse.emf.ecore.EObject contextObject,
                                                   org.eclipse.emf.ecore.EReference contextFeature)
        Generates context specific symbolic name.
        Parameters:
        targetObject - The object to generate symbolic name for, may not be null.
        contextObject - The context object, may not be null.
        contextFeature - The context feature, may not be null.
        Returns:
        symbolic name or null if the context object is not supported by this delegate or no specific logic is required in this context.