public static InstanceStateMachine_c getOneSM_ISMOnR518( ModelRoot modelRoot, ModelClass_c target, ClassQueryInterface_c test, boolean loadComponent) { InstanceStateMachine_c result = null; result = find_getOneSM_ISMOnR518(modelRoot, target, test); if (result == null && (loadComponent)) { // Containment Relation List comps = PersistenceManager.findAllChildComponents( target.getPersistableComponent(), modelRoot, InstanceStateMachine_c.class); for (int i = 0; i < comps.size(); i++) { PersistableModelComponent component = (PersistableModelComponent) comps.get(i); if (!component.isLoaded()) { try { component.load(new NullProgressMonitor()); result = find_getOneSM_ISMOnR518(modelRoot, target, test); if (result != null) return result; } catch (Exception e) { CorePlugin.logError("Error Loading component", e); } } } } return result; }