Extension debugging with Eclipse
Post here questions and problems related to oXygen frameworks/document types.
Extension debugging with Eclipse
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.
- 2024-03-08-1.png (12.19 KiB) Viewed 1022 times
- 2024-03-08-6.png (6.4 KiB) Viewed 1022 times
Any suggestions are welcome!
Thanks and regards,
- Attachments
-
- 2024-03-08-9.png (63.65 KiB) Viewed 1022 times
-
- 2024-03-08-1.png (12.19 KiB) Viewed 1022 times
-
- 2024-03-08-9.png (63.65 KiB) Viewed 1022 times
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Extension debugging with Eclipse
Hi,
So the documentation you linked says:
Regards,
Radu
So the documentation you linked says:
This would mean you just need to add in the Classpath list a reference to your "bin" folder, but instead you seem to refer individual subfolders from the bin folder.In the Classpath tab, add a reference to your Project's classes directory and in the Extensions tab,
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Extension debugging with Eclipse
> This would mean you just need to add in the Classpath list a reference to your "bin" folder
After changing the classpath to bin folder, I could get the "Hello World!" dialog.
> Add a breakpoint in one of the source Java classes.
However, the break point of Eclipse did not seem to work.
After changing the classpath to bin folder, I could get the "Hello World!" dialog.
> Add a breakpoint in one of the source Java classes.
However, the break point of Eclipse did not seem to work.
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Re: Extension debugging with Eclipse
Hi,
Regards,
Radu
Not sure about this one, Oxygen loads these extensions in a separate class loader, maybe this breaks Eclipse's ability to know in which class the breakpoint is.However, the break point of Eclipse did not seem to work.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Extension debugging with Eclipse
> Oxygen loads these extensions in a separate class loader, maybe this breaks Eclipse's ability to know in which class the breakpoint is.
Thank you, I got it!
Thank you, I got it!
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service