blob: 0c1410c55e70d761350966fe79e0055dfe2b0c65 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011, 2012, 2013 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
******************************************************************************/
package org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property;
import org.eclipse.bpmn2.Interface;
import org.eclipse.bpmn2.modeler.core.adapters.ExtendedPropertiesProvider;
import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
import org.eclipse.bpmn2.modeler.ui.property.data.InterfaceDetailComposite;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.swt.widgets.Composite;
public class JbpmInterfaceDetailComposite extends InterfaceDetailComposite {
public JbpmInterfaceDetailComposite(Composite parent, int style) {
super(parent, style);
}
public JbpmInterfaceDetailComposite(AbstractBpmn2PropertySection section) {
super(section);
}
@Override
protected void bindReference(Composite parent, EObject object, EReference reference) {
if ("implementationRef".equals(reference.getName()) && //$NON-NLS-1$
isModelObjectEnabled(object.eClass(), reference)) {
if (parent==null)
parent = getAttributesParent();
final Interface iface = (Interface)object;
String displayName = ExtendedPropertiesProvider.getLabel(object, reference);
JbpmImportObjectEditor editor = new JbpmImportObjectEditor(this,object,reference);
editor.createControl(parent,displayName);
}
else
super.bindReference(parent, object, reference);
}
}