This sandbox folder contains the idea to highlight ECMAScripvt 6 code inside JSDT Editor. See #310
To highlight ES6 inside JSDT Editor :
- import org.eclipse.wst.jsdt.ui which is the JSDT UI project that I have modified :
** JSDT UI provides IJavaScanner and IJavaScannerFactory ** the SCANNER is the manager of scanner (should be replaced with an extension point!). It i sused in JavaScriptSourceViewerConfiguration#initializeScanners to get the well Java code scanner (it implements IJavaScannerFactory). By default it uses the existinh JSDT JavaCodeScanner.
-
import tern.eclipse.ide.jsdt.ui.editor which implements IJavaScannerFactory with tern/acorn.
-
your MUST SELECT highlight tern project in your tern modules!!! Open your JSDT Editor and it should highlight JS code (color are hard coded).