[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [e4-dev] Dynamic Eclipse 4 with Clojure language
|
Current status :
I think I may not be hooking user code at the right moment in the
lifecycle: I myself keep fighting against exceptions caused because I
inadvertently transitively start code that touches the Workbench,
which has not yet been created when called from the Model Processor
extension point.
So I can imagine constant pain when my users will to start developing
their own contributions.
That's when I need your help: what would you suggest then ? Is there
an easy way to only call code when everything else ("everything" being
the workbench ?) is in place ?
For instance, here's the kind of stack trace I'm getting:
Root exception:
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
at org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.startup(LaunchingResourceManager.java:546)
at org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingResourceManager(DebugUIPlugin.java:335)
at org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlugin.java:544)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:126)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at ccw.util.launch$eval721$loading__4910__auto____722.invoke(launch.clj:1)
2013/11/28 Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>:
> On Thu, Nov 28, 2013 at 11:43 AM, Laurent PETIT <laurent.petit@xxxxxxxxx>
> wrote:
>>
>> == Prospective questions
>>
>> I'm trying to start thinking about user contributions to my plugin.
>> Some may want to use dependencies (jars) that are not declared in
>> counterclockwise's bundle.
>> If I follow this route, a "clean" solution would be to dynamically
>> create an OSGi bundle per user contribution, and then install/start
>> this bundle.
>>
>> But .. the bundle would be started after the workbench has been
>> started. Would it be too late for the extension points for e.g. the
>> Model Processors to take place, etc. ?
>
>
> Yes, I think it would be too late. Some of our extension points react
> dynamically to bundles being installed or removed, but the model processor
> extension point isn't one of them.
>
> PW
>
> --
> Paul Webster
> Hi floor. Make me a sammich! - GIR
>
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>