Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Get the file (.uml) generated (using a code to access the content of the uml file)
icon9.gif  Get the file (.uml) generated [message #1731112] Mon, 02 May 2016 21:30 Go to next message
jessica packer is currently offline jessica packerFriend
Messages: 9
Registered: March 2016
Junior Member
Hi members,

Once a UML model is created, the UML file is generated (.uml) in the project repository but I need to access it and get its content without opening the UML file.
I need the code that makes me able to get this content.
However, I have been wondering: Is it even possible?? Is there any code that offers this possibility?...

Your help is much appreciated.

Thank you in advance.

[Updated on: Mon, 02 May 2016 21:32]

Report message to a moderator

Re: Get the file (.uml) generated [message #1731186 is a reply to message #1731112] Tue, 03 May 2016 11:54 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Jessica,

What do you mean by not opening the UML file? Of course no software
can read the contents of this file without opening it.

A UML file is an EMF resource like any other. I'd suggest that you
have a look at documentation and tutorial material on the web (Google
will find much, especially at vogella.com) about working with EMF
resources and reading/modifying their contents. The objects that are
serialized in a UML resource conform to the interfaces of the UML API
when loaded, which offers rich facilities for introspecting and
manipulating the model.

HTH,

Christian


On 2016-05-02 21:30:31 +0000, jessica packer said:

> Hi members,
>
> Once a UML model is created, the UML file is generated (.uml) in the
> project repository but I need to access it and get its content without
> opening the UML file. I need the code that makes me able to get this
> content.
> However, I have been wondering: Is it possible??
>
> Your help is much appreciated.
>
> Thank you in advance.
Re: Get the file (.uml) generated [message #1731241 is a reply to message #1731186] Tue, 03 May 2016 17:23 Go to previous messageGo to next message
jessica packer is currently offline jessica packerFriend
Messages: 9
Registered: March 2016
Junior Member
Thank you for your reply.
What I meant with "not opening the UML file" is that I want to use a code to get its content and not accessing it directly from the project repository. Is that possible?...
Re: Get the file (.uml) generated [message #1731339 is a reply to message #1731241] Wed, 04 May 2016 12:41 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi,

Sorry, I still don't understand. What does "accessing it directly from
the project repository" mean? The EMF ResourceSet knows how to load
resources that are identified by a variety of URIs:

* platform:/resource/... for files in the Eclipse workspace
* platform:/plugin/... for files deployed in Eclipse bundles
* file:/... for files in the host operating system's filesystem
* http://... for resources on the web

If "project repository" is the workspace, you need the first kind of
URI. If it's an arbitrary Git repository, you may need the thrid or
even the fourth. Where is your UML file located?

Have you tried loading your UML resource into a resource set?
Following a suitable tutorial?

Christian

On 2016-05-03 17:23:24 +0000, jessica packer said:

> Thank you for your reply.
> What I meant with "not opening the UML file" is that I want to use a
> code to get its content and not accessing it directly from the project
> repository. Is that possible?...
Previous Topic:PluginUML2: Validating a uml diagram
Next Topic:How to manipulate UML Class Diagram Elements
Goto Forum:
  


Current Time: Fri Apr 26 08:10:17 GMT 2024

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

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

Back to the top