| /******************************************************************************* |
| * Copyright (c) 2011, 2012 Red Hat, Inc. |
| * All rights reserved. |
| * This program is 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: |
| * Red Hat, Inc. - initial API and implementation |
| * |
| * @author Innar Made |
| ******************************************************************************/ |
| package org.eclipse.bpmn2.modeler.core.runtime; |
| |
| import org.eclipse.bpmn2.BaseElement; |
| import org.eclipse.bpmn2.di.BPMNDiagram; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.graphiti.mm.pictograms.PictogramElement; |
| import org.eclipse.graphiti.services.Graphiti; |
| import org.eclipse.graphiti.ui.platform.AbstractPropertySectionFilter; |
| |
| public class PropertySectionFilter extends AbstractPropertySectionFilter { |
| |
| @Override |
| protected boolean accept(PictogramElement pe) { |
| EObject object = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe); |
| return object instanceof BaseElement || object instanceof BPMNDiagram; |
| } |
| } |