|
Re: [ECP] Model Explorer Treeview Events [message #1445560 is a reply to message #1445475] |
Wed, 15 October 2014 15:57 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
the notify change methods is definitly not a good place to add this
dialog, because it will be triggered from other callers, too.
You need to create your own implementation of the create child actions,
which add the dialog behavior.
Best regards
Jonas
Am 15.10.2014 15:47, schrieb Krisztian Macsar:
> Hi,
>
> I have a problem:
> The user right clicks on a model element in the treeview of the Model
> Explorer, to create a child element. At this point I have to pop a
> dialog and if the user clicks "Cancel", no child element should be created.
>
> Can you please help me, how can I do this properly? At this moment, I
> pop the dialog in the notifyChanged method, but it is not a nice
> implementation because the new element is already created and I have to
> delete it if the user cancelled the dialog.
>
> Regards,
> Krisztian
|
|
|
|
Re: [ECP] Model Explorer Treeview Events [message #1448071 is a reply to message #1447559] |
Sun, 19 October 2014 10:03 |
Jonas Helming Messages: 699 Registered: July 2009 |
Senior Member |
|
|
Hi,
Am 18.10.2014 16:04, schrieb Krisztian Macsar:
> Hi Jonas,
>
> Thank you for your prompt answer, as you can see I am really new to
> these technologies.
> Your answer helped me a lot and now everything works like a charm with
> customized actions, as you suggested! Thanks again!
>
> However I have two more questions, please set me to the right direction
> in case of these problems:
> 1. How can I pop a confirmation dialog before a model element is
> deleted? (If the user choose Cancel, the model element shouldn't be
> deleted)
Again by implementing a custom delete action.
> 2. Is it possible to customize the default editor of a model element? I
> would like to remove the header section where the name and type of the
> element and a red X (delete) can be found. Maybe I should implement a
> custom editor (are there any examples?)?
To customize the layout within the editor, you can use EMF Forms. To
customizte the editor itself, you need to implement a custom version of
it. The existing implementation should be a good template for this.
Best regards
Jonas
>
> Regards,
> Krisztian
|
|
|
Powered by
FUDForum. Page generated in 0.02981 seconds