How to make STF independent from Eclipse?

16 views
Skip to first unread message

Jannis Fey

unread,
Jul 31, 2018, 4:30:27 AM7/31/18
to Saros Development
Hi everyone,

I have a problem at the modularisation of the stf project.

So far I moved all parts of the framework and all stf-tests in an own project. It should be possible to build the Eclipse, UI, Core Project without the STF. But the STF is initialized via an STFController how does all the RMI Stuff.

At SarosStartup.java I found the line "STFController.start(port, context);" [1] but this happens from the eclipse project. So the eclipse-project still depends on the stf-project.

My thought was to start the STF separated from the plugin but than the context is missing. Is there a way to get the context (IContainerContext) from the running plugin.

Or does anyone have another idea? Also I had that idea to start the complete plugin from the stf-project with an option to start the STFController, but no concrete idea how to do this. I mean there is no simple "public static void main" to run in the eclipse-project.

Thank you
Jannis

[1] https://github.com/saros-project/saros/blob/92b2e4c8a83c38c2fa689480b85376ef9280c88b/de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/StartupSaros.java#L144

Stefan Rossbach

unread,
Jul 31, 2018, 3:50:55 PM7/31/18
to Jannis Fey, Saros Development
Hi Jannis,

make sure the STF Eclipse Plugin depends on the Saros Eclipse Plugin
(maybe you need to add the core too). I would also recommend to use the
Eclipse IStartup interface to do the initialization, i.e not to do the
initialization during plugin startup.

You can then get the required components via @Inject when using the
https://github.com/saros-project/saros/blob/master/de.fu_berlin.inf.dpp.core/src/de/fu_berlin/inf/dpp/SarosPluginContext.java
class.

https://help.eclipse.org/photon/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Feditors%2Fmanifest_editor%2Fdependencies.htm

https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_startup.html

Jannis Fey

unread,
Aug 1, 2018, 5:42:48 AM8/1/18
to Saros Development

Hi Stefan,

yes the stf-project depends on the eclipse-project (and core). At the Moment the STF is started from the IStartup interface (StartupSaros) and there is only one line which needs access to the STFController in the stf-project. That means that the eclipse-project also depends on the stf-project which is not possible because we than have a cyclic project dependency.

I tryed to build a second "StartupSarosSTF implements IStartup" in the stf-project, but the only reference to this class is in the plugin.xml. When I try to reference my StartupSarosSTF class like this:

<extension
id="de.fu_berlin.inf.dpp.startup"
point="org.eclipse.ui.startup">
<startup
class="de.fu_berlin.inf.dpp.stf.StartupSarosSTF">
</startup>
</extension>

We also have the cyclic dependence that the plugin.xml in the eclipse-project needs a class from the stf-project.

I still don't know how to solve this.

Stefan Rossbach

unread,
Aug 1, 2018, 12:57:34 PM8/1/18
to Jannis Fey, Saros Development
Is the weather too hot ?

Simply remove the access to the STFController from the Saros Eclipse
Plugin and you are done.

The STF Eclipse Plugin relies on the Saros Eclipse Plugin, the STF
Eclipse Plugin hooks into the Saros Eclipse Plugin, not vice versa.
Reply all
Reply to author
Forward
0 new messages