Community
Participate
Working Groups
sirius.ui has a required dependency to jdt.core. This is only to add the Sirius nature to a Java project. It would be nice to declare this dependency optional (and handle the missing class at runtime), as there are products, which want to use Sirius, but without any JDT dependency.
I found two other dependencies to jdt.core: . org.eclipse.sirius.common.acceleo.mtl.ide: WorkspaceJavaImportHandler is used by the Acceleo MTL interpreter to manage Java services. This class is used to retrieve the Java services from the workspace, it allows the specififer to create is VSM (.odesign file) to test it without launching a runtime ("live editing mode") this plugins should not be required in a product using Sirius if this product does not allow its users to deal with VSMs. . org.eclipse.sirius.common.xtext: XTextResourceSetFactory configures the resource set and use several classes of jdt.core to compute the platform uri map. This plugin is the XText bridge. It currently provides: . a resource set factory to correctly setup the resourceSet when XText is used, . a saving policy dedicated to Xtext aware sessions. It actually work around the bug #432795 by always adding options to ignore the concrete syntax validation of Xtext while saving. We might also analyze the possibility to make the dependency between the Xtext bridge and jdt.core optional.
If one use org.eclipse.sirius.common.acceleo.mtl then by transitivity org.eclipse.acceleo.engine and org.eclipse.acceleo.common will be part of the classpath. Both these plugins have an optional dependency to JDT and PDE. the dependency is optional but the code might fail when used within an Eclipse runtime and not in standalone. See Bug 348922.
(In reply to Maxime Porhel from comment #1) > . org.eclipse.sirius.common.acceleo.mtl.ide: WorkspaceJavaImportHandler is > used by the Acceleo MTL interpreter to manage Java services. This class is > used to retrieve the Java services from the workspace, it allows the > specififer to create is VSM (.odesign file) to test it without launching a > runtime ("live editing mode") this plugins should not be required in a > product using Sirius if this product does not allow its users to deal with > VSMs. Note that this "magic" behavior does not work anyway with recent versions of Eclipse (starting from Luna), see https://bugs.eclipse.org/bugs/show_bug.cgi?id=419205.
New Gerrit change created: https://git.eclipse.org/r/68926
Gerrit change https://git.eclipse.org/r/67965 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4813c7a686db5061be9e7dce2e3aaf438a11521d
Gerrit change https://git.eclipse.org/r/68926 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=23dd4943ab8acb3ca78f66a9921dc8484bf4a7cf
So this it done in practice now, and Sirius 4.0M6 (the runtime part) should be able to work without the JDT: % git grep -E "org\.eclipse\.(jdt|pde)" -- '**/MANIFEST.MF' plugins/org.eclipse.sirius.common.acceleo.mtl.ide/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.5.0", plugins/org.eclipse.sirius.common.xtext/META-INF/MANIFEST.MF: org.eclipse.jdt.core;bundle-version="3.8.1";resolution:=optional, plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF: org.eclipse.pde.core;bundle-version="3.8.1" plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF: org.eclipse.jdt.core, plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF: org.eclipse.pde.core, plugins/org.eclipse.sirius.editor/META-INF/MANIFEST.MF: org.eclipse.pde.core.plugin plugins/org.eclipse.sirius.tests.junit/META-INF/MANIFEST.MF: org.eclipse.jdt.ui, plugins/org.eclipse.sirius.tests.junit/META-INF/MANIFEST.MF: org.eclipse.jdt;bundle-version="3.3.1", plugins/org.eclipse.sirius.tests.swtbot/META-INF/MANIFEST.MF: org.eclipse.pde.ui, The only remaining references/dependencies to JDT (or PDE for that matter) are: * in the tests (that's OK); * in the Xtext integration plug-in, which still depends on the JDT, but the plug-in is optional and the dependency itself is now optional too; * in the specification environment org.eclipse.sirius.editor (the VSM editor infrastructure) and org.eclipse.sirius.common.acceleo.mtl.ide (which provides completion/validation support for Acceleo expressions in the VSM editor, and is not needed when *running* a Sirius modeler. As mentioned in a previous comment by Cédric, Acceleo/MTL itself still depends on the JDT. But AQL does not, so now it *should* be possible to create full-featured Sirius-based modelers which can be run in Eclipse installations without the JDT. I'm not closing the ticket yet, as it is not completely clear how to validate it, so until we have proper validation scenario it stays open (we may have a bad surprise if some other dependency of ours we missed requires the JDT itself).
I validated this issue with this scenario: * Get the sources of all Sirius plugins in your workspace * Launch a runtime with all plugins * Validate that all is OK (open a diagram, a tree and a table for example) * Modify the launch configuration to remove all jdt plugins. * Validate the launch configuration and remove plugins which depends from jdt (until launch configuration OK). * You should have all Sirius plugins necessary to the runtime. * Launch a runtime * Validate that all is OK (open a diagram, a tree and a table for example) A real validation would be to make a product with Sirius runtime and without jdt but this was not made for this issue.
Available in Sirius 4.0.0.