-
15. Re: JBoss tools does not put impl classes on classpath for AS7
rob.stryker May 24, 2012 4:39 AM (in response to maxandersen)I immediately thought of that hack as well. Can look into it.
-
16. Re: JBoss tools does not put impl classes on classpath for AS7
henk53 May 27, 2012 3:18 PM (in response to maxandersen)Max Rydahl Andersen wrote:
I just realized there actually is a way to add non-classpath entries to the java search - PDE does this, so we should be able too also.
I've opened jira on https://issues.jboss.org/browse/JBIDE-11970 but this will not happen before next dev cycle.
thanks for persisting and making me remember this possible hack
You're welcome
Overall the source lookup already does work amazingly good, so thanks again to Snjezana.
There is in practice one other thing though that could be improved; when debugging it now correctly finds the source of the entries in the stack shown by the Debug view, as well when I click on an entry in a printed stack trace in the console.
However, when from this source I ctrl-click on anything, the editor doesn't find the source or seems to be confused (offering me choices of similarly named classes in totally different packages). It also can't find the source from any of the JBoss runtime jars that actually are on the classpath; it will just display the "class file editor" then with the Attach Source... button. This will even happen if I have the source right on my screen after I reached the exact same class via the debugger.
Obviously this is due to the (in)famous difference between the source lookup for classes known to the debugger, and the source attachment for classes known to the editor.
Would the "PDE method" be able to intercept the source attachment for these as well? (e.g. for jars like jboss-servlet-api_3.0_spec-1.0.0.Final.jar, which are by default on the class path)
-
17. Re: JBoss tools does not put impl classes on classpath for AS7
maxandersen May 29, 2012 7:01 AM (in response to henk53)No, the PDE method is for general search/lookup.
Source for classes on your classpath (since they must be on your classpath) is configured by your classpath.
Thus that case still needs special handling.
-
18. Re: JBoss tools does not put impl classes on classpath for AS7
snjeza May 29, 2012 5:28 PM (in response to maxandersen)PDE adds plugins to the Java Search engine so that it creates a special java project (External Plug-in Libraries) containing a separate classpath container (ExternalJavaSearchClasspathContainer) that includes classes from those plugins that are defined by the user or plugins from the target platform. The project isn't visible in the Package Explorer by default.
We could use a similar technique. I suppose, it wouldn't be so difficult to add the Ctrl+Shift+T (Open Type) functionality to the Source Lookup plugin.