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

Small bug in Eclipse plugin



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[])

;-)