|
|
|
Re: Prevent generating the extension_parser extension point [message #1240987 is a reply to message #1240928] |
Fri, 07 February 2014 09:59 |
Ed Merks Messages: 33107 Registered: July 2009 |
Senior Member |
|
|
Maarten,
Comments below.
On 07/02/2014 9:40 AM, Maarten Bezemer wrote:
> Hi Ed,
>
> Thanks for your suggestion. It indeed prevents adding the extension
> point.
>
> But now as a side effect, the MyModelResourceImpl class is not
> generated (which is kind of expected as there is no resource type
> anymore).
Yes, I would expect that.
> This is kind of unfortunate as I used this class to provide some
> additional methods/functionality for the other 'inheriting' models. I
> guess I have to move this functionality to another location.
Or just remove all the @generated annotations and keep it...
>
> I suppose there is no field (besides the Resource Type) to provide the
> 'extending class' that needs to be used by the inheriting ResourceImpl
> classes?
No.
> So I can leave the class set to '@generated'.
>
> On the other hand, is it acceptable to prevent generating the
> extension point when 'File Extensions' is left empty?
We don't do much of anything in the way of validation in the GenModel,
so you might specify the extension as " but that won't work either. :-P
> As this results in registering an empty extension to the package,
> which does not seem to make much sense...
Another trick I use when I want to suppress something that's generated
now the plugin.xml support merging is to comment out the body of the
generated thing in the plugin.xml and change the @generated tag to add
"not"... E.g., something like this works I think:
<!--
<extension point="org.eclipse.emf.ecore.extension_parser">
@generated foo not
<parser
type="test"
class="test.util.TestResourceFactoryImpl"/>
</extension>
-->
>
> Thanks again for your help.
> Cheers,
> Maarten
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Prevent generating the extension_parser extension point [message #1326174 is a reply to message #1326055] |
Thu, 01 May 2014 16:00 |
Ed Merks Messages: 33107 Registered: July 2009 |
Senior Member |
|
|
Maarten,
Yes, but that disables everything very unselectively so if you do make
changes that require updating what's in the plugin.xml, that won't
happen anymore. That's your choice...
On 01/05/2014 4:41 PM, Maarten Bezemer wrote:
> Hi,
>
> I found the 'Plugin Key' property, under 'Templates & Merge', its
> description says: "The key used for merging generated plugin.xml files
> contents; an empty string disables merging"
>
> This seems to be exactly what I require, as it stops merging
> plugin.xml if the property value is empty. and thus leaves the current
> version without adding the extension points.
>
> Regards,
> Maarten
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02439 seconds