Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSDT extending indexer(How to extend the jsdt indexer with special cases.)
JSDT extending indexer [message #916599] Wed, 19 September 2012 08:09 Go to next message
László Jánszky is currently offline László JánszkyFriend
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?
Re: JSDT extending indexer [message #916779 is a reply to message #916599] Wed, 19 September 2012 12:59 Go to previous messageGo to next message
László Jánszky is currently offline László JánszkyFriend
Messages: 4
Registered: September 2012
Junior Member
I watched around and found that the real problem is, that there is no complete support of JSDOC 3 in the JSDT.

css.dzone.com/articles/introduction-jsdoc
Here is a tutorial of jsdoc, and @lends, @extends, @constructs are not supported yet...
Re: JSDT extending indexer [message #917082 is a reply to message #916599] Wed, 19 September 2012 20:00 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Quote:
Is it possible to commit my changes on the InferEngine if you are satisfied with the code?

I'd be a fool to say no to high quality patches that adhere to our vendor neutrality Smile


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: JSDT extending indexer [message #917933 is a reply to message #917082] Thu, 20 September 2012 15:19 Go to previous messageGo to next message
László Jánszky is currently offline László JánszkyFriend
Messages: 4
Registered: September 2012
Junior Member
Okay. I have a project now for about 1 month, after that I'll contact you.
Re: JSDT extending indexer [message #918082 is a reply to message #917933] Thu, 20 September 2012 18:21 Go to previous messageGo to next message
sNop is currently offline sNopFriend
Messages: 281
Registered: July 2009
Senior Member
Great, this are really good news, jsdt ca isn't good enough, compare to the other editors

On 20. 9. 2012 17:19, László Jánszky wrote:
> Okay. I have a project now for about 1 month, after that I'll contact you.
Re: JSDT extending indexer [message #918117 is a reply to message #918082] Thu, 20 September 2012 19:06 Go to previous message
László Jánszky is currently offline László JánszkyFriend
Messages: 4
Registered: September 2012
Junior Member
Quote:
Great, this are really good news, jsdt ca isn't good enough, compare to the other editors

I don't think so. Only Jetbrains products (for example: WebStorm) are better, they support jsDoc 3, but they are not freeware. Aptana is similar, NetBeans weaker...
Previous Topic:WSDL error? XSD: The location has not been resolved
Next Topic:The User Operation is waiting for background work to complete
Goto Forum:
  


Current Time: Sat Apr 20 02:53:31 GMT 2024

Powered by FUDForum. Page generated in 0.03908 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top