listener to any change in content
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
listener to any change in content
Post by maxim.kovalev »
Is there a listener for any changes in the content of the document except:
This listener, I must call my desired method in each of the methods of the listener. For example, in attributeChanged,authorNodeNameChanged, contentInserted, contentDeleted.
A listener which operates by any change in content (xml)?
Code: Select all
authorAccess.getDocumentController().addAuthorListener(new AuthorListener() {
@Override
public void documentChanged (AuthorDocument arg0, AuthorDocument arg1) {
}
@Override
public void doctypeChanged () {
}
@Override
public void contentInserted (DocumentContentInsertedEvent arg0) {
}
@Override
public void contentDeleted (DocumentContentDeletedEvent arg0) {
}
@Override
public void beforeDoctypeChange () {
}
@Override
public void beforeContentInsert (DocumentContentInsertedEvent arg0) {
}
@Override
public void beforeContentDelete (DocumentContentDeletedEvent arg0) {
}
@Override
public void beforeAuthorNodeStructureChange (AuthorNode arg0) {
}
@Override
public void beforeAuthorNodeNameChange (AuthorNode arg0) {
}
@Override
public void beforeAttributeChange (AttributeChangedEvent arg0) {
}
@Override
public void authorNodeStructureChanged (AuthorNode arg0) {
}
@Override
public void authorNodeNameChanged (AuthorNode arg0) {
}
@Override
public void attributeChanged (AttributeChangedEvent arg0) {
}
});
A listener which operates by any change in content (xml)?
-
- Posts: 9448
- Joined: Fri Jul 09, 2004 5:18 pm
Re: listener to any change in content
Hi Maxim,
I do not quite understand your use case and why the listener that you mentioned is not suitable for you.
Another option would be to add an ro.sync.ecss.extensions.api.AuthorDocumentFilter using the method:
Such a filter receives callbacks from the Author code before any operation is performed and it can decide to do something different instead of performing the default action.
Another approach is in the ExtensionsBundle to create an implementation of:
You can see the ro.sync.ecss.extensions.dita.DITAExtensionsBundle Java code to see how such an implementation works.
Regards,
Radu
I do not quite understand your use case and why the listener that you mentioned is not suitable for you.
Another option would be to add an ro.sync.ecss.extensions.api.AuthorDocumentFilter using the method:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.setDocumentFilter(AuthorDocumentFilter)
Another approach is in the ExtensionsBundle to create an implementation of:
Code: Select all
ro.sync.ecss.extensions.api.ExtensionsBundle.getAuthorSchemaAwareEditingHandler()
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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