Difference between revisions of "Lite IDE Ignore"

From Lingoport Wiki
Jump to: navigation, search
(Lite is set in Eclipse)
(Run Lite)
Line 9: Line 9:
   
 
=> Lite analyzes the relevant files based on the Globalyzer Project Definition file and shows the clickable results in the Console view.
 
=> Lite analyzes the relevant files based on the Globalyzer Project Definition file and shows the clickable results in the Console view.
  +
  +
[[File:LiteRun.gif]]
   
 
= Navigate to the Issue =
 
= Navigate to the Issue =

Revision as of 22:48, 8 January 2016

When using Lite in an IDE (see https://www.globalyzer.com/gzserver/help/referenceLite/globalyzer-lite-IDE-usage.html ), you can use the power of the IDE to mark some issues in the code as to be ignored. Globalyzer uses a set of standard comments, name $NON-NLS-L$. There are many ways to do so. We will illustrate one such way with Lite in Eclipse.

Lite is set in Eclipse

To set Lite in your Eclipse environment, refer to https://www.globalyzer.com/gzserver/help/referenceLite/globalyzer-lite-IDE-usage.html#Eclipse ; There are two sections, one for Linux, one for Windows. LiteConfigured.gif

Run Lite

  • Select the directory or file you want to analyze
  • Click on the external tools button

=> Lite analyzes the relevant files based on the Globalyzer Project Definition file and shows the clickable results in the Console view.

LiteRun.gif

Navigate to the Issue

  • Click on the issue in the Console

=> It opens the file and highlights the line with the issue.

Refactor the Code or Ignore the Issue

Depending on what the developer sees, the issue either needs to be refactored or ignored. If the issue needs to be ignored:

  • Add the string "nls" and type <Ctr><Space>
  • Eclipse proposes the standard $NLS notation by default. Select that notation and type L.

The line now reads:

   	Locale locale = new Locale("en", "US"); //$NON-NLS-L$
  • Repeat the process for other false positives

Lines tagged with the //$NON-NLS-L$ will be ignored by Globalyzer the next time you run the Lite external tool.

Note: This is using the default template. You can modifiy the template to have directly //$NON-NLS-L$ on other key combination or the same nls<Ctr><Space>.

This is one way of adding //$NON-NLS-L$ at the end of the line. Some developers will decide on other methods.