Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Load model from xml file
Load model from xml file [message #427382] Mon, 16 February 2009 12:14 Go to next message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,
I have a little Problem with an Eclipse plugin which is based on the EMF
and GMF Frameworks.
EMF will load the models (agreeable with defined metamodels) only if you
need them. For Example I have da File called test.dm. If I open that File
in Eclipse EMF reads the xml File test.dm an put the data into memory.

Now the problem is, that I want EMF to that further.
Example:
I click on a defined button and EMF should then load the files in the
selected project from xml into memory.

Can someone tell me which EMF class is responsible for loading files from
xml into memory?

Thanks for your help
Alex
Re: Load model from xml file [message #427385 is a reply to message #427382] Mon, 16 February 2009 12:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
Alexi,

Comments below.

Alex wrote:
> Hello,
> I have a little Problem with an Eclipse plugin which is based on the
> EMF and GMF Frameworks.
> EMF will load the models (agreeable with defined metamodels) only if
> you need them. For Example I have da File called test.dm. If I open
> that File in Eclipse EMF reads the xml File test.dm an put the data
> into memory.
>
> Now the problem is, that I want EMF to that further. Example:
> I click on a defined button and EMF should then load the files in the
> selected project from xml into memory.
>
> Can someone tell me which EMF class is responsible for loading files
> from xml into memory?
Generally you'll be using ResourceSet.getResource(<URI>, true) to load
a resource into a resource set. Reading the introductory material
available on the documentation page will help.
>
> Thanks for your help
> Alex
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Load model from xml file [message #427387 is a reply to message #427385] Mon, 16 February 2009 13:08 Go to previous messageGo to next message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
hi,
great thanks for your help! I found a documentation about Saving and
Loading EMF Resources.
Only one Problem is left:

The plugin which I have to extend has plugin dependencies like:
org.eclipse.emf_2.3.0

Now changing the code to the effect that emf load the resources further is
not possible because the code is obfuscated.
On the eclipse download page I figured out that the current emf version is
2.5
Can you tell me where I can download the org.eclipse.emf_2.3.0 sources?
Probably I need that because of the compatibility of the current plugin.

Great thanks for your help!!
Bg
Alex
Re: Load model from xml file [message #427388 is a reply to message #427387] Mon, 16 February 2009 13:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33139
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090806030905050504080009
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Alex,

Comments below.

Alex wrote:
> hi,
> great thanks for your help! I found a documentation about Saving and
> Loading EMF Resources.
> Only one Problem is left:
>
> The plugin which I have to extend has plugin dependencies like:
> org.eclipse.emf_2.3.0
>
> Now changing the code to the effect that emf load the resources
> further is not possible because the code is obfuscated.
Obfuscated?
> On the eclipse download page I figured out that the current emf
> version is 2.5
> Can you tell me where I can download the org.eclipse.emf_2.3.0 sources?
> Probably I need that because of the compatibility of the current plugin.
The downloads page has the zips for all releases. The sources are part
of the SDK (packaged as source plugins):

http://archive.eclipse.org/modeling/emf/emf/downloads/drops/ 2.3.0/R200706262000/
http://archive.eclipse.org/modeling/emf/emf/downloads/drops/ 2.3.1/R200709252135/

>
> Great thanks for your help!!
> Bg
> Alex
>

--------------090806030905050504080009
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alex,<br>
<br>
Comments below.<br>
<br>
Alex wrote:
<blockquote
cite="mid:a2801c6b4fe5b00fa819b844fa8af9e5$1@www.eclipse.org"
type="cite">hi,
<br>
great thanks for your help! I found a documentation about Saving and
Loading EMF Resources.
<br>
Only one Problem is left:
<br>
<br>
The plugin which I have to extend has plugin dependencies like:
<br>
org.eclipse.emf_2.3.0
<br>
<br>
Now changing the code to the effect that emf load the resources further
is not possible because the code is obfuscated.
<br>
</blockquote>
Obfuscated?<br>
<blockquote
cite="mid:a2801c6b4fe5b00fa819b844fa8af9e5$1@www.eclipse.org"
type="cite">On the eclipse download page I figured out that the
current emf version is 2.5
<br>
Can you tell me where I can download the org.eclipse.emf_2.3.0 sources?
<br>
Probably I need that because of the compatibility of the current
plugin.
<br>
</blockquote>
The downloads page has the zips for all releases.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Load model from xml file [message #427389 is a reply to message #427388] Mon, 16 February 2009 13:56 Go to previous messageGo to next message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,
first of all: thanks again.

Obfuscated means that the plugin-dependency classes are unreadable:
.....
CHECKCAST org/eclipse/core/internal/preferences/DefaultPreferences
PUTFIELD
org/eclipse/core/internal/preferences/legacy/PreferenceForwa rder.defaultsRoot
: Lorg/eclipse/core/internal/preferences/DefaultPreferences;
L3
LINENUMBER 43 L3
ALOAD 0
ICONST_1
PUTFIELD
org/eclipse/core/internal/preferences/legacy/PreferenceForwa rder.notify : Z
L4
.....

Okay I tried to download the emf-sdo-xsd-SDK-2.3.2.zip and extracted the
archieve into my eclipse folder.
After restarting eclipse the problem is still present. I can't
read/edit/debug the code because it looks like above.

Bg
Alex
Re: Load model from xml file [message #427390 is a reply to message #427389] Mon, 16 February 2009 14:02 Go to previous message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Okay I got it.
I should look in emf classes and not .core classes :D
Sorry, my fault!
Thanks for help
Previous Topic:unresolving crossreferencer ... still resolves
Next Topic:[CDO] Editor based-on TransactionEditingdomain
Goto Forum:
  


Current Time: Tue Apr 23 06:54:22 GMT 2024

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

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

Back to the top