| Summary: | Models are not updated correctly when using ImportURIScoping | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Michael Zeising <michael> | ||||||||
| Component: | Xtext | Assignee: | Jan Koehnlein <jan> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | clay, jan, sebastian.zarnekow, tmf.xtext-inbox | ||||||||
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
||||||||
| Target Milestone: | M5 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Michael Zeising
Created attachment 180038 [details]
Example Xtext projects
Created attachment 180039 [details]
DSL file referencing another one
Created attachment 180040 [details]
DSL file referenced by another one
import "platform:///resource/Test Models/models/b.mydsl"
entity X {
ref Y
}
it works on the first time because the default registered o.e.e.e.resource.impl.URIHandlerImpl can handle such an URI although it's not a valid platform URL (plaform:/ vs. platform:///).
The import uri validator should mark the illegal platform:/// ... uri. Does the user get feedback about the invalid format? (In reply to comment #5) > The import uri validator should mark the illegal platform:/// ... uri. Does the > user get feedback about the invalid format? No, the ImportUriValidator accepts the /// URIs, too. That's why I didn't recognize the error in the first place. This didn't make it into M4. Preliminary scheduled for M5. As you have already mentioned the problem is that platform:///some/path... is not a platform URI, i.e. URI.isPlatform() returns false as there is an empty (not null) authority segment. Consequently and correctly, the PlatformResourceURIHandler does not feel responsible for this URI. EMF behaves consistently here. Unfortunately, the default URIHandlerImpl converts the URI to a URL and as Eclipse (not EMF) registered an PlatformURLHandler which is not as pedantic as EMF, this becomes a valid and openable URI :-( In Xtext, we have lots of places where we assume platform URIs to be canonical for good reasons. I see two viable options: 1) We adapt the URIConverter strip authority segments when normalize platform URIs (two or three slashes after the colon). 2) We change the EcoreUtil2.isValidURI to return false if an URI has the "platform" scheme but is not a platform URI. Pushed alternative 2 and a test to MASTER. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |