Closed nheuermann closed 2 months ago
Dependencies to the JDT are as follow:
org.obeonetwork.m2doc.ide.ui
org.eclipse.jdt.ui
org.eclipse.jdt.core
org.obeonetwork.m2doc.ide.jdt
org.eclipse.jdt.core
org.eclipse.jdt.launching
But none of the dependencies require a specific version of the JDT so any version could be used. Do you have a specific P2 error message or anything else I can look into ?
The dependency from org.obeonetwork.m2doc.genconf.editor
to org.obeonetwork.m2doc.ide.ui
has been introduced to factorize UI code (some dialogs)...
@ylussaud I think the problem description was not precise enough, it is not about a JDT version mismatch but the dependency itself. We bundle our own eclipse RCP application and we don't want the JDT to creep into the product, too many features are coming in that way. I quickly checked the code and as @allbutsafe pointed out, JDT classes are only used in one class TemplateCustomPropertiesPage , and even there I am not sure why JDT at all, was it convenience? I mean, m2doc has no relation to Java types and classes, hasn't it?
You can import Java services (methods from Java classes) in your template in order to extends the capabilities of AQL (the query language used by M2Doc). We rely on the JDT to list available classes in the workspace/target platform. I don't think I'll be able to move or remove that code.
If the problem with the product is the JDT UI, you can disable some capabilities in your product. I think it can be done with the org.eclipse.ui.activities
extension point. There is an example in Capella.
And to answer your question @jmauersberger AQL have a typing system that use both EMF and Java types. This allows to call Java methods as IService.
Got it, thanks @ylussaud. We also have our own services we inject but I was not aware that there is IDE support for that. Clear now.
Would it be possible to split the JDT dependent part (the wizard and IDE integration basically) from the services (which are nit at all IDE related?). The prompt service is SWT/JFace only, so eclipse runtime and not really IDE, right?
I'm not sure I'll be able to do that before the next release but I'll have a look. Limiting this kind of dependencies is a good practice.
I'm submitting a...
Current behavior
The package org.obeonetwork.m2doc.ide.ui has dependencies to the jdt (via org.obeonetwork.m2doc.ide.jdt). It seems to be used for the TemplateCustomPropertiesPage (IType).
When packaging M2Doc we get into conflict with our existing jdt (different version), so we have to leave out this package, and consequently org.obeonetwork.m2doc.genconf.editor and org.obeonetwork.m2doc.ide.jdt, as they refer to ide.ui.
We do not use the native M2Doc UI for configuration, but use M2Doc programmatically. So what we lose is a) prompt services (not so relevant) and b) the M2Doc interpreter view in genconf.editor (that's a pity, we would like to use that even more in the future).
Is it possible to remove the jdt dependencies from ide.ui? Or at least from genconf.editor?
Expected behavior
Packages org.obeonetwork.m2doc.ide and org.obeonetwork.m2doc.genconf.editor do not have a dependency to jdt.
Minimal reproduction of the problem with instructions
N/A
What is the motivation / use case for changing the behavior?
Integration of M2Doc in a larger Eclipse package
Environment