Hi, how can I add or remove icons or reorder them at main tool bar ?
The answer depends on the icon you're trying to hide and from who. In the code, I encourage you to look at the "getVisibility" method in com.serotonin.m2m2.module.MenuItemDefinition, as well as the class com.serotonin.m2m2.module.MenuItemVetoDefinition (which is probably what you're looking for, as I think you could just make a veto module)
So I must recompile, isn't it ?
And what about change order ? My client wants the Views eye icon be the first in the tool bar ...
You will need to do some compilation to add classes that extend MenuItemVetoDefinition, but you can just "javac myvetoclass.java" in the same directory as ModuleElementDefinition.java and MenuItemVetoDefinition.java (both in com.serotonin.m2m2.module) to get a .class file, then bundle that into the module's .jar file. Add the class path to the module.properties file for the module and all should work.
Also, in response to the ordering... that will require recompiling the entire module or replacing the class overriding the MenuItemDefinition subclass in the .jar.
MenuItemDefinition has a method "getOrder" which is documented to explain the ordering process.