Viewing Flaws in Source Files from Within Eclipse

IDEs

If you have an open Eclipse project in the current workspace and that project references a source file for a flaw, Veracode Static for Eclipse can open that source file and go to the line containing the flaw.

Creating an Eclipse Project with References to Source Files

If source files are available, but are not referenced in any Eclipse project, you can create an Eclipse project and add references to the directory containing the source files. The directory structure of the binaries uploaded to Veracode must match the directory structure of the local source files. Veracode Static for Eclipse can open the source file of the flaw and locate the line where the flaw occurs as long as:
  • The folder structure within the Eclipse project is consistent with the Folder Path value in the Results view.
  • The filename of the source file matches the File Name value in the Results view.
To create a new Eclipse project and add references to existing source files:
  1. Select Window > Show View > Other > Java > Package Explorer.
  2. Right-click inside the Package Explorer view and select New > Project.
  3. Enter a name for the new project and click Finish.
  4. In the Package Explorer view, right-click the new project and select Import.
  5. Expand the General folder node, select File System and, then, click Next.


  6. Click Browse.
  7. Locate and select the parent directory that contains the path shown in the Folder Path column in the Results view. Then, click OK.

    For example, if the Folder Path column shows a path of org/apache/http/impl/io, select the parent directory that contains the org folder.

  8. Select the checkbox next to the name of the selected directory.
  9. Under Options, click Advanced.
  10. Select the Create links in workspace checkbox.
  11. Select the Create link locations relative to: PROJECT_LOC checkbox.
  12. Click Finish.
  13. Confirm that the path to the files within the Project in Package Explorer matches the path in the Results view.