Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xtend SWTBot tests fail #3229

Open
LorenzoBettini opened this issue Oct 17, 2024 · 10 comments
Open

Xtend SWTBot tests fail #3229

LorenzoBettini opened this issue Oct 17, 2024 · 10 comments

Comments

@LorenzoBettini
Copy link
Contributor

Maybe something has changed in the UI

Could not find shell matching: with regex '<([
]|.)*Profile.*([
]|.)*>'
org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: 
Could not find shell matching: with regex '<([
]|.)*Profile.*([
]|.)*>'
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:473)
	at org.eclipse.swtbot.swt.finder.SWTBot.waitUntilWidgetAppears(SWTBot.java:1)
	at org.eclipse.xtend.ide.swtbot.lowlevel.XtextSWTBot.waitUntilWidgetAppears(XtextSWTBot.java:1)
	at org.eclipse.xtend.ide.swtbot.lowlevel.XtextSWTBot.shellsWithRegex(XtextSWTBot.java:39)
	at org.eclipse.xtend.ide.swtbot.lowlevel.XtextSWTBot.shellWithRegex(XtextSWTBot.java:33)
	at org.eclipse.xtend.ide.swtbot.api.preferences.XtendFormatterPreferencePageAPI.openEditDialog(XtendFormatterPreferencePageAPI.java:28)
	at org.eclipse.xtend.ide.tests.preferences.FormatterPreferencesTest.formatterPreferencesEditDialog_CanBeOpenedAndAllSectionsExist(FormatterPreferencesTest.java:44)
@LorenzoBettini
Copy link
Contributor Author

No, it's worse than that: the formatter page is not displayed at all:

image

@LorenzoBettini
Copy link
Contributor Author

That's the stacktrace when opening the dialog from a runtime instance:

org.eclipse.core.runtime.AssertionFailedException: null argument:
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:92)
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:79)
	at org.eclipse.jface.resource.ColorRegistry.get(ColorRegistry.java:157)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.createAnnotationPainter(SourceViewerDecorationSupport.java:894)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.showAnnotations(SourceViewerDecorationSupport.java:850)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.updateTextDecorations(SourceViewerDecorationSupport.java:306)
	at org.eclipse.ui.texteditor.SourceViewerDecorationSupport.install(SourceViewerDecorationSupport.java:274)
	at org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorFactory$Builder.withParent(EmbeddedEditorFactory.java:274)
	at org.eclipse.xtend.ide.formatting.preferences.XtendPreviewFactory.createNewPreview(XtendPreviewFactory.java:35)
	at org.eclipse.xtend.ide.formatting.preferences.FormatterConfigurationBlock.configurePreview(FormatterConfigurationBlock.java:71)
	at org.eclipse.jdt.internal.ui.preferences.formatter.ProfileConfigurationBlock.createContents(ProfileConfigurationBlock.java:434)
	at org.eclipse.jdt.internal.ui.preferences.ProfilePreferencePage.createPreferenceContent(ProfilePreferencePage.java:58)
	at org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage.createContents(PropertyAndPreferencePage.java:156)
	at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:244)
	at org.eclipse.jdt.internal.ui.preferences.ProfilePreferencePage.createControl(ProfilePreferencePage.java:53)
	at org.eclipse.xtend.ide.formatting.preferences.FormatterPreferencePage.createControl(FormatterPreferencePage.java:46)
	at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1433)
	at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:1196)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1188)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:618)
	at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:660)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:657)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:820)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:817)
	at org.eclipse.jface.viewers.ColumnViewer.firePostSelectionChanged(ColumnViewer.java:1065)
	at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1185)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
	at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:283)
	at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:437)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5040)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4520)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:64)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:581)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:415)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1617)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5065)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4517)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:175)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1454)

@LorenzoBettini
Copy link
Contributor Author

Extactly, in particular this eclipse-platform/eclipse.platform.ui@9bd3284#diff-03931e7084eeedcb4613e25c1c31c802d41dfe52ea3a41f2ff235ccfc7c8589eR892

In our case, the fInlineAnnotationColorKey is null

@LorenzoBettini
Copy link
Contributor Author

@tobias-melcher @BeckerWdf this change you committed yesterday breaks our Xtend formatter page. In our case the the fInlineAnnotationColorKey is null.

Shouldn't this operation

eclipse-platform/eclipse.platform.ui@9bd3284#diff-03931e7084eeedcb4613e25c1c31c802d41dfe52ea3a41f2ff235ccfc7c8589eR894

be executed only if fInlineAnnotationColorKey is not null?

@tobiasmelcher
Copy link

@tobias-melcher @BeckerWdf this change you committed yesterday breaks our Xtend formatter page. In our case the the fInlineAnnotationColorKey is null.

Shouldn't this operation

eclipse-platform/eclipse.platform.ui@9bd3284#diff-03931e7084eeedcb4613e25c1c31c802d41dfe52ea3a41f2ff235ccfc7c8589eR894

be executed only if fInlineAnnotationColorKey is not null?

yes, your are right. Sorry, my fault. See eclipse-platform/eclipse.platform.ui#2415

@LorenzoBettini
Copy link
Contributor Author

By the way, in other parts, you check for null

@LorenzoBettini
Copy link
Contributor Author

@tobiasmelcher great! You were fast :)
thanks for the fix, I guess it will be available tomorrow, won't it?

@BeckerWdf
Copy link

@tobiasmelcher great! You were fast :) thanks for the fix, I guess it will be available tomorrow, won't it?

Yes, it should be.

@BeckerWdf
Copy link

Fix is merged....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants