(Switching to Dev List)<br><br>Hey Rudy,<br><br>Awesome! I figure adding a new set of methods in the JavaSourceFacet would do the trick... something like this:<br><br><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
JavaSourceFacet java = project.getFacet(JavaSourceFacet.class);<br>
<br>
java.visitSources("com.base.package", new JavaSourceVisitor() {...});<br>
java.visitTestSourceTree("com.base.package", new JavaSourceVisitor() {...});<br><br>java.visitSources(new JavaSourceVisitor() {<br> public void visit(VisitContext context, JavaSource source) { <br><br> // to end the visit after this method returns, call this method<br>
</blockquote><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"> context.visitComplete();<br><br> }<br>} );<br><br>
java.visitTestSources(new JavaSourceVisitor() {<br>
public void visit(VisitContext context, JavaSource source) {<br>
context.visitComplete();<br>
}<br>
} );<br></blockquote>
<br>Thoughts?<br>~Lincoln<br><br><br><br><div class="gmail_quote">On Wed, Feb 1, 2012 at 7:21 AM, Rudy De Busscher <span dir="ltr"><<a href="mailto:rdebusscher@gmail.com">rdebusscher@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'll have try<span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Rudy</font></span><div>
<div class="h5"><br><br><div class="gmail_quote">On 31 January 2012 19:01, Lincoln Baxter, III <span dir="ltr"><<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rudy,<br><br>Source scanning is on the list of things to implement in the JavaSourceFacet, but unfortunately we don't have it yet. Actually, we could use some help with this feature. Is that something you'd be interested in creating, since you know what you need? <br>
<br><a href="https://issues.jboss.org/browse/FORGE-469" target="_blank">https://issues.jboss.org/browse/FORGE-469</a><br><br>There are methods called: javaClass.getSuperType() and getInterfaces() that you can use, though, but there just isn't any way to walk over all source files yet. Wouldn't be hard to implement!<br>
<br>~Lincoln<br><br><div class="gmail_quote"><div><div>On Tue, Jan 31, 2012 at 9:23 AM, Rudy De Busscher <span dir="ltr"><<a href="mailto:rdebusscher@gmail.com" target="_blank">rdebusscher@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hi all,<div><br></div><div>For a plugin, I could use some functionality that scans the source directories and report me all the java classes that extend a certain class.</div><div><br></div><div>But I couldn't find anything for that in Forge.</div>
<div><br></div><div>Is there some way of getting the parent class ? (or do I have the 'parse' the source myself (find extend clause and see what come next))</div><div><br></div><div>Thx</div><div><br></div><div>Best regards<span><font color="#888888"><br clear="all">
<div><br></div>-- <br>Rudy De Busscher<br><a href="http://www.c4j.be" target="_blank">http://www.c4j.be</a><br><br>
</font></span></div>
<br></div></div>_______________________________________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org" target="_blank">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
"Keep it Simple"<br>
</font></span><br>_______________________________________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org" target="_blank">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Rudy De Busscher<br><a href="http://www.c4j.be" target="_blank">http://www.c4j.be</a><br><br>
</div></div></div>
<br>_______________________________________________<br>
forge-users mailing list<br>
<a href="mailto:forge-users@lists.jboss.org">forge-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-users" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>"Keep it Simple"<br>