[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Re: [eclipse-dev] New API on IApplicationContext
- From: Thomas Watson <tjwatson@xxxxxxxxxx>
- Date: Tue, 16 Mar 2010 08:54:58 -0500
- Delivered-to: email@example.com
I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=306010 to discuss the issue some more.
I am not sure if it is possible, but you could try to use the org.eclipse.pde.junit.runtime.coretestapplicationnonmain application instead. The problem is I don't know how you use that application when launching a Junit Plug-in Test from eclipse. I use the org.eclipse.pde.junit.runtime.coretestapplicationnonmain to start session tests for the Eclipse Application container. But I would hope there is a more simple way to do this if you do not want to or need to use session tests.
For now you may still need to mock up an IApplicationContext. I have heard that this can be done easily by using easy mock instead of implementing the interface yourself.
zhu kane ---03/15/2010 10:31:47 PM---Hi Thomas,
zhu kane <kane.mx@xxxxxxxxx>
"General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>
equinox-dev@xxxxxxxxxxx, Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
03/15/2010 10:31 PM
[equinox-dev] Re: [eclipse-dev] New API on IApplicationContext
We used to mock a context object to start the application in the junit test. I tried to migrate the code using ApplicationDescriptor to avoid break caused by the changes of IApplicationContext.
However, the ApplicationDescriptor.launch always fails due to the built-in application 'org.eclipse.pde.junit.runtime.coretestapplication' is LOCKED_SINGLETON_GLOBAL_RUNNING. It doesn't allow running other app in the same time.
Any idea for it?
org.osgi.service.application.ApplicationException: A singleton application instance is already running: org.eclipse.pde.junit.runtime.coretestapplication.0
On Wed, Mar 3, 2010 at 11:19 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
Implementers of org.eclipse.equinox.app.IApplicationContext interface please read on. Otherwise you can safely ignore this message.
First of all, what are you doing implementing an interface that has the @noimplement javadoc tag? It appears there are some cases where clients have found reasons to implement this interface. In most all cases I think it can be avoided by proper usage of the org.osgi.service.application.ApplicationDescriptor service to launch other applications instead of mocking up a context and calling an application implementation directly.
If you find you are mocking up an IApplicationContext then you will be affected by the changes in bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=304361 where new API was added to IApplicaitonContext. You will need to start implementing the new methods on this interface.
Let me know if you have any questions.
eclipse-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
equinox-dev mailing list