Debian Codegraph @

plugins/org.eclipse.emf.databinding.edit/src/org/eclipse/emf/databinding/edit/IEMFEditValueProperty.java

raw
1 /**
2 * Copyright (c) 2008 Matthew Hall and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v2.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v20.html
7 *
8 * Contributors:
9 * Matthew Hall - initial API and implementation (bug 195222)
10 * Tom Schindl <[email protected]> - port to EMF in 262160
11 */
12 package org.eclipse.emf.databinding.edit;
13
14 import org.eclipse.core.databinding.property.value.IValueProperty;
15 import org.eclipse.emf.databinding.FeaturePath;
16 import org.eclipse.emf.databinding.IEMFListProperty;
17 import org.eclipse.emf.databinding.IEMFMapProperty;
18 import org.eclipse.emf.databinding.IEMFSetProperty;
19 import org.eclipse.emf.databinding.IEMFValueProperty;
20 import org.eclipse.emf.ecore.EStructuralFeature;
21 import org.eclipse.emf.edit.domain.EditingDomain;
22
23
24 /**
25 * <p><b>PROVISIONAL:</b> This API is subject to arbitrary change, including renaming or removal.</p>
26 *
27 * An {@link IValueProperty} extension interface with convenience methods for
28 * creating nested {@link EStructuralFeature} properties and does changes through the {@link EditingDomain}
29 *
30 * @since 2.5
31 * @noextend This interface is not intended to be extended by clients.
32 * @noimplement This interface is not intended to be implemented by clients.
33 */
34 public interface IEMFEditValueProperty extends IEMFEditProperty, IEMFValueProperty
35 {
36 /**
37 * Returns a master-detail combination of this property and the specified
38 * nested value feature.
39 *
40 * @param featurePath
41 * the nested value property to observe.
42 * @return a master-detail combination of this property and the specified
43 * nested value feature.
44 * @see #value(IEMFEditValueProperty)
45 */
46 public IEMFEditValueProperty value(FeaturePath featurePath);
47
48 /**
49 * Returns a master-detail combination of this property and the specified
50 * value feature.
51 *
52 * @param feature
53 * the nested value property to observe.
54 * @return a master-detail combination of this property and the specified
55 * value feature.
56 * @see #value(IEMFEditValueProperty)
57 */
58 public IEMFEditValueProperty value(EStructuralFeature feature);
59
60 /**
61 * Returns a master-detail combination of this property and the specified
62 * value property. The returned property will observe the specified detail
63 * value property for the value of the master value property.
64 * <p>
65 * Example:
66 *
67 * <pre>
68 * // Observes the Node-typed &quot;parent&quot; property of a Node object
69 * IEMFValueProperty parent = EMFProperties.value(MyPackage.Literals.NODE_PARENT);
70 * // Observes the string-typed &quot;name&quot; property of a Node object
71 * IEMFValueProperty name = EMFProperties.value(MyPackage.Literals.NODE_NAME);
72 * // Observes the name of the parent of a Node object.
73 * IEMFValueProperty parentName = parent.value(name);
74 * </pre>
75 *
76 * @param property
77 * the detail property to observe
78 * @return a master-detail combination of this property and the specified
79 * value property.
80 */
81 public IEMFEditValueProperty value(IEMFEditValueProperty property);
82
83 /**
84 * Returns a master-detail combination of this property and the specified
85 * list feature.
86 *
87 * @param feature
88 * the list feature to observe
89 * @return a master-detail combination of this property and the specified
90 * list feature.
91 * @see #list(IEMFEditListProperty)
92 */
93 public IEMFEditListProperty list(EStructuralFeature feature);
94
95 /**
96 * Returns a master-detail combination of this property and the specified
97 * list property. The returned property will observe the specified list
98 * property for the value of the master property.
99 * <p>
100 * Example:
101 *
102 * <pre>
103 * // Observes the Node-typed &quot;parent&quot; property of a Node object.
104 * IEMFValueProperty parent = EMFProperties.value(MyPackage.Literals.NODE_PARENT);
105 * // Observes the List-typed &quot;children&quot; property of a Node object
106 * // where the elements are Node objects
107 * IEMFListProperty children = EMFProperties.list(MyPackage.Literals.NODE_CHILDREN);
108 * // Observes the children of the parent (siblings) of a Node object.
109 * IEMFListProperty siblings = parent.list(children);
110 * </pre>
111 *
112 * @param property
113 * the detail property to observe
114 * @return a master-detail combination of this property and the specified
115 * list property.
116 */
117 public IEMFEditListProperty list(IEMFEditListProperty property);
118
119 /**
120 * Returns a master-detail combination of this property and the specified
121 * map feature.
122 *
123 * @param feature
124 * the map property to observe
125 * @return a master-detail combination of this property and the specified
126 * map feature.
127 * @see #map(IEMFEditMapProperty)
128 */
129 public IEMFEditMapProperty map(EStructuralFeature feature);
130
131 /**
132 * Returns a master-detail combination of this property and the specified
133 * map property. The returned property will observe the specified map
134 * property for the value of the master property.
135 * <p>
136 * Example:
137 *
138 * <pre>
139 * // Observes the Contact-typed &quot;supervisor&quot; property of a
140 * // Contact class
141 * IEMFValueProperty supervisor = EMFProperties.value(MyPackage.Literals.CONTACT_SUPERVISOR);
142 * // Observes the property &quot;phoneNumbers&quot; of a Contact object--a property mapping
143 * // from PhoneNumberType to PhoneNumber &quot;set-typed &quot;children&quot;,
144 * IEMFMapProperty phoneNumbers = EMFProperties.map(MyPackage.Literals.CONTACT_PHONENUMBERS);
145 * // Observes the phone numbers of a contact's supervisor:
146 * IEMFMapProperty supervisorPhoneNumbers = supervisor.map(phoneNumbers);
147 * </pre>
148 *
149 * @param property
150 * the detail property to observe
151 * @return a master-detail combination of this property and the specified
152 * map property.
153 */
154 public IEMFEditMapProperty map(IEMFEditMapProperty property);
155
156 public IEMFEditListProperty list(IEMFListProperty property);
157
158 public IEMFEditMapProperty map(IEMFMapProperty property);
159
160 public IEMFEditValueProperty value(IEMFValueProperty property);
161
162 /**
163 * Returns a master-detail combination of this property and the specified
164 * set property.
165 *
166 * @param feature
167 * the set feature to observe
168 * @return a master-detail combination of this property and the specified
169 * set property.
170 * @see #set(IEMFSetProperty)
171 */
172 public IEMFEditSetProperty set(EStructuralFeature feature);
173
174 /**
175 * Returns a master-detail combination of this property and the specified
176 * set property. The returned property will observe the specified set
177 * property for the value of the master property.
178 * <p>
179 * Example:
180 *
181 * <pre>
182 * // Observes the Node-typed &quot;parent&quot; property of a Node object.
183 * IEMFValueProperty parent = EMFProperties.value(MyPackage.Literals.NODE__PARENT);
184 * // Observes the Set-typed &quot;children&quot; property of a Node object
185 * // where the elements are Node objects
186 * IEMFSetProperty children = EMFProperties.set(MyPackage.Literals.NODE__CHILDREN);
187 * // Observes the children of the parent (siblings) of a Node object.
188 * IEMFSetProperty siblings = parent.set(children);
189 * </pre>
190 *
191 * @param property
192 * the detail property to observe
193 * @return a master-detail combination of this property and the specified
194 * set property.
195 */
196 public IEMFEditSetProperty set(IEMFEditSetProperty property);
197 }