wiki:COMPILER_SETTINGS
Last modified 12 years ago Last modified on 01/12/09 18:51:15

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt
For now, we should use the following compiler settings about warnings and errors in order to increase the quality of the code. From the Window/Preferences/Java/Compiler choose your settings to match those in the pictures bellow. Some of these work only with Eclipse 3.3 (Europa), so you should emerge to that version.

Note: you may have to adjust some other options in order to see all the warnings while building. To start with, from Window/Preferences/Java/Compiler/Building set Maximum number of problems reported per compilation unit to 3000 (there are above 2000 warnings currently). From the problems view (where the warnings are shown), choose preferences and set "Limit visible items per group:" to 3000.

  • How to fix or suppress some of the warnings:
    • How to fix:
      • Access to a non accessible member of a enclosing type: - if it safe to make the member protected, make it, otherwise suppress the warning.
      • How to suppress: use the @SuppressWarnings(list of warnings) directive before a method declaration.

@SuppressWarnings("unqualified-field-access")

public void static...

In order to suppress the correct warnings just click on the warning mark on the left and choose the @Suppress... line in the help window.

Error: Macro Image(Code_style.JPG) failed
current transaction is aborted, commands ignored until end of transaction block
Error: Macro Image(Potential_problems.JPG) failed
current transaction is aborted, commands ignored until end of transaction block
Error: Macro Image(Name_shadowing_restricted_API.JPG) failed
current transaction is aborted, commands ignored until end of transaction block
Error: Macro Image(Generic_types.JPG) failed
current transaction is aborted, commands ignored until end of transaction block
Error: Macro Image(Unnecessary_code.JPG) failed
current transaction is aborted, commands ignored until end of transaction block
Error: Macro Image(Javadoc_warnings.JPG) failed
current transaction is aborted, commands ignored until end of transaction block

Comments

  • Note that warnings should be suppressed only when there is no smart way to avoid them, not just to decrease the warnings count. For now, if you are not sure, ask. --Milo
  • The images linked in the page are not present, which makes the page almost useless. Also I think that the default compiler settings for Eclipse suit our needs. And we don't have 2000 warnings anymore. It would be good if the paragraphs had some headings. --boyan@2009-01-12

Attachments