Problem with importing several projects [message #1737223] |
Wed, 06 July 2016 13:09  |
Eclipse User |
|
|
|
Hy guys,
we have an interesting problem in our product:
We are using the Xtext-Framework. We have registered a BuilderParticipant to do some things when the project is built.
Now we have the following problem:
We are importing several projects into our product. If this is the first time that these projects are imported, then the method "build" of org.eclipse.xtext.builder.impl.RegistryBuilderParticipant is only called for the first project that is imported.
If the projects are imported a second time (into the same workspace), then the "build" method is called for all projects.
Is this a known bug, or are we doing anything wrong?
Thanks for your help & kind regards! =)
|
|
|
Re: Problem with importing several projects [message #1737228 is a reply to message #1737223] |
Wed, 06 July 2016 13:25   |
Eclipse User |
|
|
|
Hi
I suspect this is related to the platform's failure to batch up major
changes[1], consequently the first project import starts a rebuild
before the rest of the projects are available. Loss of the subsequent
builds may be an Xtext or platform bug. Later, all projects are there so
that a sensible build happens.
Please raise an Xtext Bugzilla.
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=453551
Regards
Ed Willink
On 06/07/2016 15:09, Alexander Fichtinger wrote:
> Hy guys,
>
> we have an interesting problem in our product:
>
> We are using the Xtext-Framework. We have registered a
> BuilderParticipant to do some things when the project is built.
>
> Now we have the following problem:
>
> We are importing several projects into our product. If this is the first
> time that these projects are imported, then the method "build" of
> org.eclipse.xtext.builder.impl.RegistryBuilderParticipant is only called
> for the first project that is imported.
> If the projects are imported a second time (into the same workspace),
> then the "build" method is called for all projects.
>
>
> Is this a known bug, or are we doing anything wrong?
>
> Thanks for your help & kind regards! =)
>
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
|
|
|
|
|
Re: Problem with importing several projects [message #1737332 is a reply to message #1737239] |
Thu, 07 July 2016 11:07   |
Eclipse User |
|
|
|
Hy Christian,
your solution works fine if we set auto-start true und the start level to 4 for the xtext.ui.shared plugin. BUT it works ONLY if we do this in the launch config and run the product in Eclipse.
If we set the start level and auto-start in the product configuration, then the following errors occur after the product is built (with Maven):
!STACK 0
org.osgi.framework.BundleException: Ausnahme in org.eclipse.core.resources.ResourcesPlugin.start() von Bundle org.eclipse.core.resources.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.IllegalStateException: The instance data location has not been specified yet.
at org.eclipse.core.internal.runtime.DataArea.assertLocationInitialized(DataArea.java:54)
at org.eclipse.core.internal.runtime.DataArea.getStateLocation(DataArea.java:124)
at org.eclipse.core.internal.runtime.InternalPlatform.getStateLocation(InternalPlatform.java:539)
at org.eclipse.core.runtime.Plugin.getStateLocation(Plugin.java:319)
at org.eclipse.core.internal.resources.LocalMetaArea.<init>(LocalMetaArea.java:57)
at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:455)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
... 12 more
org.osgi.framework.BundleException: Ausnahme in org.eclipse.xtext.ui.shared.internal.Activator.start() von Bundle org.eclipse.xtext.ui.shared.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:792)
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721)
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)
at org.eclipse.osgi.container.Module.doStart(Module.java:571)
at org.eclipse.osgi.container.Module.start(Module.java:439)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/resources/IncrementalProjectBuilder
at org.eclipse.xtext.ui.shared.internal.SharedModule.configure(SharedModule.java:114)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at org.eclipse.xtext.ui.shared.internal.Activator.initializeInjector(Activator.java:75)
at org.eclipse.xtext.ui.shared.internal.Activator.start(Activator.java:114)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771)
at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764)
... 12 more
What can we do to avoid this?
We already tried to set the start-level and auto-start of org.eclipse.core.resources (start-level 4 and auto-start true), but this did not help.
Thanks! =)
Alex
|
|
|
Re: Problem with importing several projects [message #1737334 is a reply to message #1737332] |
Thu, 07 July 2016 11:14   |
Eclipse User |
|
|
|
sry i am not familiar with eclipse core to give you an answer in that.
the activation should ideally happen after the resource plugin is started.
do you have a own IApplication or use a std. one?
afaik there is a phase that is called right after the workspace was create?
e.g. in IDEWOrkbenchAdvisior.postStartup
[Updated on: Thu, 07 July 2016 11:40] by Moderator Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02975 seconds