Creating Transformation menu by code

Hi all, 

I have been working on a use case where I have to crate transformation menu (context assistant section) on the fly and I would really like to create them by code. So far I have looked into DefaultConceptMenusTransformationMenuPartTransformationMenuContext but I have not been able to piece them together. I would really appreciate if someone can point me at the right direction.

Regards,

Salman

0
6 comments

One possible point would be to call setTransformationMenuLookup() on an EditorCell and provide your custom implementation of TransformationMenuLookup that creates your custom menu.

What benefits are you expecting from create menus by code? What is your context? What aspects of menus do you want to customize?

0
Avatar
Permanently deleted user

Hi Sergej,

 

Actually I have been  working on a Java UI that will be used to create different parts of a model on the fly, and for this I am thinking of showing hints and guidelines on runtime. So I think the better approach would be to create context assistant transformation menu by code.

0

If you are creating your own Java UI, where are you going to show the context assistant?

0
Avatar
Permanently deleted user

Hi Sergej,

I want to show the context assistant on MPS model depending on some conditions triggered manually at Java UI, so I was thinking of doing it all by code:(.

0

So do you just need the UI but want to provide your own data? Then look at the code of EditorCell_ContextAssistantComponent and maybe implement a similar cell which would not register itself with the editor's context assistant manager but would allow you instead to specify what to display in its ContextAssistantController directly.

0
Avatar
Permanently deleted user

Thanks a lot, I was able to follow your steps  and get the desired outcome :)

 

0

Please sign in to leave a comment.