|
Re: Design question on commands/actions [message #420600 is a reply to message #420595] |
Thu, 03 July 2008 10:59 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Kristian,
Comments below.
Kristian Sons wrote:
> Hello!
>
> I have following design question:
> Where should I implement a GUI user feedback when editing a EMF data
> structure using the standard provider adapter factories?
>
> Example:
> I use the standard EMF D&D-Action to move items around. When I drop
> one item above an other item, the feature for the created AddCommand
> is solved by the ItemProviderAdapter::getChildFeature(Object object,
> Object child) picking the first valid feature. If there is more than
> one vaild feature, I want the user to decide, which feature is meant
> and present a list of valid features.
>
> It seems grubby to me to implements this in a customized AddCommand
> since the commands are independent of UI implementations. So it should
> be in the action. So I would need a very specialized D&D action that
> would first check the number of possible features via the provider
> adapters...
>
> Is there an other/better way to implement user interactions for commands?
Yes, typically I'd expect the user interactions to be the result of an
action, not to happen as part of invoking a command. In this specific
case, I imagine that specializing EditingDomainViewerdropAdapter.drop so
that it interacts with the user before executing the final resulting
command would do the trick.
>
> Thanks and regards,
> Kristian
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03012 seconds