| Summary: | Illegal Argument Exception on hover in user library | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Scott Kellicker <s.kellicker> | ||||||
| Component: | General | Assignee: | Chris Jaun <cmjaun> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cmjaun | ||||||
| Version: | unspecified | Flags: | thatnitind:
review+
|
||||||
| Target Milestone: | 3.2.3 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Scott Kellicker
Created attachment 178219 [details]
user library
Comment on attachment 178219 [details]
user library
The @param says 'a' instead of 'obj'. Same crash even if changed to 'obj'.
The problem seems to be in JavaScriptElements.getMethodLabel() when the resolvedKey seems to get incorrectly translated to resolvedSig:
public static void getMethodLabel(IFunction method, long flags, StringBuffer buf) {
try {
BindingKey resolvedKey= getFlag(flags, USE_RESOLVED) && method.isResolved() ? new BindingKey(method.getKey()) : null;
String resolvedSig= (resolvedKey != null) ? resolvedKey.toSignature() : null;
. . .
}
resolvedKey is "X/moo/WebContent/mootools-1.2.4-core-nc.js;.$random(AA)A"
resolvedSig is ";".
BTW,
I've observed this with mootools 1.2.4 core.js as well.
Add mootools1.2.4-core.js to WebContext.
Create test.js
Add $random(1,5). Hover over random. Same result.
Created attachment 178982 [details]
patch
Removed some closure/wildcare stuff from the BindingKeyParser.
I tested with top of tree + patch. Works great-- No NPE and even a hover. Nice. Checked into HEAD and maintenance. |