|Re: Custom Activator in UI plug-in? [message #881483 is a reply to message #881453]
||Mon, 04 June 2012 16:28
| Henrik Lindberg
Registered: July 2009
I just extended the generated activator.|
You can check out what I did in cloudsmith/geppetto @ github.
The ui bundle is /org.cloudsmith.geppetto.pp.dsl.ui
Note that the manifest is not overwritten - you have to always manually
merge (and pick what you want) from the generated. So, it is perfectly
fine to just point to your activator.
The executable extension stuff will continue to work since the
references to the generated activator uses static information which is
present / setup since the custom activator inherits the generated...
Hope that helps.
On 2012-04-06 17:32, Stephan Herrmann wrote:
> I thought this should be simple but I'm stuck:
> I want to add custom initialization to the activator of a UI plug-in.
> So, how do I tell Xtext not to generate a new activator but use my version?
> Things I tried:
> - move activator from target/generated-sources/xtext to src/main/java
> => activator is re-generated and now I have two identical activators,
> compilation fails
> - disable generating basic UI stuff (since I already have it),
> Is this driven by the ImplicitUiFragment? I tried to disable this
> fragment by unsetting pathToUiProject and projectNameUi, (as suggested
> in the help) but then all UI stuff was generated into the DSL plug-in
> => compilation utterly broken.
> - Sub-class the activator, but then it will not be used by the
> DSLExecutableExtensionFatory (and probably the entry in MANIFEST.MF will
> be overwritten, too, right?)
> => not the intended effect
> I must be missing s.t. really obvious?
Powered by FUDForum
. Page generated in 0.02245 seconds