/**
* This file is protected by Copyright.
* Please refer to the COPYRIGHT file distributed with this source distribution.
*
* This file is part of REDHAWK IDE.
*
* All rights reserved. This program and the accompanying materials are made available under
* the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html.
*/
package gov.redhawk.core.graphiti.ui.properties;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.ui.platform.AbstractPropertySectionFilter;
import gov.redhawk.core.graphiti.ui.ext.RHContainerShape;
import gov.redhawk.core.graphiti.ui.util.DUtil;
import mil.jpeojtrs.sca.partitioning.ComponentInstantiation;
/**
* Selects only {@link ComponentInstantiation}s, representing either design-time or runtime instances of
* components/devices/services.
* @see {@link PropertiesSection}
*/
public class PropertyContainerFilter extends AbstractPropertySectionFilter {
@Override
protected boolean accept(PictogramElement pictogramElement) {
return (pictogramElement instanceof RHContainerShape) && DUtil.getBusinessObject(pictogramElement, ComponentInstantiation.class) != null;
}
}