use of org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation in project tdi-studio-se by Talend.
the class BusinessEditPartProvider method provides.
/**
* @generated
*/
public synchronized boolean provides(IOperation operation) {
if (operation instanceof CreateGraphicEditPartOperation) {
View view = ((IEditPartOperation) operation).getView();
if (!BusinessProcessEditPart.MODEL_ID.equals(BusinessVisualIDRegistry.getModelID(view))) {
return false;
}
if (isAllowCaching() && getCachedPart(view) != null) {
return true;
}
IGraphicalEditPart part = createEditPart(view);
if (part != null) {
if (isAllowCaching()) {
cachedPart = new WeakReference(part);
cachedView = new WeakReference(view);
}
return true;
}
}
return false;
}
Aggregations