You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Ben Short <be...@benshort.co.uk> on 2010/01/28 11:08:25 UTC

ESP and IntelliJ Idea

Hi,

Does anyone know if there is a way to get Idea to auto complete when editing
esp scripts?

Regards

Ben Short

Re: ESP and IntelliJ Idea

Posted by Ben Short <be...@benshort.co.uk>.
Thanks for the response.

2010/1/28 Vidar Ramdal <vi...@idium.no>

> On Thu, Jan 28, 2010 at 11:08 AM, Ben Short <be...@benshort.co.uk> wrote:
>
> > Does anyone know if there is a way to get Idea to auto complete when
> editing
> > esp scripts?
>
> You can get autocompletion for either the Javascript parts OR the HTML
> parts of your ESP, but not both at the same time. You need to set IDEA
> to recognize .esp files as either javascript or HTML (Settings -> File
> types) for this to work.
> And autocomplete works only (AFAIK) for the core javascript functions,
> not the Sling-specific objects.
>
> If we had an XML compliant ESP dialect, IDEA could recognize both HTML
> and Javascript in the same file, and do autocomplete and code
> highlighting on both (there's an IDEA plugin for recognizing other
> languages inside XML files). There's an issue filed for that:
> https://issues.apache.org/jira/browse/SLING-912
>
> --
> Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
> Sommerrogata 13-15, N-0255 Oslo, Norway
> + 47 22 00 84 00 / +47 21 531941, ext 2070
>

Re: ESP and IntelliJ Idea

Posted by Vidar Ramdal <vi...@idium.no>.
On Thu, Jan 28, 2010 at 11:08 AM, Ben Short <be...@benshort.co.uk> wrote:

> Does anyone know if there is a way to get Idea to auto complete when editing
> esp scripts?

You can get autocompletion for either the Javascript parts OR the HTML
parts of your ESP, but not both at the same time. You need to set IDEA
to recognize .esp files as either javascript or HTML (Settings -> File
types) for this to work.
And autocomplete works only (AFAIK) for the core javascript functions,
not the Sling-specific objects.

If we had an XML compliant ESP dialect, IDEA could recognize both HTML
and Javascript in the same file, and do autocomplete and code
highlighting on both (there's an IDEA plugin for recognizing other
languages inside XML files). There's an issue filed for that:
https://issues.apache.org/jira/browse/SLING-912

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070