[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.stp.sca-tools] Re: ecore model instance
|
Hi Stephane, Hi Ed,
thanks for helpful support. Let me add some more details.
Of course I used the "ScaResourceFactoryImpl" like shown in the following
code snippet (The hardcoded extension was only for testing purpose).
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(
"composite",
new ScaResourceFactoryImpl()
);
I'm not definitely sure whether I'm running on an OSGi environment but I
launched the App inside Eclipse as a oAW workflow which as far as I now is
running on Eclipse plattform. Furthere more the occuring Execption depicts
that the ScaResourceImpl overloads the load() method an calls some nativ
java code to parse the URI:
Caused by: java.net.MalformedURLException: unknown protocol: platform
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.eclipse.stp.sca.util.ScaResourceImpl.load(ScaResourceImpl.java:72)
I'll follow your suggestions and try to find the cause of my problem, I'll
post the solution when I fixed it.
Mischa
"Ed Merks" <Ed.Merks@xxxxxxxxx> schrieb im Newsbeitrag
news:gor6qb$l3o$2@xxxxxxxxxxxxxxxxxxxx
Stephane,
What the failure tells me is that Mischa is most likely not running as an
OSGi application. Eclipse registers the "platform" protocol properly so a
URL using it should work properly...
Stephane Drapeau wrote:
Mischa a écrit :
Hi,
now I tried loading the XML using the Ecore mechanism. Unfortunately it
failed. When using the ScaResourceImpl I get into trouble since the
implementation can't hanlde the eclipse "platform" scheme
(java.net.MalformedURLException: unknown protocol: platform).
This should work.
Have a look at ScaExample.java (plugin org.eclipse.stp.sca.test) and at
URI.createPlatformResourceURI(String, boolean).
Moreover, to create the Resource, use the SCAResourceFactoryImpl.
Stephane Drapeau
Obeo