Use-API Java logic next to the Sightly template - debug and IDE support | Community
Skip to main content
Level 4
January 13, 2016
Solved

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

  • January 13, 2016
  • 5 replies
  • 2423 views

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.
Best answer by edubey

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/

5 replies

edubey
edubeyAccepted solution
Level 10
January 13, 2016
Feike_Visser1
Adobe Employee
Adobe Employee
January 13, 2016

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

boser87Author
Level 4
January 14, 2016

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

boser87Author
Level 4
January 19, 2016

Do you have any idea about this?

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

edubey
Level 10
January 19, 2016

Hi,

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