Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] HandledItem Questions

Would my proposal in the other reply give us the best of both worlds?

If one has access to the command instance one uses a CommandItem else a
ReferencedCommandItem, if you add an EOperation to acccess the command
the framework itself doesn't even have to deal with the difference how
the Command-Instance is retrieved.

I think that in a world made up of contributions I can't access a
Command-EObject defined e.g. by the workbench, ... in my ModelComponent.

Say I want to invoke a Command-Contributed by JDT? How would you allow
me to invoke it in the current implementation?

Tom

Am 07.03.10 13:59, schrieb Paul Webster:
> On Sun, Mar 7, 2010 at 5:44 AM, Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx> wrote:
>> Hi,
>> I think a HandledItem needs to hold the command-id it wants to call and
>> not the Command-Instance itself.
> 
> it's like that because "in theory" you can't define a HandledMenuItem
> or HandledToolItem without a command.  If we make it an ID then we
> have to do reference checking everywhere we use it in the app.  We
> also have to maintain the lookup to get the command every time we need
> it.
> 
> But since that's what we've always done, I don't think it's a big deal
> if you want to change it from a reference to simply an ID.
> 
> PW
> 
> 


-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                                        geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1    A-6020 innsbruck      phone    ++43 512 935834


Back to the top