Override method but arg0 parameter

i use eclipse auto Override method:

@Override public void draw(Canvas arg0, MapView arg1, boolean arg2) { // TODO Auto-generated method stub super.draw(arg0, arg1, arg2); } 

you see that the argument arg0, arg1, arg2, is hard to read. I think if my eclipse has a mistake, because I think that it should give me:

 draw(Canvas canvas, MapView mapview, boolean flag) 

so my question is why my eclipse gives me arg0, etc., how to solve it?

+6
source share
5 answers

If you install the “Documentation for Android SDK” through the “Android SDK Manager”, it will be fixed.

+8
source

It entirely depends on whether Eclipse has third-party code sources available in the build path of this project. In your case, it has only a binary class file and can only provide types, since the argument names are no longer part of the binary.

This please

  • set the sources of your target android.
  • have maven download sources of artifacts that you use in maven
  • attach sources to the third party library that you use
  • install the SDK versions of the Eclipse plugins that you use as the target platform

to solve this problem in different environments.

+3
source

There is nothing bad. This is an Eclipse way of naming variables. But it is recommended that you change them to your own names.

Side note: renaming a variable in code using Eclipse: Right click on the variable => Refactor => Rename

+1
source

It does not matter. But it's always good practice to write code in a way that is understandable.

Imp is a "type" and not. passing parameters in a method, they must be correct and, I think, this.

+1
source

It doesn't matter what the parameter name is. Just make sure you pass the correct variable / parameter value.

-2
source

Source: https://habr.com/ru/post/923933/


All Articles