Project: JDT
Bug 131562 TypeHierarchyViewPart CopyToClipboardAction is accessing zip files for enablement
Reported: 2006-03-13 12:33:12 | Status: resolved fixed

M5 From a trace from Steve Northover. It looks like this is occuring when Steve toggles a breakpoint in code that is in a binary or external project while it is selected in the type hierarchy view (Steve could you give us an idea of what your were doing please)? In Steves case he is seeing a hang in Eclipse so this might be a simple contention but you likely don't want to crawl zip files in a selection changed listener anyways "main" prio=7 tid=0x00034bf0 nid=0xb1c runnable [0x0007e000..0x0007fc3c] at java.util.zip.ZipFile.freeEntry(Native Method) at java.util.zip.ZipFile.access$1100(ZipFile.java:35) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:439) - locked <0x057655f0> (a java.util.zip.ZipFile) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:416) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren JarPackageFragmentRoot.java:86) at org.eclipse.jdt.internal.core.PackageFragmentRoot.buildStructure(Pac ageFragmentRoot.java:170) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:2 9) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement java:503) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement java:247) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement java:233) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getSourceMapper(Pa kageFragmentRoot.java:708) at org.eclipse.jdt.internal.core.JavaElement.getSourceMapper(JavaElemen .java:403) at org.eclipse.jdt.internal.core.JavaElement.getSourceMapper(JavaElemen .java:403) at org.eclipse.jdt.internal.core.JavaElement.getSourceMapper(JavaElemen .java:403) at org.eclipse.jdt.internal.core.BinaryMember.getSourceRange(BinaryMemb r.java:94) at org.eclipse.jdt.internal.corext.refactoring.reorg.ReorgUtils.hasSour eAvailable(ReorgUtils.java:302) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$ opyToClipboardEnablementPolicy.canCopyToClipboard(CopyToClipboardAction.java:35 ) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$ opyToClipboardEnablementPolicy.canCopyAllToClipboard(CopyToClipboardAction.java 338) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction$ opyToClipboardEnablementPolicy.canEnable(CopyToClipboardAction.java:326) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction. anEnable(CopyToClipboardAction.java:141) at org.eclipse.jdt.internal.ui.refactoring.reorg.CopyToClipboardAction. electionChanged(CopyToClipboardAction.java:106) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelection hanged(SelectionDispatchAction.java:255) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged( electionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator. ireSelectionChanged(SelectionProviderMediator.java:131) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator. oSelectionChanged(SelectionProviderMediator.java:112) at org.eclipse.jdt.internal.ui.typehierarchy.SelectionProviderMediator$ nternalListener.selectionChanged(SelectionProviderMediator.java:40) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:16 ) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(Structure Viewer.java:1882) at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredVi wer.java:1512) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.inte nalSelectType(TypeHierarchyViewPart.java:1067) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.upda eInput(TypeHierarchyViewPart.java:542) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.setI putElement(TypeHierarchyViewPart.java:484) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart.doRe toreState(TypeHierarchyViewPart.java:1528) at org.eclipse.jdt.internal.ui.typehierarchy.TypeHierarchyViewPart$16.r n(TypeHierarchyViewPart.java:1511) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.j va:123) - locked <0x056f20f8> (a org.eclipse.swt.widgets.RunnableLock) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3264) at org.eclipse.swt.widgets.Display.msgFilterProc(Display.java:2697) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:225) at org.eclipse.swt.widgets.Display.runPopups(Display.java:3313) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2901) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.ja a:417) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:1 6) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformAc ivator.java:99) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runAppl cation(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(E lipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.j va:374) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.j va:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) "Worker-0" prio=5 tid=0x16e00e18 nid=0x418 runnable [0x177bf000..0x177bfc68] at java.util.zip.ZipFile.getNextEntry(Native Method) at java.util.zip.ZipFile.access$700(ZipFile.java:35) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:422) - locked <0x05486280> (a java.util.zip.ZipFile) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:416) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren JarPackageFragmentRoot.java:86) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache JavaProjectElementInfo.java:215) at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(J vaProjectElementInfo.java:286) at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject. ava:2543) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(Searchabl Environment.java:53) at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(Searchabl Environment.java:67) at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(Cance ableNameEnvironment.java:26) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(C mpilationUnitProblemFinder.java:156) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(C mpilationUnitProblemFinder.java:247) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeCons stent(ReconcileWorkingCopyOperation.java:152) at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeO eration(ReconcileWorkingCopyOperation.java:71) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperat on.java:720) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaMo elOperation.java:779) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationU it.java:1102) at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationU it.java:1077) at org.eclipse.jdt.internal.debug.ui.actions.ActionDelegateHelper.getCu rentMember(ActionDelegateHelper.java:137) - locked <0x048b5130> (a org.eclipse.jdt.internal.core.CompilationUnit) at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter.ge Type(ToggleBreakpointAdapter.java:112) at org.eclipse.jdt.internal.debug.ui.actions.ToggleBreakpointAdapter$2. un(ToggleBreakpointAdapter.java:152) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/reorg/CopyToClipboardAction.java