From f3b494833df4cb7de4268b0c0f17fd1e2dcbb1e5 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Wed, 4 Aug 2010 13:40:43 +0000 Subject: [PATCH] Changed SelectionProcessor to receive Collection instead of ISelection as the input selection. This is because of Eclipse bug #254570 which causes StructuredSelection to be unusable as a DB query identity. Also changed GE mouse doubleclick handlers to pass the direct contents of the GE's selection to the double click handlers instead of the data behind TreeItem.getData(). This makes double click handling uniform with respect to other selection testing, which is performed in EditorAdapter implementations for example. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@16942 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../sysdyn/ui/properties/ResourceSelectionProcessor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java index 8dcc4316..267cae35 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/properties/ResourceSelectionProcessor.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import org.eclipse.jface.viewers.ISelection; import org.simantics.browsing.ui.SelectionProcessor; import org.simantics.browsing.ui.swt.ComparableTabContributor; import org.simantics.db.ReadGraph; @@ -16,10 +15,10 @@ import org.simantics.modeling.ModelingResources; import org.simantics.sysdyn.SysdynResource; import org.simantics.ui.utils.AdaptionUtils; -public class ResourceSelectionProcessor implements SelectionProcessor { +public class ResourceSelectionProcessor implements SelectionProcessor { @Override - public Collection process(ISelection selection, ReadGraph backend) { + public Collection process(Object selection, ReadGraph backend) { Resource r = AdaptionUtils.adaptToSingle(selection, Resource.class); if(r == null) return Collections.emptyList(); -- 2.47.1