blob: e5b159aeb4bd01dd8db12d2a3c1895bef6622436 [file] [log] [blame]
/*******************************************************************************
* <copyright>
*
* Copyright (c) 2013, 2013 SAP AG.
* 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
*
* Contributors:
* SAP AG - initial API, implementation and documentation
*
* </copyright>
*
*******************************************************************************/
package org.eclipse.fmc.blockdiagram.editor.filters;
import org.eclipse.graphiti.mm.pictograms.Connection;
import org.eclipse.graphiti.mm.pictograms.Diagram;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.ui.platform.AbstractPropertySectionFilter;
/**
*
* @author Benjamin Schmeling
*
*/
public class ShapeAndConnectionFilter extends AbstractPropertySectionFilter {
@Override
protected boolean accept(PictogramElement pictogramElement) {
return pictogramElement != null
&& (pictogramElement instanceof Shape || pictogramElement instanceof Connection)
&& !(pictogramElement instanceof Diagram);
}
}