Community
Participate
Working Groups
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.
Created attachment 193228 [details] Type Hierarchy
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)
Given this works in 3.7, moving to platform for comment on e4 compatibility...
(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));
(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...
(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.
(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
Should probably implement comment 6 1).
Can we please get this scheduled for RC1? PW
Created attachment 194351 [details] View layout data patch v1 This patch implements solution 1 from comment 6.
Thanks for fixing this Remy.
*** cdt cvs genie on behalf of jblackburn *** Bug 342806 - [Compatibility] GB18030 4.1:can't open Call Hierarchy,Include Browser and Type Hierarchy [*] IBViewPart.java 1.31 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java?root=Tools_Project&r1=1.30&r2=1.31 [*] CHViewPart.java 1.31 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java?root=Tools_Project&r1=1.30&r2=1.31 [*] THViewPart.java 1.24 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java?root=Tools_Project&r1=1.23&r2=1.24
(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.