Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Copy/Paste question - how can I change an attribute value on a paste?
Copy/Paste question - how can I change an attribute value on a paste? [message #196997] Mon, 14 July 2008 21:42 Go to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
I have the copy/paste working using UUID's and that all appears to work
fine, however, upon paste, I would like to change the value of an
attribute so it does not conflict with the one it was copied from...


So I copy this element...
<element name="abc" xmi:id="asdqweasd..." >
...
</element>

and on paste I want it to be:
<element name="copy of abc" xmi:id="lkjlkjdfa..." >
...
</element>

where name is what I want to change, xmi:id is already changed for me...

I'm failing to find a way to hook into to perform this operation...
Thanks in advance for any input..

Brian Jakubik
Re: Copy/Paste question - how can I change an attribute value on a paste? [message #197007 is a reply to message #196997] Mon, 14 July 2008 22:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jk6803.yahoo.com

Hi

Can you post your solution of copy and paste?. I am struggling how to make
it works.
Re: Copy/Paste question - how can I change an attribute value on a paste? [message #197108 is a reply to message #197007] Tue, 15 July 2008 13:55 Go to previous messageGo to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
YJ wrote:
> Hi
>
> Can you post your solution of copy and paste?. I am struggling how to
> make it works.
>
>
YJ, have a look at:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. gmf.doc/tutorials/msl/clipboardTutorial.html
Re: Copy/Paste question - how can I change an attribute value on a paste? [message #199848 is a reply to message #197108] Fri, 01 August 2008 12:59 Go to previous message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hello All,

I'm using Copy/Paste feature of GMF 2.0 for my GMF editor.
But upon paste, I would like to change the value of an attribute(like uuid
to unique uuid) so that it does not conflict with the one it was copied
from.

I checked the imlpementation of CopyOperation Class and PasteOperation
Class.
But i'm not able to find where should I make the change to handle unique
attribute generation.

Thanks in advance.

Regards,
Shwetha
Previous Topic:Properties view
Next Topic:How to prevent the directed connections becoming circle by configuring OCL in gmfmap?
Goto Forum:
  


Current Time: Thu Mar 28 12:48:08 GMT 2024

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

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

Back to the top