Community
Participate
Working Groups
Build Identifier: Eclipse 3.6 This is manifested the most with jazz web UI code, where usage of anonymous functions is prevalent. As an example, /net.jazz.web.app/resources/internal/AuthenticationInterceptor.js wraps the entire code inside an anonymous function. Using this file as an example, I would expect the global variables declared inside it, such as jazz.app.internal.AuthenticationInterceptor, to be discovered by JSDT. But that doesn't seem to be the case. Reproducible: Always Steps to Reproduce: 1. you can get jazz web UI code by registering at jazz.net and download the most recent SDK driver, such as https://jazz.net/downloads/rational-team-concert/releases/2.0.0.2iFix3/RTC-SDK-2.0.0.2iFix3.zip 2. 3.
I did a little more research. I suspect this is how JSDT supports global variable discovery: 1. when something is declared "in the clear" with a "var" qualifier, it's picked up as a global variable. for instance in a js file I just declare var globalVar = ""; it shows up in the project explorer as a global variable. 2. if instead the same variable was declared without a "var" qualifier, although semantically it's equivalent to #1, JSDT does not discover it. 3. if I'm declaring a global variable "in the clear", I will have the option of always putting "var" in front and life is good. however if I'm doing this inside a function, the only way to declare a global variable is to not put the "var" in front, otherwise it becomes a local variable in the function's scope. In essence, the problem is not so much with anonymous functions, but that global variables declared inside functions are not being discovered.
Pretty sure this is a duplicate of BUG311643. It was a similar problem where global variables were not being discovered. *** This bug has been marked as a duplicate of bug 311643 ***