diff options
Diffstat (limited to 'cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java')
-rwxr-xr-x | cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java new file mode 100755 index 00000000..839f211d --- /dev/null +++ b/cdo/bundles/org.eclipse.papyrus.cdo.core/src/org/eclipse/papyrus/cdo/core/resource/CDOAwareModelSetServiceFactory.java @@ -0,0 +1,51 @@ +/***************************************************************************** + * Copyright (c) 2013, 2017 CEA LIST and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * CEA LIST - Initial API and implementation + * Christian W. Damus (CEA) - bug 431953 (pre-requisite refactoring of ModelSet service start-up) + * Eike Stepper (CEA) - bug 466520 + * + *****************************************************************************/ +package org.eclipse.papyrus.cdo.core.resource; + +import org.eclipse.papyrus.cdo.internal.core.l10n.Messages; +import org.eclipse.papyrus.infra.core.editor.ModelSetServiceFactory; +import org.eclipse.papyrus.infra.core.resource.ModelSet; +import org.eclipse.papyrus.infra.core.services.ServiceException; +import org.eclipse.papyrus.infra.core.services.ServicesRegistry; + +/** + * This is the CDOAwareModelSetServiceFactory type. Enjoy. + */ +public class CDOAwareModelSetServiceFactory extends ModelSetServiceFactory { + + @Override + public void init(ServicesRegistry servicesRegistry) throws ServiceException { + super.init(servicesRegistry); + } + + @Override + public void disposeService() throws ServiceException { + try { + super.disposeService(); + } catch (ServiceException e) { + throw e; + } catch (Exception e) { + throw new ServiceException(Messages.CDOAwareModelSetServiceFactory_0, e); + } + } + + @Override + protected ModelSet createModelSet() { + return new CDOAwareModelSet(); + } + +} |