[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Reuse of P2 UI

Eugen,
The snapshot you included shows the Install Wizard's "Available Software" page, which is implemented in the class AvailableIUsPage (internal class, not API). It is really not designed to be used outside of a wizard scenario. The class AvailableSoftwareGroup (also internal) is intended to be reused in any composite. For example, it is used by PDE. However, it does not include all the checkboxes, etc. that you see in the page. While it was designed to be reused, it is internal so that we can change the public methods as needed from release to release.

Can I ask why you need the pages but not the wizard? Are you trying to change the page flow, add pages, ??? Maybe there's another way to accomplish what you want?

The classes I mention above are internal because we didn't have wide demand for reuse outside of the wizard framework and we want flexibility to refactor or improve the code without worrying about framework API breakage (such as changing protected methods, etc.) There's typically some coupling between pages and wizards and we want to be able to evolve this.

The class InstalledSoftwarePage is the page that appears in the Help>About>Installation Details. This is a completely different thing. It shows what software is already installed. It is available as API (but marked @noinstantiate) because RCP apps refer to it by extension point in the installationPages extension.

Bottom line - our intention is that you use the install wizard as is, or if you prefer, the p2 (Mylyn) discovery install wizard. We haven't really factored the code so that you can take individual pieces, except for a few API classes like AcceptLicensesWizardPage, where we had wider demand.

susan

Inactive hide details for Eugen Reiswich ---11/09/2010 02:21:35 PM---Hi Susan, thanks for the hint, that solved the NPE problemEugen Reiswich ---11/09/2010 02:21:35 PM---Hi Susan, thanks for the hint, that solved the NPE problem. However I'm still a bit lost in reusing the P2 UI in my RCP view (



          Eugen Reiswich <ereiswich@xxxxxxxxxxxxxx>
          Sent by: p2-dev-bounces@xxxxxxxxxxx

          11/09/2010 02:21 PM
          Please respond to P2 developer discussions



To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc: p2-dev-bounces@xxxxxxxxxxx
Subject: Re: [p2-dev] Reuse of P2 UI

Hi Susan, 

thanks for the hint, that solved the NPE problem. However I'm still a bit lost in reusing the P2 UI in my RCP view (I do not want to reuse the whole P2 wizard dialog (see screenshot), just the content of the pages). When I start my application I get an empty page that looks totally different than the install wizard dialog. Taking a closer look at the API of InstalledSoftwarePage I found the following comment:
 * @noinstantiate This class is not intended to be instantiated by clients.

That seems to be the wrong way of trying to include the P2 software installation process  into my RCP view. Is it even possible to put the P2 wizard pages into RCP Views oder Editors?

Eugen

[IMAGE]


Am 09.11.2010 um 21:23 schrieb Susan Franklin McCourt:

Hi, Eugen.
Those NPE's indicate that the basic provisioning services have not been initialized properly.  The event bus and the profile registry are not being found.  
A common cause for this is the absence of the declarative services bundle in the launch config (or in the build).  Without ds, the basic provisioning service declarations won't be found.
We have tried to include more reasonable error messages for the common trigger points of this problem, but depending on how you are reusing p2, your symptoms may be different (such as here).

Here is an old thread discussing this problem.
http://www.mail-archive.com/equinox-dev@xxxxxxxxxxx/msg03599.html

Let me know if this is not what's causing your issue.

susan

<graycol.gif>Eugen Reiswich ---11/05/2010 01:24:27 AM---Hi folks, I'm trying to reuse some P2 UI elements as introduced in this presentation:


<ecblank.gif><ecblank.gif> <ecblank.gif>

To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
cc:
Subject: [p2-dev] Reuse of P2 UI

Hi folks,

I'm trying to reuse some P2 UI elements as introduced in this presentation: http://www.slideshare.net/PascalRapicault/discovering-the-p2-api

Basically I would like to reuse the"Available Software"-page where I can choose/edit update sites and features to install, the "Install Details"-page which summarizes the items to be installed and the licenses page. I would like to integrate all this pages in my RCP-View, not in a Wizard.

Trying to reuse the "InstalledSoftware"-page resulted in a NPE (note: I've checked the box "Support software installation in the launch application" in my launch configuration):
InstalledSoftwarePage installedSoftwarePage = new InstalledSoftwarePage();
installedSoftwarePage.createControl(parent);

!ENTRY org.eclipse.core.jobs 4 2 2010-11-05 09:15:34.160
!MESSAGE An internal error occurred during: "Fetching children of _SELF_".
!STACK 0
java.lang.NullPointerException
at org.eclipse.equinox.internal.p2.ui.model.ProfileElement.getQueryable(ProfileElement.java:55)
at org.eclipse.equinox.internal.p2.ui.QueryProvider.getQueryDescriptor(QueryProvider.java:54)
at org.eclipse.equinox.internal.p2.ui.model.QueriedElement.fetchChildren(QueriedElement.java:102)
at org.eclipse.equinox.internal.p2.ui.model.RemoteQueriedElement.fetchDeferredChildren(RemoteQueriedElement.java:34)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.ui.workbench 4 0 2010-11-05 09:15:34.177
!MESSAGE Unable to create view ID P2UIExamples.view: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
at org.eclipse.equinox.internal.p2.ui.ProvUIActivator.addProvisioningListener(ProvUIActivator.java:106)
at org.eclipse.equinox.internal.p2.ui.dialogs.InstalledIUGroup.createViewer(InstalledIUGroup.java:75)
at org.eclipse.equinox.internal.p2.ui.dialogs.StructuredIUGroup.createGroupComposite(StructuredIUGroup.java:80)
at org.eclipse.equinox.internal.p2.ui.dialogs.InstalledIUGroup.<init>(InstalledIUGroup.java:51)
at org.eclipse.equinox.p2.ui.InstalledSoftwarePage.createControl(InstalledSoftwarePage.java:95)
at p2uiexamples.View.createPartControl(View.java:76)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:647)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:574)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2632)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:2986)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2967)
at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow.java:771)
at org.eclipse.ui.internal.Workbench$23.runWithException(Workbench.java:1221)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbench.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4233)
at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1562)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2567)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at p2uiexamples.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

Any help will be appreciated,
Eugen
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

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


#### Bildschirmfoto 2010-11-09 um 22.38.25.png has been removed from this note on November 09, 2010 by Susan Franklin McCourt

GIF image

GIF image

GIF image

GIF image