public class FilteredEClassContentProvider extends Object implements org.eclipse.jface.viewers.ITreeContentProvider
ITreeContentProvider
to show available EClass
s in a tree. The hierachy will be build based on
EPackage
s. If there is only one EPackage
containing all EClass
s, a flat list will be shown.Constructor and Description |
---|
FilteredEClassContentProvider(Collection<org.eclipse.emf.ecore.EPackage> unsupportedEPackages,
Collection<org.eclipse.emf.ecore.EPackage> packagesToBeShown,
Collection<org.eclipse.emf.ecore.EClass> eClassesToBeShown)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
Object[] |
getChildren(Object parentElement) |
Object[] |
getElements(Object inputElement) |
Object |
getParent(Object element) |
boolean |
hasChildren(Object element) |
void |
inputChanged(org.eclipse.jface.viewers.Viewer viewer,
Object oldInput,
Object newInput) |
public FilteredEClassContentProvider(Collection<org.eclipse.emf.ecore.EPackage> unsupportedEPackages, Collection<org.eclipse.emf.ecore.EPackage> packagesToBeShown, Collection<org.eclipse.emf.ecore.EClass> eClassesToBeShown)
unsupportedEPackages
- EPackage
s to be ignored completelypackagesToBeShown
- EPackage
s to be shown in the tree, if a package is not in this list, no EClasses
will be shown.eClassesToBeShown
- EClass
s to be shown.public void dispose()
dispose
in interface org.eclipse.jface.viewers.IContentProvider
public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput)
inputChanged
in interface org.eclipse.jface.viewers.IContentProvider
public Object[] getElements(Object inputElement)
getElements
in interface org.eclipse.jface.viewers.IStructuredContentProvider
getElements
in interface org.eclipse.jface.viewers.ITreeContentProvider
public Object[] getChildren(Object parentElement)
getChildren
in interface org.eclipse.jface.viewers.ITreeContentProvider
public Object getParent(Object element)
getParent
in interface org.eclipse.jface.viewers.ITreeContentProvider
public boolean hasChildren(Object element)
hasChildren
in interface org.eclipse.jface.viewers.ITreeContentProvider
Copyright © 2016. All rights reserved.