<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBoss Source Lookup Plugin Notes
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/snjeza">Snjezana Peco</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/docs/DOC-17529">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>When debugging some Java application (JBoss AS server, for instance), one of the following three cases can happen: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li><strong>Eclipse finds a source file </strong></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> This happens when Eclipse finds an archive containing source attachments. </p><p> The JBoss Source Lookup plugin doesn't work anything in this case. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li> <strong>Eclipse can't find any source, but can find the archive in which a class file is placed</strong></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The editor action from the JBoss Lookup Source plugin tries to find a source file as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The JBoss Source Container (getJars) isn't active in any of these cases. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This happens if a class file is placed in the classpath of the launch configuration&#160;&#160; (within the Server Runtime classpath included in the project's classpath, for instance). </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><ul><li>using the m2e API</li><li>using the archive's metadata</li><li>using a Nexus indexer (the sha1 query) </li></ul></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; A user can disable/enable, add/remove,&#160; change Nexus repositories using the JBoss Source Lookup preferences.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li><strong>Eclipse can't find any archive containing a class file </strong></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This happens if a class file is placed in an archive that is not in the classpath of the launch configuration. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As to JBoss AS, that can be an archive that is not included in a JBoss AS Runtime Container&#160; or </p><p>if a JBoss AS Runtime Container isn't included in the project's classpath&#160; (it is often that JBoss AS Runtime Container&#160; isn't included in a maven project). </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The JBoss Source Container (getJars) is active in this case only.</p><p><strong><br/></strong></p><p> 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 ...), </p><p>finds all archives (a file with *.jar suffix) and tries to find a class in some of those jars.&#160; If it finds the class in an archive, </p><p>the JBoss Source Lookup plugin tries to find the archive's source in the way described above. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>getJars() will be called only if there isn't any other way&#160; to find binary file in which the class file is. </p><p>For one source container, getJar() will be called only once during a debug session. The archive list within a source container is cached. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For more details, see <a class="jive-link-blog-small" href="https://community.jboss.org/community/tools/blog/2012/01/24/jboss-source-lookup">JBoss Source Lookup</a>. </p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-17529">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>