Search code examples
javascripteclipseprototypeeclipse-neon

Javascript Outline in Eclipse Neon - Java EE IDE


I've just updated my Eclipse from Mars to Neon. The Outline content for js files is now broken : it does not display my object class members but only class names. This is the way I'm declaring my "objects" :

function ClappingOption(){
'use strict';

if(ClappingOption.initialized === undefined) {

ClappingOption.prototype.setHtml = function (jqSelector) {
    console.log('hello');
});

ClappingOption.initialized=true;
}

}

Is there an option/plug-in to activate outline for this style of coding? or should I rewrite my code ?

EDIT1 : I could add support of this style with Webclipse. But no more with th CodeMix paying update ;-( that broke again the outlook.

EDIT2 : with later release like Eclipse 2019-06 Javascript and Web developper the support is back.


Solution

  • In Neon the JavaScript tooling was almost created from scratch again. I assume the broken Outline view for ES5 will be fixed in an upcoming version. Currently, if you use ES6 (ECMAScript 2015) the Outline view will work as expected:

    'use strict';
    class ClappingOption {
      setHtml(jqSelector) {
        console.log('hello');
      };
    }