| Create a ResourceSet of Filesystem [message #802171] |
Sun, 19 February 2012 09:38  |
Snakebyte Missing name Messages: 130 Registered: November 2011 |
Senior Member |
|
|
Hello,
i currently using GMF facing the following problem.
I want to create a ResourceSet out of a filesystem. This means i have a set of files, all belonging to the same gmfmodel.
Is there any chance to read this files and create a big ResourceSet out of it ?
Could somebody give me a hint on how to do that ?
Greetings
|
|
|
|
| Re: Create a ResourceSet of Filesystem [message #802254 is a reply to message #802196] |
Sun, 19 February 2012 12:37   |
Snakebyte Missing name Messages: 130 Registered: November 2011 |
Senior Member |
|
|
Ok this works great.
But when im trying to load a resource containing references to other files it crahes with an IllegalValueException.
What can i do to load these missing resources recursivly and automatically ?
The problem is i dont know the references before loading. And there can be many of such references in my application. So i cant load the resources in a tree-like structure.
Is it possible to load a set of resources ?
Or other ways to handle this?
Greetings
[Updated on: Sun, 19 February 2012 13:07] Report message to a moderator
|
|
|
|
| Re: Create a ResourceSet of Filesystem [message #802280 is a reply to message #802279] |
Sun, 19 February 2012 13:27   |
Snakebyte Missing name Messages: 130 Registered: November 2011 |
Senior Member |
|
|
They "can" be set dynamically during runtime. But they dont need to be set. The respektive attribute can still be empty.
I have some objects in my model that contain this references.
Maybe this exeption explains it a bit more :
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.IllegalValueException: Value 'gsnModel.impl.GoalImpl@42f25b18 (eProxyURI: file:/C:/Users/Snakebyte/runtime-EclipseApplication/newTreeTest/Top.model_diagram#_S07Z4FixEeG3ktPfKTiLJw)' is not legal. (file:/C:/Users/Snakebyte/runtime-EclipseApplication/newTreeTest/FirstSub.model_diagram, 12, 101)
The File "Top.model_diagram" contains an object, containing an attribute that can be set to an object (Goal) in File "FirstSub.model_diagram".
So i cant load FirstSub without loading Top
But what if Top has such references in FirstSub too ?
Is that not possible at all ?
The source seems to raise this exception if there is such a proxy value that cant be found. Is it not found because it is not contained in the ResourceSet ?
If i try to load a file dont containing any cross-references it works great.
Greetings
[Updated on: Sun, 19 February 2012 13:47] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01923 seconds