How to synchronize run configuration with product configuration in Eclipse? - eclipse

I am trying to run an Eclipse product that is configured to use features.
The features added by me are:
org.eclipse.e4.rcp
org.eclipse.emf.ecore
org.eclipse.emf.common
The product will run after using the run configuration->add required plugins button (the product plugin itself is missing example: if the product plugin is called com.company.product I will get a validation error that com.company.product is missing).
If I am using "Launch an Eclipse application" I will get the error "No application id found". This is also obviously reflected in the exported product.
I tried to add the product plugin as dependency but I can't find it. Still the "add required plugins" can add it.
Why is the product plugin itself required and how to add it in the configuration such that the exported product can run ?

I' not sure I really understand the question, but if you are using a feature based product you need to write a feature containing all of your plugins including the one that defines the product using the org.eclipse.core.runtime.product extension point.
Every plugin that you want to be included in the RCP must be listed in a feature and all the features must be listed in the product file.
I don't know of anything that will synchronize the Run Configuration with the product file.

Related

product configuaration in the eclipse plugin development

Requirements using:Eclipse Mars(4.5.2) and Jdk(1.8.0)
Problem: I have created the plug-in-project called [org.basicfamily.sirius.design].
Then the product configuration was created for the plug-in [org.basicfamily.product.demonstrator] and the plug-in project [org.basicfamily.sirius.design] was added as contents to the created product configuration and selected the required dependencies for the plug-in [org.basicfamily.sirius.design]. Now the plug-in [org.basicfamily.sirius.design] is dependent on the another plug in called [org.antlr.runtime[1.6.0,1.7.0)]. But the problem now is when I try to export the product it is giving [org.antlr.runtime[1.6.0,1.7.0)] bundle version exception plug in org.antlr.runtime[1.6.0] is not found. Because in the contents of the product configuration we can add the plug-in only with respect to name and not with respect to versions. So I want to add the plug-ins org.antlr.runtime[1.6.0],org.antlr.runtime[1.7.0] both but it allows only one plug-in with the same name. It will consider the plugins only with respect to the name and not w.r.t the versions.
Any solution for this problem?
Switch to using a 'feature' based build. In the 'feature.xml' for a feature you can specify the version of the plugin required.
So you can use a feature for the plugins which use the 1.6 plugin and another feature for the plugins requiring 1.7.

RCP P2 Update for base productin

I am developing an RCP P2 update.
I created RCP Mail Template application. (com.project.app.mail)
I added product configuration file MailProduct.product
I added org.eclipse.equinox.p2.ui.sdk as a dependency in the dependency tab if my plugin project. After adding this, I got Intall New Software and Check for Update options under the help menu.
I added p2.inf file with following content.
instructions.configure=\
addRepository(type:0,location:http${#58}//localhost:8080/REPO/);\
addRepository(type:1,location:http${#58}//localhost:8080/REPO/);
I converter a product to feature based product.
I created a feature project (com.project.feature.mail)
I added com.project.app.mail in the plugin tab of feature com.project.feature.mail
I launched RCP product via product file. As it failed, I went to run configuration, added required plugin. Application launched successfully after that.
I exported the product. Exported product worked fine.
Now I made some changes to com.project.app.mail.
Updated com.project.feature.mail verstion to 1.0.100.quailfier (earlier version 1.0.0.quialifier)
Added an update site project. Added category with id com.project.category.mail. Added mail feature with version 1.0.100.qualifier.
Clicked on build all, moved generated features, plugin, artifact and repository.xml to a local http server (tomcat)
I tried to update the com.project.feature.mail via, check for update option.
It says no update found, while the install new software page shows the updated com.project.feature.mail with updated versio. In proceeding ahead with installation, it tells only update is possible while update cannot find the new update.
Kindly guild me how provide update for base product.
If you need any other infomation do let me know.
Dear Priyank what is your product(MailProduct.product) version?
Following suggestions will solve your problem.
You have to change MailProduct.product version too.
Re-export your product with Generate Metadata Repository option.
Use this Repository on your Web-Server to get updates.
With Update Site Project software updates not work so easily.

Can I create an Eclipse Product without an RCP Application?

We develop plug-ins and a feature, and want to deliver a running application to our customer (so they don't have to get Eclipse on their own). Basically, I want to put my plug-ins in a minimal Eclipse instance (minus jdt, junit, and other plug-ins that we don't need).
I created a product configuration, but it wants me to specify a Product and Application in the Product Definition definition section (of the Product Configuration editor). How to I know what to specify for these? Choosing willy-nilly gives me the following error when I click the Launch an Eclipse application from the Product Configuration editor:
java.lang.RuntimeException: No application id has been found.
I've created products successfully from an RCP application before, but in this case I just want to deliver the bulk of Eclipse with our plug-ins installed. Am I doing this right?
Application could be headless or have GUI like RCP.
Product is an abstract definition for your product, it must depend on a specific application to be executed. You could refer to the built-in applications of eclipse itself.

How remove "installed twice" errors in RCP Product

I have an RCP product based on 2 features: my product feature and the org.eclipse.rcp feature. It worked perfectly at export time and at run time.
Last week I decided to add the error log view to my product. I simply added the view to my "persective" and the logview plugin as plugin dependency in my main plugin. Just work fine !!!
After exporting my product (through headless build) I noticed that when launching my product I have a lot of errors in the error log view (not acceptable for customers even if all is working fine). These errors are related to the RCP feature plugins and say:
the plugin org.eclipse.xxx (one error for each plugin of the RCP feature) has already been installed from /plugins/org.eclipse.xxx
Any idea on the way to avoid these errors ? I guess this means I have something wrong in my product configuration.
The answer is to add the following line in the product config.ini file:
org.eclipse.update.reconcile=false

Eclipse RCP: building product with feature that requires other features

I need to build a product that contains one feature, I want this feature, containing application, requires another feature that can be updated independently from product, so I put this last one in required section and not in included section.
the tree is this:
it.prodotto (product id)
it.rcp.prototipo.application.feature (main feature included in product and containing application)
it.rcp.framework.feature (feature required by main feature)
My problem is this, even if I have these features (and relatively plugins) in my target, when I export my product using eclipse wizard from .product I got this error:
Cannot complete the install because one or more required items could not be found.
Software being installed: prototipo application 1.0.7 (it.prodotto 1.0.7)
Missing requirement: My Application 1.0.4 (it.rcp.prototipo.application.feature.feature.group 1.0.4) requires 'it.rcp.framework.feature.feature.group 1.0.4' but it could not be found
Cannot satisfy dependency:
I don't understand where (and how) I have to put this features before export the product
I also tried to put this required feature in the same folder where I export the product without success (I tried both launchingfolder and repository)
I'm using Eclipse Helios 3.6.1
The feature it.rcp.framework.feature must be added to the product configuration as well.