I try to start the STF for IntelliJ.
The de.fu_berlin.inf.dpp.stf project is now also a plugin for IntelliJ. I build a plugin.xml like this:
<idea-plugin version="2">
<id>de.fu-berlin.dpp.stf</id>
<name>STF Plugin</name>
<version>0.1.0.DEVEL</version>
<vendor url="http://www.saros-project.org">Saros Project</vendor>
<description><![CDATA[
This plugin provides the STF framework for testing the Saros plugin-
]]></description>
<project-components>
<component>
<implementation-class>de.fu_berlin.inf.dpp.stf.SarosComponentSTF
</implementation-class>
</component>
</project-components>
</idea-plugin>
That seems to work fine so I get this message in the idea.log
INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: STF Plugin (0.1.0.DEVEL), SWT Library Plugin (1.0), Saros (14.1.31.DEVEL)
But to start the STF I need the ContainerContext: STFController.start(port, context)
For Eclipse "@Inject private IContainerContext context;" works fine, but for the IntelliJ Plugin the context is always null.
Does anyone know how to hook into the IntelliJ Plugin Lifecycle from the new STF-Plugin. The STF can only be started after the context is created/loaded.
Thank you
Jannis
Hi,
I found a simlple solution to get the Context from the IntelliJPlugin for my STF-Plugin.
IContainerContext context = IntellijProjectLifecycle.getInstance(project).getSarosContext();
So the STF will start and export the objects.
Now I have annother issue that something like "context.getComponent(BrowserManager.class)" doesn't work.
The error is: java.lang.IncompatibleClassChangeError: Class de.fu_berlin.inf.dpp.context.ContainerContext does not implement the requested interface de.fu_berlin.inf.dpp.context.IContainerContext
I looked with the debugger at the context and can't find the problem. It is the same context which is created from the Lifecycle.
Any ideas?
Thanks, Jannis