View | Details | Raw Unified | Return to bug 127252 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.properties (+57 lines)
Lines 224-226 Link Here
224
_UI_FontStyle_NORMAL_literal = NORMAL
224
_UI_FontStyle_NORMAL_literal = NORMAL
225
_UI_FontStyle_BOLD_literal = BOLD
225
_UI_FontStyle_BOLD_literal = BOLD
226
_UI_FontStyle_ITALIC_literal = ITALIC
226
_UI_FontStyle_ITALIC_literal = ITALIC
227
_UI_LayoutData_type = Layout Data
228
_UI_Layoutable_type = Layoutable
229
_UI_Layout_type = Layout
230
_UI_ImplementationAware_type = Implementation Aware
231
_UI_LayoutData_grabExcessHorizontalSpace_feature = Grab Excess Horizontal Space
232
_UI_LayoutData_grabExcessVerticalSpace_feature = Grab Excess Vertical Space
233
_UI_LayoutData_verticalAlignment_feature = Vertical Alignment
234
_UI_LayoutData_horizontalAlignment_feature = Horizontal Alignment
235
_UI_LayoutData_verticalSpan_feature = Vertical Span
236
_UI_LayoutData_horizontalSpan_feature = Horizontal Span
237
_UI_LayoutData_horizontalIndent_feature = Horizontal Indent
238
_UI_LayoutData_sizeHint_feature = Size Hint
239
_UI_LayoutData_owner_feature = Owner
240
_UI_Layoutable_data_feature = Data
241
_UI_Layoutable_layout_feature = Layout
242
_UI_Layout_numColumns_feature = Num Columns
243
_UI_Layout_equalWidth_feature = Equal Width
244
_UI_Layout_margins_feature = Margins
245
_UI_Layout_spacing_feature = Spacing
246
_UI_Alignment_BEGINNING_literal = BEGINNING
247
_UI_Alignment_CENTER_literal = CENTER
248
_UI_Alignment_END_literal = END
249
_UI_Alignment_FILL_literal = FILL
250
_UI_GridLayoutData_type = Grid Layout Data
251
_UI_GridLayout_type = Grid Layout
252
_UI_GridLayoutData_qualifiedClassName_feature = Qualified Class Name
253
_UI_GridLayoutData_bundleName_feature = Bundle Name
254
_UI_GridLayoutData_grabExcessHorizontalSpace_feature = Grab Excess Horizontal Space
255
_UI_GridLayoutData_grabExcessVerticalSpace_feature = Grab Excess Vertical Space
256
_UI_GridLayoutData_verticalAlignment_feature = Vertical Alignment
257
_UI_GridLayoutData_horizontalAlignment_feature = Horizontal Alignment
258
_UI_GridLayoutData_verticalSpan_feature = Vertical Span
259
_UI_GridLayoutData_horizontalSpan_feature = Horizontal Span
260
_UI_GridLayoutData_horizontalIndent_feature = Horizontal Indent
261
_UI_GridLayoutData_sizeHint_feature = Size Hint
262
_UI_GridLayout_qualifiedClassName_feature = Qualified Class Name
263
_UI_GridLayout_bundleName_feature = Bundle Name
264
_UI_GridLayout_numColumns_feature = Num Columns
265
_UI_GridLayout_equalWidth_feature = Equal Width
266
_UI_GridLayout_margins_feature = Margins
267
_UI_GridLayout_spacing_feature = Spacing
268
_UI_BorderLayoutData_type = Border Layout Data
269
_UI_BorderLayout_type = Border Layout
270
_UI_BorderLayoutData_alignment_feature = Alignment
271
_UI_BorderLayoutData_isVertical_feature = Is Vertical
272
_UI_BorderLayout_spacing_feature = Spacing
273
_UI_BorderLayoutData_vertical_feature = Vertical
274
_UI_CustomConfigurableClass_type = Custom Configurable Class
275
_UI_CustomAttribute_type = Custom Attribute
276
_UI_CustomConfigurableClass_attributes_feature = Attributes
277
_UI_CustomAttribute_type_feature = Type
278
_UI_CustomAttribute_value_feature = Value
279
_UI_CustomAttribute_directAccess_feature = Direct Access
280
_UI_CustomAttribute_multiStatementValue_feature = Multi Statement Value
281
_UI_CustomAttribute_name_feature = Name
282
_UI_CustomLayoutData_type = Custom Layout Data
283
_UI_CustomLayout_type = Custom Layout
(-)src/org/eclipse/gmf/gmfgraph/provider/LabelItemProvider.java (-13 / +65 lines)
Lines 61-107 Link Here
61
		if (itemPropertyDescriptors == null) {
61
		if (itemPropertyDescriptors == null) {
62
			super.getPropertyDescriptors(object);
62
			super.getPropertyDescriptors(object);
63
63
64
			addDataPropertyDescriptor(object);
65
			addLayoutPropertyDescriptor(object);
64
			addNamePropertyDescriptor(object);
66
			addNamePropertyDescriptor(object);
65
			addLayoutManagerPropertyDescriptor(object);
66
			addTextPropertyDescriptor(object);
67
			addTextPropertyDescriptor(object);
67
		}
68
		}
68
		return itemPropertyDescriptors;
69
		return itemPropertyDescriptors;
69
	}
70
	}
70
71
71
	/**
72
	/**
72
	 * This adds a property descriptor for the Name feature.
73
	 * This adds a property descriptor for the Data feature.
73
	 * <!-- begin-user-doc -->
74
	 * <!-- begin-user-doc -->
74
	 * <!-- end-user-doc -->
75
	 * <!-- end-user-doc -->
75
	 * @generated
76
	 * @generated
76
	 */
77
	 */
77
	protected void addNamePropertyDescriptor(Object object) {
78
	protected void addDataPropertyDescriptor(Object object) {
78
		itemPropertyDescriptors.add
79
		itemPropertyDescriptors.add
79
			(createItemPropertyDescriptor
80
			(createItemPropertyDescriptor
80
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81
				 getResourceLocator(),
82
				 getResourceLocator(),
82
				 getString("_UI_Identity_name_feature"),
83
				 getString("_UI_Layoutable_data_feature"),
83
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_data_feature", "_UI_Layoutable_type"),
84
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
85
				 GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
85
				 true,
86
				 true,
86
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
87
				 null,
87
				 null,
88
				 null,
88
				 null));
89
				 null));
89
	}
90
	}
90
91
91
	/**
92
	/**
92
	 * This adds a property descriptor for the Layout Manager feature.
93
	 * This adds a property descriptor for the Layout feature.
93
	 * <!-- begin-user-doc -->
94
	 * <!-- begin-user-doc -->
94
	 * <!-- end-user-doc -->
95
	 * <!-- end-user-doc -->
95
	 * @generated
96
	 * @generated
96
	 */
97
	 */
97
	protected void addLayoutManagerPropertyDescriptor(Object object) {
98
	protected void addLayoutPropertyDescriptor(Object object) {
98
		itemPropertyDescriptors.add
99
		itemPropertyDescriptors.add
99
			(createItemPropertyDescriptor
100
			(createItemPropertyDescriptor
100
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
101
				 getResourceLocator(),
102
				 getResourceLocator(),
102
				 getString("_UI_Figure_layoutManager_feature"),
103
				 getString("_UI_Layoutable_layout_feature"),
103
				 getString("_UI_PropertyDescriptor_description", "_UI_Figure_layoutManager_feature", "_UI_Figure_type"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_layout_feature", "_UI_Layoutable_type"),
104
				 GMFGraphPackage.eINSTANCE.getFigure_LayoutManager(),
105
				 GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
106
				 true,
107
				 null,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This adds a property descriptor for the Name feature.
114
	 * <!-- begin-user-doc -->
115
	 * <!-- end-user-doc -->
116
	 * @generated
117
	 */
118
	protected void addNamePropertyDescriptor(Object object) {
119
		itemPropertyDescriptors.add
120
			(createItemPropertyDescriptor
121
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
122
				 getResourceLocator(),
123
				 getString("_UI_Identity_name_feature"),
124
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
125
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
105
				 true,
126
				 true,
106
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
127
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
107
				 null,
128
				 null,
Lines 139-144 Link Here
139
	public Collection getChildrenFeatures(Object object) {
160
	public Collection getChildrenFeatures(Object object) {
140
		if (childrenFeatures == null) {
161
		if (childrenFeatures == null) {
141
			super.getChildrenFeatures(object);
162
			super.getChildrenFeatures(object);
163
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Data());
164
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Layout());
142
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
165
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
143
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
166
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
144
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
167
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
Lines 201-207 Link Here
201
224
202
		switch (notification.getFeatureID(Label.class)) {
225
		switch (notification.getFeatureID(Label.class)) {
203
			case GMFGraphPackage.LABEL__NAME:
226
			case GMFGraphPackage.LABEL__NAME:
204
			case GMFGraphPackage.LABEL__LAYOUT_MANAGER:
205
			case GMFGraphPackage.LABEL__TEXT:
227
			case GMFGraphPackage.LABEL__TEXT:
206
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
228
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
207
				return;
229
				return;
Lines 234-239 Link Here
234
256
235
		newChildDescriptors.add
257
		newChildDescriptors.add
236
			(createChildParameter
258
			(createChildParameter
259
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
260
				 GMFGraphFactory.eINSTANCE.createGridLayoutData()));
261
262
		newChildDescriptors.add
263
			(createChildParameter
264
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
265
				 GMFGraphFactory.eINSTANCE.createBorderLayoutData()));
266
267
		newChildDescriptors.add
268
			(createChildParameter
269
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
270
				 GMFGraphFactory.eINSTANCE.createCustomLayoutData()));
271
272
		newChildDescriptors.add
273
			(createChildParameter
274
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
275
				 GMFGraphFactory.eINSTANCE.createCustomLayout()));
276
277
		newChildDescriptors.add
278
			(createChildParameter
279
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
280
				 GMFGraphFactory.eINSTANCE.createGridLayout()));
281
282
		newChildDescriptors.add
283
			(createChildParameter
284
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
285
				 GMFGraphFactory.eINSTANCE.createBorderLayout()));
286
287
		newChildDescriptors.add
288
			(createChildParameter
237
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
289
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
238
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
290
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
239
291
(-)src/org/eclipse/gmf/gmfgraph/provider/CustomFigureItemProvider.java (-13 / +65 lines)
Lines 61-68 Link Here
61
		if (itemPropertyDescriptors == null) {
61
		if (itemPropertyDescriptors == null) {
62
			super.getPropertyDescriptors(object);
62
			super.getPropertyDescriptors(object);
63
63
64
			addDataPropertyDescriptor(object);
65
			addLayoutPropertyDescriptor(object);
64
			addNamePropertyDescriptor(object);
66
			addNamePropertyDescriptor(object);
65
			addLayoutManagerPropertyDescriptor(object);
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
			addBundleNamePropertyDescriptor(object);
68
		}
69
		}
Lines 70-108 Link Here
70
	}
71
	}
71
72
72
	/**
73
	/**
73
	 * This adds a property descriptor for the Name feature.
74
	 * This adds a property descriptor for the Data feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 * @generated
77
	 */
78
	 */
78
	protected void addNamePropertyDescriptor(Object object) {
79
	protected void addDataPropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getResourceLocator(),
83
				 getString("_UI_Identity_name_feature"),
84
				 getString("_UI_Layoutable_data_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
85
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_data_feature", "_UI_Layoutable_type"),
85
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
86
				 GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
86
				 true,
87
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
88
				 null,
89
				 null,
89
				 null));
90
				 null));
90
	}
91
	}
91
92
92
	/**
93
	/**
93
	 * This adds a property descriptor for the Layout Manager feature.
94
	 * This adds a property descriptor for the Layout feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 * @generated
97
	 */
98
	 */
98
	protected void addLayoutManagerPropertyDescriptor(Object object) {
99
	protected void addLayoutPropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getResourceLocator(),
103
				 getString("_UI_Figure_layoutManager_feature"),
104
				 getString("_UI_Layoutable_layout_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_Figure_layoutManager_feature", "_UI_Figure_type"),
105
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_layout_feature", "_UI_Layoutable_type"),
105
				 GMFGraphPackage.eINSTANCE.getFigure_LayoutManager(),
106
				 GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
107
				 true,
108
				 null,
109
				 null,
110
				 null));
111
	}
112
113
	/**
114
	 * This adds a property descriptor for the Name feature.
115
	 * <!-- begin-user-doc -->
116
	 * <!-- end-user-doc -->
117
	 * @generated
118
	 */
119
	protected void addNamePropertyDescriptor(Object object) {
120
		itemPropertyDescriptors.add
121
			(createItemPropertyDescriptor
122
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
123
				 getResourceLocator(),
124
				 getString("_UI_Identity_name_feature"),
125
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
126
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
106
				 true,
127
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
128
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
129
				 null,
Lines 160-165 Link Here
160
	public Collection getChildrenFeatures(Object object) {
181
	public Collection getChildrenFeatures(Object object) {
161
		if (childrenFeatures == null) {
182
		if (childrenFeatures == null) {
162
			super.getChildrenFeatures(object);
183
			super.getChildrenFeatures(object);
184
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Data());
185
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Layout());
163
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
186
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
164
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
187
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
165
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
188
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
Lines 222-228 Link Here
222
245
223
		switch (notification.getFeatureID(CustomFigure.class)) {
246
		switch (notification.getFeatureID(CustomFigure.class)) {
224
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
247
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
225
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER:
226
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
248
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
227
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
249
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
228
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
250
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
Lines 256-261 Link Here
256
278
257
		newChildDescriptors.add
279
		newChildDescriptors.add
258
			(createChildParameter
280
			(createChildParameter
281
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
282
				 GMFGraphFactory.eINSTANCE.createGridLayoutData()));
283
284
		newChildDescriptors.add
285
			(createChildParameter
286
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
287
				 GMFGraphFactory.eINSTANCE.createBorderLayoutData()));
288
289
		newChildDescriptors.add
290
			(createChildParameter
291
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
292
				 GMFGraphFactory.eINSTANCE.createCustomLayoutData()));
293
294
		newChildDescriptors.add
295
			(createChildParameter
296
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
297
				 GMFGraphFactory.eINSTANCE.createCustomLayout()));
298
299
		newChildDescriptors.add
300
			(createChildParameter
301
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
302
				 GMFGraphFactory.eINSTANCE.createGridLayout()));
303
304
		newChildDescriptors.add
305
			(createChildParameter
306
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
307
				 GMFGraphFactory.eINSTANCE.createBorderLayout()));
308
309
		newChildDescriptors.add
310
			(createChildParameter
259
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
311
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
260
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
312
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
261
313
(-)src/org/eclipse/gmf/gmfgraph/provider/LabeledContainerItemProvider.java (-13 / +65 lines)
Lines 61-106 Link Here
61
		if (itemPropertyDescriptors == null) {
61
		if (itemPropertyDescriptors == null) {
62
			super.getPropertyDescriptors(object);
62
			super.getPropertyDescriptors(object);
63
63
64
			addDataPropertyDescriptor(object);
65
			addLayoutPropertyDescriptor(object);
64
			addNamePropertyDescriptor(object);
66
			addNamePropertyDescriptor(object);
65
			addLayoutManagerPropertyDescriptor(object);
66
		}
67
		}
67
		return itemPropertyDescriptors;
68
		return itemPropertyDescriptors;
68
	}
69
	}
69
70
70
	/**
71
	/**
71
	 * This adds a property descriptor for the Name feature.
72
	 * This adds a property descriptor for the Data feature.
72
	 * <!-- begin-user-doc -->
73
	 * <!-- begin-user-doc -->
73
	 * <!-- end-user-doc -->
74
	 * <!-- end-user-doc -->
74
	 * @generated
75
	 * @generated
75
	 */
76
	 */
76
	protected void addNamePropertyDescriptor(Object object) {
77
	protected void addDataPropertyDescriptor(Object object) {
77
		itemPropertyDescriptors.add
78
		itemPropertyDescriptors.add
78
			(createItemPropertyDescriptor
79
			(createItemPropertyDescriptor
79
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
80
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
80
				 getResourceLocator(),
81
				 getResourceLocator(),
81
				 getString("_UI_Identity_name_feature"),
82
				 getString("_UI_Layoutable_data_feature"),
82
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
83
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_data_feature", "_UI_Layoutable_type"),
83
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
84
				 GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
84
				 true,
85
				 true,
85
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
86
				 null,
86
				 null,
87
				 null,
87
				 null));
88
				 null));
88
	}
89
	}
89
90
90
	/**
91
	/**
91
	 * This adds a property descriptor for the Layout Manager feature.
92
	 * This adds a property descriptor for the Layout feature.
92
	 * <!-- begin-user-doc -->
93
	 * <!-- begin-user-doc -->
93
	 * <!-- end-user-doc -->
94
	 * <!-- end-user-doc -->
94
	 * @generated
95
	 * @generated
95
	 */
96
	 */
96
	protected void addLayoutManagerPropertyDescriptor(Object object) {
97
	protected void addLayoutPropertyDescriptor(Object object) {
97
		itemPropertyDescriptors.add
98
		itemPropertyDescriptors.add
98
			(createItemPropertyDescriptor
99
			(createItemPropertyDescriptor
99
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
100
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
100
				 getResourceLocator(),
101
				 getResourceLocator(),
101
				 getString("_UI_Figure_layoutManager_feature"),
102
				 getString("_UI_Layoutable_layout_feature"),
102
				 getString("_UI_PropertyDescriptor_description", "_UI_Figure_layoutManager_feature", "_UI_Figure_type"),
103
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_layout_feature", "_UI_Layoutable_type"),
103
				 GMFGraphPackage.eINSTANCE.getFigure_LayoutManager(),
104
				 GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
105
				 true,
106
				 null,
107
				 null,
108
				 null));
109
	}
110
111
	/**
112
	 * This adds a property descriptor for the Name feature.
113
	 * <!-- begin-user-doc -->
114
	 * <!-- end-user-doc -->
115
	 * @generated
116
	 */
117
	protected void addNamePropertyDescriptor(Object object) {
118
		itemPropertyDescriptors.add
119
			(createItemPropertyDescriptor
120
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
121
				 getResourceLocator(),
122
				 getString("_UI_Identity_name_feature"),
123
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
124
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
104
				 true,
125
				 true,
105
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
126
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
106
				 null,
127
				 null,
Lines 118-123 Link Here
118
	public Collection getChildrenFeatures(Object object) {
139
	public Collection getChildrenFeatures(Object object) {
119
		if (childrenFeatures == null) {
140
		if (childrenFeatures == null) {
120
			super.getChildrenFeatures(object);
141
			super.getChildrenFeatures(object);
142
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Data());
143
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Layout());
121
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
144
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
122
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
145
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
123
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
146
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
Lines 180-186 Link Here
180
203
181
		switch (notification.getFeatureID(LabeledContainer.class)) {
204
		switch (notification.getFeatureID(LabeledContainer.class)) {
182
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
205
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
183
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER:
184
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
206
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
185
				return;
207
				return;
186
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
208
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
Lines 212-217 Link Here
212
234
213
		newChildDescriptors.add
235
		newChildDescriptors.add
214
			(createChildParameter
236
			(createChildParameter
237
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
238
				 GMFGraphFactory.eINSTANCE.createGridLayoutData()));
239
240
		newChildDescriptors.add
241
			(createChildParameter
242
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
243
				 GMFGraphFactory.eINSTANCE.createBorderLayoutData()));
244
245
		newChildDescriptors.add
246
			(createChildParameter
247
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
248
				 GMFGraphFactory.eINSTANCE.createCustomLayoutData()));
249
250
		newChildDescriptors.add
251
			(createChildParameter
252
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
253
				 GMFGraphFactory.eINSTANCE.createCustomLayout()));
254
255
		newChildDescriptors.add
256
			(createChildParameter
257
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
258
				 GMFGraphFactory.eINSTANCE.createGridLayout()));
259
260
		newChildDescriptors.add
261
			(createChildParameter
262
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
263
				 GMFGraphFactory.eINSTANCE.createBorderLayout()));
264
265
		newChildDescriptors.add
266
			(createChildParameter
215
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
267
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
216
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
268
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
217
269
(-)src/org/eclipse/gmf/gmfgraph/provider/FigureRefItemProvider.java (+104 lines)
Lines 13-18 Link Here
13
import org.eclipse.emf.common.notify.AdapterFactory;
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
14
import org.eclipse.emf.common.notify.Notification;
15
import org.eclipse.emf.common.util.ResourceLocator;
15
import org.eclipse.emf.common.util.ResourceLocator;
16
import org.eclipse.emf.ecore.EStructuralFeature;
17
16
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
17
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
18
import org.eclipse.emf.edit.provider.IItemLabelProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
Lines 20-25 Link Here
20
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
21
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
22
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
24
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
25
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
23
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
26
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
24
27
25
/**
28
/**
Lines 56-67 Link Here
56
		if (itemPropertyDescriptors == null) {
59
		if (itemPropertyDescriptors == null) {
57
			super.getPropertyDescriptors(object);
60
			super.getPropertyDescriptors(object);
58
61
62
			addDataPropertyDescriptor(object);
63
			addLayoutPropertyDescriptor(object);
59
			addFigurePropertyDescriptor(object);
64
			addFigurePropertyDescriptor(object);
60
		}
65
		}
61
		return itemPropertyDescriptors;
66
		return itemPropertyDescriptors;
62
	}
67
	}
63
68
64
	/**
69
	/**
70
	 * This adds a property descriptor for the Data feature.
71
	 * <!-- begin-user-doc -->
72
	 * <!-- end-user-doc -->
73
	 * @generated
74
	 */
75
	protected void addDataPropertyDescriptor(Object object) {
76
		itemPropertyDescriptors.add
77
			(createItemPropertyDescriptor
78
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
79
				 getResourceLocator(),
80
				 getString("_UI_Layoutable_data_feature"),
81
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_data_feature", "_UI_Layoutable_type"),
82
				 GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
83
				 true,
84
				 null,
85
				 null,
86
				 null));
87
	}
88
89
	/**
90
	 * This adds a property descriptor for the Layout feature.
91
	 * <!-- begin-user-doc -->
92
	 * <!-- end-user-doc -->
93
	 * @generated
94
	 */
95
	protected void addLayoutPropertyDescriptor(Object object) {
96
		itemPropertyDescriptors.add
97
			(createItemPropertyDescriptor
98
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
99
				 getResourceLocator(),
100
				 getString("_UI_Layoutable_layout_feature"),
101
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_layout_feature", "_UI_Layoutable_type"),
102
				 GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
103
				 true,
104
				 null,
105
				 null,
106
				 null));
107
	}
108
109
	/**
65
	 * This adds a property descriptor for the Figure feature.
110
	 * This adds a property descriptor for the Figure feature.
66
	 * <!-- begin-user-doc -->
111
	 * <!-- begin-user-doc -->
67
	 * <!-- end-user-doc -->
112
	 * <!-- end-user-doc -->
Lines 82-87 Link Here
82
	}
127
	}
83
128
84
	/**
129
	/**
130
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
131
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
132
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
133
	 * <!-- begin-user-doc -->
134
	 * <!-- end-user-doc -->
135
	 * @generated
136
	 */
137
	public Collection getChildrenFeatures(Object object) {
138
		if (childrenFeatures == null) {
139
			super.getChildrenFeatures(object);
140
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Data());
141
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Layout());
142
		}
143
		return childrenFeatures;
144
	}
145
146
	/**
147
	 * <!-- begin-user-doc -->
148
	 * <!-- end-user-doc -->
149
	 * @generated
150
	 */
151
	protected EStructuralFeature getChildFeature(Object object, Object child) {
152
		// Check the type of the specified child object and return the proper feature to use for
153
		// adding (see {@link AddCommand}) it as a child.
154
155
		return super.getChildFeature(object, child);
156
	}
157
158
	/**
85
	 * This returns FigureRef.gif.
159
	 * This returns FigureRef.gif.
86
	 * <!-- begin-user-doc -->
160
	 * <!-- begin-user-doc -->
87
	 * <!-- end-user-doc -->
161
	 * <!-- end-user-doc -->
Lines 122-127 Link Here
122
	 */
196
	 */
123
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
197
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
124
		super.collectNewChildDescriptors(newChildDescriptors, object);
198
		super.collectNewChildDescriptors(newChildDescriptors, object);
199
200
		newChildDescriptors.add
201
			(createChildParameter
202
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
203
				 GMFGraphFactory.eINSTANCE.createGridLayoutData()));
204
205
		newChildDescriptors.add
206
			(createChildParameter
207
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
208
				 GMFGraphFactory.eINSTANCE.createBorderLayoutData()));
209
210
		newChildDescriptors.add
211
			(createChildParameter
212
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
213
				 GMFGraphFactory.eINSTANCE.createCustomLayoutData()));
214
215
		newChildDescriptors.add
216
			(createChildParameter
217
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
218
				 GMFGraphFactory.eINSTANCE.createCustomLayout()));
219
220
		newChildDescriptors.add
221
			(createChildParameter
222
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
223
				 GMFGraphFactory.eINSTANCE.createGridLayout()));
224
225
		newChildDescriptors.add
226
			(createChildParameter
227
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
228
				 GMFGraphFactory.eINSTANCE.createBorderLayout()));
125
	}
229
	}
126
230
127
	/**
231
	/**
(-)src/org/eclipse/gmf/gmfgraph/provider/ShapeItemProvider.java (-13 / +65 lines)
Lines 61-68 Link Here
61
		if (itemPropertyDescriptors == null) {
61
		if (itemPropertyDescriptors == null) {
62
			super.getPropertyDescriptors(object);
62
			super.getPropertyDescriptors(object);
63
63
64
			addDataPropertyDescriptor(object);
65
			addLayoutPropertyDescriptor(object);
64
			addNamePropertyDescriptor(object);
66
			addNamePropertyDescriptor(object);
65
			addLayoutManagerPropertyDescriptor(object);
66
			addOutlinePropertyDescriptor(object);
67
			addOutlinePropertyDescriptor(object);
67
			addFillPropertyDescriptor(object);
68
			addFillPropertyDescriptor(object);
68
			addLineWidthPropertyDescriptor(object);
69
			addLineWidthPropertyDescriptor(object);
Lines 75-113 Link Here
75
	}
76
	}
76
77
77
	/**
78
	/**
78
	 * This adds a property descriptor for the Name feature.
79
	 * This adds a property descriptor for the Data feature.
79
	 * <!-- begin-user-doc -->
80
	 * <!-- begin-user-doc -->
80
	 * <!-- end-user-doc -->
81
	 * <!-- end-user-doc -->
81
	 * @generated
82
	 * @generated
82
	 */
83
	 */
83
	protected void addNamePropertyDescriptor(Object object) {
84
	protected void addDataPropertyDescriptor(Object object) {
84
		itemPropertyDescriptors.add
85
		itemPropertyDescriptors.add
85
			(createItemPropertyDescriptor
86
			(createItemPropertyDescriptor
86
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
87
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
87
				 getResourceLocator(),
88
				 getResourceLocator(),
88
				 getString("_UI_Identity_name_feature"),
89
				 getString("_UI_Layoutable_data_feature"),
89
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
90
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_data_feature", "_UI_Layoutable_type"),
90
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
91
				 GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
91
				 true,
92
				 true,
92
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
93
				 null,
93
				 null,
94
				 null,
94
				 null));
95
				 null));
95
	}
96
	}
96
97
97
	/**
98
	/**
98
	 * This adds a property descriptor for the Layout Manager feature.
99
	 * This adds a property descriptor for the Layout feature.
99
	 * <!-- begin-user-doc -->
100
	 * <!-- begin-user-doc -->
100
	 * <!-- end-user-doc -->
101
	 * <!-- end-user-doc -->
101
	 * @generated
102
	 * @generated
102
	 */
103
	 */
103
	protected void addLayoutManagerPropertyDescriptor(Object object) {
104
	protected void addLayoutPropertyDescriptor(Object object) {
104
		itemPropertyDescriptors.add
105
		itemPropertyDescriptors.add
105
			(createItemPropertyDescriptor
106
			(createItemPropertyDescriptor
106
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
107
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
107
				 getResourceLocator(),
108
				 getResourceLocator(),
108
				 getString("_UI_Figure_layoutManager_feature"),
109
				 getString("_UI_Layoutable_layout_feature"),
109
				 getString("_UI_PropertyDescriptor_description", "_UI_Figure_layoutManager_feature", "_UI_Figure_type"),
110
				 getString("_UI_PropertyDescriptor_description", "_UI_Layoutable_layout_feature", "_UI_Layoutable_type"),
110
				 GMFGraphPackage.eINSTANCE.getFigure_LayoutManager(),
111
				 GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
112
				 true,
113
				 null,
114
				 null,
115
				 null));
116
	}
117
118
	/**
119
	 * This adds a property descriptor for the Name feature.
120
	 * <!-- begin-user-doc -->
121
	 * <!-- end-user-doc -->
122
	 * @generated
123
	 */
124
	protected void addNamePropertyDescriptor(Object object) {
125
		itemPropertyDescriptors.add
126
			(createItemPropertyDescriptor
127
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
128
				 getResourceLocator(),
129
				 getString("_UI_Identity_name_feature"),
130
				 getString("_UI_PropertyDescriptor_description", "_UI_Identity_name_feature", "_UI_Identity_type"),
131
				 GMFGraphPackage.eINSTANCE.getIdentity_Name(),
111
				 true,
132
				 true,
112
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
133
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
113
				 null,
134
				 null,
Lines 265-270 Link Here
265
	public Collection getChildrenFeatures(Object object) {
286
	public Collection getChildrenFeatures(Object object) {
266
		if (childrenFeatures == null) {
287
		if (childrenFeatures == null) {
267
			super.getChildrenFeatures(object);
288
			super.getChildrenFeatures(object);
289
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Data());
290
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getLayoutable_Layout());
268
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
291
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_Children());
269
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
292
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor());
270
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
293
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor());
Lines 317-323 Link Here
317
340
318
		switch (notification.getFeatureID(Shape.class)) {
341
		switch (notification.getFeatureID(Shape.class)) {
319
			case GMFGraphPackage.SHAPE__NAME:
342
			case GMFGraphPackage.SHAPE__NAME:
320
			case GMFGraphPackage.SHAPE__LAYOUT_MANAGER:
321
			case GMFGraphPackage.SHAPE__OUTLINE:
343
			case GMFGraphPackage.SHAPE__OUTLINE:
322
			case GMFGraphPackage.SHAPE__FILL:
344
			case GMFGraphPackage.SHAPE__FILL:
323
			case GMFGraphPackage.SHAPE__LINE_WIDTH:
345
			case GMFGraphPackage.SHAPE__LINE_WIDTH:
Lines 355-360 Link Here
355
377
356
		newChildDescriptors.add
378
		newChildDescriptors.add
357
			(createChildParameter
379
			(createChildParameter
380
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
381
				 GMFGraphFactory.eINSTANCE.createGridLayoutData()));
382
383
		newChildDescriptors.add
384
			(createChildParameter
385
				(GMFGraphPackage.eINSTANCE.getLayoutable_Data(),
386
				 GMFGraphFactory.eINSTANCE.createBorderLayoutData()));
387
388
		newChildDescriptors.add
389
			(createChildParameter
390
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
391
				 GMFGraphFactory.eINSTANCE.createCustomLayoutData()));
392
393
		newChildDescriptors.add
394
			(createChildParameter
395
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
396
				 GMFGraphFactory.eINSTANCE.createCustomLayout()));
397
398
		newChildDescriptors.add
399
			(createChildParameter
400
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
401
				 GMFGraphFactory.eINSTANCE.createGridLayout()));
402
403
		newChildDescriptors.add
404
			(createChildParameter
405
				(GMFGraphPackage.eINSTANCE.getLayoutable_Layout(),
406
				 GMFGraphFactory.eINSTANCE.createBorderLayout()));
407
408
		newChildDescriptors.add
409
			(createChildParameter
358
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
410
				(GMFGraphPackage.eINSTANCE.getFigure_Children(),
359
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
411
				 GMFGraphFactory.eINSTANCE.createFigureRef()));
360
412
(-)src/org/eclipse/gmf/gmfgraph/provider/GMFGraphItemProviderAdapterFactory.java (+184 lines)
Lines 778-783 Link Here
778
	}
778
	}
779
779
780
	/**
780
	/**
781
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.CustomLayoutData} instances.
782
	 * <!-- begin-user-doc -->
783
	 * <!-- end-user-doc -->
784
	 * @generated
785
	 */
786
	protected CustomLayoutDataItemProvider customLayoutDataItemProvider;
787
788
	/**
789
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.CustomLayoutData}.
790
	 * <!-- begin-user-doc -->
791
	 * <!-- end-user-doc -->
792
	 * @generated
793
	 */
794
	public Adapter createCustomLayoutDataAdapter() {
795
		if (customLayoutDataItemProvider == null) {
796
			customLayoutDataItemProvider = new CustomLayoutDataItemProvider(this);
797
		}
798
799
		return customLayoutDataItemProvider;
800
	}
801
802
	/**
803
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.GridLayoutData} instances.
804
	 * <!-- begin-user-doc -->
805
	 * <!-- end-user-doc -->
806
	 * @generated
807
	 */
808
	protected GridLayoutDataItemProvider gridLayoutDataItemProvider;
809
810
	/**
811
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.GridLayoutData}.
812
	 * <!-- begin-user-doc -->
813
	 * <!-- end-user-doc -->
814
	 * @generated
815
	 */
816
	public Adapter createGridLayoutDataAdapter() {
817
		if (gridLayoutDataItemProvider == null) {
818
			gridLayoutDataItemProvider = new GridLayoutDataItemProvider(this);
819
		}
820
821
		return gridLayoutDataItemProvider;
822
	}
823
824
	/**
825
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.BorderLayoutData} instances.
826
	 * <!-- begin-user-doc -->
827
	 * <!-- end-user-doc -->
828
	 * @generated
829
	 */
830
	protected BorderLayoutDataItemProvider borderLayoutDataItemProvider;
831
832
	/**
833
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.BorderLayoutData}.
834
	 * <!-- begin-user-doc -->
835
	 * <!-- end-user-doc -->
836
	 * @generated
837
	 */
838
	public Adapter createBorderLayoutDataAdapter() {
839
		if (borderLayoutDataItemProvider == null) {
840
			borderLayoutDataItemProvider = new BorderLayoutDataItemProvider(this);
841
		}
842
843
		return borderLayoutDataItemProvider;
844
	}
845
846
	/**
847
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.CustomLayout} instances.
848
	 * <!-- begin-user-doc -->
849
	 * <!-- end-user-doc -->
850
	 * @generated
851
	 */
852
	protected CustomLayoutItemProvider customLayoutItemProvider;
853
854
	/**
855
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.CustomLayout}.
856
	 * <!-- begin-user-doc -->
857
	 * <!-- end-user-doc -->
858
	 * @generated
859
	 */
860
	public Adapter createCustomLayoutAdapter() {
861
		if (customLayoutItemProvider == null) {
862
			customLayoutItemProvider = new CustomLayoutItemProvider(this);
863
		}
864
865
		return customLayoutItemProvider;
866
	}
867
868
	/**
869
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.GridLayout} instances.
870
	 * <!-- begin-user-doc -->
871
	 * <!-- end-user-doc -->
872
	 * @generated
873
	 */
874
	protected GridLayoutItemProvider gridLayoutItemProvider;
875
876
	/**
877
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.GridLayout}.
878
	 * <!-- begin-user-doc -->
879
	 * <!-- end-user-doc -->
880
	 * @generated
881
	 */
882
	public Adapter createGridLayoutAdapter() {
883
		if (gridLayoutItemProvider == null) {
884
			gridLayoutItemProvider = new GridLayoutItemProvider(this);
885
		}
886
887
		return gridLayoutItemProvider;
888
	}
889
890
	/**
891
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.BorderLayout} instances.
892
	 * <!-- begin-user-doc -->
893
	 * <!-- end-user-doc -->
894
	 * @generated
895
	 */
896
	protected BorderLayoutItemProvider borderLayoutItemProvider;
897
898
	/**
899
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.BorderLayout}.
900
	 * <!-- begin-user-doc -->
901
	 * <!-- end-user-doc -->
902
	 * @generated
903
	 */
904
	public Adapter createBorderLayoutAdapter() {
905
		if (borderLayoutItemProvider == null) {
906
			borderLayoutItemProvider = new BorderLayoutItemProvider(this);
907
		}
908
909
		return borderLayoutItemProvider;
910
	}
911
912
	/**
913
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass} instances.
914
	 * <!-- begin-user-doc -->
915
	 * <!-- end-user-doc -->
916
	 * @generated
917
	 */
918
	protected CustomConfigurableClassItemProvider customConfigurableClassItemProvider;
919
920
	/**
921
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass}.
922
	 * <!-- begin-user-doc -->
923
	 * <!-- end-user-doc -->
924
	 * @generated
925
	 */
926
	public Adapter createCustomConfigurableClassAdapter() {
927
		if (customConfigurableClassItemProvider == null) {
928
			customConfigurableClassItemProvider = new CustomConfigurableClassItemProvider(this);
929
		}
930
931
		return customConfigurableClassItemProvider;
932
	}
933
934
	/**
935
	 * This keeps track of the one adapter used for all {@link org.eclipse.gmf.gmfgraph.CustomAttribute} instances.
936
	 * <!-- begin-user-doc -->
937
	 * <!-- end-user-doc -->
938
	 * @generated
939
	 */
940
	protected CustomAttributeItemProvider customAttributeItemProvider;
941
942
	/**
943
	 * This creates an adapter for a {@link org.eclipse.gmf.gmfgraph.CustomAttribute}.
944
	 * <!-- begin-user-doc -->
945
	 * <!-- end-user-doc -->
946
	 * @generated
947
	 */
948
	public Adapter createCustomAttributeAdapter() {
949
		if (customAttributeItemProvider == null) {
950
			customAttributeItemProvider = new CustomAttributeItemProvider(this);
951
		}
952
953
		return customAttributeItemProvider;
954
	}
955
956
	/**
781
	 * This returns the root adapter factory that contains this factory.
957
	 * This returns the root adapter factory that contains this factory.
782
	 * <!-- begin-user-doc -->
958
	 * <!-- begin-user-doc -->
783
	 * <!-- end-user-doc -->
959
	 * <!-- end-user-doc -->
Lines 905-910 Link Here
905
		if (marginBorderItemProvider != null) marginBorderItemProvider.dispose();
1081
		if (marginBorderItemProvider != null) marginBorderItemProvider.dispose();
906
		if (compoundBorderItemProvider != null) compoundBorderItemProvider.dispose();
1082
		if (compoundBorderItemProvider != null) compoundBorderItemProvider.dispose();
907
		if (customBorderItemProvider != null) customBorderItemProvider.dispose();
1083
		if (customBorderItemProvider != null) customBorderItemProvider.dispose();
1084
		if (customLayoutDataItemProvider != null) customLayoutDataItemProvider.dispose();
1085
		if (gridLayoutDataItemProvider != null) gridLayoutDataItemProvider.dispose();
1086
		if (borderLayoutDataItemProvider != null) borderLayoutDataItemProvider.dispose();
1087
		if (customLayoutItemProvider != null) customLayoutItemProvider.dispose();
1088
		if (gridLayoutItemProvider != null) gridLayoutItemProvider.dispose();
1089
		if (borderLayoutItemProvider != null) borderLayoutItemProvider.dispose();
1090
		if (customConfigurableClassItemProvider != null) customConfigurableClassItemProvider.dispose();
1091
		if (customAttributeItemProvider != null) customAttributeItemProvider.dispose();
908
	}
1092
	}
909
1093
910
}
1094
}
(-)icons/full/ctool16/CreateBorderLayout_spacing_Dimension.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀœœœ€€€™3fÿÿ_Ÿ_?ÿß?€€€‚Ö¬Sƌ9¬s,†Yº—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/obj16/GridLayout.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿÀÀÀÌf̀€€@@@!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/ctool16/CreateLayoutable_layout_CustomLayout.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ûõõìÅÅߟŸÒyyÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/obj16/BorderLayout.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿ‚Ö¬Sƌ9¬s,†Y!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)src/org/eclipse/gmf/gmfgraph/provider/CustomConfigurableClassItemProvider.java (+199 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
29
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class CustomConfigurableClassItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public CustomConfigurableClassItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
		}
69
		return itemPropertyDescriptors;
70
	}
71
72
	/**
73
	 * This adds a property descriptor for the Qualified Class Name feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 */
78
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
85
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
86
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
89
				 null));
90
	}
91
92
	/**
93
	 * This adds a property descriptor for the Bundle Name feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 */
98
	protected void addBundleNamePropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getString("_UI_CustomClass_bundleName_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
105
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
106
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
114
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
115
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @generated
119
	 */
120
	public Collection getChildrenFeatures(Object object) {
121
		if (childrenFeatures == null) {
122
			super.getChildrenFeatures(object);
123
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes());
124
		}
125
		return childrenFeatures;
126
	}
127
128
	/**
129
	 * This returns CustomConfigurableClass.gif.
130
	 * <!-- begin-user-doc -->
131
	 * <!-- end-user-doc -->
132
	 * @generated
133
	 */
134
	public Object getImage(Object object) {
135
		return getResourceLocator().getImage("full/obj16/CustomConfigurableClass");
136
	}
137
138
	/**
139
	 * This returns the label text for the adapted class.
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public String getText(Object object) {
145
		String label = ((CustomConfigurableClass)object).getQualifiedClassName();
146
		return label == null || label.length() == 0 ?
147
			getString("_UI_CustomConfigurableClass_type") :
148
			getString("_UI_CustomConfigurableClass_type") + " " + label;
149
	}
150
151
	/**
152
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
153
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @generated
157
	 */
158
	public void notifyChanged(Notification notification) {
159
		updateChildren(notification);
160
161
		switch (notification.getFeatureID(CustomConfigurableClass.class)) {
162
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME:
163
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME:
164
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
165
				return;
166
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
167
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
168
				return;
169
		}
170
		super.notifyChanged(notification);
171
	}
172
173
	/**
174
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
175
	 * describing all of the children that can be created under this object.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @generated
179
	 */
180
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
181
		super.collectNewChildDescriptors(newChildDescriptors, object);
182
183
		newChildDescriptors.add
184
			(createChildParameter
185
				(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes(),
186
				 GMFGraphFactory.eINSTANCE.createCustomAttribute()));
187
	}
188
189
	/**
190
	 * Return the resource locator for this item provider's resources.
191
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
193
	 * @generated
194
	 */
195
	public ResourceLocator getResourceLocator() {
196
		return GMFGraphEditPlugin.INSTANCE;
197
	}
198
199
}
(-)icons/full/obj16/CustomLayoutData.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿÀÀÀœœœ€€€3™™!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)src/org/eclipse/gmf/gmfgraph/provider/LayoutItemProvider.java (+174 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
29
import org.eclipse.gmf.gmfgraph.Layout;
30
31
/**
32
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.Layout} object.
33
 * <!-- begin-user-doc -->
34
 * <!-- end-user-doc -->
35
 * @generated
36
 */
37
public class LayoutItemProvider
38
	extends ItemProviderAdapter
39
	implements	
40
		IEditingDomainItemProvider,	
41
		IStructuredItemContentProvider,	
42
		ITreeItemContentProvider,	
43
		IItemLabelProvider,	
44
		IItemPropertySource {
45
	/**
46
	 * This constructs an instance from a factory and a notifier.
47
	 * <!-- begin-user-doc -->
48
	 * <!-- end-user-doc -->
49
	 * @generated
50
	 */
51
	public LayoutItemProvider(AdapterFactory adapterFactory) {
52
		super(adapterFactory);
53
	}
54
55
	/**
56
	 * This returns the property descriptors for the adapted class.
57
	 * <!-- begin-user-doc -->
58
	 * <!-- end-user-doc -->
59
	 * @generated
60
	 */
61
	public List getPropertyDescriptors(Object object) {
62
		if (itemPropertyDescriptors == null) {
63
			super.getPropertyDescriptors(object);
64
65
			addQualifiedClassNamePropertyDescriptor(object);
66
			addBundleNamePropertyDescriptor(object);
67
		}
68
		return itemPropertyDescriptors;
69
	}
70
71
	/**
72
	 * This adds a property descriptor for the Qualified Class Name feature.
73
	 * <!-- begin-user-doc -->
74
	 * <!-- end-user-doc -->
75
	 * @generated
76
	 */
77
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
78
		itemPropertyDescriptors.add
79
			(createItemPropertyDescriptor
80
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
81
				 getResourceLocator(),
82
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
83
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
84
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
85
				 true,
86
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
87
				 null,
88
				 null));
89
	}
90
91
	/**
92
	 * This adds a property descriptor for the Bundle Name feature.
93
	 * <!-- begin-user-doc -->
94
	 * <!-- end-user-doc -->
95
	 * @generated
96
	 */
97
	protected void addBundleNamePropertyDescriptor(Object object) {
98
		itemPropertyDescriptors.add
99
			(createItemPropertyDescriptor
100
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
101
				 getResourceLocator(),
102
				 getString("_UI_CustomClass_bundleName_feature"),
103
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
104
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
105
				 true,
106
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
107
				 null,
108
				 null));
109
	}
110
111
	/**
112
	 * This returns Layout.gif.
113
	 * <!-- begin-user-doc -->
114
	 * <!-- end-user-doc -->
115
	 * @generated
116
	 */
117
	public Object getImage(Object object) {
118
		return getResourceLocator().getImage("full/obj16/Layout");
119
	}
120
121
	/**
122
	 * This returns the label text for the adapted class.
123
	 * <!-- begin-user-doc -->
124
	 * <!-- end-user-doc -->
125
	 * @generated
126
	 */
127
	public String getText(Object object) {
128
		String label = ((Layout)object).getQualifiedClassName();
129
		return label == null || label.length() == 0 ?
130
			getString("_UI_Layout_type") :
131
			getString("_UI_Layout_type") + " " + label;
132
	}
133
134
	/**
135
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
136
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
137
	 * <!-- begin-user-doc -->
138
	 * <!-- end-user-doc -->
139
	 * @generated
140
	 */
141
	public void notifyChanged(Notification notification) {
142
		updateChildren(notification);
143
144
		switch (notification.getFeatureID(Layout.class)) {
145
			case GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME:
146
			case GMFGraphPackage.LAYOUT__BUNDLE_NAME:
147
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
148
				return;
149
		}
150
		super.notifyChanged(notification);
151
	}
152
153
	/**
154
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
155
	 * describing all of the children that can be created under this object.
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @generated
159
	 */
160
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
161
		super.collectNewChildDescriptors(newChildDescriptors, object);
162
	}
163
164
	/**
165
	 * Return the resource locator for this item provider's resources.
166
	 * <!-- begin-user-doc -->
167
	 * <!-- end-user-doc -->
168
	 * @generated
169
	 */
170
	public ResourceLocator getResourceLocator() {
171
		return GMFGraphEditPlugin.INSTANCE;
172
	}
173
174
}
(-)src/org/eclipse/gmf/gmfgraph/provider/CustomAttributeItemProvider.java (+240 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.CustomAttribute;
29
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
30
31
/**
32
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.CustomAttribute} object.
33
 * <!-- begin-user-doc -->
34
 * <!-- end-user-doc -->
35
 * @generated
36
 */
37
public class CustomAttributeItemProvider
38
	extends ItemProviderAdapter
39
	implements	
40
		IEditingDomainItemProvider,	
41
		IStructuredItemContentProvider,	
42
		ITreeItemContentProvider,	
43
		IItemLabelProvider,	
44
		IItemPropertySource {
45
	/**
46
	 * This constructs an instance from a factory and a notifier.
47
	 * <!-- begin-user-doc -->
48
	 * <!-- end-user-doc -->
49
	 * @generated
50
	 */
51
	public CustomAttributeItemProvider(AdapterFactory adapterFactory) {
52
		super(adapterFactory);
53
	}
54
55
	/**
56
	 * This returns the property descriptors for the adapted class.
57
	 * <!-- begin-user-doc -->
58
	 * <!-- end-user-doc -->
59
	 * @generated
60
	 */
61
	public List getPropertyDescriptors(Object object) {
62
		if (itemPropertyDescriptors == null) {
63
			super.getPropertyDescriptors(object);
64
65
			addNamePropertyDescriptor(object);
66
			addTypePropertyDescriptor(object);
67
			addValuePropertyDescriptor(object);
68
			addDirectAccessPropertyDescriptor(object);
69
			addMultiStatementValuePropertyDescriptor(object);
70
		}
71
		return itemPropertyDescriptors;
72
	}
73
74
	/**
75
	 * This adds a property descriptor for the Name feature.
76
	 * <!-- begin-user-doc -->
77
	 * <!-- end-user-doc -->
78
	 * @generated
79
	 */
80
	protected void addNamePropertyDescriptor(Object object) {
81
		itemPropertyDescriptors.add
82
			(createItemPropertyDescriptor
83
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
84
				 getResourceLocator(),
85
				 getString("_UI_CustomAttribute_name_feature"),
86
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomAttribute_name_feature", "_UI_CustomAttribute_type"),
87
				 GMFGraphPackage.eINSTANCE.getCustomAttribute_Name(),
88
				 true,
89
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
90
				 null,
91
				 null));
92
	}
93
94
	/**
95
	 * This adds a property descriptor for the Type feature.
96
	 * <!-- begin-user-doc -->
97
	 * <!-- end-user-doc -->
98
	 * @generated
99
	 */
100
	protected void addTypePropertyDescriptor(Object object) {
101
		itemPropertyDescriptors.add
102
			(createItemPropertyDescriptor
103
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
104
				 getResourceLocator(),
105
				 getString("_UI_CustomAttribute_type_feature"),
106
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomAttribute_type_feature", "_UI_CustomAttribute_type"),
107
				 GMFGraphPackage.eINSTANCE.getCustomAttribute_Type(),
108
				 true,
109
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
110
				 null,
111
				 null));
112
	}
113
114
	/**
115
	 * This adds a property descriptor for the Value feature.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @generated
119
	 */
120
	protected void addValuePropertyDescriptor(Object object) {
121
		itemPropertyDescriptors.add
122
			(createItemPropertyDescriptor
123
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
124
				 getResourceLocator(),
125
				 getString("_UI_CustomAttribute_value_feature"),
126
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomAttribute_value_feature", "_UI_CustomAttribute_type"),
127
				 GMFGraphPackage.eINSTANCE.getCustomAttribute_Value(),
128
				 true,
129
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
130
				 null,
131
				 null));
132
	}
133
134
	/**
135
	 * This adds a property descriptor for the Direct Access feature.
136
	 * <!-- begin-user-doc -->
137
	 * <!-- end-user-doc -->
138
	 * @generated
139
	 */
140
	protected void addDirectAccessPropertyDescriptor(Object object) {
141
		itemPropertyDescriptors.add
142
			(createItemPropertyDescriptor
143
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
144
				 getResourceLocator(),
145
				 getString("_UI_CustomAttribute_directAccess_feature"),
146
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomAttribute_directAccess_feature", "_UI_CustomAttribute_type"),
147
				 GMFGraphPackage.eINSTANCE.getCustomAttribute_DirectAccess(),
148
				 true,
149
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
150
				 null,
151
				 null));
152
	}
153
154
	/**
155
	 * This adds a property descriptor for the Multi Statement Value feature.
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @generated
159
	 */
160
	protected void addMultiStatementValuePropertyDescriptor(Object object) {
161
		itemPropertyDescriptors.add
162
			(createItemPropertyDescriptor
163
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
164
				 getResourceLocator(),
165
				 getString("_UI_CustomAttribute_multiStatementValue_feature"),
166
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomAttribute_multiStatementValue_feature", "_UI_CustomAttribute_type"),
167
				 GMFGraphPackage.eINSTANCE.getCustomAttribute_MultiStatementValue(),
168
				 true,
169
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
170
				 null,
171
				 null));
172
	}
173
174
	/**
175
	 * This returns CustomAttribute.gif.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @generated
179
	 */
180
	public Object getImage(Object object) {
181
		return getResourceLocator().getImage("full/obj16/CustomAttribute");
182
	}
183
184
	/**
185
	 * This returns the label text for the adapted class.
186
	 * <!-- begin-user-doc -->
187
	 * <!-- end-user-doc -->
188
	 * @generated
189
	 */
190
	public String getText(Object object) {
191
		String label = ((CustomAttribute)object).getName();
192
		return label == null || label.length() == 0 ?
193
			getString("_UI_CustomAttribute_type") :
194
			getString("_UI_CustomAttribute_type") + " " + label;
195
	}
196
197
	/**
198
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
199
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
200
	 * <!-- begin-user-doc -->
201
	 * <!-- end-user-doc -->
202
	 * @generated
203
	 */
204
	public void notifyChanged(Notification notification) {
205
		updateChildren(notification);
206
207
		switch (notification.getFeatureID(CustomAttribute.class)) {
208
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME:
209
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE:
210
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE:
211
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS:
212
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE:
213
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
214
				return;
215
		}
216
		super.notifyChanged(notification);
217
	}
218
219
	/**
220
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
221
	 * describing all of the children that can be created under this object.
222
	 * <!-- begin-user-doc -->
223
	 * <!-- end-user-doc -->
224
	 * @generated
225
	 */
226
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
227
		super.collectNewChildDescriptors(newChildDescriptors, object);
228
	}
229
230
	/**
231
	 * Return the resource locator for this item provider's resources.
232
	 * <!-- begin-user-doc -->
233
	 * <!-- end-user-doc -->
234
	 * @generated
235
	 */
236
	public ResourceLocator getResourceLocator() {
237
		return GMFGraphEditPlugin.INSTANCE;
238
	}
239
240
}
(-)icons/full/ctool16/CreateGridLayoutData_sizeHint_Dimension.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀœœœ€€€™3fÿÿ_Ÿ_?ÿß?€€€ÀÀÀfÌf€€€@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)src/org/eclipse/gmf/gmfgraph/provider/BorderLayoutItemProvider.java (+199 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.BorderLayout;
29
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.BorderLayout} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class BorderLayoutItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public BorderLayoutItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
		}
69
		return itemPropertyDescriptors;
70
	}
71
72
	/**
73
	 * This adds a property descriptor for the Qualified Class Name feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 */
78
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
85
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
86
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
89
				 null));
90
	}
91
92
	/**
93
	 * This adds a property descriptor for the Bundle Name feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 */
98
	protected void addBundleNamePropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getString("_UI_CustomClass_bundleName_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
105
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
106
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
114
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
115
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @generated
119
	 */
120
	public Collection getChildrenFeatures(Object object) {
121
		if (childrenFeatures == null) {
122
			super.getChildrenFeatures(object);
123
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getBorderLayout_Spacing());
124
		}
125
		return childrenFeatures;
126
	}
127
128
	/**
129
	 * This returns BorderLayout.gif.
130
	 * <!-- begin-user-doc -->
131
	 * <!-- end-user-doc -->
132
	 * @generated
133
	 */
134
	public Object getImage(Object object) {
135
		return getResourceLocator().getImage("full/obj16/BorderLayout");
136
	}
137
138
	/**
139
	 * This returns the label text for the adapted class.
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public String getText(Object object) {
145
		String label = ((BorderLayout)object).getQualifiedClassName();
146
		return label == null || label.length() == 0 ?
147
			getString("_UI_BorderLayout_type") :
148
			getString("_UI_BorderLayout_type") + " " + label;
149
	}
150
151
	/**
152
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
153
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @generated
157
	 */
158
	public void notifyChanged(Notification notification) {
159
		updateChildren(notification);
160
161
		switch (notification.getFeatureID(BorderLayout.class)) {
162
			case GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME:
163
			case GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME:
164
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
165
				return;
166
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
167
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
168
				return;
169
		}
170
		super.notifyChanged(notification);
171
	}
172
173
	/**
174
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
175
	 * describing all of the children that can be created under this object.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @generated
179
	 */
180
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
181
		super.collectNewChildDescriptors(newChildDescriptors, object);
182
183
		newChildDescriptors.add
184
			(createChildParameter
185
				(GMFGraphPackage.eINSTANCE.getBorderLayout_Spacing(),
186
				 GMFGraphFactory.eINSTANCE.createDimension()));
187
	}
188
189
	/**
190
	 * Return the resource locator for this item provider's resources.
191
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
193
	 * @generated
194
	 */
195
	public ResourceLocator getResourceLocator() {
196
		return GMFGraphEditPlugin.INSTANCE;
197
	}
198
199
}
(-)src/org/eclipse/gmf/gmfgraph/provider/BorderLayoutDataItemProvider.java (+240 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.Alignment;
29
import org.eclipse.gmf.gmfgraph.BorderLayoutData;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.BorderLayoutData} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class BorderLayoutDataItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public BorderLayoutDataItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
			addOwnerPropertyDescriptor(object);
69
			addAlignmentPropertyDescriptor(object);
70
			addVerticalPropertyDescriptor(object);
71
		}
72
		return itemPropertyDescriptors;
73
	}
74
75
	/**
76
	 * This adds a property descriptor for the Qualified Class Name feature.
77
	 * <!-- begin-user-doc -->
78
	 * <!-- end-user-doc -->
79
	 * @generated
80
	 */
81
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
82
		itemPropertyDescriptors.add
83
			(createItemPropertyDescriptor
84
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
85
				 getResourceLocator(),
86
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
87
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
88
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
89
				 true,
90
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
91
				 null,
92
				 null));
93
	}
94
95
	/**
96
	 * This adds a property descriptor for the Bundle Name feature.
97
	 * <!-- begin-user-doc -->
98
	 * <!-- end-user-doc -->
99
	 * @generated
100
	 */
101
	protected void addBundleNamePropertyDescriptor(Object object) {
102
		itemPropertyDescriptors.add
103
			(createItemPropertyDescriptor
104
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
105
				 getResourceLocator(),
106
				 getString("_UI_CustomClass_bundleName_feature"),
107
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
108
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
109
				 true,
110
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
111
				 null,
112
				 null));
113
	}
114
115
	/**
116
	 * This adds a property descriptor for the Owner feature.
117
	 * <!-- begin-user-doc -->
118
	 * <!-- end-user-doc -->
119
	 * @generated
120
	 */
121
	protected void addOwnerPropertyDescriptor(Object object) {
122
		itemPropertyDescriptors.add
123
			(createItemPropertyDescriptor
124
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
125
				 getResourceLocator(),
126
				 getString("_UI_LayoutData_owner_feature"),
127
				 getString("_UI_PropertyDescriptor_description", "_UI_LayoutData_owner_feature", "_UI_LayoutData_type"),
128
				 GMFGraphPackage.eINSTANCE.getLayoutData_Owner(),
129
				 true,
130
				 null,
131
				 null,
132
				 null));
133
	}
134
135
	/**
136
	 * This adds a property descriptor for the Alignment feature.
137
	 * <!-- begin-user-doc -->
138
	 * <!-- end-user-doc -->
139
	 * @generated
140
	 */
141
	protected void addAlignmentPropertyDescriptor(Object object) {
142
		itemPropertyDescriptors.add
143
			(createItemPropertyDescriptor
144
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
145
				 getResourceLocator(),
146
				 getString("_UI_BorderLayoutData_alignment_feature"),
147
				 getString("_UI_PropertyDescriptor_description", "_UI_BorderLayoutData_alignment_feature", "_UI_BorderLayoutData_type"),
148
				 GMFGraphPackage.eINSTANCE.getBorderLayoutData_Alignment(),
149
				 true,
150
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
151
				 null,
152
				 null));
153
	}
154
155
	/**
156
	 * This adds a property descriptor for the Vertical feature.
157
	 * <!-- begin-user-doc -->
158
	 * <!-- end-user-doc -->
159
	 * @generated
160
	 */
161
	protected void addVerticalPropertyDescriptor(Object object) {
162
		itemPropertyDescriptors.add
163
			(createItemPropertyDescriptor
164
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
165
				 getResourceLocator(),
166
				 getString("_UI_BorderLayoutData_vertical_feature"),
167
				 getString("_UI_PropertyDescriptor_description", "_UI_BorderLayoutData_vertical_feature", "_UI_BorderLayoutData_type"),
168
				 GMFGraphPackage.eINSTANCE.getBorderLayoutData_Vertical(),
169
				 true,
170
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
171
				 null,
172
				 null));
173
	}
174
175
	/**
176
	 * This returns BorderLayoutData.gif.
177
	 * <!-- begin-user-doc -->
178
	 * <!-- end-user-doc -->
179
	 * @generated
180
	 */
181
	public Object getImage(Object object) {
182
		return getResourceLocator().getImage("full/obj16/BorderLayoutData");
183
	}
184
185
	/**
186
	 * This returns the label text for the adapted class.
187
	 * <!-- begin-user-doc -->
188
	 * <!-- end-user-doc -->
189
	 * @generated
190
	 */
191
	public String getText(Object object) {
192
		String label = ((BorderLayoutData)object).getQualifiedClassName();
193
		return label == null || label.length() == 0 ?
194
			getString("_UI_BorderLayoutData_type") :
195
			getString("_UI_BorderLayoutData_type") + " " + label;
196
	}
197
198
	/**
199
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
200
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
201
	 * <!-- begin-user-doc -->
202
	 * <!-- end-user-doc -->
203
	 * @generated
204
	 */
205
	public void notifyChanged(Notification notification) {
206
		updateChildren(notification);
207
208
		switch (notification.getFeatureID(BorderLayoutData.class)) {
209
			case GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
210
			case GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME:
211
			case GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT:
212
			case GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL:
213
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
214
				return;
215
		}
216
		super.notifyChanged(notification);
217
	}
218
219
	/**
220
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
221
	 * describing all of the children that can be created under this object.
222
	 * <!-- begin-user-doc -->
223
	 * <!-- end-user-doc -->
224
	 * @generated
225
	 */
226
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
227
		super.collectNewChildDescriptors(newChildDescriptors, object);
228
	}
229
230
	/**
231
	 * Return the resource locator for this item provider's resources.
232
	 * <!-- begin-user-doc -->
233
	 * <!-- end-user-doc -->
234
	 * @generated
235
	 */
236
	public ResourceLocator getResourceLocator() {
237
		return GMFGraphEditPlugin.INSTANCE;
238
	}
239
240
}
(-)icons/full/ctool16/CreateGridLayout_spacing_Dimension.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀœœœ€€€™3fÿÿ_Ÿ_?ÿß?€€€ÀÀÀÌf̀€€@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)src/org/eclipse/gmf/gmfgraph/provider/CustomLayoutItemProvider.java (+199 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.CustomLayout;
29
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.CustomLayout} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class CustomLayoutItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public CustomLayoutItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
		}
69
		return itemPropertyDescriptors;
70
	}
71
72
	/**
73
	 * This adds a property descriptor for the Qualified Class Name feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 */
78
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
85
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
86
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
89
				 null));
90
	}
91
92
	/**
93
	 * This adds a property descriptor for the Bundle Name feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 */
98
	protected void addBundleNamePropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getString("_UI_CustomClass_bundleName_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
105
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
106
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
114
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
115
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @generated
119
	 */
120
	public Collection getChildrenFeatures(Object object) {
121
		if (childrenFeatures == null) {
122
			super.getChildrenFeatures(object);
123
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes());
124
		}
125
		return childrenFeatures;
126
	}
127
128
	/**
129
	 * This returns CustomLayout.gif.
130
	 * <!-- begin-user-doc -->
131
	 * <!-- end-user-doc -->
132
	 * @generated
133
	 */
134
	public Object getImage(Object object) {
135
		return getResourceLocator().getImage("full/obj16/CustomLayout");
136
	}
137
138
	/**
139
	 * This returns the label text for the adapted class.
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public String getText(Object object) {
145
		String label = ((CustomLayout)object).getQualifiedClassName();
146
		return label == null || label.length() == 0 ?
147
			getString("_UI_CustomLayout_type") :
148
			getString("_UI_CustomLayout_type") + " " + label;
149
	}
150
151
	/**
152
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
153
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @generated
157
	 */
158
	public void notifyChanged(Notification notification) {
159
		updateChildren(notification);
160
161
		switch (notification.getFeatureID(CustomLayout.class)) {
162
			case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME:
163
			case GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME:
164
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
165
				return;
166
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
167
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
168
				return;
169
		}
170
		super.notifyChanged(notification);
171
	}
172
173
	/**
174
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
175
	 * describing all of the children that can be created under this object.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @generated
179
	 */
180
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
181
		super.collectNewChildDescriptors(newChildDescriptors, object);
182
183
		newChildDescriptors.add
184
			(createChildParameter
185
				(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes(),
186
				 GMFGraphFactory.eINSTANCE.createCustomAttribute()));
187
	}
188
189
	/**
190
	 * Return the resource locator for this item provider's resources.
191
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
193
	 * @generated
194
	 */
195
	public ResourceLocator getResourceLocator() {
196
		return GMFGraphEditPlugin.INSTANCE;
197
	}
198
199
}
(-)icons/full/obj16/CustomLayout.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿûõõìÅÅߟŸÒyy!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/obj16/Layout.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿ¼è¼ŒÙŒfÌf@À@!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/ctool16/CreateLayoutable_layout_Layout.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_¼è¼ŒÙŒfÌf@À@ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/obj16/CustomConfigurableClass.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿÀÀÀœœœ€€€ÆSŒ!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/ctool16/CreateLayoutable_layout_CustomLayoutData.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀœœœ€€€3™™ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/ctool16/CreateLayoutable_layout_GridLayout.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀÌf̀€€@@@ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/ctool16/CreateGridLayout_margins_Dimension.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀœœœ€€€™3fÿÿ_Ÿ_?ÿß?€€€ÀÀÀÌf̀€€@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/ctool16/CreateCustomConfigurableClass_attributes_CustomAttribute.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_‚ÖÖSÆÆ9¬¬,††ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœ€€€ÆSŒº—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/obj16/CustomAttribute.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿ‚ÖÖSÆÆ9¬¬,††!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)src/org/eclipse/gmf/gmfgraph/provider/GridLayoutDataItemProvider.java (+374 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
29
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
30
import org.eclipse.gmf.gmfgraph.GridLayoutData;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.GridLayoutData} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class GridLayoutDataItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public GridLayoutDataItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
			addOwnerPropertyDescriptor(object);
69
			addGrabExcessHorizontalSpacePropertyDescriptor(object);
70
			addGrabExcessVerticalSpacePropertyDescriptor(object);
71
			addVerticalAlignmentPropertyDescriptor(object);
72
			addHorizontalAlignmentPropertyDescriptor(object);
73
			addVerticalSpanPropertyDescriptor(object);
74
			addHorizontalSpanPropertyDescriptor(object);
75
			addHorizontalIndentPropertyDescriptor(object);
76
		}
77
		return itemPropertyDescriptors;
78
	}
79
80
	/**
81
	 * This adds a property descriptor for the Qualified Class Name feature.
82
	 * <!-- begin-user-doc -->
83
	 * <!-- end-user-doc -->
84
	 * @generated
85
	 */
86
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
87
		itemPropertyDescriptors.add
88
			(createItemPropertyDescriptor
89
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
90
				 getResourceLocator(),
91
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
92
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
93
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
94
				 true,
95
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
96
				 null,
97
				 null));
98
	}
99
100
	/**
101
	 * This adds a property descriptor for the Bundle Name feature.
102
	 * <!-- begin-user-doc -->
103
	 * <!-- end-user-doc -->
104
	 * @generated
105
	 */
106
	protected void addBundleNamePropertyDescriptor(Object object) {
107
		itemPropertyDescriptors.add
108
			(createItemPropertyDescriptor
109
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
110
				 getResourceLocator(),
111
				 getString("_UI_CustomClass_bundleName_feature"),
112
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
113
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
114
				 true,
115
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
116
				 null,
117
				 null));
118
	}
119
120
	/**
121
	 * This adds a property descriptor for the Owner feature.
122
	 * <!-- begin-user-doc -->
123
	 * <!-- end-user-doc -->
124
	 * @generated
125
	 */
126
	protected void addOwnerPropertyDescriptor(Object object) {
127
		itemPropertyDescriptors.add
128
			(createItemPropertyDescriptor
129
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
130
				 getResourceLocator(),
131
				 getString("_UI_LayoutData_owner_feature"),
132
				 getString("_UI_PropertyDescriptor_description", "_UI_LayoutData_owner_feature", "_UI_LayoutData_type"),
133
				 GMFGraphPackage.eINSTANCE.getLayoutData_Owner(),
134
				 true,
135
				 null,
136
				 null,
137
				 null));
138
	}
139
140
	/**
141
	 * This adds a property descriptor for the Grab Excess Horizontal Space feature.
142
	 * <!-- begin-user-doc -->
143
	 * <!-- end-user-doc -->
144
	 * @generated
145
	 */
146
	protected void addGrabExcessHorizontalSpacePropertyDescriptor(Object object) {
147
		itemPropertyDescriptors.add
148
			(createItemPropertyDescriptor
149
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
150
				 getResourceLocator(),
151
				 getString("_UI_GridLayoutData_grabExcessHorizontalSpace_feature"),
152
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_grabExcessHorizontalSpace_feature", "_UI_GridLayoutData_type"),
153
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_GrabExcessHorizontalSpace(),
154
				 true,
155
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
156
				 null,
157
				 null));
158
	}
159
160
	/**
161
	 * This adds a property descriptor for the Grab Excess Vertical Space feature.
162
	 * <!-- begin-user-doc -->
163
	 * <!-- end-user-doc -->
164
	 * @generated
165
	 */
166
	protected void addGrabExcessVerticalSpacePropertyDescriptor(Object object) {
167
		itemPropertyDescriptors.add
168
			(createItemPropertyDescriptor
169
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
170
				 getResourceLocator(),
171
				 getString("_UI_GridLayoutData_grabExcessVerticalSpace_feature"),
172
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_grabExcessVerticalSpace_feature", "_UI_GridLayoutData_type"),
173
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_GrabExcessVerticalSpace(),
174
				 true,
175
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
176
				 null,
177
				 null));
178
	}
179
180
	/**
181
	 * This adds a property descriptor for the Vertical Alignment feature.
182
	 * <!-- begin-user-doc -->
183
	 * <!-- end-user-doc -->
184
	 * @generated
185
	 */
186
	protected void addVerticalAlignmentPropertyDescriptor(Object object) {
187
		itemPropertyDescriptors.add
188
			(createItemPropertyDescriptor
189
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
190
				 getResourceLocator(),
191
				 getString("_UI_GridLayoutData_verticalAlignment_feature"),
192
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_verticalAlignment_feature", "_UI_GridLayoutData_type"),
193
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_VerticalAlignment(),
194
				 true,
195
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
196
				 null,
197
				 null));
198
	}
199
200
	/**
201
	 * This adds a property descriptor for the Horizontal Alignment feature.
202
	 * <!-- begin-user-doc -->
203
	 * <!-- end-user-doc -->
204
	 * @generated
205
	 */
206
	protected void addHorizontalAlignmentPropertyDescriptor(Object object) {
207
		itemPropertyDescriptors.add
208
			(createItemPropertyDescriptor
209
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
210
				 getResourceLocator(),
211
				 getString("_UI_GridLayoutData_horizontalAlignment_feature"),
212
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_horizontalAlignment_feature", "_UI_GridLayoutData_type"),
213
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_HorizontalAlignment(),
214
				 true,
215
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
216
				 null,
217
				 null));
218
	}
219
220
	/**
221
	 * This adds a property descriptor for the Vertical Span feature.
222
	 * <!-- begin-user-doc -->
223
	 * <!-- end-user-doc -->
224
	 * @generated
225
	 */
226
	protected void addVerticalSpanPropertyDescriptor(Object object) {
227
		itemPropertyDescriptors.add
228
			(createItemPropertyDescriptor
229
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
230
				 getResourceLocator(),
231
				 getString("_UI_GridLayoutData_verticalSpan_feature"),
232
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_verticalSpan_feature", "_UI_GridLayoutData_type"),
233
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_VerticalSpan(),
234
				 true,
235
				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
236
				 null,
237
				 null));
238
	}
239
240
	/**
241
	 * This adds a property descriptor for the Horizontal Span feature.
242
	 * <!-- begin-user-doc -->
243
	 * <!-- end-user-doc -->
244
	 * @generated
245
	 */
246
	protected void addHorizontalSpanPropertyDescriptor(Object object) {
247
		itemPropertyDescriptors.add
248
			(createItemPropertyDescriptor
249
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
250
				 getResourceLocator(),
251
				 getString("_UI_GridLayoutData_horizontalSpan_feature"),
252
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_horizontalSpan_feature", "_UI_GridLayoutData_type"),
253
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_HorizontalSpan(),
254
				 true,
255
				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
256
				 null,
257
				 null));
258
	}
259
260
	/**
261
	 * This adds a property descriptor for the Horizontal Indent feature.
262
	 * <!-- begin-user-doc -->
263
	 * <!-- end-user-doc -->
264
	 * @generated
265
	 */
266
	protected void addHorizontalIndentPropertyDescriptor(Object object) {
267
		itemPropertyDescriptors.add
268
			(createItemPropertyDescriptor
269
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
270
				 getResourceLocator(),
271
				 getString("_UI_GridLayoutData_horizontalIndent_feature"),
272
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayoutData_horizontalIndent_feature", "_UI_GridLayoutData_type"),
273
				 GMFGraphPackage.eINSTANCE.getGridLayoutData_HorizontalIndent(),
274
				 true,
275
				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
276
				 null,
277
				 null));
278
	}
279
280
	/**
281
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
282
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
283
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
284
	 * <!-- begin-user-doc -->
285
	 * <!-- end-user-doc -->
286
	 * @generated
287
	 */
288
	public Collection getChildrenFeatures(Object object) {
289
		if (childrenFeatures == null) {
290
			super.getChildrenFeatures(object);
291
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getGridLayoutData_SizeHint());
292
		}
293
		return childrenFeatures;
294
	}
295
296
	/**
297
	 * This returns GridLayoutData.gif.
298
	 * <!-- begin-user-doc -->
299
	 * <!-- end-user-doc -->
300
	 * @generated
301
	 */
302
	public Object getImage(Object object) {
303
		return getResourceLocator().getImage("full/obj16/GridLayoutData");
304
	}
305
306
	/**
307
	 * This returns the label text for the adapted class.
308
	 * <!-- begin-user-doc -->
309
	 * <!-- end-user-doc -->
310
	 * @generated
311
	 */
312
	public String getText(Object object) {
313
		String label = ((GridLayoutData)object).getQualifiedClassName();
314
		return label == null || label.length() == 0 ?
315
			getString("_UI_GridLayoutData_type") :
316
			getString("_UI_GridLayoutData_type") + " " + label;
317
	}
318
319
	/**
320
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
321
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
322
	 * <!-- begin-user-doc -->
323
	 * <!-- end-user-doc -->
324
	 * @generated
325
	 */
326
	public void notifyChanged(Notification notification) {
327
		updateChildren(notification);
328
329
		switch (notification.getFeatureID(GridLayoutData.class)) {
330
			case GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
331
			case GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME:
332
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE:
333
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE:
334
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT:
335
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT:
336
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN:
337
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN:
338
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT:
339
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
340
				return;
341
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
342
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
343
				return;
344
		}
345
		super.notifyChanged(notification);
346
	}
347
348
	/**
349
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
350
	 * describing all of the children that can be created under this object.
351
	 * <!-- begin-user-doc -->
352
	 * <!-- end-user-doc -->
353
	 * @generated
354
	 */
355
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
356
		super.collectNewChildDescriptors(newChildDescriptors, object);
357
358
		newChildDescriptors.add
359
			(createChildParameter
360
				(GMFGraphPackage.eINSTANCE.getGridLayoutData_SizeHint(),
361
				 GMFGraphFactory.eINSTANCE.createDimension()));
362
	}
363
364
	/**
365
	 * Return the resource locator for this item provider's resources.
366
	 * <!-- begin-user-doc -->
367
	 * <!-- end-user-doc -->
368
	 * @generated
369
	 */
370
	public ResourceLocator getResourceLocator() {
371
		return GMFGraphEditPlugin.INSTANCE;
372
	}
373
374
}
(-)icons/full/obj16/LayoutData.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿûõûìÅìߟßÒyÒ!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)src/org/eclipse/gmf/gmfgraph/provider/CustomLayoutDataItemProvider.java (+199 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.CustomLayoutData;
29
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
32
/**
33
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.CustomLayoutData} object.
34
 * <!-- begin-user-doc -->
35
 * <!-- end-user-doc -->
36
 * @generated
37
 */
38
public class CustomLayoutDataItemProvider
39
	extends ItemProviderAdapter
40
	implements	
41
		IEditingDomainItemProvider,	
42
		IStructuredItemContentProvider,	
43
		ITreeItemContentProvider,	
44
		IItemLabelProvider,	
45
		IItemPropertySource {
46
	/**
47
	 * This constructs an instance from a factory and a notifier.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @generated
51
	 */
52
	public CustomLayoutDataItemProvider(AdapterFactory adapterFactory) {
53
		super(adapterFactory);
54
	}
55
56
	/**
57
	 * This returns the property descriptors for the adapted class.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @generated
61
	 */
62
	public List getPropertyDescriptors(Object object) {
63
		if (itemPropertyDescriptors == null) {
64
			super.getPropertyDescriptors(object);
65
66
			addQualifiedClassNamePropertyDescriptor(object);
67
			addBundleNamePropertyDescriptor(object);
68
		}
69
		return itemPropertyDescriptors;
70
	}
71
72
	/**
73
	 * This adds a property descriptor for the Qualified Class Name feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 */
78
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
85
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
86
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
89
				 null));
90
	}
91
92
	/**
93
	 * This adds a property descriptor for the Bundle Name feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 */
98
	protected void addBundleNamePropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getString("_UI_CustomClass_bundleName_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
105
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
106
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
114
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
115
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @generated
119
	 */
120
	public Collection getChildrenFeatures(Object object) {
121
		if (childrenFeatures == null) {
122
			super.getChildrenFeatures(object);
123
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes());
124
		}
125
		return childrenFeatures;
126
	}
127
128
	/**
129
	 * This returns CustomLayoutData.gif.
130
	 * <!-- begin-user-doc -->
131
	 * <!-- end-user-doc -->
132
	 * @generated
133
	 */
134
	public Object getImage(Object object) {
135
		return getResourceLocator().getImage("full/obj16/CustomLayoutData");
136
	}
137
138
	/**
139
	 * This returns the label text for the adapted class.
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public String getText(Object object) {
145
		String label = ((CustomLayoutData)object).getQualifiedClassName();
146
		return label == null || label.length() == 0 ?
147
			getString("_UI_CustomLayoutData_type") :
148
			getString("_UI_CustomLayoutData_type") + " " + label;
149
	}
150
151
	/**
152
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
153
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @generated
157
	 */
158
	public void notifyChanged(Notification notification) {
159
		updateChildren(notification);
160
161
		switch (notification.getFeatureID(CustomLayoutData.class)) {
162
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
163
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME:
164
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
165
				return;
166
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
167
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
168
				return;
169
		}
170
		super.notifyChanged(notification);
171
	}
172
173
	/**
174
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
175
	 * describing all of the children that can be created under this object.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @generated
179
	 */
180
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
181
		super.collectNewChildDescriptors(newChildDescriptors, object);
182
183
		newChildDescriptors.add
184
			(createChildParameter
185
				(GMFGraphPackage.eINSTANCE.getCustomConfigurableClass_Attributes(),
186
				 GMFGraphFactory.eINSTANCE.createCustomAttribute()));
187
	}
188
189
	/**
190
	 * Return the resource locator for this item provider's resources.
191
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
193
	 * @generated
194
	 */
195
	public ResourceLocator getResourceLocator() {
196
		return GMFGraphEditPlugin.INSTANCE;
197
	}
198
199
}
(-)icons/full/obj16/BorderLayoutData.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿè¼Òٌ²Ìf™À@€!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/ctool16/CreateLayoutable_data_LayoutData.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ûõûìÅìߟßÒyÒÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)src/org/eclipse/gmf/gmfgraph/provider/LayoutDataItemProvider.java (+195 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
19
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
20
import org.eclipse.emf.edit.provider.IItemLabelProvider;
21
import org.eclipse.emf.edit.provider.IItemPropertySource;
22
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
23
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
24
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
25
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
26
import org.eclipse.emf.edit.provider.ViewerNotification;
27
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
29
import org.eclipse.gmf.gmfgraph.LayoutData;
30
31
/**
32
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.LayoutData} object.
33
 * <!-- begin-user-doc -->
34
 * <!-- end-user-doc -->
35
 * @generated
36
 */
37
public class LayoutDataItemProvider
38
	extends ItemProviderAdapter
39
	implements	
40
		IEditingDomainItemProvider,	
41
		IStructuredItemContentProvider,	
42
		ITreeItemContentProvider,	
43
		IItemLabelProvider,	
44
		IItemPropertySource {
45
	/**
46
	 * This constructs an instance from a factory and a notifier.
47
	 * <!-- begin-user-doc -->
48
	 * <!-- end-user-doc -->
49
	 * @generated
50
	 */
51
	public LayoutDataItemProvider(AdapterFactory adapterFactory) {
52
		super(adapterFactory);
53
	}
54
55
	/**
56
	 * This returns the property descriptors for the adapted class.
57
	 * <!-- begin-user-doc -->
58
	 * <!-- end-user-doc -->
59
	 * @generated
60
	 */
61
	public List getPropertyDescriptors(Object object) {
62
		if (itemPropertyDescriptors == null) {
63
			super.getPropertyDescriptors(object);
64
65
			addQualifiedClassNamePropertyDescriptor(object);
66
			addBundleNamePropertyDescriptor(object);
67
			addOwnerPropertyDescriptor(object);
68
		}
69
		return itemPropertyDescriptors;
70
	}
71
72
	/**
73
	 * This adds a property descriptor for the Qualified Class Name feature.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @generated
77
	 */
78
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
79
		itemPropertyDescriptors.add
80
			(createItemPropertyDescriptor
81
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
82
				 getResourceLocator(),
83
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
84
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
85
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
86
				 true,
87
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
88
				 null,
89
				 null));
90
	}
91
92
	/**
93
	 * This adds a property descriptor for the Bundle Name feature.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @generated
97
	 */
98
	protected void addBundleNamePropertyDescriptor(Object object) {
99
		itemPropertyDescriptors.add
100
			(createItemPropertyDescriptor
101
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
102
				 getResourceLocator(),
103
				 getString("_UI_CustomClass_bundleName_feature"),
104
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
105
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
106
				 true,
107
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
108
				 null,
109
				 null));
110
	}
111
112
	/**
113
	 * This adds a property descriptor for the Owner feature.
114
	 * <!-- begin-user-doc -->
115
	 * <!-- end-user-doc -->
116
	 * @generated
117
	 */
118
	protected void addOwnerPropertyDescriptor(Object object) {
119
		itemPropertyDescriptors.add
120
			(createItemPropertyDescriptor
121
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
122
				 getResourceLocator(),
123
				 getString("_UI_LayoutData_owner_feature"),
124
				 getString("_UI_PropertyDescriptor_description", "_UI_LayoutData_owner_feature", "_UI_LayoutData_type"),
125
				 GMFGraphPackage.eINSTANCE.getLayoutData_Owner(),
126
				 true,
127
				 null,
128
				 null,
129
				 null));
130
	}
131
132
	/**
133
	 * This returns LayoutData.gif.
134
	 * <!-- begin-user-doc -->
135
	 * <!-- end-user-doc -->
136
	 * @generated
137
	 */
138
	public Object getImage(Object object) {
139
		return getResourceLocator().getImage("full/obj16/LayoutData");
140
	}
141
142
	/**
143
	 * This returns the label text for the adapted class.
144
	 * <!-- begin-user-doc -->
145
	 * <!-- end-user-doc -->
146
	 * @generated
147
	 */
148
	public String getText(Object object) {
149
		String label = ((LayoutData)object).getQualifiedClassName();
150
		return label == null || label.length() == 0 ?
151
			getString("_UI_LayoutData_type") :
152
			getString("_UI_LayoutData_type") + " " + label;
153
	}
154
155
	/**
156
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
157
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
158
	 * <!-- begin-user-doc -->
159
	 * <!-- end-user-doc -->
160
	 * @generated
161
	 */
162
	public void notifyChanged(Notification notification) {
163
		updateChildren(notification);
164
165
		switch (notification.getFeatureID(LayoutData.class)) {
166
			case GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME:
167
			case GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME:
168
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
169
				return;
170
		}
171
		super.notifyChanged(notification);
172
	}
173
174
	/**
175
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
176
	 * describing all of the children that can be created under this object.
177
	 * <!-- begin-user-doc -->
178
	 * <!-- end-user-doc -->
179
	 * @generated
180
	 */
181
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
182
		super.collectNewChildDescriptors(newChildDescriptors, object);
183
	}
184
185
	/**
186
	 * Return the resource locator for this item provider's resources.
187
	 * <!-- begin-user-doc -->
188
	 * <!-- end-user-doc -->
189
	 * @generated
190
	 */
191
	public ResourceLocator getResourceLocator() {
192
		return GMFGraphEditPlugin.INSTANCE;
193
	}
194
195
}
(-)icons/full/obj16/GridLayoutData.gif (+1 lines)
Added Link Here
1
GIF89a³€€€€ÀÀÀ€€€ÿÿÀÀÀÿÿÿÿÿÿÀÀÀfÌf€€€@@@!ù	,.0ÉI«½8ëôö$áqE·5Úd`J ¡õ<.ñ–&Õ6wŒ©)-§‰Fđ;
(-)icons/full/ctool16/CreateLayoutable_data_BorderLayoutData.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_è¼Òٌ²Ìf™À@€ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)src/org/eclipse/gmf/gmfgraph/provider/GridLayoutItemProvider.java (+286 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.provider;
8
9
10
import java.util.Collection;
11
import java.util.List;
12
13
import org.eclipse.emf.common.notify.AdapterFactory;
14
import org.eclipse.emf.common.notify.Notification;
15
16
import org.eclipse.emf.common.util.ResourceLocator;
17
18
import org.eclipse.emf.ecore.EStructuralFeature;
19
20
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
21
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
22
import org.eclipse.emf.edit.provider.IItemLabelProvider;
23
import org.eclipse.emf.edit.provider.IItemPropertySource;
24
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
25
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
26
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
27
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
28
import org.eclipse.emf.edit.provider.ViewerNotification;
29
30
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
31
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
32
import org.eclipse.gmf.gmfgraph.GridLayout;
33
34
/**
35
 * This is the item provider adapter for a {@link org.eclipse.gmf.gmfgraph.GridLayout} object.
36
 * <!-- begin-user-doc -->
37
 * <!-- end-user-doc -->
38
 * @generated
39
 */
40
public class GridLayoutItemProvider
41
	extends ItemProviderAdapter
42
	implements	
43
		IEditingDomainItemProvider,	
44
		IStructuredItemContentProvider,	
45
		ITreeItemContentProvider,	
46
		IItemLabelProvider,	
47
		IItemPropertySource {
48
	/**
49
	 * This constructs an instance from a factory and a notifier.
50
	 * <!-- begin-user-doc -->
51
	 * <!-- end-user-doc -->
52
	 * @generated
53
	 */
54
	public GridLayoutItemProvider(AdapterFactory adapterFactory) {
55
		super(adapterFactory);
56
	}
57
58
	/**
59
	 * This returns the property descriptors for the adapted class.
60
	 * <!-- begin-user-doc -->
61
	 * <!-- end-user-doc -->
62
	 * @generated
63
	 */
64
	public List getPropertyDescriptors(Object object) {
65
		if (itemPropertyDescriptors == null) {
66
			super.getPropertyDescriptors(object);
67
68
			addQualifiedClassNamePropertyDescriptor(object);
69
			addBundleNamePropertyDescriptor(object);
70
			addNumColumnsPropertyDescriptor(object);
71
			addEqualWidthPropertyDescriptor(object);
72
		}
73
		return itemPropertyDescriptors;
74
	}
75
76
	/**
77
	 * This adds a property descriptor for the Qualified Class Name feature.
78
	 * <!-- begin-user-doc -->
79
	 * <!-- end-user-doc -->
80
	 * @generated
81
	 */
82
	protected void addQualifiedClassNamePropertyDescriptor(Object object) {
83
		itemPropertyDescriptors.add
84
			(createItemPropertyDescriptor
85
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
86
				 getResourceLocator(),
87
				 getString("_UI_CustomClass_qualifiedClassName_feature"),
88
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_qualifiedClassName_feature", "_UI_CustomClass_type"),
89
				 GMFGraphPackage.eINSTANCE.getCustomClass_QualifiedClassName(),
90
				 true,
91
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
92
				 null,
93
				 null));
94
	}
95
96
	/**
97
	 * This adds a property descriptor for the Bundle Name feature.
98
	 * <!-- begin-user-doc -->
99
	 * <!-- end-user-doc -->
100
	 * @generated
101
	 */
102
	protected void addBundleNamePropertyDescriptor(Object object) {
103
		itemPropertyDescriptors.add
104
			(createItemPropertyDescriptor
105
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
106
				 getResourceLocator(),
107
				 getString("_UI_CustomClass_bundleName_feature"),
108
				 getString("_UI_PropertyDescriptor_description", "_UI_CustomClass_bundleName_feature", "_UI_CustomClass_type"),
109
				 GMFGraphPackage.eINSTANCE.getCustomClass_BundleName(),
110
				 true,
111
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
112
				 null,
113
				 null));
114
	}
115
116
	/**
117
	 * This adds a property descriptor for the Num Columns feature.
118
	 * <!-- begin-user-doc -->
119
	 * <!-- end-user-doc -->
120
	 * @generated
121
	 */
122
	protected void addNumColumnsPropertyDescriptor(Object object) {
123
		itemPropertyDescriptors.add
124
			(createItemPropertyDescriptor
125
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
126
				 getResourceLocator(),
127
				 getString("_UI_GridLayout_numColumns_feature"),
128
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayout_numColumns_feature", "_UI_GridLayout_type"),
129
				 GMFGraphPackage.eINSTANCE.getGridLayout_NumColumns(),
130
				 true,
131
				 ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
132
				 null,
133
				 null));
134
	}
135
136
	/**
137
	 * This adds a property descriptor for the Equal Width feature.
138
	 * <!-- begin-user-doc -->
139
	 * <!-- end-user-doc -->
140
	 * @generated
141
	 */
142
	protected void addEqualWidthPropertyDescriptor(Object object) {
143
		itemPropertyDescriptors.add
144
			(createItemPropertyDescriptor
145
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
146
				 getResourceLocator(),
147
				 getString("_UI_GridLayout_equalWidth_feature"),
148
				 getString("_UI_PropertyDescriptor_description", "_UI_GridLayout_equalWidth_feature", "_UI_GridLayout_type"),
149
				 GMFGraphPackage.eINSTANCE.getGridLayout_EqualWidth(),
150
				 true,
151
				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
152
				 null,
153
				 null));
154
	}
155
156
	/**
157
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
158
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
159
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
160
	 * <!-- begin-user-doc -->
161
	 * <!-- end-user-doc -->
162
	 * @generated
163
	 */
164
	public Collection getChildrenFeatures(Object object) {
165
		if (childrenFeatures == null) {
166
			super.getChildrenFeatures(object);
167
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getGridLayout_Margins());
168
			childrenFeatures.add(GMFGraphPackage.eINSTANCE.getGridLayout_Spacing());
169
		}
170
		return childrenFeatures;
171
	}
172
173
	/**
174
	 * <!-- begin-user-doc -->
175
	 * <!-- end-user-doc -->
176
	 * @generated
177
	 */
178
	protected EStructuralFeature getChildFeature(Object object, Object child) {
179
		// Check the type of the specified child object and return the proper feature to use for
180
		// adding (see {@link AddCommand}) it as a child.
181
182
		return super.getChildFeature(object, child);
183
	}
184
185
	/**
186
	 * This returns GridLayout.gif.
187
	 * <!-- begin-user-doc -->
188
	 * <!-- end-user-doc -->
189
	 * @generated
190
	 */
191
	public Object getImage(Object object) {
192
		return getResourceLocator().getImage("full/obj16/GridLayout");
193
	}
194
195
	/**
196
	 * This returns the label text for the adapted class.
197
	 * <!-- begin-user-doc -->
198
	 * <!-- end-user-doc -->
199
	 * @generated
200
	 */
201
	public String getText(Object object) {
202
		String label = ((GridLayout)object).getQualifiedClassName();
203
		return label == null || label.length() == 0 ?
204
			getString("_UI_GridLayout_type") :
205
			getString("_UI_GridLayout_type") + " " + label;
206
	}
207
208
	/**
209
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
210
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
211
	 * <!-- begin-user-doc -->
212
	 * <!-- end-user-doc -->
213
	 * @generated
214
	 */
215
	public void notifyChanged(Notification notification) {
216
		updateChildren(notification);
217
218
		switch (notification.getFeatureID(GridLayout.class)) {
219
			case GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME:
220
			case GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME:
221
			case GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS:
222
			case GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH:
223
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
224
				return;
225
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
226
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
227
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
228
				return;
229
		}
230
		super.notifyChanged(notification);
231
	}
232
233
	/**
234
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
235
	 * describing all of the children that can be created under this object.
236
	 * <!-- begin-user-doc -->
237
	 * <!-- end-user-doc -->
238
	 * @generated
239
	 */
240
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
241
		super.collectNewChildDescriptors(newChildDescriptors, object);
242
243
		newChildDescriptors.add
244
			(createChildParameter
245
				(GMFGraphPackage.eINSTANCE.getGridLayout_Margins(),
246
				 GMFGraphFactory.eINSTANCE.createDimension()));
247
248
		newChildDescriptors.add
249
			(createChildParameter
250
				(GMFGraphPackage.eINSTANCE.getGridLayout_Spacing(),
251
				 GMFGraphFactory.eINSTANCE.createDimension()));
252
	}
253
254
	/**
255
	 * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
256
	 * <!-- begin-user-doc -->
257
	 * <!-- end-user-doc -->
258
	 * @generated
259
	 */
260
	public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) {
261
		Object childFeature = feature;
262
		Object childObject = child;
263
264
		boolean qualify =
265
			childFeature == GMFGraphPackage.eINSTANCE.getGridLayout_Margins() ||
266
			childFeature == GMFGraphPackage.eINSTANCE.getGridLayout_Spacing();
267
268
		if (qualify) {
269
			return getString
270
				("_UI_CreateChild_text2",
271
				 new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
272
		}
273
		return super.getCreateChildText(owner, feature, child, selection);
274
	}
275
276
	/**
277
	 * Return the resource locator for this item provider's resources.
278
	 * <!-- begin-user-doc -->
279
	 * <!-- end-user-doc -->
280
	 * @generated
281
	 */
282
	public ResourceLocator getResourceLocator() {
283
		return GMFGraphEditPlugin.INSTANCE;
284
	}
285
286
}
(-)icons/full/ctool16/CreateLayoutable_layout_BorderLayout.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_‚Ö¬Sƌ9¬s,†Yÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)icons/full/ctool16/CreateLayoutable_data_GridLayoutData.gif (+1 lines)
Added Link Here
1
GIF89aÄÿÿÿßß¿??_ÀÀÀfÌf€€€@@@ÿÿ_Ÿ_?ÿß?€€€ÀÀÀœœœÒ¦y@@@º—&º—&µ’#®Š¥‚žy™tþýïþýïýóÏýóÏüç£û݃!ù,\  ŽdY>&™ÍÔе’?ƒŽ’tI3ó4ŒÖk’)'?ciCQ(›§ÈŽ*œÊÉF:,&ßKD8R€›è`ð¢É‡¡`F؄|Ûm*Ëégol|‚e?‚k%!;
(-)src/org/eclipse/gmf/gmfgraph/GMFGraphFactory.java (+72 lines)
Lines 314-319 Link Here
314
	CustomBorder createCustomBorder();
314
	CustomBorder createCustomBorder();
315
315
316
	/**
316
	/**
317
	 * Returns a new object of class '<em>Custom Layout Data</em>'.
318
	 * <!-- begin-user-doc -->
319
	 * <!-- end-user-doc -->
320
	 * @return a new object of class '<em>Custom Layout Data</em>'.
321
	 * @generated
322
	 */
323
	CustomLayoutData createCustomLayoutData();
324
325
	/**
326
	 * Returns a new object of class '<em>Grid Layout Data</em>'.
327
	 * <!-- begin-user-doc -->
328
	 * <!-- end-user-doc -->
329
	 * @return a new object of class '<em>Grid Layout Data</em>'.
330
	 * @generated
331
	 */
332
	GridLayoutData createGridLayoutData();
333
334
	/**
335
	 * Returns a new object of class '<em>Border Layout Data</em>'.
336
	 * <!-- begin-user-doc -->
337
	 * <!-- end-user-doc -->
338
	 * @return a new object of class '<em>Border Layout Data</em>'.
339
	 * @generated
340
	 */
341
	BorderLayoutData createBorderLayoutData();
342
343
	/**
344
	 * Returns a new object of class '<em>Custom Layout</em>'.
345
	 * <!-- begin-user-doc -->
346
	 * <!-- end-user-doc -->
347
	 * @return a new object of class '<em>Custom Layout</em>'.
348
	 * @generated
349
	 */
350
	CustomLayout createCustomLayout();
351
352
	/**
353
	 * Returns a new object of class '<em>Grid Layout</em>'.
354
	 * <!-- begin-user-doc -->
355
	 * <!-- end-user-doc -->
356
	 * @return a new object of class '<em>Grid Layout</em>'.
357
	 * @generated
358
	 */
359
	GridLayout createGridLayout();
360
361
	/**
362
	 * Returns a new object of class '<em>Border Layout</em>'.
363
	 * <!-- begin-user-doc -->
364
	 * <!-- end-user-doc -->
365
	 * @return a new object of class '<em>Border Layout</em>'.
366
	 * @generated
367
	 */
368
	BorderLayout createBorderLayout();
369
370
	/**
371
	 * Returns a new object of class '<em>Custom Configurable Class</em>'.
372
	 * <!-- begin-user-doc -->
373
	 * <!-- end-user-doc -->
374
	 * @return a new object of class '<em>Custom Configurable Class</em>'.
375
	 * @generated
376
	 */
377
	CustomConfigurableClass createCustomConfigurableClass();
378
379
	/**
380
	 * Returns a new object of class '<em>Custom Attribute</em>'.
381
	 * <!-- begin-user-doc -->
382
	 * <!-- end-user-doc -->
383
	 * @return a new object of class '<em>Custom Attribute</em>'.
384
	 * @generated
385
	 */
386
	CustomAttribute createCustomAttribute();
387
388
	/**
317
	 * Returns the package supported by this factory.
389
	 * Returns the package supported by this factory.
318
	 * <!-- begin-user-doc -->
390
	 * <!-- begin-user-doc -->
319
	 * <!-- end-user-doc -->
391
	 * <!-- end-user-doc -->
(-)src/org/eclipse/gmf/gmfgraph/GMFGraphPackage.java (-253 / +1449 lines)
Lines 549-554 Link Here
549
	int GRADIENT_FACET_FEATURE_COUNT = VISUAL_FACET_FEATURE_COUNT + 1;
549
	int GRADIENT_FACET_FEATURE_COUNT = VISUAL_FACET_FEATURE_COUNT + 1;
550
550
551
	/**
551
	/**
552
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Layoutable <em>Layoutable</em>}' class.
553
	 * <!-- begin-user-doc -->
554
	 * <!-- end-user-doc -->
555
	 * @see org.eclipse.gmf.gmfgraph.Layoutable
556
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLayoutable()
557
	 * @generated
558
	 */
559
	int LAYOUTABLE = 48;
560
561
	/**
562
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
563
	 * <!-- begin-user-doc -->
564
	 * <!-- end-user-doc -->
565
	 * @generated
566
	 * @ordered
567
	 */
568
	int LAYOUTABLE__DATA = 0;
569
570
	/**
571
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
572
	 * <!-- begin-user-doc -->
573
	 * <!-- end-user-doc -->
574
	 * @generated
575
	 * @ordered
576
	 */
577
	int LAYOUTABLE__LAYOUT = 1;
578
579
	/**
580
	 * The number of structural features of the '<em>Layoutable</em>' class.
581
	 * <!-- begin-user-doc -->
582
	 * <!-- end-user-doc -->
583
	 * @generated
584
	 * @ordered
585
	 */
586
	int LAYOUTABLE_FEATURE_COUNT = 2;
587
588
	/**
552
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.FigureMarker <em>Figure Marker</em>}' class.
589
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.FigureMarker <em>Figure Marker</em>}' class.
553
	 * <!-- begin-user-doc -->
590
	 * <!-- begin-user-doc -->
554
	 * <!-- end-user-doc -->
591
	 * <!-- end-user-doc -->
Lines 559-571 Link Here
559
	int FIGURE_MARKER = 11;
596
	int FIGURE_MARKER = 11;
560
597
561
	/**
598
	/**
599
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
600
	 * <!-- begin-user-doc -->
601
	 * <!-- end-user-doc -->
602
	 * @generated
603
	 * @ordered
604
	 */
605
	int FIGURE_MARKER__DATA = LAYOUTABLE__DATA;
606
607
	/**
608
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
609
	 * <!-- begin-user-doc -->
610
	 * <!-- end-user-doc -->
611
	 * @generated
612
	 * @ordered
613
	 */
614
	int FIGURE_MARKER__LAYOUT = LAYOUTABLE__LAYOUT;
615
616
	/**
562
	 * The number of structural features of the '<em>Figure Marker</em>' class.
617
	 * The number of structural features of the '<em>Figure Marker</em>' class.
563
	 * <!-- begin-user-doc -->
618
	 * <!-- begin-user-doc -->
564
	 * <!-- end-user-doc -->
619
	 * <!-- end-user-doc -->
565
	 * @generated
620
	 * @generated
566
	 * @ordered
621
	 * @ordered
567
	 */
622
	 */
568
	int FIGURE_MARKER_FEATURE_COUNT = 0;
623
	int FIGURE_MARKER_FEATURE_COUNT = LAYOUTABLE_FEATURE_COUNT + 0;
569
624
570
	/**
625
	/**
571
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Figure <em>Figure</em>}' class.
626
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Figure <em>Figure</em>}' class.
Lines 578-583 Link Here
578
	int FIGURE = 12;
633
	int FIGURE = 12;
579
634
580
	/**
635
	/**
636
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
637
	 * <!-- begin-user-doc -->
638
	 * <!-- end-user-doc -->
639
	 * @generated
640
	 * @ordered
641
	 */
642
	int FIGURE__DATA = FIGURE_MARKER__DATA;
643
644
	/**
645
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
646
	 * <!-- begin-user-doc -->
647
	 * <!-- end-user-doc -->
648
	 * @generated
649
	 * @ordered
650
	 */
651
	int FIGURE__LAYOUT = FIGURE_MARKER__LAYOUT;
652
653
	/**
581
	 * The feature id for the '<em><b>Name</b></em>' attribute.
654
	 * The feature id for the '<em><b>Name</b></em>' attribute.
582
	 * <!-- begin-user-doc -->
655
	 * <!-- begin-user-doc -->
583
	 * <!-- end-user-doc -->
656
	 * <!-- end-user-doc -->
Lines 695-726 Link Here
695
	int FIGURE__SIZE = FIGURE_MARKER_FEATURE_COUNT + 12;
768
	int FIGURE__SIZE = FIGURE_MARKER_FEATURE_COUNT + 12;
696
769
697
	/**
770
	/**
698
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
771
	 * The number of structural features of the '<em>Figure</em>' class.
699
	 * <!-- begin-user-doc -->
772
	 * <!-- begin-user-doc -->
700
	 * <!-- end-user-doc -->
773
	 * <!-- end-user-doc -->
701
	 * @generated
774
	 * @generated
702
	 * @ordered
775
	 * @ordered
703
	 */
776
	 */
704
	int FIGURE__LAYOUT_MANAGER = FIGURE_MARKER_FEATURE_COUNT + 13;
777
	int FIGURE_FEATURE_COUNT = FIGURE_MARKER_FEATURE_COUNT + 13;
705
778
706
	/**
779
	/**
707
	 * The number of structural features of the '<em>Figure</em>' class.
780
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl <em>Figure Ref</em>}' class.
781
	 * <!-- begin-user-doc -->
782
	 * <!-- end-user-doc -->
783
	 * @see org.eclipse.gmf.gmfgraph.impl.FigureRefImpl
784
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFigureRef()
785
	 * @generated
786
	 */
787
	int FIGURE_REF = 13;
788
789
	/**
790
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
708
	 * <!-- begin-user-doc -->
791
	 * <!-- begin-user-doc -->
709
	 * <!-- end-user-doc -->
792
	 * <!-- end-user-doc -->
710
	 * @generated
793
	 * @generated
711
	 * @ordered
794
	 * @ordered
712
	 */
795
	 */
713
	int FIGURE_FEATURE_COUNT = FIGURE_MARKER_FEATURE_COUNT + 14;
796
	int FIGURE_REF__DATA = FIGURE_MARKER__DATA;
714
797
715
	/**
798
	/**
716
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl <em>Figure Ref</em>}' class.
799
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
717
	 * <!-- begin-user-doc -->
800
	 * <!-- begin-user-doc -->
718
	 * <!-- end-user-doc -->
801
	 * <!-- end-user-doc -->
719
	 * @see org.eclipse.gmf.gmfgraph.impl.FigureRefImpl
720
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFigureRef()
721
	 * @generated
802
	 * @generated
803
	 * @ordered
722
	 */
804
	 */
723
	int FIGURE_REF = 13;
805
	int FIGURE_REF__LAYOUT = FIGURE_MARKER__LAYOUT;
724
806
725
	/**
807
	/**
726
	 * The feature id for the '<em><b>Figure</b></em>' reference.
808
	 * The feature id for the '<em><b>Figure</b></em>' reference.
Lines 751-756 Link Here
751
	int CONNECTION_FIGURE = 14;
833
	int CONNECTION_FIGURE = 14;
752
834
753
	/**
835
	/**
836
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
837
	 * <!-- begin-user-doc -->
838
	 * <!-- end-user-doc -->
839
	 * @generated
840
	 * @ordered
841
	 */
842
	int CONNECTION_FIGURE__DATA = FIGURE__DATA;
843
844
	/**
845
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
846
	 * <!-- begin-user-doc -->
847
	 * <!-- end-user-doc -->
848
	 * @generated
849
	 * @ordered
850
	 */
851
	int CONNECTION_FIGURE__LAYOUT = FIGURE__LAYOUT;
852
853
	/**
754
	 * The feature id for the '<em><b>Name</b></em>' attribute.
854
	 * The feature id for the '<em><b>Name</b></em>' attribute.
755
	 * <!-- begin-user-doc -->
855
	 * <!-- begin-user-doc -->
756
	 * <!-- end-user-doc -->
856
	 * <!-- end-user-doc -->
Lines 868-899 Link Here
868
	int CONNECTION_FIGURE__SIZE = FIGURE__SIZE;
968
	int CONNECTION_FIGURE__SIZE = FIGURE__SIZE;
869
969
870
	/**
970
	/**
871
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
971
	 * The number of structural features of the '<em>Connection Figure</em>' class.
872
	 * <!-- begin-user-doc -->
972
	 * <!-- begin-user-doc -->
873
	 * <!-- end-user-doc -->
973
	 * <!-- end-user-doc -->
874
	 * @generated
974
	 * @generated
875
	 * @ordered
975
	 * @ordered
876
	 */
976
	 */
877
	int CONNECTION_FIGURE__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
977
	int CONNECTION_FIGURE_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
878
978
879
	/**
979
	/**
880
	 * The number of structural features of the '<em>Connection Figure</em>' class.
980
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.DecorationFigure <em>Decoration Figure</em>}' class.
981
	 * <!-- begin-user-doc -->
982
	 * <!-- end-user-doc -->
983
	 * @see org.eclipse.gmf.gmfgraph.DecorationFigure
984
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDecorationFigure()
985
	 * @generated
986
	 */
987
	int DECORATION_FIGURE = 15;
988
989
	/**
990
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
881
	 * <!-- begin-user-doc -->
991
	 * <!-- begin-user-doc -->
882
	 * <!-- end-user-doc -->
992
	 * <!-- end-user-doc -->
883
	 * @generated
993
	 * @generated
884
	 * @ordered
994
	 * @ordered
885
	 */
995
	 */
886
	int CONNECTION_FIGURE_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
996
	int DECORATION_FIGURE__DATA = FIGURE__DATA;
887
997
888
	/**
998
	/**
889
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.DecorationFigure <em>Decoration Figure</em>}' class.
999
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
890
	 * <!-- begin-user-doc -->
1000
	 * <!-- begin-user-doc -->
891
	 * <!-- end-user-doc -->
1001
	 * <!-- end-user-doc -->
892
	 * @see org.eclipse.gmf.gmfgraph.DecorationFigure
893
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDecorationFigure()
894
	 * @generated
1002
	 * @generated
1003
	 * @ordered
895
	 */
1004
	 */
896
	int DECORATION_FIGURE = 15;
1005
	int DECORATION_FIGURE__LAYOUT = FIGURE__LAYOUT;
897
1006
898
	/**
1007
	/**
899
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1008
	 * The feature id for the '<em><b>Name</b></em>' attribute.
Lines 1013-1044 Link Here
1013
	int DECORATION_FIGURE__SIZE = FIGURE__SIZE;
1122
	int DECORATION_FIGURE__SIZE = FIGURE__SIZE;
1014
1123
1015
	/**
1124
	/**
1016
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1125
	 * The number of structural features of the '<em>Decoration Figure</em>' class.
1017
	 * <!-- begin-user-doc -->
1126
	 * <!-- begin-user-doc -->
1018
	 * <!-- end-user-doc -->
1127
	 * <!-- end-user-doc -->
1019
	 * @generated
1128
	 * @generated
1020
	 * @ordered
1129
	 * @ordered
1021
	 */
1130
	 */
1022
	int DECORATION_FIGURE__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
1131
	int DECORATION_FIGURE_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
1023
1132
1024
	/**
1133
	/**
1025
	 * The number of structural features of the '<em>Decoration Figure</em>' class.
1134
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl <em>Shape</em>}' class.
1135
	 * <!-- begin-user-doc -->
1136
	 * <!-- end-user-doc -->
1137
	 * @see org.eclipse.gmf.gmfgraph.impl.ShapeImpl
1138
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getShape()
1139
	 * @generated
1140
	 */
1141
	int SHAPE = 16;
1142
1143
	/**
1144
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
1026
	 * <!-- begin-user-doc -->
1145
	 * <!-- begin-user-doc -->
1027
	 * <!-- end-user-doc -->
1146
	 * <!-- end-user-doc -->
1028
	 * @generated
1147
	 * @generated
1029
	 * @ordered
1148
	 * @ordered
1030
	 */
1149
	 */
1031
	int DECORATION_FIGURE_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
1150
	int SHAPE__DATA = FIGURE__DATA;
1032
1151
1033
	/**
1152
	/**
1034
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl <em>Shape</em>}' class.
1153
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
1035
	 * <!-- begin-user-doc -->
1154
	 * <!-- begin-user-doc -->
1036
	 * <!-- end-user-doc -->
1155
	 * <!-- end-user-doc -->
1037
	 * @see org.eclipse.gmf.gmfgraph.impl.ShapeImpl
1038
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getShape()
1039
	 * @generated
1156
	 * @generated
1157
	 * @ordered
1040
	 */
1158
	 */
1041
	int SHAPE = 16;
1159
	int SHAPE__LAYOUT = FIGURE__LAYOUT;
1042
1160
1043
	/**
1161
	/**
1044
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1162
	 * The feature id for the '<em><b>Name</b></em>' attribute.
Lines 1158-1172 Link Here
1158
	int SHAPE__SIZE = FIGURE__SIZE;
1276
	int SHAPE__SIZE = FIGURE__SIZE;
1159
1277
1160
	/**
1278
	/**
1161
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1162
	 * <!-- begin-user-doc -->
1163
	 * <!-- end-user-doc -->
1164
	 * @generated
1165
	 * @ordered
1166
	 */
1167
	int SHAPE__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
1168
1169
	/**
1170
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
1279
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
1171
	 * <!-- begin-user-doc -->
1280
	 * <!-- begin-user-doc -->
1172
	 * <!-- end-user-doc -->
1281
	 * <!-- end-user-doc -->
Lines 1249-1254 Link Here
1249
	int LABEL = 17;
1358
	int LABEL = 17;
1250
1359
1251
	/**
1360
	/**
1361
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
1362
	 * <!-- begin-user-doc -->
1363
	 * <!-- end-user-doc -->
1364
	 * @generated
1365
	 * @ordered
1366
	 */
1367
	int LABEL__DATA = FIGURE__DATA;
1368
1369
	/**
1370
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
1371
	 * <!-- begin-user-doc -->
1372
	 * <!-- end-user-doc -->
1373
	 * @generated
1374
	 * @ordered
1375
	 */
1376
	int LABEL__LAYOUT = FIGURE__LAYOUT;
1377
1378
	/**
1252
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1379
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1253
	 * <!-- begin-user-doc -->
1380
	 * <!-- begin-user-doc -->
1254
	 * <!-- end-user-doc -->
1381
	 * <!-- end-user-doc -->
Lines 1366-1380 Link Here
1366
	int LABEL__SIZE = FIGURE__SIZE;
1493
	int LABEL__SIZE = FIGURE__SIZE;
1367
1494
1368
	/**
1495
	/**
1369
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1370
	 * <!-- begin-user-doc -->
1371
	 * <!-- end-user-doc -->
1372
	 * @generated
1373
	 * @ordered
1374
	 */
1375
	int LABEL__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
1376
1377
	/**
1378
	 * The feature id for the '<em><b>Text</b></em>' attribute.
1496
	 * The feature id for the '<em><b>Text</b></em>' attribute.
1379
	 * <!-- begin-user-doc -->
1497
	 * <!-- begin-user-doc -->
1380
	 * <!-- end-user-doc -->
1498
	 * <!-- end-user-doc -->
Lines 1403-1408 Link Here
1403
	int LABELED_CONTAINER = 18;
1521
	int LABELED_CONTAINER = 18;
1404
1522
1405
	/**
1523
	/**
1524
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
1525
	 * <!-- begin-user-doc -->
1526
	 * <!-- end-user-doc -->
1527
	 * @generated
1528
	 * @ordered
1529
	 */
1530
	int LABELED_CONTAINER__DATA = FIGURE__DATA;
1531
1532
	/**
1533
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
1534
	 * <!-- begin-user-doc -->
1535
	 * <!-- end-user-doc -->
1536
	 * @generated
1537
	 * @ordered
1538
	 */
1539
	int LABELED_CONTAINER__LAYOUT = FIGURE__LAYOUT;
1540
1541
	/**
1406
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1542
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1407
	 * <!-- begin-user-doc -->
1543
	 * <!-- begin-user-doc -->
1408
	 * <!-- end-user-doc -->
1544
	 * <!-- end-user-doc -->
Lines 1520-1551 Link Here
1520
	int LABELED_CONTAINER__SIZE = FIGURE__SIZE;
1656
	int LABELED_CONTAINER__SIZE = FIGURE__SIZE;
1521
1657
1522
	/**
1658
	/**
1523
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1659
	 * The number of structural features of the '<em>Labeled Container</em>' class.
1524
	 * <!-- begin-user-doc -->
1660
	 * <!-- begin-user-doc -->
1525
	 * <!-- end-user-doc -->
1661
	 * <!-- end-user-doc -->
1526
	 * @generated
1662
	 * @generated
1527
	 * @ordered
1663
	 * @ordered
1528
	 */
1664
	 */
1529
	int LABELED_CONTAINER__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
1665
	int LABELED_CONTAINER_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
1530
1666
1531
	/**
1667
	/**
1532
	 * The number of structural features of the '<em>Labeled Container</em>' class.
1668
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.RectangleImpl <em>Rectangle</em>}' class.
1669
	 * <!-- begin-user-doc -->
1670
	 * <!-- end-user-doc -->
1671
	 * @see org.eclipse.gmf.gmfgraph.impl.RectangleImpl
1672
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getRectangle()
1673
	 * @generated
1674
	 */
1675
	int RECTANGLE = 19;
1676
1677
	/**
1678
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
1533
	 * <!-- begin-user-doc -->
1679
	 * <!-- begin-user-doc -->
1534
	 * <!-- end-user-doc -->
1680
	 * <!-- end-user-doc -->
1535
	 * @generated
1681
	 * @generated
1536
	 * @ordered
1682
	 * @ordered
1537
	 */
1683
	 */
1538
	int LABELED_CONTAINER_FEATURE_COUNT = FIGURE_FEATURE_COUNT + 0;
1684
	int RECTANGLE__DATA = SHAPE__DATA;
1539
1685
1540
	/**
1686
	/**
1541
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.RectangleImpl <em>Rectangle</em>}' class.
1687
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
1542
	 * <!-- begin-user-doc -->
1688
	 * <!-- begin-user-doc -->
1543
	 * <!-- end-user-doc -->
1689
	 * <!-- end-user-doc -->
1544
	 * @see org.eclipse.gmf.gmfgraph.impl.RectangleImpl
1545
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getRectangle()
1546
	 * @generated
1690
	 * @generated
1691
	 * @ordered
1547
	 */
1692
	 */
1548
	int RECTANGLE = 19;
1693
	int RECTANGLE__LAYOUT = SHAPE__LAYOUT;
1549
1694
1550
	/**
1695
	/**
1551
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1696
	 * The feature id for the '<em><b>Name</b></em>' attribute.
Lines 1665-1679 Link Here
1665
	int RECTANGLE__SIZE = SHAPE__SIZE;
1810
	int RECTANGLE__SIZE = SHAPE__SIZE;
1666
1811
1667
	/**
1812
	/**
1668
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1669
	 * <!-- begin-user-doc -->
1670
	 * <!-- end-user-doc -->
1671
	 * @generated
1672
	 * @ordered
1673
	 */
1674
	int RECTANGLE__LAYOUT_MANAGER = SHAPE__LAYOUT_MANAGER;
1675
1676
	/**
1677
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
1813
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
1678
	 * <!-- begin-user-doc -->
1814
	 * <!-- begin-user-doc -->
1679
	 * <!-- end-user-doc -->
1815
	 * <!-- end-user-doc -->
Lines 1756-1761 Link Here
1756
	int ROUNDED_RECTANGLE = 20;
1892
	int ROUNDED_RECTANGLE = 20;
1757
1893
1758
	/**
1894
	/**
1895
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
1896
	 * <!-- begin-user-doc -->
1897
	 * <!-- end-user-doc -->
1898
	 * @generated
1899
	 * @ordered
1900
	 */
1901
	int ROUNDED_RECTANGLE__DATA = SHAPE__DATA;
1902
1903
	/**
1904
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
1905
	 * <!-- begin-user-doc -->
1906
	 * <!-- end-user-doc -->
1907
	 * @generated
1908
	 * @ordered
1909
	 */
1910
	int ROUNDED_RECTANGLE__LAYOUT = SHAPE__LAYOUT;
1911
1912
	/**
1759
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1913
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1760
	 * <!-- begin-user-doc -->
1914
	 * <!-- begin-user-doc -->
1761
	 * <!-- end-user-doc -->
1915
	 * <!-- end-user-doc -->
Lines 1873-1887 Link Here
1873
	int ROUNDED_RECTANGLE__SIZE = SHAPE__SIZE;
2027
	int ROUNDED_RECTANGLE__SIZE = SHAPE__SIZE;
1874
2028
1875
	/**
2029
	/**
1876
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
1877
	 * <!-- begin-user-doc -->
1878
	 * <!-- end-user-doc -->
1879
	 * @generated
1880
	 * @ordered
1881
	 */
1882
	int ROUNDED_RECTANGLE__LAYOUT_MANAGER = SHAPE__LAYOUT_MANAGER;
1883
1884
	/**
1885
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2030
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
1886
	 * <!-- begin-user-doc -->
2031
	 * <!-- begin-user-doc -->
1887
	 * <!-- end-user-doc -->
2032
	 * <!-- end-user-doc -->
Lines 1982-1987 Link Here
1982
	int ELLIPSE = 21;
2127
	int ELLIPSE = 21;
1983
2128
1984
	/**
2129
	/**
2130
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
2131
	 * <!-- begin-user-doc -->
2132
	 * <!-- end-user-doc -->
2133
	 * @generated
2134
	 * @ordered
2135
	 */
2136
	int ELLIPSE__DATA = SHAPE__DATA;
2137
2138
	/**
2139
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
2140
	 * <!-- begin-user-doc -->
2141
	 * <!-- end-user-doc -->
2142
	 * @generated
2143
	 * @ordered
2144
	 */
2145
	int ELLIPSE__LAYOUT = SHAPE__LAYOUT;
2146
2147
	/**
1985
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2148
	 * The feature id for the '<em><b>Name</b></em>' attribute.
1986
	 * <!-- begin-user-doc -->
2149
	 * <!-- begin-user-doc -->
1987
	 * <!-- end-user-doc -->
2150
	 * <!-- end-user-doc -->
Lines 2099-2113 Link Here
2099
	int ELLIPSE__SIZE = SHAPE__SIZE;
2262
	int ELLIPSE__SIZE = SHAPE__SIZE;
2100
2263
2101
	/**
2264
	/**
2102
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
2103
	 * <!-- begin-user-doc -->
2104
	 * <!-- end-user-doc -->
2105
	 * @generated
2106
	 * @ordered
2107
	 */
2108
	int ELLIPSE__LAYOUT_MANAGER = SHAPE__LAYOUT_MANAGER;
2109
2110
	/**
2111
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2265
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2112
	 * <!-- begin-user-doc -->
2266
	 * <!-- begin-user-doc -->
2113
	 * <!-- end-user-doc -->
2267
	 * <!-- end-user-doc -->
Lines 2190-2195 Link Here
2190
	int POLYLINE = 22;
2344
	int POLYLINE = 22;
2191
2345
2192
	/**
2346
	/**
2347
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
2348
	 * <!-- begin-user-doc -->
2349
	 * <!-- end-user-doc -->
2350
	 * @generated
2351
	 * @ordered
2352
	 */
2353
	int POLYLINE__DATA = SHAPE__DATA;
2354
2355
	/**
2356
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
2357
	 * <!-- begin-user-doc -->
2358
	 * <!-- end-user-doc -->
2359
	 * @generated
2360
	 * @ordered
2361
	 */
2362
	int POLYLINE__LAYOUT = SHAPE__LAYOUT;
2363
2364
	/**
2193
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2365
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2194
	 * <!-- begin-user-doc -->
2366
	 * <!-- begin-user-doc -->
2195
	 * <!-- end-user-doc -->
2367
	 * <!-- end-user-doc -->
Lines 2307-2321 Link Here
2307
	int POLYLINE__SIZE = SHAPE__SIZE;
2479
	int POLYLINE__SIZE = SHAPE__SIZE;
2308
2480
2309
	/**
2481
	/**
2310
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
2311
	 * <!-- begin-user-doc -->
2312
	 * <!-- end-user-doc -->
2313
	 * @generated
2314
	 * @ordered
2315
	 */
2316
	int POLYLINE__LAYOUT_MANAGER = SHAPE__LAYOUT_MANAGER;
2317
2318
	/**
2319
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2482
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2320
	 * <!-- begin-user-doc -->
2483
	 * <!-- begin-user-doc -->
2321
	 * <!-- end-user-doc -->
2484
	 * <!-- end-user-doc -->
Lines 2407-2413 Link Here
2407
	int POLYGON = 23;
2570
	int POLYGON = 23;
2408
2571
2409
	/**
2572
	/**
2410
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2573
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
2574
	 * <!-- begin-user-doc -->
2575
	 * <!-- end-user-doc -->
2576
	 * @generated
2577
	 * @ordered
2578
	 */
2579
	int POLYGON__DATA = POLYLINE__DATA;
2580
2581
	/**
2582
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
2583
	 * <!-- begin-user-doc -->
2584
	 * <!-- end-user-doc -->
2585
	 * @generated
2586
	 * @ordered
2587
	 */
2588
	int POLYGON__LAYOUT = POLYLINE__LAYOUT;
2589
2590
	/**
2591
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2411
	 * <!-- begin-user-doc -->
2592
	 * <!-- begin-user-doc -->
2412
	 * <!-- end-user-doc -->
2593
	 * <!-- end-user-doc -->
2413
	 * @generated
2594
	 * @generated
Lines 2524-2538 Link Here
2524
	int POLYGON__SIZE = POLYLINE__SIZE;
2705
	int POLYGON__SIZE = POLYLINE__SIZE;
2525
2706
2526
	/**
2707
	/**
2527
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
2528
	 * <!-- begin-user-doc -->
2529
	 * <!-- end-user-doc -->
2530
	 * @generated
2531
	 * @ordered
2532
	 */
2533
	int POLYGON__LAYOUT_MANAGER = POLYLINE__LAYOUT_MANAGER;
2534
2535
	/**
2536
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2708
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2537
	 * <!-- begin-user-doc -->
2709
	 * <!-- begin-user-doc -->
2538
	 * <!-- end-user-doc -->
2710
	 * <!-- end-user-doc -->
Lines 2624-2629 Link Here
2624
	int POLYLINE_CONNECTION = 24;
2796
	int POLYLINE_CONNECTION = 24;
2625
2797
2626
	/**
2798
	/**
2799
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
2800
	 * <!-- begin-user-doc -->
2801
	 * <!-- end-user-doc -->
2802
	 * @generated
2803
	 * @ordered
2804
	 */
2805
	int POLYLINE_CONNECTION__DATA = POLYLINE__DATA;
2806
2807
	/**
2808
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
2809
	 * <!-- begin-user-doc -->
2810
	 * <!-- end-user-doc -->
2811
	 * @generated
2812
	 * @ordered
2813
	 */
2814
	int POLYLINE_CONNECTION__LAYOUT = POLYLINE__LAYOUT;
2815
2816
	/**
2627
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2817
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2628
	 * <!-- begin-user-doc -->
2818
	 * <!-- begin-user-doc -->
2629
	 * <!-- end-user-doc -->
2819
	 * <!-- end-user-doc -->
Lines 2741-2755 Link Here
2741
	int POLYLINE_CONNECTION__SIZE = POLYLINE__SIZE;
2931
	int POLYLINE_CONNECTION__SIZE = POLYLINE__SIZE;
2742
2932
2743
	/**
2933
	/**
2744
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
2745
	 * <!-- begin-user-doc -->
2746
	 * <!-- end-user-doc -->
2747
	 * @generated
2748
	 * @ordered
2749
	 */
2750
	int POLYLINE_CONNECTION__LAYOUT_MANAGER = POLYLINE__LAYOUT_MANAGER;
2751
2752
	/**
2753
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2934
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2754
	 * <!-- begin-user-doc -->
2935
	 * <!-- begin-user-doc -->
2755
	 * <!-- end-user-doc -->
2936
	 * <!-- end-user-doc -->
Lines 2859-2864 Link Here
2859
	int POLYLINE_DECORATION = 25;
3040
	int POLYLINE_DECORATION = 25;
2860
3041
2861
	/**
3042
	/**
3043
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
3044
	 * <!-- begin-user-doc -->
3045
	 * <!-- end-user-doc -->
3046
	 * @generated
3047
	 * @ordered
3048
	 */
3049
	int POLYLINE_DECORATION__DATA = POLYLINE__DATA;
3050
3051
	/**
3052
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
3053
	 * <!-- begin-user-doc -->
3054
	 * <!-- end-user-doc -->
3055
	 * @generated
3056
	 * @ordered
3057
	 */
3058
	int POLYLINE_DECORATION__LAYOUT = POLYLINE__LAYOUT;
3059
3060
	/**
2862
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3061
	 * The feature id for the '<em><b>Name</b></em>' attribute.
2863
	 * <!-- begin-user-doc -->
3062
	 * <!-- begin-user-doc -->
2864
	 * <!-- end-user-doc -->
3063
	 * <!-- end-user-doc -->
Lines 2976-2990 Link Here
2976
	int POLYLINE_DECORATION__SIZE = POLYLINE__SIZE;
3175
	int POLYLINE_DECORATION__SIZE = POLYLINE__SIZE;
2977
3176
2978
	/**
3177
	/**
2979
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
2980
	 * <!-- begin-user-doc -->
2981
	 * <!-- end-user-doc -->
2982
	 * @generated
2983
	 * @ordered
2984
	 */
2985
	int POLYLINE_DECORATION__LAYOUT_MANAGER = POLYLINE__LAYOUT_MANAGER;
2986
2987
	/**
2988
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
3178
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
2989
	 * <!-- begin-user-doc -->
3179
	 * <!-- begin-user-doc -->
2990
	 * <!-- end-user-doc -->
3180
	 * <!-- end-user-doc -->
Lines 3076-3081 Link Here
3076
	int POLYGON_DECORATION = 26;
3266
	int POLYGON_DECORATION = 26;
3077
3267
3078
	/**
3268
	/**
3269
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
3270
	 * <!-- begin-user-doc -->
3271
	 * <!-- end-user-doc -->
3272
	 * @generated
3273
	 * @ordered
3274
	 */
3275
	int POLYGON_DECORATION__DATA = POLYGON__DATA;
3276
3277
	/**
3278
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
3279
	 * <!-- begin-user-doc -->
3280
	 * <!-- end-user-doc -->
3281
	 * @generated
3282
	 * @ordered
3283
	 */
3284
	int POLYGON_DECORATION__LAYOUT = POLYGON__LAYOUT;
3285
3286
	/**
3079
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3287
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3080
	 * <!-- begin-user-doc -->
3288
	 * <!-- begin-user-doc -->
3081
	 * <!-- end-user-doc -->
3289
	 * <!-- end-user-doc -->
Lines 3193-3207 Link Here
3193
	int POLYGON_DECORATION__SIZE = POLYGON__SIZE;
3401
	int POLYGON_DECORATION__SIZE = POLYGON__SIZE;
3194
3402
3195
	/**
3403
	/**
3196
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
3197
	 * <!-- begin-user-doc -->
3198
	 * <!-- end-user-doc -->
3199
	 * @generated
3200
	 * @ordered
3201
	 */
3202
	int POLYGON_DECORATION__LAYOUT_MANAGER = POLYGON__LAYOUT_MANAGER;
3203
3204
	/**
3205
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
3404
	 * The feature id for the '<em><b>Outline</b></em>' attribute.
3206
	 * <!-- begin-user-doc -->
3405
	 * <!-- begin-user-doc -->
3207
	 * <!-- end-user-doc -->
3406
	 * <!-- end-user-doc -->
Lines 3330-3335 Link Here
3330
	int CUSTOM_FIGURE = 28;
3529
	int CUSTOM_FIGURE = 28;
3331
3530
3332
	/**
3531
	/**
3532
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
3533
	 * <!-- begin-user-doc -->
3534
	 * <!-- end-user-doc -->
3535
	 * @generated
3536
	 * @ordered
3537
	 */
3538
	int CUSTOM_FIGURE__DATA = FIGURE__DATA;
3539
3540
	/**
3541
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
3542
	 * <!-- begin-user-doc -->
3543
	 * <!-- end-user-doc -->
3544
	 * @generated
3545
	 * @ordered
3546
	 */
3547
	int CUSTOM_FIGURE__LAYOUT = FIGURE__LAYOUT;
3548
3549
	/**
3333
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3550
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3334
	 * <!-- begin-user-doc -->
3551
	 * <!-- begin-user-doc -->
3335
	 * <!-- end-user-doc -->
3552
	 * <!-- end-user-doc -->
Lines 3447-3461 Link Here
3447
	int CUSTOM_FIGURE__SIZE = FIGURE__SIZE;
3664
	int CUSTOM_FIGURE__SIZE = FIGURE__SIZE;
3448
3665
3449
	/**
3666
	/**
3450
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
3451
	 * <!-- begin-user-doc -->
3452
	 * <!-- end-user-doc -->
3453
	 * @generated
3454
	 * @ordered
3455
	 */
3456
	int CUSTOM_FIGURE__LAYOUT_MANAGER = FIGURE__LAYOUT_MANAGER;
3457
3458
	/**
3459
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
3667
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
3460
	 * <!-- begin-user-doc -->
3668
	 * <!-- begin-user-doc -->
3461
	 * <!-- end-user-doc -->
3669
	 * <!-- end-user-doc -->
Lines 3493-3498 Link Here
3493
	int CUSTOM_DECORATION = 29;
3701
	int CUSTOM_DECORATION = 29;
3494
3702
3495
	/**
3703
	/**
3704
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
3705
	 * <!-- begin-user-doc -->
3706
	 * <!-- end-user-doc -->
3707
	 * @generated
3708
	 * @ordered
3709
	 */
3710
	int CUSTOM_DECORATION__DATA = CUSTOM_FIGURE__DATA;
3711
3712
	/**
3713
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
3714
	 * <!-- begin-user-doc -->
3715
	 * <!-- end-user-doc -->
3716
	 * @generated
3717
	 * @ordered
3718
	 */
3719
	int CUSTOM_DECORATION__LAYOUT = CUSTOM_FIGURE__LAYOUT;
3720
3721
	/**
3496
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3722
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3497
	 * <!-- begin-user-doc -->
3723
	 * <!-- begin-user-doc -->
3498
	 * <!-- end-user-doc -->
3724
	 * <!-- end-user-doc -->
Lines 3610-3624 Link Here
3610
	int CUSTOM_DECORATION__SIZE = CUSTOM_FIGURE__SIZE;
3836
	int CUSTOM_DECORATION__SIZE = CUSTOM_FIGURE__SIZE;
3611
3837
3612
	/**
3838
	/**
3613
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
3614
	 * <!-- begin-user-doc -->
3615
	 * <!-- end-user-doc -->
3616
	 * @generated
3617
	 * @ordered
3618
	 */
3619
	int CUSTOM_DECORATION__LAYOUT_MANAGER = CUSTOM_FIGURE__LAYOUT_MANAGER;
3620
3621
	/**
3622
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
3839
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
3623
	 * <!-- begin-user-doc -->
3840
	 * <!-- begin-user-doc -->
3624
	 * <!-- end-user-doc -->
3841
	 * <!-- end-user-doc -->
Lines 3656-3661 Link Here
3656
	int CUSTOM_CONNECTION = 30;
3873
	int CUSTOM_CONNECTION = 30;
3657
3874
3658
	/**
3875
	/**
3876
	 * The feature id for the '<em><b>Data</b></em>' containment reference.
3877
	 * <!-- begin-user-doc -->
3878
	 * <!-- end-user-doc -->
3879
	 * @generated
3880
	 * @ordered
3881
	 */
3882
	int CUSTOM_CONNECTION__DATA = CUSTOM_FIGURE__DATA;
3883
3884
	/**
3885
	 * The feature id for the '<em><b>Layout</b></em>' containment reference.
3886
	 * <!-- begin-user-doc -->
3887
	 * <!-- end-user-doc -->
3888
	 * @generated
3889
	 * @ordered
3890
	 */
3891
	int CUSTOM_CONNECTION__LAYOUT = CUSTOM_FIGURE__LAYOUT;
3892
3893
	/**
3659
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3894
	 * The feature id for the '<em><b>Name</b></em>' attribute.
3660
	 * <!-- begin-user-doc -->
3895
	 * <!-- begin-user-doc -->
3661
	 * <!-- end-user-doc -->
3896
	 * <!-- end-user-doc -->
Lines 3773-3787 Link Here
3773
	int CUSTOM_CONNECTION__SIZE = CUSTOM_FIGURE__SIZE;
4008
	int CUSTOM_CONNECTION__SIZE = CUSTOM_FIGURE__SIZE;
3774
4009
3775
	/**
4010
	/**
3776
	 * The feature id for the '<em><b>Layout Manager</b></em>' attribute.
3777
	 * <!-- begin-user-doc -->
3778
	 * <!-- end-user-doc -->
3779
	 * @generated
3780
	 * @ordered
3781
	 */
3782
	int CUSTOM_CONNECTION__LAYOUT_MANAGER = CUSTOM_FIGURE__LAYOUT_MANAGER;
3783
3784
	/**
3785
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4011
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
3786
	 * <!-- begin-user-doc -->
4012
	 * <!-- begin-user-doc -->
3787
	 * <!-- end-user-doc -->
4013
	 * <!-- end-user-doc -->
Lines 3974-3980 Link Here
3974
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFontStyle()
4200
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getFontStyle()
3975
	 * @generated
4201
	 * @generated
3976
	 */
4202
	 */
3977
	int FONT_STYLE = 45;
4203
	int FONT_STYLE = 56;
3978
4204
3979
	/**
4205
	/**
3980
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.PointImpl <em>Point</em>}' class.
4206
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.PointImpl <em>Point</em>}' class.
Lines 4264-4475 Link Here
4264
	int CUSTOM_BORDER_FEATURE_COUNT = BORDER_FEATURE_COUNT + 2;
4490
	int CUSTOM_BORDER_FEATURE_COUNT = BORDER_FEATURE_COUNT + 2;
4265
4491
4266
	/**
4492
	/**
4267
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}' enum.
4493
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.LayoutData <em>Layout Data</em>}' class.
4268
	 * <!-- begin-user-doc -->
4494
	 * <!-- begin-user-doc -->
4269
	 * <!-- end-user-doc -->
4495
	 * <!-- end-user-doc -->
4270
	 * @see org.eclipse.gmf.gmfgraph.ColorConstants
4496
	 * @see org.eclipse.gmf.gmfgraph.LayoutData
4271
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getColorConstants()
4497
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLayoutData()
4272
	 * @generated
4498
	 * @generated
4273
	 */
4499
	 */
4274
	int COLOR_CONSTANTS = 44;
4500
	int LAYOUT_DATA = 44;
4275
4501
4276
	/**
4502
	/**
4277
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Direction <em>Direction</em>}' enum.
4503
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4278
	 * <!-- begin-user-doc -->
4504
	 * <!-- begin-user-doc -->
4279
	 * <!-- end-user-doc -->
4505
	 * <!-- end-user-doc -->
4280
	 * @see org.eclipse.gmf.gmfgraph.Direction
4281
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDirection()
4282
	 * @generated
4506
	 * @generated
4507
	 * @ordered
4283
	 */
4508
	 */
4284
	int DIRECTION = 46;
4509
	int LAYOUT_DATA__QUALIFIED_CLASS_NAME = CUSTOM_CLASS__QUALIFIED_CLASS_NAME;
4285
4510
4286
	/**
4511
	/**
4287
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.LineKind <em>Line Kind</em>}' enum.
4512
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4288
	 * <!-- begin-user-doc -->
4513
	 * <!-- begin-user-doc -->
4289
	 * <!-- end-user-doc -->
4514
	 * <!-- end-user-doc -->
4290
	 * @see org.eclipse.gmf.gmfgraph.LineKind
4291
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLineKind()
4292
	 * @generated
4515
	 * @generated
4516
	 * @ordered
4293
	 */
4517
	 */
4294
	int LINE_KIND = 47;
4518
	int LAYOUT_DATA__BUNDLE_NAME = CUSTOM_CLASS__BUNDLE_NAME;
4295
4296
4519
4297
	/**
4520
	/**
4298
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Canvas <em>Canvas</em>}'.
4521
	 * The feature id for the '<em><b>Owner</b></em>' container reference.
4299
	 * <!-- begin-user-doc -->
4522
	 * <!-- begin-user-doc -->
4300
	 * <!-- end-user-doc -->
4523
	 * <!-- end-user-doc -->
4301
	 * @return the meta object for class '<em>Canvas</em>'.
4302
	 * @see org.eclipse.gmf.gmfgraph.Canvas
4303
	 * @generated
4524
	 * @generated
4525
	 * @ordered
4304
	 */
4526
	 */
4305
	EClass getCanvas();
4527
	int LAYOUT_DATA__OWNER = CUSTOM_CLASS_FEATURE_COUNT + 0;
4306
4528
4307
	/**
4529
	/**
4308
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getFigures <em>Figures</em>}'.
4530
	 * The number of structural features of the '<em>Layout Data</em>' class.
4309
	 * <!-- begin-user-doc -->
4531
	 * <!-- begin-user-doc -->
4310
	 * <!-- end-user-doc -->
4532
	 * <!-- end-user-doc -->
4311
	 * @return the meta object for the containment reference list '<em>Figures</em>'.
4312
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getFigures()
4313
	 * @see #getCanvas()
4314
	 * @generated
4533
	 * @generated
4534
	 * @ordered
4315
	 */
4535
	 */
4316
	EReference getCanvas_Figures();
4536
	int LAYOUT_DATA_FEATURE_COUNT = CUSTOM_CLASS_FEATURE_COUNT + 1;
4317
4537
4318
	/**
4538
	/**
4319
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getNodes <em>Nodes</em>}'.
4539
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl <em>Grid Layout Data</em>}' class.
4320
	 * <!-- begin-user-doc -->
4540
	 * <!-- begin-user-doc -->
4321
	 * <!-- end-user-doc -->
4541
	 * <!-- end-user-doc -->
4322
	 * @return the meta object for the containment reference list '<em>Nodes</em>'.
4542
	 * @see org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl
4323
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getNodes()
4543
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getGridLayoutData()
4324
	 * @see #getCanvas()
4325
	 * @generated
4544
	 * @generated
4326
	 */
4545
	 */
4327
	EReference getCanvas_Nodes();
4546
	int GRID_LAYOUT_DATA = 46;
4328
4547
4329
	/**
4548
	/**
4330
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getConnections <em>Connections</em>}'.
4549
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl <em>Border Layout Data</em>}' class.
4331
	 * <!-- begin-user-doc -->
4550
	 * <!-- begin-user-doc -->
4332
	 * <!-- end-user-doc -->
4551
	 * <!-- end-user-doc -->
4333
	 * @return the meta object for the containment reference list '<em>Connections</em>'.
4552
	 * @see org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl
4334
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getConnections()
4553
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getBorderLayoutData()
4335
	 * @see #getCanvas()
4336
	 * @generated
4554
	 * @generated
4337
	 */
4555
	 */
4338
	EReference getCanvas_Connections();
4556
	int BORDER_LAYOUT_DATA = 47;
4339
4557
4340
	/**
4558
	/**
4341
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getCompartments <em>Compartments</em>}'.
4559
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutImpl <em>Custom Layout</em>}' class.
4342
	 * <!-- begin-user-doc -->
4560
	 * <!-- begin-user-doc -->
4343
	 * <!-- end-user-doc -->
4561
	 * <!-- end-user-doc -->
4344
	 * @return the meta object for the containment reference list '<em>Compartments</em>'.
4562
	 * @see org.eclipse.gmf.gmfgraph.impl.CustomLayoutImpl
4345
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getCompartments()
4563
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getCustomLayout()
4346
	 * @see #getCanvas()
4347
	 * @generated
4564
	 * @generated
4348
	 */
4565
	 */
4349
	EReference getCanvas_Compartments();
4566
	int CUSTOM_LAYOUT = 50;
4350
4567
4351
	/**
4568
	/**
4352
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getChildren <em>Children</em>}'.
4569
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Layout <em>Layout</em>}' class.
4353
	 * <!-- begin-user-doc -->
4570
	 * <!-- begin-user-doc -->
4354
	 * <!-- end-user-doc -->
4571
	 * <!-- end-user-doc -->
4355
	 * @return the meta object for the containment reference list '<em>Children</em>'.
4572
	 * @see org.eclipse.gmf.gmfgraph.Layout
4356
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getChildren()
4573
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLayout()
4357
	 * @see #getCanvas()
4358
	 * @generated
4574
	 * @generated
4359
	 */
4575
	 */
4360
	EReference getCanvas_Children();
4576
	int LAYOUT = 49;
4361
4577
4362
	/**
4578
	/**
4363
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.FigureGallery <em>Figure Gallery</em>}'.
4579
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4364
	 * <!-- begin-user-doc -->
4580
	 * <!-- begin-user-doc -->
4365
	 * <!-- end-user-doc -->
4581
	 * <!-- end-user-doc -->
4366
	 * @return the meta object for class '<em>Figure Gallery</em>'.
4367
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery
4368
	 * @generated
4582
	 * @generated
4583
	 * @ordered
4369
	 */
4584
	 */
4370
	EClass getFigureGallery();
4585
	int LAYOUT__QUALIFIED_CLASS_NAME = CUSTOM_CLASS__QUALIFIED_CLASS_NAME;
4371
4586
4372
	/**
4587
	/**
4373
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.FigureGallery#getFigures <em>Figures</em>}'.
4588
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4374
	 * <!-- begin-user-doc -->
4589
	 * <!-- begin-user-doc -->
4375
	 * <!-- end-user-doc -->
4590
	 * <!-- end-user-doc -->
4376
	 * @return the meta object for the containment reference list '<em>Figures</em>'.
4377
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery#getFigures()
4378
	 * @see #getFigureGallery()
4379
	 * @generated
4591
	 * @generated
4592
	 * @ordered
4380
	 */
4593
	 */
4381
	EReference getFigureGallery_Figures();
4594
	int LAYOUT__BUNDLE_NAME = CUSTOM_CLASS__BUNDLE_NAME;
4382
4595
4383
	/**
4596
	/**
4384
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.FigureGallery#getImplementationBundle <em>Implementation Bundle</em>}'.
4597
	 * The number of structural features of the '<em>Layout</em>' class.
4385
	 * <!-- begin-user-doc -->
4598
	 * <!-- begin-user-doc -->
4386
	 * <!-- end-user-doc -->
4599
	 * <!-- end-user-doc -->
4387
	 * @return the meta object for the attribute '<em>Implementation Bundle</em>'.
4388
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery#getImplementationBundle()
4389
	 * @see #getFigureGallery()
4390
	 * @generated
4600
	 * @generated
4601
	 * @ordered
4391
	 */
4602
	 */
4392
	EAttribute getFigureGallery_ImplementationBundle();
4603
	int LAYOUT_FEATURE_COUNT = CUSTOM_CLASS_FEATURE_COUNT + 0;
4393
4604
4394
	/**
4605
	/**
4395
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Identity <em>Identity</em>}'.
4606
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutDataImpl <em>Custom Layout Data</em>}' class.
4396
	 * <!-- begin-user-doc -->
4607
	 * <!-- begin-user-doc -->
4397
	 * <!-- end-user-doc -->
4608
	 * <!-- end-user-doc -->
4398
	 * @return the meta object for class '<em>Identity</em>'.
4609
	 * @see org.eclipse.gmf.gmfgraph.impl.CustomLayoutDataImpl
4399
	 * @see org.eclipse.gmf.gmfgraph.Identity
4610
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getCustomLayoutData()
4400
	 * @generated
4611
	 * @generated
4401
	 */
4612
	 */
4402
	EClass getIdentity();
4613
	int CUSTOM_LAYOUT_DATA = 45;
4403
4614
4404
	/**
4615
	/**
4405
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.Identity#getName <em>Name</em>}'.
4616
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4406
	 * <!-- begin-user-doc -->
4617
	 * <!-- begin-user-doc -->
4407
	 * <!-- end-user-doc -->
4618
	 * <!-- end-user-doc -->
4408
	 * @return the meta object for the attribute '<em>Name</em>'.
4409
	 * @see org.eclipse.gmf.gmfgraph.Identity#getName()
4410
	 * @see #getIdentity()
4411
	 * @generated
4619
	 * @generated
4620
	 * @ordered
4412
	 */
4621
	 */
4413
	EAttribute getIdentity_Name();
4622
	int CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME = LAYOUT__QUALIFIED_CLASS_NAME;
4414
4623
4415
	/**
4624
	/**
4416
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.DiagramElement <em>Diagram Element</em>}'.
4625
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4417
	 * <!-- begin-user-doc -->
4626
	 * <!-- begin-user-doc -->
4418
	 * <!-- end-user-doc -->
4627
	 * <!-- end-user-doc -->
4419
	 * @return the meta object for class '<em>Diagram Element</em>'.
4420
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement
4421
	 * @generated
4628
	 * @generated
4629
	 * @ordered
4422
	 */
4630
	 */
4423
	EClass getDiagramElement();
4631
	int CUSTOM_LAYOUT_DATA__BUNDLE_NAME = LAYOUT__BUNDLE_NAME;
4424
4632
4425
	/**
4633
	/**
4426
	 * Returns the meta object for the reference '{@link org.eclipse.gmf.gmfgraph.DiagramElement#getFigure <em>Figure</em>}'.
4634
	 * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
4427
	 * <!-- begin-user-doc -->
4635
	 * <!-- begin-user-doc -->
4428
	 * <!-- end-user-doc -->
4636
	 * <!-- end-user-doc -->
4429
	 * @return the meta object for the reference '<em>Figure</em>'.
4430
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement#getFigure()
4431
	 * @see #getDiagramElement()
4432
	 * @generated
4637
	 * @generated
4638
	 * @ordered
4433
	 */
4639
	 */
4434
	EReference getDiagramElement_Figure();
4640
	int CUSTOM_LAYOUT_DATA__ATTRIBUTES = LAYOUT_FEATURE_COUNT + 0;
4435
4641
4436
	/**
4642
	/**
4437
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.DiagramElement#getFacets <em>Facets</em>}'.
4643
	 * The number of structural features of the '<em>Custom Layout Data</em>' class.
4438
	 * <!-- begin-user-doc -->
4644
	 * <!-- begin-user-doc -->
4439
	 * <!-- end-user-doc -->
4645
	 * <!-- end-user-doc -->
4440
	 * @return the meta object for the containment reference list '<em>Facets</em>'.
4441
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement#getFacets()
4442
	 * @see #getDiagramElement()
4443
	 * @generated
4646
	 * @generated
4647
	 * @ordered
4444
	 */
4648
	 */
4445
	EReference getDiagramElement_Facets();
4649
	int CUSTOM_LAYOUT_DATA_FEATURE_COUNT = LAYOUT_FEATURE_COUNT + 1;
4446
4650
4447
	/**
4651
	/**
4448
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Node <em>Node</em>}'.
4652
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4449
	 * <!-- begin-user-doc -->
4653
	 * <!-- begin-user-doc -->
4450
	 * <!-- end-user-doc -->
4654
	 * <!-- end-user-doc -->
4451
	 * @return the meta object for class '<em>Node</em>'.
4452
	 * @see org.eclipse.gmf.gmfgraph.Node
4453
	 * @generated
4655
	 * @generated
4656
	 * @ordered
4454
	 */
4657
	 */
4455
	EClass getNode();
4658
	int GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME = LAYOUT_DATA__QUALIFIED_CLASS_NAME;
4456
4659
4457
	/**
4660
	/**
4458
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.Node#getResizeConstraint <em>Resize Constraint</em>}'.
4661
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4459
	 * <!-- begin-user-doc -->
4662
	 * <!-- begin-user-doc -->
4460
	 * <!-- end-user-doc -->
4663
	 * <!-- end-user-doc -->
4461
	 * @return the meta object for the attribute '<em>Resize Constraint</em>'.
4462
	 * @see org.eclipse.gmf.gmfgraph.Node#getResizeConstraint()
4463
	 * @see #getNode()
4464
	 * @generated
4664
	 * @generated
4665
	 * @ordered
4465
	 */
4666
	 */
4466
	EAttribute getNode_ResizeConstraint();
4667
	int GRID_LAYOUT_DATA__BUNDLE_NAME = LAYOUT_DATA__BUNDLE_NAME;
4467
4668
4468
	/**
4669
	/**
4469
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Connection <em>Connection</em>}'.
4670
	 * The feature id for the '<em><b>Owner</b></em>' container reference.
4470
	 * <!-- begin-user-doc -->
4671
	 * <!-- begin-user-doc -->
4471
	 * <!-- end-user-doc -->
4672
	 * <!-- end-user-doc -->
4472
	 * @return the meta object for class '<em>Connection</em>'.
4673
	 * @generated
4674
	 * @ordered
4675
	 */
4676
	int GRID_LAYOUT_DATA__OWNER = LAYOUT_DATA__OWNER;
4677
4678
	/**
4679
	 * The feature id for the '<em><b>Grab Excess Horizontal Space</b></em>' attribute.
4680
	 * <!-- begin-user-doc -->
4681
	 * <!-- end-user-doc -->
4682
	 * @generated
4683
	 * @ordered
4684
	 */
4685
	int GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE = LAYOUT_DATA_FEATURE_COUNT + 0;
4686
4687
	/**
4688
	 * The feature id for the '<em><b>Grab Excess Vertical Space</b></em>' attribute.
4689
	 * <!-- begin-user-doc -->
4690
	 * <!-- end-user-doc -->
4691
	 * @generated
4692
	 * @ordered
4693
	 */
4694
	int GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE = LAYOUT_DATA_FEATURE_COUNT + 1;
4695
4696
	/**
4697
	 * The feature id for the '<em><b>Vertical Alignment</b></em>' attribute.
4698
	 * <!-- begin-user-doc -->
4699
	 * <!-- end-user-doc -->
4700
	 * @generated
4701
	 * @ordered
4702
	 */
4703
	int GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT = LAYOUT_DATA_FEATURE_COUNT + 2;
4704
4705
	/**
4706
	 * The feature id for the '<em><b>Horizontal Alignment</b></em>' attribute.
4707
	 * <!-- begin-user-doc -->
4708
	 * <!-- end-user-doc -->
4709
	 * @generated
4710
	 * @ordered
4711
	 */
4712
	int GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT = LAYOUT_DATA_FEATURE_COUNT + 3;
4713
4714
	/**
4715
	 * The feature id for the '<em><b>Vertical Span</b></em>' attribute.
4716
	 * <!-- begin-user-doc -->
4717
	 * <!-- end-user-doc -->
4718
	 * @generated
4719
	 * @ordered
4720
	 */
4721
	int GRID_LAYOUT_DATA__VERTICAL_SPAN = LAYOUT_DATA_FEATURE_COUNT + 4;
4722
4723
	/**
4724
	 * The feature id for the '<em><b>Horizontal Span</b></em>' attribute.
4725
	 * <!-- begin-user-doc -->
4726
	 * <!-- end-user-doc -->
4727
	 * @generated
4728
	 * @ordered
4729
	 */
4730
	int GRID_LAYOUT_DATA__HORIZONTAL_SPAN = LAYOUT_DATA_FEATURE_COUNT + 5;
4731
4732
	/**
4733
	 * The feature id for the '<em><b>Horizontal Indent</b></em>' attribute.
4734
	 * <!-- begin-user-doc -->
4735
	 * <!-- end-user-doc -->
4736
	 * @generated
4737
	 * @ordered
4738
	 */
4739
	int GRID_LAYOUT_DATA__HORIZONTAL_INDENT = LAYOUT_DATA_FEATURE_COUNT + 6;
4740
4741
	/**
4742
	 * The feature id for the '<em><b>Size Hint</b></em>' containment reference.
4743
	 * <!-- begin-user-doc -->
4744
	 * <!-- end-user-doc -->
4745
	 * @generated
4746
	 * @ordered
4747
	 */
4748
	int GRID_LAYOUT_DATA__SIZE_HINT = LAYOUT_DATA_FEATURE_COUNT + 7;
4749
4750
	/**
4751
	 * The number of structural features of the '<em>Grid Layout Data</em>' class.
4752
	 * <!-- begin-user-doc -->
4753
	 * <!-- end-user-doc -->
4754
	 * @generated
4755
	 * @ordered
4756
	 */
4757
	int GRID_LAYOUT_DATA_FEATURE_COUNT = LAYOUT_DATA_FEATURE_COUNT + 8;
4758
4759
	/**
4760
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4761
	 * <!-- begin-user-doc -->
4762
	 * <!-- end-user-doc -->
4763
	 * @generated
4764
	 * @ordered
4765
	 */
4766
	int BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME = LAYOUT_DATA__QUALIFIED_CLASS_NAME;
4767
4768
	/**
4769
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4770
	 * <!-- begin-user-doc -->
4771
	 * <!-- end-user-doc -->
4772
	 * @generated
4773
	 * @ordered
4774
	 */
4775
	int BORDER_LAYOUT_DATA__BUNDLE_NAME = LAYOUT_DATA__BUNDLE_NAME;
4776
4777
	/**
4778
	 * The feature id for the '<em><b>Owner</b></em>' container reference.
4779
	 * <!-- begin-user-doc -->
4780
	 * <!-- end-user-doc -->
4781
	 * @generated
4782
	 * @ordered
4783
	 */
4784
	int BORDER_LAYOUT_DATA__OWNER = LAYOUT_DATA__OWNER;
4785
4786
	/**
4787
	 * The feature id for the '<em><b>Alignment</b></em>' attribute.
4788
	 * <!-- begin-user-doc -->
4789
	 * <!-- end-user-doc -->
4790
	 * @generated
4791
	 * @ordered
4792
	 */
4793
	int BORDER_LAYOUT_DATA__ALIGNMENT = LAYOUT_DATA_FEATURE_COUNT + 0;
4794
4795
	/**
4796
	 * The feature id for the '<em><b>Vertical</b></em>' attribute.
4797
	 * <!-- begin-user-doc -->
4798
	 * <!-- end-user-doc -->
4799
	 * @generated
4800
	 * @ordered
4801
	 */
4802
	int BORDER_LAYOUT_DATA__VERTICAL = LAYOUT_DATA_FEATURE_COUNT + 1;
4803
4804
	/**
4805
	 * The number of structural features of the '<em>Border Layout Data</em>' class.
4806
	 * <!-- begin-user-doc -->
4807
	 * <!-- end-user-doc -->
4808
	 * @generated
4809
	 * @ordered
4810
	 */
4811
	int BORDER_LAYOUT_DATA_FEATURE_COUNT = LAYOUT_DATA_FEATURE_COUNT + 2;
4812
4813
	/**
4814
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4815
	 * <!-- begin-user-doc -->
4816
	 * <!-- end-user-doc -->
4817
	 * @generated
4818
	 * @ordered
4819
	 */
4820
	int CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME = LAYOUT__QUALIFIED_CLASS_NAME;
4821
4822
	/**
4823
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4824
	 * <!-- begin-user-doc -->
4825
	 * <!-- end-user-doc -->
4826
	 * @generated
4827
	 * @ordered
4828
	 */
4829
	int CUSTOM_LAYOUT__BUNDLE_NAME = LAYOUT__BUNDLE_NAME;
4830
4831
	/**
4832
	 * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
4833
	 * <!-- begin-user-doc -->
4834
	 * <!-- end-user-doc -->
4835
	 * @generated
4836
	 * @ordered
4837
	 */
4838
	int CUSTOM_LAYOUT__ATTRIBUTES = LAYOUT_FEATURE_COUNT + 0;
4839
4840
	/**
4841
	 * The number of structural features of the '<em>Custom Layout</em>' class.
4842
	 * <!-- begin-user-doc -->
4843
	 * <!-- end-user-doc -->
4844
	 * @generated
4845
	 * @ordered
4846
	 */
4847
	int CUSTOM_LAYOUT_FEATURE_COUNT = LAYOUT_FEATURE_COUNT + 1;
4848
4849
	/**
4850
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl <em>Grid Layout</em>}' class.
4851
	 * <!-- begin-user-doc -->
4852
	 * <!-- end-user-doc -->
4853
	 * @see org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl
4854
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getGridLayout()
4855
	 * @generated
4856
	 */
4857
	int GRID_LAYOUT = 51;
4858
4859
	/**
4860
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4861
	 * <!-- begin-user-doc -->
4862
	 * <!-- end-user-doc -->
4863
	 * @generated
4864
	 * @ordered
4865
	 */
4866
	int GRID_LAYOUT__QUALIFIED_CLASS_NAME = LAYOUT__QUALIFIED_CLASS_NAME;
4867
4868
	/**
4869
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4870
	 * <!-- begin-user-doc -->
4871
	 * <!-- end-user-doc -->
4872
	 * @generated
4873
	 * @ordered
4874
	 */
4875
	int GRID_LAYOUT__BUNDLE_NAME = LAYOUT__BUNDLE_NAME;
4876
4877
	/**
4878
	 * The feature id for the '<em><b>Num Columns</b></em>' attribute.
4879
	 * <!-- begin-user-doc -->
4880
	 * <!-- end-user-doc -->
4881
	 * @generated
4882
	 * @ordered
4883
	 */
4884
	int GRID_LAYOUT__NUM_COLUMNS = LAYOUT_FEATURE_COUNT + 0;
4885
4886
	/**
4887
	 * The feature id for the '<em><b>Equal Width</b></em>' attribute.
4888
	 * <!-- begin-user-doc -->
4889
	 * <!-- end-user-doc -->
4890
	 * @generated
4891
	 * @ordered
4892
	 */
4893
	int GRID_LAYOUT__EQUAL_WIDTH = LAYOUT_FEATURE_COUNT + 1;
4894
4895
	/**
4896
	 * The feature id for the '<em><b>Margins</b></em>' containment reference.
4897
	 * <!-- begin-user-doc -->
4898
	 * <!-- end-user-doc -->
4899
	 * @generated
4900
	 * @ordered
4901
	 */
4902
	int GRID_LAYOUT__MARGINS = LAYOUT_FEATURE_COUNT + 2;
4903
4904
	/**
4905
	 * The feature id for the '<em><b>Spacing</b></em>' containment reference.
4906
	 * <!-- begin-user-doc -->
4907
	 * <!-- end-user-doc -->
4908
	 * @generated
4909
	 * @ordered
4910
	 */
4911
	int GRID_LAYOUT__SPACING = LAYOUT_FEATURE_COUNT + 3;
4912
4913
	/**
4914
	 * The number of structural features of the '<em>Grid Layout</em>' class.
4915
	 * <!-- begin-user-doc -->
4916
	 * <!-- end-user-doc -->
4917
	 * @generated
4918
	 * @ordered
4919
	 */
4920
	int GRID_LAYOUT_FEATURE_COUNT = LAYOUT_FEATURE_COUNT + 4;
4921
4922
	/**
4923
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutImpl <em>Border Layout</em>}' class.
4924
	 * <!-- begin-user-doc -->
4925
	 * <!-- end-user-doc -->
4926
	 * @see org.eclipse.gmf.gmfgraph.impl.BorderLayoutImpl
4927
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getBorderLayout()
4928
	 * @generated
4929
	 */
4930
	int BORDER_LAYOUT = 52;
4931
4932
	/**
4933
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4934
	 * <!-- begin-user-doc -->
4935
	 * <!-- end-user-doc -->
4936
	 * @generated
4937
	 * @ordered
4938
	 */
4939
	int BORDER_LAYOUT__QUALIFIED_CLASS_NAME = LAYOUT__QUALIFIED_CLASS_NAME;
4940
4941
	/**
4942
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4943
	 * <!-- begin-user-doc -->
4944
	 * <!-- end-user-doc -->
4945
	 * @generated
4946
	 * @ordered
4947
	 */
4948
	int BORDER_LAYOUT__BUNDLE_NAME = LAYOUT__BUNDLE_NAME;
4949
4950
	/**
4951
	 * The feature id for the '<em><b>Spacing</b></em>' containment reference.
4952
	 * <!-- begin-user-doc -->
4953
	 * <!-- end-user-doc -->
4954
	 * @generated
4955
	 * @ordered
4956
	 */
4957
	int BORDER_LAYOUT__SPACING = LAYOUT_FEATURE_COUNT + 0;
4958
4959
	/**
4960
	 * The number of structural features of the '<em>Border Layout</em>' class.
4961
	 * <!-- begin-user-doc -->
4962
	 * <!-- end-user-doc -->
4963
	 * @generated
4964
	 * @ordered
4965
	 */
4966
	int BORDER_LAYOUT_FEATURE_COUNT = LAYOUT_FEATURE_COUNT + 1;
4967
4968
	/**
4969
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.CustomConfigurableClassImpl <em>Custom Configurable Class</em>}' class.
4970
	 * <!-- begin-user-doc -->
4971
	 * <!-- end-user-doc -->
4972
	 * @see org.eclipse.gmf.gmfgraph.impl.CustomConfigurableClassImpl
4973
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getCustomConfigurableClass()
4974
	 * @generated
4975
	 */
4976
	int CUSTOM_CONFIGURABLE_CLASS = 53;
4977
4978
	/**
4979
	 * The feature id for the '<em><b>Qualified Class Name</b></em>' attribute.
4980
	 * <!-- begin-user-doc -->
4981
	 * <!-- end-user-doc -->
4982
	 * @generated
4983
	 * @ordered
4984
	 */
4985
	int CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME = CUSTOM_CLASS__QUALIFIED_CLASS_NAME;
4986
4987
	/**
4988
	 * The feature id for the '<em><b>Bundle Name</b></em>' attribute.
4989
	 * <!-- begin-user-doc -->
4990
	 * <!-- end-user-doc -->
4991
	 * @generated
4992
	 * @ordered
4993
	 */
4994
	int CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME = CUSTOM_CLASS__BUNDLE_NAME;
4995
4996
	/**
4997
	 * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
4998
	 * <!-- begin-user-doc -->
4999
	 * <!-- end-user-doc -->
5000
	 * @generated
5001
	 * @ordered
5002
	 */
5003
	int CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES = CUSTOM_CLASS_FEATURE_COUNT + 0;
5004
5005
	/**
5006
	 * The number of structural features of the '<em>Custom Configurable Class</em>' class.
5007
	 * <!-- begin-user-doc -->
5008
	 * <!-- end-user-doc -->
5009
	 * @generated
5010
	 * @ordered
5011
	 */
5012
	int CUSTOM_CONFIGURABLE_CLASS_FEATURE_COUNT = CUSTOM_CLASS_FEATURE_COUNT + 1;
5013
5014
	/**
5015
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl <em>Custom Attribute</em>}' class.
5016
	 * <!-- begin-user-doc -->
5017
	 * <!-- end-user-doc -->
5018
	 * @see org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl
5019
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getCustomAttribute()
5020
	 * @generated
5021
	 */
5022
	int CUSTOM_ATTRIBUTE = 54;
5023
5024
	/**
5025
	 * The feature id for the '<em><b>Name</b></em>' attribute.
5026
	 * <!-- begin-user-doc -->
5027
	 * <!-- end-user-doc -->
5028
	 * @generated
5029
	 * @ordered
5030
	 */
5031
	int CUSTOM_ATTRIBUTE__NAME = 0;
5032
5033
	/**
5034
	 * The feature id for the '<em><b>Type</b></em>' attribute.
5035
	 * <!-- begin-user-doc -->
5036
	 * <!-- end-user-doc -->
5037
	 * @generated
5038
	 * @ordered
5039
	 */
5040
	int CUSTOM_ATTRIBUTE__TYPE = 1;
5041
5042
	/**
5043
	 * The feature id for the '<em><b>Value</b></em>' attribute.
5044
	 * <!-- begin-user-doc -->
5045
	 * <!-- end-user-doc -->
5046
	 * @generated
5047
	 * @ordered
5048
	 */
5049
	int CUSTOM_ATTRIBUTE__VALUE = 2;
5050
5051
	/**
5052
	 * The feature id for the '<em><b>Direct Access</b></em>' attribute.
5053
	 * <!-- begin-user-doc -->
5054
	 * <!-- end-user-doc -->
5055
	 * @generated
5056
	 * @ordered
5057
	 */
5058
	int CUSTOM_ATTRIBUTE__DIRECT_ACCESS = 3;
5059
5060
	/**
5061
	 * The feature id for the '<em><b>Multi Statement Value</b></em>' attribute.
5062
	 * <!-- begin-user-doc -->
5063
	 * <!-- end-user-doc -->
5064
	 * @generated
5065
	 * @ordered
5066
	 */
5067
	int CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE = 4;
5068
5069
	/**
5070
	 * The number of structural features of the '<em>Custom Attribute</em>' class.
5071
	 * <!-- begin-user-doc -->
5072
	 * <!-- end-user-doc -->
5073
	 * @generated
5074
	 * @ordered
5075
	 */
5076
	int CUSTOM_ATTRIBUTE_FEATURE_COUNT = 5;
5077
5078
	/**
5079
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}' enum.
5080
	 * <!-- begin-user-doc -->
5081
	 * <!-- end-user-doc -->
5082
	 * @see org.eclipse.gmf.gmfgraph.ColorConstants
5083
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getColorConstants()
5084
	 * @generated
5085
	 */
5086
	int COLOR_CONSTANTS = 55;
5087
5088
	/**
5089
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Direction <em>Direction</em>}' enum.
5090
	 * <!-- begin-user-doc -->
5091
	 * <!-- end-user-doc -->
5092
	 * @see org.eclipse.gmf.gmfgraph.Direction
5093
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getDirection()
5094
	 * @generated
5095
	 */
5096
	int DIRECTION = 57;
5097
5098
	/**
5099
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.LineKind <em>Line Kind</em>}' enum.
5100
	 * <!-- begin-user-doc -->
5101
	 * <!-- end-user-doc -->
5102
	 * @see org.eclipse.gmf.gmfgraph.LineKind
5103
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getLineKind()
5104
	 * @generated
5105
	 */
5106
	int LINE_KIND = 58;
5107
5108
5109
	/**
5110
	 * The meta object id for the '{@link org.eclipse.gmf.gmfgraph.Alignment <em>Alignment</em>}' enum.
5111
	 * <!-- begin-user-doc -->
5112
	 * <!-- end-user-doc -->
5113
	 * @see org.eclipse.gmf.gmfgraph.Alignment
5114
	 * @see org.eclipse.gmf.gmfgraph.impl.GMFGraphPackageImpl#getAlignment()
5115
	 * @generated
5116
	 */
5117
	int ALIGNMENT = 59;
5118
5119
5120
	/**
5121
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Canvas <em>Canvas</em>}'.
5122
	 * <!-- begin-user-doc -->
5123
	 * <!-- end-user-doc -->
5124
	 * @return the meta object for class '<em>Canvas</em>'.
5125
	 * @see org.eclipse.gmf.gmfgraph.Canvas
5126
	 * @generated
5127
	 */
5128
	EClass getCanvas();
5129
5130
	/**
5131
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getFigures <em>Figures</em>}'.
5132
	 * <!-- begin-user-doc -->
5133
	 * <!-- end-user-doc -->
5134
	 * @return the meta object for the containment reference list '<em>Figures</em>'.
5135
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getFigures()
5136
	 * @see #getCanvas()
5137
	 * @generated
5138
	 */
5139
	EReference getCanvas_Figures();
5140
5141
	/**
5142
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getNodes <em>Nodes</em>}'.
5143
	 * <!-- begin-user-doc -->
5144
	 * <!-- end-user-doc -->
5145
	 * @return the meta object for the containment reference list '<em>Nodes</em>'.
5146
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getNodes()
5147
	 * @see #getCanvas()
5148
	 * @generated
5149
	 */
5150
	EReference getCanvas_Nodes();
5151
5152
	/**
5153
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getConnections <em>Connections</em>}'.
5154
	 * <!-- begin-user-doc -->
5155
	 * <!-- end-user-doc -->
5156
	 * @return the meta object for the containment reference list '<em>Connections</em>'.
5157
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getConnections()
5158
	 * @see #getCanvas()
5159
	 * @generated
5160
	 */
5161
	EReference getCanvas_Connections();
5162
5163
	/**
5164
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getCompartments <em>Compartments</em>}'.
5165
	 * <!-- begin-user-doc -->
5166
	 * <!-- end-user-doc -->
5167
	 * @return the meta object for the containment reference list '<em>Compartments</em>'.
5168
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getCompartments()
5169
	 * @see #getCanvas()
5170
	 * @generated
5171
	 */
5172
	EReference getCanvas_Compartments();
5173
5174
	/**
5175
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.Canvas#getChildren <em>Children</em>}'.
5176
	 * <!-- begin-user-doc -->
5177
	 * <!-- end-user-doc -->
5178
	 * @return the meta object for the containment reference list '<em>Children</em>'.
5179
	 * @see org.eclipse.gmf.gmfgraph.Canvas#getChildren()
5180
	 * @see #getCanvas()
5181
	 * @generated
5182
	 */
5183
	EReference getCanvas_Children();
5184
5185
	/**
5186
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.FigureGallery <em>Figure Gallery</em>}'.
5187
	 * <!-- begin-user-doc -->
5188
	 * <!-- end-user-doc -->
5189
	 * @return the meta object for class '<em>Figure Gallery</em>'.
5190
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery
5191
	 * @generated
5192
	 */
5193
	EClass getFigureGallery();
5194
5195
	/**
5196
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.FigureGallery#getFigures <em>Figures</em>}'.
5197
	 * <!-- begin-user-doc -->
5198
	 * <!-- end-user-doc -->
5199
	 * @return the meta object for the containment reference list '<em>Figures</em>'.
5200
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery#getFigures()
5201
	 * @see #getFigureGallery()
5202
	 * @generated
5203
	 */
5204
	EReference getFigureGallery_Figures();
5205
5206
	/**
5207
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.FigureGallery#getImplementationBundle <em>Implementation Bundle</em>}'.
5208
	 * <!-- begin-user-doc -->
5209
	 * <!-- end-user-doc -->
5210
	 * @return the meta object for the attribute '<em>Implementation Bundle</em>'.
5211
	 * @see org.eclipse.gmf.gmfgraph.FigureGallery#getImplementationBundle()
5212
	 * @see #getFigureGallery()
5213
	 * @generated
5214
	 */
5215
	EAttribute getFigureGallery_ImplementationBundle();
5216
5217
	/**
5218
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Identity <em>Identity</em>}'.
5219
	 * <!-- begin-user-doc -->
5220
	 * <!-- end-user-doc -->
5221
	 * @return the meta object for class '<em>Identity</em>'.
5222
	 * @see org.eclipse.gmf.gmfgraph.Identity
5223
	 * @generated
5224
	 */
5225
	EClass getIdentity();
5226
5227
	/**
5228
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.Identity#getName <em>Name</em>}'.
5229
	 * <!-- begin-user-doc -->
5230
	 * <!-- end-user-doc -->
5231
	 * @return the meta object for the attribute '<em>Name</em>'.
5232
	 * @see org.eclipse.gmf.gmfgraph.Identity#getName()
5233
	 * @see #getIdentity()
5234
	 * @generated
5235
	 */
5236
	EAttribute getIdentity_Name();
5237
5238
	/**
5239
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.DiagramElement <em>Diagram Element</em>}'.
5240
	 * <!-- begin-user-doc -->
5241
	 * <!-- end-user-doc -->
5242
	 * @return the meta object for class '<em>Diagram Element</em>'.
5243
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement
5244
	 * @generated
5245
	 */
5246
	EClass getDiagramElement();
5247
5248
	/**
5249
	 * Returns the meta object for the reference '{@link org.eclipse.gmf.gmfgraph.DiagramElement#getFigure <em>Figure</em>}'.
5250
	 * <!-- begin-user-doc -->
5251
	 * <!-- end-user-doc -->
5252
	 * @return the meta object for the reference '<em>Figure</em>'.
5253
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement#getFigure()
5254
	 * @see #getDiagramElement()
5255
	 * @generated
5256
	 */
5257
	EReference getDiagramElement_Figure();
5258
5259
	/**
5260
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.DiagramElement#getFacets <em>Facets</em>}'.
5261
	 * <!-- begin-user-doc -->
5262
	 * <!-- end-user-doc -->
5263
	 * @return the meta object for the containment reference list '<em>Facets</em>'.
5264
	 * @see org.eclipse.gmf.gmfgraph.DiagramElement#getFacets()
5265
	 * @see #getDiagramElement()
5266
	 * @generated
5267
	 */
5268
	EReference getDiagramElement_Facets();
5269
5270
	/**
5271
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Node <em>Node</em>}'.
5272
	 * <!-- begin-user-doc -->
5273
	 * <!-- end-user-doc -->
5274
	 * @return the meta object for class '<em>Node</em>'.
5275
	 * @see org.eclipse.gmf.gmfgraph.Node
5276
	 * @generated
5277
	 */
5278
	EClass getNode();
5279
5280
	/**
5281
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.Node#getResizeConstraint <em>Resize Constraint</em>}'.
5282
	 * <!-- begin-user-doc -->
5283
	 * <!-- end-user-doc -->
5284
	 * @return the meta object for the attribute '<em>Resize Constraint</em>'.
5285
	 * @see org.eclipse.gmf.gmfgraph.Node#getResizeConstraint()
5286
	 * @see #getNode()
5287
	 * @generated
5288
	 */
5289
	EAttribute getNode_ResizeConstraint();
5290
5291
	/**
5292
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Connection <em>Connection</em>}'.
5293
	 * <!-- begin-user-doc -->
5294
	 * <!-- end-user-doc -->
5295
	 * @return the meta object for class '<em>Connection</em>'.
4473
	 * @see org.eclipse.gmf.gmfgraph.Connection
5296
	 * @see org.eclipse.gmf.gmfgraph.Connection
4474
	 * @generated
5297
	 * @generated
4475
	 */
5298
	 */
Lines 4733-4749 Link Here
4733
	EReference getFigure_Size();
5556
	EReference getFigure_Size();
4734
5557
4735
	/**
5558
	/**
4736
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.Figure#getLayoutManager <em>Layout Manager</em>}'.
4737
	 * <!-- begin-user-doc -->
4738
	 * <!-- end-user-doc -->
4739
	 * @return the meta object for the attribute '<em>Layout Manager</em>'.
4740
	 * @see org.eclipse.gmf.gmfgraph.Figure#getLayoutManager()
4741
	 * @see #getFigure()
4742
	 * @generated
4743
	 */
4744
	EAttribute getFigure_LayoutManager();
4745
4746
	/**
4747
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.FigureRef <em>Figure Ref</em>}'.
5559
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.FigureRef <em>Figure Ref</em>}'.
4748
	 * <!-- begin-user-doc -->
5560
	 * <!-- begin-user-doc -->
4749
	 * <!-- end-user-doc -->
5561
	 * <!-- end-user-doc -->
Lines 5460-5465 Link Here
5460
	EClass getCustomBorder();
6272
	EClass getCustomBorder();
5461
6273
5462
	/**
6274
	/**
6275
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.LayoutData <em>Layout Data</em>}'.
6276
	 * <!-- begin-user-doc -->
6277
	 * <!-- end-user-doc -->
6278
	 * @return the meta object for class '<em>Layout Data</em>'.
6279
	 * @see org.eclipse.gmf.gmfgraph.LayoutData
6280
	 * @generated
6281
	 */
6282
	EClass getLayoutData();
6283
6284
	/**
6285
	 * Returns the meta object for the container reference '{@link org.eclipse.gmf.gmfgraph.LayoutData#getOwner <em>Owner</em>}'.
6286
	 * <!-- begin-user-doc -->
6287
	 * <!-- end-user-doc -->
6288
	 * @return the meta object for the container reference '<em>Owner</em>'.
6289
	 * @see org.eclipse.gmf.gmfgraph.LayoutData#getOwner()
6290
	 * @see #getLayoutData()
6291
	 * @generated
6292
	 */
6293
	EReference getLayoutData_Owner();
6294
6295
	/**
6296
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.CustomLayoutData <em>Custom Layout Data</em>}'.
6297
	 * <!-- begin-user-doc -->
6298
	 * <!-- end-user-doc -->
6299
	 * @return the meta object for class '<em>Custom Layout Data</em>'.
6300
	 * @see org.eclipse.gmf.gmfgraph.CustomLayoutData
6301
	 * @generated
6302
	 */
6303
	EClass getCustomLayoutData();
6304
6305
	/**
6306
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.GridLayoutData <em>Grid Layout Data</em>}'.
6307
	 * <!-- begin-user-doc -->
6308
	 * <!-- end-user-doc -->
6309
	 * @return the meta object for class '<em>Grid Layout Data</em>'.
6310
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData
6311
	 * @generated
6312
	 */
6313
	EClass getGridLayoutData();
6314
6315
	/**
6316
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessHorizontalSpace <em>Grab Excess Horizontal Space</em>}'.
6317
	 * <!-- begin-user-doc -->
6318
	 * <!-- end-user-doc -->
6319
	 * @return the meta object for the attribute '<em>Grab Excess Horizontal Space</em>'.
6320
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessHorizontalSpace()
6321
	 * @see #getGridLayoutData()
6322
	 * @generated
6323
	 */
6324
	EAttribute getGridLayoutData_GrabExcessHorizontalSpace();
6325
6326
	/**
6327
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessVerticalSpace <em>Grab Excess Vertical Space</em>}'.
6328
	 * <!-- begin-user-doc -->
6329
	 * <!-- end-user-doc -->
6330
	 * @return the meta object for the attribute '<em>Grab Excess Vertical Space</em>'.
6331
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessVerticalSpace()
6332
	 * @see #getGridLayoutData()
6333
	 * @generated
6334
	 */
6335
	EAttribute getGridLayoutData_GrabExcessVerticalSpace();
6336
6337
	/**
6338
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalAlignment <em>Vertical Alignment</em>}'.
6339
	 * <!-- begin-user-doc -->
6340
	 * <!-- end-user-doc -->
6341
	 * @return the meta object for the attribute '<em>Vertical Alignment</em>'.
6342
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalAlignment()
6343
	 * @see #getGridLayoutData()
6344
	 * @generated
6345
	 */
6346
	EAttribute getGridLayoutData_VerticalAlignment();
6347
6348
	/**
6349
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalAlignment <em>Horizontal Alignment</em>}'.
6350
	 * <!-- begin-user-doc -->
6351
	 * <!-- end-user-doc -->
6352
	 * @return the meta object for the attribute '<em>Horizontal Alignment</em>'.
6353
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalAlignment()
6354
	 * @see #getGridLayoutData()
6355
	 * @generated
6356
	 */
6357
	EAttribute getGridLayoutData_HorizontalAlignment();
6358
6359
	/**
6360
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalSpan <em>Vertical Span</em>}'.
6361
	 * <!-- begin-user-doc -->
6362
	 * <!-- end-user-doc -->
6363
	 * @return the meta object for the attribute '<em>Vertical Span</em>'.
6364
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalSpan()
6365
	 * @see #getGridLayoutData()
6366
	 * @generated
6367
	 */
6368
	EAttribute getGridLayoutData_VerticalSpan();
6369
6370
	/**
6371
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalSpan <em>Horizontal Span</em>}'.
6372
	 * <!-- begin-user-doc -->
6373
	 * <!-- end-user-doc -->
6374
	 * @return the meta object for the attribute '<em>Horizontal Span</em>'.
6375
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalSpan()
6376
	 * @see #getGridLayoutData()
6377
	 * @generated
6378
	 */
6379
	EAttribute getGridLayoutData_HorizontalSpan();
6380
6381
	/**
6382
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalIndent <em>Horizontal Indent</em>}'.
6383
	 * <!-- begin-user-doc -->
6384
	 * <!-- end-user-doc -->
6385
	 * @return the meta object for the attribute '<em>Horizontal Indent</em>'.
6386
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalIndent()
6387
	 * @see #getGridLayoutData()
6388
	 * @generated
6389
	 */
6390
	EAttribute getGridLayoutData_HorizontalIndent();
6391
6392
	/**
6393
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getSizeHint <em>Size Hint</em>}'.
6394
	 * <!-- begin-user-doc -->
6395
	 * <!-- end-user-doc -->
6396
	 * @return the meta object for the containment reference '<em>Size Hint</em>'.
6397
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData#getSizeHint()
6398
	 * @see #getGridLayoutData()
6399
	 * @generated
6400
	 */
6401
	EReference getGridLayoutData_SizeHint();
6402
6403
	/**
6404
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData <em>Border Layout Data</em>}'.
6405
	 * <!-- begin-user-doc -->
6406
	 * <!-- end-user-doc -->
6407
	 * @return the meta object for class '<em>Border Layout Data</em>'.
6408
	 * @see org.eclipse.gmf.gmfgraph.BorderLayoutData
6409
	 * @generated
6410
	 */
6411
	EClass getBorderLayoutData();
6412
6413
	/**
6414
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#getAlignment <em>Alignment</em>}'.
6415
	 * <!-- begin-user-doc -->
6416
	 * <!-- end-user-doc -->
6417
	 * @return the meta object for the attribute '<em>Alignment</em>'.
6418
	 * @see org.eclipse.gmf.gmfgraph.BorderLayoutData#getAlignment()
6419
	 * @see #getBorderLayoutData()
6420
	 * @generated
6421
	 */
6422
	EAttribute getBorderLayoutData_Alignment();
6423
6424
	/**
6425
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#isVertical <em>Vertical</em>}'.
6426
	 * <!-- begin-user-doc -->
6427
	 * <!-- end-user-doc -->
6428
	 * @return the meta object for the attribute '<em>Vertical</em>'.
6429
	 * @see org.eclipse.gmf.gmfgraph.BorderLayoutData#isVertical()
6430
	 * @see #getBorderLayoutData()
6431
	 * @generated
6432
	 */
6433
	EAttribute getBorderLayoutData_Vertical();
6434
6435
	/**
6436
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Layoutable <em>Layoutable</em>}'.
6437
	 * <!-- begin-user-doc -->
6438
	 * <!-- end-user-doc -->
6439
	 * @return the meta object for class '<em>Layoutable</em>'.
6440
	 * @see org.eclipse.gmf.gmfgraph.Layoutable
6441
	 * @generated
6442
	 */
6443
	EClass getLayoutable();
6444
6445
	/**
6446
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.Layoutable#getData <em>Data</em>}'.
6447
	 * <!-- begin-user-doc -->
6448
	 * <!-- end-user-doc -->
6449
	 * @return the meta object for the containment reference '<em>Data</em>'.
6450
	 * @see org.eclipse.gmf.gmfgraph.Layoutable#getData()
6451
	 * @see #getLayoutable()
6452
	 * @generated
6453
	 */
6454
	EReference getLayoutable_Data();
6455
6456
	/**
6457
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.Layoutable#getLayout <em>Layout</em>}'.
6458
	 * <!-- begin-user-doc -->
6459
	 * <!-- end-user-doc -->
6460
	 * @return the meta object for the containment reference '<em>Layout</em>'.
6461
	 * @see org.eclipse.gmf.gmfgraph.Layoutable#getLayout()
6462
	 * @see #getLayoutable()
6463
	 * @generated
6464
	 */
6465
	EReference getLayoutable_Layout();
6466
6467
	/**
6468
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.Layout <em>Layout</em>}'.
6469
	 * <!-- begin-user-doc -->
6470
	 * <!-- end-user-doc -->
6471
	 * @return the meta object for class '<em>Layout</em>'.
6472
	 * @see org.eclipse.gmf.gmfgraph.Layout
6473
	 * @generated
6474
	 */
6475
	EClass getLayout();
6476
6477
	/**
6478
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.CustomLayout <em>Custom Layout</em>}'.
6479
	 * <!-- begin-user-doc -->
6480
	 * <!-- end-user-doc -->
6481
	 * @return the meta object for class '<em>Custom Layout</em>'.
6482
	 * @see org.eclipse.gmf.gmfgraph.CustomLayout
6483
	 * @generated
6484
	 */
6485
	EClass getCustomLayout();
6486
6487
	/**
6488
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.GridLayout <em>Grid Layout</em>}'.
6489
	 * <!-- begin-user-doc -->
6490
	 * <!-- end-user-doc -->
6491
	 * @return the meta object for class '<em>Grid Layout</em>'.
6492
	 * @see org.eclipse.gmf.gmfgraph.GridLayout
6493
	 * @generated
6494
	 */
6495
	EClass getGridLayout();
6496
6497
	/**
6498
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayout#getNumColumns <em>Num Columns</em>}'.
6499
	 * <!-- begin-user-doc -->
6500
	 * <!-- end-user-doc -->
6501
	 * @return the meta object for the attribute '<em>Num Columns</em>'.
6502
	 * @see org.eclipse.gmf.gmfgraph.GridLayout#getNumColumns()
6503
	 * @see #getGridLayout()
6504
	 * @generated
6505
	 */
6506
	EAttribute getGridLayout_NumColumns();
6507
6508
	/**
6509
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.GridLayout#isEqualWidth <em>Equal Width</em>}'.
6510
	 * <!-- begin-user-doc -->
6511
	 * <!-- end-user-doc -->
6512
	 * @return the meta object for the attribute '<em>Equal Width</em>'.
6513
	 * @see org.eclipse.gmf.gmfgraph.GridLayout#isEqualWidth()
6514
	 * @see #getGridLayout()
6515
	 * @generated
6516
	 */
6517
	EAttribute getGridLayout_EqualWidth();
6518
6519
	/**
6520
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.GridLayout#getMargins <em>Margins</em>}'.
6521
	 * <!-- begin-user-doc -->
6522
	 * <!-- end-user-doc -->
6523
	 * @return the meta object for the containment reference '<em>Margins</em>'.
6524
	 * @see org.eclipse.gmf.gmfgraph.GridLayout#getMargins()
6525
	 * @see #getGridLayout()
6526
	 * @generated
6527
	 */
6528
	EReference getGridLayout_Margins();
6529
6530
	/**
6531
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.GridLayout#getSpacing <em>Spacing</em>}'.
6532
	 * <!-- begin-user-doc -->
6533
	 * <!-- end-user-doc -->
6534
	 * @return the meta object for the containment reference '<em>Spacing</em>'.
6535
	 * @see org.eclipse.gmf.gmfgraph.GridLayout#getSpacing()
6536
	 * @see #getGridLayout()
6537
	 * @generated
6538
	 */
6539
	EReference getGridLayout_Spacing();
6540
6541
	/**
6542
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.BorderLayout <em>Border Layout</em>}'.
6543
	 * <!-- begin-user-doc -->
6544
	 * <!-- end-user-doc -->
6545
	 * @return the meta object for class '<em>Border Layout</em>'.
6546
	 * @see org.eclipse.gmf.gmfgraph.BorderLayout
6547
	 * @generated
6548
	 */
6549
	EClass getBorderLayout();
6550
6551
	/**
6552
	 * Returns the meta object for the containment reference '{@link org.eclipse.gmf.gmfgraph.BorderLayout#getSpacing <em>Spacing</em>}'.
6553
	 * <!-- begin-user-doc -->
6554
	 * <!-- end-user-doc -->
6555
	 * @return the meta object for the containment reference '<em>Spacing</em>'.
6556
	 * @see org.eclipse.gmf.gmfgraph.BorderLayout#getSpacing()
6557
	 * @see #getBorderLayout()
6558
	 * @generated
6559
	 */
6560
	EReference getBorderLayout_Spacing();
6561
6562
	/**
6563
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass <em>Custom Configurable Class</em>}'.
6564
	 * <!-- begin-user-doc -->
6565
	 * <!-- end-user-doc -->
6566
	 * @return the meta object for class '<em>Custom Configurable Class</em>'.
6567
	 * @see org.eclipse.gmf.gmfgraph.CustomConfigurableClass
6568
	 * @generated
6569
	 */
6570
	EClass getCustomConfigurableClass();
6571
6572
	/**
6573
	 * Returns the meta object for the containment reference list '{@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass#getAttributes <em>Attributes</em>}'.
6574
	 * <!-- begin-user-doc -->
6575
	 * <!-- end-user-doc -->
6576
	 * @return the meta object for the containment reference list '<em>Attributes</em>'.
6577
	 * @see org.eclipse.gmf.gmfgraph.CustomConfigurableClass#getAttributes()
6578
	 * @see #getCustomConfigurableClass()
6579
	 * @generated
6580
	 */
6581
	EReference getCustomConfigurableClass_Attributes();
6582
6583
	/**
6584
	 * Returns the meta object for class '{@link org.eclipse.gmf.gmfgraph.CustomAttribute <em>Custom Attribute</em>}'.
6585
	 * <!-- begin-user-doc -->
6586
	 * <!-- end-user-doc -->
6587
	 * @return the meta object for class '<em>Custom Attribute</em>'.
6588
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute
6589
	 * @generated
6590
	 */
6591
	EClass getCustomAttribute();
6592
6593
	/**
6594
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getName <em>Name</em>}'.
6595
	 * <!-- begin-user-doc -->
6596
	 * <!-- end-user-doc -->
6597
	 * @return the meta object for the attribute '<em>Name</em>'.
6598
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute#getName()
6599
	 * @see #getCustomAttribute()
6600
	 * @generated
6601
	 */
6602
	EAttribute getCustomAttribute_Name();
6603
6604
	/**
6605
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getType <em>Type</em>}'.
6606
	 * <!-- begin-user-doc -->
6607
	 * <!-- end-user-doc -->
6608
	 * @return the meta object for the attribute '<em>Type</em>'.
6609
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute#getType()
6610
	 * @see #getCustomAttribute()
6611
	 * @generated
6612
	 */
6613
	EAttribute getCustomAttribute_Type();
6614
6615
	/**
6616
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getValue <em>Value</em>}'.
6617
	 * <!-- begin-user-doc -->
6618
	 * <!-- end-user-doc -->
6619
	 * @return the meta object for the attribute '<em>Value</em>'.
6620
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute#getValue()
6621
	 * @see #getCustomAttribute()
6622
	 * @generated
6623
	 */
6624
	EAttribute getCustomAttribute_Value();
6625
6626
	/**
6627
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isDirectAccess <em>Direct Access</em>}'.
6628
	 * <!-- begin-user-doc -->
6629
	 * <!-- end-user-doc -->
6630
	 * @return the meta object for the attribute '<em>Direct Access</em>'.
6631
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute#isDirectAccess()
6632
	 * @see #getCustomAttribute()
6633
	 * @generated
6634
	 */
6635
	EAttribute getCustomAttribute_DirectAccess();
6636
6637
	/**
6638
	 * Returns the meta object for the attribute '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isMultiStatementValue <em>Multi Statement Value</em>}'.
6639
	 * <!-- begin-user-doc -->
6640
	 * <!-- end-user-doc -->
6641
	 * @return the meta object for the attribute '<em>Multi Statement Value</em>'.
6642
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute#isMultiStatementValue()
6643
	 * @see #getCustomAttribute()
6644
	 * @generated
6645
	 */
6646
	EAttribute getCustomAttribute_MultiStatementValue();
6647
6648
	/**
5463
	 * Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}'.
6649
	 * Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.ColorConstants <em>Color Constants</em>}'.
5464
	 * <!-- begin-user-doc -->
6650
	 * <!-- begin-user-doc -->
5465
	 * <!-- end-user-doc -->
6651
	 * <!-- end-user-doc -->
Lines 5490-5495 Link Here
5490
	EEnum getLineKind();
6676
	EEnum getLineKind();
5491
6677
5492
	/**
6678
	/**
6679
	 * Returns the meta object for enum '{@link org.eclipse.gmf.gmfgraph.Alignment <em>Alignment</em>}'.
6680
	 * <!-- begin-user-doc -->
6681
	 * <!-- end-user-doc -->
6682
	 * @return the meta object for enum '<em>Alignment</em>'.
6683
	 * @see org.eclipse.gmf.gmfgraph.Alignment
6684
	 * @generated
6685
	 */
6686
	EEnum getAlignment();
6687
6688
	/**
5493
	 * Returns the factory that creates the instances of the model.
6689
	 * Returns the factory that creates the instances of the model.
5494
	 * <!-- begin-user-doc -->
6690
	 * <!-- begin-user-doc -->
5495
	 * <!-- end-user-doc -->
6691
	 * <!-- end-user-doc -->
(-)src/org/eclipse/gmf/gmfgraph/FigureMarker.java (-1 / +1 lines)
Lines 23-27 Link Here
23
 * @model interface="true" abstract="true"
23
 * @model interface="true" abstract="true"
24
 * @generated
24
 * @generated
25
 */
25
 */
26
public interface FigureMarker extends EObject {
26
public interface FigureMarker extends Layoutable {
27
} // FigureMarker
27
} // FigureMarker
(-)src/org/eclipse/gmf/gmfgraph/Figure.java (-27 lines)
Lines 32-38 Link Here
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getBorder <em>Border</em>}</li>
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getBorder <em>Border</em>}</li>
33
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getLocation <em>Location</em>}</li>
33
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getLocation <em>Location</em>}</li>
34
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getSize <em>Size</em>}</li>
34
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getSize <em>Size</em>}</li>
35
 *   <li>{@link org.eclipse.gmf.gmfgraph.Figure#getLayoutManager <em>Layout Manager</em>}</li>
36
 * </ul>
35
 * </ul>
37
 * </p>
36
 * </p>
38
 *
37
 *
Lines 334-363 Link Here
334
	 */
333
	 */
335
	void setSize(Point value);
334
	void setSize(Point value);
336
335
337
	/**
338
	 * Returns the value of the '<em><b>Layout Manager</b></em>' attribute.
339
	 * <!-- begin-user-doc -->
340
	 * <p>
341
	 * If the meaning of the '<em>Layout Manager</em>' attribute isn't clear,
342
	 * there really should be more of a description here...
343
	 * </p>
344
	 * <!-- end-user-doc -->
345
	 * @return the value of the '<em>Layout Manager</em>' attribute.
346
	 * @see #setLayoutManager(String)
347
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getFigure_LayoutManager()
348
	 * @model
349
	 * @generated
350
	 */
351
	String getLayoutManager();
352
353
	/**
354
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.Figure#getLayoutManager <em>Layout Manager</em>}' attribute.
355
	 * <!-- begin-user-doc -->
356
	 * <!-- end-user-doc -->
357
	 * @param value the new value of the '<em>Layout Manager</em>' attribute.
358
	 * @see #getLayoutManager()
359
	 * @generated
360
	 */
361
	void setLayoutManager(String value);
362
363
} // Figure
336
} // Figure
(-)src/org/eclipse/gmf/gmfgraph/impl/LabeledContainerImpl.java (-46 / +130 lines)
Lines 27-32 Link Here
27
import org.eclipse.gmf.gmfgraph.Identity;
27
import org.eclipse.gmf.gmfgraph.Identity;
28
import org.eclipse.gmf.gmfgraph.Insets;
28
import org.eclipse.gmf.gmfgraph.Insets;
29
import org.eclipse.gmf.gmfgraph.LabeledContainer;
29
import org.eclipse.gmf.gmfgraph.LabeledContainer;
30
import org.eclipse.gmf.gmfgraph.Layout;
31
import org.eclipse.gmf.gmfgraph.LayoutData;
30
import org.eclipse.gmf.gmfgraph.Point;
32
import org.eclipse.gmf.gmfgraph.Point;
31
33
32
/**
34
/**
Lines 36-41 Link Here
36
 * <p>
38
 * <p>
37
 * The following features are implemented:
39
 * The following features are implemented:
38
 * <ul>
40
 * <ul>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getData <em>Data</em>}</li>
42
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getLayout <em>Layout</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getName <em>Name</em>}</li>
43
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getName <em>Name</em>}</li>
40
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getChildren <em>Children</em>}</li>
44
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getChildren <em>Children</em>}</li>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getParent <em>Parent</em>}</li>
45
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getParent <em>Parent</em>}</li>
Lines 49-55 Link Here
49
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getBorder <em>Border</em>}</li>
53
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getBorder <em>Border</em>}</li>
50
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getLocation <em>Location</em>}</li>
54
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getLocation <em>Location</em>}</li>
51
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getSize <em>Size</em>}</li>
55
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getSize <em>Size</em>}</li>
52
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabeledContainerImpl#getLayoutManager <em>Layout Manager</em>}</li>
53
 * </ul>
56
 * </ul>
54
 * </p>
57
 * </p>
55
 *
58
 *
Lines 57-62 Link Here
57
 */
60
 */
58
public class LabeledContainerImpl extends EObjectImpl implements LabeledContainer {
61
public class LabeledContainerImpl extends EObjectImpl implements LabeledContainer {
59
	/**
62
	/**
63
	 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference.
64
	 * <!-- begin-user-doc -->
65
	 * <!-- end-user-doc -->
66
	 * @see #getData()
67
	 * @generated
68
	 * @ordered
69
	 */
70
	protected LayoutData data = null;
71
72
	/**
73
	 * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @see #getLayout()
77
	 * @generated
78
	 * @ordered
79
	 */
80
	protected Layout layout = null;
81
82
	/**
60
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
83
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
61
	 * <!-- begin-user-doc -->
84
	 * <!-- begin-user-doc -->
62
	 * <!-- end-user-doc -->
85
	 * <!-- end-user-doc -->
Lines 187-218 Link Here
187
	protected Point size = null;
210
	protected Point size = null;
188
211
189
	/**
212
	/**
190
	 * The default value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
191
	 * <!-- begin-user-doc -->
213
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
214
	 * <!-- end-user-doc -->
193
	 * @see #getLayoutManager()
194
	 * @generated
215
	 * @generated
195
	 * @ordered
196
	 */
216
	 */
197
	protected static final String LAYOUT_MANAGER_EDEFAULT = null;
217
	protected LabeledContainerImpl() {
218
		super();
219
	}
198
220
199
	/**
221
	/**
200
	 * The cached value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
201
	 * <!-- begin-user-doc -->
222
	 * <!-- begin-user-doc -->
202
	 * <!-- end-user-doc -->
223
	 * <!-- end-user-doc -->
203
	 * @see #getLayoutManager()
204
	 * @generated
224
	 * @generated
205
	 * @ordered
206
	 */
225
	 */
207
	protected String layoutManager = LAYOUT_MANAGER_EDEFAULT;
226
	protected EClass eStaticClass() {
227
		return GMFGraphPackage.eINSTANCE.getLabeledContainer();
228
	}
208
229
209
	/**
230
	/**
210
	 * <!-- begin-user-doc -->
231
	 * <!-- begin-user-doc -->
211
	 * <!-- end-user-doc -->
232
	 * <!-- end-user-doc -->
212
	 * @generated
233
	 * @generated
213
	 */
234
	 */
214
	protected LabeledContainerImpl() {
235
	public LayoutData getData() {
215
		super();
236
		return data;
216
	}
237
	}
217
238
218
	/**
239
	/**
Lines 220-227 Link Here
220
	 * <!-- end-user-doc -->
241
	 * <!-- end-user-doc -->
221
	 * @generated
242
	 * @generated
222
	 */
243
	 */
223
	protected EClass eStaticClass() {
244
	public NotificationChain basicSetData(LayoutData newData, NotificationChain msgs) {
224
		return GMFGraphPackage.eINSTANCE.getLabeledContainer();
245
		LayoutData oldData = data;
246
		data = newData;
247
		if (eNotificationRequired()) {
248
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABELED_CONTAINER__DATA, oldData, newData);
249
			if (msgs == null) msgs = notification; else msgs.add(notification);
250
		}
251
		return msgs;
252
	}
253
254
	/**
255
	 * <!-- begin-user-doc -->
256
	 * <!-- end-user-doc -->
257
	 * @generated
258
	 */
259
	public void setData(LayoutData newData) {
260
		if (newData != data) {
261
			NotificationChain msgs = null;
262
			if (data != null)
263
				msgs = ((InternalEObject)data).eInverseRemove(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
264
			if (newData != null)
265
				msgs = ((InternalEObject)newData).eInverseAdd(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
266
			msgs = basicSetData(newData, msgs);
267
			if (msgs != null) msgs.dispatch();
268
		}
269
		else if (eNotificationRequired())
270
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABELED_CONTAINER__DATA, newData, newData));
271
	}
272
273
	/**
274
	 * <!-- begin-user-doc -->
275
	 * <!-- end-user-doc -->
276
	 * @generated
277
	 */
278
	public Layout getLayout() {
279
		return layout;
280
	}
281
282
	/**
283
	 * <!-- begin-user-doc -->
284
	 * <!-- end-user-doc -->
285
	 * @generated
286
	 */
287
	public NotificationChain basicSetLayout(Layout newLayout, NotificationChain msgs) {
288
		Layout oldLayout = layout;
289
		layout = newLayout;
290
		if (eNotificationRequired()) {
291
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABELED_CONTAINER__LAYOUT, oldLayout, newLayout);
292
			if (msgs == null) msgs = notification; else msgs.add(notification);
293
		}
294
		return msgs;
295
	}
296
297
	/**
298
	 * <!-- begin-user-doc -->
299
	 * <!-- end-user-doc -->
300
	 * @generated
301
	 */
302
	public void setLayout(Layout newLayout) {
303
		if (newLayout != layout) {
304
			NotificationChain msgs = null;
305
			if (layout != null)
306
				msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABELED_CONTAINER__LAYOUT, null, msgs);
307
			if (newLayout != null)
308
				msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABELED_CONTAINER__LAYOUT, null, msgs);
309
			msgs = basicSetLayout(newLayout, msgs);
310
			if (msgs != null) msgs.dispatch();
311
		}
312
		else if (eNotificationRequired())
313
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABELED_CONTAINER__LAYOUT, newLayout, newLayout));
225
	}
314
	}
226
315
227
	/**
316
	/**
Lines 702-730 Link Here
702
	 * <!-- end-user-doc -->
791
	 * <!-- end-user-doc -->
703
	 * @generated
792
	 * @generated
704
	 */
793
	 */
705
	public String getLayoutManager() {
706
		return layoutManager;
707
	}
708
709
	/**
710
	 * <!-- begin-user-doc -->
711
	 * <!-- end-user-doc -->
712
	 * @generated
713
	 */
714
	public void setLayoutManager(String newLayoutManager) {
715
		String oldLayoutManager = layoutManager;
716
		layoutManager = newLayoutManager;
717
		if (eNotificationRequired())
718
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER, oldLayoutManager, layoutManager));
719
	}
720
721
	/**
722
	 * <!-- begin-user-doc -->
723
	 * <!-- end-user-doc -->
724
	 * @generated
725
	 */
726
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
794
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
727
		switch (featureID) {
795
		switch (featureID) {
796
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
797
				if (data != null)
798
					msgs = ((InternalEObject)data).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABELED_CONTAINER__DATA, null, msgs);
799
				return basicSetData((LayoutData)otherEnd, msgs);
728
			case GMFGraphPackage.LABELED_CONTAINER__PARENT:
800
			case GMFGraphPackage.LABELED_CONTAINER__PARENT:
729
				if (eInternalContainer() != null)
801
				if (eInternalContainer() != null)
730
					msgs = eBasicRemoveFromContainer(msgs);
802
					msgs = eBasicRemoveFromContainer(msgs);
Lines 740-745 Link Here
740
	 */
812
	 */
741
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
813
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
742
		switch (featureID) {
814
		switch (featureID) {
815
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
816
				return basicSetData(null, msgs);
817
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT:
818
				return basicSetLayout(null, msgs);
743
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
819
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
744
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
820
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
745
			case GMFGraphPackage.LABELED_CONTAINER__PARENT:
821
			case GMFGraphPackage.LABELED_CONTAINER__PARENT:
Lines 788-793 Link Here
788
	 */
864
	 */
789
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
865
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
790
		switch (featureID) {
866
		switch (featureID) {
867
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
868
				return getData();
869
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT:
870
				return getLayout();
791
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
871
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
792
				return getName();
872
				return getName();
793
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
873
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
Lines 814-821 Link Here
814
				return getLocation();
894
				return getLocation();
815
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
895
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
816
				return getSize();
896
				return getSize();
817
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER:
818
				return getLayoutManager();
819
		}
897
		}
820
		return super.eGet(featureID, resolve, coreType);
898
		return super.eGet(featureID, resolve, coreType);
821
	}
899
	}
Lines 827-832 Link Here
827
	 */
905
	 */
828
	public void eSet(int featureID, Object newValue) {
906
	public void eSet(int featureID, Object newValue) {
829
		switch (featureID) {
907
		switch (featureID) {
908
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
909
				setData((LayoutData)newValue);
910
				return;
911
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT:
912
				setLayout((Layout)newValue);
913
				return;
830
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
914
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
831
				setName((String)newValue);
915
				setName((String)newValue);
832
				return;
916
				return;
Lines 864-872 Link Here
864
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
948
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
865
				setSize((Point)newValue);
949
				setSize((Point)newValue);
866
				return;
950
				return;
867
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER:
868
				setLayoutManager((String)newValue);
869
				return;
870
		}
951
		}
871
		super.eSet(featureID, newValue);
952
		super.eSet(featureID, newValue);
872
	}
953
	}
Lines 878-883 Link Here
878
	 */
959
	 */
879
	public void eUnset(int featureID) {
960
	public void eUnset(int featureID) {
880
		switch (featureID) {
961
		switch (featureID) {
962
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
963
				setData((LayoutData)null);
964
				return;
965
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT:
966
				setLayout((Layout)null);
967
				return;
881
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
968
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
882
				setName(NAME_EDEFAULT);
969
				setName(NAME_EDEFAULT);
883
				return;
970
				return;
Lines 914-922 Link Here
914
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
1001
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
915
				setSize((Point)null);
1002
				setSize((Point)null);
916
				return;
1003
				return;
917
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER:
918
				setLayoutManager(LAYOUT_MANAGER_EDEFAULT);
919
				return;
920
		}
1004
		}
921
		super.eUnset(featureID);
1005
		super.eUnset(featureID);
922
	}
1006
	}
Lines 928-933 Link Here
928
	 */
1012
	 */
929
	public boolean eIsSet(int featureID) {
1013
	public boolean eIsSet(int featureID) {
930
		switch (featureID) {
1014
		switch (featureID) {
1015
			case GMFGraphPackage.LABELED_CONTAINER__DATA:
1016
				return data != null;
1017
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT:
1018
				return layout != null;
931
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
1019
			case GMFGraphPackage.LABELED_CONTAINER__NAME:
932
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1020
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
933
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
1021
			case GMFGraphPackage.LABELED_CONTAINER__CHILDREN:
Lines 954-961 Link Here
954
				return location != null;
1042
				return location != null;
955
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
1043
			case GMFGraphPackage.LABELED_CONTAINER__SIZE:
956
				return size != null;
1044
				return size != null;
957
			case GMFGraphPackage.LABELED_CONTAINER__LAYOUT_MANAGER:
958
				return LAYOUT_MANAGER_EDEFAULT == null ? layoutManager != null : !LAYOUT_MANAGER_EDEFAULT.equals(layoutManager);
959
		}
1045
		}
960
		return super.eIsSet(featureID);
1046
		return super.eIsSet(featureID);
961
	}
1047
	}
Lines 1001-1008 Link Here
1001
		StringBuffer result = new StringBuffer(super.toString());
1087
		StringBuffer result = new StringBuffer(super.toString());
1002
		result.append(" (name: ");
1088
		result.append(" (name: ");
1003
		result.append(name);
1089
		result.append(name);
1004
		result.append(", layoutManager: ");
1005
		result.append(layoutManager);
1006
		result.append(')');
1090
		result.append(')');
1007
		return result.toString();
1091
		return result.toString();
1008
	}
1092
	}
(-)src/org/eclipse/gmf/gmfgraph/impl/CustomFigureImpl.java (-54 / +138 lines)
Lines 28-33 Link Here
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
29
import org.eclipse.gmf.gmfgraph.Identity;
29
import org.eclipse.gmf.gmfgraph.Identity;
30
import org.eclipse.gmf.gmfgraph.Insets;
30
import org.eclipse.gmf.gmfgraph.Insets;
31
import org.eclipse.gmf.gmfgraph.Layout;
32
import org.eclipse.gmf.gmfgraph.LayoutData;
31
import org.eclipse.gmf.gmfgraph.Point;
33
import org.eclipse.gmf.gmfgraph.Point;
32
34
33
/**
35
/**
Lines 37-42 Link Here
37
 * <p>
39
 * <p>
38
 * The following features are implemented:
40
 * The following features are implemented:
39
 * <ul>
41
 * <ul>
42
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getData <em>Data</em>}</li>
43
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getLayout <em>Layout</em>}</li>
40
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getName <em>Name</em>}</li>
44
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getName <em>Name</em>}</li>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getChildren <em>Children</em>}</li>
45
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getChildren <em>Children</em>}</li>
42
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getParent <em>Parent</em>}</li>
46
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getParent <em>Parent</em>}</li>
Lines 50-56 Link Here
50
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getBorder <em>Border</em>}</li>
54
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getBorder <em>Border</em>}</li>
51
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getLocation <em>Location</em>}</li>
55
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getLocation <em>Location</em>}</li>
52
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getSize <em>Size</em>}</li>
56
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getSize <em>Size</em>}</li>
53
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getLayoutManager <em>Layout Manager</em>}</li>
54
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
57
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
55
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getBundleName <em>Bundle Name</em>}</li>
58
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomFigureImpl#getBundleName <em>Bundle Name</em>}</li>
56
 * </ul>
59
 * </ul>
Lines 60-65 Link Here
60
 */
63
 */
61
public class CustomFigureImpl extends EObjectImpl implements CustomFigure {
64
public class CustomFigureImpl extends EObjectImpl implements CustomFigure {
62
	/**
65
	/**
66
	 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference.
67
	 * <!-- begin-user-doc -->
68
	 * <!-- end-user-doc -->
69
	 * @see #getData()
70
	 * @generated
71
	 * @ordered
72
	 */
73
	protected LayoutData data = null;
74
75
	/**
76
	 * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
77
	 * <!-- begin-user-doc -->
78
	 * <!-- end-user-doc -->
79
	 * @see #getLayout()
80
	 * @generated
81
	 * @ordered
82
	 */
83
	protected Layout layout = null;
84
85
	/**
63
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
86
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
64
	 * <!-- begin-user-doc -->
87
	 * <!-- begin-user-doc -->
65
	 * <!-- end-user-doc -->
88
	 * <!-- end-user-doc -->
Lines 190-215 Link Here
190
	protected Point size = null;
213
	protected Point size = null;
191
214
192
	/**
215
	/**
193
	 * The default value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
194
	 * <!-- begin-user-doc -->
195
	 * <!-- end-user-doc -->
196
	 * @see #getLayoutManager()
197
	 * @generated
198
	 * @ordered
199
	 */
200
	protected static final String LAYOUT_MANAGER_EDEFAULT = null;
201
202
	/**
203
	 * The cached value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
204
	 * <!-- begin-user-doc -->
205
	 * <!-- end-user-doc -->
206
	 * @see #getLayoutManager()
207
	 * @generated
208
	 * @ordered
209
	 */
210
	protected String layoutManager = LAYOUT_MANAGER_EDEFAULT;
211
212
	/**
213
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
216
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
214
	 * <!-- begin-user-doc -->
217
	 * <!-- begin-user-doc -->
215
	 * <!-- end-user-doc -->
218
	 * <!-- end-user-doc -->
Lines 272-277 Link Here
272
	 * <!-- end-user-doc -->
275
	 * <!-- end-user-doc -->
273
	 * @generated
276
	 * @generated
274
	 */
277
	 */
278
	public LayoutData getData() {
279
		return data;
280
	}
281
282
	/**
283
	 * <!-- begin-user-doc -->
284
	 * <!-- end-user-doc -->
285
	 * @generated
286
	 */
287
	public NotificationChain basicSetData(LayoutData newData, NotificationChain msgs) {
288
		LayoutData oldData = data;
289
		data = newData;
290
		if (eNotificationRequired()) {
291
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_FIGURE__DATA, oldData, newData);
292
			if (msgs == null) msgs = notification; else msgs.add(notification);
293
		}
294
		return msgs;
295
	}
296
297
	/**
298
	 * <!-- begin-user-doc -->
299
	 * <!-- end-user-doc -->
300
	 * @generated
301
	 */
302
	public void setData(LayoutData newData) {
303
		if (newData != data) {
304
			NotificationChain msgs = null;
305
			if (data != null)
306
				msgs = ((InternalEObject)data).eInverseRemove(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
307
			if (newData != null)
308
				msgs = ((InternalEObject)newData).eInverseAdd(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
309
			msgs = basicSetData(newData, msgs);
310
			if (msgs != null) msgs.dispatch();
311
		}
312
		else if (eNotificationRequired())
313
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_FIGURE__DATA, newData, newData));
314
	}
315
316
	/**
317
	 * <!-- begin-user-doc -->
318
	 * <!-- end-user-doc -->
319
	 * @generated
320
	 */
321
	public Layout getLayout() {
322
		return layout;
323
	}
324
325
	/**
326
	 * <!-- begin-user-doc -->
327
	 * <!-- end-user-doc -->
328
	 * @generated
329
	 */
330
	public NotificationChain basicSetLayout(Layout newLayout, NotificationChain msgs) {
331
		Layout oldLayout = layout;
332
		layout = newLayout;
333
		if (eNotificationRequired()) {
334
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_FIGURE__LAYOUT, oldLayout, newLayout);
335
			if (msgs == null) msgs = notification; else msgs.add(notification);
336
		}
337
		return msgs;
338
	}
339
340
	/**
341
	 * <!-- begin-user-doc -->
342
	 * <!-- end-user-doc -->
343
	 * @generated
344
	 */
345
	public void setLayout(Layout newLayout) {
346
		if (newLayout != layout) {
347
			NotificationChain msgs = null;
348
			if (layout != null)
349
				msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.CUSTOM_FIGURE__LAYOUT, null, msgs);
350
			if (newLayout != null)
351
				msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.CUSTOM_FIGURE__LAYOUT, null, msgs);
352
			msgs = basicSetLayout(newLayout, msgs);
353
			if (msgs != null) msgs.dispatch();
354
		}
355
		else if (eNotificationRequired())
356
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_FIGURE__LAYOUT, newLayout, newLayout));
357
	}
358
359
	/**
360
	 * <!-- begin-user-doc -->
361
	 * <!-- end-user-doc -->
362
	 * @generated
363
	 */
275
	public String getName() {
364
	public String getName() {
276
		return name;
365
		return name;
277
	}
366
	}
Lines 745-771 Link Here
745
	 * <!-- end-user-doc -->
834
	 * <!-- end-user-doc -->
746
	 * @generated
835
	 * @generated
747
	 */
836
	 */
748
	public String getLayoutManager() {
749
		return layoutManager;
750
	}
751
752
	/**
753
	 * <!-- begin-user-doc -->
754
	 * <!-- end-user-doc -->
755
	 * @generated
756
	 */
757
	public void setLayoutManager(String newLayoutManager) {
758
		String oldLayoutManager = layoutManager;
759
		layoutManager = newLayoutManager;
760
		if (eNotificationRequired())
761
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER, oldLayoutManager, layoutManager));
762
	}
763
764
	/**
765
	 * <!-- begin-user-doc -->
766
	 * <!-- end-user-doc -->
767
	 * @generated
768
	 */
769
	public String getQualifiedClassName() {
837
	public String getQualifiedClassName() {
770
		return qualifiedClassName;
838
		return qualifiedClassName;
771
	}
839
	}
Lines 810-815 Link Here
810
	 */
878
	 */
811
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
879
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
812
		switch (featureID) {
880
		switch (featureID) {
881
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
882
				if (data != null)
883
					msgs = ((InternalEObject)data).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.CUSTOM_FIGURE__DATA, null, msgs);
884
				return basicSetData((LayoutData)otherEnd, msgs);
813
			case GMFGraphPackage.CUSTOM_FIGURE__PARENT:
885
			case GMFGraphPackage.CUSTOM_FIGURE__PARENT:
814
				if (eInternalContainer() != null)
886
				if (eInternalContainer() != null)
815
					msgs = eBasicRemoveFromContainer(msgs);
887
					msgs = eBasicRemoveFromContainer(msgs);
Lines 825-830 Link Here
825
	 */
897
	 */
826
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
898
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
827
		switch (featureID) {
899
		switch (featureID) {
900
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
901
				return basicSetData(null, msgs);
902
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT:
903
				return basicSetLayout(null, msgs);
828
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
904
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
829
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
905
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
830
			case GMFGraphPackage.CUSTOM_FIGURE__PARENT:
906
			case GMFGraphPackage.CUSTOM_FIGURE__PARENT:
Lines 873-878 Link Here
873
	 */
949
	 */
874
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
950
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
875
		switch (featureID) {
951
		switch (featureID) {
952
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
953
				return getData();
954
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT:
955
				return getLayout();
876
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
956
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
877
				return getName();
957
				return getName();
878
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
958
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
Lines 899-906 Link Here
899
				return getLocation();
979
				return getLocation();
900
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
980
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
901
				return getSize();
981
				return getSize();
902
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER:
903
				return getLayoutManager();
904
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
982
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
905
				return getQualifiedClassName();
983
				return getQualifiedClassName();
906
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
984
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
Lines 916-921 Link Here
916
	 */
994
	 */
917
	public void eSet(int featureID, Object newValue) {
995
	public void eSet(int featureID, Object newValue) {
918
		switch (featureID) {
996
		switch (featureID) {
997
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
998
				setData((LayoutData)newValue);
999
				return;
1000
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT:
1001
				setLayout((Layout)newValue);
1002
				return;
919
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
1003
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
920
				setName((String)newValue);
1004
				setName((String)newValue);
921
				return;
1005
				return;
Lines 953-961 Link Here
953
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
1037
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
954
				setSize((Point)newValue);
1038
				setSize((Point)newValue);
955
				return;
1039
				return;
956
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER:
957
				setLayoutManager((String)newValue);
958
				return;
959
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
1040
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
960
				setQualifiedClassName((String)newValue);
1041
				setQualifiedClassName((String)newValue);
961
				return;
1042
				return;
Lines 973-978 Link Here
973
	 */
1054
	 */
974
	public void eUnset(int featureID) {
1055
	public void eUnset(int featureID) {
975
		switch (featureID) {
1056
		switch (featureID) {
1057
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
1058
				setData((LayoutData)null);
1059
				return;
1060
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT:
1061
				setLayout((Layout)null);
1062
				return;
976
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
1063
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
977
				setName(NAME_EDEFAULT);
1064
				setName(NAME_EDEFAULT);
978
				return;
1065
				return;
Lines 1009-1017 Link Here
1009
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
1096
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
1010
				setSize((Point)null);
1097
				setSize((Point)null);
1011
				return;
1098
				return;
1012
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER:
1013
				setLayoutManager(LAYOUT_MANAGER_EDEFAULT);
1014
				return;
1015
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
1099
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
1016
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
1100
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
1017
				return;
1101
				return;
Lines 1029-1034 Link Here
1029
	 */
1113
	 */
1030
	public boolean eIsSet(int featureID) {
1114
	public boolean eIsSet(int featureID) {
1031
		switch (featureID) {
1115
		switch (featureID) {
1116
			case GMFGraphPackage.CUSTOM_FIGURE__DATA:
1117
				return data != null;
1118
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT:
1119
				return layout != null;
1032
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
1120
			case GMFGraphPackage.CUSTOM_FIGURE__NAME:
1033
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1121
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1034
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
1122
			case GMFGraphPackage.CUSTOM_FIGURE__CHILDREN:
Lines 1055-1062 Link Here
1055
				return location != null;
1143
				return location != null;
1056
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
1144
			case GMFGraphPackage.CUSTOM_FIGURE__SIZE:
1057
				return size != null;
1145
				return size != null;
1058
			case GMFGraphPackage.CUSTOM_FIGURE__LAYOUT_MANAGER:
1059
				return LAYOUT_MANAGER_EDEFAULT == null ? layoutManager != null : !LAYOUT_MANAGER_EDEFAULT.equals(layoutManager);
1060
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
1146
			case GMFGraphPackage.CUSTOM_FIGURE__QUALIFIED_CLASS_NAME:
1061
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
1147
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
1062
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
1148
			case GMFGraphPackage.CUSTOM_FIGURE__BUNDLE_NAME:
Lines 1120-1127 Link Here
1120
		StringBuffer result = new StringBuffer(super.toString());
1206
		StringBuffer result = new StringBuffer(super.toString());
1121
		result.append(" (name: ");
1207
		result.append(" (name: ");
1122
		result.append(name);
1208
		result.append(name);
1123
		result.append(", layoutManager: ");
1124
		result.append(layoutManager);
1125
		result.append(", qualifiedClassName: ");
1209
		result.append(", qualifiedClassName: ");
1126
		result.append(qualifiedClassName);
1210
		result.append(qualifiedClassName);
1127
		result.append(", bundleName: ");
1211
		result.append(", bundleName: ");
(-)src/org/eclipse/gmf/gmfgraph/impl/GMFGraphPackageImpl.java (-11 / +533 lines)
Lines 9-19 Link Here
9
import org.eclipse.emf.ecore.EAttribute;
9
import org.eclipse.emf.ecore.EAttribute;
10
import org.eclipse.emf.ecore.EClass;
10
import org.eclipse.emf.ecore.EClass;
11
import org.eclipse.emf.ecore.EEnum;
11
import org.eclipse.emf.ecore.EEnum;
12
import org.eclipse.emf.ecore.EOperation;
12
import org.eclipse.emf.ecore.EPackage;
13
import org.eclipse.emf.ecore.EPackage;
13
import org.eclipse.emf.ecore.EReference;
14
import org.eclipse.emf.ecore.EReference;
14
import org.eclipse.emf.ecore.impl.EPackageImpl;
15
import org.eclipse.emf.ecore.impl.EPackageImpl;
16
import org.eclipse.gmf.gmfgraph.Alignment;
15
import org.eclipse.gmf.gmfgraph.BasicFont;
17
import org.eclipse.gmf.gmfgraph.BasicFont;
16
import org.eclipse.gmf.gmfgraph.Border;
18
import org.eclipse.gmf.gmfgraph.Border;
19
import org.eclipse.gmf.gmfgraph.BorderLayout;
20
import org.eclipse.gmf.gmfgraph.BorderLayoutData;
17
import org.eclipse.gmf.gmfgraph.Canvas;
21
import org.eclipse.gmf.gmfgraph.Canvas;
18
import org.eclipse.gmf.gmfgraph.Child;
22
import org.eclipse.gmf.gmfgraph.Child;
19
import org.eclipse.gmf.gmfgraph.Color;
23
import org.eclipse.gmf.gmfgraph.Color;
Lines 23-33 Link Here
23
import org.eclipse.gmf.gmfgraph.Connection;
27
import org.eclipse.gmf.gmfgraph.Connection;
24
import org.eclipse.gmf.gmfgraph.ConnectionFigure;
28
import org.eclipse.gmf.gmfgraph.ConnectionFigure;
25
import org.eclipse.gmf.gmfgraph.ConstantColor;
29
import org.eclipse.gmf.gmfgraph.ConstantColor;
30
import org.eclipse.gmf.gmfgraph.CustomAttribute;
26
import org.eclipse.gmf.gmfgraph.CustomBorder;
31
import org.eclipse.gmf.gmfgraph.CustomBorder;
27
import org.eclipse.gmf.gmfgraph.CustomClass;
32
import org.eclipse.gmf.gmfgraph.CustomClass;
33
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
28
import org.eclipse.gmf.gmfgraph.CustomConnection;
34
import org.eclipse.gmf.gmfgraph.CustomConnection;
29
import org.eclipse.gmf.gmfgraph.CustomDecoration;
35
import org.eclipse.gmf.gmfgraph.CustomDecoration;
30
import org.eclipse.gmf.gmfgraph.CustomFigure;
36
import org.eclipse.gmf.gmfgraph.CustomFigure;
37
import org.eclipse.gmf.gmfgraph.CustomLayout;
38
import org.eclipse.gmf.gmfgraph.CustomLayoutData;
31
import org.eclipse.gmf.gmfgraph.DecorationFigure;
39
import org.eclipse.gmf.gmfgraph.DecorationFigure;
32
import org.eclipse.gmf.gmfgraph.DiagramElement;
40
import org.eclipse.gmf.gmfgraph.DiagramElement;
33
import org.eclipse.gmf.gmfgraph.Dimension;
41
import org.eclipse.gmf.gmfgraph.Dimension;
Lines 43-52 Link Here
43
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
51
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
44
import org.eclipse.gmf.gmfgraph.GeneralFacet;
52
import org.eclipse.gmf.gmfgraph.GeneralFacet;
45
import org.eclipse.gmf.gmfgraph.GradientFacet;
53
import org.eclipse.gmf.gmfgraph.GradientFacet;
54
import org.eclipse.gmf.gmfgraph.GridLayout;
55
import org.eclipse.gmf.gmfgraph.GridLayoutData;
46
import org.eclipse.gmf.gmfgraph.Identity;
56
import org.eclipse.gmf.gmfgraph.Identity;
57
import org.eclipse.gmf.gmfgraph.ImplementationAware;
47
import org.eclipse.gmf.gmfgraph.Insets;
58
import org.eclipse.gmf.gmfgraph.Insets;
48
import org.eclipse.gmf.gmfgraph.Label;
59
import org.eclipse.gmf.gmfgraph.Label;
49
import org.eclipse.gmf.gmfgraph.LabeledContainer;
60
import org.eclipse.gmf.gmfgraph.LabeledContainer;
61
import org.eclipse.gmf.gmfgraph.Layout;
62
import org.eclipse.gmf.gmfgraph.LayoutData;
63
import org.eclipse.gmf.gmfgraph.Layoutable;
50
import org.eclipse.gmf.gmfgraph.LineBorder;
64
import org.eclipse.gmf.gmfgraph.LineBorder;
51
import org.eclipse.gmf.gmfgraph.LineKind;
65
import org.eclipse.gmf.gmfgraph.LineKind;
52
import org.eclipse.gmf.gmfgraph.MarginBorder;
66
import org.eclipse.gmf.gmfgraph.MarginBorder;
Lines 383-388 Link Here
383
	 * <!-- end-user-doc -->
397
	 * <!-- end-user-doc -->
384
	 * @generated
398
	 * @generated
385
	 */
399
	 */
400
	private EClass layoutDataEClass = null;
401
402
	/**
403
	 * <!-- begin-user-doc -->
404
	 * <!-- end-user-doc -->
405
	 * @generated
406
	 */
407
	private EClass customLayoutDataEClass = null;
408
409
	/**
410
	 * <!-- begin-user-doc -->
411
	 * <!-- end-user-doc -->
412
	 * @generated
413
	 */
414
	private EClass gridLayoutDataEClass = null;
415
416
	/**
417
	 * <!-- begin-user-doc -->
418
	 * <!-- end-user-doc -->
419
	 * @generated
420
	 */
421
	private EClass borderLayoutDataEClass = null;
422
423
	/**
424
	 * <!-- begin-user-doc -->
425
	 * <!-- end-user-doc -->
426
	 * @generated
427
	 */
428
	private EClass layoutableEClass = null;
429
430
	/**
431
	 * <!-- begin-user-doc -->
432
	 * <!-- end-user-doc -->
433
	 * @generated
434
	 */
435
	private EClass layoutEClass = null;
436
437
	/**
438
	 * <!-- begin-user-doc -->
439
	 * <!-- end-user-doc -->
440
	 * @generated
441
	 */
442
	private EClass customLayoutEClass = null;
443
444
	/**
445
	 * <!-- begin-user-doc -->
446
	 * <!-- end-user-doc -->
447
	 * @generated
448
	 */
449
	private EClass gridLayoutEClass = null;
450
451
	/**
452
	 * <!-- begin-user-doc -->
453
	 * <!-- end-user-doc -->
454
	 * @generated
455
	 */
456
	private EClass borderLayoutEClass = null;
457
458
	/**
459
	 * <!-- begin-user-doc -->
460
	 * <!-- end-user-doc -->
461
	 * @generated
462
	 */
463
	private EClass customConfigurableClassEClass = null;
464
465
	/**
466
	 * <!-- begin-user-doc -->
467
	 * <!-- end-user-doc -->
468
	 * @generated
469
	 */
470
	private EClass customAttributeEClass = null;
471
472
	/**
473
	 * <!-- begin-user-doc -->
474
	 * <!-- end-user-doc -->
475
	 * @generated
476
	 */
386
	private EEnum colorConstantsEEnum = null;
477
	private EEnum colorConstantsEEnum = null;
387
478
388
	/**
479
	/**
Lines 407-412 Link Here
407
	private EEnum lineKindEEnum = null;
498
	private EEnum lineKindEEnum = null;
408
499
409
	/**
500
	/**
501
	 * <!-- begin-user-doc -->
502
	 * <!-- end-user-doc -->
503
	 * @generated
504
	 */
505
	private EEnum alignmentEEnum = null;
506
507
	/**
410
	 * Creates an instance of the model <b>Package</b>, registered with
508
	 * Creates an instance of the model <b>Package</b>, registered with
411
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
509
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
412
	 * package URI value.
510
	 * package URI value.
Lines 848-862 Link Here
848
	 * <!-- end-user-doc -->
946
	 * <!-- end-user-doc -->
849
	 * @generated
947
	 * @generated
850
	 */
948
	 */
851
	public EAttribute getFigure_LayoutManager() {
852
		return (EAttribute)figureEClass.getEStructuralFeatures().get(12);
853
	}
854
855
	/**
856
	 * <!-- begin-user-doc -->
857
	 * <!-- end-user-doc -->
858
	 * @generated
859
	 */
860
	public EClass getFigureRef() {
949
	public EClass getFigureRef() {
861
		return figureRefEClass;
950
		return figureRefEClass;
862
	}
951
	}
Lines 1469-1474 Link Here
1469
	 * <!-- end-user-doc -->
1558
	 * <!-- end-user-doc -->
1470
	 * @generated
1559
	 * @generated
1471
	 */
1560
	 */
1561
	public EClass getLayoutData() {
1562
		return layoutDataEClass;
1563
	}
1564
1565
	/**
1566
	 * <!-- begin-user-doc -->
1567
	 * <!-- end-user-doc -->
1568
	 * @generated
1569
	 */
1570
	public EReference getLayoutData_Owner() {
1571
		return (EReference)layoutDataEClass.getEStructuralFeatures().get(0);
1572
	}
1573
1574
	/**
1575
	 * <!-- begin-user-doc -->
1576
	 * <!-- end-user-doc -->
1577
	 * @generated
1578
	 */
1579
	public EClass getCustomLayoutData() {
1580
		return customLayoutDataEClass;
1581
	}
1582
1583
	/**
1584
	 * <!-- begin-user-doc -->
1585
	 * <!-- end-user-doc -->
1586
	 * @generated
1587
	 */
1588
	public EClass getGridLayoutData() {
1589
		return gridLayoutDataEClass;
1590
	}
1591
1592
	/**
1593
	 * <!-- begin-user-doc -->
1594
	 * <!-- end-user-doc -->
1595
	 * @generated
1596
	 */
1597
	public EAttribute getGridLayoutData_GrabExcessHorizontalSpace() {
1598
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(0);
1599
	}
1600
1601
	/**
1602
	 * <!-- begin-user-doc -->
1603
	 * <!-- end-user-doc -->
1604
	 * @generated
1605
	 */
1606
	public EAttribute getGridLayoutData_GrabExcessVerticalSpace() {
1607
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(1);
1608
	}
1609
1610
	/**
1611
	 * <!-- begin-user-doc -->
1612
	 * <!-- end-user-doc -->
1613
	 * @generated
1614
	 */
1615
	public EAttribute getGridLayoutData_VerticalAlignment() {
1616
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(2);
1617
	}
1618
1619
	/**
1620
	 * <!-- begin-user-doc -->
1621
	 * <!-- end-user-doc -->
1622
	 * @generated
1623
	 */
1624
	public EAttribute getGridLayoutData_HorizontalAlignment() {
1625
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(3);
1626
	}
1627
1628
	/**
1629
	 * <!-- begin-user-doc -->
1630
	 * <!-- end-user-doc -->
1631
	 * @generated
1632
	 */
1633
	public EAttribute getGridLayoutData_VerticalSpan() {
1634
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(4);
1635
	}
1636
1637
	/**
1638
	 * <!-- begin-user-doc -->
1639
	 * <!-- end-user-doc -->
1640
	 * @generated
1641
	 */
1642
	public EAttribute getGridLayoutData_HorizontalSpan() {
1643
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(5);
1644
	}
1645
1646
	/**
1647
	 * <!-- begin-user-doc -->
1648
	 * <!-- end-user-doc -->
1649
	 * @generated
1650
	 */
1651
	public EAttribute getGridLayoutData_HorizontalIndent() {
1652
		return (EAttribute)gridLayoutDataEClass.getEStructuralFeatures().get(6);
1653
	}
1654
1655
	/**
1656
	 * <!-- begin-user-doc -->
1657
	 * <!-- end-user-doc -->
1658
	 * @generated
1659
	 */
1660
	public EReference getGridLayoutData_SizeHint() {
1661
		return (EReference)gridLayoutDataEClass.getEStructuralFeatures().get(7);
1662
	}
1663
1664
	/**
1665
	 * <!-- begin-user-doc -->
1666
	 * <!-- end-user-doc -->
1667
	 * @generated
1668
	 */
1669
	public EClass getBorderLayoutData() {
1670
		return borderLayoutDataEClass;
1671
	}
1672
1673
	/**
1674
	 * <!-- begin-user-doc -->
1675
	 * <!-- end-user-doc -->
1676
	 * @generated
1677
	 */
1678
	public EAttribute getBorderLayoutData_Alignment() {
1679
		return (EAttribute)borderLayoutDataEClass.getEStructuralFeatures().get(0);
1680
	}
1681
1682
	/**
1683
	 * <!-- begin-user-doc -->
1684
	 * <!-- end-user-doc -->
1685
	 * @generated
1686
	 */
1687
	public EAttribute getBorderLayoutData_Vertical() {
1688
		return (EAttribute)borderLayoutDataEClass.getEStructuralFeatures().get(1);
1689
	}
1690
1691
	/**
1692
	 * <!-- begin-user-doc -->
1693
	 * <!-- end-user-doc -->
1694
	 * @generated
1695
	 */
1696
	public EClass getLayoutable() {
1697
		return layoutableEClass;
1698
	}
1699
1700
	/**
1701
	 * <!-- begin-user-doc -->
1702
	 * <!-- end-user-doc -->
1703
	 * @generated
1704
	 */
1705
	public EReference getLayoutable_Data() {
1706
		return (EReference)layoutableEClass.getEStructuralFeatures().get(0);
1707
	}
1708
1709
	/**
1710
	 * <!-- begin-user-doc -->
1711
	 * <!-- end-user-doc -->
1712
	 * @generated
1713
	 */
1714
	public EReference getLayoutable_Layout() {
1715
		return (EReference)layoutableEClass.getEStructuralFeatures().get(1);
1716
	}
1717
1718
	/**
1719
	 * <!-- begin-user-doc -->
1720
	 * <!-- end-user-doc -->
1721
	 * @generated
1722
	 */
1723
	public EClass getLayout() {
1724
		return layoutEClass;
1725
	}
1726
1727
	/**
1728
	 * <!-- begin-user-doc -->
1729
	 * <!-- end-user-doc -->
1730
	 * @generated
1731
	 */
1732
	public EClass getCustomLayout() {
1733
		return customLayoutEClass;
1734
	}
1735
1736
	/**
1737
	 * <!-- begin-user-doc -->
1738
	 * <!-- end-user-doc -->
1739
	 * @generated
1740
	 */
1741
	public EClass getGridLayout() {
1742
		return gridLayoutEClass;
1743
	}
1744
1745
	/**
1746
	 * <!-- begin-user-doc -->
1747
	 * <!-- end-user-doc -->
1748
	 * @generated
1749
	 */
1750
	public EAttribute getGridLayout_NumColumns() {
1751
		return (EAttribute)gridLayoutEClass.getEStructuralFeatures().get(0);
1752
	}
1753
1754
	/**
1755
	 * <!-- begin-user-doc -->
1756
	 * <!-- end-user-doc -->
1757
	 * @generated
1758
	 */
1759
	public EAttribute getGridLayout_EqualWidth() {
1760
		return (EAttribute)gridLayoutEClass.getEStructuralFeatures().get(1);
1761
	}
1762
1763
	/**
1764
	 * <!-- begin-user-doc -->
1765
	 * <!-- end-user-doc -->
1766
	 * @generated
1767
	 */
1768
	public EReference getGridLayout_Margins() {
1769
		return (EReference)gridLayoutEClass.getEStructuralFeatures().get(2);
1770
	}
1771
1772
	/**
1773
	 * <!-- begin-user-doc -->
1774
	 * <!-- end-user-doc -->
1775
	 * @generated
1776
	 */
1777
	public EReference getGridLayout_Spacing() {
1778
		return (EReference)gridLayoutEClass.getEStructuralFeatures().get(3);
1779
	}
1780
1781
	/**
1782
	 * <!-- begin-user-doc -->
1783
	 * <!-- end-user-doc -->
1784
	 * @generated
1785
	 */
1786
	public EClass getBorderLayout() {
1787
		return borderLayoutEClass;
1788
	}
1789
1790
	/**
1791
	 * <!-- begin-user-doc -->
1792
	 * <!-- end-user-doc -->
1793
	 * @generated
1794
	 */
1795
	public EReference getBorderLayout_Spacing() {
1796
		return (EReference)borderLayoutEClass.getEStructuralFeatures().get(0);
1797
	}
1798
1799
	/**
1800
	 * <!-- begin-user-doc -->
1801
	 * <!-- end-user-doc -->
1802
	 * @generated
1803
	 */
1804
	public EClass getCustomConfigurableClass() {
1805
		return customConfigurableClassEClass;
1806
	}
1807
1808
	/**
1809
	 * <!-- begin-user-doc -->
1810
	 * <!-- end-user-doc -->
1811
	 * @generated
1812
	 */
1813
	public EReference getCustomConfigurableClass_Attributes() {
1814
		return (EReference)customConfigurableClassEClass.getEStructuralFeatures().get(0);
1815
	}
1816
1817
	/**
1818
	 * <!-- begin-user-doc -->
1819
	 * <!-- end-user-doc -->
1820
	 * @generated
1821
	 */
1822
	public EClass getCustomAttribute() {
1823
		return customAttributeEClass;
1824
	}
1825
1826
	/**
1827
	 * <!-- begin-user-doc -->
1828
	 * <!-- end-user-doc -->
1829
	 * @generated
1830
	 */
1831
	public EAttribute getCustomAttribute_Name() {
1832
		return (EAttribute)customAttributeEClass.getEStructuralFeatures().get(0);
1833
	}
1834
1835
	/**
1836
	 * <!-- begin-user-doc -->
1837
	 * <!-- end-user-doc -->
1838
	 * @generated
1839
	 */
1840
	public EAttribute getCustomAttribute_Type() {
1841
		return (EAttribute)customAttributeEClass.getEStructuralFeatures().get(1);
1842
	}
1843
1844
	/**
1845
	 * <!-- begin-user-doc -->
1846
	 * <!-- end-user-doc -->
1847
	 * @generated
1848
	 */
1849
	public EAttribute getCustomAttribute_Value() {
1850
		return (EAttribute)customAttributeEClass.getEStructuralFeatures().get(2);
1851
	}
1852
1853
	/**
1854
	 * <!-- begin-user-doc -->
1855
	 * <!-- end-user-doc -->
1856
	 * @generated
1857
	 */
1858
	public EAttribute getCustomAttribute_DirectAccess() {
1859
		return (EAttribute)customAttributeEClass.getEStructuralFeatures().get(3);
1860
	}
1861
1862
	/**
1863
	 * <!-- begin-user-doc -->
1864
	 * <!-- end-user-doc -->
1865
	 * @generated
1866
	 */
1867
	public EAttribute getCustomAttribute_MultiStatementValue() {
1868
		return (EAttribute)customAttributeEClass.getEStructuralFeatures().get(4);
1869
	}
1870
1871
	/**
1872
	 * <!-- begin-user-doc -->
1873
	 * <!-- end-user-doc -->
1874
	 * @generated
1875
	 */
1472
	public EEnum getColorConstants() {
1876
	public EEnum getColorConstants() {
1473
		return colorConstantsEEnum;
1877
		return colorConstantsEEnum;
1474
	}
1878
	}
Lines 1496-1501 Link Here
1496
	 * <!-- end-user-doc -->
1900
	 * <!-- end-user-doc -->
1497
	 * @generated
1901
	 * @generated
1498
	 */
1902
	 */
1903
	public EEnum getAlignment() {
1904
		return alignmentEEnum;
1905
	}
1906
1907
	/**
1908
	 * <!-- begin-user-doc -->
1909
	 * <!-- end-user-doc -->
1910
	 * @generated
1911
	 */
1499
	public GMFGraphFactory getGMFGraphFactory() {
1912
	public GMFGraphFactory getGMFGraphFactory() {
1500
		return (GMFGraphFactory)getEFactoryInstance();
1913
		return (GMFGraphFactory)getEFactoryInstance();
1501
	}
1914
	}
Lines 1572-1578 Link Here
1572
		createEReference(figureEClass, FIGURE__BORDER);
1985
		createEReference(figureEClass, FIGURE__BORDER);
1573
		createEReference(figureEClass, FIGURE__LOCATION);
1986
		createEReference(figureEClass, FIGURE__LOCATION);
1574
		createEReference(figureEClass, FIGURE__SIZE);
1987
		createEReference(figureEClass, FIGURE__SIZE);
1575
		createEAttribute(figureEClass, FIGURE__LAYOUT_MANAGER);
1576
1988
1577
		figureRefEClass = createEClass(FIGURE_REF);
1989
		figureRefEClass = createEClass(FIGURE_REF);
1578
		createEReference(figureRefEClass, FIGURE_REF__FIGURE);
1990
		createEReference(figureRefEClass, FIGURE_REF__FIGURE);
Lines 1672-1682 Link Here
1672
2084
1673
		customBorderEClass = createEClass(CUSTOM_BORDER);
2085
		customBorderEClass = createEClass(CUSTOM_BORDER);
1674
2086
2087
		layoutDataEClass = createEClass(LAYOUT_DATA);
2088
		createEReference(layoutDataEClass, LAYOUT_DATA__OWNER);
2089
2090
		customLayoutDataEClass = createEClass(CUSTOM_LAYOUT_DATA);
2091
2092
		gridLayoutDataEClass = createEClass(GRID_LAYOUT_DATA);
2093
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE);
2094
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE);
2095
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT);
2096
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT);
2097
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__VERTICAL_SPAN);
2098
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__HORIZONTAL_SPAN);
2099
		createEAttribute(gridLayoutDataEClass, GRID_LAYOUT_DATA__HORIZONTAL_INDENT);
2100
		createEReference(gridLayoutDataEClass, GRID_LAYOUT_DATA__SIZE_HINT);
2101
2102
		borderLayoutDataEClass = createEClass(BORDER_LAYOUT_DATA);
2103
		createEAttribute(borderLayoutDataEClass, BORDER_LAYOUT_DATA__ALIGNMENT);
2104
		createEAttribute(borderLayoutDataEClass, BORDER_LAYOUT_DATA__VERTICAL);
2105
2106
		layoutableEClass = createEClass(LAYOUTABLE);
2107
		createEReference(layoutableEClass, LAYOUTABLE__DATA);
2108
		createEReference(layoutableEClass, LAYOUTABLE__LAYOUT);
2109
2110
		layoutEClass = createEClass(LAYOUT);
2111
2112
		customLayoutEClass = createEClass(CUSTOM_LAYOUT);
2113
2114
		gridLayoutEClass = createEClass(GRID_LAYOUT);
2115
		createEAttribute(gridLayoutEClass, GRID_LAYOUT__NUM_COLUMNS);
2116
		createEAttribute(gridLayoutEClass, GRID_LAYOUT__EQUAL_WIDTH);
2117
		createEReference(gridLayoutEClass, GRID_LAYOUT__MARGINS);
2118
		createEReference(gridLayoutEClass, GRID_LAYOUT__SPACING);
2119
2120
		borderLayoutEClass = createEClass(BORDER_LAYOUT);
2121
		createEReference(borderLayoutEClass, BORDER_LAYOUT__SPACING);
2122
2123
		customConfigurableClassEClass = createEClass(CUSTOM_CONFIGURABLE_CLASS);
2124
		createEReference(customConfigurableClassEClass, CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES);
2125
2126
		customAttributeEClass = createEClass(CUSTOM_ATTRIBUTE);
2127
		createEAttribute(customAttributeEClass, CUSTOM_ATTRIBUTE__NAME);
2128
		createEAttribute(customAttributeEClass, CUSTOM_ATTRIBUTE__TYPE);
2129
		createEAttribute(customAttributeEClass, CUSTOM_ATTRIBUTE__VALUE);
2130
		createEAttribute(customAttributeEClass, CUSTOM_ATTRIBUTE__DIRECT_ACCESS);
2131
		createEAttribute(customAttributeEClass, CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE);
2132
1675
		// Create enums
2133
		// Create enums
1676
		colorConstantsEEnum = createEEnum(COLOR_CONSTANTS);
2134
		colorConstantsEEnum = createEEnum(COLOR_CONSTANTS);
1677
		fontStyleEEnum = createEEnum(FONT_STYLE);
2135
		fontStyleEEnum = createEEnum(FONT_STYLE);
1678
		directionEEnum = createEEnum(DIRECTION);
2136
		directionEEnum = createEEnum(DIRECTION);
1679
		lineKindEEnum = createEEnum(LINE_KIND);
2137
		lineKindEEnum = createEEnum(LINE_KIND);
2138
		alignmentEEnum = createEEnum(ALIGNMENT);
1680
	}
2139
	}
1681
2140
1682
	/**
2141
	/**
Lines 1712-1717 Link Here
1712
		childEClass.getESuperTypes().add(this.getDiagramElement());
2171
		childEClass.getESuperTypes().add(this.getDiagramElement());
1713
		generalFacetEClass.getESuperTypes().add(this.getVisualFacet());
2172
		generalFacetEClass.getESuperTypes().add(this.getVisualFacet());
1714
		gradientFacetEClass.getESuperTypes().add(this.getVisualFacet());
2173
		gradientFacetEClass.getESuperTypes().add(this.getVisualFacet());
2174
		figureMarkerEClass.getESuperTypes().add(this.getLayoutable());
1715
		figureEClass.getESuperTypes().add(this.getFigureMarker());
2175
		figureEClass.getESuperTypes().add(this.getFigureMarker());
1716
		figureEClass.getESuperTypes().add(this.getIdentity());
2176
		figureEClass.getESuperTypes().add(this.getIdentity());
1717
		figureRefEClass.getESuperTypes().add(this.getFigureMarker());
2177
		figureRefEClass.getESuperTypes().add(this.getFigureMarker());
Lines 1744-1749 Link Here
1744
		compoundBorderEClass.getESuperTypes().add(this.getBorder());
2204
		compoundBorderEClass.getESuperTypes().add(this.getBorder());
1745
		customBorderEClass.getESuperTypes().add(this.getBorder());
2205
		customBorderEClass.getESuperTypes().add(this.getBorder());
1746
		customBorderEClass.getESuperTypes().add(this.getCustomClass());
2206
		customBorderEClass.getESuperTypes().add(this.getCustomClass());
2207
		layoutDataEClass.getESuperTypes().add(this.getCustomClass());
2208
		customLayoutDataEClass.getESuperTypes().add(this.getLayout());
2209
		customLayoutDataEClass.getESuperTypes().add(this.getCustomConfigurableClass());
2210
		gridLayoutDataEClass.getESuperTypes().add(this.getLayoutData());
2211
		borderLayoutDataEClass.getESuperTypes().add(this.getLayoutData());
2212
		layoutEClass.getESuperTypes().add(this.getCustomClass());
2213
		customLayoutEClass.getESuperTypes().add(this.getLayout());
2214
		customLayoutEClass.getESuperTypes().add(this.getCustomConfigurableClass());
2215
		gridLayoutEClass.getESuperTypes().add(this.getLayout());
2216
		borderLayoutEClass.getESuperTypes().add(this.getLayout());
2217
		customConfigurableClassEClass.getESuperTypes().add(this.getCustomClass());
1747
2218
1748
		// Initialize classes and features; add operations and parameters
2219
		// Initialize classes and features; add operations and parameters
1749
		initEClass(canvasEClass, Canvas.class, "Canvas", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2220
		initEClass(canvasEClass, Canvas.class, "Canvas", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
Lines 1799-1805 Link Here
1799
		initEReference(getFigure_Border(), this.getBorder(), null, "border", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2270
		initEReference(getFigure_Border(), this.getBorder(), null, "border", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1800
		initEReference(getFigure_Location(), this.getPoint(), null, "location", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2271
		initEReference(getFigure_Location(), this.getPoint(), null, "location", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1801
		initEReference(getFigure_Size(), this.getPoint(), null, "size", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2272
		initEReference(getFigure_Size(), this.getPoint(), null, "size", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1802
		initEAttribute(getFigure_LayoutManager(), ecorePackage.getEString(), "layoutManager", null, 0, 1, Figure.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1803
2273
1804
		initEClass(figureRefEClass, FigureRef.class, "FigureRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2274
		initEClass(figureRefEClass, FigureRef.class, "FigureRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
1805
		initEReference(getFigureRef_Figure(), this.getFigure(), null, "figure", null, 1, 1, FigureRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2275
		initEReference(getFigureRef_Figure(), this.getFigure(), null, "figure", null, 1, 1, FigureRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
Lines 1899-1904 Link Here
1899
2369
1900
		initEClass(customBorderEClass, CustomBorder.class, "CustomBorder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2370
		initEClass(customBorderEClass, CustomBorder.class, "CustomBorder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
1901
2371
2372
		initEClass(layoutDataEClass, LayoutData.class, "LayoutData", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2373
		initEReference(getLayoutData_Owner(), this.getLayoutable(), this.getLayoutable_Data(), "owner", null, 1, 1, LayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2374
2375
		initEClass(customLayoutDataEClass, CustomLayoutData.class, "CustomLayoutData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2376
2377
		initEClass(gridLayoutDataEClass, GridLayoutData.class, "GridLayoutData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2378
		initEAttribute(getGridLayoutData_GrabExcessHorizontalSpace(), ecorePackage.getEBoolean(), "grabExcessHorizontalSpace", "false", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2379
		initEAttribute(getGridLayoutData_GrabExcessVerticalSpace(), ecorePackage.getEBoolean(), "grabExcessVerticalSpace", "false", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2380
		initEAttribute(getGridLayoutData_VerticalAlignment(), this.getAlignment(), "verticalAlignment", "CENTER", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2381
		initEAttribute(getGridLayoutData_HorizontalAlignment(), this.getAlignment(), "horizontalAlignment", "CENTER", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2382
		initEAttribute(getGridLayoutData_VerticalSpan(), ecorePackage.getEInt(), "verticalSpan", "1", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2383
		initEAttribute(getGridLayoutData_HorizontalSpan(), ecorePackage.getEInt(), "horizontalSpan", "1", 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2384
		initEAttribute(getGridLayoutData_HorizontalIndent(), ecorePackage.getEInt(), "horizontalIndent", null, 1, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2385
		initEReference(getGridLayoutData_SizeHint(), this.getDimension(), null, "sizeHint", null, 0, 1, GridLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2386
2387
		initEClass(borderLayoutDataEClass, BorderLayoutData.class, "BorderLayoutData", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2388
		initEAttribute(getBorderLayoutData_Alignment(), this.getAlignment(), "alignment", "CENTER", 1, 1, BorderLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2389
		initEAttribute(getBorderLayoutData_Vertical(), ecorePackage.getEBoolean(), "vertical", "false", 0, 1, BorderLayoutData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2390
2391
		initEClass(layoutableEClass, Layoutable.class, "Layoutable", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2392
		initEReference(getLayoutable_Data(), this.getLayoutData(), this.getLayoutData_Owner(), "data", null, 0, 1, Layoutable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2393
		initEReference(getLayoutable_Layout(), this.getLayout(), null, "layout", null, 0, 1, Layoutable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2394
2395
		initEClass(layoutEClass, Layout.class, "Layout", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2396
2397
		initEClass(customLayoutEClass, CustomLayout.class, "CustomLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2398
2399
		initEClass(gridLayoutEClass, GridLayout.class, "GridLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2400
		initEAttribute(getGridLayout_NumColumns(), ecorePackage.getEInt(), "numColumns", "1", 1, 1, GridLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2401
		initEAttribute(getGridLayout_EqualWidth(), ecorePackage.getEBoolean(), "equalWidth", "true", 1, 1, GridLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2402
		initEReference(getGridLayout_Margins(), this.getDimension(), null, "margins", null, 0, 1, GridLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2403
		initEReference(getGridLayout_Spacing(), this.getDimension(), null, "spacing", null, 0, 1, GridLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2404
2405
		initEClass(borderLayoutEClass, BorderLayout.class, "BorderLayout", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2406
		initEReference(getBorderLayout_Spacing(), this.getDimension(), null, "spacing", null, 0, 1, BorderLayout.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2407
2408
		initEClass(customConfigurableClassEClass, CustomConfigurableClass.class, "CustomConfigurableClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2409
		initEReference(getCustomConfigurableClass_Attributes(), this.getCustomAttribute(), null, "attributes", null, 0, -1, CustomConfigurableClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2410
2411
		initEClass(customAttributeEClass, CustomAttribute.class, "CustomAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
2412
		initEAttribute(getCustomAttribute_Name(), ecorePackage.getEString(), "name", null, 1, 1, CustomAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2413
		initEAttribute(getCustomAttribute_Type(), ecorePackage.getEString(), "type", "Object", 1, 1, CustomAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2414
		initEAttribute(getCustomAttribute_Value(), ecorePackage.getEString(), "value", "null", 1, 1, CustomAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2415
		initEAttribute(getCustomAttribute_DirectAccess(), ecorePackage.getEBoolean(), "directAccess", "false", 1, 1, CustomAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2416
		initEAttribute(getCustomAttribute_MultiStatementValue(), ecorePackage.getEBoolean(), "multiStatementValue", "false", 1, 1, CustomAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
2417
1902
		// Initialize enums and add enum literals
2418
		// Initialize enums and add enum literals
1903
		initEEnum(colorConstantsEEnum, ColorConstants.class, "ColorConstants");
2419
		initEEnum(colorConstantsEEnum, ColorConstants.class, "ColorConstants");
1904
		addEEnumLiteral(colorConstantsEEnum, ColorConstants.WHITE_LITERAL);
2420
		addEEnumLiteral(colorConstantsEEnum, ColorConstants.WHITE_LITERAL);
Lines 1943-1948 Link Here
1943
		addEEnumLiteral(lineKindEEnum, LineKind.LINE_DASHDOTDOT_LITERAL);
2459
		addEEnumLiteral(lineKindEEnum, LineKind.LINE_DASHDOTDOT_LITERAL);
1944
		addEEnumLiteral(lineKindEEnum, LineKind.LINE_CUSTOM_LITERAL);
2460
		addEEnumLiteral(lineKindEEnum, LineKind.LINE_CUSTOM_LITERAL);
1945
2461
2462
		initEEnum(alignmentEEnum, Alignment.class, "Alignment");
2463
		addEEnumLiteral(alignmentEEnum, Alignment.BEGINNING_LITERAL);
2464
		addEEnumLiteral(alignmentEEnum, Alignment.CENTER_LITERAL);
2465
		addEEnumLiteral(alignmentEEnum, Alignment.END_LITERAL);
2466
		addEEnumLiteral(alignmentEEnum, Alignment.FILL_LITERAL);
2467
1946
		// Create resource
2468
		// Create resource
1947
		createResource(eNS_URI);
2469
		createResource(eNS_URI);
1948
	}
2470
	}
(-)src/org/eclipse/gmf/gmfgraph/impl/LabelImpl.java (-52 / +136 lines)
Lines 27-32 Link Here
27
import org.eclipse.gmf.gmfgraph.Identity;
27
import org.eclipse.gmf.gmfgraph.Identity;
28
import org.eclipse.gmf.gmfgraph.Insets;
28
import org.eclipse.gmf.gmfgraph.Insets;
29
import org.eclipse.gmf.gmfgraph.Label;
29
import org.eclipse.gmf.gmfgraph.Label;
30
import org.eclipse.gmf.gmfgraph.Layout;
31
import org.eclipse.gmf.gmfgraph.LayoutData;
30
import org.eclipse.gmf.gmfgraph.Point;
32
import org.eclipse.gmf.gmfgraph.Point;
31
33
32
/**
34
/**
Lines 36-41 Link Here
36
 * <p>
38
 * <p>
37
 * The following features are implemented:
39
 * The following features are implemented:
38
 * <ul>
40
 * <ul>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getData <em>Data</em>}</li>
42
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getLayout <em>Layout</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getName <em>Name</em>}</li>
43
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getName <em>Name</em>}</li>
40
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getChildren <em>Children</em>}</li>
44
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getChildren <em>Children</em>}</li>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getParent <em>Parent</em>}</li>
45
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getParent <em>Parent</em>}</li>
Lines 49-55 Link Here
49
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getBorder <em>Border</em>}</li>
53
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getBorder <em>Border</em>}</li>
50
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getLocation <em>Location</em>}</li>
54
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getLocation <em>Location</em>}</li>
51
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getSize <em>Size</em>}</li>
55
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getSize <em>Size</em>}</li>
52
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getLayoutManager <em>Layout Manager</em>}</li>
53
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getText <em>Text</em>}</li>
56
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LabelImpl#getText <em>Text</em>}</li>
54
 * </ul>
57
 * </ul>
55
 * </p>
58
 * </p>
Lines 58-63 Link Here
58
 */
61
 */
59
public class LabelImpl extends EObjectImpl implements Label {
62
public class LabelImpl extends EObjectImpl implements Label {
60
	/**
63
	/**
64
	 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference.
65
	 * <!-- begin-user-doc -->
66
	 * <!-- end-user-doc -->
67
	 * @see #getData()
68
	 * @generated
69
	 * @ordered
70
	 */
71
	protected LayoutData data = null;
72
73
	/**
74
	 * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
75
	 * <!-- begin-user-doc -->
76
	 * <!-- end-user-doc -->
77
	 * @see #getLayout()
78
	 * @generated
79
	 * @ordered
80
	 */
81
	protected Layout layout = null;
82
83
	/**
61
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
84
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
62
	 * <!-- begin-user-doc -->
85
	 * <!-- begin-user-doc -->
63
	 * <!-- end-user-doc -->
86
	 * <!-- end-user-doc -->
Lines 188-239 Link Here
188
	protected Point size = null;
211
	protected Point size = null;
189
212
190
	/**
213
	/**
191
	 * The default value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
214
	 * The default value of the '{@link #getText() <em>Text</em>}' attribute.
192
	 * <!-- begin-user-doc -->
215
	 * <!-- begin-user-doc -->
193
	 * <!-- end-user-doc -->
216
	 * <!-- end-user-doc -->
194
	 * @see #getLayoutManager()
217
	 * @see #getText()
195
	 * @generated
218
	 * @generated
196
	 * @ordered
219
	 * @ordered
197
	 */
220
	 */
198
	protected static final String LAYOUT_MANAGER_EDEFAULT = null;
221
	protected static final String TEXT_EDEFAULT = null;
199
222
200
	/**
223
	/**
201
	 * The cached value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
224
	 * The cached value of the '{@link #getText() <em>Text</em>}' attribute.
202
	 * <!-- begin-user-doc -->
225
	 * <!-- begin-user-doc -->
203
	 * <!-- end-user-doc -->
226
	 * <!-- end-user-doc -->
204
	 * @see #getLayoutManager()
227
	 * @see #getText()
205
	 * @generated
228
	 * @generated
206
	 * @ordered
229
	 * @ordered
207
	 */
230
	 */
208
	protected String layoutManager = LAYOUT_MANAGER_EDEFAULT;
231
	protected String text = TEXT_EDEFAULT;
209
232
210
	/**
233
	/**
211
	 * The default value of the '{@link #getText() <em>Text</em>}' attribute.
212
	 * <!-- begin-user-doc -->
234
	 * <!-- begin-user-doc -->
213
	 * <!-- end-user-doc -->
235
	 * <!-- end-user-doc -->
214
	 * @see #getText()
215
	 * @generated
236
	 * @generated
216
	 * @ordered
217
	 */
237
	 */
218
	protected static final String TEXT_EDEFAULT = null;
238
	protected LabelImpl() {
239
		super();
240
	}
219
241
220
	/**
242
	/**
221
	 * The cached value of the '{@link #getText() <em>Text</em>}' attribute.
222
	 * <!-- begin-user-doc -->
243
	 * <!-- begin-user-doc -->
223
	 * <!-- end-user-doc -->
244
	 * <!-- end-user-doc -->
224
	 * @see #getText()
225
	 * @generated
245
	 * @generated
226
	 * @ordered
227
	 */
246
	 */
228
	protected String text = TEXT_EDEFAULT;
247
	protected EClass eStaticClass() {
248
		return GMFGraphPackage.eINSTANCE.getLabel();
249
	}
229
250
230
	/**
251
	/**
231
	 * <!-- begin-user-doc -->
252
	 * <!-- begin-user-doc -->
232
	 * <!-- end-user-doc -->
253
	 * <!-- end-user-doc -->
233
	 * @generated
254
	 * @generated
234
	 */
255
	 */
235
	protected LabelImpl() {
256
	public LayoutData getData() {
236
		super();
257
		return data;
237
	}
258
	}
238
259
239
	/**
260
	/**
Lines 241-248 Link Here
241
	 * <!-- end-user-doc -->
262
	 * <!-- end-user-doc -->
242
	 * @generated
263
	 * @generated
243
	 */
264
	 */
244
	protected EClass eStaticClass() {
265
	public NotificationChain basicSetData(LayoutData newData, NotificationChain msgs) {
245
		return GMFGraphPackage.eINSTANCE.getLabel();
266
		LayoutData oldData = data;
267
		data = newData;
268
		if (eNotificationRequired()) {
269
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABEL__DATA, oldData, newData);
270
			if (msgs == null) msgs = notification; else msgs.add(notification);
271
		}
272
		return msgs;
273
	}
274
275
	/**
276
	 * <!-- begin-user-doc -->
277
	 * <!-- end-user-doc -->
278
	 * @generated
279
	 */
280
	public void setData(LayoutData newData) {
281
		if (newData != data) {
282
			NotificationChain msgs = null;
283
			if (data != null)
284
				msgs = ((InternalEObject)data).eInverseRemove(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
285
			if (newData != null)
286
				msgs = ((InternalEObject)newData).eInverseAdd(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
287
			msgs = basicSetData(newData, msgs);
288
			if (msgs != null) msgs.dispatch();
289
		}
290
		else if (eNotificationRequired())
291
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABEL__DATA, newData, newData));
292
	}
293
294
	/**
295
	 * <!-- begin-user-doc -->
296
	 * <!-- end-user-doc -->
297
	 * @generated
298
	 */
299
	public Layout getLayout() {
300
		return layout;
301
	}
302
303
	/**
304
	 * <!-- begin-user-doc -->
305
	 * <!-- end-user-doc -->
306
	 * @generated
307
	 */
308
	public NotificationChain basicSetLayout(Layout newLayout, NotificationChain msgs) {
309
		Layout oldLayout = layout;
310
		layout = newLayout;
311
		if (eNotificationRequired()) {
312
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABEL__LAYOUT, oldLayout, newLayout);
313
			if (msgs == null) msgs = notification; else msgs.add(notification);
314
		}
315
		return msgs;
316
	}
317
318
	/**
319
	 * <!-- begin-user-doc -->
320
	 * <!-- end-user-doc -->
321
	 * @generated
322
	 */
323
	public void setLayout(Layout newLayout) {
324
		if (newLayout != layout) {
325
			NotificationChain msgs = null;
326
			if (layout != null)
327
				msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABEL__LAYOUT, null, msgs);
328
			if (newLayout != null)
329
				msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABEL__LAYOUT, null, msgs);
330
			msgs = basicSetLayout(newLayout, msgs);
331
			if (msgs != null) msgs.dispatch();
332
		}
333
		else if (eNotificationRequired())
334
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABEL__LAYOUT, newLayout, newLayout));
246
	}
335
	}
247
336
248
	/**
337
	/**
Lines 723-749 Link Here
723
	 * <!-- end-user-doc -->
812
	 * <!-- end-user-doc -->
724
	 * @generated
813
	 * @generated
725
	 */
814
	 */
726
	public String getLayoutManager() {
727
		return layoutManager;
728
	}
729
730
	/**
731
	 * <!-- begin-user-doc -->
732
	 * <!-- end-user-doc -->
733
	 * @generated
734
	 */
735
	public void setLayoutManager(String newLayoutManager) {
736
		String oldLayoutManager = layoutManager;
737
		layoutManager = newLayoutManager;
738
		if (eNotificationRequired())
739
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LABEL__LAYOUT_MANAGER, oldLayoutManager, layoutManager));
740
	}
741
742
	/**
743
	 * <!-- begin-user-doc -->
744
	 * <!-- end-user-doc -->
745
	 * @generated
746
	 */
747
	public String getText() {
815
	public String getText() {
748
		return text;
816
		return text;
749
	}
817
	}
Lines 767-772 Link Here
767
	 */
835
	 */
768
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
836
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
769
		switch (featureID) {
837
		switch (featureID) {
838
			case GMFGraphPackage.LABEL__DATA:
839
				if (data != null)
840
					msgs = ((InternalEObject)data).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.LABEL__DATA, null, msgs);
841
				return basicSetData((LayoutData)otherEnd, msgs);
770
			case GMFGraphPackage.LABEL__PARENT:
842
			case GMFGraphPackage.LABEL__PARENT:
771
				if (eInternalContainer() != null)
843
				if (eInternalContainer() != null)
772
					msgs = eBasicRemoveFromContainer(msgs);
844
					msgs = eBasicRemoveFromContainer(msgs);
Lines 782-787 Link Here
782
	 */
854
	 */
783
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
855
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
784
		switch (featureID) {
856
		switch (featureID) {
857
			case GMFGraphPackage.LABEL__DATA:
858
				return basicSetData(null, msgs);
859
			case GMFGraphPackage.LABEL__LAYOUT:
860
				return basicSetLayout(null, msgs);
785
			case GMFGraphPackage.LABEL__CHILDREN:
861
			case GMFGraphPackage.LABEL__CHILDREN:
786
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
862
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
787
			case GMFGraphPackage.LABEL__PARENT:
863
			case GMFGraphPackage.LABEL__PARENT:
Lines 830-835 Link Here
830
	 */
906
	 */
831
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
907
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
832
		switch (featureID) {
908
		switch (featureID) {
909
			case GMFGraphPackage.LABEL__DATA:
910
				return getData();
911
			case GMFGraphPackage.LABEL__LAYOUT:
912
				return getLayout();
833
			case GMFGraphPackage.LABEL__NAME:
913
			case GMFGraphPackage.LABEL__NAME:
834
				return getName();
914
				return getName();
835
			case GMFGraphPackage.LABEL__CHILDREN:
915
			case GMFGraphPackage.LABEL__CHILDREN:
Lines 856-863 Link Here
856
				return getLocation();
936
				return getLocation();
857
			case GMFGraphPackage.LABEL__SIZE:
937
			case GMFGraphPackage.LABEL__SIZE:
858
				return getSize();
938
				return getSize();
859
			case GMFGraphPackage.LABEL__LAYOUT_MANAGER:
860
				return getLayoutManager();
861
			case GMFGraphPackage.LABEL__TEXT:
939
			case GMFGraphPackage.LABEL__TEXT:
862
				return getText();
940
				return getText();
863
		}
941
		}
Lines 871-876 Link Here
871
	 */
949
	 */
872
	public void eSet(int featureID, Object newValue) {
950
	public void eSet(int featureID, Object newValue) {
873
		switch (featureID) {
951
		switch (featureID) {
952
			case GMFGraphPackage.LABEL__DATA:
953
				setData((LayoutData)newValue);
954
				return;
955
			case GMFGraphPackage.LABEL__LAYOUT:
956
				setLayout((Layout)newValue);
957
				return;
874
			case GMFGraphPackage.LABEL__NAME:
958
			case GMFGraphPackage.LABEL__NAME:
875
				setName((String)newValue);
959
				setName((String)newValue);
876
				return;
960
				return;
Lines 908-916 Link Here
908
			case GMFGraphPackage.LABEL__SIZE:
992
			case GMFGraphPackage.LABEL__SIZE:
909
				setSize((Point)newValue);
993
				setSize((Point)newValue);
910
				return;
994
				return;
911
			case GMFGraphPackage.LABEL__LAYOUT_MANAGER:
912
				setLayoutManager((String)newValue);
913
				return;
914
			case GMFGraphPackage.LABEL__TEXT:
995
			case GMFGraphPackage.LABEL__TEXT:
915
				setText((String)newValue);
996
				setText((String)newValue);
916
				return;
997
				return;
Lines 925-930 Link Here
925
	 */
1006
	 */
926
	public void eUnset(int featureID) {
1007
	public void eUnset(int featureID) {
927
		switch (featureID) {
1008
		switch (featureID) {
1009
			case GMFGraphPackage.LABEL__DATA:
1010
				setData((LayoutData)null);
1011
				return;
1012
			case GMFGraphPackage.LABEL__LAYOUT:
1013
				setLayout((Layout)null);
1014
				return;
928
			case GMFGraphPackage.LABEL__NAME:
1015
			case GMFGraphPackage.LABEL__NAME:
929
				setName(NAME_EDEFAULT);
1016
				setName(NAME_EDEFAULT);
930
				return;
1017
				return;
Lines 961-969 Link Here
961
			case GMFGraphPackage.LABEL__SIZE:
1048
			case GMFGraphPackage.LABEL__SIZE:
962
				setSize((Point)null);
1049
				setSize((Point)null);
963
				return;
1050
				return;
964
			case GMFGraphPackage.LABEL__LAYOUT_MANAGER:
965
				setLayoutManager(LAYOUT_MANAGER_EDEFAULT);
966
				return;
967
			case GMFGraphPackage.LABEL__TEXT:
1051
			case GMFGraphPackage.LABEL__TEXT:
968
				setText(TEXT_EDEFAULT);
1052
				setText(TEXT_EDEFAULT);
969
				return;
1053
				return;
Lines 978-983 Link Here
978
	 */
1062
	 */
979
	public boolean eIsSet(int featureID) {
1063
	public boolean eIsSet(int featureID) {
980
		switch (featureID) {
1064
		switch (featureID) {
1065
			case GMFGraphPackage.LABEL__DATA:
1066
				return data != null;
1067
			case GMFGraphPackage.LABEL__LAYOUT:
1068
				return layout != null;
981
			case GMFGraphPackage.LABEL__NAME:
1069
			case GMFGraphPackage.LABEL__NAME:
982
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1070
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
983
			case GMFGraphPackage.LABEL__CHILDREN:
1071
			case GMFGraphPackage.LABEL__CHILDREN:
Lines 1004-1011 Link Here
1004
				return location != null;
1092
				return location != null;
1005
			case GMFGraphPackage.LABEL__SIZE:
1093
			case GMFGraphPackage.LABEL__SIZE:
1006
				return size != null;
1094
				return size != null;
1007
			case GMFGraphPackage.LABEL__LAYOUT_MANAGER:
1008
				return LAYOUT_MANAGER_EDEFAULT == null ? layoutManager != null : !LAYOUT_MANAGER_EDEFAULT.equals(layoutManager);
1009
			case GMFGraphPackage.LABEL__TEXT:
1095
			case GMFGraphPackage.LABEL__TEXT:
1010
				return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text);
1096
				return TEXT_EDEFAULT == null ? text != null : !TEXT_EDEFAULT.equals(text);
1011
		}
1097
		}
Lines 1053-1060 Link Here
1053
		StringBuffer result = new StringBuffer(super.toString());
1139
		StringBuffer result = new StringBuffer(super.toString());
1054
		result.append(" (name: ");
1140
		result.append(" (name: ");
1055
		result.append(name);
1141
		result.append(name);
1056
		result.append(", layoutManager: ");
1057
		result.append(layoutManager);
1058
		result.append(", text: ");
1142
		result.append(", text: ");
1059
		result.append(text);
1143
		result.append(text);
1060
		result.append(')');
1144
		result.append(')');
(-)src/org/eclipse/gmf/gmfgraph/impl/GMFGraphFactoryImpl.java (+114 lines)
Lines 12-17 Link Here
12
import org.eclipse.emf.ecore.EPackage;
12
import org.eclipse.emf.ecore.EPackage;
13
import org.eclipse.emf.ecore.impl.EFactoryImpl;
13
import org.eclipse.emf.ecore.impl.EFactoryImpl;
14
import org.eclipse.emf.ecore.plugin.EcorePlugin;
14
import org.eclipse.emf.ecore.plugin.EcorePlugin;
15
import org.eclipse.gmf.gmfgraph.*;
16
15
import org.eclipse.gmf.gmfgraph.BasicFont;
17
import org.eclipse.gmf.gmfgraph.BasicFont;
16
import org.eclipse.gmf.gmfgraph.Canvas;
18
import org.eclipse.gmf.gmfgraph.Canvas;
17
import org.eclipse.gmf.gmfgraph.Child;
19
import org.eclipse.gmf.gmfgraph.Child;
Lines 126-131 Link Here
126
			case GMFGraphPackage.MARGIN_BORDER: return createMarginBorder();
128
			case GMFGraphPackage.MARGIN_BORDER: return createMarginBorder();
127
			case GMFGraphPackage.COMPOUND_BORDER: return createCompoundBorder();
129
			case GMFGraphPackage.COMPOUND_BORDER: return createCompoundBorder();
128
			case GMFGraphPackage.CUSTOM_BORDER: return createCustomBorder();
130
			case GMFGraphPackage.CUSTOM_BORDER: return createCustomBorder();
131
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA: return createCustomLayoutData();
132
			case GMFGraphPackage.GRID_LAYOUT_DATA: return createGridLayoutData();
133
			case GMFGraphPackage.BORDER_LAYOUT_DATA: return createBorderLayoutData();
134
			case GMFGraphPackage.CUSTOM_LAYOUT: return createCustomLayout();
135
			case GMFGraphPackage.GRID_LAYOUT: return createGridLayout();
136
			case GMFGraphPackage.BORDER_LAYOUT: return createBorderLayout();
137
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS: return createCustomConfigurableClass();
138
			case GMFGraphPackage.CUSTOM_ATTRIBUTE: return createCustomAttribute();
129
			default:
139
			default:
130
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
140
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
131
		}
141
		}
Lines 146-151 Link Here
146
				return createDirectionFromString(eDataType, initialValue);
156
				return createDirectionFromString(eDataType, initialValue);
147
			case GMFGraphPackage.LINE_KIND:
157
			case GMFGraphPackage.LINE_KIND:
148
				return createLineKindFromString(eDataType, initialValue);
158
				return createLineKindFromString(eDataType, initialValue);
159
			case GMFGraphPackage.ALIGNMENT:
160
				return createAlignmentFromString(eDataType, initialValue);
149
			default:
161
			default:
150
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
162
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
151
		}
163
		}
Lines 166-171 Link Here
166
				return convertDirectionToString(eDataType, instanceValue);
178
				return convertDirectionToString(eDataType, instanceValue);
167
			case GMFGraphPackage.LINE_KIND:
179
			case GMFGraphPackage.LINE_KIND:
168
				return convertLineKindToString(eDataType, instanceValue);
180
				return convertLineKindToString(eDataType, instanceValue);
181
			case GMFGraphPackage.ALIGNMENT:
182
				return convertAlignmentToString(eDataType, instanceValue);
169
			default:
183
			default:
170
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
184
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
171
		}
185
		}
Lines 496-501 Link Here
496
	 * <!-- end-user-doc -->
510
	 * <!-- end-user-doc -->
497
	 * @generated
511
	 * @generated
498
	 */
512
	 */
513
	public CustomLayoutData createCustomLayoutData() {
514
		CustomLayoutDataImpl customLayoutData = new CustomLayoutDataImpl();
515
		return customLayoutData;
516
	}
517
518
	/**
519
	 * <!-- begin-user-doc -->
520
	 * <!-- end-user-doc -->
521
	 * @generated
522
	 */
523
	public GridLayoutData createGridLayoutData() {
524
		GridLayoutDataImpl gridLayoutData = new GridLayoutDataImpl();
525
		return gridLayoutData;
526
	}
527
528
	/**
529
	 * <!-- begin-user-doc -->
530
	 * <!-- end-user-doc -->
531
	 * @generated
532
	 */
533
	public BorderLayoutData createBorderLayoutData() {
534
		BorderLayoutDataImpl borderLayoutData = new BorderLayoutDataImpl();
535
		return borderLayoutData;
536
	}
537
538
	/**
539
	 * <!-- begin-user-doc -->
540
	 * <!-- end-user-doc -->
541
	 * @generated
542
	 */
543
	public CustomLayout createCustomLayout() {
544
		CustomLayoutImpl customLayout = new CustomLayoutImpl();
545
		return customLayout;
546
	}
547
548
	/**
549
	 * <!-- begin-user-doc -->
550
	 * <!-- end-user-doc -->
551
	 * @generated
552
	 */
553
	public GridLayout createGridLayout() {
554
		GridLayoutImpl gridLayout = new GridLayoutImpl();
555
		return gridLayout;
556
	}
557
558
	/**
559
	 * <!-- begin-user-doc -->
560
	 * <!-- end-user-doc -->
561
	 * @generated
562
	 */
563
	public BorderLayout createBorderLayout() {
564
		BorderLayoutImpl borderLayout = new BorderLayoutImpl();
565
		return borderLayout;
566
	}
567
568
	/**
569
	 * <!-- begin-user-doc -->
570
	 * <!-- end-user-doc -->
571
	 * @generated
572
	 */
573
	public CustomConfigurableClass createCustomConfigurableClass() {
574
		CustomConfigurableClassImpl customConfigurableClass = new CustomConfigurableClassImpl();
575
		return customConfigurableClass;
576
	}
577
578
	/**
579
	 * <!-- begin-user-doc -->
580
	 * <!-- end-user-doc -->
581
	 * @generated
582
	 */
583
	public CustomAttribute createCustomAttribute() {
584
		CustomAttributeImpl customAttribute = new CustomAttributeImpl();
585
		return customAttribute;
586
	}
587
588
	/**
589
	 * <!-- begin-user-doc -->
590
	 * <!-- end-user-doc -->
591
	 * @generated
592
	 */
499
	public ColorConstants createColorConstantsFromString(EDataType eDataType, String initialValue) {
593
	public ColorConstants createColorConstantsFromString(EDataType eDataType, String initialValue) {
500
		ColorConstants result = ColorConstants.get(initialValue);
594
		ColorConstants result = ColorConstants.get(initialValue);
501
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
595
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
Lines 576-581 Link Here
576
	 * <!-- end-user-doc -->
670
	 * <!-- end-user-doc -->
577
	 * @generated
671
	 * @generated
578
	 */
672
	 */
673
	public Alignment createAlignmentFromString(EDataType eDataType, String initialValue) {
674
		Alignment result = Alignment.get(initialValue);
675
		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
676
		return result;
677
	}
678
679
	/**
680
	 * <!-- begin-user-doc -->
681
	 * <!-- end-user-doc -->
682
	 * @generated
683
	 */
684
	public String convertAlignmentToString(EDataType eDataType, Object instanceValue) {
685
		return instanceValue == null ? null : instanceValue.toString();
686
	}
687
688
	/**
689
	 * <!-- begin-user-doc -->
690
	 * <!-- end-user-doc -->
691
	 * @generated
692
	 */
579
	public GMFGraphPackage getGMFGraphPackage() {
693
	public GMFGraphPackage getGMFGraphPackage() {
580
		return (GMFGraphPackage)getEPackage();
694
		return (GMFGraphPackage)getEPackage();
581
	}
695
	}
(-)src/org/eclipse/gmf/gmfgraph/impl/FigureRefImpl.java (+163 lines)
Lines 7-12 Link Here
7
package org.eclipse.gmf.gmfgraph.impl;
7
package org.eclipse.gmf.gmfgraph.impl;
8
8
9
import org.eclipse.emf.common.notify.Notification;
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
10
import org.eclipse.emf.ecore.EClass;
12
import org.eclipse.emf.ecore.EClass;
11
import org.eclipse.emf.ecore.InternalEObject;
13
import org.eclipse.emf.ecore.InternalEObject;
12
import org.eclipse.emf.ecore.impl.ENotificationImpl;
14
import org.eclipse.emf.ecore.impl.ENotificationImpl;
Lines 15-20 Link Here
15
import org.eclipse.gmf.gmfgraph.FigureRef;
17
import org.eclipse.gmf.gmfgraph.FigureRef;
16
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
18
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
17
19
20
import org.eclipse.gmf.gmfgraph.Layout;
21
import org.eclipse.gmf.gmfgraph.LayoutData;
22
18
/**
23
/**
19
 * <!-- begin-user-doc -->
24
 * <!-- begin-user-doc -->
20
 * An implementation of the model object '<em><b>Figure Ref</b></em>'.
25
 * An implementation of the model object '<em><b>Figure Ref</b></em>'.
Lines 22-27 Link Here
22
 * <p>
27
 * <p>
23
 * The following features are implemented:
28
 * The following features are implemented:
24
 * <ul>
29
 * <ul>
30
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl#getData <em>Data</em>}</li>
31
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl#getLayout <em>Layout</em>}</li>
25
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl#getFigure <em>Figure</em>}</li>
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.FigureRefImpl#getFigure <em>Figure</em>}</li>
26
 * </ul>
33
 * </ul>
27
 * </p>
34
 * </p>
Lines 30-35 Link Here
30
 */
37
 */
31
public class FigureRefImpl extends EObjectImpl implements FigureRef {
38
public class FigureRefImpl extends EObjectImpl implements FigureRef {
32
	/**
39
	/**
40
	 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference.
41
	 * <!-- begin-user-doc -->
42
	 * <!-- end-user-doc -->
43
	 * @see #getData()
44
	 * @generated
45
	 * @ordered
46
	 */
47
	protected LayoutData data = null;
48
49
	/**
50
	 * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
51
	 * <!-- begin-user-doc -->
52
	 * <!-- end-user-doc -->
53
	 * @see #getLayout()
54
	 * @generated
55
	 * @ordered
56
	 */
57
	protected Layout layout = null;
58
59
	/**
33
	 * The cached value of the '{@link #getFigure() <em>Figure</em>}' reference.
60
	 * The cached value of the '{@link #getFigure() <em>Figure</em>}' reference.
34
	 * <!-- begin-user-doc -->
61
	 * <!-- begin-user-doc -->
35
	 * <!-- end-user-doc -->
62
	 * <!-- end-user-doc -->
Lines 62-67 Link Here
62
	 * <!-- end-user-doc -->
89
	 * <!-- end-user-doc -->
63
	 * @generated
90
	 * @generated
64
	 */
91
	 */
92
	public LayoutData getData() {
93
		return data;
94
	}
95
96
	/**
97
	 * <!-- begin-user-doc -->
98
	 * <!-- end-user-doc -->
99
	 * @generated
100
	 */
101
	public NotificationChain basicSetData(LayoutData newData, NotificationChain msgs) {
102
		LayoutData oldData = data;
103
		data = newData;
104
		if (eNotificationRequired()) {
105
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.FIGURE_REF__DATA, oldData, newData);
106
			if (msgs == null) msgs = notification; else msgs.add(notification);
107
		}
108
		return msgs;
109
	}
110
111
	/**
112
	 * <!-- begin-user-doc -->
113
	 * <!-- end-user-doc -->
114
	 * @generated
115
	 */
116
	public void setData(LayoutData newData) {
117
		if (newData != data) {
118
			NotificationChain msgs = null;
119
			if (data != null)
120
				msgs = ((InternalEObject)data).eInverseRemove(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
121
			if (newData != null)
122
				msgs = ((InternalEObject)newData).eInverseAdd(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
123
			msgs = basicSetData(newData, msgs);
124
			if (msgs != null) msgs.dispatch();
125
		}
126
		else if (eNotificationRequired())
127
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.FIGURE_REF__DATA, newData, newData));
128
	}
129
130
	/**
131
	 * <!-- begin-user-doc -->
132
	 * <!-- end-user-doc -->
133
	 * @generated
134
	 */
135
	public Layout getLayout() {
136
		return layout;
137
	}
138
139
	/**
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public NotificationChain basicSetLayout(Layout newLayout, NotificationChain msgs) {
145
		Layout oldLayout = layout;
146
		layout = newLayout;
147
		if (eNotificationRequired()) {
148
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.FIGURE_REF__LAYOUT, oldLayout, newLayout);
149
			if (msgs == null) msgs = notification; else msgs.add(notification);
150
		}
151
		return msgs;
152
	}
153
154
	/**
155
	 * <!-- begin-user-doc -->
156
	 * <!-- end-user-doc -->
157
	 * @generated
158
	 */
159
	public void setLayout(Layout newLayout) {
160
		if (newLayout != layout) {
161
			NotificationChain msgs = null;
162
			if (layout != null)
163
				msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.FIGURE_REF__LAYOUT, null, msgs);
164
			if (newLayout != null)
165
				msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.FIGURE_REF__LAYOUT, null, msgs);
166
			msgs = basicSetLayout(newLayout, msgs);
167
			if (msgs != null) msgs.dispatch();
168
		}
169
		else if (eNotificationRequired())
170
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.FIGURE_REF__LAYOUT, newLayout, newLayout));
171
	}
172
173
	/**
174
	 * <!-- begin-user-doc -->
175
	 * <!-- end-user-doc -->
176
	 * @generated
177
	 */
65
	public Figure getFigure() {
178
	public Figure getFigure() {
66
		if (figure != null && figure.eIsProxy()) {
179
		if (figure != null && figure.eIsProxy()) {
67
			InternalEObject oldFigure = (InternalEObject)figure;
180
			InternalEObject oldFigure = (InternalEObject)figure;
Lines 100-107 Link Here
100
	 * <!-- end-user-doc -->
213
	 * <!-- end-user-doc -->
101
	 * @generated
214
	 * @generated
102
	 */
215
	 */
216
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
217
		switch (featureID) {
218
			case GMFGraphPackage.FIGURE_REF__DATA:
219
				if (data != null)
220
					msgs = ((InternalEObject)data).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.FIGURE_REF__DATA, null, msgs);
221
				return basicSetData((LayoutData)otherEnd, msgs);
222
		}
223
		return super.eInverseAdd(otherEnd, featureID, msgs);
224
	}
225
226
	/**
227
	 * <!-- begin-user-doc -->
228
	 * <!-- end-user-doc -->
229
	 * @generated
230
	 */
231
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
232
		switch (featureID) {
233
			case GMFGraphPackage.FIGURE_REF__DATA:
234
				return basicSetData(null, msgs);
235
			case GMFGraphPackage.FIGURE_REF__LAYOUT:
236
				return basicSetLayout(null, msgs);
237
		}
238
		return super.eInverseRemove(otherEnd, featureID, msgs);
239
	}
240
241
	/**
242
	 * <!-- begin-user-doc -->
243
	 * <!-- end-user-doc -->
244
	 * @generated
245
	 */
103
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
246
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
104
		switch (featureID) {
247
		switch (featureID) {
248
			case GMFGraphPackage.FIGURE_REF__DATA:
249
				return getData();
250
			case GMFGraphPackage.FIGURE_REF__LAYOUT:
251
				return getLayout();
105
			case GMFGraphPackage.FIGURE_REF__FIGURE:
252
			case GMFGraphPackage.FIGURE_REF__FIGURE:
106
				if (resolve) return getFigure();
253
				if (resolve) return getFigure();
107
				return basicGetFigure();
254
				return basicGetFigure();
Lines 116-121 Link Here
116
	 */
263
	 */
117
	public void eSet(int featureID, Object newValue) {
264
	public void eSet(int featureID, Object newValue) {
118
		switch (featureID) {
265
		switch (featureID) {
266
			case GMFGraphPackage.FIGURE_REF__DATA:
267
				setData((LayoutData)newValue);
268
				return;
269
			case GMFGraphPackage.FIGURE_REF__LAYOUT:
270
				setLayout((Layout)newValue);
271
				return;
119
			case GMFGraphPackage.FIGURE_REF__FIGURE:
272
			case GMFGraphPackage.FIGURE_REF__FIGURE:
120
				setFigure((Figure)newValue);
273
				setFigure((Figure)newValue);
121
				return;
274
				return;
Lines 130-135 Link Here
130
	 */
283
	 */
131
	public void eUnset(int featureID) {
284
	public void eUnset(int featureID) {
132
		switch (featureID) {
285
		switch (featureID) {
286
			case GMFGraphPackage.FIGURE_REF__DATA:
287
				setData((LayoutData)null);
288
				return;
289
			case GMFGraphPackage.FIGURE_REF__LAYOUT:
290
				setLayout((Layout)null);
291
				return;
133
			case GMFGraphPackage.FIGURE_REF__FIGURE:
292
			case GMFGraphPackage.FIGURE_REF__FIGURE:
134
				setFigure((Figure)null);
293
				setFigure((Figure)null);
135
				return;
294
				return;
Lines 144-149 Link Here
144
	 */
303
	 */
145
	public boolean eIsSet(int featureID) {
304
	public boolean eIsSet(int featureID) {
146
		switch (featureID) {
305
		switch (featureID) {
306
			case GMFGraphPackage.FIGURE_REF__DATA:
307
				return data != null;
308
			case GMFGraphPackage.FIGURE_REF__LAYOUT:
309
				return layout != null;
147
			case GMFGraphPackage.FIGURE_REF__FIGURE:
310
			case GMFGraphPackage.FIGURE_REF__FIGURE:
148
				return figure != null;
311
				return figure != null;
149
		}
312
		}
(-)src/org/eclipse/gmf/gmfgraph/impl/ShapeImpl.java (-54 / +138 lines)
Lines 30-35 Link Here
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
30
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
31
import org.eclipse.gmf.gmfgraph.Identity;
31
import org.eclipse.gmf.gmfgraph.Identity;
32
import org.eclipse.gmf.gmfgraph.Insets;
32
import org.eclipse.gmf.gmfgraph.Insets;
33
import org.eclipse.gmf.gmfgraph.Layout;
34
import org.eclipse.gmf.gmfgraph.LayoutData;
33
import org.eclipse.gmf.gmfgraph.LineKind;
35
import org.eclipse.gmf.gmfgraph.LineKind;
34
import org.eclipse.gmf.gmfgraph.Point;
36
import org.eclipse.gmf.gmfgraph.Point;
35
import org.eclipse.gmf.gmfgraph.Shape;
37
import org.eclipse.gmf.gmfgraph.Shape;
Lines 41-46 Link Here
41
 * <p>
43
 * <p>
42
 * The following features are implemented:
44
 * The following features are implemented:
43
 * <ul>
45
 * <ul>
46
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getData <em>Data</em>}</li>
47
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLayout <em>Layout</em>}</li>
44
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getName <em>Name</em>}</li>
48
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getName <em>Name</em>}</li>
45
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getChildren <em>Children</em>}</li>
49
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getChildren <em>Children</em>}</li>
46
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getParent <em>Parent</em>}</li>
50
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getParent <em>Parent</em>}</li>
Lines 54-60 Link Here
54
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getBorder <em>Border</em>}</li>
58
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getBorder <em>Border</em>}</li>
55
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLocation <em>Location</em>}</li>
59
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLocation <em>Location</em>}</li>
56
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getSize <em>Size</em>}</li>
60
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getSize <em>Size</em>}</li>
57
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLayoutManager <em>Layout Manager</em>}</li>
58
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#isOutline <em>Outline</em>}</li>
61
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#isOutline <em>Outline</em>}</li>
59
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#isFill <em>Fill</em>}</li>
62
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#isFill <em>Fill</em>}</li>
60
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLineWidth <em>Line Width</em>}</li>
63
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.ShapeImpl#getLineWidth <em>Line Width</em>}</li>
Lines 69-74 Link Here
69
 */
72
 */
70
public abstract class ShapeImpl extends EObjectImpl implements Shape {
73
public abstract class ShapeImpl extends EObjectImpl implements Shape {
71
	/**
74
	/**
75
	 * The cached value of the '{@link #getData() <em>Data</em>}' containment reference.
76
	 * <!-- begin-user-doc -->
77
	 * <!-- end-user-doc -->
78
	 * @see #getData()
79
	 * @generated
80
	 * @ordered
81
	 */
82
	protected LayoutData data = null;
83
84
	/**
85
	 * The cached value of the '{@link #getLayout() <em>Layout</em>}' containment reference.
86
	 * <!-- begin-user-doc -->
87
	 * <!-- end-user-doc -->
88
	 * @see #getLayout()
89
	 * @generated
90
	 * @ordered
91
	 */
92
	protected Layout layout = null;
93
94
	/**
72
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
95
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
73
	 * <!-- begin-user-doc -->
96
	 * <!-- begin-user-doc -->
74
	 * <!-- end-user-doc -->
97
	 * <!-- end-user-doc -->
Lines 199-224 Link Here
199
	protected Point size = null;
222
	protected Point size = null;
200
223
201
	/**
224
	/**
202
	 * The default value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
203
	 * <!-- begin-user-doc -->
204
	 * <!-- end-user-doc -->
205
	 * @see #getLayoutManager()
206
	 * @generated
207
	 * @ordered
208
	 */
209
	protected static final String LAYOUT_MANAGER_EDEFAULT = null;
210
211
	/**
212
	 * The cached value of the '{@link #getLayoutManager() <em>Layout Manager</em>}' attribute.
213
	 * <!-- begin-user-doc -->
214
	 * <!-- end-user-doc -->
215
	 * @see #getLayoutManager()
216
	 * @generated
217
	 * @ordered
218
	 */
219
	protected String layoutManager = LAYOUT_MANAGER_EDEFAULT;
220
221
	/**
222
	 * The default value of the '{@link #isOutline() <em>Outline</em>}' attribute.
225
	 * The default value of the '{@link #isOutline() <em>Outline</em>}' attribute.
223
	 * <!-- begin-user-doc -->
226
	 * <!-- begin-user-doc -->
224
	 * <!-- end-user-doc -->
227
	 * <!-- end-user-doc -->
Lines 361-366 Link Here
361
	 * <!-- end-user-doc -->
364
	 * <!-- end-user-doc -->
362
	 * @generated
365
	 * @generated
363
	 */
366
	 */
367
	public LayoutData getData() {
368
		return data;
369
	}
370
371
	/**
372
	 * <!-- begin-user-doc -->
373
	 * <!-- end-user-doc -->
374
	 * @generated
375
	 */
376
	public NotificationChain basicSetData(LayoutData newData, NotificationChain msgs) {
377
		LayoutData oldData = data;
378
		data = newData;
379
		if (eNotificationRequired()) {
380
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SHAPE__DATA, oldData, newData);
381
			if (msgs == null) msgs = notification; else msgs.add(notification);
382
		}
383
		return msgs;
384
	}
385
386
	/**
387
	 * <!-- begin-user-doc -->
388
	 * <!-- end-user-doc -->
389
	 * @generated
390
	 */
391
	public void setData(LayoutData newData) {
392
		if (newData != data) {
393
			NotificationChain msgs = null;
394
			if (data != null)
395
				msgs = ((InternalEObject)data).eInverseRemove(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
396
			if (newData != null)
397
				msgs = ((InternalEObject)newData).eInverseAdd(this, GMFGraphPackage.LAYOUT_DATA__OWNER, LayoutData.class, msgs);
398
			msgs = basicSetData(newData, msgs);
399
			if (msgs != null) msgs.dispatch();
400
		}
401
		else if (eNotificationRequired())
402
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SHAPE__DATA, newData, newData));
403
	}
404
405
	/**
406
	 * <!-- begin-user-doc -->
407
	 * <!-- end-user-doc -->
408
	 * @generated
409
	 */
410
	public Layout getLayout() {
411
		return layout;
412
	}
413
414
	/**
415
	 * <!-- begin-user-doc -->
416
	 * <!-- end-user-doc -->
417
	 * @generated
418
	 */
419
	public NotificationChain basicSetLayout(Layout newLayout, NotificationChain msgs) {
420
		Layout oldLayout = layout;
421
		layout = newLayout;
422
		if (eNotificationRequired()) {
423
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SHAPE__LAYOUT, oldLayout, newLayout);
424
			if (msgs == null) msgs = notification; else msgs.add(notification);
425
		}
426
		return msgs;
427
	}
428
429
	/**
430
	 * <!-- begin-user-doc -->
431
	 * <!-- end-user-doc -->
432
	 * @generated
433
	 */
434
	public void setLayout(Layout newLayout) {
435
		if (newLayout != layout) {
436
			NotificationChain msgs = null;
437
			if (layout != null)
438
				msgs = ((InternalEObject)layout).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.SHAPE__LAYOUT, null, msgs);
439
			if (newLayout != null)
440
				msgs = ((InternalEObject)newLayout).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.SHAPE__LAYOUT, null, msgs);
441
			msgs = basicSetLayout(newLayout, msgs);
442
			if (msgs != null) msgs.dispatch();
443
		}
444
		else if (eNotificationRequired())
445
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SHAPE__LAYOUT, newLayout, newLayout));
446
	}
447
448
	/**
449
	 * <!-- begin-user-doc -->
450
	 * <!-- end-user-doc -->
451
	 * @generated
452
	 */
364
	public String getName() {
453
	public String getName() {
365
		return name;
454
		return name;
366
	}
455
	}
Lines 832-858 Link Here
832
	/**
921
	/**
833
	 * <!-- begin-user-doc -->
922
	 * <!-- begin-user-doc -->
834
	 * <!-- end-user-doc -->
923
	 * <!-- end-user-doc -->
835
	 * @generated
836
	 */
837
	public String getLayoutManager() {
838
		return layoutManager;
839
	}
840
841
	/**
842
	 * <!-- begin-user-doc -->
843
	 * <!-- end-user-doc -->
844
	 * @generated
845
	 */
846
	public void setLayoutManager(String newLayoutManager) {
847
		String oldLayoutManager = layoutManager;
848
		layoutManager = newLayoutManager;
849
		if (eNotificationRequired())
850
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.SHAPE__LAYOUT_MANAGER, oldLayoutManager, layoutManager));
851
	}
852
853
	/**
854
	 * <!-- begin-user-doc -->
855
	 * <!-- end-user-doc -->
856
	 * @generated NOT
924
	 * @generated NOT
857
	 */
925
	 */
858
	public EList getResolvedChildren() {
926
	public EList getResolvedChildren() {
Lines 876-881 Link Here
876
	 */
944
	 */
877
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
945
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
878
		switch (featureID) {
946
		switch (featureID) {
947
			case GMFGraphPackage.SHAPE__DATA:
948
				if (data != null)
949
					msgs = ((InternalEObject)data).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.SHAPE__DATA, null, msgs);
950
				return basicSetData((LayoutData)otherEnd, msgs);
879
			case GMFGraphPackage.SHAPE__PARENT:
951
			case GMFGraphPackage.SHAPE__PARENT:
880
				if (eInternalContainer() != null)
952
				if (eInternalContainer() != null)
881
					msgs = eBasicRemoveFromContainer(msgs);
953
					msgs = eBasicRemoveFromContainer(msgs);
Lines 891-896 Link Here
891
	 */
963
	 */
892
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
964
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
893
		switch (featureID) {
965
		switch (featureID) {
966
			case GMFGraphPackage.SHAPE__DATA:
967
				return basicSetData(null, msgs);
968
			case GMFGraphPackage.SHAPE__LAYOUT:
969
				return basicSetLayout(null, msgs);
894
			case GMFGraphPackage.SHAPE__CHILDREN:
970
			case GMFGraphPackage.SHAPE__CHILDREN:
895
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
971
				return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
896
			case GMFGraphPackage.SHAPE__PARENT:
972
			case GMFGraphPackage.SHAPE__PARENT:
Lines 939-944 Link Here
939
	 */
1015
	 */
940
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
1016
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
941
		switch (featureID) {
1017
		switch (featureID) {
1018
			case GMFGraphPackage.SHAPE__DATA:
1019
				return getData();
1020
			case GMFGraphPackage.SHAPE__LAYOUT:
1021
				return getLayout();
942
			case GMFGraphPackage.SHAPE__NAME:
1022
			case GMFGraphPackage.SHAPE__NAME:
943
				return getName();
1023
				return getName();
944
			case GMFGraphPackage.SHAPE__CHILDREN:
1024
			case GMFGraphPackage.SHAPE__CHILDREN:
Lines 965-972 Link Here
965
				return getLocation();
1045
				return getLocation();
966
			case GMFGraphPackage.SHAPE__SIZE:
1046
			case GMFGraphPackage.SHAPE__SIZE:
967
				return getSize();
1047
				return getSize();
968
			case GMFGraphPackage.SHAPE__LAYOUT_MANAGER:
969
				return getLayoutManager();
970
			case GMFGraphPackage.SHAPE__OUTLINE:
1048
			case GMFGraphPackage.SHAPE__OUTLINE:
971
				return isOutline() ? Boolean.TRUE : Boolean.FALSE;
1049
				return isOutline() ? Boolean.TRUE : Boolean.FALSE;
972
			case GMFGraphPackage.SHAPE__FILL:
1050
			case GMFGraphPackage.SHAPE__FILL:
Lines 992-997 Link Here
992
	 */
1070
	 */
993
	public void eSet(int featureID, Object newValue) {
1071
	public void eSet(int featureID, Object newValue) {
994
		switch (featureID) {
1072
		switch (featureID) {
1073
			case GMFGraphPackage.SHAPE__DATA:
1074
				setData((LayoutData)newValue);
1075
				return;
1076
			case GMFGraphPackage.SHAPE__LAYOUT:
1077
				setLayout((Layout)newValue);
1078
				return;
995
			case GMFGraphPackage.SHAPE__NAME:
1079
			case GMFGraphPackage.SHAPE__NAME:
996
				setName((String)newValue);
1080
				setName((String)newValue);
997
				return;
1081
				return;
Lines 1029-1037 Link Here
1029
			case GMFGraphPackage.SHAPE__SIZE:
1113
			case GMFGraphPackage.SHAPE__SIZE:
1030
				setSize((Point)newValue);
1114
				setSize((Point)newValue);
1031
				return;
1115
				return;
1032
			case GMFGraphPackage.SHAPE__LAYOUT_MANAGER:
1033
				setLayoutManager((String)newValue);
1034
				return;
1035
			case GMFGraphPackage.SHAPE__OUTLINE:
1116
			case GMFGraphPackage.SHAPE__OUTLINE:
1036
				setOutline(((Boolean)newValue).booleanValue());
1117
				setOutline(((Boolean)newValue).booleanValue());
1037
				return;
1118
				return;
Lines 1061-1066 Link Here
1061
	 */
1142
	 */
1062
	public void eUnset(int featureID) {
1143
	public void eUnset(int featureID) {
1063
		switch (featureID) {
1144
		switch (featureID) {
1145
			case GMFGraphPackage.SHAPE__DATA:
1146
				setData((LayoutData)null);
1147
				return;
1148
			case GMFGraphPackage.SHAPE__LAYOUT:
1149
				setLayout((Layout)null);
1150
				return;
1064
			case GMFGraphPackage.SHAPE__NAME:
1151
			case GMFGraphPackage.SHAPE__NAME:
1065
				setName(NAME_EDEFAULT);
1152
				setName(NAME_EDEFAULT);
1066
				return;
1153
				return;
Lines 1097-1105 Link Here
1097
			case GMFGraphPackage.SHAPE__SIZE:
1184
			case GMFGraphPackage.SHAPE__SIZE:
1098
				setSize((Point)null);
1185
				setSize((Point)null);
1099
				return;
1186
				return;
1100
			case GMFGraphPackage.SHAPE__LAYOUT_MANAGER:
1101
				setLayoutManager(LAYOUT_MANAGER_EDEFAULT);
1102
				return;
1103
			case GMFGraphPackage.SHAPE__OUTLINE:
1187
			case GMFGraphPackage.SHAPE__OUTLINE:
1104
				setOutline(OUTLINE_EDEFAULT);
1188
				setOutline(OUTLINE_EDEFAULT);
1105
				return;
1189
				return;
Lines 1129-1134 Link Here
1129
	 */
1213
	 */
1130
	public boolean eIsSet(int featureID) {
1214
	public boolean eIsSet(int featureID) {
1131
		switch (featureID) {
1215
		switch (featureID) {
1216
			case GMFGraphPackage.SHAPE__DATA:
1217
				return data != null;
1218
			case GMFGraphPackage.SHAPE__LAYOUT:
1219
				return layout != null;
1132
			case GMFGraphPackage.SHAPE__NAME:
1220
			case GMFGraphPackage.SHAPE__NAME:
1133
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1221
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
1134
			case GMFGraphPackage.SHAPE__CHILDREN:
1222
			case GMFGraphPackage.SHAPE__CHILDREN:
Lines 1155-1162 Link Here
1155
				return location != null;
1243
				return location != null;
1156
			case GMFGraphPackage.SHAPE__SIZE:
1244
			case GMFGraphPackage.SHAPE__SIZE:
1157
				return size != null;
1245
				return size != null;
1158
			case GMFGraphPackage.SHAPE__LAYOUT_MANAGER:
1159
				return LAYOUT_MANAGER_EDEFAULT == null ? layoutManager != null : !LAYOUT_MANAGER_EDEFAULT.equals(layoutManager);
1160
			case GMFGraphPackage.SHAPE__OUTLINE:
1246
			case GMFGraphPackage.SHAPE__OUTLINE:
1161
				return outline != OUTLINE_EDEFAULT;
1247
				return outline != OUTLINE_EDEFAULT;
1162
			case GMFGraphPackage.SHAPE__FILL:
1248
			case GMFGraphPackage.SHAPE__FILL:
Lines 1342-1349 Link Here
1342
		StringBuffer result = new StringBuffer(super.toString());
1428
		StringBuffer result = new StringBuffer(super.toString());
1343
		result.append(" (name: ");
1429
		result.append(" (name: ");
1344
		result.append(name);
1430
		result.append(name);
1345
		result.append(", layoutManager: ");
1346
		result.append(layoutManager);
1347
		result.append(", outline: ");
1431
		result.append(", outline: ");
1348
		result.append(outline);
1432
		result.append(outline);
1349
		result.append(", fill: ");
1433
		result.append(", fill: ");
(-)src/org/eclipse/gmf/gmfgraph/util/GMFGraphAdapterFactory.java (+189 lines)
Lines 10-15 Link Here
10
import org.eclipse.emf.common.notify.Notifier;
10
import org.eclipse.emf.common.notify.Notifier;
11
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
11
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
12
import org.eclipse.emf.ecore.EObject;
12
import org.eclipse.emf.ecore.EObject;
13
import org.eclipse.gmf.gmfgraph.*;
14
13
import org.eclipse.gmf.gmfgraph.BasicFont;
15
import org.eclipse.gmf.gmfgraph.BasicFont;
14
import org.eclipse.gmf.gmfgraph.Border;
16
import org.eclipse.gmf.gmfgraph.Border;
15
import org.eclipse.gmf.gmfgraph.Canvas;
17
import org.eclipse.gmf.gmfgraph.Canvas;
Lines 243-248 Link Here
243
			public Object caseCustomBorder(CustomBorder object) {
245
			public Object caseCustomBorder(CustomBorder object) {
244
				return createCustomBorderAdapter();
246
				return createCustomBorderAdapter();
245
			}
247
			}
248
			public Object caseLayoutData(LayoutData object) {
249
				return createLayoutDataAdapter();
250
			}
251
			public Object caseCustomLayoutData(CustomLayoutData object) {
252
				return createCustomLayoutDataAdapter();
253
			}
254
			public Object caseGridLayoutData(GridLayoutData object) {
255
				return createGridLayoutDataAdapter();
256
			}
257
			public Object caseBorderLayoutData(BorderLayoutData object) {
258
				return createBorderLayoutDataAdapter();
259
			}
260
			public Object caseLayoutable(Layoutable object) {
261
				return createLayoutableAdapter();
262
			}
263
			public Object caseLayout(Layout object) {
264
				return createLayoutAdapter();
265
			}
266
			public Object caseCustomLayout(CustomLayout object) {
267
				return createCustomLayoutAdapter();
268
			}
269
			public Object caseGridLayout(GridLayout object) {
270
				return createGridLayoutAdapter();
271
			}
272
			public Object caseBorderLayout(BorderLayout object) {
273
				return createBorderLayoutAdapter();
274
			}
275
			public Object caseCustomConfigurableClass(CustomConfigurableClass object) {
276
				return createCustomConfigurableClassAdapter();
277
			}
278
			public Object caseCustomAttribute(CustomAttribute object) {
279
				return createCustomAttributeAdapter();
280
			}
246
			public Object defaultCase(EObject object) {
281
			public Object defaultCase(EObject object) {
247
				return createEObjectAdapter();
282
				return createEObjectAdapter();
248
			}
283
			}
Lines 878-883 Link Here
878
	}
913
	}
879
914
880
	/**
915
	/**
916
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.LayoutData <em>Layout Data</em>}'.
917
	 * <!-- begin-user-doc -->
918
	 * This default implementation returns null so that we can easily ignore cases;
919
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
920
	 * <!-- end-user-doc -->
921
	 * @return the new adapter.
922
	 * @see org.eclipse.gmf.gmfgraph.LayoutData
923
	 * @generated
924
	 */
925
	public Adapter createLayoutDataAdapter() {
926
		return null;
927
	}
928
929
	/**
930
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.CustomLayoutData <em>Custom Layout Data</em>}'.
931
	 * <!-- begin-user-doc -->
932
	 * This default implementation returns null so that we can easily ignore cases;
933
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
934
	 * <!-- end-user-doc -->
935
	 * @return the new adapter.
936
	 * @see org.eclipse.gmf.gmfgraph.CustomLayoutData
937
	 * @generated
938
	 */
939
	public Adapter createCustomLayoutDataAdapter() {
940
		return null;
941
	}
942
943
	/**
944
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.GridLayoutData <em>Grid Layout Data</em>}'.
945
	 * <!-- begin-user-doc -->
946
	 * This default implementation returns null so that we can easily ignore cases;
947
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
948
	 * <!-- end-user-doc -->
949
	 * @return the new adapter.
950
	 * @see org.eclipse.gmf.gmfgraph.GridLayoutData
951
	 * @generated
952
	 */
953
	public Adapter createGridLayoutDataAdapter() {
954
		return null;
955
	}
956
957
	/**
958
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData <em>Border Layout Data</em>}'.
959
	 * <!-- begin-user-doc -->
960
	 * This default implementation returns null so that we can easily ignore cases;
961
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
962
	 * <!-- end-user-doc -->
963
	 * @return the new adapter.
964
	 * @see org.eclipse.gmf.gmfgraph.BorderLayoutData
965
	 * @generated
966
	 */
967
	public Adapter createBorderLayoutDataAdapter() {
968
		return null;
969
	}
970
971
	/**
972
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.Layoutable <em>Layoutable</em>}'.
973
	 * <!-- begin-user-doc -->
974
	 * This default implementation returns null so that we can easily ignore cases;
975
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
976
	 * <!-- end-user-doc -->
977
	 * @return the new adapter.
978
	 * @see org.eclipse.gmf.gmfgraph.Layoutable
979
	 * @generated
980
	 */
981
	public Adapter createLayoutableAdapter() {
982
		return null;
983
	}
984
985
	/**
986
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.Layout <em>Layout</em>}'.
987
	 * <!-- begin-user-doc -->
988
	 * This default implementation returns null so that we can easily ignore cases;
989
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
990
	 * <!-- end-user-doc -->
991
	 * @return the new adapter.
992
	 * @see org.eclipse.gmf.gmfgraph.Layout
993
	 * @generated
994
	 */
995
	public Adapter createLayoutAdapter() {
996
		return null;
997
	}
998
999
	/**
1000
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.CustomLayout <em>Custom Layout</em>}'.
1001
	 * <!-- begin-user-doc -->
1002
	 * This default implementation returns null so that we can easily ignore cases;
1003
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
1004
	 * <!-- end-user-doc -->
1005
	 * @return the new adapter.
1006
	 * @see org.eclipse.gmf.gmfgraph.CustomLayout
1007
	 * @generated
1008
	 */
1009
	public Adapter createCustomLayoutAdapter() {
1010
		return null;
1011
	}
1012
1013
	/**
1014
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.GridLayout <em>Grid Layout</em>}'.
1015
	 * <!-- begin-user-doc -->
1016
	 * This default implementation returns null so that we can easily ignore cases;
1017
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
1018
	 * <!-- end-user-doc -->
1019
	 * @return the new adapter.
1020
	 * @see org.eclipse.gmf.gmfgraph.GridLayout
1021
	 * @generated
1022
	 */
1023
	public Adapter createGridLayoutAdapter() {
1024
		return null;
1025
	}
1026
1027
	/**
1028
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.BorderLayout <em>Border Layout</em>}'.
1029
	 * <!-- begin-user-doc -->
1030
	 * This default implementation returns null so that we can easily ignore cases;
1031
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
1032
	 * <!-- end-user-doc -->
1033
	 * @return the new adapter.
1034
	 * @see org.eclipse.gmf.gmfgraph.BorderLayout
1035
	 * @generated
1036
	 */
1037
	public Adapter createBorderLayoutAdapter() {
1038
		return null;
1039
	}
1040
1041
	/**
1042
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass <em>Custom Configurable Class</em>}'.
1043
	 * <!-- begin-user-doc -->
1044
	 * This default implementation returns null so that we can easily ignore cases;
1045
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
1046
	 * <!-- end-user-doc -->
1047
	 * @return the new adapter.
1048
	 * @see org.eclipse.gmf.gmfgraph.CustomConfigurableClass
1049
	 * @generated
1050
	 */
1051
	public Adapter createCustomConfigurableClassAdapter() {
1052
		return null;
1053
	}
1054
1055
	/**
1056
	 * Creates a new adapter for an object of class '{@link org.eclipse.gmf.gmfgraph.CustomAttribute <em>Custom Attribute</em>}'.
1057
	 * <!-- begin-user-doc -->
1058
	 * This default implementation returns null so that we can easily ignore cases;
1059
	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
1060
	 * <!-- end-user-doc -->
1061
	 * @return the new adapter.
1062
	 * @see org.eclipse.gmf.gmfgraph.CustomAttribute
1063
	 * @generated
1064
	 */
1065
	public Adapter createCustomAttributeAdapter() {
1066
		return null;
1067
	}
1068
1069
	/**
881
	 * Creates a new adapter for the default case.
1070
	 * Creates a new adapter for the default case.
882
	 * <!-- begin-user-doc -->
1071
	 * <!-- begin-user-doc -->
883
	 * This default implementation returns null.
1072
	 * This default implementation returns null.
(-)src/org/eclipse/gmf/gmfgraph/util/GMFGraphSwitch.java (+269 lines)
Lines 10-15 Link Here
10
10
11
import org.eclipse.emf.ecore.EClass;
11
import org.eclipse.emf.ecore.EClass;
12
import org.eclipse.emf.ecore.EObject;
12
import org.eclipse.emf.ecore.EObject;
13
import org.eclipse.gmf.gmfgraph.*;
14
13
import org.eclipse.gmf.gmfgraph.BasicFont;
15
import org.eclipse.gmf.gmfgraph.BasicFont;
14
import org.eclipse.gmf.gmfgraph.Border;
16
import org.eclipse.gmf.gmfgraph.Border;
15
import org.eclipse.gmf.gmfgraph.Canvas;
17
import org.eclipse.gmf.gmfgraph.Canvas;
Lines 212-217 Link Here
212
			case GMFGraphPackage.FIGURE_MARKER: {
214
			case GMFGraphPackage.FIGURE_MARKER: {
213
				FigureMarker figureMarker = (FigureMarker)theEObject;
215
				FigureMarker figureMarker = (FigureMarker)theEObject;
214
				Object result = caseFigureMarker(figureMarker);
216
				Object result = caseFigureMarker(figureMarker);
217
				if (result == null) result = caseLayoutable(figureMarker);
215
				if (result == null) result = defaultCase(theEObject);
218
				if (result == null) result = defaultCase(theEObject);
216
				return result;
219
				return result;
217
			}
220
			}
Lines 220-225 Link Here
220
				Object result = caseFigure(figure);
223
				Object result = caseFigure(figure);
221
				if (result == null) result = caseFigureMarker(figure);
224
				if (result == null) result = caseFigureMarker(figure);
222
				if (result == null) result = caseIdentity(figure);
225
				if (result == null) result = caseIdentity(figure);
226
				if (result == null) result = caseLayoutable(figure);
223
				if (result == null) result = defaultCase(theEObject);
227
				if (result == null) result = defaultCase(theEObject);
224
				return result;
228
				return result;
225
			}
229
			}
Lines 227-232 Link Here
227
				FigureRef figureRef = (FigureRef)theEObject;
231
				FigureRef figureRef = (FigureRef)theEObject;
228
				Object result = caseFigureRef(figureRef);
232
				Object result = caseFigureRef(figureRef);
229
				if (result == null) result = caseFigureMarker(figureRef);
233
				if (result == null) result = caseFigureMarker(figureRef);
234
				if (result == null) result = caseLayoutable(figureRef);
230
				if (result == null) result = defaultCase(theEObject);
235
				if (result == null) result = defaultCase(theEObject);
231
				return result;
236
				return result;
232
			}
237
			}
Lines 236-241 Link Here
236
				if (result == null) result = caseFigure(connectionFigure);
241
				if (result == null) result = caseFigure(connectionFigure);
237
				if (result == null) result = caseFigureMarker(connectionFigure);
242
				if (result == null) result = caseFigureMarker(connectionFigure);
238
				if (result == null) result = caseIdentity(connectionFigure);
243
				if (result == null) result = caseIdentity(connectionFigure);
244
				if (result == null) result = caseLayoutable(connectionFigure);
239
				if (result == null) result = defaultCase(theEObject);
245
				if (result == null) result = defaultCase(theEObject);
240
				return result;
246
				return result;
241
			}
247
			}
Lines 245-250 Link Here
245
				if (result == null) result = caseFigure(decorationFigure);
251
				if (result == null) result = caseFigure(decorationFigure);
246
				if (result == null) result = caseFigureMarker(decorationFigure);
252
				if (result == null) result = caseFigureMarker(decorationFigure);
247
				if (result == null) result = caseIdentity(decorationFigure);
253
				if (result == null) result = caseIdentity(decorationFigure);
254
				if (result == null) result = caseLayoutable(decorationFigure);
248
				if (result == null) result = defaultCase(theEObject);
255
				if (result == null) result = defaultCase(theEObject);
249
				return result;
256
				return result;
250
			}
257
			}
Lines 254-259 Link Here
254
				if (result == null) result = caseFigure(shape);
261
				if (result == null) result = caseFigure(shape);
255
				if (result == null) result = caseFigureMarker(shape);
262
				if (result == null) result = caseFigureMarker(shape);
256
				if (result == null) result = caseIdentity(shape);
263
				if (result == null) result = caseIdentity(shape);
264
				if (result == null) result = caseLayoutable(shape);
257
				if (result == null) result = defaultCase(theEObject);
265
				if (result == null) result = defaultCase(theEObject);
258
				return result;
266
				return result;
259
			}
267
			}
Lines 263-268 Link Here
263
				if (result == null) result = caseFigure(label);
271
				if (result == null) result = caseFigure(label);
264
				if (result == null) result = caseFigureMarker(label);
272
				if (result == null) result = caseFigureMarker(label);
265
				if (result == null) result = caseIdentity(label);
273
				if (result == null) result = caseIdentity(label);
274
				if (result == null) result = caseLayoutable(label);
266
				if (result == null) result = defaultCase(theEObject);
275
				if (result == null) result = defaultCase(theEObject);
267
				return result;
276
				return result;
268
			}
277
			}
Lines 272-277 Link Here
272
				if (result == null) result = caseFigure(labeledContainer);
281
				if (result == null) result = caseFigure(labeledContainer);
273
				if (result == null) result = caseFigureMarker(labeledContainer);
282
				if (result == null) result = caseFigureMarker(labeledContainer);
274
				if (result == null) result = caseIdentity(labeledContainer);
283
				if (result == null) result = caseIdentity(labeledContainer);
284
				if (result == null) result = caseLayoutable(labeledContainer);
275
				if (result == null) result = defaultCase(theEObject);
285
				if (result == null) result = defaultCase(theEObject);
276
				return result;
286
				return result;
277
			}
287
			}
Lines 282-287 Link Here
282
				if (result == null) result = caseFigure(rectangle);
292
				if (result == null) result = caseFigure(rectangle);
283
				if (result == null) result = caseFigureMarker(rectangle);
293
				if (result == null) result = caseFigureMarker(rectangle);
284
				if (result == null) result = caseIdentity(rectangle);
294
				if (result == null) result = caseIdentity(rectangle);
295
				if (result == null) result = caseLayoutable(rectangle);
285
				if (result == null) result = defaultCase(theEObject);
296
				if (result == null) result = defaultCase(theEObject);
286
				return result;
297
				return result;
287
			}
298
			}
Lines 292-297 Link Here
292
				if (result == null) result = caseFigure(roundedRectangle);
303
				if (result == null) result = caseFigure(roundedRectangle);
293
				if (result == null) result = caseFigureMarker(roundedRectangle);
304
				if (result == null) result = caseFigureMarker(roundedRectangle);
294
				if (result == null) result = caseIdentity(roundedRectangle);
305
				if (result == null) result = caseIdentity(roundedRectangle);
306
				if (result == null) result = caseLayoutable(roundedRectangle);
295
				if (result == null) result = defaultCase(theEObject);
307
				if (result == null) result = defaultCase(theEObject);
296
				return result;
308
				return result;
297
			}
309
			}
Lines 302-307 Link Here
302
				if (result == null) result = caseFigure(ellipse);
314
				if (result == null) result = caseFigure(ellipse);
303
				if (result == null) result = caseFigureMarker(ellipse);
315
				if (result == null) result = caseFigureMarker(ellipse);
304
				if (result == null) result = caseIdentity(ellipse);
316
				if (result == null) result = caseIdentity(ellipse);
317
				if (result == null) result = caseLayoutable(ellipse);
305
				if (result == null) result = defaultCase(theEObject);
318
				if (result == null) result = defaultCase(theEObject);
306
				return result;
319
				return result;
307
			}
320
			}
Lines 312-317 Link Here
312
				if (result == null) result = caseFigure(polyline);
325
				if (result == null) result = caseFigure(polyline);
313
				if (result == null) result = caseFigureMarker(polyline);
326
				if (result == null) result = caseFigureMarker(polyline);
314
				if (result == null) result = caseIdentity(polyline);
327
				if (result == null) result = caseIdentity(polyline);
328
				if (result == null) result = caseLayoutable(polyline);
315
				if (result == null) result = defaultCase(theEObject);
329
				if (result == null) result = defaultCase(theEObject);
316
				return result;
330
				return result;
317
			}
331
			}
Lines 323-328 Link Here
323
				if (result == null) result = caseFigure(polygon);
337
				if (result == null) result = caseFigure(polygon);
324
				if (result == null) result = caseFigureMarker(polygon);
338
				if (result == null) result = caseFigureMarker(polygon);
325
				if (result == null) result = caseIdentity(polygon);
339
				if (result == null) result = caseIdentity(polygon);
340
				if (result == null) result = caseLayoutable(polygon);
326
				if (result == null) result = defaultCase(theEObject);
341
				if (result == null) result = defaultCase(theEObject);
327
				return result;
342
				return result;
328
			}
343
			}
Lines 335-340 Link Here
335
				if (result == null) result = caseFigure(polylineConnection);
350
				if (result == null) result = caseFigure(polylineConnection);
336
				if (result == null) result = caseFigureMarker(polylineConnection);
351
				if (result == null) result = caseFigureMarker(polylineConnection);
337
				if (result == null) result = caseIdentity(polylineConnection);
352
				if (result == null) result = caseIdentity(polylineConnection);
353
				if (result == null) result = caseLayoutable(polylineConnection);
338
				if (result == null) result = defaultCase(theEObject);
354
				if (result == null) result = defaultCase(theEObject);
339
				return result;
355
				return result;
340
			}
356
			}
Lines 347-352 Link Here
347
				if (result == null) result = caseFigure(polylineDecoration);
363
				if (result == null) result = caseFigure(polylineDecoration);
348
				if (result == null) result = caseFigureMarker(polylineDecoration);
364
				if (result == null) result = caseFigureMarker(polylineDecoration);
349
				if (result == null) result = caseIdentity(polylineDecoration);
365
				if (result == null) result = caseIdentity(polylineDecoration);
366
				if (result == null) result = caseLayoutable(polylineDecoration);
350
				if (result == null) result = defaultCase(theEObject);
367
				if (result == null) result = defaultCase(theEObject);
351
				return result;
368
				return result;
352
			}
369
			}
Lines 360-365 Link Here
360
				if (result == null) result = caseShape(polygonDecoration);
377
				if (result == null) result = caseShape(polygonDecoration);
361
				if (result == null) result = caseFigureMarker(polygonDecoration);
378
				if (result == null) result = caseFigureMarker(polygonDecoration);
362
				if (result == null) result = caseIdentity(polygonDecoration);
379
				if (result == null) result = caseIdentity(polygonDecoration);
380
				if (result == null) result = caseLayoutable(polygonDecoration);
363
				if (result == null) result = defaultCase(theEObject);
381
				if (result == null) result = defaultCase(theEObject);
364
				return result;
382
				return result;
365
			}
383
			}
Lines 376-381 Link Here
376
				if (result == null) result = caseCustomClass(customFigure);
394
				if (result == null) result = caseCustomClass(customFigure);
377
				if (result == null) result = caseFigureMarker(customFigure);
395
				if (result == null) result = caseFigureMarker(customFigure);
378
				if (result == null) result = caseIdentity(customFigure);
396
				if (result == null) result = caseIdentity(customFigure);
397
				if (result == null) result = caseLayoutable(customFigure);
379
				if (result == null) result = defaultCase(theEObject);
398
				if (result == null) result = defaultCase(theEObject);
380
				return result;
399
				return result;
381
			}
400
			}
Lines 388-393 Link Here
388
				if (result == null) result = caseCustomClass(customDecoration);
407
				if (result == null) result = caseCustomClass(customDecoration);
389
				if (result == null) result = caseFigureMarker(customDecoration);
408
				if (result == null) result = caseFigureMarker(customDecoration);
390
				if (result == null) result = caseIdentity(customDecoration);
409
				if (result == null) result = caseIdentity(customDecoration);
410
				if (result == null) result = caseLayoutable(customDecoration);
391
				if (result == null) result = defaultCase(theEObject);
411
				if (result == null) result = defaultCase(theEObject);
392
				return result;
412
				return result;
393
			}
413
			}
Lines 400-405 Link Here
400
				if (result == null) result = caseCustomClass(customConnection);
420
				if (result == null) result = caseCustomClass(customConnection);
401
				if (result == null) result = caseFigureMarker(customConnection);
421
				if (result == null) result = caseFigureMarker(customConnection);
402
				if (result == null) result = caseIdentity(customConnection);
422
				if (result == null) result = caseIdentity(customConnection);
423
				if (result == null) result = caseLayoutable(customConnection);
403
				if (result == null) result = defaultCase(theEObject);
424
				if (result == null) result = defaultCase(theEObject);
404
				return result;
425
				return result;
405
			}
426
			}
Lines 488-493 Link Here
488
				if (result == null) result = defaultCase(theEObject);
509
				if (result == null) result = defaultCase(theEObject);
489
				return result;
510
				return result;
490
			}
511
			}
512
			case GMFGraphPackage.LAYOUT_DATA: {
513
				LayoutData layoutData = (LayoutData)theEObject;
514
				Object result = caseLayoutData(layoutData);
515
				if (result == null) result = caseCustomClass(layoutData);
516
				if (result == null) result = defaultCase(theEObject);
517
				return result;
518
			}
519
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA: {
520
				CustomLayoutData customLayoutData = (CustomLayoutData)theEObject;
521
				Object result = caseCustomLayoutData(customLayoutData);
522
				if (result == null) result = caseLayout(customLayoutData);
523
				if (result == null) result = caseCustomConfigurableClass(customLayoutData);
524
				if (result == null) result = caseCustomClass(customLayoutData);
525
				if (result == null) result = defaultCase(theEObject);
526
				return result;
527
			}
528
			case GMFGraphPackage.GRID_LAYOUT_DATA: {
529
				GridLayoutData gridLayoutData = (GridLayoutData)theEObject;
530
				Object result = caseGridLayoutData(gridLayoutData);
531
				if (result == null) result = caseLayoutData(gridLayoutData);
532
				if (result == null) result = caseCustomClass(gridLayoutData);
533
				if (result == null) result = defaultCase(theEObject);
534
				return result;
535
			}
536
			case GMFGraphPackage.BORDER_LAYOUT_DATA: {
537
				BorderLayoutData borderLayoutData = (BorderLayoutData)theEObject;
538
				Object result = caseBorderLayoutData(borderLayoutData);
539
				if (result == null) result = caseLayoutData(borderLayoutData);
540
				if (result == null) result = caseCustomClass(borderLayoutData);
541
				if (result == null) result = defaultCase(theEObject);
542
				return result;
543
			}
544
			case GMFGraphPackage.LAYOUTABLE: {
545
				Layoutable layoutable = (Layoutable)theEObject;
546
				Object result = caseLayoutable(layoutable);
547
				if (result == null) result = defaultCase(theEObject);
548
				return result;
549
			}
550
			case GMFGraphPackage.LAYOUT: {
551
				Layout layout = (Layout)theEObject;
552
				Object result = caseLayout(layout);
553
				if (result == null) result = caseCustomClass(layout);
554
				if (result == null) result = defaultCase(theEObject);
555
				return result;
556
			}
557
			case GMFGraphPackage.CUSTOM_LAYOUT: {
558
				CustomLayout customLayout = (CustomLayout)theEObject;
559
				Object result = caseCustomLayout(customLayout);
560
				if (result == null) result = caseLayout(customLayout);
561
				if (result == null) result = caseCustomConfigurableClass(customLayout);
562
				if (result == null) result = caseCustomClass(customLayout);
563
				if (result == null) result = defaultCase(theEObject);
564
				return result;
565
			}
566
			case GMFGraphPackage.GRID_LAYOUT: {
567
				GridLayout gridLayout = (GridLayout)theEObject;
568
				Object result = caseGridLayout(gridLayout);
569
				if (result == null) result = caseLayout(gridLayout);
570
				if (result == null) result = caseCustomClass(gridLayout);
571
				if (result == null) result = defaultCase(theEObject);
572
				return result;
573
			}
574
			case GMFGraphPackage.BORDER_LAYOUT: {
575
				BorderLayout borderLayout = (BorderLayout)theEObject;
576
				Object result = caseBorderLayout(borderLayout);
577
				if (result == null) result = caseLayout(borderLayout);
578
				if (result == null) result = caseCustomClass(borderLayout);
579
				if (result == null) result = defaultCase(theEObject);
580
				return result;
581
			}
582
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS: {
583
				CustomConfigurableClass customConfigurableClass = (CustomConfigurableClass)theEObject;
584
				Object result = caseCustomConfigurableClass(customConfigurableClass);
585
				if (result == null) result = caseCustomClass(customConfigurableClass);
586
				if (result == null) result = defaultCase(theEObject);
587
				return result;
588
			}
589
			case GMFGraphPackage.CUSTOM_ATTRIBUTE: {
590
				CustomAttribute customAttribute = (CustomAttribute)theEObject;
591
				Object result = caseCustomAttribute(customAttribute);
592
				if (result == null) result = defaultCase(theEObject);
593
				return result;
594
			}
491
			default: return defaultCase(theEObject);
595
			default: return defaultCase(theEObject);
492
		}
596
		}
493
	}
597
	}
Lines 1153-1158 Link Here
1153
	}
1257
	}
1154
1258
1155
	/**
1259
	/**
1260
	 * Returns the result of interpretting the object as an instance of '<em>Layout Data</em>'.
1261
	 * <!-- begin-user-doc -->
1262
	 * This implementation returns null;
1263
	 * returning a non-null result will terminate the switch.
1264
	 * <!-- end-user-doc -->
1265
	 * @param object the target of the switch.
1266
	 * @return the result of interpretting the object as an instance of '<em>Layout Data</em>'.
1267
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1268
	 * @generated
1269
	 */
1270
	public Object caseLayoutData(LayoutData object) {
1271
		return null;
1272
	}
1273
1274
	/**
1275
	 * Returns the result of interpretting the object as an instance of '<em>Custom Layout Data</em>'.
1276
	 * <!-- begin-user-doc -->
1277
	 * This implementation returns null;
1278
	 * returning a non-null result will terminate the switch.
1279
	 * <!-- end-user-doc -->
1280
	 * @param object the target of the switch.
1281
	 * @return the result of interpretting the object as an instance of '<em>Custom Layout Data</em>'.
1282
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1283
	 * @generated
1284
	 */
1285
	public Object caseCustomLayoutData(CustomLayoutData object) {
1286
		return null;
1287
	}
1288
1289
	/**
1290
	 * Returns the result of interpretting the object as an instance of '<em>Grid Layout Data</em>'.
1291
	 * <!-- begin-user-doc -->
1292
	 * This implementation returns null;
1293
	 * returning a non-null result will terminate the switch.
1294
	 * <!-- end-user-doc -->
1295
	 * @param object the target of the switch.
1296
	 * @return the result of interpretting the object as an instance of '<em>Grid Layout Data</em>'.
1297
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1298
	 * @generated
1299
	 */
1300
	public Object caseGridLayoutData(GridLayoutData object) {
1301
		return null;
1302
	}
1303
1304
	/**
1305
	 * Returns the result of interpretting the object as an instance of '<em>Border Layout Data</em>'.
1306
	 * <!-- begin-user-doc -->
1307
	 * This implementation returns null;
1308
	 * returning a non-null result will terminate the switch.
1309
	 * <!-- end-user-doc -->
1310
	 * @param object the target of the switch.
1311
	 * @return the result of interpretting the object as an instance of '<em>Border Layout Data</em>'.
1312
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1313
	 * @generated
1314
	 */
1315
	public Object caseBorderLayoutData(BorderLayoutData object) {
1316
		return null;
1317
	}
1318
1319
	/**
1320
	 * Returns the result of interpretting the object as an instance of '<em>Layoutable</em>'.
1321
	 * <!-- begin-user-doc -->
1322
	 * This implementation returns null;
1323
	 * returning a non-null result will terminate the switch.
1324
	 * <!-- end-user-doc -->
1325
	 * @param object the target of the switch.
1326
	 * @return the result of interpretting the object as an instance of '<em>Layoutable</em>'.
1327
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1328
	 * @generated
1329
	 */
1330
	public Object caseLayoutable(Layoutable object) {
1331
		return null;
1332
	}
1333
1334
	/**
1335
	 * Returns the result of interpretting the object as an instance of '<em>Layout</em>'.
1336
	 * <!-- begin-user-doc -->
1337
	 * This implementation returns null;
1338
	 * returning a non-null result will terminate the switch.
1339
	 * <!-- end-user-doc -->
1340
	 * @param object the target of the switch.
1341
	 * @return the result of interpretting the object as an instance of '<em>Layout</em>'.
1342
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1343
	 * @generated
1344
	 */
1345
	public Object caseLayout(Layout object) {
1346
		return null;
1347
	}
1348
1349
	/**
1350
	 * Returns the result of interpretting the object as an instance of '<em>Custom Layout</em>'.
1351
	 * <!-- begin-user-doc -->
1352
	 * This implementation returns null;
1353
	 * returning a non-null result will terminate the switch.
1354
	 * <!-- end-user-doc -->
1355
	 * @param object the target of the switch.
1356
	 * @return the result of interpretting the object as an instance of '<em>Custom Layout</em>'.
1357
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1358
	 * @generated
1359
	 */
1360
	public Object caseCustomLayout(CustomLayout object) {
1361
		return null;
1362
	}
1363
1364
	/**
1365
	 * Returns the result of interpretting the object as an instance of '<em>Grid Layout</em>'.
1366
	 * <!-- begin-user-doc -->
1367
	 * This implementation returns null;
1368
	 * returning a non-null result will terminate the switch.
1369
	 * <!-- end-user-doc -->
1370
	 * @param object the target of the switch.
1371
	 * @return the result of interpretting the object as an instance of '<em>Grid Layout</em>'.
1372
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1373
	 * @generated
1374
	 */
1375
	public Object caseGridLayout(GridLayout object) {
1376
		return null;
1377
	}
1378
1379
	/**
1380
	 * Returns the result of interpretting the object as an instance of '<em>Border Layout</em>'.
1381
	 * <!-- begin-user-doc -->
1382
	 * This implementation returns null;
1383
	 * returning a non-null result will terminate the switch.
1384
	 * <!-- end-user-doc -->
1385
	 * @param object the target of the switch.
1386
	 * @return the result of interpretting the object as an instance of '<em>Border Layout</em>'.
1387
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1388
	 * @generated
1389
	 */
1390
	public Object caseBorderLayout(BorderLayout object) {
1391
		return null;
1392
	}
1393
1394
	/**
1395
	 * Returns the result of interpretting the object as an instance of '<em>Custom Configurable Class</em>'.
1396
	 * <!-- begin-user-doc -->
1397
	 * This implementation returns null;
1398
	 * returning a non-null result will terminate the switch.
1399
	 * <!-- end-user-doc -->
1400
	 * @param object the target of the switch.
1401
	 * @return the result of interpretting the object as an instance of '<em>Custom Configurable Class</em>'.
1402
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1403
	 * @generated
1404
	 */
1405
	public Object caseCustomConfigurableClass(CustomConfigurableClass object) {
1406
		return null;
1407
	}
1408
1409
	/**
1410
	 * Returns the result of interpretting the object as an instance of '<em>Custom Attribute</em>'.
1411
	 * <!-- begin-user-doc -->
1412
	 * This implementation returns null;
1413
	 * returning a non-null result will terminate the switch.
1414
	 * <!-- end-user-doc -->
1415
	 * @param object the target of the switch.
1416
	 * @return the result of interpretting the object as an instance of '<em>Custom Attribute</em>'.
1417
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
1418
	 * @generated
1419
	 */
1420
	public Object caseCustomAttribute(CustomAttribute object) {
1421
		return null;
1422
	}
1423
1424
	/**
1156
	 * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
1425
	 * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
1157
	 * <!-- begin-user-doc -->
1426
	 * <!-- begin-user-doc -->
1158
	 * This implementation returns null;
1427
	 * This implementation returns null;
(-)models/gmfgraph.ecore (-2 / +75 lines)
Lines 65-71 Link Here
65
  <eClassifiers xsi:type="ecore:EClass" name="GradientFacet" eSuperTypes="#//VisualFacet">
65
  <eClassifiers xsi:type="ecore:EClass" name="GradientFacet" eSuperTypes="#//VisualFacet">
66
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="#//Direction"/>
66
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="#//Direction"/>
67
  </eClassifiers>
67
  </eClassifiers>
68
  <eClassifiers xsi:type="ecore:EClass" name="FigureMarker" interface="true">
68
  <eClassifiers xsi:type="ecore:EClass" name="FigureMarker" interface="true" eSuperTypes="#//Layoutable">
69
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
69
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
70
      <details key="documentation" value="Anything you could combine visual representation from. Ordinary GEF figures, custom-defined or references to defined elsewhere."/>
70
      <details key="documentation" value="Anything you could combine visual representation from. Ordinary GEF figures, custom-defined or references to defined elsewhere."/>
71
    </eAnnotations>
71
    </eAnnotations>
Lines 97-103 Link Here
97
        containment="true"/>
97
        containment="true"/>
98
    <eStructuralFeatures xsi:type="ecore:EReference" name="size" eType="#//Point"
98
    <eStructuralFeatures xsi:type="ecore:EReference" name="size" eType="#//Point"
99
        containment="true"/>
99
        containment="true"/>
100
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="layoutManager" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
101
  </eClassifiers>
100
  </eClassifiers>
102
  <eClassifiers xsi:type="ecore:EClass" name="FigureRef" eSuperTypes="#//FigureMarker">
101
  <eClassifiers xsi:type="ecore:EClass" name="FigureRef" eSuperTypes="#//FigureMarker">
103
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
102
    <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
Lines 300-303 Link Here
300
    <eLiterals name="LINE_DASHDOTDOT" value="5"/>
299
    <eLiterals name="LINE_DASHDOTDOT" value="5"/>
301
    <eLiterals name="LINE_CUSTOM" value="6"/>
300
    <eLiterals name="LINE_CUSTOM" value="6"/>
302
  </eClassifiers>
301
  </eClassifiers>
302
  <eClassifiers xsi:type="ecore:EClass" name="LayoutData" interface="true" eSuperTypes="#//CustomClass">
303
    <eStructuralFeatures xsi:type="ecore:EReference" name="owner" lowerBound="1" eType="#//Layoutable"
304
        eOpposite="#//Layoutable/data"/>
305
  </eClassifiers>
306
  <eClassifiers xsi:type="ecore:EClass" name="CustomLayoutData" eSuperTypes="#//Layout #//CustomConfigurableClass"/>
307
  <eClassifiers xsi:type="ecore:EClass" name="GridLayoutData" eSuperTypes="#//LayoutData">
308
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="grabExcessHorizontalSpace"
309
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
310
        defaultValueLiteral="false"/>
311
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="grabExcessVerticalSpace"
312
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
313
        defaultValueLiteral="false"/>
314
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="verticalAlignment" lowerBound="1"
315
        eType="#//Alignment" defaultValueLiteral="CENTER"/>
316
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="horizontalAlignment" lowerBound="1"
317
        eType="#//Alignment" defaultValueLiteral="CENTER"/>
318
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="verticalSpan" lowerBound="1"
319
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
320
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="horizontalSpan" lowerBound="1"
321
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
322
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="horizontalIndent" lowerBound="1"
323
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
324
    <eStructuralFeatures xsi:type="ecore:EReference" name="sizeHint" eType="#//Dimension"
325
        containment="true"/>
326
  </eClassifiers>
327
  <eClassifiers xsi:type="ecore:EClass" name="BorderLayoutData" eSuperTypes="#//LayoutData">
328
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="alignment" lowerBound="1"
329
        eType="#//Alignment" defaultValueLiteral="CENTER"/>
330
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="vertical" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
331
        defaultValueLiteral="false"/>
332
  </eClassifiers>
333
  <eClassifiers xsi:type="ecore:EEnum" name="Alignment">
334
    <eLiterals name="BEGINNING"/>
335
    <eLiterals name="CENTER" value="1"/>
336
    <eLiterals name="END" value="2"/>
337
    <eLiterals name="FILL" value="3"/>
338
  </eClassifiers>
339
  <eClassifiers xsi:type="ecore:EClass" name="Layoutable" interface="true">
340
    <eStructuralFeatures xsi:type="ecore:EReference" name="data" eType="#//LayoutData"
341
        containment="true" eOpposite="#//LayoutData/owner"/>
342
    <eStructuralFeatures xsi:type="ecore:EReference" name="layout" eType="#//Layout"
343
        containment="true"/>
344
  </eClassifiers>
345
  <eClassifiers xsi:type="ecore:EClass" name="Layout" interface="true" eSuperTypes="#//CustomClass"/>
346
  <eClassifiers xsi:type="ecore:EClass" name="CustomLayout" eSuperTypes="#//Layout #//CustomConfigurableClass"/>
347
  <eClassifiers xsi:type="ecore:EClass" name="GridLayout" eSuperTypes="#//Layout">
348
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="numColumns" lowerBound="1"
349
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="1"/>
350
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="equalWidth" lowerBound="1"
351
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
352
    <eStructuralFeatures xsi:type="ecore:EReference" name="margins" eType="#//Dimension"
353
        containment="true"/>
354
    <eStructuralFeatures xsi:type="ecore:EReference" name="spacing" eType="#//Dimension"
355
        containment="true"/>
356
  </eClassifiers>
357
  <eClassifiers xsi:type="ecore:EClass" name="BorderLayout" eSuperTypes="#//Layout">
358
    <eStructuralFeatures xsi:type="ecore:EReference" name="spacing" eType="#//Dimension"
359
        containment="true"/>
360
  </eClassifiers>
361
  <eClassifiers xsi:type="ecore:EClass" name="CustomConfigurableClass" eSuperTypes="#//CustomClass">
362
    <eStructuralFeatures xsi:type="ecore:EReference" name="attributes" upperBound="-1"
363
        eType="#//CustomAttribute" containment="true"/>
364
  </eClassifiers>
365
  <eClassifiers xsi:type="ecore:EClass" name="CustomAttribute">
366
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
367
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
368
        defaultValueLiteral="Object"/>
369
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
370
        defaultValueLiteral="null"/>
371
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="directAccess" lowerBound="1"
372
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
373
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiStatementValue" lowerBound="1"
374
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
375
  </eClassifiers>
303
</ecore:EPackage>
376
</ecore:EPackage>
(-)models/gmfgraph.genmodel (-1 / +49 lines)
Lines 50-55 Link Here
50
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//LineKind/LINE_DASHDOTDOT"/>
50
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//LineKind/LINE_DASHDOTDOT"/>
51
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//LineKind/LINE_CUSTOM"/>
51
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//LineKind/LINE_CUSTOM"/>
52
    </genEnums>
52
    </genEnums>
53
    <genEnums ecoreEnum="gmfgraph.ecore#//Alignment">
54
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/BEGINNING"/>
55
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/CENTER"/>
56
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/END"/>
57
      <genEnumLiterals ecoreEnumLiteral="gmfgraph.ecore#//Alignment/FILL"/>
58
    </genEnums>
53
    <genClasses ecoreClass="gmfgraph.ecore#//Canvas">
59
    <genClasses ecoreClass="gmfgraph.ecore#//Canvas">
54
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/figures"/>
60
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/figures"/>
55
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/nodes"/>
61
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Canvas/nodes"/>
Lines 99-105 Link Here
99
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/border"/>
105
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/border"/>
100
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/location"/>
106
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/location"/>
101
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/size"/>
107
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Figure/size"/>
102
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//Figure/layoutManager"/>
103
    </genClasses>
108
    </genClasses>
104
    <genClasses ecoreClass="gmfgraph.ecore#//FigureRef">
109
    <genClasses ecoreClass="gmfgraph.ecore#//FigureRef">
105
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgraph.ecore#//FigureRef/figure"/>
110
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgraph.ecore#//FigureRef/figure"/>
Lines 184-188 Link Here
184
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//CompoundBorder/inner"/>
189
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//CompoundBorder/inner"/>
185
    </genClasses>
190
    </genClasses>
186
    <genClasses ecoreClass="gmfgraph.ecore#//CustomBorder"/>
191
    <genClasses ecoreClass="gmfgraph.ecore#//CustomBorder"/>
192
    <genClasses ecoreClass="gmfgraph.ecore#//LayoutData">
193
      <genFeatures notify="false" createChild="false" ecoreFeature="ecore:EReference gmfgraph.ecore#//LayoutData/owner"/>
194
    </genClasses>
195
    <genClasses ecoreClass="gmfgraph.ecore#//CustomLayoutData"/>
196
    <genClasses ecoreClass="gmfgraph.ecore#//GridLayoutData">
197
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/grabExcessHorizontalSpace"/>
198
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/grabExcessVerticalSpace"/>
199
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/verticalAlignment"/>
200
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/horizontalAlignment"/>
201
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/verticalSpan"/>
202
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/horizontalSpan"/>
203
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayoutData/horizontalIndent"/>
204
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//GridLayoutData/sizeHint"/>
205
    </genClasses>
206
    <genClasses ecoreClass="gmfgraph.ecore#//BorderLayoutData">
207
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//BorderLayoutData/alignment"/>
208
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//BorderLayoutData/vertical"/>
209
    </genClasses>
210
    <genClasses ecoreClass="gmfgraph.ecore#//Layoutable">
211
      <genFeatures notify="false" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Layoutable/data"/>
212
      <genFeatures notify="false" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//Layoutable/layout"/>
213
    </genClasses>
214
    <genClasses ecoreClass="gmfgraph.ecore#//Layout"/>
215
    <genClasses ecoreClass="gmfgraph.ecore#//CustomLayout"/>
216
    <genClasses ecoreClass="gmfgraph.ecore#//GridLayout">
217
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayout/numColumns"/>
218
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//GridLayout/equalWidth"/>
219
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//GridLayout/margins"/>
220
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//GridLayout/spacing"/>
221
    </genClasses>
222
    <genClasses ecoreClass="gmfgraph.ecore#//BorderLayout">
223
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//BorderLayout/spacing"/>
224
    </genClasses>
225
    <genClasses ecoreClass="gmfgraph.ecore#//CustomConfigurableClass">
226
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference gmfgraph.ecore#//CustomConfigurableClass/attributes"/>
227
    </genClasses>
228
    <genClasses ecoreClass="gmfgraph.ecore#//CustomAttribute">
229
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomAttribute/name"/>
230
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomAttribute/type"/>
231
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomAttribute/value"/>
232
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomAttribute/directAccess"/>
233
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute gmfgraph.ecore#//CustomAttribute/multiStatementValue"/>
234
    </genClasses>
187
  </genPackages>
235
  </genPackages>
188
</genmodel:GenModel>
236
</genmodel:GenModel>
(-)src/org/eclipse/gmf/gmfgraph/Alignment.java (+205 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import java.util.Arrays;
10
import java.util.Collections;
11
import java.util.List;
12
13
import org.eclipse.emf.common.util.AbstractEnumerator;
14
15
/**
16
 * <!-- begin-user-doc -->
17
 * A representation of the literals of the enumeration '<em><b>Alignment</b></em>',
18
 * and utility methods for working with them.
19
 * <!-- end-user-doc -->
20
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getAlignment()
21
 * @model
22
 * @generated
23
 */
24
public final class Alignment extends AbstractEnumerator {
25
	/**
26
	 * The '<em><b>BEGINNING</b></em>' literal value.
27
	 * <!-- begin-user-doc -->
28
	 * <p>
29
	 * If the meaning of '<em><b>BEGINNING</b></em>' literal object isn't clear,
30
	 * there really should be more of a description here...
31
	 * </p>
32
	 * <!-- end-user-doc -->
33
	 * @see #BEGINNING_LITERAL
34
	 * @model
35
	 * @generated
36
	 * @ordered
37
	 */
38
	public static final int BEGINNING = 0;
39
40
	/**
41
	 * The '<em><b>CENTER</b></em>' literal value.
42
	 * <!-- begin-user-doc -->
43
	 * <p>
44
	 * If the meaning of '<em><b>CENTER</b></em>' literal object isn't clear,
45
	 * there really should be more of a description here...
46
	 * </p>
47
	 * <!-- end-user-doc -->
48
	 * @see #CENTER_LITERAL
49
	 * @model
50
	 * @generated
51
	 * @ordered
52
	 */
53
	public static final int CENTER = 1;
54
55
	/**
56
	 * The '<em><b>END</b></em>' literal value.
57
	 * <!-- begin-user-doc -->
58
	 * <p>
59
	 * If the meaning of '<em><b>END</b></em>' literal object isn't clear,
60
	 * there really should be more of a description here...
61
	 * </p>
62
	 * <!-- end-user-doc -->
63
	 * @see #END_LITERAL
64
	 * @model
65
	 * @generated
66
	 * @ordered
67
	 */
68
	public static final int END = 2;
69
70
	/**
71
	 * The '<em><b>FILL</b></em>' literal value.
72
	 * <!-- begin-user-doc -->
73
	 * <p>
74
	 * If the meaning of '<em><b>FILL</b></em>' literal object isn't clear,
75
	 * there really should be more of a description here...
76
	 * </p>
77
	 * <!-- end-user-doc -->
78
	 * @see #FILL_LITERAL
79
	 * @model
80
	 * @generated
81
	 * @ordered
82
	 */
83
	public static final int FILL = 3;
84
85
	/**
86
	 * The '<em><b>BEGINNING</b></em>' literal object.
87
	 * <!-- begin-user-doc -->
88
	 * <!-- end-user-doc -->
89
	 * @see #BEGINNING
90
	 * @generated
91
	 * @ordered
92
	 */
93
	public static final Alignment BEGINNING_LITERAL = new Alignment(BEGINNING, "BEGINNING", "BEGINNING");
94
95
	/**
96
	 * The '<em><b>CENTER</b></em>' literal object.
97
	 * <!-- begin-user-doc -->
98
	 * <!-- end-user-doc -->
99
	 * @see #CENTER
100
	 * @generated
101
	 * @ordered
102
	 */
103
	public static final Alignment CENTER_LITERAL = new Alignment(CENTER, "CENTER", "CENTER");
104
105
	/**
106
	 * The '<em><b>END</b></em>' literal object.
107
	 * <!-- begin-user-doc -->
108
	 * <!-- end-user-doc -->
109
	 * @see #END
110
	 * @generated
111
	 * @ordered
112
	 */
113
	public static final Alignment END_LITERAL = new Alignment(END, "END", "END");
114
115
	/**
116
	 * The '<em><b>FILL</b></em>' literal object.
117
	 * <!-- begin-user-doc -->
118
	 * <!-- end-user-doc -->
119
	 * @see #FILL
120
	 * @generated
121
	 * @ordered
122
	 */
123
	public static final Alignment FILL_LITERAL = new Alignment(FILL, "FILL", "FILL");
124
125
	/**
126
	 * An array of all the '<em><b>Alignment</b></em>' enumerators.
127
	 * <!-- begin-user-doc -->
128
	 * <!-- end-user-doc -->
129
	 * @generated
130
	 */
131
	private static final Alignment[] VALUES_ARRAY =
132
		new Alignment[] {
133
			BEGINNING_LITERAL,
134
			CENTER_LITERAL,
135
			END_LITERAL,
136
			FILL_LITERAL,
137
		};
138
139
	/**
140
	 * A public read-only list of all the '<em><b>Alignment</b></em>' enumerators.
141
	 * <!-- begin-user-doc -->
142
	 * <!-- end-user-doc -->
143
	 * @generated
144
	 */
145
	public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
146
147
	/**
148
	 * Returns the '<em><b>Alignment</b></em>' literal with the specified literal value.
149
	 * <!-- begin-user-doc -->
150
	 * <!-- end-user-doc -->
151
	 * @generated
152
	 */
153
	public static Alignment get(String literal) {
154
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
155
			Alignment result = VALUES_ARRAY[i];
156
			if (result.toString().equals(literal)) {
157
				return result;
158
			}
159
		}
160
		return null;
161
	}
162
163
	/**
164
	 * Returns the '<em><b>Alignment</b></em>' literal with the specified name.
165
	 * <!-- begin-user-doc -->
166
	 * <!-- end-user-doc -->
167
	 * @generated
168
	 */
169
	public static Alignment getByName(String name) {
170
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
171
			Alignment result = VALUES_ARRAY[i];
172
			if (result.getName().equals(name)) {
173
				return result;
174
			}
175
		}
176
		return null;
177
	}
178
179
	/**
180
	 * Returns the '<em><b>Alignment</b></em>' literal with the specified integer value.
181
	 * <!-- begin-user-doc -->
182
	 * <!-- end-user-doc -->
183
	 * @generated
184
	 */
185
	public static Alignment get(int value) {
186
		switch (value) {
187
			case BEGINNING: return BEGINNING_LITERAL;
188
			case CENTER: return CENTER_LITERAL;
189
			case END: return END_LITERAL;
190
			case FILL: return FILL_LITERAL;
191
		}
192
		return null;	
193
	}
194
195
	/**
196
	 * Only this class can construct instances.
197
	 * <!-- begin-user-doc -->
198
	 * <!-- end-user-doc -->
199
	 * @generated
200
	 */
201
	private Alignment(int value, String name, String literal) {
202
		super(value, name, literal);
203
	}
204
205
} //Alignment
(-)src/org/eclipse/gmf/gmfgraph/impl/BorderLayoutDataImpl.java (+431 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
11
import org.eclipse.emf.common.notify.NotificationChain;
12
13
import org.eclipse.emf.ecore.EClass;
14
15
import org.eclipse.emf.ecore.InternalEObject;
16
17
import org.eclipse.emf.ecore.impl.ENotificationImpl;
18
19
import org.eclipse.emf.ecore.impl.EObjectImpl;
20
21
import org.eclipse.emf.ecore.util.EcoreUtil;
22
23
import org.eclipse.gmf.gmfgraph.Alignment;
24
import org.eclipse.gmf.gmfgraph.BorderLayoutData;
25
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
26
27
import org.eclipse.gmf.gmfgraph.Layoutable;
28
29
/**
30
 * <!-- begin-user-doc -->
31
 * An implementation of the model object '<em><b>Border Layout Data</b></em>'.
32
 * <!-- end-user-doc -->
33
 * <p>
34
 * The following features are implemented:
35
 * <ul>
36
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
37
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl#getBundleName <em>Bundle Name</em>}</li>
38
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl#getOwner <em>Owner</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl#getAlignment <em>Alignment</em>}</li>
40
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutDataImpl#isVertical <em>Vertical</em>}</li>
41
 * </ul>
42
 * </p>
43
 *
44
 * @generated
45
 */
46
public class BorderLayoutDataImpl extends EObjectImpl implements BorderLayoutData {
47
	/**
48
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @see #getQualifiedClassName()
52
	 * @generated
53
	 * @ordered
54
	 */
55
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
56
57
	/**
58
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
59
	 * <!-- begin-user-doc -->
60
	 * <!-- end-user-doc -->
61
	 * @see #getQualifiedClassName()
62
	 * @generated
63
	 * @ordered
64
	 */
65
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
66
67
	/**
68
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
69
	 * <!-- begin-user-doc -->
70
	 * <!-- end-user-doc -->
71
	 * @see #getBundleName()
72
	 * @generated
73
	 * @ordered
74
	 */
75
	protected static final String BUNDLE_NAME_EDEFAULT = null;
76
77
	/**
78
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
79
	 * <!-- begin-user-doc -->
80
	 * <!-- end-user-doc -->
81
	 * @see #getBundleName()
82
	 * @generated
83
	 * @ordered
84
	 */
85
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
86
87
	/**
88
	 * The default value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
89
	 * <!-- begin-user-doc -->
90
	 * <!-- end-user-doc -->
91
	 * @see #getAlignment()
92
	 * @generated
93
	 * @ordered
94
	 */
95
	protected static final Alignment ALIGNMENT_EDEFAULT = Alignment.CENTER_LITERAL;
96
97
	/**
98
	 * The cached value of the '{@link #getAlignment() <em>Alignment</em>}' attribute.
99
	 * <!-- begin-user-doc -->
100
	 * <!-- end-user-doc -->
101
	 * @see #getAlignment()
102
	 * @generated
103
	 * @ordered
104
	 */
105
	protected Alignment alignment = ALIGNMENT_EDEFAULT;
106
107
	/**
108
	 * The default value of the '{@link #isVertical() <em>Vertical</em>}' attribute.
109
	 * <!-- begin-user-doc -->
110
	 * <!-- end-user-doc -->
111
	 * @see #isVertical()
112
	 * @generated
113
	 * @ordered
114
	 */
115
	protected static final boolean VERTICAL_EDEFAULT = false;
116
117
	/**
118
	 * The cached value of the '{@link #isVertical() <em>Vertical</em>}' attribute.
119
	 * <!-- begin-user-doc -->
120
	 * <!-- end-user-doc -->
121
	 * @see #isVertical()
122
	 * @generated
123
	 * @ordered
124
	 */
125
	protected boolean vertical = VERTICAL_EDEFAULT;
126
127
	/**
128
	 * <!-- begin-user-doc -->
129
	 * <!-- end-user-doc -->
130
	 * @generated
131
	 */
132
	protected BorderLayoutDataImpl() {
133
		super();
134
	}
135
136
	/**
137
	 * <!-- begin-user-doc -->
138
	 * <!-- end-user-doc -->
139
	 * @generated
140
	 */
141
	protected EClass eStaticClass() {
142
		return GMFGraphPackage.eINSTANCE.getBorderLayoutData();
143
	}
144
145
	/**
146
	 * <!-- begin-user-doc -->
147
	 * <!-- end-user-doc -->
148
	 * @generated
149
	 */
150
	public String getQualifiedClassNameGen() {
151
		return qualifiedClassName;
152
	}
153
154
	/**
155
	 * @generated NOT
156
	 */
157
	public String getQualifiedClassName() {
158
		return "java.lang.Object";
159
	}
160
	
161
162
	/**
163
	 * <!-- begin-user-doc -->
164
	 * <!-- end-user-doc -->
165
	 * @generated
166
	 */
167
	public void setQualifiedClassNameGen(String newQualifiedClassName) {
168
		String oldQualifiedClassName = qualifiedClassName;
169
		qualifiedClassName = newQualifiedClassName;
170
		if (eNotificationRequired())
171
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
172
	}
173
174
	/**
175
	 * @generated NOT
176
	 */
177
	public void setQualifiedClassName(String newQualifiedClassName) {
178
		//throw new UnsupportedOperationException("You can not change predefined name of implementation class");
179
	}
180
181
	/**
182
	 * <!-- begin-user-doc -->
183
	 * <!-- end-user-doc -->
184
	 * @generated
185
	 */
186
	public String getBundleName() {
187
		return bundleName;
188
	}
189
190
	/**
191
	 * <!-- begin-user-doc -->
192
	 * <!-- end-user-doc -->
193
	 * @generated
194
	 */
195
	public void setBundleName(String newBundleName) {
196
		String oldBundleName = bundleName;
197
		bundleName = newBundleName;
198
		if (eNotificationRequired())
199
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME, oldBundleName, bundleName));
200
	}
201
202
	/**
203
	 * <!-- begin-user-doc -->
204
	 * <!-- end-user-doc -->
205
	 * @generated
206
	 */
207
	public Layoutable getOwner() {
208
		if (eContainerFeatureID != GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER) return null;
209
		return (Layoutable)eContainer();
210
	}
211
212
	/**
213
	 * <!-- begin-user-doc -->
214
	 * <!-- end-user-doc -->
215
	 * @generated
216
	 */
217
	public void setOwner(Layoutable newOwner) {
218
		if (newOwner != eInternalContainer() || (eContainerFeatureID != GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER && newOwner != null)) {
219
			if (EcoreUtil.isAncestor(this, newOwner))
220
				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
221
			NotificationChain msgs = null;
222
			if (eInternalContainer() != null)
223
				msgs = eBasicRemoveFromContainer(msgs);
224
			if (newOwner != null)
225
				msgs = ((InternalEObject)newOwner).eInverseAdd(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
226
			msgs = eBasicSetContainer((InternalEObject)newOwner, GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER, msgs);
227
			if (msgs != null) msgs.dispatch();
228
		}
229
		else if (eNotificationRequired())
230
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER, newOwner, newOwner));
231
	}
232
233
	/**
234
	 * <!-- begin-user-doc -->
235
	 * <!-- end-user-doc -->
236
	 * @generated
237
	 */
238
	public Alignment getAlignment() {
239
		return alignment;
240
	}
241
242
	/**
243
	 * <!-- begin-user-doc -->
244
	 * <!-- end-user-doc -->
245
	 * @generated
246
	 */
247
	public void setAlignment(Alignment newAlignment) {
248
		Alignment oldAlignment = alignment;
249
		alignment = newAlignment == null ? ALIGNMENT_EDEFAULT : newAlignment;
250
		if (eNotificationRequired())
251
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT, oldAlignment, alignment));
252
	}
253
254
	/**
255
	 * <!-- begin-user-doc -->
256
	 * <!-- end-user-doc -->
257
	 * @generated
258
	 */
259
	public boolean isVertical() {
260
		return vertical;
261
	}
262
263
	/**
264
	 * <!-- begin-user-doc -->
265
	 * <!-- end-user-doc -->
266
	 * @generated
267
	 */
268
	public void setVertical(boolean newVertical) {
269
		boolean oldVertical = vertical;
270
		vertical = newVertical;
271
		if (eNotificationRequired())
272
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL, oldVertical, vertical));
273
	}
274
275
	/**
276
	 * <!-- begin-user-doc -->
277
	 * <!-- end-user-doc -->
278
	 * @generated
279
	 */
280
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
281
		switch (featureID) {
282
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
283
				if (eInternalContainer() != null)
284
					msgs = eBasicRemoveFromContainer(msgs);
285
				return eBasicSetContainer(otherEnd, GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER, msgs);
286
		}
287
		return super.eInverseAdd(otherEnd, featureID, msgs);
288
	}
289
290
	/**
291
	 * <!-- begin-user-doc -->
292
	 * <!-- end-user-doc -->
293
	 * @generated
294
	 */
295
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
296
		switch (featureID) {
297
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
298
				return eBasicSetContainer(null, GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER, msgs);
299
		}
300
		return super.eInverseRemove(otherEnd, featureID, msgs);
301
	}
302
303
	/**
304
	 * <!-- begin-user-doc -->
305
	 * <!-- end-user-doc -->
306
	 * @generated
307
	 */
308
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
309
		switch (eContainerFeatureID) {
310
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
311
				return eInternalContainer().eInverseRemove(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
312
		}
313
		return super.eBasicRemoveFromContainerFeature(msgs);
314
	}
315
316
	/**
317
	 * <!-- begin-user-doc -->
318
	 * <!-- end-user-doc -->
319
	 * @generated
320
	 */
321
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
322
		switch (featureID) {
323
			case GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
324
				return getQualifiedClassName();
325
			case GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME:
326
				return getBundleName();
327
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
328
				return getOwner();
329
			case GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT:
330
				return getAlignment();
331
			case GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL:
332
				return isVertical() ? Boolean.TRUE : Boolean.FALSE;
333
		}
334
		return super.eGet(featureID, resolve, coreType);
335
	}
336
337
	/**
338
	 * <!-- begin-user-doc -->
339
	 * <!-- end-user-doc -->
340
	 * @generated
341
	 */
342
	public void eSet(int featureID, Object newValue) {
343
		switch (featureID) {
344
			case GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
345
				setQualifiedClassName((String)newValue);
346
				return;
347
			case GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME:
348
				setBundleName((String)newValue);
349
				return;
350
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
351
				setOwner((Layoutable)newValue);
352
				return;
353
			case GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT:
354
				setAlignment((Alignment)newValue);
355
				return;
356
			case GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL:
357
				setVertical(((Boolean)newValue).booleanValue());
358
				return;
359
		}
360
		super.eSet(featureID, newValue);
361
	}
362
363
	/**
364
	 * <!-- begin-user-doc -->
365
	 * <!-- end-user-doc -->
366
	 * @generated
367
	 */
368
	public void eUnset(int featureID) {
369
		switch (featureID) {
370
			case GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
371
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
372
				return;
373
			case GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME:
374
				setBundleName(BUNDLE_NAME_EDEFAULT);
375
				return;
376
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
377
				setOwner((Layoutable)null);
378
				return;
379
			case GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT:
380
				setAlignment(ALIGNMENT_EDEFAULT);
381
				return;
382
			case GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL:
383
				setVertical(VERTICAL_EDEFAULT);
384
				return;
385
		}
386
		super.eUnset(featureID);
387
	}
388
389
	/**
390
	 * <!-- begin-user-doc -->
391
	 * <!-- end-user-doc -->
392
	 * @generated
393
	 */
394
	public boolean eIsSet(int featureID) {
395
		switch (featureID) {
396
			case GMFGraphPackage.BORDER_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
397
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
398
			case GMFGraphPackage.BORDER_LAYOUT_DATA__BUNDLE_NAME:
399
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
400
			case GMFGraphPackage.BORDER_LAYOUT_DATA__OWNER:
401
				return getOwner() != null;
402
			case GMFGraphPackage.BORDER_LAYOUT_DATA__ALIGNMENT:
403
				return alignment != ALIGNMENT_EDEFAULT;
404
			case GMFGraphPackage.BORDER_LAYOUT_DATA__VERTICAL:
405
				return vertical != VERTICAL_EDEFAULT;
406
		}
407
		return super.eIsSet(featureID);
408
	}
409
410
	/**
411
	 * <!-- begin-user-doc -->
412
	 * <!-- end-user-doc -->
413
	 * @generated
414
	 */
415
	public String toString() {
416
		if (eIsProxy()) return super.toString();
417
418
		StringBuffer result = new StringBuffer(super.toString());
419
		result.append(" (qualifiedClassName: ");
420
		result.append(qualifiedClassName);
421
		result.append(", bundleName: ");
422
		result.append(bundleName);
423
		result.append(", alignment: ");
424
		result.append(alignment);
425
		result.append(", vertical: ");
426
		result.append(vertical);
427
		result.append(')');
428
		return result.toString();
429
	}
430
431
} //BorderLayoutDataImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/LayoutDataImpl.java (+305 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
12
import org.eclipse.emf.ecore.EClass;
13
import org.eclipse.emf.ecore.InternalEObject;
14
15
import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
import org.eclipse.emf.ecore.impl.EObjectImpl;
17
18
import org.eclipse.emf.ecore.util.EcoreUtil;
19
20
import org.eclipse.gmf.gmfgraph.Alignment;
21
import org.eclipse.gmf.gmfgraph.Dimension;
22
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
23
import org.eclipse.gmf.gmfgraph.LayoutData;
24
import org.eclipse.gmf.gmfgraph.Layoutable;
25
26
/**
27
 * <!-- begin-user-doc -->
28
 * An implementation of the model object '<em><b>Layout Data</b></em>'.
29
 * <!-- end-user-doc -->
30
 * <p>
31
 * The following features are implemented:
32
 * <ul>
33
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LayoutDataImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
34
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LayoutDataImpl#getBundleName <em>Bundle Name</em>}</li>
35
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LayoutDataImpl#getOwner <em>Owner</em>}</li>
36
 * </ul>
37
 * </p>
38
 *
39
 * @generated
40
 */
41
public class LayoutDataImpl extends EObjectImpl implements LayoutData {
42
	/**
43
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
44
	 * <!-- begin-user-doc -->
45
	 * <!-- end-user-doc -->
46
	 * @see #getQualifiedClassName()
47
	 * @generated
48
	 * @ordered
49
	 */
50
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
51
52
	/**
53
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
54
	 * <!-- begin-user-doc -->
55
	 * <!-- end-user-doc -->
56
	 * @see #getQualifiedClassName()
57
	 * @generated
58
	 * @ordered
59
	 */
60
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
61
62
	/**
63
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
64
	 * <!-- begin-user-doc -->
65
	 * <!-- end-user-doc -->
66
	 * @see #getBundleName()
67
	 * @generated
68
	 * @ordered
69
	 */
70
	protected static final String BUNDLE_NAME_EDEFAULT = null;
71
72
	/**
73
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @see #getBundleName()
77
	 * @generated
78
	 * @ordered
79
	 */
80
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
81
82
	/**
83
	 * <!-- begin-user-doc -->
84
	 * <!-- end-user-doc -->
85
	 * @generated
86
	 */
87
	protected LayoutDataImpl() {
88
		super();
89
	}
90
91
	/**
92
	 * <!-- begin-user-doc -->
93
	 * <!-- end-user-doc -->
94
	 * @generated
95
	 */
96
	protected EClass eStaticClass() {
97
		return GMFGraphPackage.eINSTANCE.getLayoutData();
98
	}
99
100
	/**
101
	 * <!-- begin-user-doc -->
102
	 * <!-- end-user-doc -->
103
	 * @generated
104
	 */
105
	public String getQualifiedClassName() {
106
		return qualifiedClassName;
107
	}
108
109
	/**
110
	 * <!-- begin-user-doc -->
111
	 * <!-- end-user-doc -->
112
	 * @generated
113
	 */
114
	public void setQualifiedClassName(String newQualifiedClassName) {
115
		String oldQualifiedClassName = qualifiedClassName;
116
		qualifiedClassName = newQualifiedClassName;
117
		if (eNotificationRequired())
118
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
119
	}
120
121
	/**
122
	 * <!-- begin-user-doc -->
123
	 * <!-- end-user-doc -->
124
	 * @generated
125
	 */
126
	public String getBundleName() {
127
		return bundleName;
128
	}
129
130
	/**
131
	 * <!-- begin-user-doc -->
132
	 * <!-- end-user-doc -->
133
	 * @generated
134
	 */
135
	public void setBundleName(String newBundleName) {
136
		String oldBundleName = bundleName;
137
		bundleName = newBundleName;
138
		if (eNotificationRequired())
139
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME, oldBundleName, bundleName));
140
	}
141
142
	/**
143
	 * <!-- begin-user-doc -->
144
	 * <!-- end-user-doc -->
145
	 * @generated
146
	 */
147
	public Layoutable getOwner() {
148
		if (eContainerFeatureID != GMFGraphPackage.LAYOUT_DATA__OWNER) return null;
149
		return (Layoutable)eContainer();
150
	}
151
152
	/**
153
	 * <!-- begin-user-doc -->
154
	 * <!-- end-user-doc -->
155
	 * @generated
156
	 */
157
	public void setOwner(Layoutable newOwner) {
158
		if (newOwner != eInternalContainer() || (eContainerFeatureID != GMFGraphPackage.LAYOUT_DATA__OWNER && newOwner != null)) {
159
			if (EcoreUtil.isAncestor(this, newOwner))
160
				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
161
			NotificationChain msgs = null;
162
			if (eInternalContainer() != null)
163
				msgs = eBasicRemoveFromContainer(msgs);
164
			if (newOwner != null)
165
				msgs = ((InternalEObject)newOwner).eInverseAdd(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
166
			msgs = eBasicSetContainer((InternalEObject)newOwner, GMFGraphPackage.LAYOUT_DATA__OWNER, msgs);
167
			if (msgs != null) msgs.dispatch();
168
		}
169
		else if (eNotificationRequired())
170
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LAYOUT_DATA__OWNER, newOwner, newOwner));
171
	}
172
173
	/**
174
	 * <!-- begin-user-doc -->
175
	 * <!-- end-user-doc -->
176
	 * @generated
177
	 */
178
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
179
		switch (featureID) {
180
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
181
				if (eInternalContainer() != null)
182
					msgs = eBasicRemoveFromContainer(msgs);
183
				return eBasicSetContainer(otherEnd, GMFGraphPackage.LAYOUT_DATA__OWNER, msgs);
184
		}
185
		return super.eInverseAdd(otherEnd, featureID, msgs);
186
	}
187
188
	/**
189
	 * <!-- begin-user-doc -->
190
	 * <!-- end-user-doc -->
191
	 * @generated
192
	 */
193
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
194
		switch (featureID) {
195
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
196
				return eBasicSetContainer(null, GMFGraphPackage.LAYOUT_DATA__OWNER, msgs);
197
		}
198
		return super.eInverseRemove(otherEnd, featureID, msgs);
199
	}
200
201
	/**
202
	 * <!-- begin-user-doc -->
203
	 * <!-- end-user-doc -->
204
	 * @generated
205
	 */
206
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
207
		switch (eContainerFeatureID) {
208
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
209
				return eInternalContainer().eInverseRemove(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
210
		}
211
		return super.eBasicRemoveFromContainerFeature(msgs);
212
	}
213
214
	/**
215
	 * <!-- begin-user-doc -->
216
	 * <!-- end-user-doc -->
217
	 * @generated
218
	 */
219
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
220
		switch (featureID) {
221
			case GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME:
222
				return getQualifiedClassName();
223
			case GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME:
224
				return getBundleName();
225
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
226
				return getOwner();
227
		}
228
		return super.eGet(featureID, resolve, coreType);
229
	}
230
231
	/**
232
	 * <!-- begin-user-doc -->
233
	 * <!-- end-user-doc -->
234
	 * @generated
235
	 */
236
	public void eSet(int featureID, Object newValue) {
237
		switch (featureID) {
238
			case GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME:
239
				setQualifiedClassName((String)newValue);
240
				return;
241
			case GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME:
242
				setBundleName((String)newValue);
243
				return;
244
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
245
				setOwner((Layoutable)newValue);
246
				return;
247
		}
248
		super.eSet(featureID, newValue);
249
	}
250
251
	/**
252
	 * <!-- begin-user-doc -->
253
	 * <!-- end-user-doc -->
254
	 * @generated
255
	 */
256
	public void eUnset(int featureID) {
257
		switch (featureID) {
258
			case GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME:
259
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
260
				return;
261
			case GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME:
262
				setBundleName(BUNDLE_NAME_EDEFAULT);
263
				return;
264
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
265
				setOwner((Layoutable)null);
266
				return;
267
		}
268
		super.eUnset(featureID);
269
	}
270
271
	/**
272
	 * <!-- begin-user-doc -->
273
	 * <!-- end-user-doc -->
274
	 * @generated
275
	 */
276
	public boolean eIsSet(int featureID) {
277
		switch (featureID) {
278
			case GMFGraphPackage.LAYOUT_DATA__QUALIFIED_CLASS_NAME:
279
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
280
			case GMFGraphPackage.LAYOUT_DATA__BUNDLE_NAME:
281
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
282
			case GMFGraphPackage.LAYOUT_DATA__OWNER:
283
				return getOwner() != null;
284
		}
285
		return super.eIsSet(featureID);
286
	}
287
288
	/**
289
	 * <!-- begin-user-doc -->
290
	 * <!-- end-user-doc -->
291
	 * @generated
292
	 */
293
	public String toString() {
294
		if (eIsProxy()) return super.toString();
295
296
		StringBuffer result = new StringBuffer(super.toString());
297
		result.append(" (qualifiedClassName: ");
298
		result.append(qualifiedClassName);
299
		result.append(", bundleName: ");
300
		result.append(bundleName);
301
		result.append(')');
302
		return result.toString();
303
	}
304
305
} //LayoutDataImpl
(-)src/org/eclipse/gmf/gmfgraph/CustomAttribute.java (+166 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.ecore.EObject;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Custom Attribute</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 * <p>
17
 * The following features are supported:
18
 * <ul>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getName <em>Name</em>}</li>
20
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getType <em>Type</em>}</li>
21
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getValue <em>Value</em>}</li>
22
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isDirectAccess <em>Direct Access</em>}</li>
23
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isMultiStatementValue <em>Multi Statement Value</em>}</li>
24
 * </ul>
25
 * </p>
26
 *
27
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute()
28
 * @model
29
 * @generated
30
 */
31
public interface CustomAttribute extends EObject {
32
	/**
33
	 * Returns the value of the '<em><b>Name</b></em>' attribute.
34
	 * <!-- begin-user-doc -->
35
	 * <p>
36
	 * If the meaning of the '<em>Name</em>' attribute isn't clear,
37
	 * there really should be more of a description here...
38
	 * </p>
39
	 * <!-- end-user-doc -->
40
	 * @return the value of the '<em>Name</em>' attribute.
41
	 * @see #setName(String)
42
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute_Name()
43
	 * @model required="true"
44
	 * @generated
45
	 */
46
	String getName();
47
48
	/**
49
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getName <em>Name</em>}' attribute.
50
	 * <!-- begin-user-doc -->
51
	 * <!-- end-user-doc -->
52
	 * @param value the new value of the '<em>Name</em>' attribute.
53
	 * @see #getName()
54
	 * @generated
55
	 */
56
	void setName(String value);
57
58
	/**
59
	 * Returns the value of the '<em><b>Type</b></em>' attribute.
60
	 * The default value is <code>"Object"</code>.
61
	 * <!-- begin-user-doc -->
62
	 * <p>
63
	 * If the meaning of the '<em>Type</em>' attribute isn't clear,
64
	 * there really should be more of a description here...
65
	 * </p>
66
	 * <!-- end-user-doc -->
67
	 * @return the value of the '<em>Type</em>' attribute.
68
	 * @see #setType(String)
69
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute_Type()
70
	 * @model default="Object" required="true"
71
	 * @generated
72
	 */
73
	String getType();
74
75
	/**
76
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getType <em>Type</em>}' attribute.
77
	 * <!-- begin-user-doc -->
78
	 * <!-- end-user-doc -->
79
	 * @param value the new value of the '<em>Type</em>' attribute.
80
	 * @see #getType()
81
	 * @generated
82
	 */
83
	void setType(String value);
84
85
	/**
86
	 * Returns the value of the '<em><b>Value</b></em>' attribute.
87
	 * The default value is <code>"null"</code>.
88
	 * <!-- begin-user-doc -->
89
	 * <p>
90
	 * If the meaning of the '<em>Value</em>' attribute isn't clear,
91
	 * there really should be more of a description here...
92
	 * </p>
93
	 * <!-- end-user-doc -->
94
	 * @return the value of the '<em>Value</em>' attribute.
95
	 * @see #setValue(String)
96
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute_Value()
97
	 * @model default="null" required="true"
98
	 * @generated
99
	 */
100
	String getValue();
101
102
	/**
103
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#getValue <em>Value</em>}' attribute.
104
	 * <!-- begin-user-doc -->
105
	 * <!-- end-user-doc -->
106
	 * @param value the new value of the '<em>Value</em>' attribute.
107
	 * @see #getValue()
108
	 * @generated
109
	 */
110
	void setValue(String value);
111
112
	/**
113
	 * Returns the value of the '<em><b>Direct Access</b></em>' attribute.
114
	 * The default value is <code>"false"</code>.
115
	 * <!-- begin-user-doc -->
116
	 * <p>
117
	 * If the meaning of the '<em>Direct Access</em>' attribute isn't clear,
118
	 * there really should be more of a description here...
119
	 * </p>
120
	 * <!-- end-user-doc -->
121
	 * @return the value of the '<em>Direct Access</em>' attribute.
122
	 * @see #setDirectAccess(boolean)
123
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute_DirectAccess()
124
	 * @model default="false" required="true"
125
	 * @generated
126
	 */
127
	boolean isDirectAccess();
128
129
	/**
130
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isDirectAccess <em>Direct Access</em>}' attribute.
131
	 * <!-- begin-user-doc -->
132
	 * <!-- end-user-doc -->
133
	 * @param value the new value of the '<em>Direct Access</em>' attribute.
134
	 * @see #isDirectAccess()
135
	 * @generated
136
	 */
137
	void setDirectAccess(boolean value);
138
139
	/**
140
	 * Returns the value of the '<em><b>Multi Statement Value</b></em>' attribute.
141
	 * The default value is <code>"false"</code>.
142
	 * <!-- begin-user-doc -->
143
	 * <p>
144
	 * If the meaning of the '<em>Multi Statement Value</em>' attribute isn't clear,
145
	 * there really should be more of a description here...
146
	 * </p>
147
	 * <!-- end-user-doc -->
148
	 * @return the value of the '<em>Multi Statement Value</em>' attribute.
149
	 * @see #setMultiStatementValue(boolean)
150
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomAttribute_MultiStatementValue()
151
	 * @model default="false" required="true"
152
	 * @generated
153
	 */
154
	boolean isMultiStatementValue();
155
156
	/**
157
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.CustomAttribute#isMultiStatementValue <em>Multi Statement Value</em>}' attribute.
158
	 * <!-- begin-user-doc -->
159
	 * <!-- end-user-doc -->
160
	 * @param value the new value of the '<em>Multi Statement Value</em>' attribute.
161
	 * @see #isMultiStatementValue()
162
	 * @generated
163
	 */
164
	void setMultiStatementValue(boolean value);
165
166
} // CustomAttribute
(-)src/org/eclipse/gmf/gmfgraph/Layoutable.java (+83 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.ecore.EObject;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Layoutable</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 * <p>
17
 * The following features are supported:
18
 * <ul>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.Layoutable#getData <em>Data</em>}</li>
20
 *   <li>{@link org.eclipse.gmf.gmfgraph.Layoutable#getLayout <em>Layout</em>}</li>
21
 * </ul>
22
 * </p>
23
 *
24
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayoutable()
25
 * @model interface="true" abstract="true"
26
 * @generated
27
 */
28
public interface Layoutable extends EObject {
29
	/**
30
	 * Returns the value of the '<em><b>Data</b></em>' containment reference.
31
	 * It is bidirectional and its opposite is '{@link org.eclipse.gmf.gmfgraph.LayoutData#getOwner <em>Owner</em>}'.
32
	 * <!-- begin-user-doc -->
33
	 * <p>
34
	 * If the meaning of the '<em>Data</em>' containment reference isn't clear,
35
	 * there really should be more of a description here...
36
	 * </p>
37
	 * <!-- end-user-doc -->
38
	 * @return the value of the '<em>Data</em>' containment reference.
39
	 * @see #setData(LayoutData)
40
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayoutable_Data()
41
	 * @see org.eclipse.gmf.gmfgraph.LayoutData#getOwner
42
	 * @model opposite="owner" containment="true"
43
	 * @generated
44
	 */
45
	LayoutData getData();
46
47
	/**
48
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.Layoutable#getData <em>Data</em>}' containment reference.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @param value the new value of the '<em>Data</em>' containment reference.
52
	 * @see #getData()
53
	 * @generated
54
	 */
55
	void setData(LayoutData value);
56
57
	/**
58
	 * Returns the value of the '<em><b>Layout</b></em>' containment reference.
59
	 * <!-- begin-user-doc -->
60
	 * <p>
61
	 * If the meaning of the '<em>Layout</em>' containment reference isn't clear,
62
	 * there really should be more of a description here...
63
	 * </p>
64
	 * <!-- end-user-doc -->
65
	 * @return the value of the '<em>Layout</em>' containment reference.
66
	 * @see #setLayout(Layout)
67
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayoutable_Layout()
68
	 * @model containment="true"
69
	 * @generated
70
	 */
71
	Layout getLayout();
72
73
	/**
74
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.Layoutable#getLayout <em>Layout</em>}' containment reference.
75
	 * <!-- begin-user-doc -->
76
	 * <!-- end-user-doc -->
77
	 * @param value the new value of the '<em>Layout</em>' containment reference.
78
	 * @see #getLayout()
79
	 * @generated
80
	 */
81
	void setLayout(Layout value);
82
83
} // Layoutable
(-)src/org/eclipse/gmf/gmfgraph/GridLayout.java (+136 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Grid Layout</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 * <p>
16
 * The following features are supported:
17
 * <ul>
18
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayout#getNumColumns <em>Num Columns</em>}</li>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayout#isEqualWidth <em>Equal Width</em>}</li>
20
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayout#getMargins <em>Margins</em>}</li>
21
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayout#getSpacing <em>Spacing</em>}</li>
22
 * </ul>
23
 * </p>
24
 *
25
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayout()
26
 * @model
27
 * @generated
28
 */
29
public interface GridLayout extends Layout {
30
	/**
31
	 * Returns the value of the '<em><b>Num Columns</b></em>' attribute.
32
	 * The default value is <code>"1"</code>.
33
	 * <!-- begin-user-doc -->
34
	 * <p>
35
	 * If the meaning of the '<em>Num Columns</em>' attribute isn't clear,
36
	 * there really should be more of a description here...
37
	 * </p>
38
	 * <!-- end-user-doc -->
39
	 * @return the value of the '<em>Num Columns</em>' attribute.
40
	 * @see #setNumColumns(int)
41
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayout_NumColumns()
42
	 * @model default="1" required="true"
43
	 * @generated
44
	 */
45
	int getNumColumns();
46
47
	/**
48
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayout#getNumColumns <em>Num Columns</em>}' attribute.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @param value the new value of the '<em>Num Columns</em>' attribute.
52
	 * @see #getNumColumns()
53
	 * @generated
54
	 */
55
	void setNumColumns(int value);
56
57
	/**
58
	 * Returns the value of the '<em><b>Equal Width</b></em>' attribute.
59
	 * The default value is <code>"true"</code>.
60
	 * <!-- begin-user-doc -->
61
	 * <p>
62
	 * If the meaning of the '<em>Equal Width</em>' attribute isn't clear,
63
	 * there really should be more of a description here...
64
	 * </p>
65
	 * <!-- end-user-doc -->
66
	 * @return the value of the '<em>Equal Width</em>' attribute.
67
	 * @see #setEqualWidth(boolean)
68
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayout_EqualWidth()
69
	 * @model default="true" required="true"
70
	 * @generated
71
	 */
72
	boolean isEqualWidth();
73
74
	/**
75
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayout#isEqualWidth <em>Equal Width</em>}' attribute.
76
	 * <!-- begin-user-doc -->
77
	 * <!-- end-user-doc -->
78
	 * @param value the new value of the '<em>Equal Width</em>' attribute.
79
	 * @see #isEqualWidth()
80
	 * @generated
81
	 */
82
	void setEqualWidth(boolean value);
83
84
	/**
85
	 * Returns the value of the '<em><b>Margins</b></em>' containment reference.
86
	 * <!-- begin-user-doc -->
87
	 * <p>
88
	 * If the meaning of the '<em>Margins</em>' containment reference isn't clear,
89
	 * there really should be more of a description here...
90
	 * </p>
91
	 * <!-- end-user-doc -->
92
	 * @return the value of the '<em>Margins</em>' containment reference.
93
	 * @see #setMargins(Dimension)
94
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayout_Margins()
95
	 * @model containment="true"
96
	 * @generated
97
	 */
98
	Dimension getMargins();
99
100
	/**
101
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayout#getMargins <em>Margins</em>}' containment reference.
102
	 * <!-- begin-user-doc -->
103
	 * <!-- end-user-doc -->
104
	 * @param value the new value of the '<em>Margins</em>' containment reference.
105
	 * @see #getMargins()
106
	 * @generated
107
	 */
108
	void setMargins(Dimension value);
109
110
	/**
111
	 * Returns the value of the '<em><b>Spacing</b></em>' containment reference.
112
	 * <!-- begin-user-doc -->
113
	 * <p>
114
	 * If the meaning of the '<em>Spacing</em>' containment reference isn't clear,
115
	 * there really should be more of a description here...
116
	 * </p>
117
	 * <!-- end-user-doc -->
118
	 * @return the value of the '<em>Spacing</em>' containment reference.
119
	 * @see #setSpacing(Dimension)
120
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayout_Spacing()
121
	 * @model containment="true"
122
	 * @generated
123
	 */
124
	Dimension getSpacing();
125
126
	/**
127
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayout#getSpacing <em>Spacing</em>}' containment reference.
128
	 * <!-- begin-user-doc -->
129
	 * <!-- end-user-doc -->
130
	 * @param value the new value of the '<em>Spacing</em>' containment reference.
131
	 * @see #getSpacing()
132
	 * @generated
133
	 */
134
	void setSpacing(Dimension value);
135
136
} // GridLayout
(-)src/org/eclipse/gmf/gmfgraph/BorderLayout.java (+53 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Border Layout</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 * <p>
16
 * The following features are supported:
17
 * <ul>
18
 *   <li>{@link org.eclipse.gmf.gmfgraph.BorderLayout#getSpacing <em>Spacing</em>}</li>
19
 * </ul>
20
 * </p>
21
 *
22
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getBorderLayout()
23
 * @model
24
 * @generated
25
 */
26
public interface BorderLayout extends Layout {
27
	/**
28
	 * Returns the value of the '<em><b>Spacing</b></em>' containment reference.
29
	 * <!-- begin-user-doc -->
30
	 * <p>
31
	 * If the meaning of the '<em>Spacing</em>' containment reference isn't clear,
32
	 * there really should be more of a description here...
33
	 * </p>
34
	 * <!-- end-user-doc -->
35
	 * @return the value of the '<em>Spacing</em>' containment reference.
36
	 * @see #setSpacing(Dimension)
37
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getBorderLayout_Spacing()
38
	 * @model containment="true"
39
	 * @generated
40
	 */
41
	Dimension getSpacing();
42
43
	/**
44
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.BorderLayout#getSpacing <em>Spacing</em>}' containment reference.
45
	 * <!-- begin-user-doc -->
46
	 * <!-- end-user-doc -->
47
	 * @param value the new value of the '<em>Spacing</em>' containment reference.
48
	 * @see #getSpacing()
49
	 * @generated
50
	 */
51
	void setSpacing(Dimension value);
52
53
} // BorderLayout
(-)src/org/eclipse/gmf/gmfgraph/ImplementationAware.java (+30 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.ecore.EObject;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Implementation Aware</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 *
17
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getImplementationAware()
18
 * @model interface="true" abstract="true"
19
 * @generated
20
 */
21
public interface ImplementationAware extends EObject {
22
	/**
23
	 * <!-- begin-user-doc -->
24
	 * <!-- end-user-doc -->
25
	 * @model kind="operation"
26
	 * @generated
27
	 */
28
	String getImplementationFQN();
29
30
} // ImplementationAware
(-)src/org/eclipse/gmf/gmfgraph/impl/BorderLayoutImpl.java (+310 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
12
import org.eclipse.emf.ecore.EClass;
13
import org.eclipse.emf.ecore.InternalEObject;
14
15
import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
17
import org.eclipse.emf.ecore.impl.EObjectImpl;
18
19
import org.eclipse.gmf.gmfgraph.BorderLayout;
20
import org.eclipse.gmf.gmfgraph.Dimension;
21
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
22
23
/**
24
 * <!-- begin-user-doc -->
25
 * An implementation of the model object '<em><b>Border Layout</b></em>'.
26
 * <!-- end-user-doc -->
27
 * <p>
28
 * The following features are implemented:
29
 * <ul>
30
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
31
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutImpl#getBundleName <em>Bundle Name</em>}</li>
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.BorderLayoutImpl#getSpacing <em>Spacing</em>}</li>
33
 * </ul>
34
 * </p>
35
 *
36
 * @generated
37
 */
38
public class BorderLayoutImpl extends EObjectImpl implements BorderLayout {
39
	/**
40
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
41
	 * <!-- begin-user-doc -->
42
	 * <!-- end-user-doc -->
43
	 * @see #getQualifiedClassName()
44
	 * @generated
45
	 * @ordered
46
	 */
47
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
48
49
	/**
50
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
51
	 * <!-- begin-user-doc -->
52
	 * <!-- end-user-doc -->
53
	 * @see #getQualifiedClassName()
54
	 * @generated
55
	 * @ordered
56
	 */
57
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
58
59
	/**
60
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
61
	 * <!-- begin-user-doc -->
62
	 * <!-- end-user-doc -->
63
	 * @see #getBundleName()
64
	 * @generated
65
	 * @ordered
66
	 */
67
	protected static final String BUNDLE_NAME_EDEFAULT = null;
68
69
	/**
70
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
71
	 * <!-- begin-user-doc -->
72
	 * <!-- end-user-doc -->
73
	 * @see #getBundleName()
74
	 * @generated
75
	 * @ordered
76
	 */
77
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
78
79
	/**
80
	 * The cached value of the '{@link #getSpacing() <em>Spacing</em>}' containment reference.
81
	 * <!-- begin-user-doc -->
82
	 * <!-- end-user-doc -->
83
	 * @see #getSpacing()
84
	 * @generated
85
	 * @ordered
86
	 */
87
	protected Dimension spacing = null;
88
89
	/**
90
	 * <!-- begin-user-doc -->
91
	 * <!-- end-user-doc -->
92
	 * @generated
93
	 */
94
	protected BorderLayoutImpl() {
95
		super();
96
	}
97
98
	/**
99
	 * <!-- begin-user-doc -->
100
	 * <!-- end-user-doc -->
101
	 * @generated
102
	 */
103
	protected EClass eStaticClass() {
104
		return GMFGraphPackage.eINSTANCE.getBorderLayout();
105
	}
106
107
	/**
108
	 * <!-- begin-user-doc -->
109
	 * <!-- end-user-doc -->
110
	 * @generated
111
	 */
112
	public String getQualifiedClassNameGen() {
113
		return qualifiedClassName;
114
	}
115
116
	/**
117
	 * @generated NOT
118
	 */
119
	public String getQualifiedClassName() {
120
		return "org.eclipse.draw2d.BorderLayout";
121
	}
122
123
	/**
124
	 * <!-- begin-user-doc -->
125
	 * <!-- end-user-doc -->
126
	 * @generated
127
	 */
128
	public void setQualifiedClassNameGen(String newQualifiedClassName) {
129
		String oldQualifiedClassName = qualifiedClassName;
130
		qualifiedClassName = newQualifiedClassName;
131
		if (eNotificationRequired())
132
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
133
	}
134
135
	/**
136
	 * @generated NOT
137
	 */
138
	public void setQualifiedClassName(String newQualifiedClassName) {
139
		//throw new UnsupportedOperationException("You can not change predefined name of implementation class");
140
	}
141
142
	/**
143
	 * <!-- begin-user-doc -->
144
	 * <!-- end-user-doc -->
145
	 * @generated
146
	 */
147
	public String getBundleName() {
148
		return bundleName;
149
	}
150
151
	/**
152
	 * <!-- begin-user-doc -->
153
	 * <!-- end-user-doc -->
154
	 * @generated
155
	 */
156
	public void setBundleName(String newBundleName) {
157
		String oldBundleName = bundleName;
158
		bundleName = newBundleName;
159
		if (eNotificationRequired())
160
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME, oldBundleName, bundleName));
161
	}
162
163
	/**
164
	 * <!-- begin-user-doc -->
165
	 * <!-- end-user-doc -->
166
	 * @generated
167
	 */
168
	public Dimension getSpacing() {
169
		return spacing;
170
	}
171
172
	/**
173
	 * <!-- begin-user-doc -->
174
	 * <!-- end-user-doc -->
175
	 * @generated
176
	 */
177
	public NotificationChain basicSetSpacing(Dimension newSpacing, NotificationChain msgs) {
178
		Dimension oldSpacing = spacing;
179
		spacing = newSpacing;
180
		if (eNotificationRequired()) {
181
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT__SPACING, oldSpacing, newSpacing);
182
			if (msgs == null) msgs = notification; else msgs.add(notification);
183
		}
184
		return msgs;
185
	}
186
187
	/**
188
	 * <!-- begin-user-doc -->
189
	 * <!-- end-user-doc -->
190
	 * @generated
191
	 */
192
	public void setSpacing(Dimension newSpacing) {
193
		if (newSpacing != spacing) {
194
			NotificationChain msgs = null;
195
			if (spacing != null)
196
				msgs = ((InternalEObject)spacing).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.BORDER_LAYOUT__SPACING, null, msgs);
197
			if (newSpacing != null)
198
				msgs = ((InternalEObject)newSpacing).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.BORDER_LAYOUT__SPACING, null, msgs);
199
			msgs = basicSetSpacing(newSpacing, msgs);
200
			if (msgs != null) msgs.dispatch();
201
		}
202
		else if (eNotificationRequired())
203
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.BORDER_LAYOUT__SPACING, newSpacing, newSpacing));
204
	}
205
206
	/**
207
	 * <!-- begin-user-doc -->
208
	 * <!-- end-user-doc -->
209
	 * @generated
210
	 */
211
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
212
		switch (featureID) {
213
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
214
				return basicSetSpacing(null, msgs);
215
		}
216
		return super.eInverseRemove(otherEnd, featureID, msgs);
217
	}
218
219
	/**
220
	 * <!-- begin-user-doc -->
221
	 * <!-- end-user-doc -->
222
	 * @generated
223
	 */
224
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
225
		switch (featureID) {
226
			case GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME:
227
				return getQualifiedClassName();
228
			case GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME:
229
				return getBundleName();
230
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
231
				return getSpacing();
232
		}
233
		return super.eGet(featureID, resolve, coreType);
234
	}
235
236
	/**
237
	 * <!-- begin-user-doc -->
238
	 * <!-- end-user-doc -->
239
	 * @generated
240
	 */
241
	public void eSet(int featureID, Object newValue) {
242
		switch (featureID) {
243
			case GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME:
244
				setQualifiedClassName((String)newValue);
245
				return;
246
			case GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME:
247
				setBundleName((String)newValue);
248
				return;
249
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
250
				setSpacing((Dimension)newValue);
251
				return;
252
		}
253
		super.eSet(featureID, newValue);
254
	}
255
256
	/**
257
	 * <!-- begin-user-doc -->
258
	 * <!-- end-user-doc -->
259
	 * @generated
260
	 */
261
	public void eUnset(int featureID) {
262
		switch (featureID) {
263
			case GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME:
264
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
265
				return;
266
			case GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME:
267
				setBundleName(BUNDLE_NAME_EDEFAULT);
268
				return;
269
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
270
				setSpacing((Dimension)null);
271
				return;
272
		}
273
		super.eUnset(featureID);
274
	}
275
276
	/**
277
	 * <!-- begin-user-doc -->
278
	 * <!-- end-user-doc -->
279
	 * @generated
280
	 */
281
	public boolean eIsSet(int featureID) {
282
		switch (featureID) {
283
			case GMFGraphPackage.BORDER_LAYOUT__QUALIFIED_CLASS_NAME:
284
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
285
			case GMFGraphPackage.BORDER_LAYOUT__BUNDLE_NAME:
286
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
287
			case GMFGraphPackage.BORDER_LAYOUT__SPACING:
288
				return spacing != null;
289
		}
290
		return super.eIsSet(featureID);
291
	}
292
293
	/**
294
	 * <!-- begin-user-doc -->
295
	 * <!-- end-user-doc -->
296
	 * @generated
297
	 */
298
	public String toString() {
299
		if (eIsProxy()) return super.toString();
300
301
		StringBuffer result = new StringBuffer(super.toString());
302
		result.append(" (qualifiedClassName: ");
303
		result.append(qualifiedClassName);
304
		result.append(", bundleName: ");
305
		result.append(bundleName);
306
		result.append(')');
307
		return result.toString();
308
	}
309
310
} //BorderLayoutImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/CustomConfigurableClassImpl.java (+272 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import java.util.Collection;
10
11
import org.eclipse.emf.common.notify.Notification;
12
import org.eclipse.emf.common.notify.NotificationChain;
13
14
import org.eclipse.emf.common.util.EList;
15
16
import org.eclipse.emf.ecore.EClass;
17
import org.eclipse.emf.ecore.InternalEObject;
18
19
import org.eclipse.emf.ecore.impl.ENotificationImpl;
20
import org.eclipse.emf.ecore.impl.EObjectImpl;
21
22
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23
import org.eclipse.emf.ecore.util.InternalEList;
24
25
import org.eclipse.gmf.gmfgraph.CustomAttribute;
26
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
27
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
28
29
/**
30
 * <!-- begin-user-doc -->
31
 * An implementation of the model object '<em><b>Custom Configurable Class</b></em>'.
32
 * <!-- end-user-doc -->
33
 * <p>
34
 * The following features are implemented:
35
 * <ul>
36
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomConfigurableClassImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
37
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomConfigurableClassImpl#getBundleName <em>Bundle Name</em>}</li>
38
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomConfigurableClassImpl#getAttributes <em>Attributes</em>}</li>
39
 * </ul>
40
 * </p>
41
 *
42
 * @generated
43
 */
44
public class CustomConfigurableClassImpl extends EObjectImpl implements CustomConfigurableClass {
45
	/**
46
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
47
	 * <!-- begin-user-doc -->
48
	 * <!-- end-user-doc -->
49
	 * @see #getQualifiedClassName()
50
	 * @generated
51
	 * @ordered
52
	 */
53
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
54
55
	/**
56
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
57
	 * <!-- begin-user-doc -->
58
	 * <!-- end-user-doc -->
59
	 * @see #getQualifiedClassName()
60
	 * @generated
61
	 * @ordered
62
	 */
63
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
64
65
	/**
66
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
67
	 * <!-- begin-user-doc -->
68
	 * <!-- end-user-doc -->
69
	 * @see #getBundleName()
70
	 * @generated
71
	 * @ordered
72
	 */
73
	protected static final String BUNDLE_NAME_EDEFAULT = null;
74
75
	/**
76
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
77
	 * <!-- begin-user-doc -->
78
	 * <!-- end-user-doc -->
79
	 * @see #getBundleName()
80
	 * @generated
81
	 * @ordered
82
	 */
83
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
84
85
	/**
86
	 * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list.
87
	 * <!-- begin-user-doc -->
88
	 * <!-- end-user-doc -->
89
	 * @see #getAttributes()
90
	 * @generated
91
	 * @ordered
92
	 */
93
	protected EList attributes = null;
94
95
	/**
96
	 * <!-- begin-user-doc -->
97
	 * <!-- end-user-doc -->
98
	 * @generated
99
	 */
100
	protected CustomConfigurableClassImpl() {
101
		super();
102
	}
103
104
	/**
105
	 * <!-- begin-user-doc -->
106
	 * <!-- end-user-doc -->
107
	 * @generated
108
	 */
109
	protected EClass eStaticClass() {
110
		return GMFGraphPackage.eINSTANCE.getCustomConfigurableClass();
111
	}
112
113
	/**
114
	 * <!-- begin-user-doc -->
115
	 * <!-- end-user-doc -->
116
	 * @generated
117
	 */
118
	public String getQualifiedClassName() {
119
		return qualifiedClassName;
120
	}
121
122
	/**
123
	 * <!-- begin-user-doc -->
124
	 * <!-- end-user-doc -->
125
	 * @generated
126
	 */
127
	public void setQualifiedClassName(String newQualifiedClassName) {
128
		String oldQualifiedClassName = qualifiedClassName;
129
		qualifiedClassName = newQualifiedClassName;
130
		if (eNotificationRequired())
131
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
132
	}
133
134
	/**
135
	 * <!-- begin-user-doc -->
136
	 * <!-- end-user-doc -->
137
	 * @generated
138
	 */
139
	public String getBundleName() {
140
		return bundleName;
141
	}
142
143
	/**
144
	 * <!-- begin-user-doc -->
145
	 * <!-- end-user-doc -->
146
	 * @generated
147
	 */
148
	public void setBundleName(String newBundleName) {
149
		String oldBundleName = bundleName;
150
		bundleName = newBundleName;
151
		if (eNotificationRequired())
152
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME, oldBundleName, bundleName));
153
	}
154
155
	/**
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @generated
159
	 */
160
	public EList getAttributes() {
161
		if (attributes == null) {
162
			attributes = new EObjectContainmentEList(CustomAttribute.class, this, GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES);
163
		}
164
		return attributes;
165
	}
166
167
	/**
168
	 * <!-- begin-user-doc -->
169
	 * <!-- end-user-doc -->
170
	 * @generated
171
	 */
172
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
173
		switch (featureID) {
174
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
175
				return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs);
176
		}
177
		return super.eInverseRemove(otherEnd, featureID, msgs);
178
	}
179
180
	/**
181
	 * <!-- begin-user-doc -->
182
	 * <!-- end-user-doc -->
183
	 * @generated
184
	 */
185
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
186
		switch (featureID) {
187
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME:
188
				return getQualifiedClassName();
189
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME:
190
				return getBundleName();
191
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
192
				return getAttributes();
193
		}
194
		return super.eGet(featureID, resolve, coreType);
195
	}
196
197
	/**
198
	 * <!-- begin-user-doc -->
199
	 * <!-- end-user-doc -->
200
	 * @generated
201
	 */
202
	public void eSet(int featureID, Object newValue) {
203
		switch (featureID) {
204
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME:
205
				setQualifiedClassName((String)newValue);
206
				return;
207
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME:
208
				setBundleName((String)newValue);
209
				return;
210
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
211
				getAttributes().clear();
212
				getAttributes().addAll((Collection)newValue);
213
				return;
214
		}
215
		super.eSet(featureID, newValue);
216
	}
217
218
	/**
219
	 * <!-- begin-user-doc -->
220
	 * <!-- end-user-doc -->
221
	 * @generated
222
	 */
223
	public void eUnset(int featureID) {
224
		switch (featureID) {
225
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME:
226
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
227
				return;
228
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME:
229
				setBundleName(BUNDLE_NAME_EDEFAULT);
230
				return;
231
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
232
				getAttributes().clear();
233
				return;
234
		}
235
		super.eUnset(featureID);
236
	}
237
238
	/**
239
	 * <!-- begin-user-doc -->
240
	 * <!-- end-user-doc -->
241
	 * @generated
242
	 */
243
	public boolean eIsSet(int featureID) {
244
		switch (featureID) {
245
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__QUALIFIED_CLASS_NAME:
246
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
247
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__BUNDLE_NAME:
248
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
249
			case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES:
250
				return attributes != null && !attributes.isEmpty();
251
		}
252
		return super.eIsSet(featureID);
253
	}
254
255
	/**
256
	 * <!-- begin-user-doc -->
257
	 * <!-- end-user-doc -->
258
	 * @generated
259
	 */
260
	public String toString() {
261
		if (eIsProxy()) return super.toString();
262
263
		StringBuffer result = new StringBuffer(super.toString());
264
		result.append(" (qualifiedClassName: ");
265
		result.append(qualifiedClassName);
266
		result.append(", bundleName: ");
267
		result.append(bundleName);
268
		result.append(')');
269
		return result.toString();
270
	}
271
272
} //CustomConfigurableClassImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/GridLayoutDataImpl.java (+766 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
12
import org.eclipse.emf.ecore.EClass;
13
import org.eclipse.emf.ecore.InternalEObject;
14
15
import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
17
import org.eclipse.emf.ecore.impl.EObjectImpl;
18
19
import org.eclipse.emf.ecore.util.EcoreUtil;
20
21
import org.eclipse.gmf.gmfgraph.Alignment;
22
import org.eclipse.gmf.gmfgraph.Dimension;
23
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
24
import org.eclipse.gmf.gmfgraph.GridLayoutData;
25
26
import org.eclipse.gmf.gmfgraph.Layoutable;
27
28
/**
29
 * <!-- begin-user-doc -->
30
 * An implementation of the model object '<em><b>Grid Layout Data</b></em>'.
31
 * <!-- end-user-doc -->
32
 * <p>
33
 * The following features are implemented:
34
 * <ul>
35
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
36
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getBundleName <em>Bundle Name</em>}</li>
37
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getOwner <em>Owner</em>}</li>
38
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#isGrabExcessHorizontalSpace <em>Grab Excess Horizontal Space</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#isGrabExcessVerticalSpace <em>Grab Excess Vertical Space</em>}</li>
40
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getVerticalAlignment <em>Vertical Alignment</em>}</li>
41
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getHorizontalAlignment <em>Horizontal Alignment</em>}</li>
42
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getVerticalSpan <em>Vertical Span</em>}</li>
43
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getHorizontalSpan <em>Horizontal Span</em>}</li>
44
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getHorizontalIndent <em>Horizontal Indent</em>}</li>
45
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutDataImpl#getSizeHint <em>Size Hint</em>}</li>
46
 * </ul>
47
 * </p>
48
 *
49
 * @generated
50
 */
51
public class GridLayoutDataImpl extends EObjectImpl implements GridLayoutData {
52
	/**
53
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
54
	 * <!-- begin-user-doc -->
55
	 * <!-- end-user-doc -->
56
	 * @see #getQualifiedClassName()
57
	 * @generated
58
	 * @ordered
59
	 */
60
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
61
62
	/**
63
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
64
	 * <!-- begin-user-doc -->
65
	 * <!-- end-user-doc -->
66
	 * @see #getQualifiedClassName()
67
	 * @generated
68
	 * @ordered
69
	 */
70
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
71
72
	/**
73
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
74
	 * <!-- begin-user-doc -->
75
	 * <!-- end-user-doc -->
76
	 * @see #getBundleName()
77
	 * @generated
78
	 * @ordered
79
	 */
80
	protected static final String BUNDLE_NAME_EDEFAULT = null;
81
82
	/**
83
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
84
	 * <!-- begin-user-doc -->
85
	 * <!-- end-user-doc -->
86
	 * @see #getBundleName()
87
	 * @generated
88
	 * @ordered
89
	 */
90
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
91
92
	/**
93
	 * The default value of the '{@link #isGrabExcessHorizontalSpace() <em>Grab Excess Horizontal Space</em>}' attribute.
94
	 * <!-- begin-user-doc -->
95
	 * <!-- end-user-doc -->
96
	 * @see #isGrabExcessHorizontalSpace()
97
	 * @generated
98
	 * @ordered
99
	 */
100
	protected static final boolean GRAB_EXCESS_HORIZONTAL_SPACE_EDEFAULT = false;
101
102
	/**
103
	 * The cached value of the '{@link #isGrabExcessHorizontalSpace() <em>Grab Excess Horizontal Space</em>}' attribute.
104
	 * <!-- begin-user-doc -->
105
	 * <!-- end-user-doc -->
106
	 * @see #isGrabExcessHorizontalSpace()
107
	 * @generated
108
	 * @ordered
109
	 */
110
	protected boolean grabExcessHorizontalSpace = GRAB_EXCESS_HORIZONTAL_SPACE_EDEFAULT;
111
112
	/**
113
	 * The default value of the '{@link #isGrabExcessVerticalSpace() <em>Grab Excess Vertical Space</em>}' attribute.
114
	 * <!-- begin-user-doc -->
115
	 * <!-- end-user-doc -->
116
	 * @see #isGrabExcessVerticalSpace()
117
	 * @generated
118
	 * @ordered
119
	 */
120
	protected static final boolean GRAB_EXCESS_VERTICAL_SPACE_EDEFAULT = false;
121
122
	/**
123
	 * The cached value of the '{@link #isGrabExcessVerticalSpace() <em>Grab Excess Vertical Space</em>}' attribute.
124
	 * <!-- begin-user-doc -->
125
	 * <!-- end-user-doc -->
126
	 * @see #isGrabExcessVerticalSpace()
127
	 * @generated
128
	 * @ordered
129
	 */
130
	protected boolean grabExcessVerticalSpace = GRAB_EXCESS_VERTICAL_SPACE_EDEFAULT;
131
132
	/**
133
	 * The default value of the '{@link #getVerticalAlignment() <em>Vertical Alignment</em>}' attribute.
134
	 * <!-- begin-user-doc -->
135
	 * <!-- end-user-doc -->
136
	 * @see #getVerticalAlignment()
137
	 * @generated
138
	 * @ordered
139
	 */
140
	protected static final Alignment VERTICAL_ALIGNMENT_EDEFAULT = Alignment.CENTER_LITERAL;
141
142
	/**
143
	 * The cached value of the '{@link #getVerticalAlignment() <em>Vertical Alignment</em>}' attribute.
144
	 * <!-- begin-user-doc -->
145
	 * <!-- end-user-doc -->
146
	 * @see #getVerticalAlignment()
147
	 * @generated
148
	 * @ordered
149
	 */
150
	protected Alignment verticalAlignment = VERTICAL_ALIGNMENT_EDEFAULT;
151
152
	/**
153
	 * The default value of the '{@link #getHorizontalAlignment() <em>Horizontal Alignment</em>}' attribute.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @see #getHorizontalAlignment()
157
	 * @generated
158
	 * @ordered
159
	 */
160
	protected static final Alignment HORIZONTAL_ALIGNMENT_EDEFAULT = Alignment.CENTER_LITERAL;
161
162
	/**
163
	 * The cached value of the '{@link #getHorizontalAlignment() <em>Horizontal Alignment</em>}' attribute.
164
	 * <!-- begin-user-doc -->
165
	 * <!-- end-user-doc -->
166
	 * @see #getHorizontalAlignment()
167
	 * @generated
168
	 * @ordered
169
	 */
170
	protected Alignment horizontalAlignment = HORIZONTAL_ALIGNMENT_EDEFAULT;
171
172
	/**
173
	 * The default value of the '{@link #getVerticalSpan() <em>Vertical Span</em>}' attribute.
174
	 * <!-- begin-user-doc -->
175
	 * <!-- end-user-doc -->
176
	 * @see #getVerticalSpan()
177
	 * @generated
178
	 * @ordered
179
	 */
180
	protected static final int VERTICAL_SPAN_EDEFAULT = 1;
181
182
	/**
183
	 * The cached value of the '{@link #getVerticalSpan() <em>Vertical Span</em>}' attribute.
184
	 * <!-- begin-user-doc -->
185
	 * <!-- end-user-doc -->
186
	 * @see #getVerticalSpan()
187
	 * @generated
188
	 * @ordered
189
	 */
190
	protected int verticalSpan = VERTICAL_SPAN_EDEFAULT;
191
192
	/**
193
	 * The default value of the '{@link #getHorizontalSpan() <em>Horizontal Span</em>}' attribute.
194
	 * <!-- begin-user-doc -->
195
	 * <!-- end-user-doc -->
196
	 * @see #getHorizontalSpan()
197
	 * @generated
198
	 * @ordered
199
	 */
200
	protected static final int HORIZONTAL_SPAN_EDEFAULT = 1;
201
202
	/**
203
	 * The cached value of the '{@link #getHorizontalSpan() <em>Horizontal Span</em>}' attribute.
204
	 * <!-- begin-user-doc -->
205
	 * <!-- end-user-doc -->
206
	 * @see #getHorizontalSpan()
207
	 * @generated
208
	 * @ordered
209
	 */
210
	protected int horizontalSpan = HORIZONTAL_SPAN_EDEFAULT;
211
212
	/**
213
	 * The default value of the '{@link #getHorizontalIndent() <em>Horizontal Indent</em>}' attribute.
214
	 * <!-- begin-user-doc -->
215
	 * <!-- end-user-doc -->
216
	 * @see #getHorizontalIndent()
217
	 * @generated
218
	 * @ordered
219
	 */
220
	protected static final int HORIZONTAL_INDENT_EDEFAULT = 0;
221
222
	/**
223
	 * The cached value of the '{@link #getHorizontalIndent() <em>Horizontal Indent</em>}' attribute.
224
	 * <!-- begin-user-doc -->
225
	 * <!-- end-user-doc -->
226
	 * @see #getHorizontalIndent()
227
	 * @generated
228
	 * @ordered
229
	 */
230
	protected int horizontalIndent = HORIZONTAL_INDENT_EDEFAULT;
231
232
	/**
233
	 * The cached value of the '{@link #getSizeHint() <em>Size Hint</em>}' containment reference.
234
	 * <!-- begin-user-doc -->
235
	 * <!-- end-user-doc -->
236
	 * @see #getSizeHint()
237
	 * @generated
238
	 * @ordered
239
	 */
240
	protected Dimension sizeHint = null;
241
242
	/**
243
	 * <!-- begin-user-doc -->
244
	 * <!-- end-user-doc -->
245
	 * @generated
246
	 */
247
	protected GridLayoutDataImpl() {
248
		super();
249
	}
250
251
	/**
252
	 * <!-- begin-user-doc -->
253
	 * <!-- end-user-doc -->
254
	 * @generated
255
	 */
256
	protected EClass eStaticClass() {
257
		return GMFGraphPackage.eINSTANCE.getGridLayoutData();
258
	}
259
260
	/**
261
	 * <!-- begin-user-doc -->
262
	 * <!-- end-user-doc -->
263
	 * @generated
264
	 */
265
	public boolean isGrabExcessHorizontalSpace() {
266
		return grabExcessHorizontalSpace;
267
	}
268
269
	/**
270
	 * <!-- begin-user-doc -->
271
	 * <!-- end-user-doc -->
272
	 * @generated
273
	 */
274
	public void setGrabExcessHorizontalSpace(boolean newGrabExcessHorizontalSpace) {
275
		boolean oldGrabExcessHorizontalSpace = grabExcessHorizontalSpace;
276
		grabExcessHorizontalSpace = newGrabExcessHorizontalSpace;
277
		if (eNotificationRequired())
278
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE, oldGrabExcessHorizontalSpace, grabExcessHorizontalSpace));
279
	}
280
281
	/**
282
	 * <!-- begin-user-doc -->
283
	 * <!-- end-user-doc -->
284
	 * @generated
285
	 */
286
	public boolean isGrabExcessVerticalSpace() {
287
		return grabExcessVerticalSpace;
288
	}
289
290
	/**
291
	 * <!-- begin-user-doc -->
292
	 * <!-- end-user-doc -->
293
	 * @generated
294
	 */
295
	public void setGrabExcessVerticalSpace(boolean newGrabExcessVerticalSpace) {
296
		boolean oldGrabExcessVerticalSpace = grabExcessVerticalSpace;
297
		grabExcessVerticalSpace = newGrabExcessVerticalSpace;
298
		if (eNotificationRequired())
299
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE, oldGrabExcessVerticalSpace, grabExcessVerticalSpace));
300
	}
301
302
	/**
303
	 * <!-- begin-user-doc -->
304
	 * <!-- end-user-doc -->
305
	 * @generated
306
	 */
307
	public Alignment getVerticalAlignment() {
308
		return verticalAlignment;
309
	}
310
311
	/**
312
	 * <!-- begin-user-doc -->
313
	 * <!-- end-user-doc -->
314
	 * @generated
315
	 */
316
	public void setVerticalAlignment(Alignment newVerticalAlignment) {
317
		Alignment oldVerticalAlignment = verticalAlignment;
318
		verticalAlignment = newVerticalAlignment == null ? VERTICAL_ALIGNMENT_EDEFAULT : newVerticalAlignment;
319
		if (eNotificationRequired())
320
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT, oldVerticalAlignment, verticalAlignment));
321
	}
322
323
	/**
324
	 * <!-- begin-user-doc -->
325
	 * <!-- end-user-doc -->
326
	 * @generated
327
	 */
328
	public Alignment getHorizontalAlignment() {
329
		return horizontalAlignment;
330
	}
331
332
	/**
333
	 * <!-- begin-user-doc -->
334
	 * <!-- end-user-doc -->
335
	 * @generated
336
	 */
337
	public void setHorizontalAlignment(Alignment newHorizontalAlignment) {
338
		Alignment oldHorizontalAlignment = horizontalAlignment;
339
		horizontalAlignment = newHorizontalAlignment == null ? HORIZONTAL_ALIGNMENT_EDEFAULT : newHorizontalAlignment;
340
		if (eNotificationRequired())
341
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT, oldHorizontalAlignment, horizontalAlignment));
342
	}
343
344
	/**
345
	 * <!-- begin-user-doc -->
346
	 * <!-- end-user-doc -->
347
	 * @generated
348
	 */
349
	public int getVerticalSpan() {
350
		return verticalSpan;
351
	}
352
353
	/**
354
	 * <!-- begin-user-doc -->
355
	 * <!-- end-user-doc -->
356
	 * @generated
357
	 */
358
	public void setVerticalSpan(int newVerticalSpan) {
359
		int oldVerticalSpan = verticalSpan;
360
		verticalSpan = newVerticalSpan;
361
		if (eNotificationRequired())
362
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN, oldVerticalSpan, verticalSpan));
363
	}
364
365
	/**
366
	 * <!-- begin-user-doc -->
367
	 * <!-- end-user-doc -->
368
	 * @generated
369
	 */
370
	public int getHorizontalSpan() {
371
		return horizontalSpan;
372
	}
373
374
	/**
375
	 * <!-- begin-user-doc -->
376
	 * <!-- end-user-doc -->
377
	 * @generated
378
	 */
379
	public void setHorizontalSpan(int newHorizontalSpan) {
380
		int oldHorizontalSpan = horizontalSpan;
381
		horizontalSpan = newHorizontalSpan;
382
		if (eNotificationRequired())
383
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN, oldHorizontalSpan, horizontalSpan));
384
	}
385
386
	/**
387
	 * <!-- begin-user-doc -->
388
	 * <!-- end-user-doc -->
389
	 * @generated
390
	 */
391
	public int getHorizontalIndent() {
392
		return horizontalIndent;
393
	}
394
395
	/**
396
	 * <!-- begin-user-doc -->
397
	 * <!-- end-user-doc -->
398
	 * @generated
399
	 */
400
	public void setHorizontalIndent(int newHorizontalIndent) {
401
		int oldHorizontalIndent = horizontalIndent;
402
		horizontalIndent = newHorizontalIndent;
403
		if (eNotificationRequired())
404
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT, oldHorizontalIndent, horizontalIndent));
405
	}
406
407
	/**
408
	 * <!-- begin-user-doc -->
409
	 * <!-- end-user-doc -->
410
	 * @generated
411
	 */
412
	public Dimension getSizeHint() {
413
		return sizeHint;
414
	}
415
416
	/**
417
	 * <!-- begin-user-doc -->
418
	 * <!-- end-user-doc -->
419
	 * @generated
420
	 */
421
	public NotificationChain basicSetSizeHint(Dimension newSizeHint, NotificationChain msgs) {
422
		Dimension oldSizeHint = sizeHint;
423
		sizeHint = newSizeHint;
424
		if (eNotificationRequired()) {
425
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT, oldSizeHint, newSizeHint);
426
			if (msgs == null) msgs = notification; else msgs.add(notification);
427
		}
428
		return msgs;
429
	}
430
431
	/**
432
	 * <!-- begin-user-doc -->
433
	 * <!-- end-user-doc -->
434
	 * @generated
435
	 */
436
	public void setSizeHint(Dimension newSizeHint) {
437
		if (newSizeHint != sizeHint) {
438
			NotificationChain msgs = null;
439
			if (sizeHint != null)
440
				msgs = ((InternalEObject)sizeHint).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT, null, msgs);
441
			if (newSizeHint != null)
442
				msgs = ((InternalEObject)newSizeHint).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT, null, msgs);
443
			msgs = basicSetSizeHint(newSizeHint, msgs);
444
			if (msgs != null) msgs.dispatch();
445
		}
446
		else if (eNotificationRequired())
447
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT, newSizeHint, newSizeHint));
448
	}
449
450
	/**
451
	 * <!-- begin-user-doc -->
452
	 * <!-- end-user-doc -->
453
	 * @generated
454
	 */
455
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
456
		switch (featureID) {
457
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
458
				if (eInternalContainer() != null)
459
					msgs = eBasicRemoveFromContainer(msgs);
460
				return eBasicSetContainer(otherEnd, GMFGraphPackage.GRID_LAYOUT_DATA__OWNER, msgs);
461
		}
462
		return super.eInverseAdd(otherEnd, featureID, msgs);
463
	}
464
465
	/**
466
	 * <!-- begin-user-doc -->
467
	 * <!-- end-user-doc -->
468
	 * @generated
469
	 */
470
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
471
		switch (featureID) {
472
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
473
				return eBasicSetContainer(null, GMFGraphPackage.GRID_LAYOUT_DATA__OWNER, msgs);
474
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
475
				return basicSetSizeHint(null, msgs);
476
		}
477
		return super.eInverseRemove(otherEnd, featureID, msgs);
478
	}
479
480
	/**
481
	 * <!-- begin-user-doc -->
482
	 * <!-- end-user-doc -->
483
	 * @generated
484
	 */
485
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
486
		switch (eContainerFeatureID) {
487
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
488
				return eInternalContainer().eInverseRemove(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
489
		}
490
		return super.eBasicRemoveFromContainerFeature(msgs);
491
	}
492
493
	/**
494
	 * <!-- begin-user-doc -->
495
	 * <!-- end-user-doc -->
496
	 * @generated
497
	 */
498
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
499
		switch (featureID) {
500
			case GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
501
				return getQualifiedClassName();
502
			case GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME:
503
				return getBundleName();
504
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
505
				return getOwner();
506
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE:
507
				return isGrabExcessHorizontalSpace() ? Boolean.TRUE : Boolean.FALSE;
508
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE:
509
				return isGrabExcessVerticalSpace() ? Boolean.TRUE : Boolean.FALSE;
510
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT:
511
				return getVerticalAlignment();
512
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT:
513
				return getHorizontalAlignment();
514
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN:
515
				return new Integer(getVerticalSpan());
516
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN:
517
				return new Integer(getHorizontalSpan());
518
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT:
519
				return new Integer(getHorizontalIndent());
520
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
521
				return getSizeHint();
522
		}
523
		return super.eGet(featureID, resolve, coreType);
524
	}
525
526
	/**
527
	 * <!-- begin-user-doc -->
528
	 * <!-- end-user-doc -->
529
	 * @generated
530
	 */
531
	public void eSet(int featureID, Object newValue) {
532
		switch (featureID) {
533
			case GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
534
				setQualifiedClassName((String)newValue);
535
				return;
536
			case GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME:
537
				setBundleName((String)newValue);
538
				return;
539
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
540
				setOwner((Layoutable)newValue);
541
				return;
542
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE:
543
				setGrabExcessHorizontalSpace(((Boolean)newValue).booleanValue());
544
				return;
545
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE:
546
				setGrabExcessVerticalSpace(((Boolean)newValue).booleanValue());
547
				return;
548
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT:
549
				setVerticalAlignment((Alignment)newValue);
550
				return;
551
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT:
552
				setHorizontalAlignment((Alignment)newValue);
553
				return;
554
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN:
555
				setVerticalSpan(((Integer)newValue).intValue());
556
				return;
557
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN:
558
				setHorizontalSpan(((Integer)newValue).intValue());
559
				return;
560
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT:
561
				setHorizontalIndent(((Integer)newValue).intValue());
562
				return;
563
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
564
				setSizeHint((Dimension)newValue);
565
				return;
566
		}
567
		super.eSet(featureID, newValue);
568
	}
569
570
	/**
571
	 * <!-- begin-user-doc -->
572
	 * <!-- end-user-doc -->
573
	 * @generated
574
	 */
575
	public void eUnset(int featureID) {
576
		switch (featureID) {
577
			case GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
578
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
579
				return;
580
			case GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME:
581
				setBundleName(BUNDLE_NAME_EDEFAULT);
582
				return;
583
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
584
				setOwner((Layoutable)null);
585
				return;
586
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE:
587
				setGrabExcessHorizontalSpace(GRAB_EXCESS_HORIZONTAL_SPACE_EDEFAULT);
588
				return;
589
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE:
590
				setGrabExcessVerticalSpace(GRAB_EXCESS_VERTICAL_SPACE_EDEFAULT);
591
				return;
592
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT:
593
				setVerticalAlignment(VERTICAL_ALIGNMENT_EDEFAULT);
594
				return;
595
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT:
596
				setHorizontalAlignment(HORIZONTAL_ALIGNMENT_EDEFAULT);
597
				return;
598
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN:
599
				setVerticalSpan(VERTICAL_SPAN_EDEFAULT);
600
				return;
601
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN:
602
				setHorizontalSpan(HORIZONTAL_SPAN_EDEFAULT);
603
				return;
604
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT:
605
				setHorizontalIndent(HORIZONTAL_INDENT_EDEFAULT);
606
				return;
607
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
608
				setSizeHint((Dimension)null);
609
				return;
610
		}
611
		super.eUnset(featureID);
612
	}
613
614
	/**
615
	 * <!-- begin-user-doc -->
616
	 * <!-- end-user-doc -->
617
	 * @generated
618
	 */
619
	public boolean eIsSet(int featureID) {
620
		switch (featureID) {
621
			case GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
622
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
623
			case GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME:
624
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
625
			case GMFGraphPackage.GRID_LAYOUT_DATA__OWNER:
626
				return getOwner() != null;
627
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_HORIZONTAL_SPACE:
628
				return grabExcessHorizontalSpace != GRAB_EXCESS_HORIZONTAL_SPACE_EDEFAULT;
629
			case GMFGraphPackage.GRID_LAYOUT_DATA__GRAB_EXCESS_VERTICAL_SPACE:
630
				return grabExcessVerticalSpace != GRAB_EXCESS_VERTICAL_SPACE_EDEFAULT;
631
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_ALIGNMENT:
632
				return verticalAlignment != VERTICAL_ALIGNMENT_EDEFAULT;
633
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_ALIGNMENT:
634
				return horizontalAlignment != HORIZONTAL_ALIGNMENT_EDEFAULT;
635
			case GMFGraphPackage.GRID_LAYOUT_DATA__VERTICAL_SPAN:
636
				return verticalSpan != VERTICAL_SPAN_EDEFAULT;
637
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_SPAN:
638
				return horizontalSpan != HORIZONTAL_SPAN_EDEFAULT;
639
			case GMFGraphPackage.GRID_LAYOUT_DATA__HORIZONTAL_INDENT:
640
				return horizontalIndent != HORIZONTAL_INDENT_EDEFAULT;
641
			case GMFGraphPackage.GRID_LAYOUT_DATA__SIZE_HINT:
642
				return sizeHint != null;
643
		}
644
		return super.eIsSet(featureID);
645
	}
646
647
	/**
648
	 * <!-- begin-user-doc -->
649
	 * <!-- end-user-doc -->
650
	 * @generated
651
	 */
652
	public String toString() {
653
		if (eIsProxy()) return super.toString();
654
655
		StringBuffer result = new StringBuffer(super.toString());
656
		result.append(" (qualifiedClassName: ");
657
		result.append(qualifiedClassName);
658
		result.append(", bundleName: ");
659
		result.append(bundleName);
660
		result.append(", grabExcessHorizontalSpace: ");
661
		result.append(grabExcessHorizontalSpace);
662
		result.append(", grabExcessVerticalSpace: ");
663
		result.append(grabExcessVerticalSpace);
664
		result.append(", verticalAlignment: ");
665
		result.append(verticalAlignment);
666
		result.append(", horizontalAlignment: ");
667
		result.append(horizontalAlignment);
668
		result.append(", verticalSpan: ");
669
		result.append(verticalSpan);
670
		result.append(", horizontalSpan: ");
671
		result.append(horizontalSpan);
672
		result.append(", horizontalIndent: ");
673
		result.append(horizontalIndent);
674
		result.append(')');
675
		return result.toString();
676
	}
677
678
	/**
679
	 * <!-- begin-user-doc -->
680
	 * <!-- end-user-doc -->
681
	 * @generated
682
	 */
683
	public String getQualifiedClassNameGen() {
684
		return qualifiedClassName;
685
	}
686
687
	/**
688
	 * @generated NOT
689
	 */
690
	public String getQualifiedClassName() {
691
		return "org.eclipse.gmf.internal.codegen.draw2d.GridLayoutData";
692
	}
693
	
694
695
	/**
696
	 * <!-- begin-user-doc -->
697
	 * <!-- end-user-doc -->
698
	 * @generated
699
	 */
700
	public void setQualifiedClassNameGen(String newQualifiedClassName) {
701
		String oldQualifiedClassName = qualifiedClassName;
702
		qualifiedClassName = newQualifiedClassName;
703
		if (eNotificationRequired())
704
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
705
	}
706
707
	/**
708
	 * @generated NOT
709
	 */
710
	public void setQualifiedClassName(String newQualifiedClassName) {
711
		//throw new UnsupportedOperationException("You can not change predefined name of implementation class");
712
	}
713
714
	/**
715
	 * <!-- begin-user-doc -->
716
	 * <!-- end-user-doc -->
717
	 * @generated
718
	 */
719
	public String getBundleName() {
720
		return bundleName;
721
	}
722
723
	/**
724
	 * <!-- begin-user-doc -->
725
	 * <!-- end-user-doc -->
726
	 * @generated
727
	 */
728
	public void setBundleName(String newBundleName) {
729
		String oldBundleName = bundleName;
730
		bundleName = newBundleName;
731
		if (eNotificationRequired())
732
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__BUNDLE_NAME, oldBundleName, bundleName));
733
	}
734
735
	/**
736
	 * <!-- begin-user-doc -->
737
	 * <!-- end-user-doc -->
738
	 * @generated
739
	 */
740
	public Layoutable getOwner() {
741
		if (eContainerFeatureID != GMFGraphPackage.GRID_LAYOUT_DATA__OWNER) return null;
742
		return (Layoutable)eContainer();
743
	}
744
745
	/**
746
	 * <!-- begin-user-doc -->
747
	 * <!-- end-user-doc -->
748
	 * @generated
749
	 */
750
	public void setOwner(Layoutable newOwner) {
751
		if (newOwner != eInternalContainer() || (eContainerFeatureID != GMFGraphPackage.GRID_LAYOUT_DATA__OWNER && newOwner != null)) {
752
			if (EcoreUtil.isAncestor(this, newOwner))
753
				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
754
			NotificationChain msgs = null;
755
			if (eInternalContainer() != null)
756
				msgs = eBasicRemoveFromContainer(msgs);
757
			if (newOwner != null)
758
				msgs = ((InternalEObject)newOwner).eInverseAdd(this, GMFGraphPackage.LAYOUTABLE__DATA, Layoutable.class, msgs);
759
			msgs = eBasicSetContainer((InternalEObject)newOwner, GMFGraphPackage.GRID_LAYOUT_DATA__OWNER, msgs);
760
			if (msgs != null) msgs.dispatch();
761
		}
762
		else if (eNotificationRequired())
763
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT_DATA__OWNER, newOwner, newOwner));
764
	}
765
766
} //GridLayoutDataImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/CustomAttributeImpl.java (+377 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
11
import org.eclipse.emf.ecore.EClass;
12
13
import org.eclipse.emf.ecore.impl.ENotificationImpl;
14
import org.eclipse.emf.ecore.impl.EObjectImpl;
15
16
import org.eclipse.gmf.gmfgraph.CustomAttribute;
17
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
18
19
/**
20
 * <!-- begin-user-doc -->
21
 * An implementation of the model object '<em><b>Custom Attribute</b></em>'.
22
 * <!-- end-user-doc -->
23
 * <p>
24
 * The following features are implemented:
25
 * <ul>
26
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl#getName <em>Name</em>}</li>
27
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl#getType <em>Type</em>}</li>
28
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl#getValue <em>Value</em>}</li>
29
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl#isDirectAccess <em>Direct Access</em>}</li>
30
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomAttributeImpl#isMultiStatementValue <em>Multi Statement Value</em>}</li>
31
 * </ul>
32
 * </p>
33
 *
34
 * @generated
35
 */
36
public class CustomAttributeImpl extends EObjectImpl implements CustomAttribute {
37
	/**
38
	 * The default value of the '{@link #getName() <em>Name</em>}' attribute.
39
	 * <!-- begin-user-doc -->
40
	 * <!-- end-user-doc -->
41
	 * @see #getName()
42
	 * @generated
43
	 * @ordered
44
	 */
45
	protected static final String NAME_EDEFAULT = null;
46
47
	/**
48
	 * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @see #getName()
52
	 * @generated
53
	 * @ordered
54
	 */
55
	protected String name = NAME_EDEFAULT;
56
57
	/**
58
	 * The default value of the '{@link #getType() <em>Type</em>}' attribute.
59
	 * <!-- begin-user-doc -->
60
	 * <!-- end-user-doc -->
61
	 * @see #getType()
62
	 * @generated
63
	 * @ordered
64
	 */
65
	protected static final String TYPE_EDEFAULT = "Object";
66
67
	/**
68
	 * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
69
	 * <!-- begin-user-doc -->
70
	 * <!-- end-user-doc -->
71
	 * @see #getType()
72
	 * @generated
73
	 * @ordered
74
	 */
75
	protected String type = TYPE_EDEFAULT;
76
77
	/**
78
	 * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
79
	 * <!-- begin-user-doc -->
80
	 * <!-- end-user-doc -->
81
	 * @see #getValue()
82
	 * @generated
83
	 * @ordered
84
	 */
85
	protected static final String VALUE_EDEFAULT = "null";
86
87
	/**
88
	 * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
89
	 * <!-- begin-user-doc -->
90
	 * <!-- end-user-doc -->
91
	 * @see #getValue()
92
	 * @generated
93
	 * @ordered
94
	 */
95
	protected String value = VALUE_EDEFAULT;
96
97
	/**
98
	 * The default value of the '{@link #isDirectAccess() <em>Direct Access</em>}' attribute.
99
	 * <!-- begin-user-doc -->
100
	 * <!-- end-user-doc -->
101
	 * @see #isDirectAccess()
102
	 * @generated
103
	 * @ordered
104
	 */
105
	protected static final boolean DIRECT_ACCESS_EDEFAULT = false;
106
107
	/**
108
	 * The cached value of the '{@link #isDirectAccess() <em>Direct Access</em>}' attribute.
109
	 * <!-- begin-user-doc -->
110
	 * <!-- end-user-doc -->
111
	 * @see #isDirectAccess()
112
	 * @generated
113
	 * @ordered
114
	 */
115
	protected boolean directAccess = DIRECT_ACCESS_EDEFAULT;
116
117
	/**
118
	 * The default value of the '{@link #isMultiStatementValue() <em>Multi Statement Value</em>}' attribute.
119
	 * <!-- begin-user-doc -->
120
	 * <!-- end-user-doc -->
121
	 * @see #isMultiStatementValue()
122
	 * @generated
123
	 * @ordered
124
	 */
125
	protected static final boolean MULTI_STATEMENT_VALUE_EDEFAULT = false;
126
127
	/**
128
	 * The cached value of the '{@link #isMultiStatementValue() <em>Multi Statement Value</em>}' attribute.
129
	 * <!-- begin-user-doc -->
130
	 * <!-- end-user-doc -->
131
	 * @see #isMultiStatementValue()
132
	 * @generated
133
	 * @ordered
134
	 */
135
	protected boolean multiStatementValue = MULTI_STATEMENT_VALUE_EDEFAULT;
136
137
	/**
138
	 * <!-- begin-user-doc -->
139
	 * <!-- end-user-doc -->
140
	 * @generated
141
	 */
142
	protected CustomAttributeImpl() {
143
		super();
144
	}
145
146
	/**
147
	 * <!-- begin-user-doc -->
148
	 * <!-- end-user-doc -->
149
	 * @generated
150
	 */
151
	protected EClass eStaticClass() {
152
		return GMFGraphPackage.eINSTANCE.getCustomAttribute();
153
	}
154
155
	/**
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @generated
159
	 */
160
	public String getName() {
161
		return name;
162
	}
163
164
	/**
165
	 * <!-- begin-user-doc -->
166
	 * <!-- end-user-doc -->
167
	 * @generated
168
	 */
169
	public void setName(String newName) {
170
		String oldName = name;
171
		name = newName;
172
		if (eNotificationRequired())
173
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME, oldName, name));
174
	}
175
176
	/**
177
	 * <!-- begin-user-doc -->
178
	 * <!-- end-user-doc -->
179
	 * @generated
180
	 */
181
	public String getType() {
182
		return type;
183
	}
184
185
	/**
186
	 * <!-- begin-user-doc -->
187
	 * <!-- end-user-doc -->
188
	 * @generated
189
	 */
190
	public void setType(String newType) {
191
		String oldType = type;
192
		type = newType;
193
		if (eNotificationRequired())
194
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE, oldType, type));
195
	}
196
197
	/**
198
	 * <!-- begin-user-doc -->
199
	 * <!-- end-user-doc -->
200
	 * @generated
201
	 */
202
	public String getValue() {
203
		return value;
204
	}
205
206
	/**
207
	 * <!-- begin-user-doc -->
208
	 * <!-- end-user-doc -->
209
	 * @generated
210
	 */
211
	public void setValue(String newValue) {
212
		String oldValue = value;
213
		value = newValue;
214
		if (eNotificationRequired())
215
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE, oldValue, value));
216
	}
217
218
	/**
219
	 * <!-- begin-user-doc -->
220
	 * <!-- end-user-doc -->
221
	 * @generated
222
	 */
223
	public boolean isDirectAccess() {
224
		return directAccess;
225
	}
226
227
	/**
228
	 * <!-- begin-user-doc -->
229
	 * <!-- end-user-doc -->
230
	 * @generated
231
	 */
232
	public void setDirectAccess(boolean newDirectAccess) {
233
		boolean oldDirectAccess = directAccess;
234
		directAccess = newDirectAccess;
235
		if (eNotificationRequired())
236
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS, oldDirectAccess, directAccess));
237
	}
238
239
	/**
240
	 * <!-- begin-user-doc -->
241
	 * <!-- end-user-doc -->
242
	 * @generated
243
	 */
244
	public boolean isMultiStatementValue() {
245
		return multiStatementValue;
246
	}
247
248
	/**
249
	 * <!-- begin-user-doc -->
250
	 * <!-- end-user-doc -->
251
	 * @generated
252
	 */
253
	public void setMultiStatementValue(boolean newMultiStatementValue) {
254
		boolean oldMultiStatementValue = multiStatementValue;
255
		multiStatementValue = newMultiStatementValue;
256
		if (eNotificationRequired())
257
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE, oldMultiStatementValue, multiStatementValue));
258
	}
259
260
	/**
261
	 * <!-- begin-user-doc -->
262
	 * <!-- end-user-doc -->
263
	 * @generated
264
	 */
265
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
266
		switch (featureID) {
267
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME:
268
				return getName();
269
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE:
270
				return getType();
271
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE:
272
				return getValue();
273
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS:
274
				return isDirectAccess() ? Boolean.TRUE : Boolean.FALSE;
275
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE:
276
				return isMultiStatementValue() ? Boolean.TRUE : Boolean.FALSE;
277
		}
278
		return super.eGet(featureID, resolve, coreType);
279
	}
280
281
	/**
282
	 * <!-- begin-user-doc -->
283
	 * <!-- end-user-doc -->
284
	 * @generated
285
	 */
286
	public void eSet(int featureID, Object newValue) {
287
		switch (featureID) {
288
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME:
289
				setName((String)newValue);
290
				return;
291
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE:
292
				setType((String)newValue);
293
				return;
294
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE:
295
				setValue((String)newValue);
296
				return;
297
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS:
298
				setDirectAccess(((Boolean)newValue).booleanValue());
299
				return;
300
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE:
301
				setMultiStatementValue(((Boolean)newValue).booleanValue());
302
				return;
303
		}
304
		super.eSet(featureID, newValue);
305
	}
306
307
	/**
308
	 * <!-- begin-user-doc -->
309
	 * <!-- end-user-doc -->
310
	 * @generated
311
	 */
312
	public void eUnset(int featureID) {
313
		switch (featureID) {
314
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME:
315
				setName(NAME_EDEFAULT);
316
				return;
317
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE:
318
				setType(TYPE_EDEFAULT);
319
				return;
320
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE:
321
				setValue(VALUE_EDEFAULT);
322
				return;
323
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS:
324
				setDirectAccess(DIRECT_ACCESS_EDEFAULT);
325
				return;
326
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE:
327
				setMultiStatementValue(MULTI_STATEMENT_VALUE_EDEFAULT);
328
				return;
329
		}
330
		super.eUnset(featureID);
331
	}
332
333
	/**
334
	 * <!-- begin-user-doc -->
335
	 * <!-- end-user-doc -->
336
	 * @generated
337
	 */
338
	public boolean eIsSet(int featureID) {
339
		switch (featureID) {
340
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__NAME:
341
				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
342
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__TYPE:
343
				return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
344
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__VALUE:
345
				return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
346
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__DIRECT_ACCESS:
347
				return directAccess != DIRECT_ACCESS_EDEFAULT;
348
			case GMFGraphPackage.CUSTOM_ATTRIBUTE__MULTI_STATEMENT_VALUE:
349
				return multiStatementValue != MULTI_STATEMENT_VALUE_EDEFAULT;
350
		}
351
		return super.eIsSet(featureID);
352
	}
353
354
	/**
355
	 * <!-- begin-user-doc -->
356
	 * <!-- end-user-doc -->
357
	 * @generated
358
	 */
359
	public String toString() {
360
		if (eIsProxy()) return super.toString();
361
362
		StringBuffer result = new StringBuffer(super.toString());
363
		result.append(" (name: ");
364
		result.append(name);
365
		result.append(", type: ");
366
		result.append(type);
367
		result.append(", value: ");
368
		result.append(value);
369
		result.append(", directAccess: ");
370
		result.append(directAccess);
371
		result.append(", multiStatementValue: ");
372
		result.append(multiStatementValue);
373
		result.append(')');
374
		return result.toString();
375
	}
376
377
} //CustomAttributeImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/CustomLayoutDataImpl.java (+303 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import java.util.Collection;
10
11
import org.eclipse.emf.common.notify.Notification;
12
import org.eclipse.emf.common.notify.NotificationChain;
13
14
import org.eclipse.emf.common.util.EList;
15
16
import org.eclipse.emf.ecore.EClass;
17
import org.eclipse.emf.ecore.InternalEObject;
18
19
import org.eclipse.emf.ecore.impl.ENotificationImpl;
20
import org.eclipse.emf.ecore.impl.EObjectImpl;
21
22
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23
import org.eclipse.emf.ecore.util.InternalEList;
24
25
import org.eclipse.gmf.gmfgraph.CustomAttribute;
26
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
27
import org.eclipse.gmf.gmfgraph.CustomLayoutData;
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
29
30
/**
31
 * <!-- begin-user-doc -->
32
 * An implementation of the model object '<em><b>Custom Layout Data</b></em>'.
33
 * <!-- end-user-doc -->
34
 * <p>
35
 * The following features are implemented:
36
 * <ul>
37
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutDataImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
38
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutDataImpl#getBundleName <em>Bundle Name</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutDataImpl#getAttributes <em>Attributes</em>}</li>
40
 * </ul>
41
 * </p>
42
 *
43
 * @generated
44
 */
45
public class CustomLayoutDataImpl extends EObjectImpl implements CustomLayoutData {
46
	/**
47
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @see #getQualifiedClassName()
51
	 * @generated
52
	 * @ordered
53
	 */
54
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
55
56
	/**
57
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @see #getQualifiedClassName()
61
	 * @generated
62
	 * @ordered
63
	 */
64
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
65
66
	/**
67
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
68
	 * <!-- begin-user-doc -->
69
	 * <!-- end-user-doc -->
70
	 * @see #getBundleName()
71
	 * @generated
72
	 * @ordered
73
	 */
74
	protected static final String BUNDLE_NAME_EDEFAULT = null;
75
76
	/**
77
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
78
	 * <!-- begin-user-doc -->
79
	 * <!-- end-user-doc -->
80
	 * @see #getBundleName()
81
	 * @generated
82
	 * @ordered
83
	 */
84
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
85
86
	/**
87
	 * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list.
88
	 * <!-- begin-user-doc -->
89
	 * <!-- end-user-doc -->
90
	 * @see #getAttributes()
91
	 * @generated
92
	 * @ordered
93
	 */
94
	protected EList attributes = null;
95
96
	/**
97
	 * <!-- begin-user-doc -->
98
	 * <!-- end-user-doc -->
99
	 * @generated
100
	 */
101
	protected CustomLayoutDataImpl() {
102
		super();
103
	}
104
105
	/**
106
	 * <!-- begin-user-doc -->
107
	 * <!-- end-user-doc -->
108
	 * @generated
109
	 */
110
	protected EClass eStaticClass() {
111
		return GMFGraphPackage.eINSTANCE.getCustomLayoutData();
112
	}
113
114
	/**
115
	 * <!-- begin-user-doc -->
116
	 * <!-- end-user-doc -->
117
	 * @generated
118
	 */
119
	public String getQualifiedClassName() {
120
		return qualifiedClassName;
121
	}
122
123
	/**
124
	 * <!-- begin-user-doc -->
125
	 * <!-- end-user-doc -->
126
	 * @generated
127
	 */
128
	public void setQualifiedClassName(String newQualifiedClassName) {
129
		String oldQualifiedClassName = qualifiedClassName;
130
		qualifiedClassName = newQualifiedClassName;
131
		if (eNotificationRequired())
132
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
133
	}
134
135
	/**
136
	 * <!-- begin-user-doc -->
137
	 * <!-- end-user-doc -->
138
	 * @generated
139
	 */
140
	public String getBundleName() {
141
		return bundleName;
142
	}
143
144
	/**
145
	 * <!-- begin-user-doc -->
146
	 * <!-- end-user-doc -->
147
	 * @generated
148
	 */
149
	public void setBundleName(String newBundleName) {
150
		String oldBundleName = bundleName;
151
		bundleName = newBundleName;
152
		if (eNotificationRequired())
153
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME, oldBundleName, bundleName));
154
	}
155
156
	/**
157
	 * <!-- begin-user-doc -->
158
	 * <!-- end-user-doc -->
159
	 * @generated
160
	 */
161
	public EList getAttributes() {
162
		if (attributes == null) {
163
			attributes = new EObjectContainmentEList(CustomAttribute.class, this, GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES);
164
		}
165
		return attributes;
166
	}
167
168
	/**
169
	 * <!-- begin-user-doc -->
170
	 * <!-- end-user-doc -->
171
	 * @generated
172
	 */
173
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
174
		switch (featureID) {
175
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
176
				return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs);
177
		}
178
		return super.eInverseRemove(otherEnd, featureID, msgs);
179
	}
180
181
	/**
182
	 * <!-- begin-user-doc -->
183
	 * <!-- end-user-doc -->
184
	 * @generated
185
	 */
186
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
187
		switch (featureID) {
188
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
189
				return getQualifiedClassName();
190
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME:
191
				return getBundleName();
192
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
193
				return getAttributes();
194
		}
195
		return super.eGet(featureID, resolve, coreType);
196
	}
197
198
	/**
199
	 * <!-- begin-user-doc -->
200
	 * <!-- end-user-doc -->
201
	 * @generated
202
	 */
203
	public void eSet(int featureID, Object newValue) {
204
		switch (featureID) {
205
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
206
				setQualifiedClassName((String)newValue);
207
				return;
208
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME:
209
				setBundleName((String)newValue);
210
				return;
211
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
212
				getAttributes().clear();
213
				getAttributes().addAll((Collection)newValue);
214
				return;
215
		}
216
		super.eSet(featureID, newValue);
217
	}
218
219
	/**
220
	 * <!-- begin-user-doc -->
221
	 * <!-- end-user-doc -->
222
	 * @generated
223
	 */
224
	public void eUnset(int featureID) {
225
		switch (featureID) {
226
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
227
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
228
				return;
229
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME:
230
				setBundleName(BUNDLE_NAME_EDEFAULT);
231
				return;
232
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
233
				getAttributes().clear();
234
				return;
235
		}
236
		super.eUnset(featureID);
237
	}
238
239
	/**
240
	 * <!-- begin-user-doc -->
241
	 * <!-- end-user-doc -->
242
	 * @generated
243
	 */
244
	public boolean eIsSet(int featureID) {
245
		switch (featureID) {
246
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__QUALIFIED_CLASS_NAME:
247
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
248
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__BUNDLE_NAME:
249
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
250
			case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES:
251
				return attributes != null && !attributes.isEmpty();
252
		}
253
		return super.eIsSet(featureID);
254
	}
255
256
	/**
257
	 * <!-- begin-user-doc -->
258
	 * <!-- end-user-doc -->
259
	 * @generated
260
	 */
261
	public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) {
262
		if (baseClass == CustomConfigurableClass.class) {
263
			switch (derivedFeatureID) {
264
				case GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES: return GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES;
265
				default: return -1;
266
			}
267
		}
268
		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
269
	}
270
271
	/**
272
	 * <!-- begin-user-doc -->
273
	 * <!-- end-user-doc -->
274
	 * @generated
275
	 */
276
	public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) {
277
		if (baseClass == CustomConfigurableClass.class) {
278
			switch (baseFeatureID) {
279
				case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES: return GMFGraphPackage.CUSTOM_LAYOUT_DATA__ATTRIBUTES;
280
				default: return -1;
281
			}
282
		}
283
		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
284
	}
285
286
	/**
287
	 * <!-- begin-user-doc -->
288
	 * <!-- end-user-doc -->
289
	 * @generated
290
	 */
291
	public String toString() {
292
		if (eIsProxy()) return super.toString();
293
294
		StringBuffer result = new StringBuffer(super.toString());
295
		result.append(" (qualifiedClassName: ");
296
		result.append(qualifiedClassName);
297
		result.append(", bundleName: ");
298
		result.append(bundleName);
299
		result.append(')');
300
		return result.toString();
301
	}
302
303
} //CustomLayoutDataImpl
(-)src/org/eclipse/gmf/gmfgraph/GridLayoutData.java (+254 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Grid Layout Data</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 * <p>
16
 * The following features are supported:
17
 * <ul>
18
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessHorizontalSpace <em>Grab Excess Horizontal Space</em>}</li>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessVerticalSpace <em>Grab Excess Vertical Space</em>}</li>
20
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalAlignment <em>Vertical Alignment</em>}</li>
21
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalAlignment <em>Horizontal Alignment</em>}</li>
22
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalSpan <em>Vertical Span</em>}</li>
23
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalSpan <em>Horizontal Span</em>}</li>
24
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalIndent <em>Horizontal Indent</em>}</li>
25
 *   <li>{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getSizeHint <em>Size Hint</em>}</li>
26
 * </ul>
27
 * </p>
28
 *
29
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData()
30
 * @model
31
 * @generated
32
 */
33
public interface GridLayoutData extends LayoutData {
34
	/**
35
	 * Returns the value of the '<em><b>Grab Excess Horizontal Space</b></em>' attribute.
36
	 * The default value is <code>"false"</code>.
37
	 * <!-- begin-user-doc -->
38
	 * <p>
39
	 * If the meaning of the '<em>Grab Excess Horizontal Space</em>' attribute isn't clear,
40
	 * there really should be more of a description here...
41
	 * </p>
42
	 * <!-- end-user-doc -->
43
	 * @return the value of the '<em>Grab Excess Horizontal Space</em>' attribute.
44
	 * @see #setGrabExcessHorizontalSpace(boolean)
45
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_GrabExcessHorizontalSpace()
46
	 * @model default="false" required="true"
47
	 * @generated
48
	 */
49
	boolean isGrabExcessHorizontalSpace();
50
51
	/**
52
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessHorizontalSpace <em>Grab Excess Horizontal Space</em>}' attribute.
53
	 * <!-- begin-user-doc -->
54
	 * <!-- end-user-doc -->
55
	 * @param value the new value of the '<em>Grab Excess Horizontal Space</em>' attribute.
56
	 * @see #isGrabExcessHorizontalSpace()
57
	 * @generated
58
	 */
59
	void setGrabExcessHorizontalSpace(boolean value);
60
61
	/**
62
	 * Returns the value of the '<em><b>Grab Excess Vertical Space</b></em>' attribute.
63
	 * The default value is <code>"false"</code>.
64
	 * <!-- begin-user-doc -->
65
	 * <p>
66
	 * If the meaning of the '<em>Grab Excess Vertical Space</em>' attribute isn't clear,
67
	 * there really should be more of a description here...
68
	 * </p>
69
	 * <!-- end-user-doc -->
70
	 * @return the value of the '<em>Grab Excess Vertical Space</em>' attribute.
71
	 * @see #setGrabExcessVerticalSpace(boolean)
72
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_GrabExcessVerticalSpace()
73
	 * @model default="false" required="true"
74
	 * @generated
75
	 */
76
	boolean isGrabExcessVerticalSpace();
77
78
	/**
79
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#isGrabExcessVerticalSpace <em>Grab Excess Vertical Space</em>}' attribute.
80
	 * <!-- begin-user-doc -->
81
	 * <!-- end-user-doc -->
82
	 * @param value the new value of the '<em>Grab Excess Vertical Space</em>' attribute.
83
	 * @see #isGrabExcessVerticalSpace()
84
	 * @generated
85
	 */
86
	void setGrabExcessVerticalSpace(boolean value);
87
88
	/**
89
	 * Returns the value of the '<em><b>Vertical Alignment</b></em>' attribute.
90
	 * The default value is <code>"CENTER"</code>.
91
	 * The literals are from the enumeration {@link org.eclipse.gmf.gmfgraph.Alignment}.
92
	 * <!-- begin-user-doc -->
93
	 * <p>
94
	 * If the meaning of the '<em>Vertical Alignment</em>' attribute isn't clear,
95
	 * there really should be more of a description here...
96
	 * </p>
97
	 * <!-- end-user-doc -->
98
	 * @return the value of the '<em>Vertical Alignment</em>' attribute.
99
	 * @see org.eclipse.gmf.gmfgraph.Alignment
100
	 * @see #setVerticalAlignment(Alignment)
101
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_VerticalAlignment()
102
	 * @model default="CENTER" required="true"
103
	 * @generated
104
	 */
105
	Alignment getVerticalAlignment();
106
107
	/**
108
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalAlignment <em>Vertical Alignment</em>}' attribute.
109
	 * <!-- begin-user-doc -->
110
	 * <!-- end-user-doc -->
111
	 * @param value the new value of the '<em>Vertical Alignment</em>' attribute.
112
	 * @see org.eclipse.gmf.gmfgraph.Alignment
113
	 * @see #getVerticalAlignment()
114
	 * @generated
115
	 */
116
	void setVerticalAlignment(Alignment value);
117
118
	/**
119
	 * Returns the value of the '<em><b>Horizontal Alignment</b></em>' attribute.
120
	 * The default value is <code>"CENTER"</code>.
121
	 * The literals are from the enumeration {@link org.eclipse.gmf.gmfgraph.Alignment}.
122
	 * <!-- begin-user-doc -->
123
	 * <p>
124
	 * If the meaning of the '<em>Horizontal Alignment</em>' attribute isn't clear,
125
	 * there really should be more of a description here...
126
	 * </p>
127
	 * <!-- end-user-doc -->
128
	 * @return the value of the '<em>Horizontal Alignment</em>' attribute.
129
	 * @see org.eclipse.gmf.gmfgraph.Alignment
130
	 * @see #setHorizontalAlignment(Alignment)
131
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_HorizontalAlignment()
132
	 * @model default="CENTER" required="true"
133
	 * @generated
134
	 */
135
	Alignment getHorizontalAlignment();
136
137
	/**
138
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalAlignment <em>Horizontal Alignment</em>}' attribute.
139
	 * <!-- begin-user-doc -->
140
	 * <!-- end-user-doc -->
141
	 * @param value the new value of the '<em>Horizontal Alignment</em>' attribute.
142
	 * @see org.eclipse.gmf.gmfgraph.Alignment
143
	 * @see #getHorizontalAlignment()
144
	 * @generated
145
	 */
146
	void setHorizontalAlignment(Alignment value);
147
148
	/**
149
	 * Returns the value of the '<em><b>Vertical Span</b></em>' attribute.
150
	 * The default value is <code>"1"</code>.
151
	 * <!-- begin-user-doc -->
152
	 * <p>
153
	 * If the meaning of the '<em>Vertical Span</em>' attribute isn't clear,
154
	 * there really should be more of a description here...
155
	 * </p>
156
	 * <!-- end-user-doc -->
157
	 * @return the value of the '<em>Vertical Span</em>' attribute.
158
	 * @see #setVerticalSpan(int)
159
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_VerticalSpan()
160
	 * @model default="1" required="true"
161
	 * @generated
162
	 */
163
	int getVerticalSpan();
164
165
	/**
166
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getVerticalSpan <em>Vertical Span</em>}' attribute.
167
	 * <!-- begin-user-doc -->
168
	 * <!-- end-user-doc -->
169
	 * @param value the new value of the '<em>Vertical Span</em>' attribute.
170
	 * @see #getVerticalSpan()
171
	 * @generated
172
	 */
173
	void setVerticalSpan(int value);
174
175
	/**
176
	 * Returns the value of the '<em><b>Horizontal Span</b></em>' attribute.
177
	 * The default value is <code>"1"</code>.
178
	 * <!-- begin-user-doc -->
179
	 * <p>
180
	 * If the meaning of the '<em>Horizontal Span</em>' attribute isn't clear,
181
	 * there really should be more of a description here...
182
	 * </p>
183
	 * <!-- end-user-doc -->
184
	 * @return the value of the '<em>Horizontal Span</em>' attribute.
185
	 * @see #setHorizontalSpan(int)
186
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_HorizontalSpan()
187
	 * @model default="1" required="true"
188
	 * @generated
189
	 */
190
	int getHorizontalSpan();
191
192
	/**
193
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalSpan <em>Horizontal Span</em>}' attribute.
194
	 * <!-- begin-user-doc -->
195
	 * <!-- end-user-doc -->
196
	 * @param value the new value of the '<em>Horizontal Span</em>' attribute.
197
	 * @see #getHorizontalSpan()
198
	 * @generated
199
	 */
200
	void setHorizontalSpan(int value);
201
202
	/**
203
	 * Returns the value of the '<em><b>Horizontal Indent</b></em>' attribute.
204
	 * <!-- begin-user-doc -->
205
	 * <p>
206
	 * If the meaning of the '<em>Horizontal Indent</em>' attribute isn't clear,
207
	 * there really should be more of a description here...
208
	 * </p>
209
	 * <!-- end-user-doc -->
210
	 * @return the value of the '<em>Horizontal Indent</em>' attribute.
211
	 * @see #setHorizontalIndent(int)
212
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_HorizontalIndent()
213
	 * @model required="true"
214
	 * @generated
215
	 */
216
	int getHorizontalIndent();
217
218
	/**
219
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getHorizontalIndent <em>Horizontal Indent</em>}' attribute.
220
	 * <!-- begin-user-doc -->
221
	 * <!-- end-user-doc -->
222
	 * @param value the new value of the '<em>Horizontal Indent</em>' attribute.
223
	 * @see #getHorizontalIndent()
224
	 * @generated
225
	 */
226
	void setHorizontalIndent(int value);
227
228
	/**
229
	 * Returns the value of the '<em><b>Size Hint</b></em>' containment reference.
230
	 * <!-- begin-user-doc -->
231
	 * <p>
232
	 * If the meaning of the '<em>Size Hint</em>' containment reference isn't clear,
233
	 * there really should be more of a description here...
234
	 * </p>
235
	 * <!-- end-user-doc -->
236
	 * @return the value of the '<em>Size Hint</em>' containment reference.
237
	 * @see #setSizeHint(Dimension)
238
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getGridLayoutData_SizeHint()
239
	 * @model containment="true"
240
	 * @generated
241
	 */
242
	Dimension getSizeHint();
243
244
	/**
245
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.GridLayoutData#getSizeHint <em>Size Hint</em>}' containment reference.
246
	 * <!-- begin-user-doc -->
247
	 * <!-- end-user-doc -->
248
	 * @param value the new value of the '<em>Size Hint</em>' containment reference.
249
	 * @see #getSizeHint()
250
	 * @generated
251
	 */
252
	void setSizeHint(Dimension value);
253
254
} // GridLayoutData
(-)src/org/eclipse/gmf/gmfgraph/impl/GridLayoutImpl.java (+485 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
12
import org.eclipse.emf.ecore.EClass;
13
import org.eclipse.emf.ecore.InternalEObject;
14
15
import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
17
import org.eclipse.emf.ecore.impl.EObjectImpl;
18
19
import org.eclipse.gmf.gmfgraph.CustomClass;
20
import org.eclipse.gmf.gmfgraph.Dimension;
21
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
22
import org.eclipse.gmf.gmfgraph.GridLayout;
23
24
/**
25
 * <!-- begin-user-doc -->
26
 * An implementation of the model object '<em><b>Grid Layout</b></em>'.
27
 * <!-- end-user-doc -->
28
 * <p>
29
 * The following features are implemented:
30
 * <ul>
31
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#getBundleName <em>Bundle Name</em>}</li>
33
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#getNumColumns <em>Num Columns</em>}</li>
34
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#isEqualWidth <em>Equal Width</em>}</li>
35
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#getMargins <em>Margins</em>}</li>
36
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.GridLayoutImpl#getSpacing <em>Spacing</em>}</li>
37
 * </ul>
38
 * </p>
39
 *
40
 * @generated
41
 */
42
public class GridLayoutImpl extends EObjectImpl implements GridLayout {
43
	/**
44
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
45
	 * <!-- begin-user-doc -->
46
	 * <!-- end-user-doc -->
47
	 * @see #getQualifiedClassName()
48
	 * @generated
49
	 * @ordered
50
	 */
51
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
52
53
	/**
54
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
55
	 * <!-- begin-user-doc -->
56
	 * <!-- end-user-doc -->
57
	 * @see #getQualifiedClassName()
58
	 * @generated
59
	 * @ordered
60
	 */
61
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
62
63
	/**
64
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
65
	 * <!-- begin-user-doc -->
66
	 * <!-- end-user-doc -->
67
	 * @see #getBundleName()
68
	 * @generated
69
	 * @ordered
70
	 */
71
	protected static final String BUNDLE_NAME_EDEFAULT = null;
72
73
	/**
74
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
75
	 * <!-- begin-user-doc -->
76
	 * <!-- end-user-doc -->
77
	 * @see #getBundleName()
78
	 * @generated
79
	 * @ordered
80
	 */
81
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
82
83
	/**
84
	 * The default value of the '{@link #getNumColumns() <em>Num Columns</em>}' attribute.
85
	 * <!-- begin-user-doc -->
86
	 * <!-- end-user-doc -->
87
	 * @see #getNumColumns()
88
	 * @generated
89
	 * @ordered
90
	 */
91
	protected static final int NUM_COLUMNS_EDEFAULT = 1;
92
93
	/**
94
	 * The cached value of the '{@link #getNumColumns() <em>Num Columns</em>}' attribute.
95
	 * <!-- begin-user-doc -->
96
	 * <!-- end-user-doc -->
97
	 * @see #getNumColumns()
98
	 * @generated
99
	 * @ordered
100
	 */
101
	protected int numColumns = NUM_COLUMNS_EDEFAULT;
102
103
	/**
104
	 * The default value of the '{@link #isEqualWidth() <em>Equal Width</em>}' attribute.
105
	 * <!-- begin-user-doc -->
106
	 * <!-- end-user-doc -->
107
	 * @see #isEqualWidth()
108
	 * @generated
109
	 * @ordered
110
	 */
111
	protected static final boolean EQUAL_WIDTH_EDEFAULT = true;
112
113
	/**
114
	 * The cached value of the '{@link #isEqualWidth() <em>Equal Width</em>}' attribute.
115
	 * <!-- begin-user-doc -->
116
	 * <!-- end-user-doc -->
117
	 * @see #isEqualWidth()
118
	 * @generated
119
	 * @ordered
120
	 */
121
	protected boolean equalWidth = EQUAL_WIDTH_EDEFAULT;
122
123
	/**
124
	 * The cached value of the '{@link #getMargins() <em>Margins</em>}' containment reference.
125
	 * <!-- begin-user-doc -->
126
	 * <!-- end-user-doc -->
127
	 * @see #getMargins()
128
	 * @generated
129
	 * @ordered
130
	 */
131
	protected Dimension margins = null;
132
133
	/**
134
	 * The cached value of the '{@link #getSpacing() <em>Spacing</em>}' containment reference.
135
	 * <!-- begin-user-doc -->
136
	 * <!-- end-user-doc -->
137
	 * @see #getSpacing()
138
	 * @generated
139
	 * @ordered
140
	 */
141
	protected Dimension spacing = null;
142
143
	/**
144
	 * <!-- begin-user-doc -->
145
	 * <!-- end-user-doc -->
146
	 * @generated
147
	 */
148
	protected GridLayoutImpl() {
149
		super();
150
	}
151
152
	/**
153
	 * <!-- begin-user-doc -->
154
	 * <!-- end-user-doc -->
155
	 * @generated
156
	 */
157
	protected EClass eStaticClass() {
158
		return GMFGraphPackage.eINSTANCE.getGridLayout();
159
	}
160
161
	/**
162
	 * <!-- begin-user-doc -->
163
	 * <!-- end-user-doc -->
164
	 * @generated
165
	 */
166
	public int getNumColumns() {
167
		return numColumns;
168
	}
169
170
	/**
171
	 * <!-- begin-user-doc -->
172
	 * <!-- end-user-doc -->
173
	 * @generated
174
	 */
175
	public void setNumColumns(int newNumColumns) {
176
		int oldNumColumns = numColumns;
177
		numColumns = newNumColumns;
178
		if (eNotificationRequired())
179
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS, oldNumColumns, numColumns));
180
	}
181
182
	/**
183
	 * <!-- begin-user-doc -->
184
	 * <!-- end-user-doc -->
185
	 * @generated
186
	 */
187
	public boolean isEqualWidth() {
188
		return equalWidth;
189
	}
190
191
	/**
192
	 * <!-- begin-user-doc -->
193
	 * <!-- end-user-doc -->
194
	 * @generated
195
	 */
196
	public void setEqualWidth(boolean newEqualWidth) {
197
		boolean oldEqualWidth = equalWidth;
198
		equalWidth = newEqualWidth;
199
		if (eNotificationRequired())
200
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH, oldEqualWidth, equalWidth));
201
	}
202
203
	/**
204
	 * <!-- begin-user-doc -->
205
	 * <!-- end-user-doc -->
206
	 * @generated
207
	 */
208
	public Dimension getMargins() {
209
		return margins;
210
	}
211
212
	/**
213
	 * <!-- begin-user-doc -->
214
	 * <!-- end-user-doc -->
215
	 * @generated
216
	 */
217
	public NotificationChain basicSetMargins(Dimension newMargins, NotificationChain msgs) {
218
		Dimension oldMargins = margins;
219
		margins = newMargins;
220
		if (eNotificationRequired()) {
221
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__MARGINS, oldMargins, newMargins);
222
			if (msgs == null) msgs = notification; else msgs.add(notification);
223
		}
224
		return msgs;
225
	}
226
227
	/**
228
	 * <!-- begin-user-doc -->
229
	 * <!-- end-user-doc -->
230
	 * @generated
231
	 */
232
	public void setMargins(Dimension newMargins) {
233
		if (newMargins != margins) {
234
			NotificationChain msgs = null;
235
			if (margins != null)
236
				msgs = ((InternalEObject)margins).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT__MARGINS, null, msgs);
237
			if (newMargins != null)
238
				msgs = ((InternalEObject)newMargins).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT__MARGINS, null, msgs);
239
			msgs = basicSetMargins(newMargins, msgs);
240
			if (msgs != null) msgs.dispatch();
241
		}
242
		else if (eNotificationRequired())
243
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__MARGINS, newMargins, newMargins));
244
	}
245
246
	/**
247
	 * <!-- begin-user-doc -->
248
	 * <!-- end-user-doc -->
249
	 * @generated
250
	 */
251
	public Dimension getSpacing() {
252
		return spacing;
253
	}
254
255
	/**
256
	 * <!-- begin-user-doc -->
257
	 * <!-- end-user-doc -->
258
	 * @generated
259
	 */
260
	public NotificationChain basicSetSpacing(Dimension newSpacing, NotificationChain msgs) {
261
		Dimension oldSpacing = spacing;
262
		spacing = newSpacing;
263
		if (eNotificationRequired()) {
264
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__SPACING, oldSpacing, newSpacing);
265
			if (msgs == null) msgs = notification; else msgs.add(notification);
266
		}
267
		return msgs;
268
	}
269
270
	/**
271
	 * <!-- begin-user-doc -->
272
	 * <!-- end-user-doc -->
273
	 * @generated
274
	 */
275
	public void setSpacing(Dimension newSpacing) {
276
		if (newSpacing != spacing) {
277
			NotificationChain msgs = null;
278
			if (spacing != null)
279
				msgs = ((InternalEObject)spacing).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT__SPACING, null, msgs);
280
			if (newSpacing != null)
281
				msgs = ((InternalEObject)newSpacing).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GMFGraphPackage.GRID_LAYOUT__SPACING, null, msgs);
282
			msgs = basicSetSpacing(newSpacing, msgs);
283
			if (msgs != null) msgs.dispatch();
284
		}
285
		else if (eNotificationRequired())
286
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__SPACING, newSpacing, newSpacing));
287
	}
288
289
	/**
290
	 * <!-- begin-user-doc -->
291
	 * <!-- end-user-doc -->
292
	 * @generated
293
	 */
294
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
295
		switch (featureID) {
296
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
297
				return basicSetMargins(null, msgs);
298
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
299
				return basicSetSpacing(null, msgs);
300
		}
301
		return super.eInverseRemove(otherEnd, featureID, msgs);
302
	}
303
304
	/**
305
	 * <!-- begin-user-doc -->
306
	 * <!-- end-user-doc -->
307
	 * @generated
308
	 */
309
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
310
		switch (featureID) {
311
			case GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME:
312
				return getQualifiedClassName();
313
			case GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME:
314
				return getBundleName();
315
			case GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS:
316
				return new Integer(getNumColumns());
317
			case GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH:
318
				return isEqualWidth() ? Boolean.TRUE : Boolean.FALSE;
319
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
320
				return getMargins();
321
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
322
				return getSpacing();
323
		}
324
		return super.eGet(featureID, resolve, coreType);
325
	}
326
327
	/**
328
	 * <!-- begin-user-doc -->
329
	 * <!-- end-user-doc -->
330
	 * @generated
331
	 */
332
	public void eSet(int featureID, Object newValue) {
333
		switch (featureID) {
334
			case GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME:
335
				setQualifiedClassName((String)newValue);
336
				return;
337
			case GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME:
338
				setBundleName((String)newValue);
339
				return;
340
			case GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS:
341
				setNumColumns(((Integer)newValue).intValue());
342
				return;
343
			case GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH:
344
				setEqualWidth(((Boolean)newValue).booleanValue());
345
				return;
346
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
347
				setMargins((Dimension)newValue);
348
				return;
349
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
350
				setSpacing((Dimension)newValue);
351
				return;
352
		}
353
		super.eSet(featureID, newValue);
354
	}
355
356
	/**
357
	 * <!-- begin-user-doc -->
358
	 * <!-- end-user-doc -->
359
	 * @generated
360
	 */
361
	public void eUnset(int featureID) {
362
		switch (featureID) {
363
			case GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME:
364
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
365
				return;
366
			case GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME:
367
				setBundleName(BUNDLE_NAME_EDEFAULT);
368
				return;
369
			case GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS:
370
				setNumColumns(NUM_COLUMNS_EDEFAULT);
371
				return;
372
			case GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH:
373
				setEqualWidth(EQUAL_WIDTH_EDEFAULT);
374
				return;
375
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
376
				setMargins((Dimension)null);
377
				return;
378
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
379
				setSpacing((Dimension)null);
380
				return;
381
		}
382
		super.eUnset(featureID);
383
	}
384
385
	/**
386
	 * <!-- begin-user-doc -->
387
	 * <!-- end-user-doc -->
388
	 * @generated
389
	 */
390
	public boolean eIsSet(int featureID) {
391
		switch (featureID) {
392
			case GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME:
393
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
394
			case GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME:
395
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
396
			case GMFGraphPackage.GRID_LAYOUT__NUM_COLUMNS:
397
				return numColumns != NUM_COLUMNS_EDEFAULT;
398
			case GMFGraphPackage.GRID_LAYOUT__EQUAL_WIDTH:
399
				return equalWidth != EQUAL_WIDTH_EDEFAULT;
400
			case GMFGraphPackage.GRID_LAYOUT__MARGINS:
401
				return margins != null;
402
			case GMFGraphPackage.GRID_LAYOUT__SPACING:
403
				return spacing != null;
404
		}
405
		return super.eIsSet(featureID);
406
	}
407
408
	/**
409
	 * <!-- begin-user-doc -->
410
	 * <!-- end-user-doc -->
411
	 * @generated
412
	 */
413
	public String toString() {
414
		if (eIsProxy()) return super.toString();
415
416
		StringBuffer result = new StringBuffer(super.toString());
417
		result.append(" (qualifiedClassName: ");
418
		result.append(qualifiedClassName);
419
		result.append(", bundleName: ");
420
		result.append(bundleName);
421
		result.append(", numColumns: ");
422
		result.append(numColumns);
423
		result.append(", equalWidth: ");
424
		result.append(equalWidth);
425
		result.append(')');
426
		return result.toString();
427
	}
428
429
	/**
430
	 * <!-- begin-user-doc -->
431
	 * <!-- end-user-doc -->
432
	 * @generated
433
	 */
434
	public String getQualifiedClassNameGen() {
435
		return qualifiedClassName;
436
	}
437
438
	/**
439
	 * @generated NOT
440
	 */
441
	public String getQualifiedClassName() {
442
		return "org.eclipse.gmf.internal.codegen.draw2d.GridLayout";
443
	}
444
445
	/**
446
	 * <!-- begin-user-doc -->
447
	 * <!-- end-user-doc -->
448
	 * @generated
449
	 */
450
	public void setQualifiedClassNameGen(String newQualifiedClassName) {
451
		String oldQualifiedClassName = qualifiedClassName;
452
		qualifiedClassName = newQualifiedClassName;
453
		if (eNotificationRequired())
454
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
455
	}
456
457
	/**
458
	 * @generated NOT
459
	 */
460
	public void setQualifiedClassName(String newQualifiedClassName) {
461
		//throw new UnsupportedOperationException("You can not change predefined name of implementation class");
462
	}
463
464
	/**
465
	 * <!-- begin-user-doc -->
466
	 * <!-- end-user-doc -->
467
	 * @generated
468
	 */
469
	public String getBundleName() {
470
		return bundleName;
471
	}
472
473
	/**
474
	 * <!-- begin-user-doc -->
475
	 * <!-- end-user-doc -->
476
	 * @generated
477
	 */
478
	public void setBundleName(String newBundleName) {
479
		String oldBundleName = bundleName;
480
		bundleName = newBundleName;
481
		if (eNotificationRequired())
482
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.GRID_LAYOUT__BUNDLE_NAME, oldBundleName, bundleName));
483
	}
484
485
} //GridLayoutImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/LayoutImpl.java (+220 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import org.eclipse.emf.common.notify.Notification;
10
import org.eclipse.emf.common.notify.NotificationChain;
11
12
import org.eclipse.emf.ecore.EClass;
13
import org.eclipse.emf.ecore.InternalEObject;
14
15
import org.eclipse.emf.ecore.impl.ENotificationImpl;
16
import org.eclipse.emf.ecore.impl.EObjectImpl;
17
18
import org.eclipse.gmf.gmfgraph.Dimension;
19
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
20
import org.eclipse.gmf.gmfgraph.Layout;
21
22
import org.eclipse.gmf.gmfgraph.LayoutData;
23
24
/**
25
 * <!-- begin-user-doc -->
26
 * An implementation of the model object '<em><b>Layout</b></em>'.
27
 * <!-- end-user-doc -->
28
 * <p>
29
 * The following features are implemented:
30
 * <ul>
31
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LayoutImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
32
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.LayoutImpl#getBundleName <em>Bundle Name</em>}</li>
33
 * </ul>
34
 * </p>
35
 *
36
 * @generated
37
 */
38
public class LayoutImpl extends EObjectImpl implements Layout {
39
	/**
40
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
41
	 * <!-- begin-user-doc -->
42
	 * <!-- end-user-doc -->
43
	 * @see #getQualifiedClassName()
44
	 * @generated
45
	 * @ordered
46
	 */
47
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
48
49
	/**
50
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
51
	 * <!-- begin-user-doc -->
52
	 * <!-- end-user-doc -->
53
	 * @see #getQualifiedClassName()
54
	 * @generated
55
	 * @ordered
56
	 */
57
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
58
59
	/**
60
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
61
	 * <!-- begin-user-doc -->
62
	 * <!-- end-user-doc -->
63
	 * @see #getBundleName()
64
	 * @generated
65
	 * @ordered
66
	 */
67
	protected static final String BUNDLE_NAME_EDEFAULT = null;
68
69
	/**
70
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
71
	 * <!-- begin-user-doc -->
72
	 * <!-- end-user-doc -->
73
	 * @see #getBundleName()
74
	 * @generated
75
	 * @ordered
76
	 */
77
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
78
79
	/**
80
	 * <!-- begin-user-doc -->
81
	 * <!-- end-user-doc -->
82
	 * @generated
83
	 */
84
	protected LayoutImpl() {
85
		super();
86
	}
87
88
	/**
89
	 * <!-- begin-user-doc -->
90
	 * <!-- end-user-doc -->
91
	 * @generated
92
	 */
93
	protected EClass eStaticClass() {
94
		return GMFGraphPackage.eINSTANCE.getLayout();
95
	}
96
97
	/**
98
	 * <!-- begin-user-doc -->
99
	 * <!-- end-user-doc -->
100
	 * @generated
101
	 */
102
	public String getQualifiedClassName() {
103
		return qualifiedClassName;
104
	}
105
106
	/**
107
	 * <!-- begin-user-doc -->
108
	 * <!-- end-user-doc -->
109
	 * @generated
110
	 */
111
	public void setQualifiedClassName(String newQualifiedClassName) {
112
		String oldQualifiedClassName = qualifiedClassName;
113
		qualifiedClassName = newQualifiedClassName;
114
		if (eNotificationRequired())
115
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
116
	}
117
118
	/**
119
	 * <!-- begin-user-doc -->
120
	 * <!-- end-user-doc -->
121
	 * @generated
122
	 */
123
	public String getBundleName() {
124
		return bundleName;
125
	}
126
127
	/**
128
	 * <!-- begin-user-doc -->
129
	 * <!-- end-user-doc -->
130
	 * @generated
131
	 */
132
	public void setBundleName(String newBundleName) {
133
		String oldBundleName = bundleName;
134
		bundleName = newBundleName;
135
		if (eNotificationRequired())
136
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.LAYOUT__BUNDLE_NAME, oldBundleName, bundleName));
137
	}
138
139
	/**
140
	 * <!-- begin-user-doc -->
141
	 * <!-- end-user-doc -->
142
	 * @generated
143
	 */
144
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
145
		switch (featureID) {
146
			case GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME:
147
				return getQualifiedClassName();
148
			case GMFGraphPackage.LAYOUT__BUNDLE_NAME:
149
				return getBundleName();
150
		}
151
		return super.eGet(featureID, resolve, coreType);
152
	}
153
154
	/**
155
	 * <!-- begin-user-doc -->
156
	 * <!-- end-user-doc -->
157
	 * @generated
158
	 */
159
	public void eSet(int featureID, Object newValue) {
160
		switch (featureID) {
161
			case GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME:
162
				setQualifiedClassName((String)newValue);
163
				return;
164
			case GMFGraphPackage.LAYOUT__BUNDLE_NAME:
165
				setBundleName((String)newValue);
166
				return;
167
		}
168
		super.eSet(featureID, newValue);
169
	}
170
171
	/**
172
	 * <!-- begin-user-doc -->
173
	 * <!-- end-user-doc -->
174
	 * @generated
175
	 */
176
	public void eUnset(int featureID) {
177
		switch (featureID) {
178
			case GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME:
179
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
180
				return;
181
			case GMFGraphPackage.LAYOUT__BUNDLE_NAME:
182
				setBundleName(BUNDLE_NAME_EDEFAULT);
183
				return;
184
		}
185
		super.eUnset(featureID);
186
	}
187
188
	/**
189
	 * <!-- begin-user-doc -->
190
	 * <!-- end-user-doc -->
191
	 * @generated
192
	 */
193
	public boolean eIsSet(int featureID) {
194
		switch (featureID) {
195
			case GMFGraphPackage.LAYOUT__QUALIFIED_CLASS_NAME:
196
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
197
			case GMFGraphPackage.LAYOUT__BUNDLE_NAME:
198
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
199
		}
200
		return super.eIsSet(featureID);
201
	}
202
203
	/**
204
	 * <!-- begin-user-doc -->
205
	 * <!-- end-user-doc -->
206
	 * @generated
207
	 */
208
	public String toString() {
209
		if (eIsProxy()) return super.toString();
210
211
		StringBuffer result = new StringBuffer(super.toString());
212
		result.append(" (qualifiedClassName: ");
213
		result.append(qualifiedClassName);
214
		result.append(", bundleName: ");
215
		result.append(bundleName);
216
		result.append(')');
217
		return result.toString();
218
	}
219
220
} //LayoutImpl
(-)src/org/eclipse/gmf/gmfgraph/impl/CustomLayoutImpl.java (+303 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph.impl;
8
9
import java.util.Collection;
10
11
import org.eclipse.emf.common.notify.Notification;
12
import org.eclipse.emf.common.notify.NotificationChain;
13
14
import org.eclipse.emf.common.util.EList;
15
16
import org.eclipse.emf.ecore.EClass;
17
import org.eclipse.emf.ecore.InternalEObject;
18
19
import org.eclipse.emf.ecore.impl.ENotificationImpl;
20
import org.eclipse.emf.ecore.impl.EObjectImpl;
21
22
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23
import org.eclipse.emf.ecore.util.InternalEList;
24
25
import org.eclipse.gmf.gmfgraph.CustomAttribute;
26
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
27
import org.eclipse.gmf.gmfgraph.CustomLayout;
28
import org.eclipse.gmf.gmfgraph.GMFGraphPackage;
29
30
/**
31
 * <!-- begin-user-doc -->
32
 * An implementation of the model object '<em><b>Custom Layout</b></em>'.
33
 * <!-- end-user-doc -->
34
 * <p>
35
 * The following features are implemented:
36
 * <ul>
37
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutImpl#getQualifiedClassName <em>Qualified Class Name</em>}</li>
38
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutImpl#getBundleName <em>Bundle Name</em>}</li>
39
 *   <li>{@link org.eclipse.gmf.gmfgraph.impl.CustomLayoutImpl#getAttributes <em>Attributes</em>}</li>
40
 * </ul>
41
 * </p>
42
 *
43
 * @generated
44
 */
45
public class CustomLayoutImpl extends EObjectImpl implements CustomLayout {
46
	/**
47
	 * The default value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @see #getQualifiedClassName()
51
	 * @generated
52
	 * @ordered
53
	 */
54
	protected static final String QUALIFIED_CLASS_NAME_EDEFAULT = null;
55
56
	/**
57
	 * The cached value of the '{@link #getQualifiedClassName() <em>Qualified Class Name</em>}' attribute.
58
	 * <!-- begin-user-doc -->
59
	 * <!-- end-user-doc -->
60
	 * @see #getQualifiedClassName()
61
	 * @generated
62
	 * @ordered
63
	 */
64
	protected String qualifiedClassName = QUALIFIED_CLASS_NAME_EDEFAULT;
65
66
	/**
67
	 * The default value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
68
	 * <!-- begin-user-doc -->
69
	 * <!-- end-user-doc -->
70
	 * @see #getBundleName()
71
	 * @generated
72
	 * @ordered
73
	 */
74
	protected static final String BUNDLE_NAME_EDEFAULT = null;
75
76
	/**
77
	 * The cached value of the '{@link #getBundleName() <em>Bundle Name</em>}' attribute.
78
	 * <!-- begin-user-doc -->
79
	 * <!-- end-user-doc -->
80
	 * @see #getBundleName()
81
	 * @generated
82
	 * @ordered
83
	 */
84
	protected String bundleName = BUNDLE_NAME_EDEFAULT;
85
86
	/**
87
	 * The cached value of the '{@link #getAttributes() <em>Attributes</em>}' containment reference list.
88
	 * <!-- begin-user-doc -->
89
	 * <!-- end-user-doc -->
90
	 * @see #getAttributes()
91
	 * @generated
92
	 * @ordered
93
	 */
94
	protected EList attributes = null;
95
96
	/**
97
	 * <!-- begin-user-doc -->
98
	 * <!-- end-user-doc -->
99
	 * @generated
100
	 */
101
	protected CustomLayoutImpl() {
102
		super();
103
	}
104
105
	/**
106
	 * <!-- begin-user-doc -->
107
	 * <!-- end-user-doc -->
108
	 * @generated
109
	 */
110
	protected EClass eStaticClass() {
111
		return GMFGraphPackage.eINSTANCE.getCustomLayout();
112
	}
113
114
	/**
115
	 * <!-- begin-user-doc -->
116
	 * <!-- end-user-doc -->
117
	 * @generated
118
	 */
119
	public String getQualifiedClassName() {
120
		return qualifiedClassName;
121
	}
122
123
	/**
124
	 * <!-- begin-user-doc -->
125
	 * <!-- end-user-doc -->
126
	 * @generated
127
	 */
128
	public void setQualifiedClassName(String newQualifiedClassName) {
129
		String oldQualifiedClassName = qualifiedClassName;
130
		qualifiedClassName = newQualifiedClassName;
131
		if (eNotificationRequired())
132
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME, oldQualifiedClassName, qualifiedClassName));
133
	}
134
135
	/**
136
	 * <!-- begin-user-doc -->
137
	 * <!-- end-user-doc -->
138
	 * @generated
139
	 */
140
	public String getBundleName() {
141
		return bundleName;
142
	}
143
144
	/**
145
	 * <!-- begin-user-doc -->
146
	 * <!-- end-user-doc -->
147
	 * @generated
148
	 */
149
	public void setBundleName(String newBundleName) {
150
		String oldBundleName = bundleName;
151
		bundleName = newBundleName;
152
		if (eNotificationRequired())
153
			eNotify(new ENotificationImpl(this, Notification.SET, GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME, oldBundleName, bundleName));
154
	}
155
156
	/**
157
	 * <!-- begin-user-doc -->
158
	 * <!-- end-user-doc -->
159
	 * @generated
160
	 */
161
	public EList getAttributes() {
162
		if (attributes == null) {
163
			attributes = new EObjectContainmentEList(CustomAttribute.class, this, GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES);
164
		}
165
		return attributes;
166
	}
167
168
	/**
169
	 * <!-- begin-user-doc -->
170
	 * <!-- end-user-doc -->
171
	 * @generated
172
	 */
173
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
174
		switch (featureID) {
175
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
176
				return ((InternalEList)getAttributes()).basicRemove(otherEnd, msgs);
177
		}
178
		return super.eInverseRemove(otherEnd, featureID, msgs);
179
	}
180
181
	/**
182
	 * <!-- begin-user-doc -->
183
	 * <!-- end-user-doc -->
184
	 * @generated
185
	 */
186
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
187
		switch (featureID) {
188
			case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME:
189
				return getQualifiedClassName();
190
			case GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME:
191
				return getBundleName();
192
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
193
				return getAttributes();
194
		}
195
		return super.eGet(featureID, resolve, coreType);
196
	}
197
198
	/**
199
	 * <!-- begin-user-doc -->
200
	 * <!-- end-user-doc -->
201
	 * @generated
202
	 */
203
	public void eSet(int featureID, Object newValue) {
204
		switch (featureID) {
205
			case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME:
206
				setQualifiedClassName((String)newValue);
207
				return;
208
			case GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME:
209
				setBundleName((String)newValue);
210
				return;
211
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
212
				getAttributes().clear();
213
				getAttributes().addAll((Collection)newValue);
214
				return;
215
		}
216
		super.eSet(featureID, newValue);
217
	}
218
219
	/**
220
	 * <!-- begin-user-doc -->
221
	 * <!-- end-user-doc -->
222
	 * @generated
223
	 */
224
	public void eUnset(int featureID) {
225
		switch (featureID) {
226
			case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME:
227
				setQualifiedClassName(QUALIFIED_CLASS_NAME_EDEFAULT);
228
				return;
229
			case GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME:
230
				setBundleName(BUNDLE_NAME_EDEFAULT);
231
				return;
232
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
233
				getAttributes().clear();
234
				return;
235
		}
236
		super.eUnset(featureID);
237
	}
238
239
	/**
240
	 * <!-- begin-user-doc -->
241
	 * <!-- end-user-doc -->
242
	 * @generated
243
	 */
244
	public boolean eIsSet(int featureID) {
245
		switch (featureID) {
246
			case GMFGraphPackage.CUSTOM_LAYOUT__QUALIFIED_CLASS_NAME:
247
				return QUALIFIED_CLASS_NAME_EDEFAULT == null ? qualifiedClassName != null : !QUALIFIED_CLASS_NAME_EDEFAULT.equals(qualifiedClassName);
248
			case GMFGraphPackage.CUSTOM_LAYOUT__BUNDLE_NAME:
249
				return BUNDLE_NAME_EDEFAULT == null ? bundleName != null : !BUNDLE_NAME_EDEFAULT.equals(bundleName);
250
			case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES:
251
				return attributes != null && !attributes.isEmpty();
252
		}
253
		return super.eIsSet(featureID);
254
	}
255
256
	/**
257
	 * <!-- begin-user-doc -->
258
	 * <!-- end-user-doc -->
259
	 * @generated
260
	 */
261
	public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) {
262
		if (baseClass == CustomConfigurableClass.class) {
263
			switch (derivedFeatureID) {
264
				case GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES: return GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES;
265
				default: return -1;
266
			}
267
		}
268
		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
269
	}
270
271
	/**
272
	 * <!-- begin-user-doc -->
273
	 * <!-- end-user-doc -->
274
	 * @generated
275
	 */
276
	public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) {
277
		if (baseClass == CustomConfigurableClass.class) {
278
			switch (baseFeatureID) {
279
				case GMFGraphPackage.CUSTOM_CONFIGURABLE_CLASS__ATTRIBUTES: return GMFGraphPackage.CUSTOM_LAYOUT__ATTRIBUTES;
280
				default: return -1;
281
			}
282
		}
283
		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
284
	}
285
286
	/**
287
	 * <!-- begin-user-doc -->
288
	 * <!-- end-user-doc -->
289
	 * @generated
290
	 */
291
	public String toString() {
292
		if (eIsProxy()) return super.toString();
293
294
		StringBuffer result = new StringBuffer(super.toString());
295
		result.append(" (qualifiedClassName: ");
296
		result.append(qualifiedClassName);
297
		result.append(", bundleName: ");
298
		result.append(bundleName);
299
		result.append(')');
300
		return result.toString();
301
	}
302
303
} //CustomLayoutImpl
(-)src/org/eclipse/gmf/gmfgraph/CustomLayout.java (+21 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Custom Layout</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 *
16
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomLayout()
17
 * @model
18
 * @generated
19
 */
20
public interface CustomLayout extends Layout, CustomConfigurableClass {
21
} // CustomLayout
(-)src/org/eclipse/gmf/gmfgraph/CustomLayoutData.java (+21 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Custom Layout Data</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 *
16
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomLayoutData()
17
 * @model
18
 * @generated
19
 */
20
public interface CustomLayoutData extends Layout, CustomConfigurableClass {
21
} // CustomLayoutData
(-)src/org/eclipse/gmf/gmfgraph/BorderLayoutData.java (+85 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
10
/**
11
 * <!-- begin-user-doc -->
12
 * A representation of the model object '<em><b>Border Layout Data</b></em>'.
13
 * <!-- end-user-doc -->
14
 *
15
 * <p>
16
 * The following features are supported:
17
 * <ul>
18
 *   <li>{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#getAlignment <em>Alignment</em>}</li>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#isVertical <em>Vertical</em>}</li>
20
 * </ul>
21
 * </p>
22
 *
23
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getBorderLayoutData()
24
 * @model
25
 * @generated
26
 */
27
public interface BorderLayoutData extends LayoutData {
28
	/**
29
	 * Returns the value of the '<em><b>Alignment</b></em>' attribute.
30
	 * The default value is <code>"CENTER"</code>.
31
	 * The literals are from the enumeration {@link org.eclipse.gmf.gmfgraph.Alignment}.
32
	 * <!-- begin-user-doc -->
33
	 * <p>
34
	 * If the meaning of the '<em>Alignment</em>' attribute isn't clear,
35
	 * there really should be more of a description here...
36
	 * </p>
37
	 * <!-- end-user-doc -->
38
	 * @return the value of the '<em>Alignment</em>' attribute.
39
	 * @see org.eclipse.gmf.gmfgraph.Alignment
40
	 * @see #setAlignment(Alignment)
41
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getBorderLayoutData_Alignment()
42
	 * @model default="CENTER" required="true"
43
	 * @generated
44
	 */
45
	Alignment getAlignment();
46
47
	/**
48
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#getAlignment <em>Alignment</em>}' attribute.
49
	 * <!-- begin-user-doc -->
50
	 * <!-- end-user-doc -->
51
	 * @param value the new value of the '<em>Alignment</em>' attribute.
52
	 * @see org.eclipse.gmf.gmfgraph.Alignment
53
	 * @see #getAlignment()
54
	 * @generated
55
	 */
56
	void setAlignment(Alignment value);
57
58
	/**
59
	 * Returns the value of the '<em><b>Vertical</b></em>' attribute.
60
	 * The default value is <code>"false"</code>.
61
	 * <!-- begin-user-doc -->
62
	 * <p>
63
	 * If the meaning of the '<em>Vertical</em>' attribute isn't clear,
64
	 * there really should be more of a description here...
65
	 * </p>
66
	 * <!-- end-user-doc -->
67
	 * @return the value of the '<em>Vertical</em>' attribute.
68
	 * @see #setVertical(boolean)
69
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getBorderLayoutData_Vertical()
70
	 * @model default="false"
71
	 * @generated
72
	 */
73
	boolean isVertical();
74
75
	/**
76
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.BorderLayoutData#isVertical <em>Vertical</em>}' attribute.
77
	 * <!-- begin-user-doc -->
78
	 * <!-- end-user-doc -->
79
	 * @param value the new value of the '<em>Vertical</em>' attribute.
80
	 * @see #isVertical()
81
	 * @generated
82
	 */
83
	void setVertical(boolean value);
84
85
} // BorderLayoutData
(-)src/org/eclipse/gmf/gmfgraph/LayoutData.java (+56 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.ecore.EObject;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Layout Data</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 * <p>
17
 * The following features are supported:
18
 * <ul>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.LayoutData#getOwner <em>Owner</em>}</li>
20
 * </ul>
21
 * </p>
22
 *
23
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayoutData()
24
 * @model interface="true" abstract="true"
25
 * @generated
26
 */
27
public interface LayoutData extends CustomClass {
28
	/**
29
	 * Returns the value of the '<em><b>Owner</b></em>' container reference.
30
	 * It is bidirectional and its opposite is '{@link org.eclipse.gmf.gmfgraph.Layoutable#getData <em>Data</em>}'.
31
	 * <!-- begin-user-doc -->
32
	 * <p>
33
	 * If the meaning of the '<em>Owner</em>' container reference isn't clear,
34
	 * there really should be more of a description here...
35
	 * </p>
36
	 * <!-- end-user-doc -->
37
	 * @return the value of the '<em>Owner</em>' container reference.
38
	 * @see #setOwner(Layoutable)
39
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayoutData_Owner()
40
	 * @see org.eclipse.gmf.gmfgraph.Layoutable#getData
41
	 * @model opposite="data" required="true"
42
	 * @generated
43
	 */
44
	Layoutable getOwner();
45
46
	/**
47
	 * Sets the value of the '{@link org.eclipse.gmf.gmfgraph.LayoutData#getOwner <em>Owner</em>}' container reference.
48
	 * <!-- begin-user-doc -->
49
	 * <!-- end-user-doc -->
50
	 * @param value the new value of the '<em>Owner</em>' container reference.
51
	 * @see #getOwner()
52
	 * @generated
53
	 */
54
	void setOwner(Layoutable value);
55
56
} // LayoutData
(-)src/org/eclipse/gmf/gmfgraph/CustomConfigurableClass.java (+44 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.common.util.EList;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Custom Configurable Class</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 * <p>
17
 * The following features are supported:
18
 * <ul>
19
 *   <li>{@link org.eclipse.gmf.gmfgraph.CustomConfigurableClass#getAttributes <em>Attributes</em>}</li>
20
 * </ul>
21
 * </p>
22
 *
23
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomConfigurableClass()
24
 * @model
25
 * @generated
26
 */
27
public interface CustomConfigurableClass extends CustomClass {
28
	/**
29
	 * Returns the value of the '<em><b>Attributes</b></em>' containment reference list.
30
	 * The list contents are of type {@link org.eclipse.gmf.gmfgraph.CustomAttribute}.
31
	 * <!-- begin-user-doc -->
32
	 * <p>
33
	 * If the meaning of the '<em>Attributes</em>' containment reference list isn't clear,
34
	 * there really should be more of a description here...
35
	 * </p>
36
	 * <!-- end-user-doc -->
37
	 * @return the value of the '<em>Attributes</em>' containment reference list.
38
	 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getCustomConfigurableClass_Attributes()
39
	 * @model type="org.eclipse.gmf.gmfgraph.CustomAttribute" containment="true"
40
	 * @generated
41
	 */
42
	EList getAttributes();
43
44
} // CustomConfigurableClass
(-)src/org/eclipse/gmf/gmfgraph/Layout.java (+22 lines)
Added Link Here
1
/**
2
 * <copyright>
3
 * </copyright>
4
 *
5
 * $Id$
6
 */
7
package org.eclipse.gmf.gmfgraph;
8
9
import org.eclipse.emf.ecore.EObject;
10
11
/**
12
 * <!-- begin-user-doc -->
13
 * A representation of the model object '<em><b>Layout</b></em>'.
14
 * <!-- end-user-doc -->
15
 *
16
 *
17
 * @see org.eclipse.gmf.gmfgraph.GMFGraphPackage#getLayout()
18
 * @model interface="true" abstract="true"
19
 * @generated
20
 */
21
public interface Layout extends CustomClass {
22
} // Layout
(-)src-templates/org/eclipse/gmf/codegen/templates/parts/NodeEditPartGenerator.java (-1 / +1 lines)
Lines 63-69 Link Here
63
  protected final String TEXT_44 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodePlate() {";
63
  protected final String TEXT_44 = NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodePlate() {";
64
  protected final String TEXT_45 = NL + "\t\treturn new DefaultSizeNodeFigure(getMapMode().DPtoLP(";
64
  protected final String TEXT_45 = NL + "\t\treturn new DefaultSizeNodeFigure(getMapMode().DPtoLP(";
65
  protected final String TEXT_46 = "), getMapMode().DPtoLP(";
65
  protected final String TEXT_46 = "), getMapMode().DPtoLP(";
66
  protected final String TEXT_47 = "));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodeFigure() {" + NL + "\t\tNodeFigure figure = createNodePlate();" + NL + "\t\tfigure.setLayoutManager(new StackLayout());" + NL + "\t\tIFigure shape = createNodeShape();" + NL + "\t\tfigure.add(shape);" + NL + "\t\tshape.setLayoutManager(new StackLayout());" + NL + "\t\t" + NL + "\t\tIFigure shapeContents = new Figure();" + NL + "\t\tshape.add(shapeContents);" + NL + "\t\tshapeContents.setLayoutManager(new BorderLayout());" + NL + "\t\taddContentPane(shapeContents);" + NL + "\t\tdecorateShape(shapeContents);" + NL + "" + NL + "\t\treturn figure;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void decorateShape(IFigure shapeContents) {" + NL + "\t\tView view = (View) getModel();" + NL + "\t\tEAnnotation annotation = view.getEAnnotation(\"Shortcutted\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\tFigure decorationPane = new Figure();" + NL + "\t\tdecorationPane.setLayoutManager(new BorderLayout());" + NL + "\t\tshapeContents.add(decorationPane, BorderLayout.BOTTOM);" + NL + "\t\t" + NL + "\t\tImageFigureEx imageFigure = new ImageFigureEx(";
66
  protected final String TEXT_47 = "));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Creates figure for this edit part." + NL + "\t * " + NL + "\t * Body of this method does not depend on settings in generation model" + NL + "\t * so you may safely remove <i>generated</i> tag and modify it." + NL + "\t * " + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected NodeFigure createNodeFigure() {" + NL + "\t\tNodeFigure figure = createNodePlate();" + NL + "\t\tfigure.setLayoutManager(new StackLayout());" + NL + "\t\tIFigure shape = createNodeShape();" + NL + "\t\tfigure.add(shape);" + NL + "\t\tif (shape.getLayoutManager() == null){" + NL + "\t\t\tshape.setLayoutManager(new StackLayout());" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\tIFigure shapeContents = new Figure();" + NL + "\t\tshape.add(shapeContents);" + NL + "\t\tshapeContents.setLayoutManager(new BorderLayout());" + NL + "\t\taddContentPane(shapeContents);" + NL + "\t\tdecorateShape(shapeContents);" + NL + "" + NL + "\t\treturn figure;" + NL + "\t}" + NL + "\t" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void decorateShape(IFigure shapeContents) {" + NL + "\t\tView view = (View) getModel();" + NL + "\t\tEAnnotation annotation = view.getEAnnotation(\"Shortcutted\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\tFigure decorationPane = new Figure();" + NL + "\t\tdecorationPane.setLayoutManager(new BorderLayout());" + NL + "\t\tshapeContents.add(decorationPane, BorderLayout.BOTTOM);" + NL + "\t\t" + NL + "\t\tImageFigureEx imageFigure = new ImageFigureEx(";
67
  protected final String TEXT_48 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"));" + NL + "\t\tdecorationPane.add(imageFigure, BorderLayout.RIGHT);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addContentPane(IFigure shape) {" + NL + "\t\tcontentPane = new ";
67
  protected final String TEXT_48 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"));" + NL + "\t\tdecorationPane.add(imageFigure, BorderLayout.RIGHT);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addContentPane(IFigure shape) {" + NL + "\t\tcontentPane = new ";
68
  protected final String TEXT_49 = "();" + NL + "\t\tshape.add(contentPane, BorderLayout.CENTER);";
68
  protected final String TEXT_49 = "();" + NL + "\t\tshape.add(contentPane, BorderLayout.CENTER);";
69
  protected final String TEXT_50 = NL + "\t\t";
69
  protected final String TEXT_50 = NL + "\t\t";
(-)templates/parts/NodeEditPart.javajet (-1 / +3 lines)
Lines 163-169 Link Here
163
		figure.setLayoutManager(new StackLayout());
163
		figure.setLayoutManager(new StackLayout());
164
		IFigure shape = createNodeShape();
164
		IFigure shape = createNodeShape();
165
		figure.add(shape);
165
		figure.add(shape);
166
		shape.setLayoutManager(new StackLayout());
166
		if (shape.getLayoutManager() == null){
167
			shape.setLayoutManager(new StackLayout());
168
		}
167
		
169
		
168
		IFigure shapeContents = new Figure();
170
		IFigure shapeContents = new Figure();
169
		shape.add(shapeContents);
171
		shape.add(shapeContents);
(-)src/org/eclipse/gmf/graphdef/codegen/templates/NewFigureGenerator.java (-1 / +6 lines)
Lines 1-7 Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
2
3
import org.eclipse.gmf.gmfgraph.*;
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
5
6
public class NewFigureGenerator
6
public class NewFigureGenerator
7
{
7
{
Lines 20-25 Link Here
20
  protected final String TEXT_3 = " = new ";
20
  protected final String TEXT_3 = " = new ";
21
  protected final String TEXT_4 = "();";
21
  protected final String TEXT_4 = "();";
22
  protected final String TEXT_5 = NL;
22
  protected final String TEXT_5 = NL;
23
  protected final String TEXT_6 = NL;
24
  protected final String TEXT_7 = NL;
23
25
24
  public String generate(Object argument)
26
  public String generate(Object argument)
25
  {
27
  {
Lines 42-47 Link Here
42
    stringBuffer.append(TEXT_4);
44
    stringBuffer.append(TEXT_4);
43
    stringBuffer.append(TEXT_5);
45
    stringBuffer.append(TEXT_5);
44
    stringBuffer.append(args.getDispatcher().dispatch(figureInstance, args));
46
    stringBuffer.append(args.getDispatcher().dispatch(figureInstance, args));
47
    stringBuffer.append(TEXT_6);
48
    stringBuffer.append(args.getDispatcher().dispatch("createLayout", new LayoutGeneratorArguments(args)));
49
    stringBuffer.append(TEXT_7);
45
    return stringBuffer.toString();
50
    return stringBuffer.toString();
46
  }
51
  }
47
}
52
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/TopShapeGenerator.java (-36 / +55 lines)
Lines 3-9 Link Here
3
import org.eclipse.gmf.gmfgraph.*;
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.gmfgraph.util.*;
4
import org.eclipse.gmf.gmfgraph.util.*;
5
import org.eclipse.gmf.common.codegen.*;
5
import org.eclipse.gmf.common.codegen.*;
6
import org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher;
6
import org.eclipse.gmf.graphdef.codegen.*;
7
import java.util.*;
7
import java.util.*;
8
8
9
public class TopShapeGenerator
9
public class TopShapeGenerator
Lines 22-45 Link Here
22
  protected final String TEXT_2 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
22
  protected final String TEXT_2 = NL + NL + "/**" + NL + " * @generated" + NL + " */" + NL + "public class ";
23
  protected final String TEXT_3 = " extends ";
23
  protected final String TEXT_3 = " extends ";
24
  protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
24
  protected final String TEXT_4 = " {" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic ";
25
  protected final String TEXT_5 = "() {" + NL + "\t\t";
25
  protected final String TEXT_5 = "() {";
26
  protected final String TEXT_6 = NL + "\t\tsetFigure";
26
  protected final String TEXT_6 = "\t" + NL + "\t\t";
27
  protected final String TEXT_7 = "(createFigure";
27
  protected final String TEXT_7 = NL + "\t\t";
28
  protected final String TEXT_8 = "());" + NL + "\t\tadd(getFigure";
28
  protected final String TEXT_8 = NL + "\t\t" + NL + "\t\torg.eclipse.draw2d.IFigure child";
29
  protected final String TEXT_9 = "());";
29
  protected final String TEXT_9 = " = createFigure";
30
  protected final String TEXT_10 = NL + "\t}" + NL;
30
  protected final String TEXT_10 = "();" + NL + "\t\tsetFigure";
31
  protected final String TEXT_11 = NL + NL + "\tprivate IFigure f";
31
  protected final String TEXT_11 = "(child";
32
  protected final String TEXT_12 = "; " + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getFigure";
32
  protected final String TEXT_12 = ");" + NL + "\t\tadd(child";
33
  protected final String TEXT_13 = "() {" + NL + "\t\treturn f";
33
  protected final String TEXT_13 = ");" + NL + "" + NL + "\t\t";
34
  protected final String TEXT_14 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFigure";
34
  protected final String TEXT_14 = "\t\t" + NL;
35
  protected final String TEXT_15 = "(IFigure figure) {" + NL + "\t\tf";
35
  protected final String TEXT_15 = NL + "\t}" + NL;
36
  protected final String TEXT_16 = " = figure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure createFigure";
36
  protected final String TEXT_16 = NL + NL + "\tprivate IFigure f";
37
  protected final String TEXT_17 = "() {";
37
  protected final String TEXT_17 = "; " + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic IFigure getFigure";
38
  protected final String TEXT_18 = NL;
38
  protected final String TEXT_18 = "() {" + NL + "\t\treturn f";
39
  protected final String TEXT_19 = NL;
39
  protected final String TEXT_19 = ";" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void setFigure";
40
  protected final String TEXT_20 = NL + "\t\treturn rv;" + NL + "\t}" + NL;
40
  protected final String TEXT_20 = "(IFigure figure) {" + NL + "\t\tf";
41
  protected final String TEXT_21 = NL + "}";
41
  protected final String TEXT_21 = " = figure;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate IFigure createFigure";
42
  protected final String TEXT_22 = NL;
42
  protected final String TEXT_22 = "() {";
43
  protected final String TEXT_23 = NL;
44
  protected final String TEXT_24 = NL;
45
  protected final String TEXT_25 = NL + "\t\treturn rv;" + NL + "\t}" + NL;
46
  protected final String TEXT_26 = NL + "}";
47
  protected final String TEXT_27 = NL;
43
48
44
  public String generate(Object argument)
49
  public String generate(Object argument)
45
  {
50
  {
Lines 60-104 Link Here
60
    stringBuffer.append(TEXT_4);
65
    stringBuffer.append(TEXT_4);
61
    stringBuffer.append(figure.getName());
66
    stringBuffer.append(figure.getName());
62
    stringBuffer.append(TEXT_5);
67
    stringBuffer.append(TEXT_5);
63
    stringBuffer.append(dispatcher.dispatch(figure, dispatcher.create(figure, "this")));
64
    
68
    
65
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
69
LayoutGeneratorArguments dispatcherArgs = new LayoutGeneratorArguments(dispatcher.create(figure, "this"), "myGenLayoutManager");
66
		Figure next = (Figure) it.next();
70
67
    stringBuffer.append(TEXT_6);
71
    stringBuffer.append(TEXT_6);
68
    stringBuffer.append(next.getName());
72
    stringBuffer.append(dispatcher.dispatch("createLayout", dispatcherArgs));
69
    stringBuffer.append(TEXT_7);
73
    stringBuffer.append(TEXT_7);
70
    stringBuffer.append(next.getName());
74
    stringBuffer.append(dispatcher.dispatch(figure, dispatcherArgs));
75
    
76
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
77
		Figure next = (Figure) it.next();
71
    stringBuffer.append(TEXT_8);
78
    stringBuffer.append(TEXT_8);
72
    stringBuffer.append(next.getName());
79
    stringBuffer.append(next.getName());
73
    stringBuffer.append(TEXT_9);
80
    stringBuffer.append(TEXT_9);
74
    }
81
    stringBuffer.append(next.getName());
75
    stringBuffer.append(TEXT_10);
82
    stringBuffer.append(TEXT_10);
76
    
83
    stringBuffer.append(next.getName());
77
int fc = 0;
78
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext(); fc++) {
79
	Figure next = (Figure) it.next();
80
    stringBuffer.append(TEXT_11);
84
    stringBuffer.append(TEXT_11);
81
    stringBuffer.append(next.getName());
85
    stringBuffer.append(next.getName());
82
    stringBuffer.append(TEXT_12);
86
    stringBuffer.append(TEXT_12);
83
    stringBuffer.append(next.getName());
87
    stringBuffer.append(next.getName());
84
    stringBuffer.append(TEXT_13);
88
    stringBuffer.append(TEXT_13);
85
    stringBuffer.append(next.getName());
89
    stringBuffer.append(dispatcher.dispatch("createLayoutData", 
90
				new LayoutGeneratorArguments(dispatcher.create(next, "child" + next.getName()), "layout" + next.getName())
91
		));
86
    stringBuffer.append(TEXT_14);
92
    stringBuffer.append(TEXT_14);
87
    stringBuffer.append(next.getName());
93
    }
88
    stringBuffer.append(TEXT_15);
94
    stringBuffer.append(TEXT_15);
89
    stringBuffer.append(next.getName());
95
    
96
int fc = 0;
97
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext(); fc++) {
98
	Figure next = (Figure) it.next();
90
    stringBuffer.append(TEXT_16);
99
    stringBuffer.append(TEXT_16);
91
    stringBuffer.append(next.getName());
100
    stringBuffer.append(next.getName());
92
    stringBuffer.append(TEXT_17);
101
    stringBuffer.append(TEXT_17);
102
    stringBuffer.append(next.getName());
93
    stringBuffer.append(TEXT_18);
103
    stringBuffer.append(TEXT_18);
94
    stringBuffer.append(dispatcher.dispatch("instantiate", dispatcher.create(next, "rv")));
104
    stringBuffer.append(next.getName());
95
    stringBuffer.append(TEXT_19);
105
    stringBuffer.append(TEXT_19);
96
    stringBuffer.append(dispatcher.dispatch("Children", new Object[] {next.getChildren(), dispatcher, "rv"}));
106
    stringBuffer.append(next.getName());
97
    stringBuffer.append(TEXT_20);
107
    stringBuffer.append(TEXT_20);
98
    }
108
    stringBuffer.append(next.getName());
99
    stringBuffer.append(TEXT_21);
109
    stringBuffer.append(TEXT_21);
100
    importManager.emitSortedImports();
110
    stringBuffer.append(next.getName());
101
    stringBuffer.append(TEXT_22);
111
    stringBuffer.append(TEXT_22);
112
    stringBuffer.append(TEXT_23);
113
    stringBuffer.append(dispatcher.dispatch("instantiate", dispatcher.create(next, "rv")));
114
    stringBuffer.append(TEXT_24);
115
    stringBuffer.append(dispatcher.dispatch("Children", new Object[] {next.getChildren(), dispatcher, "rv"}));
116
    stringBuffer.append(TEXT_25);
117
    }
118
    stringBuffer.append(TEXT_26);
119
    importManager.emitSortedImports();
120
    stringBuffer.append(TEXT_27);
102
    return stringBuffer.toString();
121
    return stringBuffer.toString();
103
  }
122
  }
104
}
123
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/FigureChildrenGenerator.java (-3 / +7 lines)
Lines 1-7 Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
2
3
import org.eclipse.gmf.gmfgraph.*;
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
import java.util.*;
5
import java.util.*;
6
6
7
public class FigureChildrenGenerator
7
public class FigureChildrenGenerator
Lines 20-26 Link Here
20
  protected final String TEXT_2 = NL + "\t\t// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?" + NL + "\t\t";
20
  protected final String TEXT_2 = NL + "\t\t// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?" + NL + "\t\t";
21
  protected final String TEXT_3 = NL + "\t\t";
21
  protected final String TEXT_3 = NL + "\t\t";
22
  protected final String TEXT_4 = ".add(";
22
  protected final String TEXT_4 = ".add(";
23
  protected final String TEXT_5 = ");";
23
  protected final String TEXT_5 = ");" + NL + "\t\t";
24
  protected final String TEXT_6 = NL;
24
  protected final String TEXT_6 = NL;
25
25
26
  public String generate(Object argument)
26
  public String generate(Object argument)
Lines 49-55 Link Here
49
	if (figureMarker instanceof FigureRef) {
49
	if (figureMarker instanceof FigureRef) {
50
		throw new IllegalStateException("FIXME: sorry, don't support FigureRef for a while");
50
		throw new IllegalStateException("FIXME: sorry, don't support FigureRef for a while");
51
	}
51
	}
52
	final String figureVarName = "fig" + (figureCount++);
52
	final String figureVarName = "fig" + figureCount;
53
	final String layoutDataVarName = "layData" + figureCount;
54
	figureCount++;
53
    stringBuffer.append(TEXT_2);
55
    stringBuffer.append(TEXT_2);
54
    stringBuffer.append(dispatcher.dispatch("instantiate", dispatcher.create((Figure) figureMarker, figureVarName)));
56
    stringBuffer.append(dispatcher.dispatch("instantiate", dispatcher.create((Figure) figureMarker, figureVarName)));
55
    stringBuffer.append(TEXT_3);
57
    stringBuffer.append(TEXT_3);
Lines 57-62 Link Here
57
    stringBuffer.append(TEXT_4);
59
    stringBuffer.append(TEXT_4);
58
    stringBuffer.append(figureVarName);
60
    stringBuffer.append(figureVarName);
59
    stringBuffer.append(TEXT_5);
61
    stringBuffer.append(TEXT_5);
62
    stringBuffer.append(dispatcher.dispatch("createLayoutData", 
63
			new LayoutGeneratorArguments(dispatcher, (Figure)figureMarker, figureVarName, layoutDataVarName)));
60
    
64
    
61
if (_nxt instanceof Figure && !((Figure) _nxt).getChildren().isEmpty()) {
65
if (_nxt instanceof Figure && !((Figure) _nxt).getChildren().isEmpty()) {
62
	l.addFirst(marker);
66
	l.addFirst(marker);
(-)META-INF/MANIFEST.MF (-5 / +7 lines)
Lines 1-13 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: Graphical Definition Code Generator
4
Bundle-SymbolicName: org.eclipse.gmf.graphdef.codegen;singleton:=true
4
Bundle-SymbolicName: org.eclipse.gmf.graphdef.codegen;singleton:=true
5
Bundle-Version: 1.0.0.qualifier
5
Bundle-Version: 1.0.0.qualifier
6
Bundle-Vendor: %providerName
6
Bundle-Vendor: Eclipse.org
7
Bundle-Localization: plugin
7
Bundle-Localization: plugin
8
Require-Bundle: org.eclipse.core.runtime,
8
Require-Bundle: org.eclipse.core.runtime,
9
 org.eclipse.gmf.graphdef;visibility:=reexport,
10
 org.eclipse.gmf.common,
11
 org.eclipse.emf.ecore,
9
 org.eclipse.emf.ecore,
12
 org.eclipse.emf.codegen
10
 org.eclipse.gmf.common, 
11
 org.eclipse.gmf.graphdef;visibility:=reexport,
12
 org.eclipse.emf.codegen,
13
 org.eclipse.draw2d
14
 
13
Export-Package: org.eclipse.gmf.graphdef.codegen
15
Export-Package: org.eclipse.gmf.graphdef.codegen
(-)templates/top/Shape.javajet (-4 / +15 lines)
Lines 1-5 Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="TopShapeGenerator" 
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="TopShapeGenerator" 
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher java.util.*"%>
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.gmfgraph.util.* org.eclipse.gmf.common.codegen.* org.eclipse.gmf.graphdef.codegen.* java.util.*"%>
3
<%
3
<%
4
Object[] args = (Object[]) argument;
4
Object[] args = (Object[]) argument;
5
Shape figure = (Shape) args[0];
5
Shape figure = (Shape) args[0];
Lines 18-29 Link Here
18
	 * @generated
18
	 * @generated
19
	 */
19
	 */
20
	public <%=figure.getName()%>() {
20
	public <%=figure.getName()%>() {
21
		<%=dispatcher.dispatch(figure, dispatcher.create(figure, "this"))%>
21
<%
22
LayoutGeneratorArguments dispatcherArgs = new LayoutGeneratorArguments(dispatcher.create(figure, "this"), "myGenLayoutManager");
23
%>	
24
		<%=dispatcher.dispatch("createLayout", dispatcherArgs)%>
25
		<%=dispatcher.dispatch(figure, dispatcherArgs)%>
22
<%
26
<%
23
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
27
for (Iterator it = figure.getResolvedChildren().iterator(); it.hasNext();) {
24
		Figure next = (Figure) it.next();%>
28
		Figure next = (Figure) it.next();%>
25
		setFigure<%=next.getName()%>(createFigure<%=next.getName()%>());
29
		
26
		add(getFigure<%=next.getName()%>());
30
		org.eclipse.draw2d.IFigure child<%=next.getName()%> = createFigure<%=next.getName()%>();
31
		setFigure<%=next.getName()%>(child<%=next.getName()%>);
32
		add(child<%=next.getName()%>);
33
34
		<%=dispatcher.dispatch("createLayoutData", 
35
				new LayoutGeneratorArguments(dispatcher.create(next, "child" + next.getName()), "layout" + next.getName())
36
		)%>		
37
27
<%}%>
38
<%}%>
28
	}
39
	}
29
40
(-)src/org/eclipse/gmf/graphdef/codegen/FigureGenerator.java (-1 / +30 lines)
Lines 15-21 Link Here
15
import org.eclipse.emf.codegen.jet.JETException;
15
import org.eclipse.emf.codegen.jet.JETException;
16
import org.eclipse.gmf.common.codegen.ImportAssistant;
16
import org.eclipse.gmf.common.codegen.ImportAssistant;
17
import org.eclipse.gmf.common.codegen.NullImportAssistant;
17
import org.eclipse.gmf.common.codegen.NullImportAssistant;
18
import org.eclipse.gmf.gmfgraph.BorderLayout;
19
import org.eclipse.gmf.gmfgraph.BorderLayoutData;
20
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
21
import org.eclipse.gmf.gmfgraph.CustomLayout;
22
import org.eclipse.gmf.gmfgraph.CustomLayoutData;
18
import org.eclipse.gmf.gmfgraph.Figure;
23
import org.eclipse.gmf.gmfgraph.Figure;
24
import org.eclipse.gmf.gmfgraph.GridLayout;
25
import org.eclipse.gmf.gmfgraph.GridLayoutData;
19
import org.eclipse.gmf.gmfgraph.Label;
26
import org.eclipse.gmf.gmfgraph.Label;
20
import org.eclipse.gmf.gmfgraph.PolygonDecoration;
27
import org.eclipse.gmf.gmfgraph.PolygonDecoration;
21
import org.eclipse.gmf.gmfgraph.Polyline;
28
import org.eclipse.gmf.gmfgraph.Polyline;
Lines 25-34 Link Here
25
import org.eclipse.gmf.gmfgraph.Shape;
32
import org.eclipse.gmf.gmfgraph.Shape;
26
import org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch;
33
import org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch;
27
import org.eclipse.gmf.gmfgraph.util.GMFGraphSwitch;
34
import org.eclipse.gmf.gmfgraph.util.GMFGraphSwitch;
35
import org.eclipse.gmf.graphdef.codegen.templates.CustomClassAttributesGenerator;
28
import org.eclipse.gmf.graphdef.codegen.templates.FigureAttrGenerator;
36
import org.eclipse.gmf.graphdef.codegen.templates.FigureAttrGenerator;
29
import org.eclipse.gmf.graphdef.codegen.templates.FigureChildrenGenerator;
37
import org.eclipse.gmf.graphdef.codegen.templates.FigureChildrenGenerator;
38
import org.eclipse.gmf.graphdef.codegen.templates.InitBorderLayoutDataGenerator;
39
import org.eclipse.gmf.graphdef.codegen.templates.InitBorderLayoutGenerator;
40
import org.eclipse.gmf.graphdef.codegen.templates.InitCustomLayoutDataGenerator;
41
import org.eclipse.gmf.graphdef.codegen.templates.InitCustomLayoutGenerator;
42
import org.eclipse.gmf.graphdef.codegen.templates.InitGridLayoutDataGenerator;
43
import org.eclipse.gmf.graphdef.codegen.templates.InitGridLayoutGenerator;
30
import org.eclipse.gmf.graphdef.codegen.templates.LabelAttrGenerator;
44
import org.eclipse.gmf.graphdef.codegen.templates.LabelAttrGenerator;
31
import org.eclipse.gmf.graphdef.codegen.templates.NewFigureGenerator;
45
import org.eclipse.gmf.graphdef.codegen.templates.NewFigureGenerator;
46
import org.eclipse.gmf.graphdef.codegen.templates.NewLayoutDataGenerator;
47
import org.eclipse.gmf.graphdef.codegen.templates.NewLayoutGenerator;
32
import org.eclipse.gmf.graphdef.codegen.templates.PolygonDecorationAttrGenerator;
48
import org.eclipse.gmf.graphdef.codegen.templates.PolygonDecorationAttrGenerator;
33
import org.eclipse.gmf.graphdef.codegen.templates.PolylineAttrGenerator;
49
import org.eclipse.gmf.graphdef.codegen.templates.PolylineAttrGenerator;
34
import org.eclipse.gmf.graphdef.codegen.templates.PolylineDecorationAttrGenerator;
50
import org.eclipse.gmf.graphdef.codegen.templates.PolylineDecorationAttrGenerator;
Lines 101-107 Link Here
101
		tr.put(Figure.class, "/templates/top/Figure.javajet", TopFigureGenerator.class);
117
		tr.put(Figure.class, "/templates/top/Figure.javajet", TopFigureGenerator.class);
102
		return tr;
118
		return tr;
103
	}
119
	}
104
120
	
105
	// XXX NOTE, the fact we use "instantiate" and "Children" strings
121
	// XXX NOTE, the fact we use "instantiate" and "Children" strings
106
	// helps us to postpone resolution of the next problem (one we make these twwo overridable):
122
	// helps us to postpone resolution of the next problem (one we make these twwo overridable):
107
	// it's not possible to tell from single dispatcher.dispatch(Figure, args) what's the intention - 
123
	// it's not possible to tell from single dispatcher.dispatch(Figure, args) what's the intention - 
Lines 124-129 Link Here
124
		tr.put("Shape", "/templates/attr/Shape.javajet", ShapeAttrGenerator.class);
140
		tr.put("Shape", "/templates/attr/Shape.javajet", ShapeAttrGenerator.class);
125
		tr.put("Figure", "/templates/attr/Figure.javajet", FigureAttrGenerator.class);
141
		tr.put("Figure", "/templates/attr/Figure.javajet", FigureAttrGenerator.class);
126
		tr.put("PolylineDecoration", "/templates/attr/PolylineDecoration.javajet", PolylineDecorationAttrGenerator.class);
142
		tr.put("PolylineDecoration", "/templates/attr/PolylineDecoration.javajet", PolylineDecorationAttrGenerator.class);
143
144
		// Custom attributes support
145
		tr.put("customAttributes", "/templates/attr/CustomConfigurableClass.javajet", CustomClassAttributesGenerator.class);
146
		// Layout related dispatching chain.  
147
		tr.put("createLayout", "/templates/layout/FigureMarker.javajet", NewLayoutGenerator.class);
148
		tr.put(GridLayout.class, "/templates/layout/GridLayout.javajet", InitGridLayoutGenerator.class);
149
		tr.put(BorderLayout.class, "/templates/layout/BorderLayout.javajet", InitBorderLayoutGenerator.class);
150
		tr.put(CustomLayout.class, "/templates/layout/CustomLayout.javajet", InitCustomLayoutGenerator.class);
151
		
152
		tr.put("createLayoutData", "/templates/layoutData/FigureMarker.javajet", NewLayoutDataGenerator.class);
153
		tr.put(GridLayoutData.class, "/templates/layoutData/GridLayoutData.javajet", InitGridLayoutDataGenerator.class);
154
		tr.put(BorderLayoutData.class, "/templates/layoutData/BorderLayoutData.javajet", InitBorderLayoutDataGenerator.class);
155
		tr.put(CustomLayoutData.class, "/templates/layoutData/CustomLayoutData.javajet", InitCustomLayoutDataGenerator.class);
127
		return tr;
156
		return tr;
128
	}
157
	}
129
158
(-)src/org/eclipse/gmf/graphdef/codegen/GraphDefDispatcher.java (-3 / +2 lines)
Lines 30-36 Link Here
30
		myImportManager = importManager;
30
		myImportManager = importManager;
31
		myFqnSwitch = fqnSwitch;
31
		myFqnSwitch = fqnSwitch;
32
	}
32
	}
33
33
	
34
	public ImportAssistant getImportManager() {
34
	public ImportAssistant getImportManager() {
35
		return myImportManager;
35
		return myImportManager;
36
	}
36
	}
Lines 38-45 Link Here
38
	public GMFGraphSwitch getFQNSwitch() {
38
	public GMFGraphSwitch getFQNSwitch() {
39
		return myFqnSwitch;
39
		return myFqnSwitch;
40
	}
40
	}
41
41
	
42
43
	public Args create(Figure figure, String figureVarName) {
42
	public Args create(Figure figure, String figureVarName) {
44
		return new Args(this, figure, figureVarName);
43
		return new Args(this, figure, figureVarName);
45
	}
44
	}
(-)templates/children/Figure.javajet (-2 / +6 lines)
Lines 1-5 Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="FigureChildrenGenerator"
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="FigureChildrenGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher java.util.*"%>
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.* java.util.*"%>
3
<%
3
<%
4
Object[] args = (Object[]) argument;
4
Object[] args = (Object[]) argument;
5
List/*<Figure>*/ figureChildren = (List) args[0];
5
List/*<Figure>*/ figureChildren = (List) args[0];
Lines 23-32 Link Here
23
	if (figureMarker instanceof FigureRef) {
23
	if (figureMarker instanceof FigureRef) {
24
		throw new IllegalStateException("FIXME: sorry, don't support FigureRef for a while");
24
		throw new IllegalStateException("FIXME: sorry, don't support FigureRef for a while");
25
	}
25
	}
26
	final String figureVarName = "fig" + (figureCount++);%>
26
	final String figureVarName = "fig" + figureCount;
27
	final String layoutDataVarName = "layData" + figureCount;
28
	figureCount++;%>
27
		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
29
		// FIXME instantiate - FigureRef - dispatch to 'instantiate' template?
28
		<%=dispatcher.dispatch("instantiate", dispatcher.create((Figure) figureMarker, figureVarName))%>
30
		<%=dispatcher.dispatch("instantiate", dispatcher.create((Figure) figureMarker, figureVarName))%>
29
		<%=parentFigureVarName%>.add(<%=figureVarName%>);
31
		<%=parentFigureVarName%>.add(<%=figureVarName%>);
32
		<%=dispatcher.dispatch("createLayoutData", 
33
			new LayoutGeneratorArguments(dispatcher, (Figure)figureMarker, figureVarName, layoutDataVarName))%>
30
<%
34
<%
31
if (_nxt instanceof Figure && !((Figure) _nxt).getChildren().isEmpty()) {
35
if (_nxt instanceof Figure && !((Figure) _nxt).getChildren().isEmpty()) {
32
	l.addFirst(marker);
36
	l.addFirst(marker);
(-)templates/new/Figure.javajet (-2 / +3 lines)
Lines 1-5 Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewFigureGenerator"
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewFigureGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.GraphDefDispatcher"%>
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
3
<%
4
GraphDefDispatcher.Args args = (GraphDefDispatcher.Args) argument;
4
GraphDefDispatcher.Args args = (GraphDefDispatcher.Args) argument;
5
final Figure figureInstance = args.getFigure();
5
final Figure figureInstance = args.getFigure();
Lines 10-13 Link Here
10
// PRODUCES instance AND (!) initializes attributes
10
// PRODUCES instance AND (!) initializes attributes
11
%>
11
%>
12
<%=figureClassName%> <%=figureVarName%> = new <%=figureClassName%>();
12
<%=figureClassName%> <%=figureVarName%> = new <%=figureClassName%>();
13
<%=args.getDispatcher().dispatch(figureInstance, args)%>
13
<%=args.getDispatcher().dispatch(figureInstance, args)%>
14
<%=args.getDispatcher().dispatch("createLayout", new LayoutGeneratorArguments(args))%>
(-)templates/attr/CustomConfigurableClass.javajet (+64 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="CustomClassAttributesGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.* java.util.* "%>
3
<%
4
CustomClassArguments args = (CustomClassArguments) argument;
5
final CustomConfigurableClass instance = args.getCustomInstance();
6
final String varName = args.getVariableName();
7
8
class TextUtils {
9
	public String capitalizeFirst(String text){
10
		return text.length() <= 1 ? 
11
			text.toUpperCase() : 
12
			Character.toUpperCase(text.charAt(0)) + text.substring(1);
13
	}
14
	
15
	public String replaceAll(String text, String subject, String replace){
16
		StringBuffer result = new StringBuffer();
17
		int currentIndex = 0;
18
		while (true){
19
			int nextOccurrence = text.indexOf(subject, currentIndex);
20
			if (nextOccurrence < 0){
21
				result.append(text.substring(currentIndex));
22
				break;
23
			}
24
			result.append(text.substring(currentIndex, nextOccurrence));
25
			result.append(replace);
26
			currentIndex = nextOccurrence + subject.length();
27
		}
28
		return result.toString();
29
	}
30
}
31
32
final TextUtils textUtils = new TextUtils();
33
%>
34
35
		{
36
<%
37
int attrIndex = 0;
38
for (Iterator attrs = instance.getAttributes().iterator(); attrs.hasNext(); attrIndex++){
39
	CustomAttribute next = (CustomAttribute) attrs.next(); 
40
	String valueVarName = next.getValue();
41
	if (next.isMultiStatementValue()){ 
42
%>
43
			<%=next.getType()%> attr<%=attrIndex%>;
44
			<%=textUtils.replaceAll(valueVarName, "%%%", "attr" + attrIndex)%>;
45
<%
46
		valueVarName = "attr" + attrIndex;
47
	}
48
%>		
49
<%
50
	if (next.isDirectAccess()){ 
51
%>
52
			<%=varName%>.<%=next.getName()%> = <%=valueVarName%>;		
53
<%			
54
	} else {
55
%>
56
			<%=varName%>.set<%=textUtils.capitalizeFirst(next.getName())%>(<%=valueVarName%>);
57
<%	
58
	}
59
%>	
60
<%
61
} //for 
62
%>
63
		}
64
(-)src/org/eclipse/gmf/graphdef/codegen/templates/CustomClassAttributesGenerator.java (+122 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
import java.util.*;
6
7
public class CustomClassAttributesGenerator
8
{
9
  protected static String nl;
10
  public static synchronized CustomClassAttributesGenerator create(String lineSeparator)
11
  {
12
    nl = lineSeparator;
13
    CustomClassAttributesGenerator result = new CustomClassAttributesGenerator();
14
    nl = null;
15
    return result;
16
  }
17
18
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
19
  protected final String TEXT_1 = NL + "\t\t{";
20
  protected final String TEXT_2 = NL + "\t\t\t";
21
  protected final String TEXT_3 = " attr";
22
  protected final String TEXT_4 = ";" + NL + "\t\t\t";
23
  protected final String TEXT_5 = ";";
24
  protected final String TEXT_6 = "\t\t";
25
  protected final String TEXT_7 = NL + "\t\t\t";
26
  protected final String TEXT_8 = ".";
27
  protected final String TEXT_9 = " = ";
28
  protected final String TEXT_10 = ";\t\t";
29
  protected final String TEXT_11 = NL + "\t\t\t";
30
  protected final String TEXT_12 = ".set";
31
  protected final String TEXT_13 = "(";
32
  protected final String TEXT_14 = ");";
33
  protected final String TEXT_15 = "\t";
34
  protected final String TEXT_16 = NL + "\t\t}" + NL;
35
  protected final String TEXT_17 = NL;
36
37
  public String generate(Object argument)
38
  {
39
    StringBuffer stringBuffer = new StringBuffer();
40
    
41
CustomClassArguments args = (CustomClassArguments) argument;
42
final CustomConfigurableClass instance = args.getCustomInstance();
43
final String varName = args.getVariableName();
44
45
class TextUtils {
46
	public String capitalizeFirst(String text){
47
		return text.length() <= 1 ? 
48
			text.toUpperCase() : 
49
			Character.toUpperCase(text.charAt(0)) + text.substring(1);
50
	}
51
	
52
	public String replaceAll(String text, String subject, String replace){
53
		StringBuffer result = new StringBuffer();
54
		int currentIndex = 0;
55
		while (true){
56
			int nextOccurrence = text.indexOf(subject, currentIndex);
57
			if (nextOccurrence < 0){
58
				result.append(text.substring(currentIndex));
59
				break;
60
			}
61
			result.append(text.substring(currentIndex, nextOccurrence));
62
			result.append(replace);
63
			currentIndex = nextOccurrence + subject.length();
64
		}
65
		return result.toString();
66
	}
67
}
68
69
final TextUtils textUtils = new TextUtils();
70
71
    stringBuffer.append(TEXT_1);
72
    
73
int attrIndex = 0;
74
for (Iterator attrs = instance.getAttributes().iterator(); attrs.hasNext(); attrIndex++){
75
	CustomAttribute next = (CustomAttribute) attrs.next(); 
76
	String valueVarName = next.getValue();
77
	if (next.isMultiStatementValue()){ 
78
79
    stringBuffer.append(TEXT_2);
80
    stringBuffer.append(next.getType());
81
    stringBuffer.append(TEXT_3);
82
    stringBuffer.append(attrIndex);
83
    stringBuffer.append(TEXT_4);
84
    stringBuffer.append(textUtils.replaceAll(valueVarName, "%%%", "attr" + attrIndex));
85
    stringBuffer.append(TEXT_5);
86
    
87
		valueVarName = "attr" + attrIndex;
88
	}
89
90
    stringBuffer.append(TEXT_6);
91
    
92
	if (next.isDirectAccess()){ 
93
94
    stringBuffer.append(TEXT_7);
95
    stringBuffer.append(varName);
96
    stringBuffer.append(TEXT_8);
97
    stringBuffer.append(next.getName());
98
    stringBuffer.append(TEXT_9);
99
    stringBuffer.append(valueVarName);
100
    stringBuffer.append(TEXT_10);
101
    			
102
	} else {
103
104
    stringBuffer.append(TEXT_11);
105
    stringBuffer.append(varName);
106
    stringBuffer.append(TEXT_12);
107
    stringBuffer.append(textUtils.capitalizeFirst(next.getName()));
108
    stringBuffer.append(TEXT_13);
109
    stringBuffer.append(valueVarName);
110
    stringBuffer.append(TEXT_14);
111
    	
112
	}
113
114
    stringBuffer.append(TEXT_15);
115
    
116
} //for 
117
118
    stringBuffer.append(TEXT_16);
119
    stringBuffer.append(TEXT_17);
120
    return stringBuffer.toString();
121
  }
122
}
(-)templates/layoutData/GridLayoutData.javajet (+26 lines)
Added Link Here
1
2
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitGridLayoutDataGenerator"
3
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
4
<%
5
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
6
final GridLayoutData gmfLayoutData = (GridLayoutData)argsBundle.getFigure().getData();
7
final String layoutConstraintVarName = argsBundle.getLayoutVariableName();
8
%>
9
10
			<%=layoutConstraintVarName%>.verticalAlignment = <%=gmfLayoutData.getVerticalAlignment().getValue()%>;
11
			<%=layoutConstraintVarName%>.horizontalAlignment = <%=gmfLayoutData.getHorizontalAlignment().getValue()%>;
12
<%
13
Dimension sizeHint = gmfLayoutData.getSizeHint();
14
if (sizeHint != null){
15
%>
16
			<%=layoutConstraintVarName%>.widthHint = <%=sizeHint.getDx()%>;
17
			<%=layoutConstraintVarName%>.heightHint = <%=sizeHint.getDy()%>;
18
<%
19
}
20
%>
21
			<%=layoutConstraintVarName%>.horizontalIndent = <%=gmfLayoutData.getHorizontalIndent()%>;
22
			<%=layoutConstraintVarName%>.horizontalSpan = <%=gmfLayoutData.getHorizontalSpan()%>;
23
			<%=layoutConstraintVarName%>.verticalSpan = <%=gmfLayoutData.getVerticalSpan()%>;
24
			<%=layoutConstraintVarName%>.grabExcessHorizontalSpace = <%=gmfLayoutData.isGrabExcessHorizontalSpace()%>;
25
			<%=layoutConstraintVarName%>.grabExcessVerticalSpace = <%=gmfLayoutData.isGrabExcessVerticalSpace()%>;
26
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitBorderLayoutDataGenerator.java (+93 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitBorderLayoutDataGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitBorderLayoutDataGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitBorderLayoutDataGenerator result = new InitBorderLayoutDataGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "";
19
  protected final String TEXT_2 = NL + "\t\t\t";
20
  protected final String TEXT_3 = " = org.eclipse.draw2d.BorderLayout.CENTER;";
21
  protected final String TEXT_4 = "\t\t\t" + NL + "\t\t\t";
22
  protected final String TEXT_5 = " = org.eclipse.draw2d.BorderLayout.TOP;";
23
  protected final String TEXT_6 = NL + "\t\t\t";
24
  protected final String TEXT_7 = " = org.eclipse.draw2d.BorderLayout.LEFT;";
25
  protected final String TEXT_8 = "\t\t\t" + NL + "\t\t\t";
26
  protected final String TEXT_9 = " = org.eclipse.draw2d.BorderLayout.BOTTOM;";
27
  protected final String TEXT_10 = NL + "\t\t\t";
28
  protected final String TEXT_11 = " = org.eclipse.draw2d.BorderLayout.RIGHT;";
29
  protected final String TEXT_12 = NL;
30
  protected final String TEXT_13 = NL;
31
32
  public String generate(Object argument)
33
  {
34
    StringBuffer stringBuffer = new StringBuffer();
35
    
36
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
37
final BorderLayoutData gmfLayoutData = (BorderLayoutData)argsBundle.getFigure().getData();
38
final String layoutConstraintVarName = argsBundle.getLayoutVariableName();
39
40
    stringBuffer.append(TEXT_1);
41
    
42
Alignment alignment = gmfLayoutData.getAlignment();
43
if (alignment == null){
44
	alignment = Alignment.CENTER_LITERAL;
45
}
46
switch(alignment.getValue()){
47
	case Alignment.CENTER: 
48
	case Alignment.FILL: 
49
50
    stringBuffer.append(TEXT_2);
51
    stringBuffer.append(layoutConstraintVarName);
52
    stringBuffer.append(TEXT_3);
53
    
54
		break;
55
	case Alignment.BEGINNING:
56
		if (gmfLayoutData.isVertical()){
57
58
    stringBuffer.append(TEXT_4);
59
    stringBuffer.append(layoutConstraintVarName);
60
    stringBuffer.append(TEXT_5);
61
    
62
		} else {
63
64
    stringBuffer.append(TEXT_6);
65
    stringBuffer.append(layoutConstraintVarName);
66
    stringBuffer.append(TEXT_7);
67
    		
68
		}
69
		break;
70
	case Alignment.END:
71
		if (gmfLayoutData.isVertical()){
72
73
    stringBuffer.append(TEXT_8);
74
    stringBuffer.append(layoutConstraintVarName);
75
    stringBuffer.append(TEXT_9);
76
    
77
		} else {
78
79
    stringBuffer.append(TEXT_10);
80
    stringBuffer.append(layoutConstraintVarName);
81
    stringBuffer.append(TEXT_11);
82
    		
83
		}
84
		break;
85
	default:
86
		throw new IllegalArgumentException("Unknown Alignment: " + gmfLayoutData.getAlignment());
87
}
88
89
    stringBuffer.append(TEXT_12);
90
    stringBuffer.append(TEXT_13);
91
    return stringBuffer.toString();
92
  }
93
}
(-)src/org/eclipse/gmf/graphdef/codegen/LayoutGeneratorArguments.java (+35 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen;
2
3
import org.eclipse.gmf.gmfgraph.Figure;
4
5
public class LayoutGeneratorArguments extends GraphDefDispatcher.Args {
6
7
	private final String myLayoutVariableName;
8
9
	/**
10
	 * @param layoutVariableName
11
	 *            may be either name of layout manager or figure constraint,
12
	 *            because there are no contexts requiring both of names in the
13
	 *            same time
14
	 */
15
	public LayoutGeneratorArguments(GraphDefDispatcher owner, Figure figure,
16
			String figureVarName, String layoutVariableName) {
17
		super(owner, figure, figureVarName);
18
		myLayoutVariableName = layoutVariableName;
19
	}
20
21
	public LayoutGeneratorArguments(GraphDefDispatcher.Args args,
22
			String layoutVariableName) {
23
		this(args.getDispatcher(), args.getFigure(), args.getVariableName(),
24
				layoutVariableName);
25
	}
26
27
	public LayoutGeneratorArguments(GraphDefDispatcher.Args args) {
28
		this(args, args.getVariableName() + "Layout");
29
	}
30
31
	public String getLayoutVariableName() {
32
		return myLayoutVariableName;
33
	}
34
35
}
(-)templates/layout/GridLayout.javajet (+25 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitGridLayoutGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
5
final GridLayout gmfLayout = (GridLayout)argsBundle.getFigure().getLayout();
6
final String layouterVarName = argsBundle.getLayoutVariableName();
7
%>
8
		<%=layouterVarName%>.numColumns = <%=gmfLayout.getNumColumns()%>;
9
		<%=layouterVarName%>.makeColumnsEqualWidth = <%=gmfLayout.isEqualWidth()%>;
10
<%
11
Dimension margins = gmfLayout.getMargins();
12
if (margins != null){
13
%>
14
		<%=layouterVarName%>.marginWidth = <%=margins.getDx()%>;
15
		<%=layouterVarName%>.marginHeight = <%=margins.getDy()%>;
16
<%
17
}
18
Dimension spacing = gmfLayout.getSpacing();
19
if (spacing != null){
20
%>
21
		<%=layouterVarName%>.horizontalSpacing = <%=spacing.getDx()%>;
22
		<%=layouterVarName%>.verticalSpacing = <%=spacing.getDy()%>;
23
<%
24
}
25
%>
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitGridLayoutGenerator.java (+85 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitGridLayoutGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitGridLayoutGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitGridLayoutGenerator result = new InitGridLayoutGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "\t\t";
19
  protected final String TEXT_2 = ".numColumns = ";
20
  protected final String TEXT_3 = ";" + NL + "\t\t";
21
  protected final String TEXT_4 = ".makeColumnsEqualWidth = ";
22
  protected final String TEXT_5 = ";";
23
  protected final String TEXT_6 = NL + "\t\t";
24
  protected final String TEXT_7 = ".marginWidth = ";
25
  protected final String TEXT_8 = ";" + NL + "\t\t";
26
  protected final String TEXT_9 = ".marginHeight = ";
27
  protected final String TEXT_10 = ";";
28
  protected final String TEXT_11 = NL + "\t\t";
29
  protected final String TEXT_12 = ".horizontalSpacing = ";
30
  protected final String TEXT_13 = ";" + NL + "\t\t";
31
  protected final String TEXT_14 = ".verticalSpacing = ";
32
  protected final String TEXT_15 = ";";
33
  protected final String TEXT_16 = NL;
34
35
  public String generate(Object argument)
36
  {
37
    StringBuffer stringBuffer = new StringBuffer();
38
    
39
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
40
final GridLayout gmfLayout = (GridLayout)argsBundle.getFigure().getLayout();
41
final String layouterVarName = argsBundle.getLayoutVariableName();
42
43
    stringBuffer.append(TEXT_1);
44
    stringBuffer.append(layouterVarName);
45
    stringBuffer.append(TEXT_2);
46
    stringBuffer.append(gmfLayout.getNumColumns());
47
    stringBuffer.append(TEXT_3);
48
    stringBuffer.append(layouterVarName);
49
    stringBuffer.append(TEXT_4);
50
    stringBuffer.append(gmfLayout.isEqualWidth());
51
    stringBuffer.append(TEXT_5);
52
    
53
Dimension margins = gmfLayout.getMargins();
54
if (margins != null){
55
56
    stringBuffer.append(TEXT_6);
57
    stringBuffer.append(layouterVarName);
58
    stringBuffer.append(TEXT_7);
59
    stringBuffer.append(margins.getDx());
60
    stringBuffer.append(TEXT_8);
61
    stringBuffer.append(layouterVarName);
62
    stringBuffer.append(TEXT_9);
63
    stringBuffer.append(margins.getDy());
64
    stringBuffer.append(TEXT_10);
65
    
66
}
67
Dimension spacing = gmfLayout.getSpacing();
68
if (spacing != null){
69
70
    stringBuffer.append(TEXT_11);
71
    stringBuffer.append(layouterVarName);
72
    stringBuffer.append(TEXT_12);
73
    stringBuffer.append(spacing.getDx());
74
    stringBuffer.append(TEXT_13);
75
    stringBuffer.append(layouterVarName);
76
    stringBuffer.append(TEXT_14);
77
    stringBuffer.append(spacing.getDy());
78
    stringBuffer.append(TEXT_15);
79
    
80
}
81
82
    stringBuffer.append(TEXT_16);
83
    return stringBuffer.toString();
84
  }
85
}
(-)src/org/eclipse/gmf/graphdef/codegen/CustomClassArguments.java (+22 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen;
2
3
import org.eclipse.gmf.gmfgraph.CustomConfigurableClass;
4
5
public class CustomClassArguments {
6
	private final String myVariableName;
7
	private final CustomConfigurableClass myCustomInstance;
8
9
	public CustomClassArguments(CustomConfigurableClass customInstance, String variableName){
10
		myCustomInstance = customInstance;
11
		myVariableName = variableName;
12
	}
13
	
14
	public CustomConfigurableClass getCustomInstance() {
15
		return myCustomInstance;
16
	}
17
	
18
	public String getVariableName() {
19
		return myVariableName;
20
	}
21
22
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitCustomLayoutGenerator.java (+36 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitCustomLayoutGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitCustomLayoutGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitCustomLayoutGenerator result = new InitCustomLayoutGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "";
19
  protected final String TEXT_2 = NL;
20
  protected final String TEXT_3 = NL;
21
22
  public String generate(Object argument)
23
  {
24
    StringBuffer stringBuffer = new StringBuffer();
25
    
26
final LayoutGeneratorArguments args = (LayoutGeneratorArguments) argument;
27
final CustomLayout layout = (CustomLayout)args.getFigure().getLayout();
28
final CustomClassArguments callArgs = new CustomClassArguments(layout, args.getLayoutVariableName());
29
30
    stringBuffer.append(TEXT_1);
31
    stringBuffer.append(TEXT_2);
32
    stringBuffer.append(args.getDispatcher().dispatch("customAttributes", callArgs));
33
    stringBuffer.append(TEXT_3);
34
    return stringBuffer.toString();
35
  }
36
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutGenerator.java (+62 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class NewLayoutGenerator
7
{
8
  protected static String nl;
9
  public static synchronized NewLayoutGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    NewLayoutGenerator result = new NewLayoutGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "";
19
  protected final String TEXT_2 = NL + "\t\t";
20
  protected final String TEXT_3 = " ";
21
  protected final String TEXT_4 = " = new ";
22
  protected final String TEXT_5 = "();" + NL + "\t\t";
23
  protected final String TEXT_6 = "\t" + NL + "\t\t";
24
  protected final String TEXT_7 = ".setLayoutManager(";
25
  protected final String TEXT_8 = ");";
26
  protected final String TEXT_9 = NL;
27
28
  public String generate(Object argument)
29
  {
30
    StringBuffer stringBuffer = new StringBuffer();
31
    
32
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
33
final FigureMarker figureMarker = argsBundle.getFigure();
34
final String figureVarName = argsBundle.getVariableName();
35
final String layouterVarName = argsBundle.getLayoutVariableName();
36
37
    stringBuffer.append(TEXT_1);
38
    
39
Layout gmfLayout= figureMarker.getLayout();
40
if (gmfLayout != null){
41
	final String layouterImplClass = argsBundle.getDispatcher().getImportManager().getImportedName(gmfLayout.getQualifiedClassName());	
42
43
    stringBuffer.append(TEXT_2);
44
    stringBuffer.append(layouterImplClass);
45
    stringBuffer.append(TEXT_3);
46
    stringBuffer.append(layouterVarName);
47
    stringBuffer.append(TEXT_4);
48
    stringBuffer.append(layouterImplClass);
49
    stringBuffer.append(TEXT_5);
50
    stringBuffer.append(argsBundle.getDispatcher().dispatch(gmfLayout, argsBundle));
51
    stringBuffer.append(TEXT_6);
52
    stringBuffer.append(figureVarName);
53
    stringBuffer.append(TEXT_7);
54
    stringBuffer.append(layouterVarName);
55
    stringBuffer.append(TEXT_8);
56
    	
57
}
58
59
    stringBuffer.append(TEXT_9);
60
    return stringBuffer.toString();
61
  }
62
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/NewLayoutDataGenerator.java (+73 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class NewLayoutDataGenerator
7
{
8
  protected static String nl;
9
  public static synchronized NewLayoutDataGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    NewLayoutDataGenerator result = new NewLayoutDataGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = NL + "\t\tif (";
19
  protected final String TEXT_2 = ".getParent() != null && ";
20
  protected final String TEXT_3 = ".getParent().getLayoutManager() != null) {" + NL + "\t\t\t";
21
  protected final String TEXT_4 = " ";
22
  protected final String TEXT_5 = " = new ";
23
  protected final String TEXT_6 = "();" + NL + "\t\t\t";
24
  protected final String TEXT_7 = "\t\t\t" + NL + "\t\t\t";
25
  protected final String TEXT_8 = ".getParent().getLayoutManager().setConstraint(";
26
  protected final String TEXT_9 = ", ";
27
  protected final String TEXT_10 = ");" + NL + "\t\t}";
28
  protected final String TEXT_11 = NL;
29
  protected final String TEXT_12 = NL;
30
31
  public String generate(Object argument)
32
  {
33
    StringBuffer stringBuffer = new StringBuffer();
34
    
35
// NOTE: this code expects that constrainted figure is already added to its parent
36
37
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
38
final FigureMarker figureMarker = argsBundle.getFigure();
39
final String figureVarName = argsBundle.getVariableName();
40
final String layoutDataVarName = argsBundle.getLayoutVariableName();
41
42
    
43
LayoutData gmfLayoutData = figureMarker.getData();
44
if (gmfLayoutData != null){
45
	String layoutImplClassName = argsBundle.getDispatcher().getImportManager().getImportedName(gmfLayoutData.getQualifiedClassName());
46
47
    stringBuffer.append(TEXT_1);
48
    stringBuffer.append(figureVarName);
49
    stringBuffer.append(TEXT_2);
50
    stringBuffer.append(figureVarName);
51
    stringBuffer.append(TEXT_3);
52
    stringBuffer.append(layoutImplClassName);
53
    stringBuffer.append(TEXT_4);
54
    stringBuffer.append(layoutDataVarName);
55
    stringBuffer.append(TEXT_5);
56
    stringBuffer.append(layoutImplClassName);
57
    stringBuffer.append(TEXT_6);
58
    stringBuffer.append(argsBundle.getDispatcher().dispatch(gmfLayoutData, argsBundle));
59
    stringBuffer.append(TEXT_7);
60
    stringBuffer.append(figureVarName);
61
    stringBuffer.append(TEXT_8);
62
    stringBuffer.append(figureVarName);
63
    stringBuffer.append(TEXT_9);
64
    stringBuffer.append(layoutDataVarName);
65
    stringBuffer.append(TEXT_10);
66
    	
67
}
68
69
    stringBuffer.append(TEXT_11);
70
    stringBuffer.append(TEXT_12);
71
    return stringBuffer.toString();
72
  }
73
}
(-)templates/layout/FigureMarker.javajet (+20 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewLayoutGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
5
final FigureMarker figureMarker = argsBundle.getFigure();
6
final String figureVarName = argsBundle.getVariableName();
7
final String layouterVarName = argsBundle.getLayoutVariableName();
8
%>
9
10
<%
11
Layout gmfLayout= figureMarker.getLayout();
12
if (gmfLayout != null){
13
	final String layouterImplClass = argsBundle.getDispatcher().getImportManager().getImportedName(gmfLayout.getQualifiedClassName());	
14
%>
15
		<%=layouterImplClass%> <%=layouterVarName%> = new <%=layouterImplClass%>();
16
		<%=argsBundle.getDispatcher().dispatch(gmfLayout, argsBundle)%>	
17
		<%=figureVarName%>.setLayoutManager(<%=layouterVarName%>);
18
<%	
19
}
20
%>
(-)templates/layout/BorderLayout.javajet (+17 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitBorderLayoutGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
5
final BorderLayout gmfLayout = (BorderLayout)argsBundle.getFigure().getLayout();
6
final String layouterVarName = argsBundle.getLayoutVariableName();
7
%>
8
9
<%
10
Dimension spacing = gmfLayout.getSpacing();
11
if (spacing != null){
12
%>
13
		<%=layouterVarName%>.setHorizontalSpacing(<%=spacing.getDx()%>);
14
		<%=layouterVarName%>.setVerticalSpacing(<%=spacing.getDy()%>);
15
<%
16
}
17
%>
(-)templates/layoutData/BorderLayoutData.javajet (+47 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitBorderLayoutDataGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
5
final BorderLayoutData gmfLayoutData = (BorderLayoutData)argsBundle.getFigure().getData();
6
final String layoutConstraintVarName = argsBundle.getLayoutVariableName();
7
%>
8
9
<%
10
Alignment alignment = gmfLayoutData.getAlignment();
11
if (alignment == null){
12
	alignment = Alignment.CENTER_LITERAL;
13
}
14
switch(alignment.getValue()){
15
	case Alignment.CENTER: 
16
	case Alignment.FILL: 
17
%>
18
			<%=layoutConstraintVarName%> = org.eclipse.draw2d.BorderLayout.CENTER;
19
<%
20
		break;
21
	case Alignment.BEGINNING:
22
		if (gmfLayoutData.isVertical()){
23
%>			
24
			<%=layoutConstraintVarName%> = org.eclipse.draw2d.BorderLayout.TOP;
25
<%
26
		} else {
27
%>
28
			<%=layoutConstraintVarName%> = org.eclipse.draw2d.BorderLayout.LEFT;
29
<%		
30
		}
31
		break;
32
	case Alignment.END:
33
		if (gmfLayoutData.isVertical()){
34
%>			
35
			<%=layoutConstraintVarName%> = org.eclipse.draw2d.BorderLayout.BOTTOM;
36
<%
37
		} else {
38
%>
39
			<%=layoutConstraintVarName%> = org.eclipse.draw2d.BorderLayout.RIGHT;
40
<%		
41
		}
42
		break;
43
	default:
44
		throw new IllegalArgumentException("Unknown Alignment: " + gmfLayoutData.getAlignment());
45
}
46
%>
47
(-)templates/layoutData/CustomLayoutData.javajet (+9 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitCustomLayoutGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
final LayoutGeneratorArguments args = (LayoutGeneratorArguments) argument;
5
final CustomLayout layout = (CustomLayout)args.getFigure().getLayout();
6
final CustomClassArguments callArgs = new CustomClassArguments(layout, args.getLayoutVariableName());
7
%>
8
9
<%=args.getDispatcher().dispatch("customAttributes", callArgs)%>
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitGridLayoutDataGenerator.java (+98 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitGridLayoutDataGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitGridLayoutDataGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitGridLayoutDataGenerator result = new InitGridLayoutDataGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = NL + "\t\t\t";
19
  protected final String TEXT_2 = ".verticalAlignment = ";
20
  protected final String TEXT_3 = ";" + NL + "\t\t\t";
21
  protected final String TEXT_4 = ".horizontalAlignment = ";
22
  protected final String TEXT_5 = ";";
23
  protected final String TEXT_6 = NL + "\t\t\t";
24
  protected final String TEXT_7 = ".widthHint = ";
25
  protected final String TEXT_8 = ";" + NL + "\t\t\t";
26
  protected final String TEXT_9 = ".heightHint = ";
27
  protected final String TEXT_10 = ";";
28
  protected final String TEXT_11 = NL + "\t\t\t";
29
  protected final String TEXT_12 = ".horizontalIndent = ";
30
  protected final String TEXT_13 = ";" + NL + "\t\t\t";
31
  protected final String TEXT_14 = ".horizontalSpan = ";
32
  protected final String TEXT_15 = ";" + NL + "\t\t\t";
33
  protected final String TEXT_16 = ".verticalSpan = ";
34
  protected final String TEXT_17 = ";" + NL + "\t\t\t";
35
  protected final String TEXT_18 = ".grabExcessHorizontalSpace = ";
36
  protected final String TEXT_19 = ";" + NL + "\t\t\t";
37
  protected final String TEXT_20 = ".grabExcessVerticalSpace = ";
38
  protected final String TEXT_21 = ";" + NL;
39
  protected final String TEXT_22 = NL;
40
41
  public String generate(Object argument)
42
  {
43
    StringBuffer stringBuffer = new StringBuffer();
44
    
45
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
46
final GridLayoutData gmfLayoutData = (GridLayoutData)argsBundle.getFigure().getData();
47
final String layoutConstraintVarName = argsBundle.getLayoutVariableName();
48
49
    stringBuffer.append(TEXT_1);
50
    stringBuffer.append(layoutConstraintVarName);
51
    stringBuffer.append(TEXT_2);
52
    stringBuffer.append(gmfLayoutData.getVerticalAlignment().getValue());
53
    stringBuffer.append(TEXT_3);
54
    stringBuffer.append(layoutConstraintVarName);
55
    stringBuffer.append(TEXT_4);
56
    stringBuffer.append(gmfLayoutData.getHorizontalAlignment().getValue());
57
    stringBuffer.append(TEXT_5);
58
    
59
Dimension sizeHint = gmfLayoutData.getSizeHint();
60
if (sizeHint != null){
61
62
    stringBuffer.append(TEXT_6);
63
    stringBuffer.append(layoutConstraintVarName);
64
    stringBuffer.append(TEXT_7);
65
    stringBuffer.append(sizeHint.getDx());
66
    stringBuffer.append(TEXT_8);
67
    stringBuffer.append(layoutConstraintVarName);
68
    stringBuffer.append(TEXT_9);
69
    stringBuffer.append(sizeHint.getDy());
70
    stringBuffer.append(TEXT_10);
71
    
72
}
73
74
    stringBuffer.append(TEXT_11);
75
    stringBuffer.append(layoutConstraintVarName);
76
    stringBuffer.append(TEXT_12);
77
    stringBuffer.append(gmfLayoutData.getHorizontalIndent());
78
    stringBuffer.append(TEXT_13);
79
    stringBuffer.append(layoutConstraintVarName);
80
    stringBuffer.append(TEXT_14);
81
    stringBuffer.append(gmfLayoutData.getHorizontalSpan());
82
    stringBuffer.append(TEXT_15);
83
    stringBuffer.append(layoutConstraintVarName);
84
    stringBuffer.append(TEXT_16);
85
    stringBuffer.append(gmfLayoutData.getVerticalSpan());
86
    stringBuffer.append(TEXT_17);
87
    stringBuffer.append(layoutConstraintVarName);
88
    stringBuffer.append(TEXT_18);
89
    stringBuffer.append(gmfLayoutData.isGrabExcessHorizontalSpace());
90
    stringBuffer.append(TEXT_19);
91
    stringBuffer.append(layoutConstraintVarName);
92
    stringBuffer.append(TEXT_20);
93
    stringBuffer.append(gmfLayoutData.isGrabExcessVerticalSpace());
94
    stringBuffer.append(TEXT_21);
95
    stringBuffer.append(TEXT_22);
96
    return stringBuffer.toString();
97
  }
98
}
(-)templates/layout/CustomLayout.javajet (+9 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitCustomLayoutDataGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
final LayoutGeneratorArguments args = (LayoutGeneratorArguments) argument;
5
final CustomLayoutData layoutData = (CustomLayoutData)args.getFigure().getData();
6
final CustomClassArguments callArgs = new CustomClassArguments(layoutData, args.getLayoutVariableName());
7
%>
8
9
<%=args.getDispatcher().dispatch("customAttributes", callArgs)%>
(-)templates/layoutData/FigureMarker.javajet (+25 lines)
Added Link Here
1
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="NewLayoutDataGenerator"
2
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
3
<%
4
// NOTE: this code expects that constrainted figure is already added to its parent
5
6
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
7
final FigureMarker figureMarker = argsBundle.getFigure();
8
final String figureVarName = argsBundle.getVariableName();
9
final String layoutDataVarName = argsBundle.getLayoutVariableName();
10
%>
11
<%
12
LayoutData gmfLayoutData = figureMarker.getData();
13
if (gmfLayoutData != null){
14
	String layoutImplClassName = argsBundle.getDispatcher().getImportManager().getImportedName(gmfLayoutData.getQualifiedClassName());
15
%>
16
17
		if (<%=figureVarName%>.getParent() != null && <%=figureVarName%>.getParent().getLayoutManager() != null) {
18
			<%=layoutImplClassName%> <%=layoutDataVarName%> = new <%=layoutImplClassName%>();
19
			<%=argsBundle.getDispatcher().dispatch(gmfLayoutData, argsBundle)%>			
20
			<%=figureVarName%>.getParent().getLayoutManager().setConstraint(<%=figureVarName%>, <%=layoutDataVarName%>);
21
		}
22
<%	
23
}
24
%>
25
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitCustomLayoutDataGenerator.java (+36 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitCustomLayoutDataGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitCustomLayoutDataGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitCustomLayoutDataGenerator result = new InitCustomLayoutDataGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "";
19
  protected final String TEXT_2 = NL;
20
  protected final String TEXT_3 = NL;
21
22
  public String generate(Object argument)
23
  {
24
    StringBuffer stringBuffer = new StringBuffer();
25
    
26
final LayoutGeneratorArguments args = (LayoutGeneratorArguments) argument;
27
final CustomLayoutData layoutData = (CustomLayoutData)args.getFigure().getData();
28
final CustomClassArguments callArgs = new CustomClassArguments(layoutData, args.getLayoutVariableName());
29
30
    stringBuffer.append(TEXT_1);
31
    stringBuffer.append(TEXT_2);
32
    stringBuffer.append(args.getDispatcher().dispatch("customAttributes", callArgs));
33
    stringBuffer.append(TEXT_3);
34
    return stringBuffer.toString();
35
  }
36
}
(-)src/org/eclipse/gmf/graphdef/codegen/templates/InitBorderLayoutGenerator.java (+54 lines)
Added Link Here
1
package org.eclipse.gmf.graphdef.codegen.templates;
2
3
import org.eclipse.gmf.gmfgraph.*;
4
import org.eclipse.gmf.graphdef.codegen.*;
5
6
public class InitBorderLayoutGenerator
7
{
8
  protected static String nl;
9
  public static synchronized InitBorderLayoutGenerator create(String lineSeparator)
10
  {
11
    nl = lineSeparator;
12
    InitBorderLayoutGenerator result = new InitBorderLayoutGenerator();
13
    nl = null;
14
    return result;
15
  }
16
17
  protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
18
  protected final String TEXT_1 = "";
19
  protected final String TEXT_2 = NL + "\t\t";
20
  protected final String TEXT_3 = ".setHorizontalSpacing(";
21
  protected final String TEXT_4 = ");" + NL + "\t\t";
22
  protected final String TEXT_5 = ".setVerticalSpacing(";
23
  protected final String TEXT_6 = ");";
24
  protected final String TEXT_7 = NL;
25
26
  public String generate(Object argument)
27
  {
28
    StringBuffer stringBuffer = new StringBuffer();
29
    
30
LayoutGeneratorArguments argsBundle = (LayoutGeneratorArguments) argument;
31
final BorderLayout gmfLayout = (BorderLayout)argsBundle.getFigure().getLayout();
32
final String layouterVarName = argsBundle.getLayoutVariableName();
33
34
    stringBuffer.append(TEXT_1);
35
    
36
Dimension spacing = gmfLayout.getSpacing();
37
if (spacing != null){
38
39
    stringBuffer.append(TEXT_2);
40
    stringBuffer.append(layouterVarName);
41
    stringBuffer.append(TEXT_3);
42
    stringBuffer.append(spacing.getDx());
43
    stringBuffer.append(TEXT_4);
44
    stringBuffer.append(layouterVarName);
45
    stringBuffer.append(TEXT_5);
46
    stringBuffer.append(spacing.getDy());
47
    stringBuffer.append(TEXT_6);
48
    
49
}
50
51
    stringBuffer.append(TEXT_7);
52
    return stringBuffer.toString();
53
  }
54
}
(-)src/org/eclipse/gmf/tests/gen/FigureCodegenTest.java (-145 / +2 lines)
Lines 11-48 Link Here
11
 */
11
 */
12
package org.eclipse.gmf.tests.gen;
12
package org.eclipse.gmf.tests.gen;
13
13
14
import junit.framework.TestCase;
15
16
import org.eclipse.emf.codegen.jet.JETException;
17
import org.eclipse.gmf.common.codegen.ImportUtil;
18
import org.eclipse.gmf.gmfgraph.ConnectionFigure;
19
import org.eclipse.gmf.gmfgraph.CustomFigure;
20
import org.eclipse.gmf.gmfgraph.Ellipse;
21
import org.eclipse.gmf.gmfgraph.Figure;
22
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
23
import org.eclipse.gmf.gmfgraph.Label;
24
import org.eclipse.gmf.gmfgraph.LineKind;
25
import org.eclipse.gmf.gmfgraph.Point;
26
import org.eclipse.gmf.gmfgraph.Polygon;
27
import org.eclipse.gmf.gmfgraph.PolygonDecoration;
28
import org.eclipse.gmf.gmfgraph.PolylineConnection;
29
import org.eclipse.gmf.gmfgraph.Rectangle;
30
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
31
import org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch;
32
import org.eclipse.gmf.graphdef.codegen.FigureGenerator;
14
import org.eclipse.gmf.graphdef.codegen.FigureGenerator;
33
import org.eclipse.jdt.core.compiler.IProblem;
34
import org.eclipse.jdt.core.dom.AST;
35
import org.eclipse.jdt.core.dom.ASTNode;
36
import org.eclipse.jdt.core.dom.ASTParser;
37
import org.eclipse.jdt.core.dom.CompilationUnit;
38
15
39
/**
16
/**
40
 * TODO generate project, compile and instaniate figures to make sure values are set (like figure's bg/fg color)
17
 * TODO generate project, compile and instaniate figures to make sure values are set (like figure's bg/fg color)
41
 * @author artem
18
 * @author artem
42
 */
19
 */
43
public class FigureCodegenTest extends TestCase {
20
public class FigureCodegenTest extends FigureCodegenTestBase {
44
	private FigureGenerator figureGenerator;
45
46
	public FigureCodegenTest(String name) {
21
	public FigureCodegenTest(String name) {
47
		super(name);
22
		super(name);
48
	}
23
	}
Lines 64-189 Link Here
64
	}
39
	}
65
40
66
	public void testGenFigureWithoutPackageStmt() {
41
	public void testGenFigureWithoutPackageStmt() {
67
		figureGenerator = new FigureGenerator();
42
		setCustomFigureGenerator(new FigureGenerator());
68
		testGenComplexShape();
43
		testGenComplexShape();
69
	}
44
	}
70
45
71
	private void performTests(Figure f) {
72
		try {
73
			String res = getGenerator().go(f);
74
			assertNotNull("Generation should produce code", res);
75
			ASTParser p = ASTParser.newParser(AST.JLS3);
76
			p.setSource(res.toCharArray());
77
			ASTNode astNode = p.createAST(null);
78
			assertEquals("Generator is expected to produce cu", astNode.getNodeType(), ASTNode.COMPILATION_UNIT);
79
			CompilationUnit cu = (CompilationUnit) astNode;
80
			if (getGenerator().getPackageStatement() != null) {
81
				assertNotNull("Generator initialized with packageName should produce package statement", cu.getPackage());
82
				assertEquals("Package names are different", getGenerator().getPackageStatement(), cu.getPackage().getName().getFullyQualifiedName());
83
			}
84
			IProblem[] problems = cu.getProblems();
85
			for (int i = 0; i < problems.length; i++) {
86
				assertFalse(problems[i].getMessage() + ", line:" + problems[i].getSourceLineNumber() + ", pos:" + cu.getColumnNumber(problems[i].getSourceStart()), problems[i].isError());
87
			}
88
		} catch (JETException ex) {
89
			fail(ex.getMessage());
90
		}
91
	}
92
93
	// custom top-level, hierarchical children. 
94
	private Figure figure1() {
95
		CustomFigure cf = GMFGraphFactory.eINSTANCE.createCustomFigure();
96
		cf.setName("MyCylinder");
97
		cf.setBundleName("org.eclipse.gmf.runtime.geoshapes");
98
		cf.setQualifiedClassName("org.eclipse.gmf.runtime.geoshapes.internal.GeoShapeCylinder");
99
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
100
		p.setX(1023);
101
		p.setY(33);
102
		cf.setSize(p);
103
		cf.getChildren().add(figure2());
104
		Ellipse e = GMFGraphFactory.eINSTANCE.createEllipse();
105
		e.setName("Elli");
106
		e.setFill(true);
107
		cf.getChildren().add(e);
108
		return cf;
109
	}
110
111
	// basic toplevel with plain list of children 
112
	private Figure figure2() {
113
		Rectangle r = GMFGraphFactory.eINSTANCE.createRectangle();
114
		r.setName("MyRect");
115
		r.setFill(true);
116
		r.setLineWidth(3);
117
		r.setLineKind(LineKind.LINE_DASHDOT_LITERAL);
118
		Label l1 = GMFGraphFactory.eINSTANCE.createLabel();
119
		l1.setText("aaaaa");
120
		l1.setName("L1");
121
		Label l2 = GMFGraphFactory.eINSTANCE.createLabel();
122
		l2.setText("bbbbb");
123
		l2.setName("L2");
124
		r.getChildren().add(l1);
125
		r.getChildren().add(l2);
126
		return r;
127
	}
128
129
	// basic toplebel with hierarhical list of children (one of them is custom, another is polygon) 
130
	private Figure figure3() {
131
		RoundedRectangle r = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
132
		r.setName("Rounded1");
133
		Polygon pg = GMFGraphFactory.eINSTANCE.createPolygon();
134
		pg.setName("Polygon1");
135
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
136
		p.setX(1);
137
		p.setY(2);
138
		pg.getTemplate().add(p);
139
		p = GMFGraphFactory.eINSTANCE.createPoint();
140
		p.setX(0);
141
		p.setY(3);
142
		pg.getTemplate().add(p);
143
		p = GMFGraphFactory.eINSTANCE.createPoint();
144
		p.setX(-2);
145
		p.setY(-1);
146
		pg.getTemplate().add(p);
147
		r.getChildren().add(pg);
148
		r.getChildren().add(figure1());
149
		return r;
150
	}
151
152
	private ConnectionFigure ecoreContainmentRef() {
153
		PolylineConnection cf = GMFGraphFactory.eINSTANCE.createPolylineConnection();
154
		cf.setName("ContainmentRef");
155
		PolygonDecoration df = createRhomb();
156
		df.setFill(true);
157
		cf.setSourceDecoration(df);
158
		return cf;
159
	}
160
161
	private PolygonDecoration createRhomb() {
162
		PolygonDecoration df = GMFGraphFactory.eINSTANCE.createPolygonDecoration();
163
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
164
		p.setX(-1);
165
		p.setY(1);
166
		df.getTemplate().add(p);
167
		p = GMFGraphFactory.eINSTANCE.createPoint();
168
		p.setX(0);
169
		p.setY(0);
170
		df.getTemplate().add(p);
171
		p = GMFGraphFactory.eINSTANCE.createPoint();
172
		p.setX(-1);
173
		p.setY(-1);
174
		df.getTemplate().add(p);
175
		p = GMFGraphFactory.eINSTANCE.createPoint();
176
		p.setX(-2);
177
		p.setY(0);
178
		df.getTemplate().add(p);
179
		return df;
180
	}
181
182
	private FigureGenerator getGenerator() {
183
		if (figureGenerator == null) {
184
			String packageName = "org.eclipse.gmf.tests.sample.figures";
185
			figureGenerator = new FigureGenerator(packageName, new ImportUtil(packageName), new FigureQualifiedNameSwitch());
186
		}
187
		return figureGenerator;
188
	}
189
}
46
}
(-)src/org/eclipse/gmf/tests/gen/FigureLayoutTest.java (+291 lines)
Added Link Here
1
package org.eclipse.gmf.tests.gen;
2
3
import java.util.Arrays;
4
import java.util.Iterator;
5
6
import org.eclipse.emf.common.util.EList;
7
import org.eclipse.gmf.gmfgraph.Alignment;
8
import org.eclipse.gmf.gmfgraph.BorderLayout;
9
import org.eclipse.gmf.gmfgraph.BorderLayoutData;
10
import org.eclipse.gmf.gmfgraph.CustomAttribute;
11
import org.eclipse.gmf.gmfgraph.CustomLayout;
12
import org.eclipse.gmf.gmfgraph.Dimension;
13
import org.eclipse.gmf.gmfgraph.Figure;
14
import org.eclipse.gmf.gmfgraph.FigureMarker;
15
import org.eclipse.gmf.gmfgraph.FigureRef;
16
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
17
import org.eclipse.gmf.gmfgraph.GridLayout;
18
import org.eclipse.gmf.gmfgraph.GridLayoutData;
19
import org.eclipse.gmf.gmfgraph.LayoutData;
20
import org.eclipse.gmf.gmfgraph.Rectangle;
21
22
public class FigureLayoutTest extends FigureCodegenTestBase {
23
	public FigureLayoutTest(String name){
24
		super(name);
25
	}
26
	
27
	public void testConcreteShapeLayoutAllProperties(){
28
		Figure parent = figure2();
29
		EList children = parent.getChildren();
30
		assertFalse("Precondition -- children required to test layout", children.isEmpty());
31
		
32
		parent.setLayout(createGridLayoutAllProperties());
33
		
34
		boolean oddChild = false;
35
		for (Iterator it = children.iterator(); it.hasNext();){
36
			FigureMarker next = (FigureMarker)it.next();
37
			oddChild = !oddChild;
38
			LayoutData data = createLayoutDataAllProperties(oddChild);
39
			next.setData(data);
40
			assertEquals("data-owner relation should be bidirectional", next, data.getOwner());
41
		}
42
		performTests(parent);
43
	}
44
	
45
//	public void testLayoutIsStorable() throws IOException {
46
//		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
47
//		parent.setName("Parent");
48
//		parent.setLayout(createLayoutAllProperties());
49
//		
50
//		Figure leftGreenFilled = GMFGraphFactory.eINSTANCE.createRectangle();
51
//		leftGreenFilled.setName("LeftGreen");
52
//		RGBColor green = GMFGraphFactory.eINSTANCE.createRGBColor();
53
//		green.setGreen(255);
54
//		leftGreenFilled.setBackgroundColor(green);
55
//		leftGreenFilled.setData(createLayoutDataAllProperties(true));
56
//		
57
//		Figure rightRedOutline = GMFGraphFactory.eINSTANCE.createRectangle();
58
//		rightRedOutline.setName("RightRed");
59
//		RGBColor red = GMFGraphFactory.eINSTANCE.createRGBColor();
60
//		red.setRed(255);
61
//		rightRedOutline.setForegroundColor(green);
62
//		rightRedOutline.setData(createLayoutDataAllProperties(false));
63
//		
64
//		Resource resource = new ResourceSetImpl().createResource(URI.createFileURI("C:/test-uri.xmi"));
65
//		resource.getContents().add(parent);
66
//		resource.save(null);
67
//	}
68
	
69
	public void testCustomFigureLayoutAllProperties(){
70
		Figure parent = figure1();
71
		parent.setName("Parent");
72
		GridLayout layout = createGridLayoutAllProperties();
73
		layout.setNumColumns(1);
74
		layout.setEqualWidth(false);
75
		parent.setLayout(layout);
76
		
77
		for (Iterator children = parent.getChildren().iterator(); children.hasNext();){
78
			FigureMarker next = (FigureMarker)children.next();
79
			GridLayoutData data = createLayoutDataAllProperties(false);
80
			data.setHorizontalAlignment(Alignment.FILL_LITERAL);
81
			data.setOwner(next);
82
			assertEquals("data-owner relation should be bidirectional", data, next.getData());
83
		}
84
		performTests(parent);
85
	}
86
	
87
	public void testDeepChildrenLayout(){
88
		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
89
		parent.setName("Root");
90
		
91
		Figure next = parent;
92
		for (int i = 0; i < 4; i++){
93
			next = addPairOfChildRectnaglesAndReturnLeft(next);
94
		}
95
		
96
		performTests(parent);
97
	}
98
	
99
	public void testLayoutDefaults(){
100
		Figure parent = GMFGraphFactory.eINSTANCE.createEllipse();
101
		parent.setName("GenEllipse");
102
		parent.setLayout(GMFGraphFactory.eINSTANCE.createGridLayout());
103
		
104
		Figure top = GMFGraphFactory.eINSTANCE.createLabel();
105
		top.setName("Top");
106
		top.setData(GMFGraphFactory.eINSTANCE.createGridLayoutData());
107
		parent.getChildren().add(top);
108
		
109
		Figure bottom = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
110
		bottom.setName("Bottom");
111
		bottom.setData(GMFGraphFactory.eINSTANCE.createGridLayoutData());
112
		parent.getChildren().add(bottom);
113
		
114
		performTests(parent);
115
	}
116
	
117
	public void testLayoutForReferencedChild(){
118
		Figure actualContainer = figure2();
119
		Figure referencedFigure = (Figure) actualContainer.getChildren().get(0);
120
		
121
		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
122
		parent.setName("ReferencedFigureParent");
123
		parent.setLayout(createGridLayoutAllProperties());
124
		
125
		FigureRef refChildA = GMFGraphFactory.eINSTANCE.createFigureRef();
126
		refChildA.setFigure(referencedFigure);
127
		refChildA.setData(createLayoutDataAllProperties(false));
128
		
129
		//same figure is referenced, different layout data
130
		FigureRef refChildB = GMFGraphFactory.eINSTANCE.createFigureRef();
131
		refChildB.setFigure(referencedFigure);
132
		refChildB.setData(createLayoutDataAllProperties(true));
133
		
134
		parent.getChildren().add(refChildA);
135
		parent.getChildren().add(refChildB);
136
		
137
		performTests(parent);
138
	}
139
	
140
	public void testMissedLayoutPresentLayoutData(){
141
		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
142
		parent.setName("ParentWithoutLayout");
143
		assertNull(parent.getLayout());
144
		
145
		Figure child = GMFGraphFactory.eINSTANCE.createRectangle();
146
		child.setName("childWithLayoutData");
147
		child.setData(createLayoutDataAllProperties(false));
148
		
149
		parent.getChildren().add(child);
150
		
151
		performTests(parent);
152
	}
153
	
154
	public void testBorderLayout(){
155
		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
156
		parent.setName("BorderedContents");
157
		
158
		BorderLayout layout = GMFGraphFactory.eINSTANCE.createBorderLayout();
159
		layout.setSpacing(createDimension(2, 4));
160
		parent.setLayout(layout);
161
		
162
		Figure centerA = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
163
		centerA.setName("Center_1");
164
		centerA.setData(createLayoutData(Alignment.CENTER_LITERAL, false));
165
		
166
		Figure centerB = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
167
		centerB.setName("Center_2");
168
		centerB.setData(createLayoutData(Alignment.CENTER_LITERAL, true));
169
170
		Figure left = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
171
		left.setName("Left");
172
		left.setData(createLayoutData(Alignment.BEGINNING_LITERAL, false));
173
174
		Figure right = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
175
		right.setName("Right");
176
		right.setData(createLayoutData(Alignment.END_LITERAL, false));
177
178
		Figure top = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
179
		top.setName("Top");
180
		top.setData(createLayoutData(Alignment.BEGINNING_LITERAL, true));
181
182
		Figure bottom = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
183
		bottom.setName("Bottom");
184
		bottom.setData(createLayoutData(Alignment.END_LITERAL, true));
185
		
186
		parent.getChildren().addAll(Arrays.asList(new Figure[] {top, bottom, left, right, centerA, centerB}));
187
		
188
		performTests(parent);
189
	}
190
	
191
	public void testCustomLayout(){
192
		CustomLayout layout = GMFGraphFactory.eINSTANCE.createCustomLayout();
193
		layout.setQualifiedClassName("com.borland.layouts.TheBestLayoutManagerForever");
194
		
195
		CustomAttribute normalAttr = GMFGraphFactory.eINSTANCE.createCustomAttribute();
196
		normalAttr.setDirectAccess(false);
197
		normalAttr.setMultiStatementValue(false);
198
		normalAttr.setName("UnlimateAnswer");
199
		normalAttr.setValue("42");
200
		
201
		layout.getAttributes().add(normalAttr);
202
203
		CustomAttribute directAttr = GMFGraphFactory.eINSTANCE.createCustomAttribute();
204
		directAttr.setDirectAccess(true);
205
		directAttr.setMultiStatementValue(false);
206
		directAttr.setName("DirectUltimateAnswer");
207
		directAttr.setValue("this.getUltimateAnswer() - 6 * 7");
208
		
209
		layout.getAttributes().add(directAttr);
210
211
		CustomAttribute multiAttr = GMFGraphFactory.eINSTANCE.createCustomAttribute();
212
		multiAttr.setDirectAccess(false);
213
		multiAttr.setMultiStatementValue(true);
214
		multiAttr.setType("int");
215
		multiAttr.setName("MultiStatementParameter");
216
		multiAttr.setValue("if (Boolean.TRUE.booleanValue()) { %%% = 42; } else { %%% = -42; } ");
217
		
218
		layout.getAttributes().add(multiAttr);
219
		
220
		Figure parent = GMFGraphFactory.eINSTANCE.createRectangle();
221
		parent.setName("CarefullyLayouted");
222
		parent.setLayout(layout);
223
		
224
		performTests(parent);
225
	}
226
	
227
	private Figure addPairOfChildRectnaglesAndReturnLeft(Figure parent){
228
		GridLayout parentLayout = createGridLayoutAllProperties();
229
		parentLayout.setNumColumns(2);
230
		parentLayout.setMargins(null);
231
		parentLayout.setSpacing(null);
232
		parent.setLayout(parentLayout);
233
		
234
		Rectangle left = GMFGraphFactory.eINSTANCE.createRectangle();
235
		left.setName(parent.getName() + "_1");
236
		left.setData(createLayoutDataAllProperties(true));
237
		parent.getChildren().add(left);
238
		
239
		Rectangle right = GMFGraphFactory.eINSTANCE.createRectangle();
240
		right.setName(parent.getName() + "_2");
241
		right.setData(createLayoutDataAllProperties(false));
242
		parent.getChildren().add(right);
243
		
244
		return left;
245
	}
246
	
247
	private GridLayoutData createLayoutDataAllProperties(boolean horizontalBeginningNotEnd) {
248
		GridLayoutData data = GMFGraphFactory.eINSTANCE.createGridLayoutData();
249
		data.setGrabExcessHorizontalSpace(true);
250
		data.setGrabExcessVerticalSpace(false);
251
		data.setHorizontalAlignment(horizontalBeginningNotEnd ? Alignment.BEGINNING_LITERAL : Alignment.END_LITERAL);
252
		data.setVerticalAlignment(Alignment.CENTER_LITERAL);
253
		data.setHorizontalIndent(5);
254
		data.setHorizontalSpan(1);
255
		data.setVerticalSpan(1);
256
		return data;
257
	}
258
259
	private GridLayout createGridLayoutAllProperties() {
260
		GridLayout layout = GMFGraphFactory.eINSTANCE.createGridLayout();
261
		layout.setEqualWidth(true);
262
		layout.setNumColumns(2);
263
		
264
		Dimension margins = GMFGraphFactory.eINSTANCE.createDimension();
265
		margins.setDx(5);
266
		margins.setDy(10);
267
		layout.setMargins(margins);
268
		
269
		Dimension spacing = GMFGraphFactory.eINSTANCE.createDimension();
270
		spacing.setDx(7);
271
		spacing.setDy(8);
272
		layout.setSpacing(spacing);
273
		
274
		return layout;
275
	}
276
	
277
	private Dimension createDimension(int dx, int dy){
278
		Dimension result = GMFGraphFactory.eINSTANCE.createDimension();
279
		result.setDx(dx);
280
		result.setDy(dy);
281
		return result;
282
	}
283
	
284
	private BorderLayoutData createLayoutData(Alignment alignment, boolean isVertical){
285
		BorderLayoutData result = GMFGraphFactory.eINSTANCE.createBorderLayoutData();
286
		result.setAlignment(alignment);
287
		result.setVertical(isVertical);
288
		return result;
289
	}
290
291
}
(-)src/org/eclipse/gmf/tests/gen/FigureCodegenTestBase.java (+177 lines)
Added Link Here
1
/*
2
 * Copyright (c) 2005 Borland Software Corporation
3
 * 
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 *
9
 * Contributors:
10
 *    Artem Tikhomirov (Borland) - initial API and implementation
11
 */
12
package org.eclipse.gmf.tests.gen;
13
14
import junit.framework.TestCase;
15
16
import org.eclipse.emf.codegen.jet.JETException;
17
import org.eclipse.gmf.common.codegen.ImportUtil;
18
import org.eclipse.gmf.gmfgraph.ConnectionFigure;
19
import org.eclipse.gmf.gmfgraph.CustomFigure;
20
import org.eclipse.gmf.gmfgraph.Ellipse;
21
import org.eclipse.gmf.gmfgraph.Figure;
22
import org.eclipse.gmf.gmfgraph.GMFGraphFactory;
23
import org.eclipse.gmf.gmfgraph.Label;
24
import org.eclipse.gmf.gmfgraph.LineKind;
25
import org.eclipse.gmf.gmfgraph.Point;
26
import org.eclipse.gmf.gmfgraph.Polygon;
27
import org.eclipse.gmf.gmfgraph.PolygonDecoration;
28
import org.eclipse.gmf.gmfgraph.PolylineConnection;
29
import org.eclipse.gmf.gmfgraph.Rectangle;
30
import org.eclipse.gmf.gmfgraph.RoundedRectangle;
31
import org.eclipse.gmf.gmfgraph.util.FigureQualifiedNameSwitch;
32
import org.eclipse.gmf.graphdef.codegen.FigureGenerator;
33
import org.eclipse.jdt.core.compiler.IProblem;
34
import org.eclipse.jdt.core.dom.AST;
35
import org.eclipse.jdt.core.dom.ASTNode;
36
import org.eclipse.jdt.core.dom.ASTParser;
37
import org.eclipse.jdt.core.dom.CompilationUnit;
38
39
/**
40
 * TODO generate project, compile and instaniate figures to make sure values are set (like figure's bg/fg color)
41
 * @author artem
42
 */
43
public class FigureCodegenTestBase extends TestCase {
44
	private FigureGenerator figureGenerator;
45
46
	public FigureCodegenTestBase(String name) {
47
		super(name);
48
	}
49
	
50
	protected final void setCustomFigureGenerator(FigureGenerator generator){
51
		figureGenerator = generator;
52
	}
53
54
	protected final void performTests(Figure f) {
55
		try {
56
			String res = getGenerator().go(f);
57
			
58
			System.err.println("generator result:");
59
			System.err.println(res);
60
			System.err.println("--------------------------------");
61
			
62
			assertNotNull("Generation should produce code", res);
63
			ASTParser p = ASTParser.newParser(AST.JLS3);
64
			p.setSource(res.toCharArray());
65
			ASTNode astNode = p.createAST(null);
66
			assertEquals("Generator is expected to produce cu", astNode.getNodeType(), ASTNode.COMPILATION_UNIT);
67
			CompilationUnit cu = (CompilationUnit) astNode;
68
			if (getGenerator().getPackageStatement() != null) {
69
				assertNotNull("Generator initialized with packageName should produce package statement", cu.getPackage());
70
				assertEquals("Package names are different", getGenerator().getPackageStatement(), cu.getPackage().getName().getFullyQualifiedName());
71
			}
72
			IProblem[] problems = cu.getProblems();
73
			for (int i = 0; i < problems.length; i++) {
74
				assertFalse(problems[i].getMessage() + ", line:" + problems[i].getSourceLineNumber() + ", pos:" + cu.getColumnNumber(problems[i].getSourceStart()), problems[i].isError());
75
			}
76
		} catch (JETException ex) {
77
			fail(ex.getMessage());
78
		}
79
	}
80
81
	// custom top-level, hierarchical children. 
82
	protected final Figure figure1() {
83
		CustomFigure cf = GMFGraphFactory.eINSTANCE.createCustomFigure();
84
		cf.setName("MyCylinder");
85
		cf.setBundleName("org.eclipse.gmf.runtime.geoshapes");
86
		cf.setQualifiedClassName("org.eclipse.gmf.runtime.geoshapes.internal.GeoShapeCylinder");
87
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
88
		p.setX(1023);
89
		p.setY(33);
90
		cf.setSize(p);
91
		cf.getChildren().add(figure2());
92
		Ellipse e = GMFGraphFactory.eINSTANCE.createEllipse();
93
		e.setName("Elli");
94
		e.setFill(true);
95
		cf.getChildren().add(e);
96
		return cf;
97
	}
98
99
	// basic toplevel with plain list of children 
100
	protected final Figure figure2() {
101
		Rectangle r = GMFGraphFactory.eINSTANCE.createRectangle();
102
		r.setName("MyRect");
103
		r.setFill(true);
104
		r.setLineWidth(3);
105
		r.setLineKind(LineKind.LINE_DASHDOT_LITERAL);
106
		Label l1 = GMFGraphFactory.eINSTANCE.createLabel();
107
		l1.setText("aaaaa");
108
		l1.setName("L1");
109
		Label l2 = GMFGraphFactory.eINSTANCE.createLabel();
110
		l2.setText("bbbbb");
111
		l2.setName("L2");
112
		r.getChildren().add(l1);
113
		r.getChildren().add(l2);
114
		return r;
115
	}
116
117
	// basic toplebel with hierarhical list of children (one of them is custom, another is polygon) 
118
	protected final Figure figure3() {
119
		RoundedRectangle r = GMFGraphFactory.eINSTANCE.createRoundedRectangle();
120
		r.setName("Rounded1");
121
		Polygon pg = GMFGraphFactory.eINSTANCE.createPolygon();
122
		pg.setName("Polygon1");
123
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
124
		p.setX(1);
125
		p.setY(2);
126
		pg.getTemplate().add(p);
127
		p = GMFGraphFactory.eINSTANCE.createPoint();
128
		p.setX(0);
129
		p.setY(3);
130
		pg.getTemplate().add(p);
131
		p = GMFGraphFactory.eINSTANCE.createPoint();
132
		p.setX(-2);
133
		p.setY(-1);
134
		pg.getTemplate().add(p);
135
		r.getChildren().add(pg);
136
		r.getChildren().add(figure1());
137
		return r;
138
	}
139
140
	protected final ConnectionFigure ecoreContainmentRef() {
141
		PolylineConnection cf = GMFGraphFactory.eINSTANCE.createPolylineConnection();
142
		cf.setName("ContainmentRef");
143
		PolygonDecoration df = createRhomb();
144
		df.setFill(true);
145
		cf.setSourceDecoration(df);
146
		return cf;
147
	}
148
149
	protected final PolygonDecoration createRhomb() {
150
		PolygonDecoration df = GMFGraphFactory.eINSTANCE.createPolygonDecoration();
151
		Point p = GMFGraphFactory.eINSTANCE.createPoint();
152
		p.setX(-1);
153
		p.setY(1);
154
		df.getTemplate().add(p);
155
		p = GMFGraphFactory.eINSTANCE.createPoint();
156
		p.setX(0);
157
		p.setY(0);
158
		df.getTemplate().add(p);
159
		p = GMFGraphFactory.eINSTANCE.createPoint();
160
		p.setX(-1);
161
		p.setY(-1);
162
		df.getTemplate().add(p);
163
		p = GMFGraphFactory.eINSTANCE.createPoint();
164
		p.setX(-2);
165
		p.setY(0);
166
		df.getTemplate().add(p);
167
		return df;
168
	}
169
170
	private FigureGenerator getGenerator() {
171
		if (figureGenerator == null) {
172
			String packageName = "org.eclipse.gmf.tests.sample.figures";
173
			figureGenerator = new FigureGenerator(packageName, new ImportUtil(packageName), new FigureQualifiedNameSwitch());
174
		}
175
		return figureGenerator;
176
	}
177
}
(-)META-INF/MANIFEST.MF (+1 lines)
Lines 20-22 Link Here
20
 org.eclipse.gmf.runtime.emf.ui.properties
20
 org.eclipse.gmf.runtime.emf.ui.properties
21
Eclipse-LazyStart: true
21
Eclipse-LazyStart: true
22
Bundle-Vendor: %providerName
22
Bundle-Vendor: %providerName
23
Export-Package: org.eclipse.gmf.internal.codegen.draw2d
(-)src/org/eclipse/gmf/internal/codegen/draw2d/GridDataAdapter.java (+87 lines)
Added Link Here
1
package org.eclipse.gmf.internal.codegen.draw2d;
2
3
import org.eclipse.draw2d.geometry.Dimension;
4
5
6
public class GridDataAdapter extends GridData {
7
8
	public boolean isGrabExcessHorizontalSpace() {
9
		return grabExcessHorizontalSpace;
10
	}
11
12
	public void setGrabExcessHorizontalSpace(boolean grabExcessHorizontalSpace) {
13
		this.grabExcessHorizontalSpace = grabExcessHorizontalSpace;
14
	}
15
16
	public boolean isGrabExcessVerticalSpace() {
17
		return grabExcessVerticalSpace;
18
	}
19
20
	public void setGrabExcessVerticalSpace(boolean grabExcessVerticalSpace) {
21
		this.grabExcessVerticalSpace = grabExcessVerticalSpace;
22
	}
23
	
24
	public void setSizeHint(Dimension size){
25
		if (size != null){
26
			setWidthHint(size.width);
27
			setHeightHint(size.height);
28
		}
29
	}
30
31
	public int getWidthHint() {
32
		return widthHint;
33
	}
34
35
	public void setWidthHint(int widthHint) {
36
		this.widthHint = widthHint;
37
	}
38
39
	public int getHeightHint() {
40
		return heightHint;
41
	}
42
43
	public void setHeightHint(int heightHint) {
44
		this.heightHint = heightHint;
45
	}
46
47
	public int getHorizontalAlignment() {
48
		return horizontalAlignment;
49
	}
50
51
	public void setHorizontalAlignment(int horizontalAlignment) {
52
		this.horizontalAlignment = horizontalAlignment;
53
	}
54
55
	public int getHorizontalIndent() {
56
		return horizontalIndent;
57
	}
58
59
	public void setHorizontalIndent(int horizontalIndent) {
60
		this.horizontalIndent = horizontalIndent;
61
	}
62
63
	public int getHorizontalSpan() {
64
		return horizontalSpan;
65
	}
66
67
	public void setHorizontalSpan(int horizontalSpan) {
68
		this.horizontalSpan = horizontalSpan;
69
	}
70
71
	public int getVerticalAlignment() {
72
		return verticalAlignment;
73
	}
74
75
	public void setVerticalAlignment(int verticalAlignment) {
76
		this.verticalAlignment = verticalAlignment;
77
	}
78
79
	public int getVerticalSpan() {
80
		return verticalSpan;
81
	}
82
83
	public void setVerticalSpan(int verticalSpan) {
84
		this.verticalSpan = verticalSpan;
85
	}
86
87
}
(-)src/org/eclipse/gmf/internal/codegen/draw2d/GridData.java (+439 lines)
Added Link Here
1
package org.eclipse.gmf.internal.codegen.draw2d;
2
3
import org.eclipse.draw2d.IFigure;
4
import org.eclipse.draw2d.geometry.Dimension;
5
import org.eclipse.swt.SWT;
6
7
8
/**
9
 * <code>GridData</code> is the layout data object associated with 
10
 * <code>GridLayout</code>. To set a <code>GridData</code> object into a 
11
 * <code>Figure</code>, you use the <code>setConstraint()</code> method
12
 * of <code>GridLayout</code> to map the <code>Figure</code> to its 
13
 * layout <code>GridData</code>.
14
 * <p>
15
 * There are two ways to create a <code>GridData</code> object with certain 
16
 * fields set. The first is to set the fields directly, like this:
17
 * <pre>
18
 *      GridData gridData = new GridData();
19
 *      gridData.horizontalAlignment = GridData.FILL;
20
 *      gridData.grabExcessHorizontalSpace = true;
21
 * 
22
 *      // associate the figure to the GridData object
23
 *      myGridlayout.setConstraint(myFigure, gridData);
24
 * </pre>
25
 * The second is to take advantage of convenience style bits defined 
26
 * by <code>GridData</code>:
27
 * <pre>
28
 *      GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
29
 * </pre>
30
 * </p>
31
 * <p>
32
 * NOTE: Do not reuse <code>GridData</code> objects. Every child in the 
33
 * parent <code>Figure</code> that is managed by the <code>GridLayout</code>
34
 * must have a unique <code>GridData</code> object. If the layout data 
35
 * for a Grid member in a <code>GridLayout</code> is null at layout time, 
36
 * a unique <code>GridData</code> object is created for it.
37
 * </p>
38
 * 
39
 * @see GridLayout
40
 */
41
public class GridData {
42
    /**
43
     * verticalAlignment specifies how figures will be positioned 
44
     * vertically within a cell. 
45
     *
46
     * The default value is CENTER.
47
     *
48
     * Possible values are:
49
     *
50
     * SWT.BEGINNING (or SWT.TOP): Position the figure at the top of the cell
51
     * SWT.CENTER: Position the figure in the vertical center of the cell
52
     * SWT.END (or SWT.BOTTOM): Position the figure at the bottom of the cell
53
     * SWT.FILL: Resize the figure to fill the cell vertically
54
     */
55
    public int verticalAlignment = CENTER;
56
    
57
    /**
58
     * horizontalAlignment specifies how figures will be positioned 
59
     * horizontally within a cell. 
60
     *
61
     * The default value is BEGINNING.
62
     *
63
     * Possible values are:
64
     *
65
     * SWT.BEGINNING (or SWT.LEFT): Position the figure at the left of the cell
66
     * SWT.CENTER: Position the figure in the horizontal center of the cell
67
     * SWT.END (or SWT.RIGHT): Position the figure at the right of the cell
68
     * SWT.FILL: Resize the figure to fill the cell horizontally
69
     */
70
    public int horizontalAlignment = BEGINNING;
71
    
72
    /**
73
     * widthHint specifies a minimum width for the column. A value of 
74
     * SWT.DEFAULT indicates that no minimum width is specified.
75
     *
76
     * The default value is SWT.DEFAULT.
77
     */
78
    public int widthHint = SWT.DEFAULT;
79
    
80
    /**
81
     * heightHint specifies a minimum height for the row. A value of
82
     * SWT.DEFAULT indicates that no minimum height is specified.
83
     *
84
     * The default value is SWT.DEFAULT.
85
     */
86
    public int heightHint = SWT.DEFAULT;
87
    
88
    /**
89
     * horizontalIndent specifies the number of pixels of indentation
90
     * that will be placed along the left side of the cell.
91
     *
92
     * The default value is 0.
93
     */
94
    public int horizontalIndent = 0;
95
    
96
    /**
97
     * horizontalSpan specifies the number of column cells that the figure
98
     * will take up.
99
     *
100
     * The default value is 1.
101
     */
102
    public int horizontalSpan = 1;
103
    
104
    /**
105
     * verticalSpan specifies the number of row cells that the figure
106
     * will take up.
107
     *
108
     * The default value is 1.
109
     */
110
    public int verticalSpan = 1;
111
    
112
    /**
113
     * grabExcessHorizontalSpace specifies whether the cell will be made
114
     * wide enough to fit the remaining horizontal space.
115
     *
116
     * The default value is false.
117
     */ 
118
    public boolean grabExcessHorizontalSpace = false;
119
    
120
    /**
121
     * grabExcessVerticalSpace specifies whether the cell will be made
122
     * tall enough to fit the remaining vertical space.
123
     *
124
     * The default value is false.
125
     */ 
126
    public boolean grabExcessVerticalSpace = false;
127
128
    /**
129
     * Value for horizontalAlignment or verticalAlignment.
130
     * Position the figure at the top or left of the cell.
131
     * Not recommended. Use SWT.BEGINNING, SWT.TOP or SWT.LEFT instead.
132
     */
133
    public static final int BEGINNING = SWT.BEGINNING;
134
    
135
    /**
136
     * Value for horizontalAlignment or verticalAlignment.
137
     * Position the figure in the vertical or horizontal center of the cell
138
     * Not recommended. Use SWT.CENTER instead.
139
     */
140
    public static final int CENTER = 2;
141
    
142
    /**
143
     * Value for horizontalAlignment or verticalAlignment.
144
     * Position the figure at the bottom or right of the cell
145
     * Not recommended. Use SWT.END, SWT.BOTTOM or SWT.RIGHT instead.
146
     */
147
    public static final int END = 3;
148
    
149
    /**
150
     * Value for horizontalAlignment or verticalAlignment.
151
     * Resize the figure to fill the cell horizontally or vertically.
152
     * Not recommended. Use SWT.FILL instead.
153
     */
154
    public static final int FILL = SWT.FILL;
155
156
    /**
157
     * Style bit for <code>new GridData(int)</code>.
158
     * Position the figure at the top of the cell.
159
     * Not recommended. Use 
160
     * <code>new GridData(int, SWT.BEGINNING, boolean, boolean)</code>
161
     * instead.
162
     */
163
    public static final int VERTICAL_ALIGN_BEGINNING =  1 << 1;
164
    
165
    /**
166
     * Style bit for <code>new GridData(int)</code> to position the 
167
     * figure in the vertical center of the cell.
168
     * Not recommended. Use
169
     * <code>new GridData(int, SWT.CENTER, boolean, boolean)</code>
170
     * instead.
171
     */
172
    public static final int VERTICAL_ALIGN_CENTER = 1 << 2;
173
    
174
    /**
175
     * Style bit for <code>new GridData(int)</code> to position the 
176
     * figure at the bottom of the cell.
177
     * Not recommended. Use
178
     * <code>new GridData(int, SWT.END, boolean, boolean)</code>
179
     * instead.
180
     */
181
    public static final int VERTICAL_ALIGN_END = 1 << 3;
182
    
183
    /**
184
     * Style bit for <code>new GridData(int)</code> to resize the 
185
     * figure to fill the cell vertically.
186
     * Not recommended. Use
187
     * <code>new GridData(int, SWT.FILL, boolean, boolean)</code>
188
     * instead
189
     */
190
    public static final int VERTICAL_ALIGN_FILL = 1 << 4;
191
    
192
    /**
193
     * Style bit for <code>new GridData(int)</code> to position the 
194
     * figure at the left of the cell.
195
     * Not recommended. Use
196
     * <code>new GridData(SWT.BEGINNING, int, boolean, boolean)</code>
197
     * instead.
198
     */
199
    public static final int HORIZONTAL_ALIGN_BEGINNING =  1 << 5;
200
    
201
    /**
202
     * Style bit for <code>new GridData(int)</code> to position the 
203
     * figure in the horizontal center of the cell.
204
     * Not recommended. Use
205
     * <code>new GridData(SWT.CENTER, int, boolean, boolean)</code>
206
     * instead.
207
     */
208
    public static final int HORIZONTAL_ALIGN_CENTER = 1 << 6;
209
    
210
    /**
211
     * Style bit for <code>new GridData(int)</code> to position the 
212
     * figure at the right of the cell.
213
     * Not recommended. Use
214
     * <code>new GridData(SWT.END, int, boolean, boolean)</code>
215
     * instead.
216
     */
217
    public static final int HORIZONTAL_ALIGN_END = 1 << 7;
218
    
219
    /**
220
     * Style bit for <code>new GridData(int)</code> to resize the 
221
     * figure to fill the cell horizontally.
222
     * Not recommended. Use
223
     * <code>new GridData(SWT.FILL, int, boolean, boolean)</code>
224
     * instead.
225
     */
226
    public static final int HORIZONTAL_ALIGN_FILL = 1 << 8;
227
    
228
    /**
229
     * Style bit for <code>new GridData(int)</code> to resize the 
230
     * figure to fit the remaining horizontal space.
231
     * Not recommended. Use
232
     * <code>new GridData(int, int, true, boolean)</code>
233
     * instead.
234
     */
235
    public static final int GRAB_HORIZONTAL = 1 << 9;
236
    
237
    /**
238
     * Style bit for <code>new GridData(int)</code> to resize the 
239
     * figure to fit the remaining vertical space.
240
     * Not recommended. Use
241
     * <code>new GridData(int, int, boolean, true)</code>
242
     * instead.
243
     */
244
    public static final int GRAB_VERTICAL = 1 << 10;
245
    
246
    /**
247
     * Style bit for <code>new GridData(int)</code> to resize the 
248
     * figure to fill the cell vertically and to fit the remaining
249
     * vertical space.
250
     * FILL_VERTICAL = VERTICAL_ALIGN_FILL | GRAB_VERTICAL
251
     * Not recommended. Use
252
     * <code>new GridData(int, SWT.FILL, boolean, true)</code>
253
     * instead.
254
     */ 
255
    public static final int FILL_VERTICAL = VERTICAL_ALIGN_FILL | GRAB_VERTICAL;
256
    
257
    /**
258
     * Style bit for <code>new GridData(int)</code> to resize the 
259
     * figure to fill the cell horizontally and to fit the remaining
260
     * horizontal space.
261
     * FILL_HORIZONTAL = HORIZONTAL_ALIGN_FILL | GRAB_HORIZONTAL
262
     * Not recommended. Use
263
     * <code>new GridData(SWT.FILL, int, true, boolean)</code>
264
     * instead.
265
     */ 
266
    public static final int FILL_HORIZONTAL = HORIZONTAL_ALIGN_FILL | GRAB_HORIZONTAL;
267
    
268
    /**
269
     * Style bit for <code>new GridData(int)</code> to resize the 
270
     * figure to fill the cell horizontally and vertically and 
271
     * to fit the remaining horizontal and vertical space.
272
     * FILL_BOTH = FILL_VERTICAL | FILL_HORIZONTAL
273
     * Not recommended. Use
274
     * <code>new GridData(SWT.FILL, SWT.FILL, true, true)</code>
275
     * instead.
276
     */ 
277
    public static final int FILL_BOTH = FILL_VERTICAL | FILL_HORIZONTAL;
278
279
    int cacheWidth = -1, cacheHeight = -1;
280
    int [][] cache = new int[2][4];
281
    int cacheIndex = -1;
282
283
/**
284
 * Constructs a new instance of GridData using
285
 * default values.
286
 */
287
public GridData () {
288
    super ();
289
}
290
291
/**
292
 * Constructs a new instance based on the GridData style.
293
 * This constructor is not recommended.
294
 * 
295
 * @param style the GridData style
296
 */
297
public GridData (int style) {
298
    super ();
299
    if ((style & VERTICAL_ALIGN_BEGINNING) != 0) verticalAlignment = BEGINNING;
300
    if ((style & VERTICAL_ALIGN_CENTER) != 0) verticalAlignment = CENTER;
301
    if ((style & VERTICAL_ALIGN_FILL) != 0) verticalAlignment = FILL;
302
    if ((style & VERTICAL_ALIGN_END) != 0) verticalAlignment = END;
303
    if ((style & HORIZONTAL_ALIGN_BEGINNING) != 0) horizontalAlignment = BEGINNING;
304
    if ((style & HORIZONTAL_ALIGN_CENTER) != 0) horizontalAlignment = CENTER;
305
    if ((style & HORIZONTAL_ALIGN_FILL) != 0) horizontalAlignment = FILL;
306
    if ((style & HORIZONTAL_ALIGN_END) != 0) horizontalAlignment = END;
307
    grabExcessHorizontalSpace = (style & GRAB_HORIZONTAL) != 0;
308
    grabExcessVerticalSpace = (style & GRAB_VERTICAL) != 0;
309
}
310
311
/**
312
 * Constructs a new instance of GridData according to the parameters.
313
 * 
314
 * @param horizontalAlignment how figure will be positioned horizontally within a cell
315
 * @param verticalAlignment how figure will be positioned vertically within a cell
316
 * @param grabExcessHorizontalSpace whether cell will be made wide enough to fit the remaining horizontal space
317
 * @param grabExcessVerticalSpace whether cell will be made high enough to fit the remaining vertical space
318
 * 
319
 */
320
public GridData (int horizontalAlignment, int verticalAlignment, boolean grabExcessHorizontalSpace, boolean grabExcessVerticalSpace) {
321
    this (horizontalAlignment, verticalAlignment, grabExcessHorizontalSpace, grabExcessVerticalSpace, 1, 1);
322
}
323
324
/**
325
 * Constructs a new instance of GridData according to the parameters.
326
 *  
327
 * @param horizontalAlignment how figure will be positioned horizontally within a cell
328
 * @param verticalAlignment how figure will be positioned vertically within a cell
329
 * @param grabExcessHorizontalSpace whether cell will be made wide enough to fit the remaining horizontal space
330
 * @param grabExcessVerticalSpace whether cell will be made high enough to fit the remaining vertical space
331
 * @param horizontalSpan the number of column cells that the figure will take up
332
 * @param verticalSpan the number of row cells that the figure will take up
333
 * 
334
 */
335
public GridData (int horizontalAlignment, int verticalAlignment, boolean grabExcessHorizontalSpace, boolean grabExcessVerticalSpace, int horizontalSpan, int verticalSpan) {
336
    super ();
337
    this.horizontalAlignment = horizontalAlignment;
338
    this.verticalAlignment = verticalAlignment;
339
    this.grabExcessHorizontalSpace = grabExcessHorizontalSpace;
340
    this.grabExcessVerticalSpace = grabExcessVerticalSpace;
341
    this.horizontalSpan = horizontalSpan;
342
    this.verticalSpan = verticalSpan;
343
}
344
345
/**
346
 * Constructs a new instance of GridData according to the parameters.
347
 * A value of SWT.DEFAULT indicates that no minimum width or
348
 * no minumum height is specified.
349
 * 
350
 * @param width a minimum width for the column
351
 * @param height a minimum height for the row
352
 * 
353
 */
354
public GridData (int width, int height) {
355
    super ();
356
    this.widthHint = width;
357
    this.heightHint = height;
358
}
359
360
Dimension computeSize (IFigure figure, boolean flushCache) {
361
    if (cacheWidth != -1 && cacheHeight != -1) {
362
        return new Dimension (cacheWidth, cacheHeight);
363
    }
364
    for (int i = 0; i < cacheIndex + 1; i++) {
365
        if (cache [i][0] == widthHint && cache [i][1] == heightHint) {
366
            cacheWidth = cache [i][2];
367
            cacheHeight = cache [i][3];
368
            return new Dimension (cacheWidth, cacheHeight);
369
        }
370
    }
371
372
    Dimension size = figure.getPreferredSize(widthHint,heightHint);
373
    if (widthHint!=-1) size.width = widthHint;
374
    if (heightHint!=-1) size.height = heightHint;    
375
376
    if (cacheIndex < cache.length - 1) cacheIndex++;
377
    cache [cacheIndex][0] = widthHint;
378
    cache [cacheIndex][1] = heightHint;
379
    cacheWidth = cache [cacheIndex][2] = size.width;
380
    cacheHeight = cache [cacheIndex][3] = size.height;
381
    return size;
382
}
383
384
385
void flushCache () {
386
    cacheWidth = cacheHeight = -1;
387
    cacheIndex = -1;
388
}
389
390
String getName () {
391
    String string = getClass ().getName ();
392
    int index = string.lastIndexOf ('.');
393
    if (index == -1) return string;
394
    return string.substring (index + 1, string.length ());
395
}
396
397
public String toString () {
398
399
    String hAlign = "";
400
    switch (horizontalAlignment) {
401
        case SWT.FILL: hAlign = "SWT.FILL"; break;
402
        case SWT.BEGINNING: hAlign = "SWT.BEGINNING"; break;
403
        case SWT.LEFT: hAlign = "SWT.LEFT"; break;
404
        case SWT.END: hAlign = "SWT.END"; break;
405
        case END: hAlign = "GridData.END"; break;
406
        case SWT.RIGHT: hAlign = "SWT.RIGHT"; break;
407
        case SWT.CENTER: hAlign = "SWT.CENTER"; break;
408
        case CENTER: hAlign = "GridData.CENTER"; break;
409
        default: hAlign = "Undefined "+horizontalAlignment; break;
410
    }
411
    String vAlign = "";
412
    switch (verticalAlignment) {
413
        case SWT.FILL: vAlign = "SWT.FILL"; break;
414
        case SWT.BEGINNING: vAlign = "SWT.BEGINNING"; break;
415
        case SWT.TOP: vAlign = "SWT.TOP"; break;
416
        case SWT.END: vAlign = "SWT.END"; break;
417
        case END: vAlign = "GridData.END"; break;
418
        case SWT.BOTTOM: vAlign = "SWT.BOTTOM"; break;
419
        case SWT.CENTER: vAlign = "SWT.CENTER"; break;
420
        case CENTER: vAlign = "GridData.CENTER"; break;
421
        default: vAlign = "Undefined "+verticalAlignment; break;
422
    }
423
    String string = getName()+" {";
424
    string += "horizontalAlignment="+hAlign+" ";
425
    if (horizontalIndent != 0) string += "horizontalIndent="+horizontalIndent+" ";
426
    if (horizontalSpan != 1) string += "horizontalSpan="+horizontalSpan+" ";
427
    if (grabExcessHorizontalSpace) string += "grabExcessHorizontalSpace="+grabExcessHorizontalSpace+" ";
428
    if (widthHint != SWT.DEFAULT) string += "widthHint="+widthHint+" ";
429
    string += "verticalAlignment="+vAlign+" ";
430
    if (verticalSpan != 1) string += "verticalSpan="+verticalSpan+" ";
431
    if (grabExcessVerticalSpace) string += "grabExcessVerticalSpace="+grabExcessVerticalSpace+" ";
432
    if (heightHint != SWT.DEFAULT) string += "heightHint="+heightHint+" ";
433
    string = string.trim();
434
    string += "}";
435
    return string;
436
437
}
438
439
}
(-)src/org/eclipse/gmf/internal/codegen/draw2d/GridLayoutAdapter.java (+53 lines)
Added Link Here
1
package org.eclipse.gmf.internal.codegen.draw2d;
2
3
public class GridLayoutAdapter extends GridLayout {
4
5
	public int getHorizontalSpacing() {
6
		return horizontalSpacing;
7
	}
8
9
	public void setHorizontalSpacing(int horizontalSpacing) {
10
		this.horizontalSpacing = horizontalSpacing;
11
	}
12
13
	public boolean isMakeColumnsEqualWidth() {
14
		return makeColumnsEqualWidth;
15
	}
16
17
	public void setMakeColumnsEqualWidth(boolean makeColumnsEqualWidth) {
18
		this.makeColumnsEqualWidth = makeColumnsEqualWidth;
19
	}
20
21
	public int getMarginHeight() {
22
		return marginHeight;
23
	}
24
25
	public void setMarginHeight(int marginHeight) {
26
		this.marginHeight = marginHeight;
27
	}
28
29
	public int getMarginWidth() {
30
		return marginWidth;
31
	}
32
33
	public void setMarginWidth(int marginWidth) {
34
		this.marginWidth = marginWidth;
35
	}
36
37
	public int getNumColumns() {
38
		return numColumns;
39
	}
40
41
	public void setNumColumns(int numColumns) {
42
		this.numColumns = numColumns;
43
	}
44
45
	public int getVerticalSpacing() {
46
		return verticalSpacing;
47
	}
48
49
	public void setVerticalSpacing(int verticalSpacing) {
50
		this.verticalSpacing = verticalSpacing;
51
	}
52
53
}
(-)src/org/eclipse/gmf/internal/codegen/draw2d/GridLayout.java (+794 lines)
Added Link Here
1
package org.eclipse.gmf.internal.codegen.draw2d;
2
3
import java.util.HashMap;
4
import java.util.List;
5
import java.util.Map;
6
7
import org.eclipse.draw2d.AbstractLayout;
8
import org.eclipse.draw2d.IFigure;
9
import org.eclipse.draw2d.LayoutManager;
10
import org.eclipse.draw2d.geometry.Dimension;
11
import org.eclipse.draw2d.geometry.Rectangle;
12
import org.eclipse.swt.SWT;
13
14
15
/**
16
 * Lays out children into a Grid arrangement in which overall aligment and
17
 * spacing can be configured, as well as specfic layout requirements for the
18
 * each individual member of the GridLayout. This layout is a Draw2D port of the
19
 * swt GridLayout.
20
 * 
21
 * <code>GridLayout</code> has a number of configuration fields, and the
22
 * Figures it lays out can have an associated layout data object, called
23
 * <code>GridData</code> (similar to the swt GridData object). The power of
24
 * <code>GridLayout</code> lies in the ability to configure
25
 * <code>GridData</code> for each Figure in the layout.
26
 * <p>
27
 * The following code creates a container Figure managed by a
28
 * <code>GridLayout</code> with 2 columns, containing 3 RectangleFigure
29
 * shapes, the last of which has been given further layout instructions.
30
 * Note that it is the <code>GridLayout</code> method <code>setConstraint</code>
31
 * that binds the child <code>Figure</code> to its layout <code>GridData</code> object.
32
 * 
33
 * <pre>
34
 *     Figure container = new Figure();
35
 *     GridLayout gridLayout = new GridLayout();
36
 *     gridLayout.numColumns = 2;
37
 *     container.setLayout(gridLayout);
38
 * 
39
 *     Shape rect;
40
 *     rect = new RectangleFigure();
41
 *     container.add(rect);
42
 * 
43
 *     rect = new RectangleFigure();
44
 *     container.add(rect);
45
 * 
46
 *     rect = new RectangleFigure();
47
 *     GridData gridData = new GridData();
48
 *     gridData.widthHint = 150;
49
 *     layout.setConstraint(rect, gridData);
50
 * 
51
 *     container.add(rect);
52
 * </pre>
53
 * 
54
 * <p>
55
 * The <code>numColumns</code> field is the most important field in a
56
 * <code>GridLayout</code>. Widgets are laid out in columns from left to
57
 * right, and a new row is created when <code>numColumns</code>+ 1 figures
58
 * are added to the <code>Figure<code> parent container.
59
 * 
60
 * @see GridData
61
 * 
62
 * @author Asim Ullah
63
 * created: Sep 10, 2004
64
 */
65
public class GridLayout extends AbstractLayout {
66
67
	/**
68
	 * numColumns specifies the number of cell columns in the layout.
69
	 * 
70
	 * The default value is 1.
71
	 */
72
	public int numColumns = 1;
73
74
	/**
75
	 * makeColumnsEqualWidth specifies whether all columns in the layout will be
76
	 * forced to have the same width.
77
	 * 
78
	 * The default value is false.
79
	 */
80
	public boolean makeColumnsEqualWidth = false;
81
82
	/**
83
	 * marginWidth specifies the number of pixels of horizontal margin that will
84
	 * be placed along the left and right edges of the layout.
85
	 * 
86
	 * The default value is 5.
87
	 */
88
	public int marginWidth = 5;
89
90
	/**
91
	 * marginHeight specifies the number of pixels of vertical margin that will
92
	 * be placed along the top and bottom edges of the layout.
93
	 * 
94
	 * The default value is 5.
95
	 */
96
	public int marginHeight = 5;
97
98
	/**
99
	 * horizontalSpacing specifies the number of pixels between the right edge
100
	 * of one cell and the left edge of its neighbouring cell to the right.
101
	 * 
102
	 * The default value is 5.
103
	 */
104
	public int horizontalSpacing = 5;
105
106
	/**
107
	 * verticalSpacing specifies the number of pixels between the bottom edge of
108
	 * one cell and the top edge of its neighbouring cell underneath.
109
	 * 
110
	 * The default value is 5.
111
	 */
112
	public int verticalSpacing = 5;
113
114
	/** The layout contraints */
115
	protected Map constraints = new HashMap();
116
117
	/**
118
	 *  Default Constructor
119
	 */
120
	public GridLayout() {
121
		super();
122
	}
123
124
	/**
125
	 * Constructs a new instance of this class given the number of columns, and
126
	 * whether or not the columns should be forced to have the same width.
127
	 * 
128
	 * @param numColumns
129
	 *            the number of columns in the grid
130
	 * @param makeColumnsEqualWidth
131
	 *            whether or not the columns will have equal width
132
	 *  
133
	 */
134
	public GridLayout(int numColumns, boolean makeColumnsEqualWidth) {
135
		this.numColumns = numColumns;
136
		this.makeColumnsEqualWidth = makeColumnsEqualWidth;
137
	}
138
139
	/**
140
	 * @param child
141
	 * @param wHint
142
	 * @param hHint
143
	 * @return
144
	 */
145
	protected Dimension getChildSize(IFigure child, int wHint, int hHint) {
146
		return child.getPreferredSize(wHint, hHint);
147
	}
148
149
	GridData getData(IFigure[][] grid, int row, int column, int rowCount,
150
			int columnCount, boolean first) {
151
		IFigure figure = grid[row][column];
152
		if (figure != null) {
153
			GridData data = (GridData) getConstraint(figure);
154
			int hSpan = Math.max(1, Math.min(data.horizontalSpan, columnCount));
155
			int vSpan = Math.max(1, data.verticalSpan);
156
			int i = first ? row + vSpan - 1 : row - vSpan + 1;
157
			int j = first ? column + hSpan - 1 : column - hSpan + 1;
158
			if (0 <= i && i < rowCount) {
159
				if (0 <= j && j < columnCount) {
160
					if (figure == grid[i][j])
161
						return data;
162
				}
163
			}
164
		}
165
		return null;
166
	}
167
    
168
    void initChildren(IFigure container)
169
    {
170
        List children = container.getChildren();
171
        for (int i = 0; i < children.size(); i++) {
172
            IFigure child = (IFigure) children.get(i);
173
            if (child.getLayoutManager()==null)
174
            	child.setLayoutManager(this);
175
        }
176
    }
177
178
	/*
179
	 * (non-Javadoc)
180
	 * 
181
	 * @see org.eclipse.draw2d.AbstractLayout#calculatePreferredSize(org.eclipse.draw2d.IFigure,
182
	 *      int, int)
183
	 */
184
	protected Dimension calculatePreferredSize(IFigure container, int wHint,
185
			int hHint) {
186
		Dimension size = layout(container, false, 0, 0, wHint, hHint, /* flushCache */
187
				true);
188
    		if (wHint != SWT.DEFAULT)
189
			size.width = wHint;
190
		if (hHint != SWT.DEFAULT)
191
			size.height = hHint;
192
193
		return size;
194
	}
195
196
	/*
197
	 * (non-Javadoc)
198
	 * 
199
	 * @see org.eclipse.draw2d.LayoutManager#layout(org.eclipse.draw2d.IFigure)
200
	 */
201
	public void layout(IFigure container) {
202
        //initChildren( container);
203
		Rectangle rect = container.getClientArea();
204
		layout(container, true, rect.x, rect.y, rect.width, rect.height, /* flushCache */
205
				true);
206
207
	}
208
209
	Dimension layout(IFigure container, boolean move, int x, int y, int width,
210
			int height, boolean flushCache) {
211
		if (numColumns < 1)
212
			return new Dimension(marginWidth * 2, marginHeight * 2);
213
		List children = container.getChildren();
214
		for (int i = 0; i < children.size(); i++) {
215
			IFigure child = (IFigure) children.get(i);
216
217
			GridData data = (GridData) getConstraint(child);
218
			if (data == null)
219
				setConstraint(child, data = new GridData());
220
			if (flushCache)
221
				data.flushCache();
222
			data.computeSize(child, flushCache);
223
		}
224
225
		/* Build the grid */
226
		int row = 0, column = 0, rowCount = 0, columnCount = numColumns;
227
		IFigure[][] grid = new IFigure[4][columnCount];
228
		for (int i = 0; i < children.size(); i++) {
229
			IFigure child = (IFigure) children.get(i);
230
			GridData data = (GridData) getConstraint(child);
231
			int hSpan = Math.max(1, Math.min(data.horizontalSpan, columnCount));
232
			int vSpan = Math.max(1, data.verticalSpan);
233
			while (true) {
234
				int lastRow = row + vSpan;
235
				if (lastRow >= grid.length) {
236
					IFigure[][] newGrid = new IFigure[lastRow + 4][columnCount];
237
					System.arraycopy(grid, 0, newGrid, 0, grid.length);
238
					grid = newGrid;
239
				}
240
				if (grid[row] == null) {
241
					grid[row] = new IFigure[columnCount];
242
				}
243
				while (column < columnCount && grid[row][column] != null) {
244
					column++;
245
				}
246
				int endCount = column + hSpan;
247
				if (endCount <= columnCount) {
248
					int index = column;
249
					while (index < endCount && grid[row][index] == null) {
250
						index++;
251
					}
252
					if (index == endCount)
253
						break;
254
					column = index;
255
				}
256
				if (column + hSpan >= columnCount) {
257
					column = 0;
258
					row++;
259
				}
260
			}
261
			for (int j = 0; j < vSpan; j++) {
262
				if (grid[row + j] == null) {
263
					grid[row + j] = new IFigure[columnCount];
264
				}
265
				for (int k = 0; k < hSpan; k++) {
266
					grid[row + j][column + k] = child;
267
				}
268
			}
269
			rowCount = Math.max(rowCount, row + vSpan);
270
			column += hSpan;
271
		}
272
273
		/* Column widths */
274
		int availableWidth = width - horizontalSpacing * (columnCount - 1)
275
				- marginWidth * 2;
276
		int expandCount = 0;
277
		int[] widths = new int[columnCount];
278
		int[] minWidths = new int[columnCount];
279
		boolean[] expandColumn = new boolean[columnCount];
280
		for (int j = 0; j < columnCount; j++) {
281
			for (int i = 0; i < rowCount; i++) {
282
				GridData data = getData(grid, i, j, rowCount, columnCount, true);
283
				if (data != null) {
284
					int hSpan = Math.max(1, Math.min(data.horizontalSpan,
285
							columnCount));
286
					if (hSpan == 1) {
287
						int w = data.cacheWidth + data.horizontalIndent;
288
						widths[j] = Math.max(widths[j], w);
289
						if (data.grabExcessHorizontalSpace) {
290
							if (!expandColumn[j])
291
								expandCount++;
292
							expandColumn[j] = true;
293
						}
294
						if (data.widthHint != SWT.DEFAULT
295
								|| !data.grabExcessHorizontalSpace) {
296
							minWidths[j] = Math.max(minWidths[j], w);
297
						}
298
					}
299
				}
300
			}
301
			for (int i = 0; i < rowCount; i++) {
302
				GridData data = getData(grid, i, j, rowCount, columnCount,
303
						false);
304
				if (data != null) {
305
					int hSpan = Math.max(1, Math.min(data.horizontalSpan,
306
							columnCount));
307
					if (hSpan > 1) {
308
						int spanWidth = 0, spanMinWidth = 0, spanExpandCount = 0;
309
						for (int k = 0; k < hSpan; k++) {
310
							spanWidth += widths[j - k];
311
							spanMinWidth += minWidths[j - k];
312
							if (expandColumn[j - k])
313
								spanExpandCount++;
314
						}
315
						if (data.grabExcessHorizontalSpace
316
								&& spanExpandCount == 0) {
317
							expandCount++;
318
							expandColumn[j] = true;
319
						}
320
						int w = data.cacheWidth + data.horizontalIndent
321
								- spanWidth - (hSpan - 1) * horizontalSpacing;
322
						if (w > 0) {
323
							if (spanExpandCount == 0) {
324
								widths[j] += w;
325
							} else {
326
								int delta = w / spanExpandCount;
327
								int remainder = w % spanExpandCount, last = -1;
328
								for (int k = 0; k < hSpan; k++) {
329
									if (expandColumn[j - k]) {
330
										widths[last = j - k] += delta;
331
									}
332
								}
333
								if (last > -1)
334
									widths[last] += remainder;
335
							}
336
						}
337
						if (data.widthHint != SWT.DEFAULT
338
								|| !data.grabExcessHorizontalSpace) {
339
							w = data.cacheWidth + data.horizontalIndent
340
									- spanMinWidth - (hSpan - 1)
341
									* horizontalSpacing;
342
							if (w > 0) {
343
								if (spanExpandCount == 0) {
344
									minWidths[j] += w;
345
								} else {
346
									int delta = w / spanExpandCount;
347
									int remainder = w % spanExpandCount, last = -1;
348
									for (int k = 0; k < hSpan; k++) {
349
										if (expandColumn[j - k]) {
350
											minWidths[last = j - k] += delta;
351
										}
352
									}
353
									if (last > -1)
354
										minWidths[last] += remainder;
355
								}
356
							}
357
						}
358
					}
359
				}
360
			}
361
		}
362
		if (makeColumnsEqualWidth) {
363
			int minColumnWidth = 0;
364
			int columnWidth = 0;
365
			for (int i = 0; i < columnCount; i++) {
366
				minColumnWidth = Math.max(minColumnWidth, minWidths[i]);
367
				columnWidth = Math.max(columnWidth, widths[i]);
368
			}
369
			columnWidth = width == SWT.DEFAULT || expandCount == 0
370
					? columnWidth
371
					: Math.max(minColumnWidth, availableWidth / columnCount);
372
			for (int i = 0; i < columnCount; i++) {
373
				expandColumn[i] = expandCount > 0;
374
				widths[i] = columnWidth;
375
			}
376
		} else {
377
			if (width != SWT.DEFAULT && expandCount > 0) {
378
				int totalWidth = 0;
379
				for (int i = 0; i < columnCount; i++) {
380
					totalWidth += widths[i];
381
				}
382
				int count = expandCount;
383
				int delta = (availableWidth - totalWidth) / count;
384
				int remainder = (availableWidth - totalWidth) % count;
385
				int last = -1;
386
				while (totalWidth != availableWidth) {
387
					for (int j = 0; j < columnCount; j++) {
388
						if (expandColumn[j]) {
389
							if (widths[j] + delta > minWidths[j]) {
390
								widths[last = j] = widths[j] + delta;
391
							} else {
392
								widths[j] = minWidths[j];
393
								expandColumn[j] = false;
394
								count--;
395
							}
396
						}
397
					}
398
					if (last > -1)
399
						widths[last] += remainder;
400
401
					for (int j = 0; j < columnCount; j++) {
402
						for (int i = 0; i < rowCount; i++) {
403
							GridData data = getData(grid, i, j, rowCount,
404
									columnCount, false);
405
							if (data != null) {
406
								int hSpan = Math.max(1, Math.min(
407
										data.horizontalSpan, columnCount));
408
								if (hSpan > 1) {
409
									if (data.widthHint != SWT.DEFAULT
410
											|| !data.grabExcessHorizontalSpace) {
411
										int spanWidth = 0, spanExpandCount = 0;
412
										for (int k = 0; k < hSpan; k++) {
413
											spanWidth += widths[j - k];
414
											if (expandColumn[j - k])
415
												spanExpandCount++;
416
										}
417
										int w = data.cacheWidth
418
												+ data.horizontalIndent
419
												- spanWidth - (hSpan - 1)
420
												* horizontalSpacing;
421
										if (w > 0) {
422
											if (spanExpandCount == 0) {
423
												widths[j] += w;
424
											} else {
425
												int delta2 = w
426
														/ spanExpandCount;
427
												int remainder2 = w
428
														% spanExpandCount, last2 = -1;
429
												for (int k = 0; k < hSpan; k++) {
430
													if (expandColumn[j - k]) {
431
														widths[last2 = j - k] += delta2;
432
													}
433
												}
434
												if (last2 > -1)
435
													widths[last2] += remainder2;
436
											}
437
										}
438
									}
439
								}
440
							}
441
						}
442
					}
443
					if (count == 0)
444
						break;
445
					totalWidth = 0;
446
					for (int i = 0; i < columnCount; i++) {
447
						totalWidth += widths[i];
448
					}
449
					delta = (availableWidth - totalWidth) / count;
450
					remainder = (availableWidth - totalWidth) % count;
451
					last = -1;
452
				}
453
			}
454
		}
455
456
		/* Wrapping */
457
		GridData[] flush = null;
458
		int flushLength = 0;
459
		if (width != SWT.DEFAULT) {
460
			for (int j = 0; j < columnCount; j++) {
461
				for (int i = 0; i < rowCount; i++) {
462
					GridData data = getData(grid, i, j, rowCount, columnCount,
463
							false);
464
					if (data != null) {
465
						if (data.heightHint == SWT.DEFAULT) {
466
							IFigure child = grid[i][j];
467
							//TEMPORARY CODE
468
							int hSpan = Math.max(1, Math.min(
469
									data.horizontalSpan, columnCount));
470
							int currentWidth = 0;
471
							for (int k = 0; k < hSpan; k++) {
472
								currentWidth += widths[j - k];
473
							}
474
							currentWidth += (hSpan - 1) * horizontalSpacing
475
									- data.horizontalIndent;
476
							if ((currentWidth != data.cacheWidth && data.horizontalAlignment == SWT.FILL)
477
									|| (data.cacheWidth > currentWidth)) {
478
								int trim = 0;
479
								/*
480
								  // *Note*: Left this in place from SWT
481
								  // GridLayout. Not sure if Draw2D Borders or
482
								  // Scrollbars 'trim' will need to be takeninto account.
483
								  
484
								  if (child instanceof Group) { 
485
                                      Group g =(Group)child; trim = g.getSize ().x -
486
                                      g.getClientArea ().width; 
487
                                  } else if (child instanceof Scrollable) { 
488
                                      Rectangle rect =
489
                                          ((Scrollable) child).computeTrim (0, 0, 0,0);
490
                                           trim = rect.width; } 
491
                                  else {
492
    								  trim = child.getBorderWidth () * 2; 
493
                                  }
494
								 */
495
								int oldWidthHint = data.widthHint;
496
								data.widthHint = Math.max(0, currentWidth
497
										- trim);
498
								data.cacheWidth = data.cacheHeight = SWT.DEFAULT;
499
								data.computeSize(child, false);
500
								data.widthHint = oldWidthHint;
501
								if (flush == null)
502
									flush = new GridData[children.size()];
503
								flush[flushLength++] = data;
504
							}
505
						}
506
					}
507
				}
508
			}
509
		}
510
511
		/* Row heights */
512
		int availableHeight = height - verticalSpacing * (rowCount - 1)
513
				- marginHeight * 2;
514
		expandCount = 0;
515
		int[] heights = new int[rowCount];
516
		int[] minHeights = new int[rowCount];
517
		boolean[] expandRow = new boolean[rowCount];
518
		for (int i = 0; i < rowCount; i++) {
519
			for (int j = 0; j < columnCount; j++) {
520
				GridData data = getData(grid, i, j, rowCount, columnCount, true);
521
				if (data != null) {
522
					int vSpan = Math.max(1, Math.min(data.verticalSpan,
523
							rowCount));
524
					if (vSpan == 1) {
525
						int h = data.cacheHeight; // + data.verticalIndent;
526
						heights[i] = Math.max(heights[i], h);
527
						if (data.grabExcessVerticalSpace) {
528
							if (!expandRow[i])
529
								expandCount++;
530
							expandRow[i] = true;
531
						}
532
						if (data.heightHint != SWT.DEFAULT
533
								|| !data.grabExcessVerticalSpace) {
534
							minHeights[i] = Math.max(minHeights[i], h);
535
						}
536
					}
537
				}
538
			}
539
			for (int j = 0; j < columnCount; j++) {
540
				GridData data = getData(grid, i, j, rowCount, columnCount,
541
						false);
542
				if (data != null) {
543
					int vSpan = Math.max(1, Math.min(data.verticalSpan,
544
							rowCount));
545
					if (vSpan > 1) {
546
						int spanHeight = 0, spanMinHeight = 0, spanExpandCount = 0;
547
						for (int k = 0; k < vSpan; k++) {
548
							spanHeight += heights[i - k];
549
							spanMinHeight += minHeights[i - k];
550
							if (expandRow[i - k])
551
								spanExpandCount++;
552
						}
553
						if (data.grabExcessVerticalSpace
554
								&& spanExpandCount == 0) {
555
							expandCount++;
556
							expandRow[i] = true;
557
						}
558
						int h = data.cacheHeight - spanHeight - (vSpan - 1)
559
								* verticalSpacing; // + data.verticalalIndent
560
						if (h > 0) {
561
							if (spanExpandCount == 0) {
562
								heights[i] += h;
563
							} else {
564
								int delta = h / spanExpandCount;
565
								int remainder = h % spanExpandCount, last = -1;
566
								for (int k = 0; k < vSpan; k++) {
567
									if (expandRow[i - k]) {
568
										heights[last = i - k] += delta;
569
									}
570
								}
571
								if (last > -1)
572
									heights[last] += remainder;
573
							}
574
						}
575
						if (data.heightHint != SWT.DEFAULT
576
								|| !data.grabExcessVerticalSpace) {
577
							h = data.cacheHeight - spanMinHeight - (vSpan - 1)
578
									* verticalSpacing; // + data.verticalIndent
579
							if (h > 0) {
580
								if (spanExpandCount == 0) {
581
									minHeights[i] += h;
582
								} else {
583
									int delta = h / spanExpandCount;
584
									int remainder = h % spanExpandCount, last = -1;
585
									for (int k = 0; k < vSpan; k++) {
586
										if (expandRow[i - k]) {
587
											minHeights[last = i - k] += delta;
588
										}
589
									}
590
									if (last > -1)
591
										minHeights[last] += remainder;
592
								}
593
							}
594
						}
595
					}
596
				}
597
			}
598
		}
599
		if (height != SWT.DEFAULT && expandCount > 0) {
600
			int totalHeight = 0;
601
			for (int i = 0; i < rowCount; i++) {
602
				totalHeight += heights[i];
603
			}
604
			int count = expandCount;
605
			int delta = (availableHeight - totalHeight) / count;
606
			int remainder = (availableHeight - totalHeight) % count;
607
			int last = -1;
608
			while (totalHeight != availableHeight) {
609
				for (int i = 0; i < rowCount; i++) {
610
					if (expandRow[i]) {
611
						if (heights[i] + delta > minHeights[i]) {
612
							heights[last = i] = heights[i] + delta;
613
						} else {
614
							heights[i] = minHeights[i];
615
							expandRow[i] = false;
616
							count--;
617
						}
618
					}
619
				}
620
				if (last > -1)
621
					heights[last] += remainder;
622
623
				for (int i = 0; i < rowCount; i++) {
624
					for (int j = 0; j < columnCount; j++) {
625
						GridData data = getData(grid, i, j, rowCount,
626
								columnCount, false);
627
						if (data != null) {
628
							int vSpan = Math.max(1, Math.min(data.verticalSpan,
629
									rowCount));
630
							if (vSpan > 1) {
631
								if (data.heightHint != SWT.DEFAULT
632
										|| !data.grabExcessVerticalSpace) {
633
									int spanHeight = 0, spanExpandCount = 0;
634
									for (int k = 0; k < vSpan; k++) {
635
										spanHeight += heights[i - k];
636
										if (expandRow[i - k])
637
											spanExpandCount++;
638
									}
639
									int h = data.cacheHeight - spanHeight
640
											- (vSpan - 1) * verticalSpacing; // +
641
																			 // data.verticalIndent
642
									if (h > 0) {
643
										if (spanExpandCount == 0) {
644
											heights[i] += h;
645
										} else {
646
											int delta2 = h / spanExpandCount;
647
											int remainder2 = h
648
													% spanExpandCount, last2 = -1;
649
											for (int k = 0; k < vSpan; k++) {
650
												if (expandRow[i - k]) {
651
													heights[last2 = i - k] += delta2;
652
												}
653
											}
654
											if (last2 > -1)
655
												heights[last2] += remainder2;
656
										}
657
									}
658
								}
659
							}
660
						}
661
					}
662
				}
663
				if (count == 0)
664
					break;
665
				totalHeight = 0;
666
				for (int i = 0; i < rowCount; i++) {
667
					totalHeight += heights[i];
668
				}
669
				delta = (availableHeight - totalHeight) / count;
670
				remainder = (availableHeight - totalHeight) % count;
671
				last = -1;
672
			}
673
		}
674
675
		/* Position the IFigures */
676
		if (move) {
677
			int gridY = y + marginHeight;
678
			for (int i = 0; i < rowCount; i++) {
679
				int gridX = x + marginWidth;
680
				for (int j = 0; j < columnCount; j++) {
681
					GridData data = getData(grid, i, j, rowCount, columnCount,
682
							true);
683
					if (data != null) {
684
						int hSpan = Math.max(1, Math.min(data.horizontalSpan,
685
								columnCount));
686
						int vSpan = Math.max(1, data.verticalSpan);
687
						int cellWidth = 0, cellHeight = 0;
688
						for (int k = 0; k < hSpan; k++) {
689
							cellWidth += widths[j + k];
690
						}
691
						for (int k = 0; k < vSpan; k++) {
692
							cellHeight += heights[i + k];
693
						}
694
						cellWidth += horizontalSpacing * (hSpan - 1);
695
						int childX = gridX + data.horizontalIndent;
696
						int childWidth = Math.min(data.cacheWidth, cellWidth);
697
						switch (data.horizontalAlignment) {
698
							case SWT.CENTER :
699
							case GridData.CENTER :
700
								childX = gridX
701
										+ Math.max(0,
702
												(cellWidth - childWidth) / 2);
703
								break;
704
							case SWT.RIGHT :
705
							case SWT.END :
706
							case GridData.END :
707
								childX = gridX
708
										+ Math.max(0, cellWidth - childWidth);
709
								break;
710
							case SWT.FILL :
711
								childWidth = cellWidth - data.horizontalIndent;
712
								break;
713
						}
714
						cellHeight += verticalSpacing * (vSpan - 1);
715
						int childY = gridY; // + data.verticalIndent;
716
						int childHeight = Math
717
								.min(data.cacheHeight, cellHeight);
718
						switch (data.verticalAlignment) {
719
							case SWT.CENTER :
720
							case GridData.CENTER :
721
								childY = gridY
722
										+ Math.max(0,
723
												(cellHeight - childHeight) / 2);
724
								break;
725
							case SWT.BOTTOM :
726
							case SWT.END :
727
							case GridData.END :
728
								childY = gridY
729
										+ Math.max(0, cellHeight - childHeight);
730
								break;
731
							case SWT.FILL :
732
								childHeight = cellHeight; // -
733
														  // data.verticalIndent;
734
								break;
735
						}
736
						IFigure child = grid[i][j];
737
						if (child != null) {
738
							// following param could be replaced by
739
							// Rectangle.SINGLETON
740
							child.setBounds(new Rectangle(childX, childY,
741
									childWidth, childHeight));
742
						}
743
					}
744
					gridX += widths[j] + horizontalSpacing;
745
				}
746
				gridY += heights[i] + verticalSpacing;
747
			}
748
		}
749
750
		// clean up cache
751
		for (int i = 0; i < flushLength; i++) {
752
			flush[i].cacheWidth = flush[i].cacheHeight = -1;
753
		}
754
755
		int totalDefaultWidth = 0;
756
		int totalDefaultHeight = 0;
757
		for (int i = 0; i < columnCount; i++) {
758
			totalDefaultWidth += widths[i];
759
		}
760
		for (int i = 0; i < rowCount; i++) {
761
			totalDefaultHeight += heights[i];
762
		}
763
		totalDefaultWidth += horizontalSpacing * (columnCount - 1)
764
				+ marginWidth * 2;
765
		totalDefaultHeight += verticalSpacing * (rowCount - 1) + marginHeight
766
				* 2;
767
		return new Dimension(totalDefaultWidth, totalDefaultHeight);
768
	}
769
770
	/*
771
	 * (non-Javadoc)
772
	 * 
773
	 * @see org.eclipse.draw2d.LayoutManager#getConstraint(org.eclipse.draw2d.IFigure)
774
	 */
775
	public Object getConstraint(IFigure child) {
776
		return constraints.get(child);
777
	}
778
779
	/**
780
	 * Sets the layout constraint of the given figure. The constraints can only
781
	 * be of type {@link GridData}.
782
	 * 
783
	 * @see LayoutManager#setConstraint(IFigure, Object)
784
	 */
785
	public void setConstraint(IFigure figure, Object newConstraint) {
786
		super.setConstraint(figure, newConstraint);
787
		if (newConstraint != null)
788
        {
789
			constraints.put(figure, newConstraint);
790
            
791
        }
792
	}
793
794
}

Return to bug 127252