Hello,

I am new to Eclipse and need some help.  I'm trying to embed the CatalogViewer 
into a form and am having no luck.  Instead of having the updater in a separate 
wizard dialog, we'd like to have it accessible from a tabbed dashboard form.

I've tried the example in the following location:

http://wiki.eclipse.org/Equinox/p2/Discovery

I am not able to locate the libraries for RepositoryDiscoveryStrategy, so it is 
unresolved.  Therefore, I tried replacing it with RemoteBundleDiscoveryStrategy 
which was found and resolved from the editor.  From anther Discovery example I 
was referencing, it used 
www.eclipse.org/equinox/p2/testing/updateSite<http://www.eclipse.org/equinox/p2/testing/updateSite>
 for the URL.  Is this still accessible for testing?

Here is a small code snippet:

public void createPartControl(Composite parent)
    {

                Catalog catalog = new Catalog();
                catalog.setEnvironment(DiscoveryCore.createEnvironment());
                catalog.setVerifyUpdateSiteAvailability(false);

                // add strategy for retrieving remote catalog
                RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new 
RemoteBundleDiscoveryStrategy();
                
remoteDiscoveryStrategy.setDirectoryUrl("www.eclipse.org/equinox/p2/testing/updateSite");
                catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);

//            RepositoryDiscoveryStrategy strategy = new 
RepositoryDiscoveryStrategy();
//            strategy.addLocation(new 
URI("www.eclipse.org/equinox/p2/testing/updateSite"));
//            catalog.getDiscoveryStrategies().add(strategy);

                CatalogConfiguration configuration = new CatalogConfiguration();
                configuration.setShowTagFilter(false);

                DiscoveryWizard wizard = new DiscoveryWizard(catalog, 
configuration);
                WizardDialog dialog = new 
WizardDialog(WorkbenchUtil.getShell(), wizard);
                dialog.open();


I've also tried creating my own CatalogViewer.  Here is another code snippet:

catalog = new Catalog();

                                // look for descriptors from installed bundles
                                catalog.getDiscoveryStrategies().add(new 
BundleDiscoveryStrategy());

                                // look for remote descriptor
                                String directoryUrl = 
"www.eclipse.org/equinox/p2/testing/updateSite";
                                if (directoryUrl != null && 
directoryUrl.length() > 0)
                                {
                                                RemoteBundleDiscoveryStrategy 
remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
                                                
remoteDiscoveryStrategy.setDirectoryUrl(directoryUrl);
                                                
catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
                                }

                                
catalog.setEnvironment(DiscoveryCore.createEnvironment());
                                catalog.setVerifyUpdateSiteAvailability(true);

                                configuration = new CatalogConfiguration();
                                configuration.setShowTagFilter(tags.size() > 0);
                                configuration.setSelectedTags(tags);

                               container = new Composite(parent, SWT.NONE);
                                GridLayoutFactory.fillDefaults().margins(0, 
0).applyTo(container);

                                catalogViewer = new CatalogViewer(catalog, 
getEditorSite(), (IRunnableContext) container, configuration);
                                
catalogViewer.setMinimumHeight(/*MINIMUM_HEIGHT*/480);
                                catalogViewer.createControl(parent);


There is very little documentation regarding this technology, so any 
information you can send me would be greatly appreciated.

Thanks so much,
Stephanie

This message (including any attachments) is intended only for the use of the 
individual or entity to which it is addressed and may contain information that 
is non-public, proprietary, privileged, confidential, and exempt from 
disclosure under applicable law or may constitute as attorney work product.  If 
you are not the intended recipient, you are hereby notified that any use, 
dissemination, distribution, or copying of this communication is strictly 
prohibited. If you have received this communication in error, notify us 
immediately by telephone and (i) destroy this message if a facsimile or (ii) 
delete this message immediately if this is an electronic communication.  

Thank you.

_______________________________________________
equinox-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to