Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Import all Files from given Folder
Import all Files from given Folder [message #901750] Tue, 14 August 2012 13:01 Go to next message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
Hi xTexters,

I have been searching for a pretty long time, but it shouldn't be that complicated:

Having a Resource and therefore a platform URI, how can I get a list of all files in the same directory? I need it for an auto-import mechanism in the IScopeProvider.

Thanks!

BB
Re: Import all Files from given Folder [message #901767 is a reply to message #901750] Tue, 14 August 2012 13:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
If you have a platform resource URI, you can map it to an IFile:

* 2.44 How do I map between an EMF Resource and an Eclipse IFile?
<http://wiki.eclipse.org/index.php/EMF-FAQ#How_do_I_map_between_an_EMF_Resource_and_an_Eclipse_IFile.3F>

From that IFile, you can get the containing folder and determine all
the other files in that folder.

On 14/08/2012 3:01 PM, Bastian Barton wrote:
> Hi xTexters,
>
> I have been searching for a pretty long time, but it shouldn't be that
> complicated:
>
> Having a Resource and therefore a platform URI, how can I get a list
> of all files in the same directory? I need it for an auto-import
> mechanism in the IScopeProvider.
>
> Thanks!
>
> BB


Ed Merks
Professional Support: https://www.macromodeling.com/
icon14.gif  Re: Import all Files from given Folder [message #901779 is a reply to message #901767] Tue, 14 August 2012 14:43 Go to previous message
Bastian Barton is currently offline Bastian BartonFriend
Messages: 8
Registered: June 2012
Junior Member
GREAT Smile THANKS!
Previous Topic:conflict with parenthesis
Next Topic:(Fully)?QualifiedName
Goto Forum:
  


Current Time: Fri Apr 26 14:22:38 GMT 2024

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

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

Back to the top