ui-ace icon indicating copy to clipboard operation
ui-ace copied to clipboard

Syntax validation for Java is not working

Open yogitaAP opened this issue 8 years ago • 7 comments

I am using ace editor in an angular application and I have initialized the editor in Java mode. The syntax highlighting for Java is not working. However, if I change the mode to javascript, it works fine. Why is that so?. Also, I set "$scope.editor.getSession().setUseWorker(true);" explicitly.

Attaching the screenshot for reference. Java code

screen shot 2016-12-05 at 12 08 46 pm

Javascript Code

screen shot 2016-12-05 at 12 06 09 pm

yogitaAP avatar Dec 05 '16 06:12 yogitaAP

same issue in python mode too, is there any other settings to enable the validation

mmohdnowfal avatar Oct 10 '17 08:10 mmohdnowfal

For React only 10 languages have support for syntax validation. Java is not among them. I guess the same is true for Angular.

Pretty much the directories in this repo correspond to the languages that have syntax validation out of the box.

bfaf avatar Apr 16 '18 13:04 bfaf

@yogitaAP Have you tried integrating java syntax checking to ace editor in angular? Any inputs will be useful.

sheshit avatar Dec 20 '19 06:12 sheshit

Hey Sheshit,

Yes, I did integrate JAVA syntax checker. It worked.

On Fri, Dec 20, 2019 at 10:38 AM sheshit karthikeya < [email protected]> wrote:

@yogitaAP https://github.com/yogitaAP Have you tried integrating java syntax checking to ace editor in angular? Any inputs will be useful.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-ace/issues/162?email_source=notifications&email_token=ACKUDXRHWMKF7PDT5D2OQBDQZRR6TA5CNFSM4CYPUWB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMBLYA#issuecomment-567809504, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKUDXS2OJO42JUH4ITUUELQZRR6TANCNFSM4CYPUWBQ .

yogitaAP avatar Dec 20 '19 07:12 yogitaAP

@yogitaAP How did you do it? I have tried adding my custom syntax checker for JAVA in the ace package. But couldn't find a linter file for JAVA. which linter have you used?

sheshit avatar Dec 20 '19 08:12 sheshit

Hey Sheshit,

Did it a long time ago? I think ace has built in methods to put syntax checker on. Try searching it.

On Fri, Dec 20, 2019 at 12:48 PM sheshit karthikeya < [email protected]> wrote:

@yogitaAP https://github.com/yogitaAP How did you do it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-ace/issues/162?email_source=notifications&email_token=ACKUDXQ5QO5KRRMZX5SOHZTQZSBEJA5CNFSM4CYPUWB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHMJ2WY#issuecomment-567844187, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACKUDXX2ROV7J5GVA3J7DGTQZSBEJANCNFSM4CYPUWBQ .

yogitaAP avatar Dec 20 '19 08:12 yogitaAP

No, ace doesn't provide support for JAVA. We need to write our own syntax checker as a web worker. Ok. Thanks Yogita.

sheshit avatar Dec 20 '19 08:12 sheshit