Hello Haddas,
This mailing list is not the right place for questions about plug-in
development with PDE, and is more intended for questions about the
development of PDE itself.
You already posted on the eclipse.pde newsgroup, you'll probably get a
response there ; you could also ask your question in the jdt newsgroup,
because leveraging the JDT and JUnit would probably avoid you
unnecessary pain (e.g. Class.forName() won't ever resolve classes of
what you're calling the "runtime workspace")...
Cheers,
Ben
shadass a écrit :
Hello, everybody.
I'm a student and new in eclipse and I have a problem that I'm dealing with
for more then a week but haven't resolved yet:
I'm developing a plugin(in java) - an expension to the eclipse IDE - that
one of its features is running a unit test and generate a report of its
results.
I've added a button that let the user to choose the wanted file and to run
it with JUnit.core.run.
When I run the plugin as eclipse application the fileChooser returns the
file full path.
JUnit.core.run suppose to get a Class, so I use Class.forName() to load the
class (I generate a class name from the full path).
The problem is that Class.forName() is looking for the class in the wrong
workspace. It looks for the class in my workspace (the plugin development
workspace) and no in the user's workspace (run time workspace) and it throws
an exception: class not found.
When I choose a unit test from my workspace, it run it with no exception.
In addition to the problem that it doesn't find the class, the unit test
must run in its own workspace because it uses the classes of the current
project.
I don't know what to do.
I'll be happy to get some ideas.
Thanks Hadas
|