Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Creating new xtext resource in quickfix(How to create a new xtext resource in quickfix with correct formatting)
Creating new xtext resource in quickfix [message #1781774] Tue, 13 February 2018 09:40
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi,

I have a model composed of different languages. In one kind of file (workflow) I want to create another file of another language (mask) and reference this via crossreferences.

I have implemented a working solution, but one thing is missing...
The new file is not formatted at all, all content is in the first line.
I create it with:

org.eclipse.emf.common.util.URI uri = workflow.eResource().getURI().trimSegments(1).appendSegment(compound.getName() + ".mask");
XtextResource newResource = (XtextResource) workflow.eResource().getResourceSet().createResource(uri);
newResource.getContents().add(compound);
newResource.save(null);

Can you please give me advice how formatting this whole thing?

Thanks in advance
Markus
Previous Topic:Association and cross-referencing
Next Topic:Creating new xtext resource in quickfix
Goto Forum:
  


Current Time: Sat Apr 20 02:17:57 GMT 2024

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

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

Back to the top