Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [emfcp-dev] [EMF Forms] Extending LinkControlSWTRenderer

Hi Cyril,

This is a bug in EMFForms. I will fix this for the 1.10 RC1.
In the meantime you have to create a folder "icons" in your plugin project where you extend the LinkControlSWTRenderer. The needed icons are: "set_reference.png", "reference.png", "unset_reference.png" .
The second thing you need are the messages, those have to be added to a bundle.properties the is placed in the OSGI-INF/l10n folder. The relevant keys are:
"LinkControl_NoLinkSetClickToSetLink";
 "LinkControl_NewReference"; 
"LinkControl_AddReference"; 
"LinkControl_DeleteReference"; 
"LinkControl_NotSet";
"LinkControl_DeleteModelQuestion";
"LinkControl_QuestionMark";
"LinkControl_DeleteReferenceConfirmation"; 
"LinkControl_DeleteReferenceYes";
"LinkControl_DeleteReferenceNo";

I hope this helps.
 
Could you please use the Newsgroup:  https://www.eclipse.org/forums/index.php/f/19/ the next time instead of the developer mailing list. Thank you.

Cheers,
Eugen

On Wed, Aug 24, 2016 at 9:45 AM, CHEVE, CYRIL <cyril.cheve@xxxxxxxx> wrote:
Hello,
 
I am currently working for the AtoS company on a project on which we are using EMF Forms.
I have created a new plugin project in which I have extended some classes as MultiReferenceSWTRenderer and LinkControlSWTRenderer to add an hyperlink in some cases.
 
When extending these classes,  I have the following message:
Discouraged access: The type 'LinkControlSWTRenderer' is not API (restriction on required library '…\org.eclipse.emf.ecp.view.core.swt_1.9.0.20160606-1526.jar')
Is there a better way to customize these renderers ?
 
Moreover, all works fine for my class that extends MultiReferenceSWTRenderer. But I have some problems with my class that extends LinkControlSWTRenderer. In fact, the translation of the labels and some images are not found in my plugin, so the display is not correct (See attachment).
 
In LinkControlSWTRenderer, the getClass() method is used to search in the ImageRegistryService and in the EMFFormsLocalizationService.
Examples:
  • line 314: return imageRegistryService.getImage(FrameworkUtil.getBundle(getClass()), "icons/set_reference.png");
  • line 371: return localizationService.getString(getClass(), key);
In MultiReferenceSWTRenderer, the getClass() method is replaced by MultiReferenceSWTRenderer.class.
Examples:
  • line 458: return imageRegistryService.getImage(FrameworkUtil.getBundle(MultiReferenceSWTRenderer.class), path);
  • line 294/295: btnAddExisting.setToolTipText(LocalizationServiceHelper.getString(MultiReferenceSWTRenderer.class, MessageKeys.MultiReferenceSWTRenderer_addExistingTooltip));
Is there a way to change the behavior in LinkControlSWTRenderer ?
 
Thanks in advance for your response.
 
Regards,
 
Cyril Chevé
 
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l’intention exclusive des destinataires désignés. Il contient des informations confidentielles et pouvant être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de détruire le message. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse de l’émetteur. L'internet ne garantissant pas l'intégrité de ce message lors de son acheminement, Atos (et ses filiales) décline(nt) toute responsabilité au titre de son contenu. Bien que ce message ait fait l’objet d’un traitement anti-virus lors de son envoi, l’émetteur ne peut garantir l’absence totale de logiciels malveillants dans son contenu et ne pourrait être tenu pour responsable des dommages engendrés par la transmission de l’un d’eux.

This message and any attachments (the "message") are intended solely for the addressee(s). It contains confidential information, that may be privileged. If you receive this message in error, please notify the sender immediately and delete the message. Any use of the message in violation of its purpose, any dissemination or disclosure, either wholly or partially is strictly prohibited, unless it has been explicitly authorized by the sender. As its integrity cannot be secured on the internet, Atos and its subsidiaries decline any liability for the content of this message. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

_______________________________________________
emfcp-dev mailing list
emfcp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/emfcp-dev



--
Eugen Neufeld, M.Sc.

Software Engineer / Consultant
EclipseSource Munich

Email: eneufeld@eclipsesource.com
Web: http://eclipsesource.com/munich
Mobil: +49 176 22 85 11 50
Phone: +49 89 21 555 30 - 13
Fax: +49 89 21 555 30 - 19

EclipseSource Muenchen GmbH
Agnes-Pockels-Bogen 1
80992 Muenchen

General Managers: Dr. Jonas Helming, Dr. Maximilian Koegel
Registered Office: Agnes-Pockels-Bogen 1, 80992 Muenchen, Commercial Register Muenchen, HRB 191789

Back to the top