Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Auto-completion for semantic property
Auto-completion for semantic property [message #1710314] Tue, 06 October 2015 03:37 Go to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
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 13:24 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 174
Registered: October 2014
Senior Member
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


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Auto-completion for semantic property [message #1711469 is a reply to message #1711388] Fri, 16 October 2015 10:40 Go to previous messageGo to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
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 12:46 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 174
Registered: October 2014
Senior Member
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


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Auto-completion for semantic property [message #1712037 is a reply to message #1711495] Wed, 21 October 2015 03:34 Go to previous messageGo to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
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 07:47 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
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


Maxime Porhel - 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 09:34 Go to previous message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
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 Jan 27 17:22:03 GMT 2021

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

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

Back to the top