Skip to main content



      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 04:55 Go to next message
Eclipse UserFriend
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 277 times)
  • Attachment: files.png
    (Size: 5.78KB, Downloaded 256 times)
Re: Resource not present in the ResourcesSet [message #1855551 is a reply to message #1855550] Thu, 20 October 2022 04:57 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Resource not present in the ResourcesSet [message #1855563 is a reply to message #1855551] Thu, 20 October 2022 09:13 Go to previous messageGo to next message
Eclipse UserFriend
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 14:19 Go to previous message
Eclipse UserFriend
And why don't you have access to fsa.
Check how the generator retrieves it and do the same
Previous Topic:Non editable elements
Next Topic:Xtext 2.29.0.M2 is out
Goto Forum:
  


Current Time: Thu Apr 24 03:20:22 EDT 2025

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

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

Back to the top