New recompiled IDE suddenly broken for no obvious reason

106 views
Skip to first unread message

Stephane Gallès

unread,
Jun 26, 2014, 5:16:06 PM6/26/14
to ceylo...@googlegroups.com
I had recompiled the new master IDE, with the build scheme (the formatter, the SDK, OSGI and all) and for two days everything worked like a charm, and suddenly...

...out of the blue, now all my Ceylon projects are broken, and even when I create a brand new projet, it is broken too.

The symptom is : I'm not able to open a Ceylon editor anymore (well, I get an empty editor with only the cross to close the editor).

When I try Reset Perspective... it's worse, I get an empty perspective...no view whatsoever.

And in the meantime, in the Eclipse log :

!ENTRY org.eclipse.e4.ui.workbench 4 0 2014-06-26 22:47:06.802
!MESSAGE Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor' from bundle '234'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.Error: Unresolved compilation problems:
    The import ceylon.file cannot be resolved
    The import ceylon.file cannot be resolved
    The import ceylon.formatter cannot be resolved
    format_ cannot be resolved
    format_ cannot be resolved
    Writer cannot be resolved to a type
    The method write(String) of type new Writer(){} must override or implement a supertype method
    Writer$impl cannot be resolved to a type
    The method $ceylon$file$Writer$impl() of type new Writer(){} must override or implement a supertype method
    Writer$impl cannot be resolved to a type
    The method close() of type new Writer(){} must override or implement a supertype method
    The method destroy(Throwable) of type new Writer(){} must override or implement a supertype method
    The method flush() of type new Writer(){} must override or implement a supertype method
    The method writeLine() of type new Writer(){} must override or implement a supertype method
    The method writeLine(String) of type new Writer(){} must override or implement a supertype method
    The method writeLine$line() of type new Writer(){} must override or implement a supertype method

    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877)
    at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857)
    at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
    at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:90)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
    at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
    at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
    at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205)
    at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
    at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
    at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
    at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
    at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
    at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
    at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
    at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
    at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:610)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:322)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1034)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3112)
    at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3034)
    at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3016)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3012)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2976)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2967)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:534)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:493)
    at com.redhat.ceylon.eclipse.code.editor.EditorUtility.openInEditor(EditorUtility.java:177)
    at com.redhat.ceylon.eclipse.code.editor.EditorUtility.openInEditor(EditorUtility.java:106)
    at com.redhat.ceylon.eclipse.code.navigator.CeylonOpenAction.run(CeylonOpenAction.java:138)
    at com.redhat.ceylon.eclipse.code.navigator.CeylonOpenAction.run(CeylonOpenAction.java:88)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
    at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50)
    at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221)
    at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185)
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:47)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
    at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462)
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    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:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: java.lang.Error: Unresolved compilation problems:
    The import ceylon.file cannot be resolved
    The import ceylon.file cannot be resolved
    The import ceylon.formatter cannot be resolved
    format_ cannot be resolved
    format_ cannot be resolved
    Writer cannot be resolved to a type
    The method write(String) of type new Writer(){} must override or implement a supertype method
    Writer$impl cannot be resolved to a type
    The method $ceylon$file$Writer$impl() of type new Writer(){} must override or implement a supertype method
    Writer$impl cannot be resolved to a type
    The method close() of type new Writer(){} must override or implement a supertype method
    The method destroy(Throwable) of type new Writer(){} must override or implement a supertype method
    The method flush() of type new Writer(){} must override or implement a supertype method
    The method writeLine() of type new Writer(){} must override or implement a supertype method
    The method writeLine(String) of type new Writer(){} must override or implement a supertype method
    The method writeLine$line() of type new Writer(){} must override or implement a supertype method

    at com.redhat.ceylon.eclipse.code.editor.FormatAction.<init>(FormatAction.java:12)
    at com.redhat.ceylon.eclipse.code.editor.CeylonEditor.createActions(CeylonEditor.java:411)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3573)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
    at com.redhat.ceylon.eclipse.code.editor.CeylonEditor.createPartControl(CeylonEditor.java:1078)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:142)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
    at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:323)
    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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    ... 97 more


Also, and it probably is a coincidence, but FYI the last action that was able to execute before everything breaks was to use File > Import > Existing project into workspace to try to import an already created Ceylon projet (the Ceylon Walkthrough).

David Festal

unread,
Jun 27, 2014, 4:30:47 AM6/27/14
to ceylo...@googlegroups.com
Hi Stéphane,

This error is there because one of the Ceylon module archives required by the Ceylon IDE plugin, and provided by proxy projects, is not there. In this case it seems to be the ceylon.file module.

This can happen in the following scenario :

1. You have the ceylon-sdk project opened in your main  Eclipse
2. You have all required-bundle-proxies/* projects opened in your main Eclipse
3. You have the Ceylon IDE plugin installed in your main Eclipse (for example from the dev update site)
4. You start the Ceylon IDE plugin to test it through 'Run as Eclipse Application'
5. In your main Eclipse you do some action that will triggger the build of your workspace, and also the build of your ceylon-sdk project :
  • this will remove all the SDK generated archives from the 'modules' Ceylon output directory
  • The proxy projects related to the required SDK modules (ceylon.file, ceylon.collection, ceylon.interop.java) have a link to these archives. And since they have been deleted by the workspace build, they might need to be refreshed in order to be available again.
  • If you don't do this refresh, the linked car will not be seen anymore, and you will get those errors when trying to resolve packages from these archives.      

The main point is that, with this build scheme (bundle proxys projects), the Ceylon IDE plugin that is 'run as Eclipse Application'  is finally pointing directly to the archives in the Ceylon output directory of the ceylon-sdk or ceylon.formatter. So if you have those 2 projects opened in your main Eclipse, as soon as you trigger a workspace build that involves the clean of the sdk or formatter, you might encounter such errors in the Ceylon IDE plugin that is 'run as Eclipse Application'.

I'll change the destination of the link in the proxy-projects related to the sdk or formatter in order to point to the jars in the generated OSGI repo. This is *not* deleted during clean builds.
If this help removing this weird use case , I'll push the change and let you know.

David.
--
You received this message because you are subscribed to the Google Groups "ceylon-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-dev+...@googlegroups.com.
To post to this group, send email to ceylo...@googlegroups.com.
Visit this group at http://groups.google.com/group/ceylon-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceylon-dev/b80a11ef-d0d7-4b28-9dc5-fab2df1aedf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Festal

unread,
Jun 27, 2014, 8:07:26 AM6/27/14
to ceylo...@googlegroups.com
I made some changes that provide a better stability in the use case you encountered:
In each bundle proxy project, I removed the link to the real archive, and now the archive is physically copied during the ide-quick target of each required project.

So no risk anymore that linked archives would become unavailable during a build within the main Eclipse.
Still, after doing a project build with ide-quick, you should refresh the corresponding proxy project before running the Ceylon IDE Plugin 'as an Eclipse Application'.    

To benefit of this last change you should update all the siblings projects of the distribution, as well as the SDK and formatter and IDE repos.

David.

Stephane Gallès

unread,
Jun 27, 2014, 4:46:13 PM6/27/14
to ceylo...@googlegroups.com, david.fes...@gmail.com

Hi David,

Thank you for your detailed answer, and sorry for my delayed response.

Yes, with your changes I've recompiled everything, and now my IDE works.

And, you analysis is spot on. I was indeed running the IDE in the IDE via 'run as Eclipse Application'  just before everything broke

Thanks again for the improvement.
Reply all
Reply to author
Forward
0 new messages