Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Javascript Editor wrong string recognition with Reactjs syntax

Tags:

eclipse

When I write jsx in following format in default Javascript Editor, slash and grater than signs are interpreted as string. And when I press enter at the end Eclipse automatically adds " + "

I am using Eclipse 4.3.0.

How to fix this?

Eclipse string problem

like image 373
codez Avatar asked Dec 07 '25 09:12

codez


2 Answers

Disclaimer I'm the author of typescript.java

I suggest you that you install typescript.java 1.1.0 which provides a JSX support inside Eclipse. It provides a JSX Editor with syntax coloration for JSX (and JavaScript):

JSX Editor

Validation, Hyperlink, Hover, Completion is done by using TypeScript tsserver:

JSX Validation

like image 199
Angelo Avatar answered Dec 09 '25 22:12

Angelo


It seems like there is not yet eclipse plug-ins to properly handle JSX syntax in eclipse.

There are plenty other IDEs that does support JSX:

  • Sublime Text

  • Webstorm

  • Vim

  • Atom

  • IntelliJ IDEA

like image 44
sahlouls Avatar answered Dec 09 '25 23:12

sahlouls