Bug 272068 - [category] Hook export to use category definitions
Summary: [category] Hook export to use category definitions
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 271198 272362 272394
Blocks: 262009
  Show dependency tree
 
Reported: 2009-04-13 15:13 EDT by Chris Aniszczyk CLA
Modified: 2009-04-25 19:15 EDT (History)
6 users (show)

See Also:


Attachments
o.e.pde.ui patch (3.58 KB, patch)
2009-04-14 19:23 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (22.60 KB, application/octet-stream)
2009-04-14 19:23 EDT, Ian Bull CLA
no flags Details
o.e.pde.ui updated patch (7.95 KB, patch)
2009-04-15 00:00 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (38.41 KB, application/octet-stream)
2009-04-15 00:01 EDT, Ian Bull CLA
no flags Details
o.e.pde.ui patch (10.40 KB, patch)
2009-04-17 16:38 EDT, Ian Bull CLA
no flags Details | Diff
Updated patch (11.43 KB, patch)
2009-04-25 18:21 EDT, Ian Bull CLA
no flags Details | Diff
PDE UI and PDE Core patch (13.54 KB, patch)
2009-04-25 18:36 EDT, Ian Bull CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Aniszczyk CLA 2009-04-13 15:13:22 EDT
+++ This bug was initially created as a clone of Bug #271198 +++
Comment 1 Ian Bull CLA 2009-04-14 19:23:47 EDT
Created attachment 131864 [details]
o.e.pde.ui patch

Here is an initial code drop for the changes to the PDE Export Wizard to support categories. I will continue working on this.  This drop just includes the new buttons so a user can choose the category file.
Comment 2 Ian Bull CLA 2009-04-14 19:23:52 EDT
Created attachment 131865 [details]
mylyn/context/zip
Comment 3 Ian Bull CLA 2009-04-15 00:00:52 EDT
Created attachment 131878 [details]
o.e.pde.ui updated patch

Here is an updated patch.  This finishes the UI work, however, this is not tied to PDE Build yet (i.e. it doesn't process the flags when the wizard is done). I have to make a changed to the publisher and then PDE build before we can finish this.
Comment 4 Ian Bull CLA 2009-04-15 00:01:04 EDT
Created attachment 131879 [details]
mylyn/context/zip
Comment 5 Chris Aniszczyk CLA 2009-04-15 10:19:47 EDT
What bug does this depend on in p2 publisher land Ian?
Comment 6 Ian Bull CLA 2009-04-15 13:28:00 EDT
Bug 264567 is the publisher bug.  Not sure what changes are required to build yet. 

Currently you specify a site.xml by pointing to a dir that contains a file called site.xml.  Since the category file can have any name, we need to point directly to a file for this.
Comment 7 Chris Aniszczyk CLA 2009-04-15 13:33:00 EDT
Ian, for the UI, we can be smart about the browse functionality. We can filter based on valid content types. For example, we can have a method like 

boolean isCategoryFile(IFile candidate)

IContentDescription description = candidate.getContentDescription();
if (description == null)
     return false;
IContentType type = description.getContentType();
return "org.eclipse.pde.categoryManifest".equals(type.getId());

What do you think?
Comment 8 Ian Bull CLA 2009-04-15 16:21:31 EDT
I've updated the dependencies. We really only need to have bug 272362 in for 3.5.  The only thing left after this is changes to PDE Build.
Comment 9 Ian Bull CLA 2009-04-17 16:38:04 EDT
Created attachment 132296 [details]
o.e.pde.ui patch

Here is an updated patch that finishes the UI work for category export.  A new PDE core / build patch is on its way
Comment 10 Chris Aniszczyk CLA 2009-04-20 11:02:53 EDT
where's the core/build patch?

It would be great to get this in for the next i-build
Comment 11 Ian Bull CLA 2009-04-20 11:33:58 EDT
Chris,

It's on Bug 272362 waiting to be reviewed.
Comment 12 Chris Aniszczyk CLA 2009-04-21 04:57:12 EDT
Do we want to enable this only for features or for just normal plug-in export?
Comment 13 Darin Wright CLA 2009-04-21 09:39:50 EDT
(In reply to comment #12)
> Do we want to enable this only for features or for just normal plug-in export?

My understanding is that it still does not work for plug-ins since the "site.xml" format has been used (which does not allow to add plug-ins to categories). So, I think it's features only (please correct me if wrong, Ian).
Comment 14 Ian Bull CLA 2009-04-21 11:27:14 EDT
(In reply to comment #13)
> My understanding is that it still does not work for plug-ins since the
> "site.xml" format has been used (which does not allow to add plug-ins to
> categories). So, I think it's features only (please correct me if wrong, Ian).
> 

Darin's right, we simply used the site.xml format (for now). Going forward, I think we will evolve this format (or simply change it) and then we will enable plug-in export.

I don't think that should happen for 3.5.  
Comment 15 Thomas Hallgren CLA 2009-04-21 16:22:14 EDT
Is there any documentation on this yet. A wiki page?
Comment 16 Curtis Windatt CLA 2009-04-24 16:51:55 EDT
Looking at this patch, I think it would be more helpful if the browse button searched for category.xml files in the workspace.  Since users can only export from their workspace and the category editor is only available in the workspace, we should not send users to browse their hard drives.
Comment 17 Ian Bull CLA 2009-04-24 17:44:50 EDT
(In reply to comment #16)
> Looking at this patch, I think it would be more helpful if the browse button
> searched for category.xml files in the workspace.  Since users can only export
> from their workspace and the category editor is only available in the
> workspace, we should not send users to browse their hard drives.
> 

+1.  Do you want me to create a new patch, or should we tag that as polish for 3.5?
Comment 18 Curtis Windatt CLA 2009-04-24 17:47:42 EDT
If you have the opportunity to make another patch go for it, as it doesn't look like the p2 changes are going to be put in today.
Comment 19 Ian Bull CLA 2009-04-25 18:21:04 EDT
Created attachment 133232 [details]
Updated patch

This patch checks that the category file exists and passes a URI instead of a path.
Comment 20 Ian Bull CLA 2009-04-25 18:36:59 EDT
Created attachment 133233 [details]
PDE UI and PDE Core patch

Andrew just informed me that the PDE Core changes should be grouped with the PDE UI changes (I had them grouped with build before).  This patch is the same UI patch + the few small changes needed to PDE Core.
Comment 21 Chris Aniszczyk CLA 2009-04-25 19:15:38 EDT
done.

> 20090425

I'll open another bug to improve the browse to only search your workspace.