Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355775 - java.lang.ClassCastException: org.eclipse.ui.internal.WindowTrimProxy cannot be cast to org.eclipse.swt.layout.GridData
Summary: java.lang.ClassCastException: org.eclipse.ui.internal.WindowTrimProxy cannot ...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.6   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-24 19:38 EDT by Brian Chin CLA
Modified: 2019-09-30 08:33 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Chin CLA 2011-08-24 19:38:48 EDT
Build Identifier: I20110613-1736

I'm getting an odd exception when calling IWorkspacePage.showView(). This is the stack trace I receive:

java.lang.ClassCastException: org.eclipse.ui.internal.WindowTrimProxy cannot be cast to org.eclipse.swt.layout.GridData
	at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:204)
	at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:193)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1428)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:920)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:878)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:841)
	at org.eclipse.jface.action.ToolBarManager.relayout(ToolBarManager.java:202)
	at org.eclipse.jface.action.ToolBarManager.update(ToolBarManager.java:389)
	at org.eclipse.jface.action.ToolBarManager.createControl(ToolBarManager.java:111)
	at org.eclipse.ui.internal.menus.TrimContributionManager$ToolBarTrimProxy.dock(TrimContributionManager.java:88)
	at org.eclipse.ui.internal.menus.TrimContributionManager.update(TrimContributionManager.java:232)
	at org.eclipse.ui.internal.WorkbenchWindow.updateLayoutDataForContents(WorkbenchWindow.java:3785)
	at org.eclipse.ui.internal.WorkbenchWindow.setCoolBarVisible(WorkbenchWindow.java:3586)
	at org.eclipse.ui.internal.ViewIntroAdapterPart.setBarVisibility(ViewIntroAdapterPart.java:194)
	at org.eclipse.ui.internal.ViewIntroAdapterPart.access$2(ViewIntroAdapterPart.java:187)
	at org.eclipse.ui.internal.ViewIntroAdapterPart$2.run(ViewIntroAdapterPart.java:79)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.ViewIntroAdapterPart.setStandby(ViewIntroAdapterPart.java:70)
	at org.eclipse.ui.internal.ViewIntroAdapterPart$1.propertyChanged(ViewIntroAdapterPart.java:55)
	at org.eclipse.ui.internal.WorkbenchPartReference.fireInternalPropertyChange(WorkbenchPartReference.java:375)
	at org.eclipse.ui.internal.WorkbenchPartReference.fireZoomChange(WorkbenchPartReference.java:540)
	at org.eclipse.ui.internal.PartPane.setZoomed(PartPane.java:356)
	at org.eclipse.ui.internal.PartStack.setZoomed(PartStack.java:1526)
	at org.eclipse.ui.internal.PartSashContainer.zoomOut(PartSashContainer.java:976)
	at org.eclipse.ui.internal.PartSashContainer.childRequestZoomOut(PartSashContainer.java:924)
	at org.eclipse.ui.internal.LayoutPart.requestZoomOut(LayoutPart.java:347)
	at org.eclipse.ui.internal.PartStack.setState(PartStack.java:1503)
	at org.eclipse.ui.internal.WorkbenchPage.setState(WorkbenchPage.java:3915)
	at org.eclipse.ui.internal.WorkbenchPage.toggleZoom(WorkbenchPage.java:3987)
	at org.eclipse.ui.internal.WorkbenchIntroManager.setIntroStandby(WorkbenchIntroManager.java:201)
	at org.eclipse.ui.internal.WorkbenchPage.checkIntro(WorkbenchPage.java:1120)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1090)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1069)
	at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3816)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3813)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3789)
        ... 

Reproducible: Always

Steps to Reproduce:
We don't know how to reproduce it without our proprietary code.
Comment 1 Remy Suen CLA 2011-08-24 19:48:56 EDT
This feels more like a programming error.

Does the error only occur when a specific view gets opened?
Comment 2 Brian de Alwis CLA 2011-08-25 18:01:53 EDT
Brian, put a conditional breakpoint on org.eclipse.swt.widgets.Control#setLayoutData(Object) with condition

   layoutData instanceof org.eclipse.ui.internal.WindowTrimProxy

That should help track it down.
Comment 3 Remy Suen CLA 2011-11-17 12:49:48 EST
(In reply to comment #2)
> Brian, put a conditional breakpoint on
> org.eclipse.swt.widgets.Control#setLayoutData(Object) with condition
> 
>    layoutData instanceof org.eclipse.ui.internal.WindowTrimProxy
> 
> That should help track it down.

Brian, did you get a chance to try this?
Comment 4 Eclipse Genie CLA 2019-09-27 16:37:08 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Karsten Thoms CLA 2019-09-30 08:33:28 EDT
The class WindowTrimProxy was deleted in 2016 with #206fd25b7739e1598640e96988bdb8ab51f26aa9. This bug is obsolete now.