Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-update-dev] Re: [eclipse-dev] Questions on Installing Plugins / Featuers - Expert advise wanted

We are doing a standalone app based on the Eclipse platform and like you, thought about the best way to update our app. Since our app isn't going to allow third party plugins and is going to be installed into a controlled environment we decided to just check for updates everytime we launch the application. I just put this code into the startup() method of our main plugin. The solve the bootstrap plugin, we are going to initially hand out a CD that is completely tailored to how we want it. We will pre-install our feature before packaging it up and then on first startup it will automatically get the newest version. We set our feature up to be the default feature in the install.ini so we get to do our initialization before the rest of the platform starts up.

If anyone has any suggestions while this is out there, feel free to add input.

-Phil

       try {
           String featureID = "foo.feature";
           String siteString = "http://foo.com/appdir";;
ISite site = SiteManager.getSite(new URL(siteString), new NullProgressMonitor()); ISiteFeatureReference[] featureReferences = site.getFeatureReferences();

           IFeature remoteFeature = null;
           for (int x = 0; x < featureReferences.length; x++) {
VersionedIdentifier id = featureReferences[x].getVersionedIdentifier();
               if (id.toString().startsWith(featureID + "_")) {
remoteFeature = featureReferences[x].getFeature(new NullProgressMonitor());
                   break;
               }
           }

           if (remoteFeature == null) {
               throw Utilities.newCoreException(
"The foo.feature feature could not be found on this update site.",
                   null);
           }

PluginVersionIdentifier remoteVersion = remoteFeature.getVersionedIdentifier().getVersion();

InstallCommand command = new InstallCommand(featureID, remoteVersion.toString(), siteString, null, null);
           command.run();
       } catch (Exception e) {
           log("", e);
       }

-Phil

Hi All,

My company has decided to use eclipse for our Linux based tools. Our
product teams are developing the plugins and features and I am supposed to
write a install program that installs the products and plugins so that when
the end user invokes eclipse, he/she is able to use our products through
eclipse GUI.

My question is related with how to install plugins/features during the
install process? How many different ways exist to do that?

I have done some homework on this, read few IBM articles and also looked
into various books. I was able to find two ways of doing that:
(Method# 1) Use update manager.
(Method# 2) Create appropriate links in the folder
/path/to/eclipse-install-location/eclipse/plugins to the location of
product specific plugins (
/opt/companyname/productname/bi/com.company.pluginname.version)

Couple of questions:
(1) Since we will be creating both plugins and features( i.e. our plugins
wont be unmanaged plugins), is approach mentioned in method# 2 going to
work? Are there any disadvantages of using method# 2?
(2) Can someone tell me what are other ways of installing managed
plugins(/features) ?
(3) Can I invoke update manager using bash script to install our plugins
and features? Our installation script is written in bash. How do I go about
doing that if this can be done?

Pls help.

Thanks in Advance,
Sam











_______________________________________________
platform-update-dev mailing list
platform-update-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-update-dev






Back to the top