Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 257316

Summary: "Add Required Plug-ins" button should always add product/application plug-in
Product: [Eclipse Project] PDE Reporter: Mirko Raner <mirko>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, markus.kell.r, robert.kelly, smit27589, Vikas.Chandra
Version: 3.4.1   
Target Milestone: 4.8   
Hardware: All   
OS: All   
Whiteboard:

Description Mirko Raner CLA 2008-12-02 21:24:35 EST
Build ID: M20080911-1700

Steps To Reproduce:
1. Create a new plug-in project, for example, using the "Hello, World" template
2. Open the Run Configurations dialog to create a new Eclipse Application launch configuration
3. In the Main tab, select "Run an application: org.eclipse.ui.ide.workbench"
4. In the Plug-ins tab, select "Launch with: plug-ins selected below only"
5. Click "Deselect All", then select the newly created plug-in project in the tree
6. Click "Add Required Plug-ins", then click "Run"
7. The application will not launch and will report a RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry.


More information:
Selecting org.eclipse.ui.ide.workbench as the application in the Main tab makes the launch configuration dependent on the org.eclipse.ui.ide.application plug-in but "Add Required Plug-ins" does not add this dependency because the primary launched plug-in itself does not depend on it. To fix the problem, the user has to manually select the org.eclipse.ui.ide.application plug-in and once more click "Add Required Plug-ins" to add the application plug-in and its dependencies. This is highly counter-intuitive; when a user selects a specific product or application to be launched he or she would normally expect the plug-ins required for that product/application to be enabled in the launch configuration.

There are a couple of previously filed bugs with similar complaints, for example, bug 170972, bug 180791, and bug 236048. If, for some reason, it is undesirable to have the "Add Required Plug-ins" button also include the dependencies for the selected product or application, then maybe "Deselect All" should not uncheck the product/application plug-in and its dependencies (though I see how that would be weird, too). At any rate, first deselecting all plug-ins, then selecting a few plug-ins of interest and clicking "Add Required Plug-ins" is a very common way to create valid launch configurations that include only the absolutely necessary set of plug-ins. It is a common usage idiom that should always produce launch configurations that start without any problems. As another alternative, it would also be possible to add a button that says "Remove All Unnecessary Plug-ins" to achieve the same effect.
Comment 1 Smit CLA 2011-07-14 21:12:03 EDT
I wasted a lot of time on my project because of this bug.Can somebody look into it since it was reported in 2008 and still nobody has fixed it.
Comment 2 Missing name CLA 2016-04-19 17:27:05 EDT
Although this is an old bug, I agree.  I thank Mirko for this bug because it indicated and fixed my problem or I would have spent much more time trying to understand what was going on.  
Maybe I'm not approaching the issue correctly, but it would useful to explain why Add Required plug-ins does not truly add required plug-ins. I would think the launcher could predict that the running of it will produce this error.
Comment 3 Eclipse Genie CLA 2019-09-30 17:07:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Karsten Thoms CLA 2019-09-30 21:31:09 EDT
This has been solved in Photon

*** This bug has been marked as a duplicate of bug 522332 ***