| [news.eclipse.tools.ve] Re: Extend Palette |
Gili Mendel wrote:
Hung wrote:
I was able to add a custom widget to the Palette following the tutorial. When dropping this custom widget to a composite, I want to display our custom dialog/wizard instead of the dialog asking for the Bean Name. Can this be done? What extensions should I use? Thanks.
The naming dialog is opened because of the AnnotationPolicy (put a break point in AnnotationPolicy.getDefaultAddAnnotationsCommand()).
This policy is an editor wide, and is responsible of figuring up what to "name" the instance that is being dropped (see NameInMemberPropertyDescriptor.getUniqueNamesInComposition().
There is no way to override/extend this particular policy. Note that this dialog will only come up if the preference is set that way.
You have the option of creating your own edit part/policies, and override the existing ones. You can than add a policy that brings up your dialog.
We got it to work. Thanks.