|
|
(no subject) [message #692875 is a reply to message #692846] |
Tue, 05 July 2011 11:08 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
It is generally a good idea to keep UI aspects separate from the plain
runtime concepts. Into the bargain, Xtext's code generator assumes them
to be different plug-ins. So I'd recommend to keep the two separate, and
keep the dependency from org.plugin.dsl.ui to org.plugin.dsl. For the
remaining classes in org.plugin, I'd try to decide if they are base
runtime or UI and move them to a src-folder of the appropriate plug-in.
If in your example the grammarAccess is null, you most likely haven't
used an Injector to instantiate the DependencyTreeBuilder. The sections
on DI in the Xtext help might give you more insights.
Am 05.07.11 12:39, schrieb forums-noreply@eclipse.org:
> I have managed to flat the first: org.plugin with org.plugin.dsl.
> Everything works fine for now,
> but one problem would be, that if I have the following code:
>
>
> public class DependencyTreeBuilder
> {
> @Inject
> private WMLGrammarAccess grammarAccess_;
> public DependencyTreeBuilder( ) {
> System.out.println( "lala");
> }
> }
>
> The grammarAccess_ is still null... is there anyway I can Inject or get
> that from the xtext framework?
>
> Thanks,
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.03476 seconds