[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] problems with validateClasspath
|
I'm trying to programatically add entries to the Java Build Path for java
projects in my plugin. However I want to make sure that it's all still
'legal' after my additions. (Ideally I'd like to check what I'm adding is ok
before I add it, but I've not had any luck there). The problem I'm getting
is that when I run the code below I get:
"Unhandled exception caught in event loop.
Reason:
org/eclipse/jdt/core/JavaModelException"
try
{
JavaProject javaProject = (JavaProject)project;
IJavaModelStatus status = JavaConventions.validateClasspath(
javaProject,javaProject.getRawClasspath(),
javaProject.getOutputLocation() );
System.out.println( status.getMessage() );
}
catch (JavaModelException e)
{
e.printStackTrace();
}
catch (Throwable e)
{
e.printStackTrace();
}
it's definately this code causing the exception becuase if I comment it out
then I no longer get the error. Any ideas?
--
Steve Willoughby
stephen.willoughby@xxxxxxxxxx