org.eclipse.emf.transaction.ui.provider
Class TransactionalAdapterFactoryLabelProvider

java.lang.Object
  extended by org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
      extended by org.eclipse.emf.transaction.ui.provider.TransactionalAdapterFactoryLabelProvider
All Implemented Interfaces:
INotifyChangedListener, IBaseLabelProvider, ILabelProvider, ITableLabelProvider

public class TransactionalAdapterFactoryLabelProvider
extends AdapterFactoryLabelProvider

Automatically wraps any potential access to model objects in read transactions.


Field Summary
 
Fields inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
adapterFactory, labelProviderListeners
 
Constructor Summary
TransactionalAdapterFactoryLabelProvider(TransactionalEditingDomain domain, AdapterFactory adapterFactory)
          Initializes me with the editing domain in which I create read transactions and that adapter factory that provides content providers.
 
Method Summary
 Image getColumnImage(Object object, int columnIndex)
          Extends the inherited implementation by running in a read-only transaction.
 String getColumnText(Object object, int columnIndex)
          Extends the inherited implementation by running in a read-only transaction.
protected  Image getDefaultImage(Object object)
          Extends the inherited implementation by running in a read-only transaction.
 Image getImage(Object object)
          Extends the inherited implementation by running in a read-only transaction.
protected  Image getImageFromObject(Object object)
          Extends the inherited implementation by running in a read-only transaction.
 String getText(Object object)
          Extends the inherited implementation by running in a read-only transaction.
 boolean isLabelProperty(Object object, String id)
          Extends the inherited implementation by running in a read-only transaction.
protected  Object run(RunnableWithResult run)
          Runs the specified runnable in the editing domain, with interrupt handling.
 
Methods inherited from class org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
addListener, dispose, fireLabelProviderChanged, getAdapterFactory, notifyChanged, removeListener, setAdapterFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionalAdapterFactoryLabelProvider

public TransactionalAdapterFactoryLabelProvider(TransactionalEditingDomain domain,
                                                AdapterFactory adapterFactory)
Initializes me with the editing domain in which I create read transactions and that adapter factory that provides content providers.

Parameters:
domain - my editing domain
adapterFactory - the adapter factory
Method Detail

run

protected Object run(RunnableWithResult run)
Runs the specified runnable in the editing domain, with interrupt handling.

Parameters:
run - the runnable to run
Returns:
its result, or null on interrupt

getColumnImage

public Image getColumnImage(Object object,
                            int columnIndex)
Extends the inherited implementation by running in a read-only transaction.

Specified by:
getColumnImage in interface ITableLabelProvider
Overrides:
getColumnImage in class AdapterFactoryLabelProvider

getColumnText

public String getColumnText(Object object,
                            int columnIndex)
Extends the inherited implementation by running in a read-only transaction.

Specified by:
getColumnText in interface ITableLabelProvider
Overrides:
getColumnText in class AdapterFactoryLabelProvider

getDefaultImage

protected Image getDefaultImage(Object object)
Extends the inherited implementation by running in a read-only transaction.

Overrides:
getDefaultImage in class AdapterFactoryLabelProvider

getImage

public Image getImage(Object object)
Extends the inherited implementation by running in a read-only transaction.

Specified by:
getImage in interface ILabelProvider
Overrides:
getImage in class AdapterFactoryLabelProvider

getImageFromObject

protected Image getImageFromObject(Object object)
Extends the inherited implementation by running in a read-only transaction.

Overrides:
getImageFromObject in class AdapterFactoryLabelProvider

getText

public String getText(Object object)
Extends the inherited implementation by running in a read-only transaction.

Specified by:
getText in interface ILabelProvider
Overrides:
getText in class AdapterFactoryLabelProvider

isLabelProperty

public boolean isLabelProperty(Object object,
                               String id)
Extends the inherited implementation by running in a read-only transaction.

Specified by:
isLabelProperty in interface IBaseLabelProvider
Overrides:
isLabelProperty in class AdapterFactoryLabelProvider

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.