blob: 7ae30ce05518c0b371ac6008d0298a845a794626 [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.meta.features.create;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.context.ICreateContext;
import org.eclipse.fmc.blockdiagram.editor.model.ShapeStyle;
import org.eclipse.fmc.mm.Agent;
/**
* Feature Class for creating the graphical representation and the business
* model of a human agent.
*
* @author Patrick Jahnke
*
*/
public class HumanAgentCreateMetaFeature extends ShapeCreateMetaFeature {
/**
* Constructor just calls the super constructor.
*
* @param fp
* @param name
* @param description
* @param modelType
* @param icon
*/
public HumanAgentCreateMetaFeature(IFeatureProvider fp, String name,
String description, Object modelType, String icon) {
super(fp, name, description, modelType, icon);
}
/**
* Constructor just calls the super constructor.
*
* @param fp
* @param name
* @param description
* @param modelType
* @param graphicalType
* @param icon
*/
public HumanAgentCreateMetaFeature(IFeatureProvider fp, String name,
String description, Object modelType, ShapeStyle graphicalType,
String icon) {
super(fp, name, description, modelType, graphicalType, icon);
}
/**
* Call the create method of the superclass and set the human property of
* the created business object.
*/
@Override
public Object[] create(ICreateContext context) {
Object[] obj = super.create(context);
Agent agent = (Agent) obj[0];
agent.setHuman(true);
return obj;
}
}