[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small bug in Eclipse plugin



Thanks for pointing this out.

I fixed this problem in svn revison 1154. I put your solution into
SootLauncher.java which is where the location gets set for use by all
the subclasses (SootProjectLauncher, SootFileLauncher
and SootFolderLauncher).

It will be included in future releases.

Jennifer

On Sun, 10 Aug 2003, Eric Bodden wrote:

> Hi!
>
> Class SootProjectLauncher, line 38:
>
>
> setProcess_path(platform_location+getSootSelection().getJavaProject().getOut
> putLocation().toOSString());
>
> This is not always right, because one can have multiple workspaces on the
> platform. So one must query the workspace instead:
>
>         String realProjectRoot =
> getSootSelection().getJavaProject().getProject().getLocation().toOSString();
>         String workspaceRoot = realProjectRoot.substring(0,
> realProjectRoot.lastIndexOf(File.separatorChar));
>
> setProcess_path(workspaceRoot+getSootSelection().getJavaProject().getOutputL
> ocation().toOSString());
>
> I know, that looks a bit hacky, but I could not find an easier way to get
> the path of the current workspace.
> Please also note, that the same mistake could also have been made at other
> places that use platform_location. I did not check that, yet.
>
> Hope that helps,
> Eric
>
> P.S. I think you should really improve some error handling. Scene gives the
> following if you give an invalid method id:
>
> oops void main(java.lang.String[])
>
> ;-)
>
>
>