Skip to main content



      Home
Home » Eclipse Projects » Sirius » Auto-completion for semantic property
Auto-completion for semantic property [message #1710314] Mon, 05 October 2015 23:37 Go to next message
Eclipse UserFriend
Hi all,

I want to add the auto-completion for Semantic property of element. When user selects a Node or Container, then edit Semantic in Properties view, he can press Ctrl + Space to show the auto-completion list for each Semantic parameters (Name, Value ...).

Can anyone guide me how to do it?

Best Regards,
Tuan Hoang
Re: Auto-completion for semantic property [message #1711388 is a reply to message #1710314] Thu, 15 October 2015 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Le 06/10/2015 05:37, Tuan Hoang Anh a écrit :
> Hi all,

Hi

> I want to add the auto-completion for Semantic property of element. When
> user selects a Node or Container, then edit Semantic in Properties view,
> he can press Ctrl + Space to show the auto-completion list for each
> Semantic parameters (Name, Value ...).
>
> Can anyone guide me how to do it?

This property section is not specific to sirius.
Using jface mechnisms, you can provide your own IContentAssistant to
propose your own auto-completion items.

>
> Best Regards,
> Tuan Hoang
Re: Auto-completion for semantic property [message #1711469 is a reply to message #1711388] Fri, 16 October 2015 06:40 Go to previous messageGo to next message
Eclipse UserFriend
Laurent Fasani wrote on Thu, 15 October 2015 13:24
Le 06/10/2015 05:37, Tuan Hoang Anh a écrit :
> Hi all,

Hi

> I want to add the auto-completion for Semantic property of element. When
> user selects a Node or Container, then edit Semantic in Properties view,
> he can press Ctrl + Space to show the auto-completion list for each
> Semantic parameters (Name, Value ...).
>
> Can anyone guide me how to do it?

This property section is not specific to sirius.
Using jface mechnisms, you can provide your own IContentAssistant to
propose your own auto-completion items.

>
> Best Regards,
> Tuan Hoang

Hi Laurent,

Thanks for your answer.
I used ContentProposalAdapter to propose the auto-completion items in SWT application. But I don't know how to do it with Text in Semantic in Properties View of Sirius.

Could you tell me how to add this feature to use in Sirius? Which plugin extension or something else?

Best Regards,
Tuan Hoang
Re: Auto-completion for semantic property [message #1711495 is a reply to message #1711469] Fri, 16 October 2015 08:46 Go to previous messageGo to next message
Eclipse UserFriend
Le 16/10/2015 12:40, Tuan Hoang Anh a écrit :
> Laurent Fasani wrote on Thu, 15 October 2015 13:24
>> Le 06/10/2015 05:37, Tuan Hoang Anh a écrit :
>> > Hi all,
>>
>> Hi
>>
>> > I want to add the auto-completion for Semantic property of element.
>> When
>> > user selects a Node or Container, then edit Semantic in Properties
>> view,
>> > he can press Ctrl + Space to show the auto-completion list for each
>> > Semantic parameters (Name, Value ...).
>> >
>> > Can anyone guide me how to do it?
>>
>> This property section is not specific to sirius.
>> Using jface mechnisms, you can provide your own IContentAssistant to
>> propose your own auto-completion items.
>>
>> >
>> > Best Regards,
>> > Tuan Hoang
>
> Hi Laurent,
>
> Thanks for your answer.
> I used ContentProposalAdapter to propose the auto-completion items in
> SWT application. But I don't know how to do it with Text in Semantic in
> Properties View of Sirius.
>
> Could you tell me how to add this feature to use in Sirius? Which plugin
> extension or something else?
>
> Best Regards,
> Tuan Hoang

Hi Tuan,

The items displayed in the property sheet in the semantic tab are
provided by your .edit metamodel plugin generated with .genmodel. It is
full EMF and not sirius dependant. If you want to control what is
displayed and if you want completion for these fields, it is a good
entry point.

Regards
Laurent
Re: Auto-completion for semantic property [message #1712037 is a reply to message #1711495] Tue, 20 October 2015 23:34 Go to previous messageGo to next message
Eclipse UserFriend
Laurent Fasani wrote on Fri, 16 October 2015 12:46
Le 16/10/2015 12:40, Tuan Hoang Anh a écrit :
> Laurent Fasani wrote on Thu, 15 October 2015 13:24
>> Le 06/10/2015 05:37, Tuan Hoang Anh a écrit :
>> > Hi all,
>>
>> Hi
>>
>> > I want to add the auto-completion for Semantic property of element.
>> When
>> > user selects a Node or Container, then edit Semantic in Properties
>> view,
>> > he can press Ctrl + Space to show the auto-completion list for each
>> > Semantic parameters (Name, Value ...).
>> >
>> > Can anyone guide me how to do it?
>>
>> This property section is not specific to sirius.
>> Using jface mechnisms, you can provide your own IContentAssistant to
>> propose your own auto-completion items.
>>
>> >
>> > Best Regards,
>> > Tuan Hoang
>
> Hi Laurent,
>
> Thanks for your answer.
> I used ContentProposalAdapter to propose the auto-completion items in
> SWT application. But I don't know how to do it with Text in Semantic in
> Properties View of Sirius.
>
> Could you tell me how to add this feature to use in Sirius? Which plugin
> extension or something else?
>
> Best Regards,
> Tuan Hoang

Hi Tuan,

The items displayed in the property sheet in the semantic tab are
provided by your .edit metamodel plugin generated with .genmodel. It is
full EMF and not sirius dependant. If you want to control what is
displayed and if you want completion for these fields, it is a good
entry point.

Regards
Laurent

Hi Laurent,

Thank for your kind support.
I approach the solution by starting with EMF. And I succeed to add auto-completion to EMF property as in picture.
https://c1.staticflickr.com/1/608/22321693896_3f9bf3e894_c.jpg

But when I open the diagram and select the that item in Property -> Semantic, the auto-completion feature doesn't work.
https://c2.staticflickr.com/6/5797/22160009798_180b4c19f9_c.jpg

Do you have any suggestion for me?

Best Regards,
Tuan Hoang
Re: Auto-completion for semantic property [message #1712064 is a reply to message #1712037] Wed, 21 October 2015 03:47 Go to previous messageGo to next message
Eclipse UserFriend
Hi Tuan,

The semantic tab for diagrams comes from
org.eclipse.sirius.diagram.ui.tools.internal.properties.SemanticPropertySection.
You might look into this to see why it is different from your tree editor.


Another idea could be to look at the
"org.eclipse.sirius.ui.siriuspropertiescelleditor" extension point which
could allow you to provide your own cell editor.



Regards,

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Auto-completion for semantic property [message #1712090 is a reply to message #1712064] Wed, 21 October 2015 05:34 Go to previous message
Eclipse UserFriend
Hi Maxime,

I create my own cell editor by "org.eclipse.sirius.ui.siriuspropertiescelleditor" extension and it works.
Thank you so much for your supporting.

Best Regards,
Tuan Hoang
Previous Topic:Duplicate sublines in cross table
Next Topic:Select edges tree
Goto Forum:
  


Current Time: Wed Jul 23 15:33:19 EDT 2025

Powered by FUDForum. Page generated in 0.05047 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top