Bug 192568 - XML Catalog import/export should be in Import/Export wizards
Summary: XML Catalog import/export should be in Import/Export wizards
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: bugday, contributed, noteworthy
: 101951 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-13 23:38 EDT by Nitin Dahyabhai CLA
Modified: 2008-04-24 00:45 EDT (History)
4 users (show)

See Also:


Attachments
mylyn/context/zip (12.67 KB, application/octet-stream)
2007-07-29 22:17 EDT, David Carver CLA
no flags Details
Initial Cut at Import XML Catalog (13.85 KB, text/plain)
2007-07-29 22:20 EDT, David Carver CLA
no flags Details
Partial Implementation of Import/Export Wizard for Catalogs (13.90 KB, patch)
2007-07-30 08:58 EDT, David Carver CLA
no flags Details | Diff
mylyn/context/zip (14.01 KB, application/octet-stream)
2007-07-30 08:58 EDT, David Carver CLA
no flags Details
mylyn/context/zip (15.04 KB, application/octet-stream)
2007-07-30 15:15 EDT, David Carver CLA
no flags Details
Import Wizard Implemented except Catalog isn't saved (14.12 KB, patch)
2007-07-30 15:17 EDT, David Carver CLA
no flags Details | Diff
mylyn/context/zip (22.49 KB, application/octet-stream)
2007-08-02 19:26 EDT, David Carver CLA
no flags Details
Final Patch with full functionality for Import and Export of XML Catalogs via Wizards. (21.73 KB, patch)
2007-08-02 19:33 EDT, David Carver CLA
no flags Details | Diff
Import/Export XML Catalog Wizards - final (21.49 KB, patch)
2007-08-03 07:39 EDT, David Carver CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2007-06-13 23:38:49 EDT
2.0RC3-200706131923

It seems more natural than a popup dialog from the preference page popping up another dialog over itself.
Comment 1 Nitin Dahyabhai CLA 2007-06-14 02:16:16 EDT
Craig, what do you think of this for some future version?  Any ideas about who should shepherd it if you agree with it?
Comment 2 Craig Salter CLA 2007-06-19 17:40:33 EDT
Makes sense.  Our import/export dialog predates the platform's support an we've never found the time exploit that support.  
AFAIK, Who ever has time to do it is welcome to it.  That's my new campaign slogan :-) Nitin, I'll assign to you since you woke the sleeping puppy.
Comment 3 David Carver CLA 2007-07-27 16:17:01 EDT
I'll take this one as a bug day project.  Good refactoring experience.
Comment 4 David Carver CLA 2007-07-27 17:00:22 EDT
Do you want the Advanced button removed entirely from the XML Catalog preferences page, and a new Import and Export options for the XML Catalog to be added to the appopriate entries in the Import and Export dialogs?

Comment 5 David Carver CLA 2007-07-29 22:17:54 EDT
Created attachment 74889 [details]
mylyn/context/zip

Import XML Catalog Wizard.  The Import wizard page is showing up but for some reason cannot get the SingleFileViewer to populate the tree.  It has to be the way I'm calling the tree population, but unsure exactly why it isn't working.  Patch will be following that shows what is included so far.
Comment 6 David Carver CLA 2007-07-29 22:20:24 EDT
Created attachment 74890 [details]
Initial Cut at Import XML Catalog

This implements partial functionality.  It adds the Import and Export XML Catalog options to the Import and Export Wizards.  The Import XML Catalog page is displayed, however the tree view is not populated.
Comment 7 David Carver CLA 2007-07-30 08:58:19 EDT
Created attachment 74925 [details]
Partial Implementation of Import/Export Wizard for Catalogs

This implements the dialogs for the Import Wizard for the XML Catalog.   All that is needed is to add the appropriate finish code to actually import the selected catalog.  Question being the user have an option of which area to import it into.  Currently I'm planning on dropping it in the User Defined area.
Comment 8 David Carver CLA 2007-07-30 08:58:55 EDT
Created attachment 74927 [details]
mylyn/context/zip

Context of patch.
Comment 9 Nitin Dahyabhai CLA 2007-07-30 14:35:16 EDT
Because of the UI changes, this will have to wait until we've branched for 3.0 development.  Dave, looks promising.
Comment 10 Nitin Dahyabhai CLA 2007-07-30 14:51:35 EDT
(In reply to comment #4)
> Do you want the Advanced button removed entirely from the XML Catalog
> preferences page, and a new Import and Export options for the XML Catalog to be
> added to the appopriate entries in the Import and Export dialogs?

Yes, I'd rather be a definitive place to go within the UI to accomplish a particular task.  Shortcuts to that place are fine, such as a Link that opens the right wizard, just so long as it's clear that the function linked to is actually elsewhere.
Comment 11 David Carver CLA 2007-07-30 15:11:06 EDT
> Yes, I'd rather be a definitive place to go within the UI to accomplish a
> particular task.  Shortcuts to that place are fine, such as a Link that opens
> the right wizard, just so long as it's clear that the function linked to is
> actually elsewhere.

Okay, simple enough to do.   One thing I am running into on my performFinish is getting the User Defined Catalog to update.  Even the Advanced Import version doesn't seem to be updating the User Defined Catalog correctly.

I'll upload a patch and some contexts so that I can get some feed back.  I'm pretty sure it's something simple, that I'm missing.   I can get the file that is selected, and I don't get any errors when saving the catalog, but it doesn't appear in the XML Catalog preferences section.   There is another option that is working within the preferences page, that I'll investigate to see how it is adding the user defined catalog entry.

Note:  Currently there seems to be three different ways to get a catalog added, all using slightly different UI.


Comment 12 David Carver CLA 2007-07-30 15:15:41 EDT
Created attachment 74964 [details]
mylyn/context/zip

Import Page Wizard for XmlCatalog.   Includes perform Finish, but is not updating the User Defined Catalog with the values.  No exceptions are thrown.
Comment 13 David Carver CLA 2007-07-30 15:17:48 EDT
Created attachment 74965 [details]
Import Wizard Implemented except Catalog isn't saved

For some reason the catalog is not being saved correctly.  No errors are shown, and the wizard finishes without problems.
Comment 14 David Carver CLA 2007-08-02 10:13:41 EDT
XML Catalog import has been converted to a Wizard, and verified to work.   The issue I was having was with an invalid XML Catalog file that I was using to import the file.  Unfortunanetly, there was no indication that the file wasn't a valid XML Catalog file, it just didn't import anything.

I'll start work on the migration of the Export XML Catalog to a wizard next.

Comment 15 David Carver CLA 2007-08-02 19:26:06 EDT
Created attachment 75282 [details]
mylyn/context/zip

Final Patch context.
Comment 16 David Carver CLA 2007-08-02 19:33:07 EDT
Created attachment 75283 [details]
Final Patch with full functionality for Import and Export of XML Catalogs via Wizards.

This is the the final working patch.

1. Import XML Catalog Wizard - Allows for importing of an existing xmlcatalog file into the user catalog.

2. Export XML Catalog Wizad - Exports all entries from the User Catalog into a file of the users choosing.  Location can be either in the existing workspace or outside.

3. Removes the Advanced button from the XML Catalog Preferences page.

This patch also fixed minor grammatical errors, and leverages where possible existing Wizards.  The Export Wizard leverages the BasicNewFileResourceWizard.

Much of the old code int he AdvancedButton class has been migrated into the new classes.

This is functionally complete.
Comment 17 Nitin Dahyabhai CLA 2007-08-03 02:34:05 EDT
David, a cursory glance at the patch looks great with one major problem: the new ExportXMLCatalogWizard and ImportXMLCatalogWizard classes should be coopyright by *you* as the originator, not by IBM.  The rest of the copyright text is correct for the EPL license, but let's give you credit everywhere it's due :)
Comment 18 David Carver CLA 2007-08-03 07:31:58 EDT
Thanks, Nitin.  I'll get the copyrights updated and post a new patch.

Comment 19 David Carver CLA 2007-08-03 07:39:39 EDT
Created attachment 75322 [details]
Import/Export XML Catalog Wizards - final

Corrected copyrights on new files so they are correctly copyrights by STAR.
Comment 20 Nitin Dahyabhai CLA 2007-09-13 04:06:42 EDT
*** Bug 101951 has been marked as a duplicate of this bug. ***
Comment 21 Nitin Dahyabhai CLA 2007-09-27 03:32:01 EDT
Opened IPzilla https://dev.eclipse.org/ipzilla/show_bug.cgi?id=1780 (patch is over the magic 250 line count).
Comment 22 David Carver CLA 2007-12-01 15:07:23 EST
Just checking to see if this is still scheduled for M4?
Comment 23 Nitin Dahyabhai CLA 2007-12-17 22:51:28 EST
Yep.
Comment 24 Nitin Dahyabhai CLA 2008-01-02 04:11:31 EST
Verified with S-3.0M4-20071229165007.
Comment 25 Nitin Dahyabhai CLA 2008-01-04 06:35:49 EST
.
Comment 26 Amy Wu CLA 2008-01-04 15:51:57 EST
adding noteworthy keyword since this sounds like a noteworthy bug. (i'll write something up)
Comment 27 Amy Wu CLA 2008-02-28 03:33:38 EST
(In reply to comment #16)
> 2. Export XML Catalog Wizad - Exports all entries from the User Catalog into a
> file of the users choosing.  Location can be either in the existing workspace
> or outside.

While verifying the patch attached to bug 113249, I found that there was still no way to export entries from the catalog to a location outside the workspace.
Comment 28 David Carver CLA 2008-02-28 08:57:39 EST
(In reply to comment #27)
> (In reply to comment #16)
> > 2. Export XML Catalog Wizad - Exports all entries from the User Catalog into a
> > file of the users choosing.  Location can be either in the existing workspace
> > or outside.
> 
> While verifying the patch attached to bug 113249, I found that there was still
> no way to export entries from the catalog to a location outside the workspace.
> 

Yeah, there needs to be a redesign of the wizard screens to allow this to happen.  
Comment 29 David Williams CLA 2008-04-24 00:45:00 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword.