| Summary: | Generated Editor's ModelWizard does not support double file extensions, such as "cov.xml" | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Mikhail Kalkov <mikhail.kalkov> |
| Component: | Edit | Assignee: | Ed Merks <Ed.Merks> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | stepper |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Mikhail Kalkov
I don't think Eclipse editor associations even support that. Certainly EMF's extension parser registrations don't either. Even URI.fileExtension would never know how to interpret an extension with dots verses a file name with dots and an extension without. I.e., given a.b.c, which is the extension? I don't want to go down that rat hole. I am not going to argue about your decision, but totally cannot see why you say that it is difficult to decide which one is the extension. "Given a.b.c", look up the most specific out of registered extensions and call it the one! What is the whole point of registering/declaring extensions otherwise? On the other note, the bug with stuck ModelWizard is still there. One either has to validate FileExtensions property of genmodel to prevent user from using dots, or give a meaningful error message in the wizard. A ModelWizard that gets stuck without any obvious reasons is by no means a feature. (In reply to comment #1) > I don't think Eclipse editor associations even support that. They are not based on the concept of a file name extension. They do pattern matching against the entire file name. In Window->Preferences->General->Editors->File Associations I can add *.abc, but I can't add *.abc.def... In any case, EMF supports content types so presumably a *.cov.xml will have recognizable content such that one can get by with that instead. In my case XML files are produced by a third-party tool, and don't even have an xmlns attribute. I agree that using content types is a better way, but in order to avoid preprocessing, I decided to rely on file extensions so far. Anyway, what made me submit this bug is that genmodel's property editor lets one enter a double extension, whereas ModelWizard fails because of it without providing any meaningful error message. In case of "Window -> Preferences -> General -> Editors -> File Associations" user at least gets a quick feedback hinting that double extensions are not accepted. I expect a large number of the GenModel's properties are not properly validated. I suppose in the end, different OS's have restrictions on characters allowed in file names... |