Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Duplicate content parser registration
Duplicate content parser registration [message #1009089] Thu, 14 February 2013 07:07 Go to next message
Ed Willink is currently offline Ed Willink
Messages: 4036
Registered: July 2009
Senior Member
Hi Ed

Since plugin.xml codegen merging was added (17-Oct-2012), I've been
having to manually delete a duplicate content_parser registration after
each regeneration.

Pre-existing, wanted declaration:

<extension point="org.eclipse.emf.ecore.content_parser">
<parser
contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
class="org.eclipse.ocl.examples.pivot.utilities.PivotResourceFactoryImpl"/>
</extension>

Unwanted merged addition:

<extension point="org.eclipse.emf.ecore.content_parser">
<!-- @generated Pivot.merged -->
<parser
contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/>
</extension>

This behaviour does not seem to affected by the generate bundle manifest
genmodel option, or by an @generated NOT.

Is there some new technique for suppressing the unwanted merged content,
or is it a bug?

Regards

Ed Willink
Re: Duplicate content parser registration [message #1009095 is a reply to message #1009089] Thu, 14 February 2013 07:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
Ed,

You can turn off Update Classpath if you don't want things like the
plugin.xml and the MANIFEST.MF touched during regeneration at all.
Alternatively I think you can specify something like this to block
subsequent merging while allowing anything else new to be merged in later.

<extension point="org.eclipse.emf.ecore.content_parser">
<!-- @generated Pivot.merged NOT -->
<!---
<parser
contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/>
-->
</extension



On 14/02/2013 1:07 PM, Ed Willink wrote:
> Hi Ed
>
> Since plugin.xml codegen merging was added (17-Oct-2012), I've been
> having to manually delete a duplicate content_parser registration
> after each regeneration.
>
> Pre-existing, wanted declaration:
>
> <extension point="org.eclipse.emf.ecore.content_parser">
> <parser
> contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
> class="org.eclipse.ocl.examples.pivot.utilities.PivotResourceFactoryImpl"/>
>
> </extension>
>
> Unwanted merged addition:
>
> <extension point="org.eclipse.emf.ecore.content_parser">
> <!-- @generated Pivot.merged -->
> <parser
> contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
> class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/>
> </extension>
>
> This behaviour does not seem to affected by the generate bundle
> manifest genmodel option, or by an @generated NOT.
>
> Is there some new technique for suppressing the unwanted merged
> content, or is it a bug?
>
> Regards
>
> Ed Willink
>
Re: Duplicate content parser registration [message #1009157 is a reply to message #1009095] Thu, 14 February 2013 10:06 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4036
Registered: July 2009
Senior Member
Hi

Thanks for the clues. Your suggestion works but gives a warning message
about missing content. The following works.

<extension point="org.eclipse.emf.ecore.content_parser">
<!-- @generated Pivot.merged NOT-->
<!--parser
contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/-->
<parser
contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
class="org.eclipse.ocl.examples.pivot.utilities.PivotResourceFactoryImpl"/>
</extension>

Regards

Ed Willink


On 14/02/2013 12:26, Ed Merks wrote:
> Ed,
>
> You can turn off Update Classpath if you don't want things like the
> plugin.xml and the MANIFEST.MF touched during regeneration at all.
> Alternatively I think you can specify something like this to block
> subsequent merging while allowing anything else new to be merged in
> later.
>
> <extension point="org.eclipse.emf.ecore.content_parser">
> <!-- @generated Pivot.merged NOT -->
> <!---
> <parser
> contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
> class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/>
> -->
> </extension
>
>
>
> On 14/02/2013 1:07 PM, Ed Willink wrote:
>> Hi Ed
>>
>> Since plugin.xml codegen merging was added (17-Oct-2012), I've been
>> having to manually delete a duplicate content_parser registration
>> after each regeneration.
>>
>> Pre-existing, wanted declaration:
>>
>> <extension point="org.eclipse.emf.ecore.content_parser">
>> <parser
>> contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
>> class="org.eclipse.ocl.examples.pivot.utilities.PivotResourceFactoryImpl"/>
>>
>> </extension>
>>
>> Unwanted merged addition:
>>
>> <extension point="org.eclipse.emf.ecore.content_parser">
>> <!-- @generated Pivot.merged -->
>> <parser
>> contentTypeIdentifier="org.eclipse.ocl.examples.pivot"
>> class="org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl"/>
>> </extension>
>>
>> This behaviour does not seem to affected by the generate bundle
>> manifest genmodel option, or by an @generated NOT.
>>
>> Is there some new technique for suppressing the unwanted merged
>> content, or is it a bug?
>>
>> Regards
>>
>> Ed Willink
>>
>
Previous Topic:eAdapter is null
Next Topic:[Teneo] Not null constraint in JointTable when implementing Interface
Goto Forum:
  


Current Time: Tue Sep 02 07:40:56 EDT 2014

Powered by FUDForum. Page generated in 0.01591 seconds