On 01/11/2013 09:09 AM, Philippe Nobili wrote:
On a completely different subject, some time ago we had this exchange
regarding default view settings (programmatically):
>
> 2. We have two different views for editing the content of our files,
> depending on the presence of some elements within the file, it's better
> to use one or another. Is there a way to automatic select the default
> views depending on the file's content ?
Yes, but you'll have to write an OpenedDocumentHook in Java for that:
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/kit/OpenedDocumentHook.html
How to setup and use OpenDocumentHook classes is very clear (we have
actually already done this for other addons), but we could not find
information on what methods we should call on our OpenedDocument
instance to meet out needs (that is: set the views to be used by default
by the editor).
Could you give us some hints on this ?
Many thanks again for your very effective support.
This level of support (programming the API of XXE) is offered just 3
months after the date of purchase.
See http://www.xmlmind.com/xmleditor/support.html.
Therefore I'm sorry but I cannot really answer your question. (Please
understand that correctly answering the above question --that is,
actually implementing a prototype of the feature you need-- would take
me at least 2 hours of work.)
However, in case this helps you deciding whether its worth investing
more time in this feature, it seems that:
1) It should not be too difficult selecting a given CSS depending on the
content of the document being opened (or created).
2) Programmatically configuring multiple views (i.e. multiple CSS and a
specific window layout) for the document being opened seems to be quite
difficult, if possible at all.
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support