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

Bug 484472

Summary: UnsupportedOperationException while multi selection on edges
Product: [Tools] GEF Reporter: Christoph Broeter <CBroeter>
Component: GEF ZestAssignee: gef-inbox <gef-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P3 CC: matthias.wienand, nyssen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Christoph Broeter CLA 2015-12-16 05:39:34 EST
An UnsupportedOperationException (shown below) when doing a multiselection.
The Exception is thrown if a vertex and an edge is selected.
Selecting only nodes will not lead to an exception while selecting only edges will result in an UnsupportedOperationException.
I've tried to add an implementation of an ISelectionChangedListener to the Viewer without any positive result.
Comment 1 Alexander Nyßen CLA 2015-12-16 05:46:21 EST
Can you please provide a StackTrace?
Comment 2 Christoph Broeter CLA 2015-12-16 05:52:47 EST
Exception in thread "JavaFX Application Thread" java.lang.UnsupportedOperationException
	at java.util.AbstractList.add(Unknown Source)
	at java.util.AbstractList.add(Unknown Source)
	at org.eclipse.gef4.zest.fx.parts.ZestFxFeedbackPartFactory.createSelectionFeedbackParts(ZestFxFeedbackPartFactory.java:104)
	at org.eclipse.gef4.mvc.fx.parts.FXDefaultFeedbackPartFactory.createFeedbackParts(FXDefaultFeedbackPartFactory.java:63)
	at org.eclipse.gef4.mvc.behaviors.AbstractBehavior.addFeedback(AbstractBehavior.java:86)
	at org.eclipse.gef4.mvc.behaviors.AbstractBehavior.addFeedback(AbstractBehavior.java:76)
	at org.eclipse.gef4.mvc.behaviors.SelectionBehavior.addFeedbackAndHandles(SelectionBehavior.java:54)
	at org.eclipse.gef4.mvc.behaviors.SelectionBehavior.propertyChange(SelectionBehavior.java:90)
	at java.beans.PropertyChangeSupport.fire(Unknown Source)
	at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at org.eclipse.gef4.mvc.models.SelectionModel.select(SelectionModel.java:174)
	at org.eclipse.gef4.mvc.fx.policies.FXMarqueeOnDragPolicy.release(FXMarqueeOnDragPolicy.java:180)
	at org.eclipse.gef4.mvc.fx.tools.FXClickDragTool$1.release(FXClickDragTool.java:175)
	at org.eclipse.gef4.fx.gestures.AbstractFXMouseDragGesture.onMouseEvent(AbstractFXMouseDragGesture.java:133)
	at org.eclipse.gef4.fx.gestures.AbstractFXMouseDragGesture$2.handle(AbstractFXMouseDragGesture.java:56)
	at org.eclipse.gef4.fx.gestures.AbstractFXMouseDragGesture$2.handle(AbstractFXMouseDragGesture.java:1)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(Unknown Source)
	at com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(Unknown Source)
	at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(Unknown Source)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at javafx.event.Event.fireEvent(Unknown Source)
	at com.sun.javafx.event.EventQueue.fire(Unknown Source)
	at javafx.scene.Scene$MouseHandler.handleEnterExit(Unknown Source)
	at javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
	at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at com.sun.javafx.tk.quantum.EmbeddedScene.lambda$null$291(Unknown Source)
	at com.sun.javafx.tk.quantum.EmbeddedScene$$Lambda$185/25371264.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.quantum.EmbeddedScene.lambda$mouseEvent$292(Unknown Source)
	at com.sun.javafx.tk.quantum.EmbeddedScene$$Lambda$184/15923117.run(Unknown Source)
	at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$172/7642858.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
	at com.sun.javafx.application.PlatformImpl$$Lambda$166/23146599.run(Unknown Source)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3767)
	at com.XYZ.zest.myProject.showGraph(myProject.java:117)
	at com.XYZ.zest.myProject.analyzeFiles(myProject.java:67)
	at com.XYZ.zest.myProject.main(myProject.java:197)
Comment 3 Alexander Nyßen CLA 2015-12-16 09:11:49 EST
It seems you are not running a current version. Can you please test the behavior with 3.11.0 M4 or the current head state? I cannot reproduce it there.
Comment 4 Christoph Broeter CLA 2015-12-17 10:02:53 EST
Hello!
I am using eclipse luna and the following plungins.
 org.eclipse.ui,
 org.eclipse.core.runtime,
 com.google.inject;bundle-version="3.0.0",
 com.google.guava;bundle-version="15.0.0",
 org.eclipse.gef4.common;bundle-version="0.1.0",
 org.eclipse.gef4.geometry;bundle-version="0.1.0",
 org.eclipse.gef4.geometry.convert.fx;bundle-version="0.1.0",
 org.eclipse.gef4.layout;bundle-version="0.1.1",
 org.eclipse.gef4.mvc;bundle-version="0.1.1",
 org.eclipse.gef4.mvc.fx;bundle-version="0.1.1",
 org.eclipse.gef4.mvc.fx.ui;bundle-version="0.1.1",
 org.eclipse.gef4.mvc.ui;bundle-version="0.1.1",
 org.eclipse.gef4.zest.fx;bundle-version="0.1.1",
 org.eclipse.gef4.zest.fx.ui;bundle-version="0.1.1",
 org.eclipse.gef4.graph;bundle-version="0.1.0",
 org.eclipse.gef4.fx;bundle-version="0.1.1",
 org.eclipse.gef4.fx.ui;bundle-version="0.1.0"

I dont know which version 3.11.0 M4 you mean.
It seems that you are referring to gef3 and I am using gef4/zest.
Comment 5 Christoph Broeter CLA 2015-12-17 10:13:13 EST
I am using eclipse (4.4.1) and have used the repository http://download.eclipse.org/releases/mars to install GEF4 Zest SDK
Comment 6 Alexander Nyßen CLA 2015-12-17 11:37:23 EST
(In reply to Christoph Broeter from comment #4)
> Hello!
> I am using eclipse luna and the following plungins.
>  org.eclipse.ui,
>  org.eclipse.core.runtime,
>  com.google.inject;bundle-version="3.0.0",
>  com.google.guava;bundle-version="15.0.0",
>  org.eclipse.gef4.common;bundle-version="0.1.0",
>  org.eclipse.gef4.geometry;bundle-version="0.1.0",
>  org.eclipse.gef4.geometry.convert.fx;bundle-version="0.1.0",
>  org.eclipse.gef4.layout;bundle-version="0.1.1",
>  org.eclipse.gef4.mvc;bundle-version="0.1.1",
>  org.eclipse.gef4.mvc.fx;bundle-version="0.1.1",
>  org.eclipse.gef4.mvc.fx.ui;bundle-version="0.1.1",
>  org.eclipse.gef4.mvc.ui;bundle-version="0.1.1",
>  org.eclipse.gef4.zest.fx;bundle-version="0.1.1",
>  org.eclipse.gef4.zest.fx.ui;bundle-version="0.1.1",
>  org.eclipse.gef4.graph;bundle-version="0.1.0",
>  org.eclipse.gef4.fx;bundle-version="0.1.1",
>  org.eclipse.gef4.fx.ui;bundle-version="0.1.0"
> 
> I dont know which version 3.11.0 M4 you mean.
> It seems that you are referring to gef3 and I am using gef4/zest.

I am of course referring to GEF4. The releases (and milestones) are labeled with respect to the overall GEF project, which is 3.10.0 for Mars, 3.10.1 for Mars.1 and 3.11.0 for Neon, which you can also infer from the release records provided at https://projects.eclipse.org/projects/tools.gef. The respective included GEF4 versions (which can also be inferred from the release records) are:

3.10.0 (Mars) -> GEF4 0.1.0
3.10.1 (Mars.1) -> GEF4 0.2.0
3.11.0 (Neon) -> GEF 0.3.0 (currently, may change to 1.0.0 with/after M5). 

With 3.11.0 M4 I am referring to the milestone that was promoted on Monday, which can be accessed from our update-site and drop-files, which are listed at https://projects.eclipse.org/projects/tools.gef/downloads.

The version you are using looks like some early 3.10.1 (Mars.1) snapshot that has never been released. The simrel update-site http://download.eclipse.org/releases/mars should only contain the 0.1.0 version (and as far as I can see it does), because we have published the 0.2.0 release only on our local releases update-site.
Comment 7 Christoph Broeter CLA 2016-01-12 04:34:04 EST
Since the update to GEF4 0.2.0 javafx.scene.* is missing.
Therefore a lot of my implementation has implementation problems.
For instance I used NodeContentPart to implement my own CustomNodeContentPart.
I hope you can help me.
Comment 8 Alexander Nyßen CLA 2016-01-12 05:09:13 EST
(In reply to Christoph Broeter from comment #7)
> Since the update to GEF4 0.2.0 javafx.scene.* is missing.
> Therefore a lot of my implementation has implementation problems.
> For instance I used NodeContentPart to implement my own
> CustomNodeContentPart.
> I hope you can help me.

That looks like a different problem related to e(fx)clipse and your setup. Let's better discuss this in the forum. Make sure you follow the adopter/contributor literally.
Comment 9 Matthias Wienand CLA 2016-01-25 07:37:08 EST
I resolved this ticket as invalid, because the issue cannot be reproduced anymore. Feel free to reopen this ticket if you still/again encounter the issue.