Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Eclipse Web Tools Platform Project (WTP) » IJavaScriptUnit for plugin development(Global Scoped is missing in newer eclipse which block create correct autocomplete)
IJavaScriptUnit for plugin development [message #1838162] Wed, 17 February 2021 21:26 Go to next message
Guy Goldwasser is currently offline Guy GoldwasserFriend
Messages: 2
Registered: February 2021
Junior Member
B"H
Hi,
I have an old plugin that buildup of JS content fail since any version after mars2.
The basic problem is that no IType is recognized, so nothing get to build properly.

The JS code need not only for autocomplete but also to linked to from reference that exist in xml files.
I'm attach the code that use to work.
will be glad for any idea how I can make this code works again.
currently the top-level type array is simply empty
Thanks

private void fillCache(IJavaScriptUnit parent, String typeName,
Map<String, List<IMember>> cache) throws JavaScriptModelException {
IType type = parent.getType(typeName);
if (type != null && type.exists()) {
List<IMember> members = new ArrayList<IMember>();
cache.put(type.getFullyQualifiedName(), members);
IJavaScriptElement[] children = type.getChildren();
for (IJavaScriptElement scriptElement : children) {
if (!(scriptElement instanceof IMember)) {
continue;
}org.eclipse.wst.jsdt.core.
IMember member = (IMember) scriptElement;
if (!Flags.isStatic(member.getFlags())) {
if (member instanceof IFunction) {
if (!((IFunction) member).isConstructor()) {
members.add(member);
}
} else if (member instanceof IField) {
members.add(member);
fillCache(parent,
JSUtils.extractSignatureInfo(((IField) member)
.getTypeSignature()), cache);
}
}
}
}
}
Re: IJavaScriptUnit for plugin development [message #1838163 is a reply to message #1838162] Wed, 17 February 2021 22:31 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

JSDT was significantly changed with a new team after Mars.2, and after a series of reboots and incomplete technology
changes (which you seem to have run into), replaced with Wild Web Developer. You'd have to ask them for a replacement
API as JSDT is in maintenance mode and its UI significantly scaled back as a result.


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Jakarta EE and javax.servlet
Next Topic:Is there a way to overwrite the Runtime Enviroment behavior in Eclipse Server Overview?
Goto Forum:
  


Current Time: Thu Apr 25 09:31:02 GMT 2024

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

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

Back to the top