Skip to main content



      Home
Home » Modeling » EMF » Override mechanism for custom extension parser
Override mechanism for custom extension parser [message #408207] Mon, 02 April 2007 10:03 Go to next message
Eclipse UserFriend
Hi!

I've registered a custom extension parser for the extension '*' to
enable the extended meta data feature for my XMI resources (by setting
default save and load options).

The custom extension parser seems to override the default xmi parser
that is registered for '*' too, but I'm not sure if it is allowed to
register more than one extension factory for the same extension, because
the extension point documentation does not say anything about that issue.
(Precedence is undefined; future EMF versions may throw an exception; etc.)

Error log says:
!MESSAGE Both 'org.eclipse.emf.ecore.xmi' and 'com.dgr.profi.core'
register an extension parser for '*'

Is there a "legal" way to override the default extension parser?
Is there a better way to define default load/save options for resources?


Thanks,
Mario
Re: Override mechanism for custom extension parser [message #408208 is a reply to message #408207] Mon, 02 April 2007 10:21 Go to previous messageGo to next message
Eclipse UserFriend
Mario,

No, you can't globally register more than one parser for the same
extension. Each resource set has a local resource factory registry, so
it's better for a case like this to register you stuff local to your
application's resource set.


Mario Winterer wrote:
> Hi!
>
> I've registered a custom extension parser for the extension '*' to
> enable the extended meta data feature for my XMI resources (by setting
> default save and load options).
>
> The custom extension parser seems to override the default xmi parser
> that is registered for '*' too, but I'm not sure if it is allowed to
> register more than one extension factory for the same extension,
> because the extension point documentation does not say anything about
> that issue.
> (Precedence is undefined; future EMF versions may throw an exception;
> etc.)
>
> Error log says:
> !MESSAGE Both 'org.eclipse.emf.ecore.xmi' and 'com.dgr.profi.core'
> register an extension parser for '*'
>
> Is there a "legal" way to override the default extension parser?
> Is there a better way to define default load/save options for resources?
>
>
> Thanks,
> Mario
Re: Override mechanism for custom extension parser [message #1729147 is a reply to message #408208] Mon, 11 April 2016 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Can I disable the warning ?
Re: Override mechanism for custom extension parser [message #1729199 is a reply to message #1729147] Tue, 12 April 2016 02:38 Go to previous message
Eclipse UserFriend
No. And you're bound to break something else with what you're doing, so
better not do it rather than try to make it look like everything is all
fine by disabling a warning.

On 11.04.2016 16:51, Monica Stevens wrote:
> Can I disable the warning ?
Previous Topic:[resolved] NullPointerException on eClass.getPackage()
Next Topic:[XCore] Extending a class/interface defined in another model
Goto Forum:
  


Current Time: Sun May 04 05:45:58 EDT 2025

Powered by FUDForum. Page generated in 0.03640 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top