Examples of headless Java Projects [message #84735] |
Mon, 11 August 2003 16:53  |
Eclipse User |
|
|
|
Originally posted by: Jim.OConnor.microfocus.com
Hi All,
I would like to build some Java Projects in a headless mode, "save off"
an AST or XML representation, and query the information for Classes and
uses of classes. The org.eclipse.jdt.core.test appear to be a good place
to start to analyze this process.
I am using Eclipse Version 2.1.0. I "checked out as project" the
versions of org.eclipse.jdt.core.tests.compiler and
org.eclipse.jdt.core.tests.model. I resolved the project dependencies by
pointing to the jars in the plugins directory for core.boot, core.runtime,
jdt.core, jdt.debug and junit.
I run the JUNIT test with a test class
"org.eclipse.jdt.core.tests.model.AllJavaModelTests". 323 of the 325
tests fail. The routine in "AbstractJavaModelTests.java" is not happy:
public IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}
protected IWorkspaceRoot getWorkspaceRoot() {
return getWorkspace().getRoot();
}
getWorkspace() returns null. ResourcesPlugin.workspace field is null. It
gets initialized in the ResourcePlugin.startup() routine.
Am I running these tests correctly? A little information might be a lot
of help.
Thanks, in advance, for help.
Jim
|
|
|
|
|
|
|
|
|
|
|
Re: Examples of headless Java Projects [message #84986 is a reply to message #84971] |
Tue, 12 August 2003 13:26  |
Eclipse User |
|
|
|
Originally posted by: Jim.OConnor.microfocus.com
Jim OConnor wrote:
Sorry, again.
The test explicitly looks for *.jar and *.zip files in the
ECLIPSE_HOME\plugins\org.eclipse.jdt.core.tests.model\JCL directory. I'm
good to go. Thanks for the help to both Adam and Olivier.
Now I get no messages in the console and the tests pass. Back to figure
out what they do!!
> Adam Kiezun wrote:
> > > Would it make a diference if I removed the jdt.junit and tried the
> > > pde.junit plugin?
> > you don't replace jdt.junit with pde.junit
> > you ADD pde.junit to your plugin set
> > a.
> Cool. Things are still a bit funky but they are changing.
> I added pde.junit to the plugins directory and re-started Eclipse.
> This added a "JUnit Plug-in test" to the launch configurations.
> I tried a adding the JavaModel tests from the
> org.eclipse.jdt.core.test.model project. This is a Java project in the
> workspace that was created from the dev.eclipse.org CVS repository menu
> option "Checkout as project".
> I get the message
> java.io.FileNotFoundException:
> E:eclipsepluginsorg.eclipse.jdt.core.tests.modelJCLjclMin.ja r (The
> system cannot find the path specified)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:103)
> at
>
org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.read (AbstractJavaModelTests.java:518)
> at
>
org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.copy (AbstractJavaModelTests.java:150)
> at
>
org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.setu pExternalJCL(AbstractJavaModelTests.java:599)
> at
>
org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.setU pSuite(AbstractJavaModelTests.java:642)
> at
>
org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.runT est(SuiteOfTestCases.java:77)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
>
org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.acce ss$0(SuiteOfTestCases.java:1)
> at
>
org.eclipse.jdt.core.tests.model.SuiteOfTestCases$1.protect( SuiteOfTestCases.java:61)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at
>
org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.run( SuiteOfTestCases.java:70)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:392)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:276)
> at
>
org.eclipse.pde.internal.junit.ui.RemotePluginTestRunner.mai n(RemotePluginTestRunner.java:30)
> at
>
org.eclipse.pde.internal.junit.ui.UITestApplication.runEvent Loop(UITestApplication.java:35)
> at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
> at
>
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:845)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:431)
> at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
> Do I need to "install" the tests.model plugin?
> i.e. copy the org.eclipse.jdt.core.test.model files into the plugins
> directory?
|
|
|
Powered by
FUDForum. Page generated in 0.04060 seconds