Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Injecting doesn't work - eModelService.find works - why?
Injecting doesn't work - eModelService.find works - why? [message #985694] Thu, 15 November 2012 12:31 Go to previous message
Alex Kipling is currently offline Alex Kipling
Messages: 211
Registered: July 2012
Senior Member
I have the folllowing code, where I am looking for a PartStack with a given ID.

Named Injection doesnt work here, but the finding works. Why?

    private static final String STACKID = "rcp.plugin.partstack.main";

    @Inject
    EModelService eModelService;

    @Inject
    MApplication mApplication;

//    @Inject
//    @Named(STACKID) //doesn't work - why?
    
    @Execute
    public void execute() {
//        MPartStack mainStack = eModelService.findElements(mApplication, STACKID, MPartStack.class, null).get(0);
        MPartStack mainStack = (MPartStack) eModelService.find(STACKID, mApplication);
 
Read Message
Read Message
Previous Topic:Custom StatusReporter (or how to override WorkbenchStatusReporter)
Next Topic:What is the difference between Area and PartSash Containers in e4?
Goto Forum:
  


Current Time: Wed May 22 17:17:04 EDT 2013

Powered by FUDForum. Page generated in 0.06094 seconds