Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Tool Palette drag and drop error
Tool Palette drag and drop error [message #1334681] Mon, 05 May 2014 18:02 Go to next message
Nickie woo is currently offline Nickie wooFriend
Messages: 21
Registered: February 2014
Junior Member

I got stuck with a very strange problem while implementing dynamic tool palette.
My palette change its contents every time a shape on the diagram is selected, i do this by overriding the getPallete() method from ToolBehavior and immediately i got this error when drag and drop a tool from the palette.

	at org.eclipse.gef.internal.ui.palette.editparts.ToolEntryEditPart$ToggleButtonTracker.handleNativeDragFinished(
	at org.eclipse.gef.EditDomain.nativeDragFinished(
	at org.eclipse.swt.dnd.DNDListener.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Widget.notifyListeners(
	at org.eclipse.swt.dnd.DragSource.drag(
	at org.eclipse.swt.dnd.DragSource.access$0(
	at org.eclipse.swt.dnd.DragSource$1.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Display.runDeferredEvents(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
	at org.eclipse.ui.internal.Workbench$
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(
	at org.eclipse.equinox.launcher.Main.basicRun(
	at org.eclipse.equinox.launcher.Main.main(

When i debug this problem it turns out the getPaletteViewer() from ToolEntryEditPart returns null but have no idea what causes this.

protected boolean handleNativeDragFinished(DragSourceEvent event) {
			return true;

Anyone have any ideas what might cause this ? Sad
Re: Tool Palette drag and drop error [message #1341462 is a reply to message #1334681] Thu, 08 May 2014 13:48 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1890
Registered: July 2009
Location: Walldorf, Germany
Senior Member

it seems you try to exchange the palette in an open editor. As far as I can
remember the details of the internal implementation on this, this is not
supported by GEF our of the box. Not sure if that is doable...

Previous Topic:DiagramComposite in Eclipse 4
Next Topic:Property Sheet & Buttons
Goto Forum:

Current Time: Thu May 24 16:07:49 GMT 2018

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

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

Back to the top