<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 8: getJavaModelElement does not work for all methods</title><link href="https://sourceforge.net/p/jquery/bugs/8/" rel="alternate"/><link href="https://sourceforge.net/p/jquery/bugs/8/feed.atom" rel="self"/><id>https://sourceforge.net/p/jquery/bugs/8/</id><updated>2009-03-22T18:11:46Z</updated><subtitle>Recent changes to 8: getJavaModelElement does not work for all methods</subtitle><entry><title>getJavaModelElement does not work for all methods</title><link href="https://sourceforge.net/p/jquery/bugs/8/" rel="alternate"/><published>2009-03-22T18:11:46Z</published><updated>2009-03-22T18:11:46Z</updated><author><name>A.B.</name><uri>https://sourceforge.net/u/abartho/</uri></author><id>https://sourceforge.nete5adc75827ee5287b3d68b2734549ebc4d23d1a4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;JQueryAPI#getJavaModelElement(Object) does not return the method if it contains array parameters (e.g. main(String[]). The actual bug is in JQueryTyRuBaAPI#getMethodName(IMethod), in which brackets are used as string delimiters:&lt;/p&gt;
&lt;p&gt;private static String getMethodName(IMethod m) throws JavaModelException {&lt;br /&gt;
// so this is kind of "hack-ish" but it seems to work...&lt;br /&gt;
String result = m.toString();&lt;br /&gt;
result = result.substring(0, result.indexOf("["));&lt;br /&gt;
// remove white spaces&lt;br /&gt;
result = result.replaceAll("\\p{Space}", "");&lt;br /&gt;
return result;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>