Skip to main content
Jump to: navigation, search



ATF relies heavily on an embedded Mozilla browser for debugging and deep in-place introspection of running JavaScript and Ajax code. This is a proposal to re-architect the way ATF consumes an embedded Xulrunner to provide more flexibility and cleaner dependencies.

Current integration

The current integration now relies on the Eclipse 3.3 SWT provided Mozilla browser widget (style SWT.MOZILLA). This widget depends on having Xulrunner installed.

ATF provides an extension point that can load a contributed Xulrunner (packaged as a plugin) and make it known to SWT. This private xulrunner makes the overall installation of ATF easier, and guarantees that we are using the correct version. provides Xulrunners for MacOS, Win32 and Linux/GTK/32 as well as the Java XPCOM interfaces packaged as plugins:

The three Xulrunners plugins depend on ATF and extend the ATF extension point. In their manifest you will find: Require-Bundle: org.eclipse.atf.mozilla.ide.core

And they extend:

        name="Mozilla Xulrunner for Windows"
     <xulrunner path="/xulrunner" version=""/>

This extension ultimately help set a system property org.eclipse.swt.browser.XULRunnerPath that SWT can rely on to find a Xulrunner installation.... ;-)

On the ATF side org.eclipse.atf.mozilla.ide.core exposes the extension point and provide utilities code to deal with Xulrunner interactions. It also exposes a dependecy on org.eclipse.atf.core.

Problems with the Current integration

The problems with this layout is that the Mozilla Xulrunner bundles depend on ATF @ Eclipse, and cannot be consumed without ATF org.eclipse.atf.mozilla.ide.core and org.eclipse.atf.core. atf.core depends on the core platform and WTP/WST core. Very quickly any user of the Mozilla bundles will require to pull in tons of dependencies.

Proposed rearchitecture

To get a more flexible and modular layout, the following layout is suggested:

at ATF

  • remove dependencies in org.eclipse.atf.mozilla.ide.core on anything but the core Eclipse platform:
  1. move the class to the bundle: org.eclipse.atf.core where it should be. This will impact org.eclipse.atf.mozilla.ide.debug, org.eclipse.atf.mozilla.ide.debug.ui and org.eclipse.atf.mozilla.ide.ui. debug already has a dependency on org.eclipse.atf.core. It would have to be added for debug.ui and ide.ui.. or we could extract that in a separate utility bundle for mozilla.ide consumption only. (BTW, the class org.eclipse.atf.mozilla.ide.core.util.SourceLocatorUtil is a singleton, but maintains no state. I would suggest to make all methods static instead. )
  2. remove the dependency on org.eclipse.atf.core
  • Change the extension point org.eclipse.atf.mozilla.ide.core.xulrunner such that we add a bundle id attribute. The new extension example from above would look like:

        name="Mozilla Xulrunner for Windows"
     <xulrunner bundle="org.mozilla.myxulrunner.win32.win32.x86" path="/xulrunner" version=""/>

In that example, the extension point code would look into the the bundle org.mozilla.myxulrunner.win32.win32.x86 at path /xulrunner to look for a Xulrunner version

(NB: we could aslo add expression support to put filters on OS/ACH/WS/NL, but that would be overkill as we already have the EclipsePlatformFilter directive for that.)

  • Create three new bundles @ Atf, one for each platform (win,lin,mac). Their MANIFEST.MF would be something like:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mozilla Xulrunner
Bundle-SymbolicName: org.eclipse.atf.xulrunner.win32.win32.x86;singleton:=true
Bundle-Localization: plugin
Bundle-ClassPath: .
Eclipse-PlatformFilter: (& ( (osgi.os=win32) (osgi.arch=x86) )
Require-Bundle: org.eclipse.atf.mozilla.ide.core, org.mozilla.xulrunner.win32.win32.x86

(NB: the platform filter would be optional, as it already exist in org.mozilla.xulrunner.win32.win32.x86 , but I think it is better to express it also here so we are in control)

Their plugin.xml would be like that:

        name="Mozilla Xulrunner for Windows"
     <xulrunner bundle="org.eclipse.atf.xulrunner.win32.win32.x86" path="/xulrunner" version=""/>

at Mozilla

By working with the Mozilla folks, on each of the three xulrunner bundles (win,lin,mac) , remove the Require-Bundle: org.eclipse.atf.mozilla.ide.core <code> directive from the bundles manifests. and Remove the plugin.xml

Benefits of the proposed rearchitecture

  • Mozilla provided budnles do not depend on ATF and can be consumed standalone
  • org.eclipse.atf.mozilla.ide.core does not have dependencies on the rest of ATF. The org.eclipse.atf.mozilla.ide.core and the Mozilla bundles can be used in tandem by adopters which would want to use only this subset of ATF.
  • ATF can control exatcly which Mozilla Xulrunner bundles version it consumes (today the control is split between ATF and Mozilla)

Copyright © Eclipse Foundation, Inc. All Rights Reserved.