|
Re: Plugin vs. standalone configuration of EMF Compare [message #1351937 is a reply to message #1338969] |
Tue, 13 May 2014 08:19 |
|
Hi Anja,
Question 1 : the two registries use rankings, that's how the match engines are ordered within it. You "see" it for the first since it is needed to created the engine and add it to the registry, whereas in the second example the engines are already registered (through extension points).
Question 2 : "20" was the ranking we used for our default engines when we first introduced the extension point, so that users may use a lower ranking to have an even lower-priority engine than the default. As you can see with the link above, we've switched that back to 0 for the default engine : since it can handle any model, an engine of lower priority would never be used... You can change this value however you see fit : the higher, the more priority we give to the match engine (we use "the highest ranking engine that is capable of matching the given models").
Question 3 : When running from Eclipse, this registry will be populated by EMF through its extension points. In standalone, it will be empty (or mostly empty). We need to manually add the registrations we need. For a basic xmi resource, a "new XMIResourceFactoryImpl()" like in this exemple is enough, but other models might need much more than that (see also what's needed for UML as an example). This line shouldn't have any bad effect when running in a plugin setup, but you should be able to "guard" this by using something like "if (!EMFPlugin.IS_ECLIPSE_RUNNING) {/* Standalone code. */}"
Question 4 : yup, seems like an overlook, the engine by default will have been registered through extension point, there is no need to instantiate one.
Laurent Goubet
Obeo
|
|
|
|
Powered by
FUDForum. Page generated in 0.02441 seconds