Skip to main content

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

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.

Back to the top