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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Here is the implementation of these three methods:<strong>Author</strong> Developer Guide | 182/*** Performs the operation.*/public void doOperation(<strong>Author</strong>Access authorAccess,ArgumentsMap arguments)throws IllegalArgumentException,<strong>Author</strong>OperationException {JFrame oxygenFrame = (JFrame) authorAccess.getParentFrame();String href = displayURLDialog(oxygenFrame);if (href.length() != 0) {// Creates the image <strong>XML</strong> fragment.String imageFragment ="";}}// Inserts this fragment at the caret position.int caretPosition = authorAccess.getCaretOffset();authorAccess.insert<strong>XML</strong>Fragment(imageFragment, caretPosition);/*** Has no arguments.** @return null.*/public ArgumentDescriptor[] getArguments() {return null;}/*** @return A description of the operation.*/public String getDescription() {return "Inserts an image element. Asks the user for a URL reference.";}Note: The complete source code can be found in the Simple Documentation Framework project, includedin the <strong>Oxygen</strong> <strong>Author</strong> SDK zip available for download on the <strong>Oxygen</strong> <strong>XML</strong> <strong>Author</strong> <strong>plugin</strong> website.Important:Make sure you always specify the namespace of the inserted fragments.3. Package the compiled class into a jar file. An example of an ANT script that packages the classes folder contentinto a jar archive named sdf.jar is listed below:

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

Saved successfully!

Ooh no, something went wrong!