Error in autocomplete of Java class method.

Post a reply

Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Topic review
   

Expand view Topic review: Error in autocomplete of Java class method.

Re: Error in autocomplete of Java class method.

Post by robert » Thu Feb 27, 2014 3:56 am

Thanks! I'll take a look.

Error in autocomplete of Java class method.

Post by 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.

Top

cron