Package: InjectableAdapterFactoryEditingDomain

InjectableAdapterFactoryEditingDomain

nameinstructionbranchcomplexitylinemethod
InjectableAdapterFactoryEditingDomain(AdapterFactory)
M: 0 C: 17
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2013 RCP Vision (http://www.rcp-vision.com) and others.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * Lorenzo Bettini - initial API and implementation
10: *******************************************************************************/
11: package org.eclipse.emf.parsley.edit.domain;
12:
13: import java.util.HashMap;
14:
15: import org.eclipse.emf.common.command.BasicCommandStack;
16: import org.eclipse.emf.common.notify.AdapterFactory;
17: import org.eclipse.emf.ecore.plugin.EcorePlugin;
18: import org.eclipse.emf.ecore.resource.Resource;
19: import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
20:
21: import com.google.inject.Inject;
22:
23: /**
24: * @author Lorenzo Bettini
25: *
26: * Injectable {@link AdapterFactoryEditingDomain}
27: */
28: public class InjectableAdapterFactoryEditingDomain extends
29:                 AdapterFactoryEditingDomain {
30:
31:         @Inject
32:         public InjectableAdapterFactoryEditingDomain(AdapterFactory adapterFactory) {
33:                 super(adapterFactory, new BasicCommandStack(),
34:                                 new HashMap<Resource, Boolean>());
35:
36:                 // in the future we might try and computePlatformURIMap
37:                 // using the target platform.
38:                 getResourceSet().getURIConverter().getURIMap()
39:                                 .putAll(EcorePlugin.computePlatformURIMap(false));
40:         }
41: }