| [EMF Compare] StructureViewer and LabelProvider [message #91153] | 
Fri, 20 July 2007 08:30   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 09:41   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 09:41   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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 
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.05491 seconds