[jboss-user] [JBoss Tools] - JBoss Source Lookup Plugin Notes

Snjezana Peco do-not-reply at jboss.com
Tue Jan 31 17:09:48 EST 2012


Snjezana Peco [https://community.jboss.org/people/snjeza] created the document:

"JBoss Source Lookup Plugin Notes"

To view the document, visit: https://community.jboss.org/docs/DOC-17529

--------------------------------------------------------------
When debugging some Java application (JBoss AS server, for instance), one of the following three cases can happen: 

* *Eclipse finds a source file* 


 This happens when Eclipse finds an archive containing source attachments. 
 The JBoss Source Lookup plugin doesn't work anything in this case. 


*  *Eclipse can't find any source, but can find the archive in which a class file is placed*


The editor action from the JBoss Lookup Source plugin tries to find a source file as follows:

The JBoss Source Container (getJars) isn't active in any of these cases. 

This happens if a class file is placed in the classpath of the launch configuration   (within the Server Runtime classpath included in the project's classpath, for instance). 

** using the m2e API
** using the archive's metadata
** using a Nexus indexer (the sha1 query) 

           A user can disable/enable, add/remove,  change Nexus repositories using the JBoss Source Lookup preferences.


* *Eclipse can't find any archive containing a class file* 


This happens if a class file is placed in an archive that is not in the classpath of the launch configuration. 


As to JBoss AS, that can be an archive that is not included in a JBoss AS Runtime Container  or 
if a JBoss AS Runtime Container isn't included in the project's classpath  (it is often that JBoss AS Runtime Container  isn't included in a maven project). 

The JBoss Source Container (getJars) is active in this case only.
*
*
 It scans JBoss AS home directory (or some other directory that a user enters when debugging Glassfish, Tomcat, running a Java Application, a JUnit test ...), 
finds all archives (a file with *.jar suffix) and tries to find a class in some of those jars.  If it finds the class in an archive, 
the JBoss Source Lookup plugin tries to find the archive's source in the way described above. 

getJars() will be called only if there isn't any other way  to find binary file in which the class file is. 
For one source container, getJar() will be called only once during a debug session. The archive list within a source container is cached. 

For more details, see  https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-lookup JBoss Source Lookup.
--------------------------------------------------------------

Comment by going to Community
[https://community.jboss.org/docs/DOC-17529]

Create a new document in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120131/6bab770b/attachment-0001.html 


More information about the jboss-user mailing list