boolean (Object editableObject) { if (editableObject instanceof NamedScope scope) { final String scopeId = scope.getScopeId(); return myLocalScopesManager.getScope(scopeId) != null || mySharedScopesManager.getScope(scopeId) != null; } return false; }