MenuComplexTest test_showOnlyOneDropDownOnCanvas failed on Windows

Open
#1,625 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
testing-qa

Research direction

Start with MenuComplexTest.java at line 1241 and run test_showOnlyOneDropDownOnCanvas on Windows. Compare its setup and teardown with test_CREATE_bar_newItem_after, then review issue #1344 for related context. Done means the test no longer reads the previous test's ICompilationUnit data and passes in the Windows action run.

Written by the indexing model from the issue text.

Description

https://github.com/eclipse-windowbuilder/windowbuilder/actions/runs/35398246491/job/105786414153?pr=1624

Index 1 out of bounds for length 1
java.lang.IndexOutOfBoundsException: Index 1 out of bounds for length 1
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
	at java.base/java.util.Objects.checkIndex(Objects.java:365)
	at java.base/java.util.ArrayList.get(ArrayList.java:428)
	at org.eclipse.wb.tests.designer.swt.model.menu.MenuComplexTest.test_showOnlyOneDropDownOnCanvas(MenuComplexTest.java:1241)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at org.eclipse.wb.tests.designer.core.model.parser.AbstractJavaInfoTest$JavaInfoExtension.interceptTestMethod(AbstractJavaInfoTest.java:88)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
Building,null - 1
Workbench Auto-Save Job,null - 1
Periodic workspace save.,null - 1
Compacting resource model,null - 1
Sept. 18, 2026 9:56:04 PM org.eclipse.wb.tests.designer.tests.DesignerTestCase$LoggerExtension beforeTestExecution
INFORMATION: MenuComplexTest:test_showOnlyOneDropDownOnCanvas()
##### Source Code: 
package test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.custom.*;
import org.eclipse.jface.viewers.*;
import org.eclipse.jface.preference.*;
import org.eclipse.jface.resource.*;
import org.eclipse.ui.forms.*;
import org.eclipse.ui.forms.widgets.*;
public class Test extends Shell {
	public Test() {
		Menu bar = new Menu(this, SWT.BAR);
		setMenuBar(bar);
		{
			MenuItem item_1 = new MenuItem(bar, SWT.NONE);
			item_1.setText("Item 1");
		}
	}
}

##### Source File: 
package test;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.custom.*;
import org.eclipse.jface.viewers.*;
import org.eclipse.jface.preference.*;
import org.eclipse.jface.resource.*;
import org.eclipse.ui.forms.*;
import org.eclipse.ui.forms.widgets.*;
public class Test extends Shell {
	public Test() {
		Menu bar = new Menu(this, SWT.BAR);
		setMenuBar(bar);
		{
			MenuItem item_1 = new MenuItem(bar, SWT.CASCADE);
			item_1.setText("Item 1");
			{
				Menu menu_1 = new Menu(item_1);
				item_1.setMenu(menu_1);
			}
		}
		{
			MenuItem item_2 = new MenuItem(bar, SWT.CASCADE);
			item_2.setText("Item 2");
		}
	}
}

##### Hierarchy: 
{this: org.eclipse.swt.widgets.Shell} {this} {/new Menu(this, SWT.BAR)/ /setMenuBar(bar)/}
	{implicit-layout: absolute} {implicit-layout} {}
	{new: org.eclipse.swt.widgets.Menu} {local-unique: bar} {/new Menu(this, SWT.BAR)/ /setMenuBar(bar)/ /new MenuItem(bar, SWT.NONE)/}
		{new: org.eclipse.swt.widgets.MenuItem} {local-unique: item_1} {/new MenuItem(bar, SWT.NONE)/ /item_1.setText("Item 1")/}

The same as https://github.com/eclipse-windowbuilder/windowbuilder/issues/1344. Somehow, the ICompilationUnit is still using the data from the previous test (test_CREATE_bar_newItem_after).

Dominant language
Java
Stars
97
Forks
34
Avg merge
1d 2h
Merged PRs (30d)
38

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-windowbuilder/windowbuilder

All issues in eclipse-windowbuilder/windowbuilder

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.