xspec @select color coding

Are you missing a feature? Request its implementation here.
whyme
Posts: 89
Joined: Fri Mar 08, 2013 8:58 am

xspec @select color coding

Post by whyme »

A nice feature would be to have color coding for xspec @select. It took me the longest time to diagnose an error, only because I thought (due partly to the color) that

Code: Select all

"sample string"
was the correct syntax for a string, when it should have been

Code: Select all

"'sample string'"
.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: xspec @select color coding

Post by adrian »

Hello,

We provide syntax highlight for XPath in XSLT, but XSpec is treated as XML with a schema and doesn't have this feature.
Could you please provide an XSpec snippet with the context where you use this?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
whyme
Posts: 89
Joined: Fri Mar 08, 2013 8:58 am

Re: xspec @select color coding

Post by whyme »

Here's a sample. You'll see that color coding would be nice not just for a string, but for variables.

Code: Select all


   <x:scenario label="Scenario for testing function matches">
<x:call function="tan:matches">
<x:param name="input" select="$regex-greek"/>
<x:param name="pattern" select="'abcθ'"/>
</x:call>
<x:expect label="true" select="true()"/>
</x:scenario>
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: xspec @select color coding

Post by adrian »

Hi,

What you're showing me already works since v19.0, when the specialized XSPEC editor was introduced.
There seems to be an issue with the internal file association for .xspec. Oxygen did not have a specialized editor prior to v19.0, so .xspec was associated with the XML Editor. After upgrading from v18.1 (or older) to v19.0, if you already have made changes in the list of associations, the old associations remain, so you're still stuck editing XSPEC in XML mode.
Go to Options > Preferences, File Types and check your xspec file association. If it's XML Editor, edit it and set it to "XSPEC Editor" (or press Restore Defaults in the option pane, if you don't care about the rest of the associations).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply