Bug 249071 - Need an option to export a source bundle
Summary: Need an option to export a source bundle
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2008-09-29 22:50 EDT by Jeff McAffer CLA
Modified: 2009-02-03 15:10 EST (History)
5 users (show)

See Also:


Attachments
Plugin export and Product export for config based on plugin (24.20 KB, patch)
2009-01-23 08:55 EST, Ankur Sharma CLA
no flags Details | Diff
Full Patch (33.33 KB, patch)
2009-01-31 15:17 EST, Ankur Sharma CLA
curtis.windatt.public: iplog+
Details | Diff
mylyn/context/zip (203.36 KB, application/octet-stream)
2009-01-31 15:17 EST, Ankur Sharma CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff McAffer CLA 2008-09-29 22:50:01 EDT
when working on a bundle in the workspace, it is super convenient to simply export the bundle and make it available to people.  Currently we have the ability to include source in the exported bundle but are not able to export the Eclipse standard source bundles.
Comment 1 Darin Wright CLA 2008-09-30 09:11:00 EDT
Yes, there is an item on the 3.5 plan for this.
Comment 2 Chris Aniszczyk CLA 2008-10-03 12:19:32 EDT
Andrew, anything in PDE Build we can ride on for this?
Comment 3 Darin Wright CLA 2009-01-07 15:41:35 EST
I'm not sure who currently uses the "include source" feature. It's not a format that PDE consumes... However, for backwards compatibility I think we must have the feature remain.

I would suggest to change the "Include source code" option in the to something like "Export source" with two options: "Include source in binary bundle(s)" and "Generate associated source bundle(s)". The options could be present in a drop down selection box.
Comment 4 Ankur Sharma CLA 2009-01-10 05:31:30 EST
If I understand this correctly, the "Include source in binary bundle(s)" option will have effect as checking the existing "Include source code" check box. How should "Generate associated source bundle(s)" behave? Just liked unchecked box? 

I am missing something here.

Can you also elaborate "...not able to export the Eclipse standard source bundles."
Comment 5 Darin Wright CLA 2009-01-10 17:10:07 EST
Currrently, the Eclipse SDK ships with source bundles. For exmaple, the source for the org.eclipse.pde.ui bundle is shipped as org.eclipse.pde.ui.source (if you look in the plug-ins directory of your Eclipse installation). The PDE export wizard does not support the generation of these source bundles, but should.

The existing "include source" feature simply adds .java source files to the bundle it is exporting (it does not create *.source bundles - which is the format of source the SDK consumes). Ideally one should be able to export a bundle and its associated source bundle such that it could be installed into the SDK to be consistent (i.e. so source matches binary).

So, we want to add the ability to export *.source bundles. PDE build supports the generation of these bundles, PDE UI just needs to tell it to generate them (Andrew can elaborate on how that should be done). And we need to leave the existing "include source" feature in tact (for those that might be using it).

Rather than add a new "source bundle" export option/control, we'd like to combine it with the existing UI/control. So, when the user chooses to include source, they include it with the binary bundle (which is the same as what we have now), or they can choose to export an associated source bundle. This could be acheived with a check box to export source, and then a drop down text box to choose the format (include with binary bundle, export associated source bundle).
Comment 6 Ankur Sharma CLA 2009-01-12 02:38:02 EST
Just to be sure. These changes needs to be made on all three pages? that is, for Plugin, Feature and Product Export Page.
Comment 7 Darin Wright CLA 2009-01-12 09:44:43 EST
Yes, we should be consistent for these three export operations. I'm not familiar with the implementation, but it might in fact be the same tab/UI controls.
Comment 8 Curtis Windatt CLA 2009-01-12 09:59:46 EST
(In reply to comment #6)
> Just to be sure. These changes needs to be made on all three pages? that is,
> for Plugin, Feature and Product Export Page.
> 

Yes, I think we want the ability to output source bundles for all three.  You
will have to modify the 3 UI pages (changing the check box to a check box +
drop down), modify FeatureExportInfo to store the new option, and modify the
classes in the FeatureExportOperation hierarchy to do the export when the
option is turned on.

The UI for the plug-in and feature export that you will change is ExportOptionsTab, for product export it is ProductExportWizardPage.

One feature you may not know about is Plugin Spy.  If you need to know the UI class that provides some UI, simply open up the wizard/editor/etc you are interested in, then hit Alt-Shift-F1.  A popup should open containing lots of useful information including the class that provides that UI.

Comment 9 Ankur Sharma CLA 2009-01-22 16:58:24 EST
I am done up to exporting plugins and will finish Product (config based on plugin) export today. But Feature export and Product (config based on feature) will take some more time. Its turning out to be trickier due to nested features.

Though, I am trying best to finish it ASAP. But in case "features" throw more surprises, will it be OK to deliver just plugin export piece for M5. Or you would prefer deferring whole thing to M6?
Comment 10 Darin Wright CLA 2009-01-22 17:11:52 EST
This can be deffered to M6.
Comment 11 Curtis Windatt CLA 2009-01-22 17:14:50 EST
Ankur, can you create a patch for your current progress and attach it here?

Feel free to put up patches, even if your work isn't complete.  Just mark them as work in progress or some such thing in bugzilla.  I'm looking forward to trying out the plugin export support.
Comment 12 Ankur Sharma CLA 2009-01-23 08:55:19 EST
Created attachment 123518 [details]
Plugin export and Product export for config based on plugin

Am attaching a Work In Progress (WIP) patch. The Plugin export and Product export for config based on plugin is working. Let me know your comments on the approach, coding guidelines, etc.
Comment 13 Ankur Sharma CLA 2009-01-31 15:17:22 EST
Created attachment 124357 [details]
Full Patch

Andrew, please review the patch. Let me know if I missed something. All three - plugin, feature and product export should working now.
Comment 14 Ankur Sharma CLA 2009-01-31 15:17:36 EST
Created attachment 124358 [details]
mylyn/context/zip
Comment 15 Chris Aniszczyk CLA 2009-02-02 09:38:15 EST
Curtis, lord of the source bundles, do you want to review this one?
Comment 16 Curtis Windatt CLA 2009-02-02 09:42:57 EST
For sure, but perhaps you and/or Jeff would like to try exporting product source.
Comment 17 Curtis Windatt CLA 2009-02-03 15:10:19 EST
Tested exporting plug-ins, features and products in a variety of formats, everything seems to be in place.  The generated source bundles can be properly treated as source locations in PDE during import and in the target platform.

Applied patch to HEAD with some changes.  Altered the wording and UI layout, added copyright updates to all of the files.

Well done Ankur, great patch for your first large contribution.