24.08.2015 Views

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

Oxygen XML Author plugin 13.2.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Author</strong> Developer Guide | 206attributes or on their values. Responsible for creating the content completion filter is the methodcreateSchemaManagerFilter. A new SchemaManagerFilter will be created each time a documentmatches the rules defined by the Document Type Association which contains the filter declaration.public SchemaManagerFilter createSchemaManagerFilter() {return new SDFSchemaManagerFilter();}A detailed presentation of the schema manager filter can be found in Configuring a Content completion handlersection.6. The <strong>Author</strong> supports link based navigation between documents and document sections. Therefore, if the documentcontains elements defined as links to other elements, for example links based on the id attributes, the extensionshould provide the means to find the referred content. To do this an implementation of thero.sync.ecss.extensions.api.link.ElementLocatorProvider interface should be returned bythe createElementLocatorProvider method. Each time an element pointed by a link needs to be locatedthe method is invoked.public ElementLocatorProvider createElementLocatorProvider() {return new DefaultElementLocatorProvider();}The section that explains how to implement an element locator provider is Configuring a Link target element finder.7. The drag and drop functionality can be extended by implementing thero.sync.exml.editor.xmleditor.pageauthor.<strong>Author</strong>DnDListener interface. Relevant methodsfrom the listener are invoked when the mouse is dragged, moved over, or exits the <strong>Author</strong> editor mode, when thedrop action changes, and when the drop occurs. Each method receives the DropTargetEvent containing informationabout the drag and drop operation. The drag and drop extensions are available on <strong>Author</strong> mode for both <strong>Oxygen</strong><strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> Eclipse <strong>plugin</strong> and standalone application. The Text mode corresponding listener is availableonly for <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> Eclipse <strong>plugin</strong>. The methods corresponding to each implementation are:create<strong>Author</strong>AWTDndListener, createTextSWTDndListener andcreate<strong>Author</strong>SWTDndListener.public <strong>Author</strong>DnDListener create<strong>Author</strong>AWTDndListener() {return new SDF<strong>Author</strong>DndListener();}For more details about the <strong>Author</strong> drag and drop listeners see the Configuring a custom Drag and Drop listenersection.8. Another extension which can be included in the bundle is the reference resolver. In our case the references arerepresented by the ref element and the attribute indicating the referred resource is location. To be able to obtain thecontent of the referred resources you will have to implement a Java extension class which implements thero.sync.ecss.extensions.api.<strong>Author</strong>ReferenceResolver. The method responsible for creatingthe custom references resolver is create<strong>Author</strong>ReferenceResolver. The method is called each time adocument opened in an <strong>Author</strong> editor mode matches the Document Type Association where the extensions bundleis defined. The instantiated references resolver object is kept and used until another extensions bundle correspondingto another Document Type is activated as result of the detection process.public <strong>Author</strong>ReferenceResolver create<strong>Author</strong>ReferenceResolver() {return new ReferencesResolver();}A more detailed description of the references resolver can be found in the Configuring a References Resolver section.9. To be able to dynamically customize the default CSS styles for a certainro.sync.ecss.extensions.api.node.<strong>Author</strong>Node an implementation of the

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!