[oXygen-sdk] Enhancement request for AttributeEditingContextDescription

Jan Bevers jbevers at sdl.com
Tue Jan 7 02:59:44 CST 2014


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 at oxygenxml.com [mailto:oxygen-sdk-bounces at oxygenxml.com] On Behalf Of Oxygen XML Editor Support
Sent: maandag 6 januari 2014 13:03
To: oxygen-sdk at 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 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
>
_______________________________________________
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