diff options
author | Lukas Ladenberger | 2012-03-28 11:36:02 +0000 |
---|---|---|
committer | Michael Jastram | 2012-04-05 10:44:46 +0000 |
commit | 91f42e7b9cd502e4027cc3b187fa944fa711e049 (patch) | |
tree | 1c530bc88e772635763b1c821f907f242c0740f2 | |
parent | bbaca455c7e0b4a73bd1de1878ff24ca89f00525 (diff) | |
download | org.eclipse.rmf-91f42e7b9cd502e4027cc3b187fa944fa711e049.tar.gz org.eclipse.rmf-91f42e7b9cd502e4027cc3b187fa944fa711e049.tar.xz org.eclipse.rmf-91f42e7b9cd502e4027cc3b187fa944fa711e049.zip |
fixed column stuff
4 files changed, 20 insertions, 37 deletions
diff --git a/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ColumnItemProvider.java b/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ColumnItemProvider.java index d9ddf0e7..e24ec718 100644 --- a/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ColumnItemProvider.java +++ b/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ColumnItemProvider.java @@ -152,18 +152,28 @@ public class ColumnItemProvider }
/**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
+ * This handles model notifications by calling {@link #updateChildren} to
+ * update any cached children and by creating a viewer notification, which
+ * it passes to {@link #fireNotifyChanged}. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated NOT
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
-
switch (notification.getFeatureID(Column.class)) {
case ConfigPackage.COLUMN__LABEL:
+ // inform the parent
+ InternalEObject parent = (InternalEObject) ((EObject) notification
+ .getNotifier()).eContainer();
+ if (parent instanceof ProrSpecViewConfiguration) {
+ parent.eNotify(new ENotificationImpl(
+ parent,
+ ENotificationImpl.SET,
+ ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS,
+ notification.getNotifier(), notification.getNotifier()));
+ }
case ConfigPackage.COLUMN__WIDTH:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
diff --git a/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ProrSpecViewConfigurationItemProvider.java b/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ProrSpecViewConfigurationItemProvider.java index aa71ef4e..64e19db7 100644 --- a/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ProrSpecViewConfigurationItemProvider.java +++ b/org.eclipse.rmf.pror.reqif10.edit/src/org/eclipse/rmf/pror/reqif10/configuration/provider/ProrSpecViewConfigurationItemProvider.java @@ -113,7 +113,6 @@ public class ProrSpecViewConfigurationItemProvider if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS);
- childrenFeatures.add(ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__LEFT_HEADER_COLUMN);
}
return childrenFeatures;
}
@@ -169,8 +168,10 @@ public class ProrSpecViewConfigurationItemProvider updateChildren(notification);
switch (notification.getFeatureID(ProrSpecViewConfiguration.class)) {
- case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS:
case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__LEFT_HEADER_COLUMN:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigPackage.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -192,34 +193,6 @@ public class ProrSpecViewConfigurationItemProvider (createChildParameter
(ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS,
ConfigFactory.eINSTANCE.createColumn()));
-
- newChildDescriptors.add
- (createChildParameter
- (ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__LEFT_HEADER_COLUMN,
- ConfigFactory.eINSTANCE.createColumn()));
- }
-
- /**
- * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
- Object childFeature = feature;
- Object childObject = child;
-
- boolean qualify =
- childFeature == ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__COLUMNS ||
- childFeature == ConfigPackage.Literals.PROR_SPEC_VIEW_CONFIGURATION__LEFT_HEADER_COLUMN;
-
- if (qualify) {
- return getString
- ("_UI_CreateChild_text2",
- new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
- }
- return super.getCreateChildText(owner, feature, child, selection);
}
/**
diff --git a/org.eclipse.rmf.pror.reqif10.editor/src/org/eclipse/rmf/pror/reqif10/editor/agilegrid/ProrAgileGridViewer.java b/org.eclipse.rmf.pror.reqif10.editor/src/org/eclipse/rmf/pror/reqif10/editor/agilegrid/ProrAgileGridViewer.java index bd4b70b2..ba8bbdd0 100644 --- a/org.eclipse.rmf.pror.reqif10.editor/src/org/eclipse/rmf/pror/reqif10/editor/agilegrid/ProrAgileGridViewer.java +++ b/org.eclipse.rmf.pror.reqif10.editor/src/org/eclipse/rmf/pror/reqif10/editor/agilegrid/ProrAgileGridViewer.java @@ -53,7 +53,6 @@ import org.eclipse.rmf.pror.reqif10.configuration.ProrSpecViewConfiguration; import org.eclipse.rmf.pror.reqif10.editor.agilegrid.ProrAgileGridContentProvider.ProrRow;
import org.eclipse.rmf.pror.reqif10.util.ConfigurationUtil;
import org.eclipse.rmf.pror.reqif10.util.ProrUtil;
-import org.eclipse.rmf.reqif10.AttributeValue;
import org.eclipse.rmf.reqif10.Reqif10Factory;
import org.eclipse.rmf.reqif10.Reqif10Package;
import org.eclipse.rmf.reqif10.SpecHierarchy;
diff --git a/org.eclipse.rmf.pror.reqif10/model/reqif10.genmodel b/org.eclipse.rmf.pror.reqif10/model/reqif10.genmodel index 8ca85c93..974b7ef2 100644 --- a/org.eclipse.rmf.pror.reqif10/model/reqif10.genmodel +++ b/org.eclipse.rmf.pror.reqif10/model/reqif10.genmodel @@ -238,6 +238,7 @@ <genClasses image="false" ecoreClass="configuration.ecore#//ProrSpecViewConfiguration">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//ProrSpecViewConfiguration/specification"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//ProrSpecViewConfiguration/columns"/>
+ <genFeatures property="None" createChild="false" ecoreFeature="ecore:EReference configuration.ecore#//ProrSpecViewConfiguration/leftHeaderColumn"/>
</genClasses>
<genClasses image="false" ecoreClass="configuration.ecore#//Column">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//Column/label"/>
|