eclipse.platform.ui icon indicating copy to clipboard operation
eclipse.platform.ui copied to clipboard

UI difference in Composite after migrating eclipse based application from version 4.15 to 4.26

Open Jeevan2000 opened this issue 10 months ago • 4 comments

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

We have migrated our eclipse based application from eclipse 4.15 to eclipse 4.26, and while testing the application we found an UI difference in composite. We have able to see the slant line from bottom right hand side corner. The UI is not rendered properly.

We are able to see for all the Composites which are not selected.

When we click on one of the composite, then these issue is not seen. Seems like coolbar is visible for these and which overrides the slant lines/issue

Also, we are getting null pointer exception

I expected: < No change in UI>

But got: <Change in Composite Rendering, getting slant lines from bottom right side corner>

Here is some relevant log output

From `org.eclipse.e4.ui.workbench

!ENTRY org.eclipse.e4.ui.workbench 4 0 2025-02-25 11:41:40.629
!MESSAGE An exception occurred while notifying part listeners
!STACK 0
java.lang.NullPointerException: Cannot read field "layout" because "this" is null
	at org.eclipse.swt.widgets.Composite.markLayout(Composite.java:861)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:824)
	at org.eclipse.swt.widgets.Control.requestLayout(Control.java:2398)
	at org.eclipse.ui.internal.CoolBarToTrimManager.update(CoolBarToTrimManager.java:602)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWindow.java:2492)
	at org.eclipse.ui.internal.WorkbenchPage.updateActionBars(WorkbenchPage.java:4334)
	at org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher.updateActivePart(WorkbenchPage.java:668)
	at org.eclipse.ui.internal.WorkbenchPage.updateActivations(WorkbenchPage.java:331)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:212)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:250)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:247)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:774)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:683)
	at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:97)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.lambda$3(StackRenderer.java:963)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1530)
	at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2441)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4787)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1478)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2284)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
	at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)

Tested under this environment:

  • OS & version: MS windows 10
  • Eclipse IDE/Platform version (as shown in Help > About): Eclipse 4.26
  • Image
Image

In First Photo, third composite is selected, no issue is seen. Issue is seen in first two parts. In Second Photo, second composite is selected, so no issue is seen. Issue is seen in first and last parts.

Community

  • [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Jeevan2000 avatar Feb 25 '25 10:02 Jeevan2000

On further analysis, we found that it has something to do with ViewPart and WorkbenchViewPart (org.eclipse.ui.part). We removed all other UI components and found these. Seems like during upgrade they have changed something which is causing these issue.

Jeevan2000 avatar Feb 27 '25 12:02 Jeevan2000

These works fine when I change the theme for org.eclipse.e4.ui.css.theme.e4_default to org.eclipse.e4.ui.css.theme.dark. Was there any change done to theme from 4.15 to 4.26 which is causing these issue.

Jeevan2000 avatar Mar 05 '25 13:03 Jeevan2000

How can someone else reproduce the problem? Please keep in mind that if there is a problem it can only be fixed in 4.36...

merks avatar Mar 05 '25 14:03 merks

We have migrated our eclipse based application from eclipse 4.15 to eclipse 4.26

Whatever issue we had in 4.26 is irrelevant, as it might be already fixed in 4.35.

@Jeevan2000 : please check how your application works on 4.35 release (you can use 4.35 RC2 from https://download.eclipse.org/eclipse/downloads/drops4/S-4.35RC2-202502280140/).

If the problem is still reproducible, please create minimal self contained example demonstating the problem and attach here.

iloveeclipse avatar Mar 05 '25 14:03 iloveeclipse