Bug 112277 - [WorkbenchParts] cannot open class file outside of classpath: CoreException: The classfile is not on the classpath
Summary: [WorkbenchParts] cannot open class file outside of classpath: CoreException: ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 178269 477932 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-11 22:08 EDT by Adam Kiezun CLA
Modified: 2019-09-18 12:59 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2005-10-11 22:08:40 EDT
3.2M2
have a setup with a src folder and another folder 'foo' *not* on the classpath
add a java file to foo
build the java file with ant so that a class file gets created in foo
double clock the classfile
an editor shows up with this stacktrace:

org.eclipse.core.runtime.CoreException: The classfile is not on the classpath
	at
org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:623)
	at
org.eclipse.ui.texteditor.AbstractTextEditor$17.run(AbstractTextEditor.java:2375)
	at
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:631)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:628)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2137)
	at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2393)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2420)
	at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:764)
	at
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:586)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:374)
	at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:552)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:213)
	at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2370)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2303)
	at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2295)
	at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2281)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2276)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2257)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:372)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:335)
	at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:251)
	at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:131)
	at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:169)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:153)
	at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:222)
	at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:198)
	at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:296)
	at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:869)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:741)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
	at org.eclipse.core.runtime.Platform.run(Platform.java:783)
	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.StructuredViewer.fireOpen(StructuredViewer.java:739)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:968)
	at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1067)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:243)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:238)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:277)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:884)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3194)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2823)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1755)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1719)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:368)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:377)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:164)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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)
Comment 1 Dani Megert CLA 2005-10-12 08:31:32 EDT
We correctly throw a PartInitException but this seems not to be passed along to
the initial call of IDE.openEditor() which is speced to throw a PartInitException.

Thread [main] (Suspended)
	ClassFileEditor(AbstractTextEditor).internalInit(IWorkbenchWindow, IEditorSite,
IEditorInput) line: 2407
	ClassFileEditor(AbstractTextEditor).init(IEditorSite, IEditorInput) line: 2420
	EditorManager.createSite(IEditorReference, IEditorPart, EditorDescriptor,
IEditorInput) line: 764
	EditorReference.createPartHelper() line: 586
	EditorReference.createPart() line: 374
	EditorReference(WorkbenchPartReference).getPart(boolean) line: 552
	EditorPane(PartPane).setVisible(boolean) line: 285
	PresentablePart.setVisible(boolean) line: 141
	PresentablePartFolder.select(IPresentablePart) line: 268
	LeftToRightTabOrder.select(IPresentablePart) line: 65
	TabbedStackPresentation.selectPart(IPresentablePart) line: 387
	EditorStack(PartStack).refreshPresentationSelection() line: 1138
	EditorStack(PartStack).setSelection(LayoutPart) line: 1091
	EditorStack(PartStack).showPart(LayoutPart, Object) line: 1298
	EditorStack(PartStack).add(LayoutPart, Object) line: 453
	EditorStack.add(LayoutPart, Object) line: 101
	EditorStack(PartStack).add(LayoutPart) line: 440
	EditorStack.add(LayoutPart) line: 110
	EditorSashContainer.addEditor(EditorPane, EditorStack) line: 60
	EditorAreaHelper.addToLayout(EditorPane, EditorStack) line: 214
	EditorAreaHelper.addEditor(EditorReference, String) line: 204
	EditorManager.createEditorTab(EditorReference, String) line: 744
	EditorManager.openEditorFromDescriptor(EditorDescriptor, IEditorInput) line: 651
	EditorManager.openEditor(String, IEditorInput, boolean) line: 614
	WorkbenchPage.busyOpenEditorBatched(IEditorInput, String, boolean, int) line: 2368
	WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int) line: 2303
	WorkbenchPage.access$10(WorkbenchPage, IEditorInput, String, boolean, int)
line: 2295
	WorkbenchPage$9.run() line: 2281
	BusyIndicator.showWhile(Display, Runnable) line: 69
	WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 2276
	WorkbenchPage.openEditor(IEditorInput, String, boolean) line: 2257
	IDE.openEditor(IWorkbenchPage, IFile, boolean, boolean) line: 372
	IDE.openEditor(IWorkbenchPage, IFile, boolean) line: 335
	OpenFileAction.openFile(IFile) line: 98
	OpenFileAction(OpenSystemEditorAction).run() line: 98
	OpenActionGroup.runDefaultAction(IStructuredSelection) line: 120
	MainActionGroup.runDefaultAction(IStructuredSelection) line: 315
	ResourceNavigator.handleOpen(OpenEvent) line: 650
	ResourceNavigator$6.open(OpenEvent) line: 409
	StructuredViewer$2.run() line: 741
	InternalPlatform.run(ISafeRunnable) line: 1044
	Platform.run(ISafeRunnable) line: 783
	JFaceUtil$1.run(ISafeRunnable) line: 44
	SafeRunnable.run(ISafeRunnable) line: 148
	TreeViewer(StructuredViewer).fireOpen(OpenEvent) line: 739
	TreeViewer(StructuredViewer).handleOpen(SelectionEvent) line: 968
	StructuredViewer$6.handleOpen(SelectionEvent) line: 1067
	OpenStrategy.fireOpenEvent(SelectionEvent) line: 243
	OpenStrategy.access$2(OpenStrategy, SelectionEvent) line: 238
	OpenStrategy$1.mouseSelectItem(SelectionEvent) line: 402
	OpenStrategy$1.handleEvent(Event) line: 340
	EventTable.sendEvent(Event) line: 66
	Tree(Widget).sendEvent(Event) line: 884
	Display.runDeferredEvents() line: 3229
	Display.readAndDispatch() line: 2853
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1763
	Workbench.runUI() line: 1727
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 371
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 143
	IDEApplication.run(Object) line: 106
	PlatformActivator$1.run(Object) line: 226
	EclipseStarter.run(Object) line: 375
	EclipseStarter.run(String[], Runnable) line: 164
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available
[native method]
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
	Method.invoke(Object, Object[]) line: 324
	Main.invokeFramework(String[], URL[]) line: 338
	Main.basicRun(String[]) line: 282
	Main.run(String[]) line: 977
	Main.main(String[]) line: 952
Comment 2 Paul Webster CLA 2006-09-28 15:15:32 EDT
Is this still a problem in 3.3?

PW
Comment 3 Dani Megert CLA 2006-10-09 05:56:53 EDT
yes
Comment 4 Dani Megert CLA 2007-03-20 10:46:14 EDT
*** Bug 178269 has been marked as a duplicate of this bug. ***
Comment 5 Noopur Gupta CLA 2015-09-29 02:54:26 EDT
*** Bug 477932 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Genie CLA 2019-09-18 12:59:47 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.