Hi Remy, thanks for clarification. I added a bit to the wiki and I'm planning to use the logger as an example for dependency injection in http://www.vogella.de/articles/EclipseE4/article.html
Regards, Lars 2010/1/22 Remy Suen <[email protected]>: > Hi Lars, > > On Fri, Jan 22, 2010 at 1:55 PM, Lars Vogel <[email protected]> > wrote: >> the wiki currently saw that you can get a log via: >> >> return (LogService) fEclipseContext.get(LogService.class.getName()); >> >> >> The class LogService does not exists in the current version of e4. > > The LogService is an OSGi interface which comes from the > org.eclipse.osgi.services bundle. Of course, if no one has registered the > service then 'null' will be returned. > >> I believe this should be changed to (at least this works). >> >> Logger log= (Logger) fEclipseContext .get(Logger.class.getName()); >> >> If there are not objections I change the wiki. > > Please feel free to append this to the page as it is not clear at the moment > that the Logger should be retrieved via the context (or via injection with > @Inject private Logger logger;). > > Regards, > Remy > > ---------- > Remy Suen > Eclipse Platform/UI Committer > IBM Ottawa > 613-356-5162 > _______________________________________________ > e4-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/e4-dev > > -- Lars http://www.vogella.de - Tutorials about Java, Eclipse and Web programming http://www.twitter.com/vogella - Lars on Twitter _______________________________________________ e4-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/e4-dev
