Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] StructureViewer and LabelProvider
[EMF Compare] StructureViewer and LabelProvider [message #91153] Fri, 20 July 2007 12:30 Go to next message
Sascha Theves is currently offline Sascha ThevesFriend
Messages: 39
Registered: July 2009
Member
Hello,

when we compare our model files, the images in the structure viewer are very
small and the label provider doesn`t uses the label features for our model
elements that we have defined in our genmodel. Is there a possibillity to
extend the ItemProviders of the DiffModel to show our images and labels?

Thanks in advance,

Sascha
Re: [EMF Compare] StructureViewer and LabelProvider [message #91169 is a reply to message #91153] Fri, 20 July 2007 13:41 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080805080804090402020309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

You could get this behavior by implementing your own ItemProviders
extending those you can find in org.eclipse.emf.compare.diff.provider
and overriding their getImage(Object) and getText(Object) methods.

Once done, you'll have to extends
org.eclipse.emf.compare.diff.provider.DiffItemProviderAdapte rFactory and
override all the create???Adapter you want to replace by your own.

The last step for the StructureViewer's icon replacement will then be to
add "org.eclipse.emf.edit.itemProviderAdapterFactories" to your
contribution plug-in's extension points and adding to it (in your
plugin.xml since it doesn't seem to be possible from the GUI) a child of
the form :
<factory
uri = "http://www.eclipse.org/emf/compare/diff/1.0"
class = %your adapter factory%
supportedTypes =
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource" />

Laurent Goubet
Obeo


Sascha Theves a
Re: [EMF Compare] StructureViewer and LabelProvider [message #608838 is a reply to message #91153] Fri, 20 July 2007 13:41 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------080805080804090402020309
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi,

You could get this behavior by implementing your own ItemProviders
extending those you can find in org.eclipse.emf.compare.diff.provider
and overriding their getImage(Object) and getText(Object) methods.

Once done, you'll have to extends
org.eclipse.emf.compare.diff.provider.DiffItemProviderAdapte rFactory and
override all the create???Adapter you want to replace by your own.

The last step for the StructureViewer's icon replacement will then be to
add "org.eclipse.emf.edit.itemProviderAdapterFactories" to your
contribution plug-in's extension points and adding to it (in your
plugin.xml since it doesn't seem to be possible from the GUI) a child of
the form :
<factory
uri = "http://www.eclipse.org/emf/compare/diff/1.0"
class = %your adapter factory%
supportedTypes =
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource" />

Laurent Goubet
Obeo


Sascha Theves a
Previous Topic:[EMF Compare] StructureViewer and LabelProvider
Next Topic:JET2: Invalid Java source folder
Goto Forum:
  


Current Time: Sat Apr 20 02:40:42 GMT 2024

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

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

Back to the top