Extension debugging with Eclipse
Posted: Fri Mar 08, 2024 11:52 am
I'm developing custom element insertion framework extension via Java & Eclipse. By following the below URL I tried to debug my extension in Eclipse from Oxygen.
Debugging an Oxygen SDK Extension Using the Eclipse Workbench
https://www.oxygenxml.com/doc/versions/ ... g-sdk.html
The XML file that describes the extension.
xxx-frameworks\externalAuthorActions\bookref.xml
bookref.png is displayed in the Oxygen toolbar, so I assume that this framework is surely recognized from Oxygen,
The class that implements AuthorOperation:
The .class files folder is directly assigned in the Document Association Class path dialog.
But one I invoke extension class form Oxygen toolbar icon, I got the following error message. When I generates .jar file from Eclipse and set it framework resources folder, I could get my extension work. Are there any advices to debug extenion in Eclipse IDE from Oxygen??
Any suggestions are welcome!
Thanks and regards,
Debugging an Oxygen SDK Extension Using the Eclipse Workbench
https://www.oxygenxml.com/doc/versions/ ... g-sdk.html
The XML file that describes the extension.
xxx-frameworks\externalAuthorActions\bookref.xml
Code: Select all
<a:authorAction xmlns:a="http://www.oxygenxml.com/ns/author/external-action"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.oxygenxml.com/ns/author/external-action http://www.oxygenxml.com/ns/author/external-action/authorAction.xsd"
id="bookRef">
<a:name>分冊間参照</a:name>
<a:description>分冊間参照を挿入します</a:description>
<a:largeIconPath href="./icons/bookref.png"/>
<a:smallIconPath href="./icons/bookref-small.png"/>
<a:operations>
<a:operation id="com.antennahouse.oxyutil.operation.ExtXrefOperation">
<a:xpathCondition>//*</a:xpathCondition>
<a:arguments>
<a:argument name="bookrefpath">${xpath_eval(concat("${pd}", '/../../book-ref/book-ref.xml'))}</a:argument>
<a:argument name="fragment">
<extxref volref="${extxrefVolref}" ref-style="${extxrefFormat}" refid="${extxrefId}" pattern="${pattern}">${extxrefTitle}</extxref>
</a:argument>
<a:argument name="insertLocation"></a:argument>
<a:argument name="insertPosition"></a:argument>
</a:arguments>
</a:operation>
</a:operations>
<a:accessKey/>
</a:authorAction>
The class that implements AuthorOperation:
Code: Select all
public class ExtXrefOperation implements AuthorOperation{
ExtXrefDlg exd = null;
private static final String ARG_FILEPATH = "bookrefpath";
private static final String ARG_INSERT_FRAGMENT = "fragment";
@Override
public void doOperation(AuthorAccess authorAccessarg, ArgumentsMap arguments)
throws IllegalArgumentException, AuthorOperationException {
Dialog.informationDlg(null, "Hello World!");
if (exd == null) {
String bookrefPathString = (String)arguments.getArgumentValue(ARG_FILEPATH);
String fragmentExtxref = (String)arguments.getArgumentValue(ARG_INSERT_FRAGMENT);
//exd = new ExtXrefDlg(bookrefPathString);
} else {
exd.setVisible(true);
}
}
@Override
public String getDescription() {
return "Insert \"extxref\" element from dialog";
}
@Override
public ArgumentDescriptor[] getArguments() {
ArgumentDescriptor args[] = new ArgumentDescriptor[] {
new ArgumentDescriptor(ARG_FILEPATH, ArgumentDescriptor.TYPE_STRING, "The relative path of book-ref.xml from project path."),
new ArgumentDescriptor(ARG_INSERT_FRAGMENT, ArgumentDescriptor.TYPE_STRING, "extxref placeholder template")
};
return args;
}
}
But one I invoke extension class form Oxygen toolbar icon, I got the following error message. When I generates .jar file from Eclipse and set it framework resources folder, I could get my extension work. Are there any advices to debug extenion in Eclipse IDE from Oxygen??
Any suggestions are welcome!
Thanks and regards,