Error in autocomplete of Java class method.

General Discussion goes here.

Moderator: robert

Error in autocomplete of Java class method.

Postby lubomir.benes » Mon Feb 24, 2014 2:33 pm

Hello,

thank you for great autocomplete features in Java / JavaScript.

Here is the small problem what I have found when java class autocomplete for method is performed:

Let's assume we have method like:

public void method1(float i, long l, short z, String s) {}

Autocomplete offers parameter names like:

obj.method1(i, l, arg0, z) {}

I guess it is caused by long or double type in parameter types.

Possible fix for that in Code.java in package org.fife.rsta.ac.java.classreader.attributes :

Code: Select all
@@ -264,7 +264,7 @@
             // Non-static methods have implicit "this" variable passed in,
             // so we must avoid that
             int index = in.readUnsignedShort();
-            int adjustedIndex = isStatic ? index : index-1;
\ No newline at end of file
+            int adjustedIndex = isStatic ? i : i-1;
\ No newline at end of file
 
             if (adjustedIndex>=0 && adjustedIndex<paramNames.length) {
                String name = cf.getUtf8ValueFromConstantPool(nameIndex);



I am not sure if it is 100% correct but at least it fixes problem mentioned above.
lubomir.benes
 
Posts: 6
Joined: Thu Jun 27, 2013 9:23 am

Re: Error in autocomplete of Java class method.

Postby robert » Thu Feb 27, 2014 3:56 am

Thanks! I'll take a look.
User avatar
robert
 
Posts: 801
Joined: Sat May 10, 2008 5:16 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron