Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to get a Resource in a project
How to get a Resource in a project [message #1062637] Mon, 10 June 2013 08:28 Go to next message
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi all Smile

I have a org.eclipse.core.resources.IProject and I want to get (with a URI) a org.eclipse.emf.ecore.resource.Resource contained into it, how can I do?

I saw that to retrieve a Resource starting from another one there's this method into the utility class EcoreUtil2:

public static Resource getResource(Resource context, String uri)


but what about if I have to start from a project?


Thanks in advance,
Marco
Re: How to get a Resource in a project [message #1062652 is a reply to message #1062637] Mon, 10 June 2013 09:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
Have a look at IResourceSetProvider

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to get a Resource in a project [message #1062665 is a reply to message #1062652] Mon, 10 June 2013 10:07 Go to previous messageGo to next message
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi Christian the IResourceSetProvider seems perfect but I cannot access it from the domain package because it is in org.eclipse.xtext.ui.resource Shocked

[Updated on: Mon, 10 June 2013 10:07]

Report message to a moderator

Re: How to get a Resource in a project [message #1062674 is a reply to message #1062665] Mon, 10 June 2013 10:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14716
Registered: July 2009
Senior Member
STandalone you have no projects have you.

you may use standalonesetup.setplatformuri to get platform:/resource uris working if this is what you intend.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Migrating Xbase-using language to Xtext 2.4
Next Topic:Unresolvable proxies for operators after 2.4 migration
Goto Forum:
  


Current Time: Mon Sep 23 00:08:10 GMT 2024

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

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

Back to the top