Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 481662

Summary: Logo example, the add tool throws ClassCastException
Product: [Tools] GEF Reporter: Frank Benoit <frank.rene.benoit>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Frank Benoit CLA 2015-11-08 13:58:47 EST
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: javafx.scene.Group cannot be cast to javafx.scene.layout.Pane
	at org.eclipse.gef4.mvc.examples.logo.policies.FXCreationMenuOnClickPolicy.openMenu(FXCreationMenuOnClickPolicy.java:356)
	at org.eclipse.gef4.mvc.examples.logo.policies.FXCreationMenuOnClickPolicy.click(FXCreationMenuOnClickPolicy.java:174)
	at org.eclipse.gef4.mvc.fx.tools.FXClickDragTool$1.press(FXClickDragTool.java:180)


a cast to Group solves this place, then it throws at closing the tool. There as well a cast can help.

But i think the "add tool" is not working anymore, even if those casts are fixed.
Comment 1 Alexander Nyßen CLA 2015-11-08 16:25:06 EST
Pushed the following changes to origin/master:
- Fixed ClassCastExceptions within FXCreationMenuOnClickPolicy that were caused by not reflecting the changes made when introducing InfiniteCanvas (see bug #479395).
- Ensured that the creation menu reflects the scaling of the content transform.

Resolving as fixed in 3.11.0 M3.