Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception while trying to run BEX Code Compare in diff view (BufferedCanvas cannot be found) #121

Open
kiicia opened this issue Aug 10, 2021 · 3 comments
Assignees
Milestone

Comments

@kiicia
Copy link

kiicia commented Aug 10, 2021

I am using Eclipse:

Version: 2021-06 (4.20.0)
Build id: 20210612-2011

I have installed BEX Code Compare via Eclipse Marketplace

When I am in diff view and try to select BEX Code Compare from list, then visually nothing happens and error log contains:

org.eclipse.ui
Error
Unhandled event loop exception
java.lang.NoClassDefFoundError: org/eclipse/compare/internal/BufferedCanvas
	at info.codesaway.eclipse.jdt.internal.ui.compare.JavaContentViewerCreator.createViewer(JavaContentViewerCreator.java:32)
	at org.eclipse.compare.internal.ViewerDescriptor.createViewer(ViewerDescriptor.java:66)
	at org.eclipse.compare.CompareEditorInput.findContentViewer(CompareEditorInput.java:915)
	at org.eclipse.egit.ui.internal.merge.GitMergeEditorInput.findContentViewer(GitMergeEditorInput.java:194)
	at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.getViewer(CompareContentViewerSwitchingPane.java:89)
	at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:257)
	at org.eclipse.compare.internal.CompareContentViewerSwitchingPane.setInput(CompareContentViewerSwitchingPane.java:202)
	at org.eclipse.compare.internal.CompareContentViewerSwitchingPane$6.widgetSelected(CompareContentViewerSwitchingPane.java:280)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
	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)
Caused by: java.lang.ClassNotFoundException: org.eclipse.compare.internal.BufferedCanvas cannot be found by info.codesaway.bex_0.5.0.202010271910
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 35 more
java.version=11.0.10
java.vendor=Amazon.com Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product -data file:/C:/Users/{redacted}/eclipse-workspace/ -product org.eclipse.epp.package.jee.product
@CodesAway
Copy link
Owner

CodesAway commented Aug 14, 2021

Thanks for the bug report. I'll install this version of Eclipse and test it, hopefully I can reproduce the issue which will facilitate testing.

@CodesAway
Copy link
Owner

@kiicia I'm still investigating this. I found the following fixed Eclipse bug which I think resulted in be bug in BEX.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=571954

When I had to include internal Eclipse classes into BEX it always felt wrong. However, I didn't find a better way to do it. I'll investigate and see if I can remove the need for the internal classes. The issue with internal classes is if they change something internal, then it breaks BEX, which is not ideal.

@CodesAway
Copy link
Owner

For my reference, looks like I need to merge their changes to TextMergeViewer

https://git.eclipse.org/c/platform/eclipse.platform.team.git/tree/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java

Ideally, I can find a way to implement this class without copying their version of the class as the base.

@CodesAway CodesAway added this to the 0.14 milestone Sep 11, 2021
@CodesAway CodesAway self-assigned this Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants