Re: Question on COM3205 HW6


Subject: Re: Question on COM3205 HW6
From: Kojarski Sergei (kojarski@ccs.neu.edu)
Date: Thu Nov 21 2002 - 14:33:24 EST


Hi Wei,

I believe (not sure) that file is created inside project directory.
To get to the project directory you need to have IProject object
(it should be currently selected objeft in the Navigator view)
To find out how to get it - see example files located by:
http://www.ccs.neu.edu/home/lieber/com3205/f02/eclipse/src/

Once you have IProject object, it's easy:
To get IPath object just say:
IProject project <- here you have your currently selected project
IPath path= project.getLocation();
If you want to have string representation, just say:
String projectFolderAsString = path.toOSString();
If you want to have File representation:
File projectFolderAsFile = path.toFile();

Hope, it'll help
Good luck,
Sergei.

P.S., to get your report file directly, just replace
IPath path = project.getLocation();
with
IPath path =
project.getFile("path_inside_project_dir_to_your_file").getLocation();

On Wed, 20 Nov 2002, Wei Hua Chen wrote:

> Hi, Sergei. How do you find out the project directory of the AspectJ
> project which the LoD Checker checks? I'm working on the part that the
> violation view gets populated from the LoDChecker.log file generated by
> the LoDChecker. But I don't know how to get to the file, i.e., find the
> file path.
>
> Thanks.
>
> Wei.
>
>
>



This archive was generated by hypermail 2b28 : Thu Nov 21 2002 - 14:33:24 EST