Example - a custom protocol plugin

 
  1. Write the handler class for your protocol (implement the java.net.URLStreamHandler interface)

    [Note]Note

    You must be careful to provide ways to correct and un correct the URLs of your files.

  2. Write the plugin class (the ro.sync.exml.plugin.Plugin class must be extended in order to create the new plugin)

  3. Write the plugin extension class. It is necessary that the plugin extension for the custom protocol implements the URLStreamHandlerPluginExtension interface. Without it, you can’t use your plugin,because <oXygen/> will not be able to find the protocol handler.

    You can choose to implement also the URLChooserPluginExtension interface. It will allow you to write and use your own customized dialog for this protocol.

    If you implement the extension URLHandlerReadOnlyCheckerExtension you can mark a resource as read-only when it is opened. This extension allows also to switch between marking the resource as read-only and read-write while it is edited. This is useful when opening CMS resources.

  4. Write the plugin.xml file (remember to change the name of the plugin class to the one from the second step and the plugin extension class name with the one you have chosen at step 3)

  5. Create a .jar archive and install your new plugin.