Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Getting the full sourceLocation

Hi,

did you try to use the SourceLocation.getWithinType() method? It returns a class object. You could use the getPackage() method on this class to determine where your file is.

Hope it helps,
Thiago Bartolomei

On 2/15/06, Matt Morten < djcredo@xxxxxxxxx> wrote:
Hey all,

I'm writing a section of a program that relies heavily on the
joinpoint.getSourceLocation().getFileName() method. Basicly, when I
reach a joinpoint, I wan't to open the source file where the joinpoint
was located.

The problem is, SourceLocation.getFileName() doesn't return the path
to that file, so I can't open it for editing. If I'm lucky, the file
that I wan't to open is located in the current directory, so opening
it is easy. But if it lies in a seperate package, I'm out of luck.

Can anyone see a way around this?

Thanks in advance,
Matt Morten
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top