Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Hide a password attribute content
Hide a password attribute content [message #1779570] Tue, 09 January 2018 16:41 Go to next message
Fa Za is currently offline Fa ZaFriend
Messages: 245
Registered: March 2010
Senior Member
This topic is related to my previous forum thread in the EMF forum (here https://www.eclipse.org/forums/index.php/t/1090987/).

I try to hide the content of the password attribute when the user writes it.
EMF does not allow custom Ecore and/or GenModel to integrate this kind of information.

I wish to know if Sirius allows to custom the Properties View Description (https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#properties_view_description) in order to show password characters (* or •) instead of the written text.

best

Faiez
Re: Hide a password attribute content [message #1779605 is a reply to message #1779570] Wed, 10 January 2018 09:01 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 236
Registered: August 2010
Senior Member
Hi,

You will have to contribute your own widget.
See https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#basic_custom_widgets (more simple if the widget is not intended to be reused), or https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#advanced_custom_widgets (which makes the widget easier to reuse).
Please let us know if the documentation is not enough, that will be an opportunity to improve it.
In addition, you will find an example of contribution in the Sirius Git repository (http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/tree/plugins) see the 4 plugins containing *ext.widgets.reference*. And the contributions for the EEF part here : https://git.eclipse.org/c/eef/org.eclipse.eef.git/tree/plugins

Regards,

Florian
Re: Hide a password attribute content [message #1779693 is a reply to message #1779605] Thu, 11 January 2018 09:24 Go to previous message
Fa Za is currently offline Fa ZaFriend
Messages: 245
Registered: March 2010
Senior Member
Thank you Florian,

As shown in the following Figure (the right part), I have a metamodel with two classes Provider and Account.
A provider owns a set of accounts and an account has a login and a password.

index.php/fa/31765/0/

The idea is how to hide the content of the password when the user writes it (as expected in the following Figure).

index.php/fa/31766/0/

So, according to the documentation (here https://wiki.eclipse.org/Sirius/Tutorials/PropertiesViewTutorial#Widget_Text), I create a properties view with a group containing two texts, loginText and PasswordText (the left part of the first Figure).

However, I didn't see how can I customize the shown content of the password.
Is it with a style? or with a customized style?

Any idea/suggestion?

Regards,

Faiez
  • Attachment: password1.png
    (Size: 165.85KB, Downloaded 120 times)
  • Attachment: password2.png
    (Size: 84.79KB, Downloaded 122 times)
Previous Topic:Dumb Question - What does "ai" stand for in ".aird"?
Next Topic:programmatic access to the Sirius model via the EMF API
Goto Forum:
  


Current Time: Mon Mar 30 01:21:30 GMT 2020

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

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

Back to the top