Bug 214081 - Exported user XML catalog is out of sync
Summary: Exported user XML catalog is out of sync
Status: CLOSED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xml (show other bugs)
Version: 3.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Steven Hung CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-01-02 04:14 EST by Nitin Dahyabhai CLA
Modified: 2009-06-11 15:19 EDT (History)
4 users (show)

See Also:
for.work.things: review+


Attachments
Patch (1.50 KB, patch)
2008-09-16 09:33 EDT, Steven Hung CLA
valentinbaciu: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2008-01-02 04:14:51 EST
S-3.0M4-20071229165007

If I try to open a catalog file (should there be naming constraints?) created by exporting my user catalog entries into the workspace, the Text Editor complains that it's out of sync with the filesystem.
Comment 1 Nitin Dahyabhai CLA 2008-01-04 07:34:08 EST
Yikes, it may not even support projects not directly under the workspace folder.
Comment 2 David Carver CLA 2008-01-04 18:33:05 EST
May need to force a workspace refresh.

I'll take a look and see what I can come up with.
Comment 3 David Carver CLA 2008-01-04 19:09:48 EST
Hmm....I tried to duplicate this on linux, with the current org.eclipse.wst.xml.ui plugin and couldn't do it.

Here are the steps I followed:

1. Added a file to the Catalog.
2. Launched the Export Wizard by going to File->Export->XML->XML Catalog
3. Selected the Project to export to.
4. Gave it a file name.
5. Hit finish.
6. Navigated to where the file was saved, and opened it with the XML editor.

File opened correctly and with out error.  I also tried it using the Text Editor and it worked as well.

As for if there should be restrictions on the name, I don't think so.  As People should be able to name them what they want.  Standandard may be .xml, but catalogs don't have to have a .xml extension.

Comment 4 David Carver CLA 2008-01-04 19:15:01 EST
(In reply to comment #1)
> Yikes, it may not even support projects not directly under the workspace
> folder.
> 

Correct the current export only exports to the current workspaces... It needs to be enhanced to export outside of the workspace.  I'll take a look at how the Export Archive works and see if I can come up with some there.
Comment 5 David Carver CLA 2008-01-10 09:48:12 EST
Okay, I was finally able to duplicate this.  The odd thing is, that it doesn't happen when you are in development mode and have launched the application from PDE.   Hitting F5 on the workspace will force a refresh of the file contents.   Also, if the Workspace preference, Refresh Automatically is checked, the problem doesn't exist.

Comment 6 Nitin Dahyabhai CLA 2008-09-15 18:49:50 EDT
I'm guessing it's related to ICatalog using filesystem locations and not an in-workspace path during export.
Comment 7 Steven Hung CLA 2008-09-16 09:33:10 EDT
Created attachment 112664 [details]
Patch

Manually synchronize the exported XML Catalog file via a call to iFile.refreshLocal after the file is created in the XML Catalog Wizard.
Comment 8 Valentin Baciu CLA 2008-10-06 15:48:10 EDT
Amy, please review and commit the fix from Steven.
Comment 9 Valentin Baciu CLA 2008-10-06 15:49:07 EDT
Comment on attachment 112664 [details]
Patch

This patch is contributed.
Comment 10 Amy Wu CLA 2008-10-08 18:06:29 EDT
fix looks good.  released for wtp 3.1 m3 builds > 200810082210
Comment 11 Nitin Dahyabhai CLA 2008-12-17 15:25:12 EST
Verified with S-3.1M4-20081215095735, on OSX and Windows XP.
Comment 12 Valentin Baciu CLA 2009-06-11 15:19:40 EDT
Closing.