Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Resource not present in the ResourcesSet(We have .properties files that we use to set the prefix of a table for example. I'm using eResource.getResourceSet() to access these files, but the resource set ignores the .properties file.)
Resource not present in the ResourcesSet [message #1855550] Thu, 20 October 2022 08:55 Go to next message
Guillaume Valvona is currently offline Guillaume ValvonaFriend
Messages: 2
Registered: August 2022
Junior Member
Hello,

So where I work, we have a DSL developped with Xtext. For some data, we use a cache system in which we load the content of a CSV file. Recently, we tried deleting the cache part and loading directly from an XLS. So far, so good.

The problem is that we have .properties files that we use to set the prefix of a table for example. I'm using eResource.getResourceSet() to access these files, but the resource set ignores the .properties file :
index.php/fa/42625/0/

The resources returned :
org.eclipse.xtext.resource.SynchronizedXtextResourceSet@3ca62a5b resources=[org.eclipse.xtext.linking.lazy.LazyLinkingResource@5aef02e6 uri='platform:/resource/Test%20Finrep/src/NotEqualsTest.test', org.eclipse.xtext.linking.lazy.LazyLinkingResource@1417ece3 uri='platform:/resource/Test%20Finrep/src/Activity-1.0.0.calc', org.eclipse.xtext.linking.lazy.LazyLinkingResource@4d706877 uri='platform:/resource/Test%20Finrep/src/Test-1.0.0.common', org.eclipse.xtext.linking.lazy.LazyLinkingResource@6f159297 uri='platform:/resource/Test%20Finrep/src/ActivityTest.test', org.eclipse.xtext.linking.lazy.LazyLinkingResource@2e1cf322 uri='platform:/resource/Test%20Finrep/src/NotEqualSupport-1.0.0.common', org.eclipse.xtext.linking.lazy.LazyLinkingResource@3ce583cb uri='platform:/resource/Test%20Finrep/src/TestModel.model', org.eclipse.xtext.linking.lazy.LazyLinkingResource@2433cc18 uri='platform:/resource/Test%20Finrep/src/gref.reportvalid']

And the files that should be accessible :
index.php/fa/42626/0/

I hope the explanation is clear enough. My question is, is there a place where the file extensions that are returned should be specified ?
  • Attachment: code.png
    (Size: 6.68KB, Downloaded 225 times)
  • Attachment: files.png
    (Size: 5.78KB, Downloaded 216 times)
Re: Resource not present in the ResourcesSet [message #1855551 is a reply to message #1855550] Thu, 20 October 2022 08:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
you want to "Parse" the properties file as your "mydsl"
or dont you have a xtext grammar or something like it for it.

also: is this about eclipse or about standalone/java main


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Resource not present in the ResourcesSet [message #1855563 is a reply to message #1855551] Thu, 20 October 2022 13:13 Go to previous messageGo to next message
Thomas Landuyt is currently offline Thomas LanduytFriend
Messages: 11
Registered: May 2021
Junior Member
The thing he is trying to achive is to retrieve a mode.properties file from a specified OutputConfiguration(src/main/resources).

This .properties file is not a xtext grammar but just a raw properties file. As we don't have any access directly to the FilesystemAccess it is difficult to retrieve. This should work in eclispe/maven
Re: Resource not present in the ResourcesSet [message #1855571 is a reply to message #1855563] Thu, 20 October 2022 18:19 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14722
Registered: July 2009
Senior Member
And why don't you have access to fsa.
Check how the generator retrieves it and do the same


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:Non editable elements
Next Topic:Xtext 2.29.0.M2 is out
Goto Forum:
  


Current Time: Thu Oct 10 04:49:58 GMT 2024

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

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

Back to the top