Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jwt-dev] makeing dependencies optional

Hi,

you are right, just making them optional would probably introduce some problems. It therefore should be checked whether certain dependencies are available and functions accordingly disabled. This should also be clearly indicated to the user.

I've created a bug for this (1.3.0:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=379526

Regards,
Chris

Am 09.05.2012 11:06, schrieb Yoann Rodière:
Hi,

I agree this would be great for those users who want a light-weight
platform, but it may require more attention than just modifying the
manifest file, I guess. I'm assuming you were talking about adding the
"optional" keyword to dependencies in the manifest file. With the
current code, I think JWT would simply blow up if we tried to use SVG
export with, say, batik not installed. Two solutions:

 1. Assume that users who have these dependencies not installed know
    what they do.
 2. Make sure to (programatically) disable the features related to these
    dependencies if they're not installed.

I wonder what form this "optional OSGi dependency" will take, especially
regarding the Eclipse Update Manager.

 1. Will it install all dependencies by default, and allow users to
    remove thoses they don't want?
 2. Will it NOT install the optional dependencies and therefore require
    active actions from the user in order to install them?

In the second case, we definitely should disable SVG export when the
required dependencies are not available. It seems a common way doing
this is by using OSGi services (I only searched quickly and found this
<http://www.developer.com/java/ent/article.php/3655231/Eclipse-Tip-Use-Optional-Plug-in-Dependencies-to-Support-Diverse-Runtime-Environments.htm>)

Of course, we could also avoid using the OSGi "optional dependency"
mechanism, and simply relocate the diagram export features in a new
bundle, which would use extension points. Users could choose explicitly
to install it when installing JWT in the Update manager. This would
involve a bit more work, though.

Let me know if I'm missing something :)

Regards,
Yoann

Le mar. 08 mai 2012 18:09:57 CEST, Christian Saad a écrit :
 > Hi Marc, Yoann,
 >
 > playing around a lot with Eclipse and JWT (and several other
 > Eclipse-based products) recently I've discovered that it might not in
 > all cases be desirable to force users to install very heavyweight
 > components such as GMF that themselves drag along many dependencies,
 > especially since we emphasize the customisability aspect of our
 > platform. Therefore, I would propose to mark the GMF dependencies (and
 > in the future maybe other components such as ATL/JDT?) in jwt-we
 > (shown below) as optional, so that the user can choose whether to
 > install the product and enjoy a fully featured solution or to work
 > with a restricted feature set but have a more light-weight platform.
 > What do you think?
 >
 > Regards,
 > Chris
 >
 > org.apache.batik.util;bundle-version="1.6.0",
 > org.apache.batik.dom;bundle-version="1.6.0",
 > org.apache.batik.dom.svg;bundle-version="1.6.0",
 > org.apache.batik.svggen;bundle-version="1.6.0",
 > org.apache.batik.ext.awt;bundle-version="1.6.0",
 > org.eclipse.gmf.runtime.common.ui;bundle-version="1.5.0",
 > org.eclipse.gmf.runtime.draw2d.ui;bundle-version="1.5.0",
 > org.eclipse.gmf.runtime.draw2d.ui.render;bundle-version="1.4.1",
 > org.w3c.dom.svg;bundle-version="1.1.0"


Back to the top