Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: da26b1896b6cb8c5da880db7879cbda860d9c352 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/**
 * Copyright (c) 2011 Mia-Software.
 *
 * 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:
 * 	Nicolas Guyomar (Mia-Software) - Bug 349546 - EMF Facet facetSet editor
 */
package org.eclipse.papyrus.emf.facet.efacet.ui.internal.exported.wizard;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.papyrus.emf.facet.efacet.FacetSet;
import org.eclipse.papyrus.emf.facet.efacet.Query;
import org.eclipse.papyrus.emf.facet.efacet.ui.internal.IQueryCreationPagePart2;
import org.eclipse.papyrus.emf.facet.efacet.ui.internal.wizards.pages.CreateQueryWizardPage;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite;

/**
 * This interface has to be implemented by {@link Query} factory UI Class. It is used to complete a
 * generic {@link Query} creation wizard with specific widget.
 *
 * @deprecated This interface has been replaced by {@link IQueryCreationPagePart2}. No tracking bug needed because this API has not been released yet.
 * @since 0.2
 */
@Deprecated
public interface IQueryCreationPagePart {

	/**
	 * Set the {@link Query}'s {@link FacetSet}.
	 *
	 * @param facetSet
	 *            the given {@link FacetSet}
	 */
	public void setFacetSet(FacetSet facetSet);

	/**
	 * Set the {@link Query}'s upperBound.
	 *
	 * @param upperBound
	 *            the upperBound.
	 */
	public void setUpperBound(int upperBound);

	/**
	 * Set the {@link Query}'s lowerBound.
	 *
	 * @param lowerBound
	 *            the lowerBound.
	 */
	public void setLowerBound(int lowerBound);

	/**
	 * Set the {@link Query}'s {@link Query#isOrdered() <em>attribute</em>} attribute.
	 *
	 * @param ordered
	 *            whether
	 */
	public void setOrdered(final boolean ordered);

	/**
	 * Set the {@link Query}'s {@link Query#isUnique() <em>unique</em>} attribute.
	 *
	 * @param unique
	 *            Whether the query is unique or not.
	 */
	public void setUnique(final boolean unique);

	/**
	 * Set the {@link Query}'s type.
	 *
	 * @param queryType
	 *            the {@link Query}'s type.
	 */
	public void setQueryType(EClassifier queryType);

	/**
	 * Set the {@link Query}'s name.
	 *
	 * @param name
	 *            the query's name.
	 */
	public void setQueryName(String name);

	/**
	 * Set the {@link Query}'s {@link Query#isCanBeCached() <em>Can Be Cached</em>}.
	 *
	 * @param canBeCached
	 *            whether the query result can be cached.
	 */
	public void setCanBeCached(boolean canBeCached);

	/**
	 * Set the {@link Query}'s {@link Query#isHasSideEffect() <em>Has Side Effect</em>}.
	 *
	 * @param hasSideEffect
	 *            whether the query has side effect, such as modifying a model when applied on it.
	 */
	public void setHasSideEffect(boolean hasSideEffect);

	/**
	 * Set the {@link Query}'s '{@link Query#getScope <em>Scope</em>}'.
	 *
	 * @param type
	 *            the {@link Query}'s '{@link Query#getScope <em>Scope</em>}'.
	 */
	public void setQueryScope(EClass scope);

	/**
	 * This method is dedicated to create a {@link Query} with every attribute set by the others
	 * methods of {@link IQueryCreationPagePart}.
	 *
	 * @return the newly created {@link Query}
	 */
	public Query performFinish();

	/**
	 * This method is called by the {@link CreateQueryWizardPage}.
	 *
	 * @param parent
	 *            the Wizard's composite to be completed with specific widget for this {@link Query} creation.
	 */
	public void completeComposite(Composite parent);

	/**
	 * Returns <code>true</code> if the composite is complete.
	 *
	 * @return <code>true</code> if the composite is complete.
	 */
	public boolean isCompositeComplete();

	/**
	 * Returns the error messages generated by the part, or null if none.
	 *
	 * @return the error messages generated by the part, or null if none.
	 */
	public String getErrorMessage();

	/**
	 * Add a {@link ModifyListener} on the part.
	 *
	 * @param listener
	 *            a {@link ModifyListener}
	 */
	public void addModifyListener(ModifyListener listener);

	/**
	 * Remove an existing {@link ModifyListener} from the part's listener.
	 *
	 * @param listener
	 *            an existing {@link ModifyListener} listener.
	 */
	public void removeModifyListener(ModifyListener listener);

	/**
	 * Notify the registered listener that something has been modified in the part. It should only
	 * be used as a way to update the buttons' state of the containing wizard dialog.
	 *
	 * @param modifiedComposite
	 *            the composite on which the modification occured.
	 */
	public void notifyCompositeListeners(Composite modifiedComposite);

}

Back to the top