Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2t-dev] Extending resource contributors

Mattias,

the extension point org.eclipse.xtend.shared.ui.resourceContributor is used to provide the parsers. However, the Xpand related resources are already covered by the existing contributors. Adding an additional resourceContributor would not work, since the order of contributors is not deterministic. I guess what you actually need is a way to override the existing resourceContributor. I could imagine an extension of the extension point that allows redefinition of existing resourceContributors would be an option.

However, I think a challenge is to avoid breaking existing API. If you have an idea, then raise a bug.

Note that this mailing list is for internal discussion only. Use the forum

Kind regards,
~Karsten

Am 09.01.2013 um 09:27 schrieb Mattias Ekberg <mattias.ekberg@xxxxxxxxxxx>:

Hello,
 
We are using Xpand to create code generators for our software platform. We want to distribute the generator templates together with our open source code, but since we consider the templates our IP we want to make them unreadable. Our current approach is to encrypt them and let a custom resourceContributor handle the decryption before xpand evaluates the templates. When implementing the new resourceContributors I have run into some problems. I would like to reuse the existing resourceContributors (org.eclipse.xpand.ui.core.internal.builder.XpandResourceParser, org.eclipse.xtend.ui.core.internal.builder.XtendResourceParser and org.eclipse.xtend.check.ui.core.internal.builder.CheckResourceParser). However, the package runtime export rules of the plugins prohibit me from extending these. It is also not possible to use a wrapper class since XpandResourceImpl, XtendResourceImpl and CheckResourceImpl are protected.
 
Would it be possible to export the needed packages from the plugins? I could contribute a patch for this if you think that it is a good solution. Otherwise, do you have any other suggestion on how to solve my problem?
 
Best regards
 
Mattias Ekberg
direct: +46 31 3012830
mobile: +46 737 082765
<image001.gif>
 
_______________________________________________
m2t-dev mailing list
m2t-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2t-dev


Back to the top