Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 564494

Summary: DOT Editor - ClassNotFoundException when trying to create a GEF DOT Project
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 5.3.1 (2020-09)   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
screencast representing the problem none

Description Tamas Miklossy CLA 2020-06-20 03:24:22 EDT
Created attachment 283360 [details]
screencast representing the problem

When trying to create a new GEF DOT Project via File -> New -> Project... -> GEF DOT Project, the following ClassNotFoundException is thrown:

org.eclipse.xtext.ui.wizard.template.NewProjectWizardTemplateSelectionPage  - Can not instantiate 'org.eclipse.gef.dot.internal.ui.language.DotExecutableExtensionFactory:org.eclipse.gef.dot.internal.ui.language.wizard.DotProjectTemplateProvider'

org.eclipse.core.runtime.CoreException: org.eclipse.gef.dot.internal.ui.language.wizard.DotProjectTemplateProvider cannot be found by org.eclipse.gef.dot.ui_5.1.0.202006020202 (occurred in org.eclipse.gef.dot.internal.ui.language.DotExecutableExtensionFactory)
	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.handleCreationError(AbstractGuiceAwareExecutableExtensionFactory.java:97)
	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:65)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:265)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
	at org.eclipse.xtext.ui.wizard.template.NewProjectWizardTemplateSelectionPage.loadTemplatesFromExtensionPoint(NewProjectWizardTemplateSelectionPage.java:140)
	at org.eclipse.xtext.ui.wizard.template.NewProjectWizardTemplateSelectionPage.createControl(NewProjectWizardTemplateSelectionPage.java:84)
	at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
	at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:743)
	at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1181)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1234)
	at org.eclipse.jface.wizard.WizardDialog.lambda$3(WizardDialog.java:1222)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
	at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1222)
	at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:917)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:468)
	at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
	at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
	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:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
	at org.eclipse.jface.window.Window.open(Window.java:799)
	at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:118)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Caused by: java.lang.ClassNotFoundException: org.eclipse.gef.dot.internal.ui.language.wizard.DotProjectTemplateProvider cannot be found by org.eclipse.gef.dot.ui_5.1.0.202006020202
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:516)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:620)
	at org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory.create(AbstractGuiceAwareExecutableExtensionFactory.java:53)
	... 53 more
Comment 1 Tamas Miklossy CLA 2020-07-24 03:59:18 EDT
I pushed the following changes into the master branch:

[564494] DOT Editor - Ensure new GEF DOT project wizard works properly.

- Add xtend-maven plugin to the org.eclipse.gef.dot.ui/pom.xml file to
ensure that java sources are generated from the *.xtend files during the
build process.
- Modify the DotFileTemplateProvider.xtend file to use features that are
already supported by Xtend 2.17 (the support for ternary expressions is
available from Xtend 2.18, hence currently it cannot be used in GEF
DOT).
- Implement corresponding DotNewProjectWizardTest test cases.
- Configure explicit access rule for the
org.eclipse.xtext.ui.wizard.template package to be able to use those
classes
in the test cases without warnings.
- Add API filter for the DotNewProjectWizardTest class.

Resolving as fixed in 5.3.1 (2020-09)