From 1234a6526a8a8f99229da44001657c31b68e72e8 Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Tue, 30 Apr 2024 17:19:04 +0200 Subject: [PATCH] Stash --- .../org/eclipse/wb/internal/draw2d/FigureCanvas.java | 10 ++-------- org.eclipse.wb.tests/pom.xml | 2 +- .../designer/swt/model/menu/MenuProblemsTest.java | 6 +++--- .../src/org/eclipse/wb/tests/gef/EventSender.java | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/org.eclipse.wb.core/src-draw2d/org/eclipse/wb/internal/draw2d/FigureCanvas.java b/org.eclipse.wb.core/src-draw2d/org/eclipse/wb/internal/draw2d/FigureCanvas.java index 60492d45b..b47295c06 100644 --- a/org.eclipse.wb.core/src-draw2d/org/eclipse/wb/internal/draw2d/FigureCanvas.java +++ b/org.eclipse.wb.core/src-draw2d/org/eclipse/wb/internal/draw2d/FigureCanvas.java @@ -23,8 +23,6 @@ import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; /** * A Canvas that contains {@link Figure Figures}. @@ -117,6 +115,7 @@ public RootFigure getRootFigure() { * Sets draw cached mode. */ public void setDrawCached(boolean value) { + System.out.println("m_drawCached -> " + value); m_drawCached = value; } @@ -137,12 +136,7 @@ public Point computeSize(int wHint, int hHint, boolean changed) { // //////////////////////////////////////////////////////////////////////////// private void hookControlEvents() { - addListener(SWT.Dispose, new Listener() { - @Override - public void handleEvent(Event event) { - disposeBufferedImage(); - } - }); + addListener(SWT.Dispose, event -> disposeBufferedImage()); } private void handlePaint(GC paintGC, int x, int y, int width, int height) { diff --git a/org.eclipse.wb.tests/pom.xml b/org.eclipse.wb.tests/pom.xml index 6309e980e..5b95d2312 100644 --- a/org.eclipse.wb.tests/pom.xml +++ b/org.eclipse.wb.tests/pom.xml @@ -77,7 +77,7 @@ true org.eclipse.ui.ide.workbench - **/org.eclipse.wb.tests.designer.WindowBuilderTests.java + **/org.eclipse.wb.tests.designer.swt.model.menu.MenuProblemsTest.java diff --git a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swt/model/menu/MenuProblemsTest.java b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swt/model/menu/MenuProblemsTest.java index a4f2545f3..058b93730 100644 --- a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swt/model/menu/MenuProblemsTest.java +++ b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swt/model/menu/MenuProblemsTest.java @@ -122,7 +122,7 @@ public void test_AsyncMessagesSupport_andMenuGEF() throws Exception { * * @throws Exception */ - @Test + // @Test public void test_cascadeSubMenu_andRCP() throws Exception { CompositeInfo shellInfo = openComposite( @@ -170,7 +170,7 @@ public void test_cascadeSubMenu_andRCP() throws Exception { * This case is not problem, because {@link EditPart} for {@link MenuInfo} is first, so we click * it. */ - @Test + // @Test public void test_TableColumn_PopupMenu_menuFirst() throws Exception { check_TableColumn_PopupMenu( "public class Test extends Shell {", @@ -196,7 +196,7 @@ public void test_TableColumn_PopupMenu_menuFirst() throws Exception { * {@link EditPart} of {@link MenuInfo} is second, so we should place it on menu primary layer to * make it above {@link TableColumnInfo}. */ - @Test + // @Test public void test_TableColumn_PopupMenu_menuSecond() throws Exception { check_TableColumn_PopupMenu( "public class Test extends Shell {", diff --git a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EventSender.java b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EventSender.java index 5bbfb3646..55f611ebd 100644 --- a/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EventSender.java +++ b/org.eclipse.wb.tests/src/org/eclipse/wb/tests/gef/EventSender.java @@ -130,7 +130,7 @@ public EventSender moveTo(int x, int y) { Event event = createEvent(x, y, 0); m_control.notifyListeners(SWT.MouseMove, event); // process "async" runnables - waitEventLoop(10); + waitEventLoop(0); return this; }