Skip to main content
summaryrefslogtreecommitdiffstats
blob: b642e3512da2f28b5e553cb38a0eab3d4fca57c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*******************************************************************************
 * Copyright (c) 2015 E.D.Willink and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     E.D.Willink - initial API and implementation
 *******************************************************************************/
package org.eclipse.qvtd.pivot.qvtbase.utilities;

import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.ocl.pivot.internal.utilities.OCLInternal;
import org.eclipse.ocl.pivot.resource.ProjectManager;

/**
 * The QVTbase facade refines the OCL facade to enforce use of the QVTbase Standard Library.
 */
public class QVTbase extends OCLInternal
{	
	public static @NonNull QVTbase newInstance(@NonNull ProjectManager projectManager, @Nullable ResourceSet externalResourceSet) {	
		QVTbaseEnvironmentFactory environmentFactory = new QVTbaseEnvironmentFactory(projectManager, externalResourceSet);
		QVTbase qvt = new QVTbase(environmentFactory);
		if (externalResourceSet != null) {
			environmentFactory.adapt(externalResourceSet);
		}
		return qvt;
	}
	
	public QVTbase(@NonNull QVTbaseEnvironmentFactory environmentFactory) {
		super(environmentFactory);
	}
	
	@Override
	public @NonNull QVTbaseEnvironmentFactory getEnvironmentFactory() {
		return (QVTbaseEnvironmentFactory)super.getEnvironmentFactory();
	}
}

Back to the top