Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Re: [eclipse-dev] New API on IApplicationContext

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.

Tom



Inactive hide details for zhu kane ---03/15/2010 10:31:47 PM---Hi Thomas,zhu kane ---03/15/2010 10:31:47 PM---Hi Thomas,


From:

zhu kane <kane.mx@xxxxxxxxx>

To:

"General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>

Cc:

equinox-dev@xxxxxxxxxxx, Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

Date:

03/15/2010 10:31 PM

Subject:

[equinox-dev] Re: [eclipse-dev] New API on IApplicationContext




Hi Thomas,

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
    at org.eclipse.equinox.internal.app.EclipseAppContainer.lock(EclipseAppContainer.java:481)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.createAppHandle(EclipseAppDescriptor.java:190)
    at org.eclipse.equinox.internal.app.EclipseAppDescriptor.launchSpecific(EclipseAppDescriptor.java:90)
    at org.osgi.service.application.ApplicationDescriptor.launch(ApplicationDescriptor.java:315)

Best Regards
Kane


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.

    Tom


    _______________________________________________
    eclipse-dev mailing list

    eclipse-dev@xxxxxxxxxxx
    To change your delivery options, retrieve your password, or unsubscribe from this list, visit

    https://dev.eclipse.org/mailman/listinfo/eclipse-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


GIF image

GIF image


Back to the top