Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 6cd75b3a15ff41917b45450c97f182b2d055ce14 (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
42
43
44
/*******************************************************************************
 * Copyright (c) 2007, 2020 Borland Software Corporation, CEA LIST, Artal 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: 
 *    Artem Tikhomirov (Borland) - initial API and implementation
 *    Michael Golubev (Montages) - #386838 - migrate to Xtend2
 *    Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
 *****************************************************************************/
package xpt

import com.google.inject.Inject
import org.eclipse.papyrus.gmf.codegen.gmfgen.GenCommonBase
import org.eclipse.papyrus.gmf.codegen.gmfgen.GenEditorGenerator

@com.google.inject.Singleton class GenEditorGenerator_qvto {
	@Inject extension GenModelUtils_qvto;

	/** 
	 * FIXME remove java-only GenEditorGenerator#hasAudits or declare it in metamodel
	 */
	def boolean hasAudits(GenEditorGenerator editorGen) {
		return editorGen.audits != null && !editorGen.audits.rules.empty
	}

	/** 
	 * @see GenModelUtils#jdkComplianceLevel
	 */
	def int jdkComplianceLevel(GenEditorGenerator xptSelf) {
		//TODO honest field in the GenEditorGenerator instead of hardcoded value
		return xptSelf.diagram.domainDiagramElement.jdkComplianceLevel();
	}

	def int jdkComplianceLevel(GenCommonBase xptSelf) {
		return xptSelf.diagram.editorGen.jdkComplianceLevel()
	}

}

Back to the top