Class ExternalEditor


  • public abstract class ExternalEditor
    extends java.lang.Object
    Enables to plug in external editors.
    Author:
    Holger Eichelberger
    • Constructor Summary

      Constructors 
      Constructor Description
      ExternalEditor()  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean embedEditor​(java.net.URI uri, org.eclipse.swt.widgets.Composite parent)
      Embeds an editor for the given uri into the given parent.
      protected abstract boolean embedEditorImpl​(java.net.URI uri, org.eclipse.swt.widgets.Composite parent)
      Embeds this editor for the given uri into the given parent.
      static boolean providesEditorFor​(java.net.URI uri)
      Returns whether any editor plugin provides an editor for the given uri.
      protected abstract boolean providesEditorForImpl​(java.net.URI uri)
      Returns whether this editor plugin provides an editor for the given uri.
      static void register​(ExternalEditor editor)
      Registers the external editor plugin.
      static void unregister​(ExternalEditor editor)
      Unregisters the external editor plugin.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • REGISTERED

        private static final java.util.List<ExternalEditor> REGISTERED
    • Constructor Detail

      • ExternalEditor

        public ExternalEditor()
    • Method Detail

      • embedEditorImpl

        protected abstract boolean embedEditorImpl​(java.net.URI uri,
                                                   org.eclipse.swt.widgets.Composite parent)
        Embeds this editor for the given uri into the given parent.
        Parameters:
        uri - the URI representing the resource to be read
        parent - the parent composite
        Returns:
        true if this editor was embedded, false else
      • providesEditorForImpl

        protected abstract boolean providesEditorForImpl​(java.net.URI uri)
        Returns whether this editor plugin provides an editor for the given uri.
        Parameters:
        uri - the URI representing the resource to be read
        Returns:
        true if an editor can be provided, false else
      • register

        public static void register​(ExternalEditor editor)
        Registers the external editor plugin.
        Parameters:
        editor - the plugin to be unregistered
      • unregister

        public static void unregister​(ExternalEditor editor)
        Unregisters the external editor plugin.
        Parameters:
        editor - the plugin to be unregistered
      • embedEditor

        public static boolean embedEditor​(java.net.URI uri,
                                          org.eclipse.swt.widgets.Composite parent)
        Embeds an editor for the given uri into the given parent.
        Parameters:
        uri - the URI representing the resource to be read
        parent - the parent composite
        Returns:
        true if an editor was embedded, false else
      • providesEditorFor

        public static boolean providesEditorFor​(java.net.URI uri)
        Returns whether any editor plugin provides an editor for the given uri.
        Parameters:
        uri - the URI representing the resource to be read
        Returns:
        true if an editor can be provided, false else