org.eclipse.emf.emfstore.internal.client.ui.common
Class EClassFilter

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.ui.common.EClassFilter

public final class EClassFilter
extends Object

Utility class for determing filtered types and operations that involve only such types.

Author:
emueller

Field Summary
static EClassFilter INSTANCE
          Singleton.
 
Method Summary
 String getFilterLabel()
          Returns the label that is used to group filtered types or operations that involve only such types.
 boolean involvesOnlyFilteredEClasses(ModelElementIdToEObjectMapping idToEObjectMapping, AbstractOperation operation)
          Whether the given operation only involves types that are considered to be filtered.
 boolean isEnabled()
          Whether any EClass has been marked as filtered at all.
 boolean isFiltered(org.eclipse.emf.ecore.EClass eClass, org.eclipse.emf.ecore.EStructuralFeature feature)
          Whether the given EClass is considered filtered taking the changed feature into account.
 boolean isFilteredEClass(org.eclipse.emf.ecore.EClass eClass)
          Whether the given EClass is considered as filtered.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final EClassFilter INSTANCE
Singleton.

Method Detail

isEnabled

public boolean isEnabled()
Whether any EClass has been marked as filtered at all.

Returns:
true, if at least one EClass should be filtered

isFilteredEClass

public boolean isFilteredEClass(org.eclipse.emf.ecore.EClass eClass)
Whether the given EClass is considered as filtered.

Parameters:
eClass - the class to check
Returns:
true, if the given EClass is considered as filtered

isFiltered

public boolean isFiltered(org.eclipse.emf.ecore.EClass eClass,
                          org.eclipse.emf.ecore.EStructuralFeature feature)
Whether the given EClass is considered filtered taking the changed feature into account.

Parameters:
eClass - the EClass to check.
feature - the changed feature
Returns:
true of the EClass is considered as filtered, false otherwise

involvesOnlyFilteredEClasses

public boolean involvesOnlyFilteredEClasses(ModelElementIdToEObjectMapping idToEObjectMapping,
                                            AbstractOperation operation)
Whether the given operation only involves types that are considered to be filtered.

Parameters:
idToEObjectMapping - a mapping that is used to resolve the EObjects contained in the operation
operation - the operations to check
Returns:
true, if the operation only involves types that are considered to be filtered

getFilterLabel

public String getFilterLabel()
Returns the label that is used to group filtered types or operations that involve only such types.

Returns:
the label used for grouping filtered types


Copyright © 2016. All Rights Reserved.