Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtext content description identification
Xtext content description identification [message #1799528] Sat, 08 December 2018 08:54 Go to next message
Eclipse UserFriend
Hi

Xtext introduced the magic ability for a text rather than XML file to be the source for an EMF Resource, but the integration seems sub-optimal. When EMF creates the Resource it locates an appropriate ResourceFactory by inviting a list of known ContentHandlers to handle the URI. This typically involves an extension match, but for unknown extensions it falls back to an XML handler that analyzes the xmlns declarations in the XML pre-amble. This of course fails for a textual source file and eventually the ResourceFactory search gives up on content descriptions and instead uses the file extension where an XtextResourceFactory does the right thing.

So it works, but we waste time on a failed XML analysis.

Surely a ContentHandler should be installed for each Xtext file extension that returns a VALID content description with null content type so that the XML analysis is bypassed accelerating the processing that ends up using the extension registration?

(This will obviously further aggravate use of 'wrong' extensions, but anyone who tries to use "java" as the extension of their DSL is probably doomed to chaos anyway.)

Regards

Ed Willink
Re: Xtext content description identification [message #1799621 is a reply to message #1799528] Tue, 11 December 2018 05:40 Go to previous message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=542655
Previous Topic:Setting a fixed keyword to start a DSL file
Next Topic:Creating two xtext grammar files within one project
Goto Forum:
  


Current Time: Fri Jun 20 16:43:58 EDT 2025

Powered by FUDForum. Page generated in 0.16436 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top