Skip to main content



      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 16:26 Go to next message
Eclipse UserFriend
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 17:31 Go to previous message
Eclipse UserFriend
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.
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: Wed Jul 02 02:31:00 EDT 2025

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

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

Back to the top