Bug 574298 - Exception when comparing java file and java project folder
Summary: Exception when comparing java file and java project folder
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 4.20   Edit
Hardware: PC Windows NT
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-18 04:41 EDT by Kenneth Styrberg CLA
Modified: 2021-06-18 04:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Styrberg CLA 2021-06-18 04:41:00 EDT
Eclipse 2021-06, Windows 10

When I accidentally compared a java source file with project folder using "Compare With/Each Other"; I got a "Unhandled event loop exception"

eclipse.buildId=4.20.0.I20210611-1600
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -refresh -product org.eclipse.epp.package.rcp.product -refresh -product org.eclipse.epp.package.rcp.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -refresh -clean -product org.eclipse.epp.package.rcp.product -data C:\development\smr-2021-06 -refresh -clean -product org.eclipse.epp.package.rcp.product

org.eclipse.ui
Error
Fri Jun 18 10:35:26 CEST 2021
Unhandled event loop exception

java.lang.ClassCastException: class org.eclipse.core.internal.resources.Project cannot be cast to class org.eclipse.core.resources.IFile (org.eclipse.core.internal.resources.Project and org.eclipse.core.resources.IFile are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @7a45b97c)
	at org.eclipse.team.internal.ui.actions.CompareAction.getElementFor(CompareAction.java:113)
	at org.eclipse.team.internal.ui.actions.CompareAction.execute(CompareAction.java:60)
	at org.eclipse.team.internal.ui.actions.TeamAction.run(TeamAction.java:567)
	at org.eclipse.team.internal.ui.actions.TeamAction.runWithEvent(TeamAction.java:603)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1462)