Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to provide DND from TreeViewer to GMF generated Editor?
How to provide DND from TreeViewer to GMF generated Editor? [message #169448] Wed, 23 January 2008 11:50 Go to next message
Eclipse UserFriend
Originally posted by: amsurana.in.ibm.com

This is a multipart message in MIME format.
--=_alternative 0040995D652573D9_=
Content-Type: text/plain; charset="US-ASCII"

Hi,
I am writing an application using EMF & GMF.
GMF in its generated code creates an editor that extends
DiagramDocumentEditor. The palette has a tool "Person Details". This tool
lets u create a Node with a Person Name.
I have a tree viewer that displays Strings of Text with UserNames.



My Doubt:

When i drag a particular Tree item (User Name) from the TreeViewer on to
the Editor, a diagram Node (person Details Node) must be created with the
Username in the Name field of that node.

Can anyone help me figure out
1. How to provide Drop support to the editor. Or should I provide Drop
support to the Container.
2. What kind of transfer takes place ? TextTransfer, FileTransfer, etc...
2. When drop is performed what statements should be written that help in
creating new Node. ( I mean what are classes to be called to create the
node)

I am using GMF v 2.0.1 on Eclipse Europa 3.3

Regards
Amit
--=_alternative 0040995D652573D9_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi, <br>
I am writing an application using EMF &amp; GMF. <br>
GMF in its generated code creates an editor that extends </font><font size=2 face="Courier New">DiagramDocumentEditor</font><font size=2 face="sans-serif">.
&nbsp;The palette has a tool &quot;Person Details&quot;. This tool lets
u create a Node with a Person Name.</font><font size=3> </font><font size=2 face="sans-serif"><br>
I have a tree viewer that displays Strings of Text with UserNames. </font><font size=3><br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
My Doubt: </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
When i drag a particular Tree item (User Name) from the TreeViewer on to
the Editor, a diagram Node (person Details Node) &nbsp;must be created
with the Username in the Name field of that node.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Can anyone help me figure out</font><font size=3> </font><font size=2 face="sans-serif"><br>
1. How to provide Drop support to the editor. Or should I provide Drop
support to the Container. <br>
2. What kind of transfer takes place ? TextTransfer, FileTransfer, etc...
<br>
2. When drop is performed what statements should be written that help in
creating new Node. ( I mean what are classes to be called to create the
node) </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
I am using GMF v 2.0.1 on Eclipse Europa 3.3</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Regards <br>
Amit </font>
--=_alternative 0040995D652573D9_=--
Re: How to provide DND from TreeViewer to GMF generated Editor? [message #169465 is a reply to message #169448] Wed, 23 January 2008 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------090803020503050000040701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Amit,

Please don't cross post the same question to multiple groups using
separate notes. If you must cross post, which seems pointless in this
case, use a single posting addressed to all the groups.


amsurana@in.ibm.com wrote:
>
> Hi,
> I am writing an application using EMF & GMF.
> GMF in its generated code creates an editor that extends
> DiagramDocumentEditor. The palette has a tool "Person Details". This
> tool lets u create a Node with a Person Name.
> I have a tree viewer that displays Strings of Text with UserNames.
>
>
>
> My Doubt:
>
> When i drag a particular Tree item (User Name) from the TreeViewer on
> to the Editor, a diagram Node (person Details Node) must be created
> with the Username in the Name field of that node.
>
> Can anyone help me figure out
> 1. How to provide Drop support to the editor. Or should I provide Drop
> support to the Container.
> 2. What kind of transfer takes place ? TextTransfer, FileTransfer, etc...
> 2. When drop is performed what statements should be written that help
> in creating new Node. ( I mean what are classes to be called to create
> the node)
>
> I am using GMF v 2.0.1 on Eclipse Europa 3.3
>
> Regards
> Amit


--------------090803020503050000040701
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Amit,<br>
<br>
Please don't cross post the same question to multiple groups using
separate notes.&nbsp; If you must cross post, which seems pointless in this
case, use a single posting addressed to all the groups.<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:amsurana@in.ibm.com">amsurana@in.ibm.com</a> wrote:
<blockquote cite="mid:fn79lb$vqp$2@build.eclipse.org" type="cite"><br>
<font face="sans-serif" size="2">Hi, <br>
I am writing an application using EMF &amp; GMF. <br>
GMF in its generated code creates an editor that extends </font><font
face="Courier New" size="2">DiagramDocumentEditor</font><font
face="sans-serif" size="2">.
&nbsp;The palette has a tool "Person Details". This tool lets
u create a Node with a Person Name.</font><font size="3"> </font><font
face="sans-serif" size="2"><br>
I have a tree viewer that displays Strings of Text with UserNames. </font><font
size="3"><br>
<br>
<br>
</font><font face="sans-serif" size="2"><br>
My Doubt: </font><font size="3"><br>
</font><font face="sans-serif" size="2"><br>
When i drag a particular Tree item (User Name) from the TreeViewer on
to
the Editor, a diagram Node (person Details Node) &nbsp;must be created
with the Username in the Name field of that node.</font><font size="3">
<br>
</font><font face="sans-serif" size="2"><br>
Can anyone help me figure out</font><font size="3"> </font><font
face="sans-serif" size="2"><br>
1. How to provide Drop support to the editor. Or should I provide Drop
support to the Container. <br>
2. What kind of transfer takes place ? TextTransfer, FileTransfer,
etc...
<br>
2. When drop is performed what statements should be written that help
in
creating new Node. ( I mean what are classes to be called to create the
node) </font><font size="3"><br>
</font><font face="sans-serif" size="2"><br>
I am using GMF v 2.0.1 on Eclipse Europa 3.3</font><font size="3"> <br>
</font><font face="sans-serif" size="2"><br>
Regards <br>
Amit </font>
</blockquote>
<br>
</body>
</html>

--------------090803020503050000040701--
Re: How to provide DND from TreeViewer to GMF generated Editor? [message #169535 is a reply to message #169448] Wed, 23 January 2008 17:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello amsurana@in.ibm.com,

You can take GMF-generated org.eclipse.gmf.ecore.editor as an example - D&Ds
from domain/diagram model contents in Project Explorer + EMF-generated Ecore
tree editor are supported there.

-----------------
Alex Shatalin
Re: How to provide DND from TreeViewer to GMF generated Editor? [message #169615 is a reply to message #169465] Thu, 24 January 2008 05:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amsurana.in.ibm.com

This is a multipart message in MIME format.
--=_alternative 001B763F652573DA_=
Content-Type: text/plain; charset="US-ASCII"

That was by mistake. I actually wanted to post only in GMF newgroup..
Thanks for correcting me...

Can u provide any solution ??
--=_alternative 001B763F652573DA_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">&nbsp;That was by mistake. I actually
wanted to post only in GMF newgroup.. </font>
<br><font size=2 face="sans-serif">Thanks for correcting me... </font>
<br>
<br><font size=2 face="sans-serif">Can u provide any solution ?? </font>
--=_alternative 001B763F652573DA_=--
Re: How to provide DND from TreeViewer to GMF generated Editor? [message #169659 is a reply to message #169535] Thu, 24 January 2008 11:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi Alex,

Thanks for the info.I tried it and its exaclty the same output even i was
looking for my application.
Can you please tell me which class in ecore.editor implements this
functionality so that i can look into it.

Thanks in advance.

Regards,
Shwetha
Re: How to provide DND from TreeViewer to GMF generated Editor? [message #169789 is a reply to message #169659] Fri, 25 January 2008 08:42 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Shwetha,

You can start with EcoreDiagramEditor.DropTargetListener, see in addition
DragDropEditPolicy installed in each ???EditPart.

-----------------
Alex Shatalin
Previous Topic:Double connection
Next Topic:Create Diagram Wizard from a property
Goto Forum:
  


Current Time: Fri Apr 26 22:38:37 GMT 2024

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

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

Back to the top