Bug 219329

Summary: Pathmap Manager doesn't support file-based pathmaps
Product: [Modeling] GMF-Runtime Reporter: Chris McGee <cbmcgee>
Component: GeneralAssignee: Chris McGee <cbmcgee>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 2.0Keywords: contributed
Target Milestone: 2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed solution none

Description Chris McGee CLA 2008-02-18 11:23:10 EST
Created attachment 89989 [details]
Proposed solution

The pathmap manager currently has a restriction where pathmaps must be registered so that they point to a folder, not a file.

Please find the attached patch as a proposal to add file-based pathmap support.
Comment 1 Anthony Hunter CLA 2008-02-19 14:16:46 EST
Given that the Eclipse Linked Resources supports Files and Folders, it would seem logical that Path Maps also support Files and Folders.

It is not clear to me that we need a second set of API to support files.

In the PathmapManager API, we force a trailing / for a PATH, this is the underlying change we need fixed right?
Comment 2 Chris McGee CLA 2008-02-19 16:00:00 EST
Yes, that is the problem. We have no way of knowing at the right points whether to append the trailing '/' to the pathmap URI or the value URI. Even if we did know it could be potentially expensive to try to resolve the URI to a workspace file/folder to determine which type it is.

If there is a way to quickly autodetect this then it might be better than what is proposed here. Otherwise, the API must somehow differentiate.
Comment 3 Chris McGee CLA 2008-02-20 10:08:43 EST
One more point about the new API is that it allows variables to be set in batches. This is really useful because settings a large number of variables currently forces the manager to do a normalize and denormalize cycle for every resource set for every new variable that is added.
Comment 4 Chris McGee CLA 2008-03-31 22:57:06 EDT
Please see bugzilla 225031 for a complete patch and test case.
Comment 5 Anthony Hunter CLA 2008-04-01 14:01:01 EDT
Committed to HEAD with Bug 225031
Comment 6 Richard Gronback CLA 2008-08-13 13:09:10 EDT
[target cleanup] 2.1 M6 was the original target milestone for this bug
Comment 7 Eclipse Webmaster CLA 2010-07-19 12:24:11 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime EMF was the original product and component for this bug