From cd859ea2cdb2ae48c5292127501631f696df3a94 Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Thu, 8 Jan 2026 20:02:50 +0100 Subject: [PATCH] Compatibility with GEF 3.27.0 The exclusion set in method `findObjectAtExcluding()` may either contain edit parts (TreeViewer) or figures (GraphicalEditPart). --- .../wb/internal/gef/graphical/GraphicalViewer.java | 5 +++-- .../org/eclipse/wb/internal/gef/tree/TreeViewer.java | 9 +++++---- .../org/eclipse/wb/tests/gef/EmptyEditPartViewer.java | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/graphical/GraphicalViewer.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/graphical/GraphicalViewer.java index d77e8cb39..d87c3ad52 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/graphical/GraphicalViewer.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/graphical/GraphicalViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -150,7 +150,8 @@ public void setCursor(Cursor cursor) { */ @Override public EditPart findObjectAtExcluding(Point location, - final Collection exclude, + // TODO Draw2D - Typify once lower bound is 3.22 + @SuppressWarnings("rawtypes") final Collection exclude, final Conditional conditional) { EditPart editPart = findObjectAtExcluding(location, exclude, conditional, MENU_PRIMARY_LAYER); if (editPart == null) { diff --git a/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/tree/TreeViewer.java b/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/tree/TreeViewer.java index 0af735cab..1ab4198b3 100644 --- a/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/tree/TreeViewer.java +++ b/org.eclipse.wb.core/src-gef/org/eclipse/wb/internal/gef/tree/TreeViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -16,7 +16,6 @@ import org.eclipse.wb.internal.gef.core.AbstractEditPartViewer; import org.eclipse.wb.internal.gef.core.EditDomain; -import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.geometry.Point; import org.eclipse.gef.EditPart; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -190,7 +189,8 @@ public void setSelectionToTreeWidget() { */ @Override public EditPart findObjectAtExcluding(Point location, - Collection exclude, + // TODO Draw2D - Typify once lower bound is 3.22 + @SuppressWarnings("rawtypes") Collection exclude, Conditional conditional) { // simple check location Rectangle clientArea = m_tree.getClientArea(); @@ -217,7 +217,8 @@ public EditPart findObjectAtExcluding(Point location, @Override public EditPart findObjectAtExcluding(Point location, - Collection exclude, + // TODO Draw2D - Typify once lower bound is 3.22 + @SuppressWarnings("rawtypes") Collection exclude, Conditional conditional, String layer) { return null; diff --git a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EmptyEditPartViewer.java b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EmptyEditPartViewer.java index 821ee50b5..e011c1efd 100644 --- a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EmptyEditPartViewer.java +++ b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EmptyEditPartViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2025 Google, Inc. and others. + * Copyright (c) 2011, 2026 Google, Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -55,7 +55,8 @@ public void deselectAll() { @Override public EditPart findObjectAtExcluding(Point location, - Collection exclude, + // TODO Draw2D - Typify once lower bound is 3.22 + @SuppressWarnings("rawtypes") Collection exclude, Conditional conditional) { return null; }