if (qualifier.getItemType().equals(ItemTypes.PROCESS))
{
// Open the process of select the node/socket/parameter
ProcessItem process = getProcess(mo);
OpenEvent oEvent = new OpenEvent(this, "open.modeler", process);
fireEvent(oEvent);
// The event must be fired twice, because the first only deselect the current selection.
// The second select the component.
QualifierEvent jEvent = new QualifierEvent(this, "modeler.view.select", qualifier);
fireEvent(jEvent);
fireEvent(jEvent);
}
else if (qualifier.getItemType().equals(ItemTypes.ACTIVITY) || qualifier.getItemType().equals(ItemTypes.WEBSERVICE) || qualifier.getItemType().equals(ItemTypes.VISUAL) || qualifier.getItemType().equals(ItemTypes.ACTOR))
{
// Open the activity in the component editor
ActivityItem activity = getActivity(mo);
OpenEvent event = new OpenEvent(this, "global.edit.edit", activity);
fireEvent(event);
}
else if (qualifier.getItemType().equals(ItemTypes.TYPE))
{
// Open the datatype in the model manager
DataTypeItem data = getDataType(mo);
OpenEvent event = new OpenEvent(this, "plugin.itembrowser.open", data);
fireEvent(event);
}
else if (qualifier.getItemType().equals(ItemTypes.MODEL))
{
// Open the datatype in the model manager
OpenEvent event = new OpenEvent(this, "plugin.itembrowser.open", mo);
fireEvent(event);
}
}
}