Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Custom label provider for Model Navigator view
Custom label provider for Model Navigator view [message #1745430] Mon, 10 October 2016 14:59 Go to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior Member
Hello, Papyrus community!

I want to customize standard papyrus label provider to add custom icons to UML model, depending on profile, profile attributes, model elements and user preferences.

I've tried to use CNF <override> mechanics, but it looks like Papyrus does not respect CNF registrations of label providers and instead always uses it's own implementation.

So, there sure should be a way to use custom/delegating label provider to use custom icons for some element types and delegate to the default provider for the rest.

So, the question is how to register a custom label provider in Model Elements view using Papyrus API?

Many thanks in advance!
Re: Custom label provider for Model Navigator view [message #1745495 is a reply to message #1745430] Tue, 11 October 2016 15:15 Go to previous message
Christian W. Damus is currently offline Christian W. DamusFriend
Messages: 1199
Registered: July 2009
Location: Canada
Senior Member

Hi, Leonid,

Papyrus offers a few different mechanisms for customization of the icons in the Model Explorer. Firstly, if an element has a stereotype applied that has a custom icon defined in the profile, then that icon should be used.

But, for more flexibility, the Papyrus APIs include a Label Provider Service. Search references in plugin.xml to the org.eclipse.papyrus.infra.services.labelprovider.labelProvider extension point for examples of how to register a label provider with this service and how to give it priority over other providers and filter its applicability to specific elements in the Model Explorer.

HTH,

Christian
Previous Topic:show provide/required interfaces in component diagram
Next Topic:Constraint parameters not visible
Goto Forum:
  


Current Time: Tue Jan 21 12:17:59 GMT 2020

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

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

Back to the top