Skip to main content
Level 4
Jan 13, 2016 10:14 AM UTC
Solved

Use-API Java logic next to the Sightly template - debug and IDE support

Hi guys,

I want to implement a Use-API Java logic next to the Sightly template of my AEM component. Do you know if it is possible to debug the Java code and make Eclipse recognize the class as a Java class in order to have IDE auto completion, highlighting, etc. ?

Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
edubey
edubeyAccepted solution
Level 10
Jan 13, 2016 10:42 AM UTC

5 replies

edubey
edubeyAccepted solution
Level 10
Jan 13, 2016 10:42 AM UTC

Yes, eclipse will work fine for java, see below

For sightly files, you can use Sightly extension in bracket IDE: https://docs.adobe.com/docs/en/dev-tools/aem-brackets.html

Take a look at examples here: 

http://adobeaemclub.com/implementing-use-interface-using-sightly-in-aem-6-x/

http://adobeaemclub.com/access-osgi-ser%c2%advice-from-the-wcmuse-class-in-sightly/

Translate
Feike_Visser1
Adobe Employee
Adobe Employee
Jan 13, 2016 12:45 PM UTC

You have to start aem like java -jar <aem-jar> -debug <debug port>

Translate
boser87Author
Level 4
Jan 14, 2016 10:17 AM UTC

Maybe I had to add one detail.

My Java class is inside the content package (not inside the osgi bundle!) next to the Sightly template. Do I have to configure in any specific way Eclipse in order to debug that Java class and make Eclipse recognize it as a Java class?

Thank you

Translate
boser87Author
Level 4
Jan 19, 2016 2:06 PM UTC

Do you have any idea about this?

Developing Java logic inside Java Use API next to Sightly template is definitely inconvenient.

Translate
edubey
Level 10
Jan 19, 2016 2:42 PM UTC

Hi,

Did you tried this with Sightly extension in bracket IDE: https://docs.adobe.com/docs/en/dev-tools/aem-brackets.html

Translate