Page 1 of 1

Docbook - replace 'insert graphic' action

Posted: Tue Aug 11, 2009 1:14 pm
by honyk
Hello,

I am trying to replace default behaviour of insert graphic action and insert (inline)mediaobject/imageobject/imagedata fragment instead. Can it be achieved using some default library or am I to develop any custom plugin?

Thanks for the info.

Jan

Re: Docbook - replace 'insert graphic' action

Posted: Tue Aug 11, 2009 2:13 pm
by sorin_ristache
Hello,

If you want to replace the default DocBook action you can modify the Java source code of the class ro.sync.ecss.extensions.docbook.InsertGraphicOperation that is included in the Author SDK and add your version of the Insert Graphic action to the classpath of the DocBook framework before the default jar file ${frameworks}/docbook/docbook.jar.


Regards,
Sorin

Re: Docbook - replace 'insert graphic' action

Posted: Wed Aug 12, 2009 6:23 pm
by honyk
Hello,

I've downloaded SDK, modified Java code, with some 'ro' stuff I've compiled it into jar, updated docbook framework. After clicking on icon I can select image file, but on confirm I am getting the following error message:
Couldn't execute operation: 'my.actions.InsertMediaObjectOperation' for action: 'Insert Graphic' because of: class java.lang.NoSuchMethodError - ro.sync.ecss.extensions.api.AuthorAccess.getEditorAccess()Lro/sync/ecss/extensions/api/access/AuthorEditorAccess;

Both classes ro.sync.ecss.extensions.api.AuthorAccess and ro/sync/ecss/extensions/api/access/AuthorEditorAccess; are included in my JAR file so I don't know what is wrong. I am quite surprised by L letter between them in error message as it could mean the whole string is recognised as single class. I don't know. Could somebody help?

Jan

Re: Docbook - replace 'insert graphic' action

Posted: Thu Aug 13, 2009 10:56 am
by honyk
Mea culpa, I've tested it in version 9, but SDK was for version 10. In this version it works fine! Wow, the first my plugin is out!