Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 180791 - 'Add Required Plug-ins' does not pick up the product ID as a prerequisite in the Eclipse launch configuration
Summary: 'Add Required Plug-ins' does not pick up the product ID as a prerequisite in ...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.3 RC2   Edit
Assignee: Brian Bauman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 98999 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-03 15:59 EDT by Remy Suen CLA
Modified: 2007-05-29 21:24 EDT (History)
4 users (show)

See Also:
wassim.melhem: review+
mike.pawlowski: review+
baumanbr: review? (caniszczyk)


Attachments
Patch for illustrative purposes. (7.87 KB, patch)
2007-04-14 10:21 EDT, Remy Suen CLA
no flags Details | Diff
patch (5.55 KB, patch)
2007-05-23 17:26 EDT, Brian Bauman CLA
mike.pawlowski: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2007-04-03 15:59:33 EDT
In 3.3M6 (and I'm pretty sure in past versions), the product ID has no bearing as to what is calculated by the 'Add Required Plug-ins' button.

1. Open the 'Run' dialog.
2. Create a new 'Eclipse Application' launch configuration.
3. Select 'org.eclipse.sdk.ide' for the 'Run a product:' drop down combo control.
4. Go to the 'Plug-ins' tab.
5. Select 'plug-ins selected below only' in the 'Launch with:' drop down combo control at the top.
6. Deselect 'Workspace' and 'Target Platform', setting the configuration as '0 out of XXX selected'.
7. Hit the holy and sacred be all end all 'Add Required Plug-ins' button.
8. And...nothing happens.
Comment 1 Remy Suen CLA 2007-04-14 10:21:43 EDT
Created attachment 63820 [details]
Patch for illustrative purposes.

This patch won't always work since I noticed that org.eclipse.ui.ide.application	's application ID is actually org.eclipse.ui.ide.workbench, so my string concatenation check will fail. Maybe the method I am using is incorrect? Can someone from the PDE team comment on this?
Comment 2 Chris Aniszczyk CLA 2007-05-15 19:46:34 EDT
will try to look into 3.3, setting temp target milestone now
Comment 3 Wassim Melhem CLA 2007-05-17 14:54:56 EDT
*** Bug 98999 has been marked as a duplicate of this bug. ***
Comment 4 Wassim Melhem CLA 2007-05-17 14:56:47 EDT
For 3.3, we could use the simplistic approach that the first n-1 segments of a product/application ID indicate the contributing plug-in ID.

After bug 166610 is done, it would be pretty simple to map from a product ID to its plug-in.
Comment 5 Brian Bauman CLA 2007-05-23 17:26:23 EDT
Created attachment 68461 [details]
patch

When inintializing the PluginBlock, we retain a reference to the launch configuration.  When computing the 'Add Required', we query the launch configuration to get the product/application ids.  We simplistic n-1 approach from comment #4 to find the plug-in it is from.  If the plug-in exists, we check to see if it checked.  If it is not, we then check it.

After we do this, we call super's function to add the required plug-ins.
Comment 6 Brian Bauman CLA 2007-05-23 17:38:03 EDT
Mike, when you get a chance can you be the second reviewer on this patch if Chris hasn't already reviewed it.  He has been really busy with other work so I am not sure if he will have time.
Comment 7 Wassim Melhem CLA 2007-05-23 22:32:40 EDT
Good patch.  Thanks Brian.
Comment 8 Mike Pawlowski CLA 2007-05-24 09:49:39 EDT
Comment on attachment 68461 [details]
patch

Patch tested well Brian.
Comment 9 Mike Pawlowski CLA 2007-05-24 09:50:22 EDT
Patch released to HEAD.
Comment 10 Remy Suen CLA 2007-05-29 21:24:12 EDT
Looks good to me on RC2, thank you PDE team! :)