Class EditorEmbedderFactory


  • public class EditorEmbedderFactory
    extends java.lang.Object
    A factory for creating embedded editors. The purpose of this class is to decouple actual editor implementations from the EASy-Producer UI, so that editors can be installed optionally.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • EditorEmbedderFactory

        public EditorEmbedderFactory()
    • Method Detail

      • register

        public static void register​(java.lang.String extension,
                                    EditorEmbedderFactory.IEditorCreator creator)
        Registers an editor creator.
        Parameters:
        extension - the file extension to react on
        creator - the editor creator to register
      • unregister

        public static void unregister​(java.lang.String extension)
        Unregisters an editor creator.
        Parameters:
        extension - the file extension to unregister the creator for
      • embedEditor

        public static IEmbeddedEditor embedEditor​(java.net.URI resourceURI,
                                                  org.eclipse.swt.widgets.Composite composite)
        Embeds an editor for the given resource URI into composite.
        Parameters:
        resourceURI - the URI to be handled
        composite - the parent composite to embed the editor into
        Returns:
        the embedded editor (or null if embedding failed for some reason)