Enhancement request for AttributeEditingContextDescription

Hi Since oXygen 15 it's possible to get the context for the current edited element / attribute from your own custom InputURLChooserCustomizer implementation. In some of our cases it is important to pass the current value of the edited attribute to our own dialogs. If I check the API of the AttributeEditingContextDescription you can only get the element and attribute name. I can stick with the functionality that there is now but it would definitely improve the usability of our integration if the value was also available. Is it possible to add the possibility to get the attribute value to the oXygen backlog? So we can take advantage from this in the next releases. Cheers Jan Bevers | Developer | SDL | Content Management Technologies Division | +32 (0)15 400 970 | jbevers@sdl.com [image001] </pre><font face="arial" size="2" color="#736F6E"> <a href="http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature"> <img src="http://www.sdl.com/Content/themes/common/images/SDL_logo_strapline_GCEM_Emai..." border=0><br><br>www.sdl.com </a><br><br> <font face="arial" size="1" color="#736F6E"> <b>SDL PLC confidential, all rights reserved.</b> If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us.<BR> SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207.<BR> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. </font> This message has been scanned for malware by Websense. www.websense.com

Hi Jan, Adding the:
ro.sync.exml.workspace.api.standalone.AttributeEditingContextDescription.getEditedAttributeValue()
API seems feasible. We'll try to add it in time for Oxygen 15.2 which should be released in a couple of weeks. A possible workaround until then would be to do something like:
WSEditor currentOpeneEditor = PluginWorkspaceProvider.getPluginWorkspace().getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA); if(currentOpeneEditor != null) { WSEditorPage currentPage = currentOpeneEditor.getCurrentPage(); if(currentPage instanceof WSAuthorEditorPage) { //Most probably we are editing the attributes for the node in which the caret is placed. WSAuthorEditorPage authPage = ((WSAuthorEditorPage)currentPage); try { AuthorNode currentEditedNode = authPage.getDocumentController().getNodeAtOffset(authPage.getCaretOffset()); if(currentEditedNode.getType() == AuthorNode.NODE_TYPE_ELEMENT) { AuthorElement elem = (AuthorElement) currentEditedNode; //The current @href attribute value. AttrValue currentHrefValue = elem.getAttribute("href"); } } catch (BadLocationException e) { e.printStackTrace(); } } }
Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 1/6/2014 12:53 PM, Jan Bevers wrote:
Hi
Since oXygen 15 it’s possible to get the context for the current edited element / attribute from your own custom InputURLChooserCustomizer implementation.
In some of our cases it is important to pass the current value of the edited attribute to our own dialogs.
If I check the API of the AttributeEditingContextDescription you can only get the element and attribute name.
I can stick with the functionality that there is now but it would definitely improve the usability of our integration if the value was also available.
Is it possible to add the possibility to get the attribute value to the oXygen backlog? So we can take advantage from this in the next releases.
Cheers
*Jan Bevers |* Developer *|*SDL *| *Content Management Technologies Division *| *+32 (0)15 400 970*|* jbevers@sdl.com image001
www.sdl.com <http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm_campaign=SDL%2BStandard%2BEmail%2BSignature>
*SDL PLC confidential, all rights reserved.* If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
This message has been scanned for malware by Websense. www.websense.com <http://www.websense.com/>
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk

Hi Radu Thanks for the workaround! Another addition would be to get access to other attributes like "scope" and "class" for DITA. For example as an integrator I can show different dialogs based on the current "scope" (external or internal) value of an "xref" element. "class" which is a fixed attribute is used to define what content type an element is holding. For example "glossSymbol", "hazardsymbol" and "image" have "topic/image" as part of their class attribute. It is better to check against this than to check against the element name. Also when making a customization to DITA for a specific customer you can use the same class attribute value which does not require code changes in your oXygen integration. Cheers Jan -----Original Message----- From: oxygen-sdk-bounces@oxygenxml.com [mailto:oxygen-sdk-bounces@oxygenxml.com] On Behalf Of Oxygen XML Editor Support Sent: maandag 6 januari 2014 13:03 To: oxygen-sdk@oxygenxml.com Subject: Re: [oXygen-sdk] Enhancement request for AttributeEditingContextDescription Hi Jan, Adding the:
ro.sync.exml.workspace.api.standalone.AttributeEditingContextDescripti on.getEditedAttributeValue()
API seems feasible. We'll try to add it in time for Oxygen 15.2 which should be released in a couple of weeks. A possible workaround until then would be to do something like:
WSEditor currentOpeneEditor = PluginWorkspaceProvider.getPluginWorkspace().getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA); if(currentOpeneEditor != null) { WSEditorPage currentPage = currentOpeneEditor.getCurrentPage(); if(currentPage instanceof WSAuthorEditorPage) { //Most probably we are editing the attributes for the node in which the caret is placed. WSAuthorEditorPage authPage = ((WSAuthorEditorPage)currentPage); try { AuthorNode currentEditedNode = authPage.getDocumentController().getNodeAtOffset(authPage.getCaretOffset()); if(currentEditedNode.getType() == AuthorNode.NODE_TYPE_ELEMENT) { AuthorElement elem = (AuthorElement) currentEditedNode; //The current @href attribute value. AttrValue currentHrefValue = elem.getAttribute("href"); } } catch (BadLocationException e) { e.printStackTrace(); } } }
Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 1/6/2014 12:53 PM, Jan Bevers wrote:
Hi
Since oXygen 15 it's possible to get the context for the current edited element / attribute from your own custom InputURLChooserCustomizer implementation.
In some of our cases it is important to pass the current value of the edited attribute to our own dialogs.
If I check the API of the AttributeEditingContextDescription you can only get the element and attribute name.
I can stick with the functionality that there is now but it would definitely improve the usability of our integration if the value was also available.
Is it possible to add the possibility to get the attribute value to the oXygen backlog? So we can take advantage from this in the next releases.
Cheers
*Jan Bevers |* Developer *|*SDL *| *Content Management Technologies Division *| *+32 (0)15 400 970*|* jbevers@sdl.com image001
www.sdl.com <http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm _campaign=SDL%2BStandard%2BEmail%2BSignature>
*SDL PLC confidential, all rights reserved.* If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
This message has been scanned for malware by Websense. www.websense.com <http://www.websense.com/>
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk

Hi Jan, Sure, we'll look into how we can increase the API to accommodate this. Probably we could try to come up with some API like:
NodeContext ro.sync.exml.workspace.api.standalone.AttributeEditingContextDescription.getElementContext()
and the NodeContext would have the API methods:
/** * Get the node name. * * @return Returns the node name. */ public abstract String getNodeName();
/** * Get the node namespace. * * @return Returns the node namespace. */ public abstract String getNodeNamespace();
/** * Returns the number of the element attributes. * * @return The number of the element attributes. */ public abstract int getAttributesCount();
/** * Get the qualified attribute name at index. * * @param index Index of the attribute. * @return The qualified attribute name at index. */ public abstract String getAttributeQName(int index);
/** * Get attribute value for given attribute qualified name. * * @param attrQName The qualified attribute name. * @return The attribute value. */ public abstract String getAttributeValue(String attrQName);
/** * Get namespace URI for a given attribute qualified name. * * @param attrQName The attribute qualified name. * @return The attribute namespace URI. */ public abstract String getAttributeNamespace(String attrQName);
Regards, Radu Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com On 1/7/2014 10:59 AM, Jan Bevers wrote:
Hi Radu
Thanks for the workaround!
Another addition would be to get access to other attributes like "scope" and "class" for DITA.
For example as an integrator I can show different dialogs based on the current "scope" (external or internal) value of an "xref" element.
"class" which is a fixed attribute is used to define what content type an element is holding. For example "glossSymbol", "hazardsymbol" and "image" have "topic/image" as part of their class attribute. It is better to check against this than to check against the element name. Also when making a customization to DITA for a specific customer you can use the same class attribute value which does not require code changes in your oXygen integration.
Cheers Jan
-----Original Message----- From: oxygen-sdk-bounces@oxygenxml.com [mailto:oxygen-sdk-bounces@oxygenxml.com] On Behalf Of Oxygen XML Editor Support Sent: maandag 6 januari 2014 13:03 To: oxygen-sdk@oxygenxml.com Subject: Re: [oXygen-sdk] Enhancement request for AttributeEditingContextDescription
Hi Jan,
Adding the:
ro.sync.exml.workspace.api.standalone.AttributeEditingContextDescripti on.getEditedAttributeValue()
API seems feasible. We'll try to add it in time for Oxygen 15.2 which should be released in a couple of weeks.
A possible workaround until then would be to do something like:
WSEditor currentOpeneEditor = PluginWorkspaceProvider.getPluginWorkspace().getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA); if(currentOpeneEditor != null) { WSEditorPage currentPage = currentOpeneEditor.getCurrentPage(); if(currentPage instanceof WSAuthorEditorPage) { //Most probably we are editing the attributes for the node in which the caret is placed. WSAuthorEditorPage authPage = ((WSAuthorEditorPage)currentPage); try { AuthorNode currentEditedNode = authPage.getDocumentController().getNodeAtOffset(authPage.getCaretOffset()); if(currentEditedNode.getType() == AuthorNode.NODE_TYPE_ELEMENT) { AuthorElement elem = (AuthorElement) currentEditedNode; //The current @href attribute value. AttrValue currentHrefValue = elem.getAttribute("href"); } } catch (BadLocationException e) { e.printStackTrace(); } } }
Regards, Radu
Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
On 1/6/2014 12:53 PM, Jan Bevers wrote:
Hi
Since oXygen 15 it's possible to get the context for the current edited element / attribute from your own custom InputURLChooserCustomizer implementation.
In some of our cases it is important to pass the current value of the edited attribute to our own dialogs.
If I check the API of the AttributeEditingContextDescription you can only get the element and attribute name.
I can stick with the functionality that there is now but it would definitely improve the usability of our integration if the value was also available.
Is it possible to add the possibility to get the attribute value to the oXygen backlog? So we can take advantage from this in the next releases.
Cheers
*Jan Bevers |* Developer *|*SDL *| *Content Management Technologies Division *| *+32 (0)15 400 970*|* jbevers@sdl.com image001
www.sdl.com <http://www.sdl.com/?utm_source=Email&utm_medium=Email%2BSignature&utm _campaign=SDL%2BStandard%2BEmail%2BSignature>
*SDL PLC confidential, all rights reserved.* If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK.
This message has been scanned for malware by Websense. www.websense.com <http://www.websense.com/>
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
_______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk _______________________________________________ oXygen-sdk mailing list oXygen-sdk@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
participants (2)
-
Jan Bevers
-
Oxygen XML Editor Support