use of org.osate.aadl2.ClassifierFeature in project osate2 by osate.
the class AadlElementContentProvider method hasChildren.
@Override
public boolean hasChildren(Object element) {
if (element instanceof IFile || element instanceof ContributedAadlStorage) {
return true;
} else {
EObjectURIWrapper wrapper = (EObjectURIWrapper) element;
EObject eObject = new ResourceSetImpl().getEObject(wrapper.getUri(), true);
if (eObject instanceof AadlPackage || eObject instanceof PropertySet || eObject instanceof ComponentInstance) {
return eObject.eContents().stream().anyMatch(member -> !(member instanceof SystemOperationMode || member instanceof PropertyAssociation));
} else if (eObject instanceof PackageSection) {
return eObject.eContents().stream().anyMatch(member -> member instanceof Classifier || member instanceof AnnexLibrary);
} else if (eObject instanceof Classifier) {
return eObject.eContents().stream().anyMatch(member -> member instanceof ClassifierFeature || member instanceof PropertyAssociation);
} else {
return false;
}
}
}
Aggregations