[oXygen-sdk] Enhancement request for AttributeEditingContextDescription

Oxygen XML Editor Support support at oxygenxml.com
Mon Jan 6 06:02:37 CST 2014


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 at 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 at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>



More information about the oXygen-sdk mailing list