Tuesday 18 March 2014

APEX 5 first peek - Syntax Highlighting

We're programmers and we need syntax highlighting.

Unfortunately the only way so far to accomplish this in APEX is to use the ApexLib developer addon.
Highlighting <= 4.2 using ApexLib
As promised since the original SOD Oracle APEX 5 has promised to deliver native syntax highlighting and they've done a decent looking job.

Places such as page template body will have HTML highlighting, although it's not widespread through the template editors - I wonder if that's just a EA thing and we will see it more prelevant come final release?
(my feedback on this has been 'acknowledged')
Page template body editor
In the nifty new page designer there is a mono-spaced text editor in the property editor. This should be sufficient to define calls to PL/SQL packages anyway... since people don't put massive amounts of PL/SQL within APEX, do they?
Property editor
You can press the first button (arrow pointing to window) to open the relevant code in a cool dialog window. If there are any validation errors we get shown a lovely yellow inline error.
modal window code editing
Modal window code editing

Or you can press the second button (two arrows pointing away from each other) to edit the relevant text in the "Text Editor" pane in the middle of the screen.
Edit code in Text Editor pane
This works well for PL/SQL and SQL content. It even synchronises between editors, though you may experience a slight lag depending on your connection (I live in Australia, so this can be quite bad...)

APEX developers note: there are maintenance & performance reasons why you shouldn't have too much code within these attributes - but there are times & places where this will be really useful.

It's a nice to have, it's a really nice to have - and it appears to have been done well. Thanks APEX team.


No comments: