Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342806 - [Compatibility] GB18030 4.1:can't open Call Hierarchy,Include Browser and Type Hierarchy
Summary: [Compatibility] GB18030 4.1:can't open Call Hierarchy,Include Browser and Typ...
Status: VERIFIED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: James Blackburn CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 331444
  Show dependency tree
 
Reported: 2011-04-14 04:44 EDT by li jie CLA
Modified: 2011-05-03 13:13 EDT (History)
7 users (show)

See Also:


Attachments
Type Hierarchy (25.45 KB, image/pjpeg)
2011-04-14 04:53 EDT, li jie CLA
no flags Details
Error (15.16 KB, image/pjpeg)
2011-04-14 04:56 EDT, li jie CLA
no flags Details
View layout data patch v1 (3.72 KB, patch)
2011-04-29 09:09 EDT, Remy Suen CLA
jamesblackburn+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description li jie CLA 2011-04-14 04:44:12 EDT
Build Identifier: J20110413-1635

when I installed eclipse and CDT  in redhat 5.0,the Call Hierarchy,Include Browser and Type Hierarchy can't show correctly in IES 4.1,but 3.7 didn't have the issue.

Reproducible: Always

Steps to Reproduce:
1.Unzip Eclipse Full SDK in RedHat 5.0
2.Unzip CDT SDK in RedHat 5.0
3.start Eclipse,select Window>Show view>Other>C/C++>Type Hierarchy.
4.click "OK" button,view the toolbar
Expected Result:the toolbar is shown correctly
Problem:display an error window
remark:Call Hierarchy and Include Browser have the same issue.
Comment 1 li jie CLA 2011-04-14 04:53:33 EDT
Created attachment 193228 [details]
Type Hierarchy
Comment 2 li jie CLA 2011-04-14 04:56:10 EDT
Created attachment 193229 [details]
Error

java.lang.ClassCastException: org.eclipse.swt.layout.GridData incompatible with org.eclipse.swt.layout.FillData
	at org.eclipse.swt.layout.FillLayout.computeChildSize(FillLayout.java:144)
	at org.eclipse.swt.layout.FillLayout.computeSize(FillLayout.java:122)
	at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:220)
	at org.eclipse.swt.widgets.Control.pack(Control.java:1193)
	at org.eclipse.swt.widgets.Control.pack(Control.java:1168)
	at org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:87)
	at org.eclipse.cdt.internal.ui.typehierarchy.THViewPart.createActions(THViewPart.java:799)
	at org.eclipse.cdt.internal.ui.typehierarchy.THViewPart.createPartControl(THViewPart.java:241)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:114)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:76)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:244)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:828)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:808)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:108)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:310)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:237)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:153)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:64)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:117)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:741)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520)
	at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:69)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:741)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:520)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:597)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.handleEvent(PartRenderingEngine.java:123)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:179)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4333)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:172)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:75)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setToBeRendered(UIElementImpl.java:290)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:280)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:237)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:502)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:477)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:466)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:876)
	at org.eclipse.ui.internal.WorkbenchPage.showPart(WorkbenchPage.java:946)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:925)
	at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3247)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3244)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3220)
	at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:126)
	at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:99)
	at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:67)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:226)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:207)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:123)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:122)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:365)
	at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:144)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:852)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:768)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:611)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 3 James Blackburn CLA 2011-04-14 05:45:40 EDT
Given this works in 3.7, moving to platform for comment on e4 compatibility...
Comment 4 Remy Suen CLA 2011-04-14 07:20:56 EDT
(In reply to comment #2)
> Created attachment 193229 [details]
> Error
> 
> java.lang.ClassCastException: org.eclipse.swt.layout.GridData incompatible with
> org.eclipse.swt.layout.FillData
>     at org.eclipse.swt.layout.FillLayout.computeChildSize(FillLayout.java:144)
>     at org.eclipse.swt.layout.FillLayout.computeSize(FillLayout.java:122)
>     at org.eclipse.swt.widgets.Composite.computeSize(Composite.java:220)
>     at org.eclipse.swt.widgets.Control.pack(Control.java:1193)
>     at org.eclipse.swt.widgets.Control.pack(Control.java:1168)
>     at
> org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:87)
>     at
> org.eclipse.cdt.internal.ui.typehierarchy.THViewPart.createActions(THViewPart.java:799)
>     at
> org.eclipse.cdt.internal.ui.typehierarchy.THViewPart.createPartControl(THViewPart.java:241)
>     at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:114)

Probably caused by this line in THViewPart's createPartControl(Composite) method.

fPagebook.setLayoutData(new GridData(GridData.FILL_BOTH));
Comment 5 Remy Suen CLA 2011-04-14 09:31:51 EDT
(In reply to comment #4)
> Probably caused by this line in THViewPart's createPartControl(Composite)
> method.
> 
> fPagebook.setLayoutData(new GridData(GridData.FILL_BOTH));

Cannot reproduce on a simple view so doesn't look like my guess was right. Investigating further...
Comment 6 Remy Suen CLA 2011-04-14 10:02:58 EDT
(In reply to comment #4)
> Probably caused by this line in THViewPart's createPartControl(Composite)
> method.
> 
> fPagebook.setLayoutData(new GridData(GridData.FILL_BOTH));

You need this and then also a request to update the action bars to reproduce the problem.

Workarounds that can be performed on the CDT side:
1. Remove the request to set a layout data. This shouldn't even be necessary as the default behaviour is for the child control to take up all the space.

2. Set a GridLayout on the passed in parent composite. Now there's no CCE discrepancy because the layout expects to see a GridData.
Comment 7 Remy Suen CLA 2011-04-14 10:49:58 EDT
(In reply to comment #6)
> You need this and then also a request to update the action bars to reproduce
> the problem.
> 
> Workarounds that can be performed on the CDT side:
> 1. Remove the request to set a layout data. This shouldn't even be necessary as
> the default behaviour is for the child control to take up all the space.
> 
> 2. Set a GridLayout on the passed in parent composite. Now there's no CCE
> discrepancy because the layout expects to see a GridData.

If you want to use GridLayout/GridData. Please follow step #2.
http://help.eclipse.org/helios/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/ui/IWorkbenchPart.html#createPartControl%28org.eclipse.swt.widgets.Composite%29
Comment 8 James Blackburn CLA 2011-04-14 11:00:02 EDT
Should probably implement comment 6 1).
Comment 9 Paul Webster CLA 2011-04-29 08:43:20 EDT
Can we please get this scheduled for RC1?

PW
Comment 10 Remy Suen CLA 2011-04-29 09:09:41 EDT
Created attachment 194351 [details]
View layout data patch v1

This patch implements solution 1 from comment 6.
Comment 11 James Blackburn CLA 2011-04-30 04:46:15 EDT
Thanks for fixing this Remy.
Comment 13 Remy Suen CLA 2011-05-03 13:13:47 EDT
(In reply to comment #12)
> *** cdt cvs genie on behalf of jblackburn ***
> Bug 342806 - [Compatibility] GB18030 4.1:can't open Call Hierarchy,Include
> Browser and Type Hierarchy

I downloaded the cdt-master-8.0.0-I201105021546.zip file and the 'Call Hierarchy', 'Type Hierarchy', and Include Browser' views now open.

Thanks for releasing the patch, James.