JSDT extending indexer [message #916599] |
Wed, 19 September 2012 08:09 |
László Jánszky Messages: 4 Registered: September 2012 |
Junior Member |
|
|
Hi!
I think lots of developers have a problem with the jsdt code assist:
The class definition and the inheritance working only this way:
var Ancestor = function (){};
Ancestor.prototype.x = function (a){};
var Descendant = new Ancestor();
Descendant.prototype.y = function (b){};
and we creating classes this way:
my custom lib
var Ancestor = Function.create({
constructor: function (){},
x: function (a){}
});
var Descendant = Ancestor.extend({
y: function (b){}
});
mootools
var Ancestor = new Class({
initialize: function (){},
x: function (a){}
});
var Descendant = new Class({
Extends: Ancestor,
y: function (b){}
});
extjs
var Ancestor = Ext.extend(Object, {
constructor: function (){},
x: function (a){}
});
var Descendant = Ext.extend(Ancestor, {
y: function (b){}
});
prototype.js
var Ancestor = Class.create({
initialize: function (){},
x: function (a){}
});
var Descendant = Class.create(Ancestor, {
y: function (b){}
});
etc...
So everything is solved by class definition and inheritance, it works well, but we cannot use it because the InferEngine does not notice the patterns above...
I'm on creating a plugin which will be easy extendable with custom patterns, but I don't know which is the easiest way to make it. I mean there are too many options, for example: decorating the InferEngine or making a custom InferEngine and use both engines parallel or maybe the InferEngine has a plugable interface, so I can add these pattern without extending it (havent seen the code yet), etc...
What do you suggest?
The situation is more complicated because this text is by several classes in the documentation found here:
pic.dhe.ibm.com/infocenter/ratdevz/v7r5/index.jsp?topic=%2Forg.eclipse.wst.jsdt.doc%2Fhtml%2Fapi_reference%2Forg%2Feclipse%2Fwst%2Fjsdt%2Fweb%2Fcore%2Fjavascript%2Fsearch%2Fpackage-summary.html
Quote:Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability.
So I guess if I make a plugin it won't work by the next release... :S Is it possible to commit my changes on the InferEngine if you are satisfied with the code?
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04006 seconds