Load Ressource [message #425753] |
Sun, 07 December 2008 16:50  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------040108050205050301090808
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Hello,
i have build a default.uma file with some elements in it. It is
generated like this :
<?xml version="1.0" encoding="UTF-8"?>
<uma:MethodLibrary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:uma="http://www.eclipse.org/epf/uma/1.0.5"
name="EPFPracLib_20080306" briefDescription=""
id="_TJVNUOvFEdyp6czxLiQq9g" orderingGuide="" presentationName=""
suppressed="false" authors="" changeDescription="" version=""
tool="epf=1.5.0">
<MethodPlugin name="Test">
</MethodPlugin>
</uma:MethodLibrary>
Now i want to load this file programmatically on this way:
URI fileURI = URI.createFileURI((String) actLayer.getPath());
Resource resource = new XMIResourceImpl(fileURI);
try {
resource.load(null);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
If i do this, the feature MethodPlugin ist not found, but if i rewrite
the feature with a lower letter methodPlugin he founds the feature. But
then the editor says he cant open the file because he can not found the
feature methodPlugin.
I think it depends on the eAnnotations in the ecore file. Is there
another way to load the resource, without rewriting the letters?
Thanks in advance
J
|
|
|
|
Re: Load Ressource [message #425757 is a reply to message #425755] |
Sun, 07 December 2008 18:52  |
Eclipse User |
|
|
|
Jörg,
Be sure to invoke "Generate Test Code" and look closely at the generated
XyzExample.java. In general you should be loading that example shows you...
Jörg wrote:
> I forgot to use the option.
>
> HashMap options = new HashMap();
> options.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
> resource.load(options);
>
> This is the way, how it works.
>
> Jörg schrieb:
>> Hello,
>> i have build a default.uma file with some elements in it. It is
>> generated like this :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <uma:MethodLibrary
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:uma="http://www.eclipse.org/epf/uma/1.0.5"
>> name="EPFPracLib_20080306" briefDescription=""
>> id="_TJVNUOvFEdyp6czxLiQq9g" orderingGuide="" presentationName=""
>> suppressed="false" authors="" changeDescription="" version=""
>> tool="epf=1.5.0">
>> <MethodPlugin name="Test">
>> </MethodPlugin>
>> </uma:MethodLibrary>
>>
>> Now i want to load this file programmatically on this way:
>>
>> URI fileURI = URI.createFileURI((String)
>> actLayer.getPath());
>> Resource resource = new XMIResourceImpl(fileURI);
>> try {
>> resource.load(null);
>> } catch (IOException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>> If i do this, the feature MethodPlugin ist not found, but if i
>> rewrite the feature with a lower letter methodPlugin he founds the
>> feature. But then the editor says he cant open the file because he
>> can not found the feature methodPlugin.
>>
>> I think it depends on the eAnnotations in the ecore file. Is there
>> another way to load the resource, without rewriting the letters?
>>
>> Thanks in advance
>> Jörg
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04900 seconds