Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 3d71bad7bed2f154ab31977b2b067bf40f450c93 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*****************************************************************************
 * Copyright (c) 2020 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
 * http://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   Vincent Lorenzo (CEA LIST) <vincent.lorenzo@cea.fr> - Initial API and implementation
 *
 *****************************************************************************/

package org.eclipse.papyrus.emf.facet.architecture.customizationconfiguration.comparators;

import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.papyrus.emf.facet.architecture.customizationconfiguration.AbsoluteOrder;
import org.eclipse.papyrus.emf.facet.architecture.customizationconfiguration.CustomizationReference;
import org.eclipse.papyrus.emf.facet.architecture.customizationconfiguration.EMFFacetTreeViewerConfiguration;

/**
 * this class lists the error code we can get merging {@link EMFFacetTreeViewerConfiguration}
 */
public final class CustomizationMergeErrorCode {

	private CustomizationMergeErrorCode() {
		// to prevent instantiation
	}

	/**
	 * an {@link EMFFacetTreeViewerConfiguration} extends another one which is not in the same ADL
	 */
	public static final int CHECK_ERROR__REFERENCE_OUTSIDE_OF_ADL = 1;

	/**
	 * an {@link EMFFacetTreeViewerConfiguration#getExtends()} create an infinite loop
	 */
	public static final int CHECK_ERROR__EXTENDS_INFINITE_LOOP = CHECK_ERROR__REFERENCE_OUTSIDE_OF_ADL + 1;

	/**
	 * The defined root don't use only {@link AbsoluteOrder} to define {@link CustomizationReference}
	 */
	public static final int CHECK_ERROR__NOT_ONLY_USE_ABSOLUTE_ORDER_IN_ROOTS = CHECK_ERROR__EXTENDS_INFINITE_LOOP + 1;

	/**
	 * Several identical order
	 */
	public static final int CHECK_ERROR__DUPLICATE_ABSOLUTE_ORDER = CHECK_ERROR__NOT_ONLY_USE_ABSOLUTE_ORDER_IN_ROOTS + 1;

	/**
	 * I'm redefined several time
	 */
	public static final int CHECK_ERROR__TOO_MANY_REDEFINES_FOR_ME = CHECK_ERROR__DUPLICATE_ABSOLUTE_ORDER + 1;

	/**
	 * I'm not alone to redefine this customization
	 */
	public static final int CHECK_ERROR__EXTRA_REDEFINES = CHECK_ERROR__TOO_MANY_REDEFINES_FOR_ME + 1;

	/**
	 * Too many Customization must be inserted before me
	 */
	public static final int CHECK_ERROR__TOO_MANY_BEFORE_FOR_ME = CHECK_ERROR__EXTRA_REDEFINES + 1;

	/**
	 * I'm not alone to want to insert a Customization before this one.
	 */
	public static final int CHECK_ERROR__EXTRA_BEFORE = CHECK_ERROR__TOO_MANY_BEFORE_FOR_ME + 1;

	/**
	 * Too many Customization must be inserted after me
	 */
	public static final int CHECK_ERROR__TOO_MANY_AFTER_FOR_ME = CHECK_ERROR__EXTRA_BEFORE + 1;

	/**
	 * I'm not alone to want to insert a Customization after this one.
	 */
	public static final int CHECK_ERROR__EXTRA_AFTER = CHECK_ERROR__TOO_MANY_AFTER_FOR_ME + 1;

	/**
	 * The redefined customization is not found
	 */
	public static final int MERGE_ERROR__REDEFINE_NOT_FOUND = CHECK_ERROR__EXTRA_AFTER + 1;

	/**
	 * The customization before which one I must be inserted is not found
	 */
	public static final int MERGE_ERROR__BEFORE_NOT_FOUND = MERGE_ERROR__REDEFINE_NOT_FOUND + 1;

	/**
	 * The customization after which one I must be inserted is not found
	 */
	public static final int MERGE_ERROR__AFTER_NOT_FOUND = MERGE_ERROR__BEFORE_NOT_FOUND + 1;

	/**
	 * The code used to create a {@link MultiStatus}
	 */
	public static final int MULTI_STATUS_CODE = MERGE_ERROR__AFTER_NOT_FOUND + 1;

}

Back to the top