I tried a few things but couldn't reproduce.
Any chance you can make a minimal project showing the issue ?
Sure. I've created a very simple example at papegaaij/source-lookup · GitHub
Import this project into eclipse 4.4 with JBoss Tools Source Lookup 1.6 CR1. Create a server for Wildfly 8.1.0.Final and start it in debug mode. Add a breakpoint to the doGet method in the servlet and run the test.
If you need more information, please let me know. With this very simple testcase, I'm able to reproduce it every time.
You also have to start your test in the debug mode. Could you write any classes for which you can't find source code?
Running the test in debug mode makes no difference. The class eclipse can't find the source for, is the servlet itself. Eclipse can't find the source for all classes deployed in WildFly. It does find the source for the code running in the client.
Try to deploy your project to the server.
That's what I described as a workaround. When the application is deployed to the server, the source is found. However, our testcases deploy major parts of our application, and some of the resources conflict if deployed twice. So, it's not an option to have the application deployed while running the tests. Deploying the application and stopping it, frees the resources, keeping the source lookup working, but it's a very cumbersome way of working.
Also, this way, classes that are not on the classpath of the client side of testcase nor part of the application, but are deployed on the server, still have no source. My showcase does not have such classes because it complicates the code quite a lot.
Ok, it seems the Java Project Source Container does help. After restarting the testcase, the source is found for my simple example. Will this be part of JBoss Tools any time soon? And will JBoss Tools perform any form of auto configuration for this (like you can do with JBoss Source Lookup)?
-- previous post, I'm unable to reply for some reason
The linked issue does seem similar to what I described, but the 'JBoss Java Project Source Container' does not help. The source is still not found, as you can see in this screenshot:
My source lookup is:
https://issues.jboss.org/browse/JBIDE-13852 hasn't been fixed yet. You have added a container that finds source within an application server.
I have fixed JBIDE-13852 in the old Arquillian code (https://github.com/snjeza/arquillian-eclipse/commit/ed5df4a5406d39d53ebc142d3f4b8a6aff0381b9), but the fix hasn't been moved to JBT/JBDS.
So the plugin on the update site linked in the ticket is not yet functional? Because I did get a new source container and it also seems to help with resolving the source.
> So the plugin on the update site linked in the ticket is not yet functional?
There is only one source container related to debugging tests - JBoss Maven Source Container.
The "JBoss Java Project Source Container", described in JBIDE-13852, hasn't been implemented yet.
> Because I did get a new source container and it also seems to help with resolving the source.
I suppose, you have deployed the project or Eclipse/JVM uses some cached artifacts.
JBoss Maven Source Container you have added, finds only classes placed in the AS's JVM and doesn't fix the issue you have described.
But the update site you linked in the issue (http://snjeza.github.com/jbosstools-central) does give me the 'JBoss Java Project Source Container' (see screenshot below). Is this a stub implementation? Anyway, I've voted for the issue, because it does describe what we need. Hopefully this can be added to JBoss tools soon.
I have created an example of JBoss Java Project Source Container that hasn't been included in JBT yet.
You can use it as a workaround for now.