Eclipse RCP - Product dependencies - eclipse

I am finding it difficult to see the difference between the plugins listed in the Debug Configuration's Plug-ins tab of my product launch config and the ones in my dependencies tab in the product file.
My product is based on features and it is for an RCP application.
If a launch config has been created automatically when I click on the Launch an Eclipse application in Debug mode via the Overview tab of the product file, then in the Debug Configurations Plug-ins tab I have 174 plugins selected. My RCP application runs without any warnings or errors in my Console.
Now if I deselect all the plugins in the product launch config and then click Add Required Plugins, only 70 are selected. When I now run it, I get many warnings on missing imported pacakge, bundle not resolved and missing required bundle in my development Console.
The reason I am trying to understand this, is that I am not sure why the Add Required Plugins is not adding the additional 104 plugins and I do not want a problem when I export this as a product.

The launch configuration itself is not used to decide which plugins to include in during the product export. As you say, the plugins included in the features that you have listed in the product dependency tab will comprise the built product.
When you deselect and click 'Add all required plugins' do you have the 'include optional dependecies' checkbox selected?

Related

The product definition is not pulling in dependencies from the required features

I am converting a plug-in-based RCP product to a feature-based one. I have grouped the plug-ins into 4 features and have created a traget definition containing all the required plug-ins.
When I view the dependency lists of each new feature, they look about right but when I run the product, I get a long list of Missing Constraint errors which seem to refer to plug-ins listed the Dependencies of my features.
Do I need to explicitly define these plug-ins as Included plug-ins in each feature definition? Why isn't the project definition itself loading the plug-ins automatically?
The 'Run Configuration' for your RCP in the 'Run > Run Configurations...' menu determines what is available when your run your code from within Eclipse.
On the 'Plug-ins' tab you can select 'features selected below' on the 'Launch with' combo to select your features. Use the 'Validate Plug-ins' button to check the selection.
For building (maven + tycho is strongly recommended) the features in the .product file are used.
On the 'Overview' tab of the .product editor select 'features' for 'the product configuration is based on' combo
On the 'Content' tab add your features.
Example contents configuration:
Example run configuration:

External Tool Configuration build options tab in Eclipse > Luna (i.e. Mars)

I had a supercool hook set up on Eclipse to compile my project's .css theme file from its .less modules every time a .less module was modified by monitoring those resources through an "external tool configuration".
I could select which resources to monitor for triggering the nodejs less compiler tool on the launch configurations build options tab.
On eclipse Mars there is no such tab.
It really bothers me to loose this automation. Does anybody know where did that tab go or how can I keep this functionality without it?
You set up such custom builders via the project's Properties dialog. Open the properties, then select the Builders section. There you can use the New... button to configure a Program to run as a builder.

How do I set the runtime classpath in Eclipse 4.2?

When I select Run Configurations from the Run menu I see no tab named Classpath as in previous versions of Eclipse. Where do I set the runtime classpath?
In Eclipse look at Project -> Properties for the project you want a runtime configuration. Choose Run/Debug settings and choose new or edit one you already have. When creating a New run/debug config make sure to choose Java Project. When the dialog box opens you will see a tab for classpath directives.
I stumbled upon this when developing a plugin for Eclipse - apparently the whole classpath business is slightly different in there.
See this FAQ item for more details

How can I automatically validate the dependencies in my RCP .product file?

I'm a bit new to building Eclipse RCP applications, and I'm finding it necessary to validate the list of plugins in the Dependencies tab of the .product file. But Eclipse (Indigo) offers no tools to help. In the launch configurations, there are great tools in the Plug-ins tab (buttons Add Required Plug-ins and Validate Plug-ins). It seems like there are 2 really obvious solutions that just aren't available:
Add a new button (or something) to copy the exact list of plugins from a .launch into a .product file (I tried to manually copy the text of the backing files, but the xml formats differ), or
Put the same two buttons in the Dependencies tab of the .product file.
I'm only creating one simple plugin, and the dependency list has 300 entries... very tedious to manually compare with a .launch! Am I missing something, is there actually a way to validate these dependencies directly in the .product file? Thanks for your help.
Byron
Here are two posibilities to get what you want:
Create a new product configuration
In the New Product Configuration dialog under Initialize the file content select Use a launch configuration and choose your Plug-In's launch configuration
Open the *.product file, switch to the Dependencies tab and you can see all Plug-Ins which are required to run your defining Plug-In
Edit an existing product configuration
Open the *.product file, switch to the Overview tab and select your Plug-In's launch configuration under Product Definition / Application
Switch to the Dependencies tab and add your defining Plug-In via the Add button
Select the Include optional dependencies when computing required plug-ins checkbox (which you can find at the bottom)
Hit the Add Required Plug-Ins button and you can see all Plug-Ins which are required to run your defining Plug-In

Eclipse RCP export product custom plugins not exported

I use Eclipse Product export wizard to create my application distributable image. The export want without errors, but the result contains only the eclipse.org.* plugins, none of my application plugins.
To add your own Plug-In's to the product configuration, you can do the following:
Open the *.product file and switch to the Dependencies tab
Use the Add button to add your Plug-In's
And you're done.
Optional: Hit the Add Required Plug-ins to add the Plug-ins required by your own Plug-in.