How in Oxygen Author Applet I can check up insertion possibility xref in a current node?
Whether after an insertion xref probably to change behavior at pushing the link?
Oxygen Author Applet. Xref insertion
Re: Oxygen Author Applet. Xref insertion
Hi,
So you have two questions:
A CIElement contains information about the possible name and namespace (+ other info) of an element which would be allowed in the context.
This callback received when a user clicks a link sets as a behavior opening the URL in the same component but you can take a different approach for the received URL, possibly create another AuthorComponentProvider from the factory and use a JTabbedPane to handle multiple components in the same applet.
If this does not answer your questions maybe you should provide more details about your user case.
Regards,
Radu
So you have two questions:
You could use code like this:How in Oxygen Author Applet I can check up insertion possibility xref in a current node?
Code: Select all
AuthorSchemaManager schemaManager = authorAccess.getDocumentController().getAuthorSchemaManager();
WhatElementsCanGoHereContext wecgh = schemaManager.createWhatElementsCanGoHereContext(authorAccess.getEditorAccess().getCaretOffset());
List<CIElement> possibleChildrenElements = schemaManager.getChildrenElements(wecgh);
In the ro.sync.ecss.samples.AuthorComponentSample there is some code like:Whether after an insertion xref probably to change behavior at pushing the link?
Code: Select all
//Open a clicked link in the same component
factory.setOpenURLHandler.....
If this does not answer your questions maybe you should provide more details about your user case.
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
Re: Oxygen Author Applet. Xref insertion
About the second question. It is necessary that the special window (selector) opened at pushing on xref links where I can specify other object to change the link. The window is ready already, it is necessary to call only it on xref link pushing. How it to make?
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Re: Oxygen Author Applet. Xref insertion
I'm understand already. Thanks
-
- Posts: 35
- Joined: Fri Nov 11, 2011 10:34 am
Re: Oxygen Author Applet. Xref insertion
Code: Select all
// Open a clicked link in the same component
factory.setOpenURLHandler(new OpenURLHandler() {
public void handleOpenURL (URL arg0) throws IOException {
arg0 contains (FF8)
"file:/C:/Program%20Files%20(x86)/Reference/reference_Some_section.dita".
arg0 contains (IE8) "file:/C:/Documents%20and%20Settings/ga/Reference/reference_Some_section.dita"
Oxygen changed href when puts in URL. Need href. Needed to keep its value. It's possible?
Re: Oxygen Author Applet. Xref insertion
Hello Maxim,
Oxygen makes an absolute URL from the relative location by looking at the URL of the current edited resource.
The URL of the current edited resource is usually set on this API method:
ro.sync.ecss.extensions.api.component.AuthorComponentProvider.load(URL, Reader)
So you need to set a relevant URL for the current resource which is edited in the Author Component, this will also help you identify the target of the link.
Regards,
Radu
Oxygen makes an absolute URL from the relative location by looking at the URL of the current edited resource.
The URL of the current edited resource is usually set on this API method:
ro.sync.ecss.extensions.api.component.AuthorComponentProvider.load(URL, Reader)
So you need to set a relevant URL for the current resource which is edited in the Author Component, this will also help you identify the target of the link.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com