Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Error 'Received wrong transfer data.'
Error 'Received wrong transfer data.' [message #645020] Wed, 15 December 2010 09:08 Go to next message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

Hello,

I'm facing a very weird problem - both my own diagrams as well as the
stock ecore diagram editor through lots of 'Received wrong transfer
data.' errors into the Error Log view when I drag elements from the tree
view into the canvas.

I must have changed something which caused this, because it didn't
happen in the past. But I don't know. I just wanted to ask here on the
list if someone else stumbled across this problem and might give me a hint.

I did trace org.eclipse.jface.util.LocalSelectionTransfer#nativeToJava()
where the error is thrown, but I don't really have clue yet about DND
handling so I can't really tell what's going on here.

Thanks!

Marius
Re: Error 'Received wrong transfer data.' [message #645024 is a reply to message #645020] Wed, 15 December 2010 09:23 Go to previous messageGo to next message
Philip Langer is currently offline Philip LangerFriend
Messages: 31
Registered: July 2009
Member
Hi Maruis,

The errors in the error log does not seems to be your fault. There is a
bug report on this topic:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302065

But I'm not sure what the current state of this bug is, though.

Best wishes,

Philip

On 2010-12-15 10:08, Marius Gröger wrote:
> Hello,
>
> I'm facing a very weird problem - both my own diagrams as well as the
> stock ecore diagram editor through lots of 'Received wrong transfer
> data.' errors into the Error Log view when I drag elements from the tree
> view into the canvas.
>
> I must have changed something which caused this, because it didn't
> happen in the past. But I don't know. I just wanted to ask here on the
> list if someone else stumbled across this problem and might give me a hint.
>
> I did trace org.eclipse.jface.util.LocalSelectionTransfer#nativeToJava()
> where the error is thrown, but I don't really have clue yet about DND
> handling so I can't really tell what's going on here.
>
> Thanks!
>
> Marius
Re: Error 'Received wrong transfer data.' [message #645025 is a reply to message #645020] Wed, 15 December 2010 09:26 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana FesenkoFriend
Messages: 21
Registered: May 2010
Junior Member
Hello Marius,

I've faced this problem on Linux. It was also discussed in SWT newsgroup.

The problem is on OS side. It only corrupts early feedback, but it doesn't
influence the result of drag-and-drop.

Best wishes,
Tatiana.
Re: Error 'Received wrong transfer data.' [message #645049 is a reply to message #645025] Wed, 15 December 2010 11:19 Go to previous message
Eclipse UserFriend
Originally posted by: marius.groeger.googlemail.com

On 15.12.2010 10:26, Tatiana Fesenko wrote:
> I'vehttps://bugs.eclipse.org/bugs/show_bug.cgi?id=327892 this problem on
> Linux. It was also discussed in
> http://dev.eclipse.org/newslists/news.eclipse.platform.swt/m sg41423.html
> The problem is on OS side. It only corrupts early feedback, but it doesn't
> influence the result of drag-and-drop.

Thanks, and it is quite puzzling that this hasn't been fixed. I have now
researched the code a bit and while still being far from fully
understanding all the details I found that if one does the following
work-around, the error goes away. The work-around uses the fact that a
LocalSelectionTransfer is assumed, and that the unmarshalled result
would be the IStructuredSelection which is dragged:

protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
getDiagramGraphicalViewer().addDropTargetListener(
new DropTargetListener(getDiagramGraphicalViewer(),
LocalSelectionTransfer.getTransfer()) {
protected Object getJavaObject(TransferData data) {
return LocalSelectionTransfer.getTransfer()
.getSelection();
//.nativeToJava(data);
}
});
...
}

As you can see, I only replaced the .nativeToJava(data) with
..getSelection().

Regards
Marius
Previous Topic:Create a new EditPart with ToolEntry is forbidden?
Next Topic:How to change the order in which the properties are listed ?
Goto Forum:
  


Current Time: Mon Sep 23 16:04:38 GMT 2024

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

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

Back to the top