Class GenericXtextToolProviderImpl<T>

    • Constructor Detail

      • GenericXtextToolProviderImpl

        public GenericXtextToolProviderImpl​(javax.inject.Provider<com.google.inject.Injector> standaloneInjectorProvider,
                                            Class<T> requestedType,
                                            String extensionPointId,
                                            String extensionPointAttr)
        Initializes the base class with necessary information.
        Parameters:
        standaloneInjectorProvider - Provider for a standalone instance of the language injector.
        requestedType - The type of the requested tool.
        extensionPointId - The extension point id that provides implementations for the requested tool.
        extensionPointAttr - The attribute that contains the tool object.
    • Method Detail

      • get

        public T get()
        Specified by:
        get in interface javax.inject.Provider<T>
      • getExtension

        protected Optional<T> getExtension()
        Gets the requested tool from the extension point given in the constructor. If multiple extensions are provided, the implementation returns a random implementation.
        Returns:
        The found extension or an empty Optional otherwise.
      • getStandalone

        protected T getStandalone()
        Gets the requested tool based on a standalone initialization.
        Returns:
        The created tool.