Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Change ID of element
Change ID of element [message #478063] Fri, 12 December 2008 09:35 Go to next message
Iris Groher is currently offline Iris GroherFriend
Messages: 33
Registered: July 2009
Member
Hi all,

I deleted a UML class by executing a delete command. Then I created a new
class using an add command. Is it possible to set the ID of the newly
created class to the id of the deleted element?

I got the id of the deleted element by calling
element.eResource().getURIFragment(element).

Thank you very much for your help!

Greetings,
Iris.
Re: Change ID of element [message #478088 is a reply to message #478063] Mon, 22 December 2008 16:33 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Iris,

You can set the ID of an element using XMLResource#setID(EObject, String).

Kenn

"Iris" <Iris.Groher@gmx.at> wrote in message
news:146a2d0ad094b8659b0f25dfbd6fc44f$1@www.eclipse.org...
> Hi all,
>
> I deleted a UML class by executing a delete command. Then I created a new
> class using an add command. Is it possible to set the ID of the newly
> created class to the id of the deleted element?
>
> I got the id of the deleted element by calling
> element.eResource().getURIFragment(element).
>
> Thank you very much for your help!
>
> Greetings,
> Iris.
>
Re: Change ID of element [message #627297 is a reply to message #478063] Mon, 22 December 2008 16:33 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Iris,

You can set the ID of an element using XMLResource#setID(EObject, String).

Kenn

"Iris" <Iris.Groher@gmx.at> wrote in message
news:146a2d0ad094b8659b0f25dfbd6fc44f$1@www.eclipse.org...
> Hi all,
>
> I deleted a UML class by executing a delete command. Then I created a new
> class using an add command. Is it possible to set the ID of the newly
> created class to the id of the deleted element?
>
> I got the id of the deleted element by calling
> element.eResource().getURIFragment(element).
>
> Thank you very much for your help!
>
> Greetings,
> Iris.
>
Previous Topic:Is there anybody who use Papyrus UML?
Next Topic:UML generate with CDO support
Goto Forum:
  


Current Time: Fri Apr 19 14:24:00 GMT 2024

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

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

Back to the top