Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Overriding the ListControl
Overriding the ListControl [message #1396394] Tue, 08 July 2014 08:39 Go to next message
Annamalai Mising name is currently offline Annamalai Mising nameFriend
Messages: 126
Registered: July 2009
Senior Member
Hi There

My requirement is quiet simple, i want to override LinkControl and give
my own implementation for getLinkTest for a particular usecase.

I did extend LinkControl and provided my own implementation.
Then i also used the extension point view.swt.renderers and provided my
class for implementation as done in the EmailControlRenderer.

But then i realised that EmailControlRenderer needs a SWT Control to be
returned in createSWTControl method. But LinkControl is not a SWT
Control and also i cannot instansiate my extendedListControl and return
the same in the Renderer.

Now confused on how to do extend the implementation of LinkControl

Re: Overriding the ListControl [message #1400467 is a reply to message #1396394] Mon, 14 July 2014 08:32 Go to previous message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 63
Registered: March 2012
Hi Malai,
The LinkControl is still implemented using the "old" API and is not an AbstractControlSWTRenderer but a SingleControl. The old extensionpoint is org.eclipse.emf.ecp.edit.controls. Those "old" controls (e.g LinkControl, MutliAttributeControl etc) are rendered by the ECPLegacyControlSWTRenderer with a priority of 1.
So you can either extends the LinkControl and register it at the old extensionpoint with a higher internal priority (the old extensionpoint has also priorities which are used to determine the most fitting one).
Or you can simply implement an own control based on SimpleControlSWTControlSWTRenderer.

As the extension point and the interfaces of the LinkControl are marked as deprecated, I would recommend to implement your control based on the SimpleControlSWTControlSWTRenderer.

Previous Topic:[ECP] View validation with OCL constraints
Next Topic:EEF error while generating eef architecture
Goto Forum:

Current Time: Wed Mar 03 07:07:24 GMT 2021

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

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

Back to the top